From 95e901bf6b57310967de5dcd7877e4d447e06bbf Mon Sep 17 00:00:00 2001 From: minz1 Date: Tue, 11 Jul 2017 18:53:58 -0400 Subject: [PATCH] msm: camera: reset to CAF --- drivers/media/platform/msm/Kconfig | 12 - drivers/media/platform/msm/Makefile | 8 - drivers/media/platform/msm/camera_v2/Kconfig | 208 +- drivers/media/platform/msm/camera_v2/Makefile | 3 +- .../media/platform/msm/camera_v2/cam_dummy.c | 250 - .../platform/msm/camera_v2/camera/camera.c | 36 +- .../platform/msm/camera_v2/fd/msm_fd_dev.c | 20 +- .../platform/msm/camera_v2/fd/msm_fd_dev.h | 1 + .../media/platform/msm/camera_v2/isp/Makefile | 2 +- .../platform/msm/camera_v2/isp/msm_buf_mgr.c | 415 +- .../platform/msm/camera_v2/isp/msm_buf_mgr.h | 35 +- .../platform/msm/camera_v2/isp/msm_isp.c | 378 +- .../platform/msm/camera_v2/isp/msm_isp.h | 217 +- .../platform/msm/camera_v2/isp/msm_isp32.c | 471 +- .../platform/msm/camera_v2/isp/msm_isp40.c | 987 +- .../platform/msm/camera_v2/isp/msm_isp44.c | 840 +- .../msm/camera_v2/isp/msm_isp_axi_util.c | 1180 +- .../msm/camera_v2/isp/msm_isp_axi_util.h | 26 +- .../msm/camera_v2/isp/msm_isp_stats_util.c | 161 +- .../msm/camera_v2/isp/msm_isp_stats_util.h | 4 +- .../platform/msm/camera_v2/isp/msm_isp_util.c | 896 +- .../platform/msm/camera_v2/isp/msm_isp_util.h | 27 +- .../platform/msm/camera_v2/ispif/msm_ispif.c | 343 +- .../platform/msm/camera_v2/ispif/msm_ispif.h | 6 +- .../platform/msm/camera_v2/jpeg_10/Makefile | 2 +- .../msm/camera_v2/jpeg_10/msm_jpeg_common.h | 8 +- .../msm/camera_v2/jpeg_10/msm_jpeg_core.c | 92 +- .../msm/camera_v2/jpeg_10/msm_jpeg_core.h | 4 +- .../msm/camera_v2/jpeg_10/msm_jpeg_dev.c | 42 +- .../msm/camera_v2/jpeg_10/msm_jpeg_hw.c | 213 +- .../msm/camera_v2/jpeg_10/msm_jpeg_hw.h | 33 +- .../msm/camera_v2/jpeg_10/msm_jpeg_hw_reg.h | 48 +- .../msm/camera_v2/jpeg_10/msm_jpeg_platform.c | 62 +- .../msm/camera_v2/jpeg_10/msm_jpeg_sync.c | 408 +- .../msm/camera_v2/jpeg_10/msm_jpeg_sync.h | 12 +- drivers/media/platform/msm/camera_v2/msm.c | 102 +- drivers/media/platform/msm/camera_v2/msm.h | 22 +- .../msm_buf_mgr/msm_generic_buf_mgr.c | 64 +- drivers/media/platform/msm/camera_v2/msm_sd.h | 2 + .../platform/msm/camera_v2/msm_vb2/msm_vb2.c | 31 +- .../msm/camera_v2/pproc/cpp/msm_cpp.c | 1550 +- .../msm/camera_v2/pproc/cpp/msm_cpp.h | 14 +- .../msm/camera_v2/pproc/vpe/msm_vpe.c | 22 +- .../platform/msm/camera_v2/sensor/Makefile | 23 +- .../camera_v2/sensor/actuator/msm_actuator.c | 1239 +- .../camera_v2/sensor/actuator/msm_actuator.h | 15 +- .../msm/camera_v2/sensor/cci/msm_cci.c | 171 +- .../msm/camera_v2/sensor/cci/msm_cci.h | 11 +- .../sensor/csid/include/msm_csid_2_0_hwreg.h | 2 +- .../sensor/csid/include/msm_csid_2_2_hwreg.h | 2 +- .../sensor/csid/include/msm_csid_3_0_hwreg.h | 2 +- .../sensor/csid/include/msm_csid_3_1_hwreg.h | 2 +- .../sensor/csid/include/msm_csid_3_2_hwreg.h | 2 +- .../msm/camera_v2/sensor/csid/msm_csid.c | 314 +- .../msm/camera_v2/sensor/csid/msm_csid.h | 12 +- .../csiphy/include/msm_csiphy_2_0_hwreg.h | 2 +- .../csiphy/include/msm_csiphy_2_2_hwreg.h | 2 +- .../csiphy/include/msm_csiphy_3_0_hwreg.h | 2 +- .../csiphy/include/msm_csiphy_3_1_hwreg.h | 6 +- .../csiphy/include/msm_csiphy_3_2_hwreg.h | 2 +- .../msm/camera_v2/sensor/csiphy/msm_csiphy.c | 283 +- .../msm/camera_v2/sensor/csiphy/msm_csiphy.h | 13 +- .../platform/msm/camera_v2/sensor/db8221a.h | 33 - .../msm/camera_v2/sensor/db8221a_yuv.c | 703 - .../msm/camera_v2/sensor/db8221a_yuv.h | 3970 -- .../msm/camera_v2/sensor/eeprom/Makefile | 1 - .../msm/camera_v2/sensor/eeprom/msm_eeprom.c | 1680 +- .../msm/camera_v2/sensor/eeprom/msm_eeprom.h | 17 +- .../msm/camera_v2/sensor/eeprom/msm_otp.c | 2244 - .../sensor/eeprom/msm_otp_s5k5e3yx.h | 96 - .../camera_v2/sensor/eeprom/msm_otp_sr544.h | 2102 - .../camera_v2/sensor/eeprom/msm_otp_sr552.h | 2153 - .../msm/camera_v2/sensor/external/Makefile | 5 - .../msm/camera_v2/sensor/external/msm_ois.c | 2238 - .../msm/camera_v2/sensor/external/msm_ois.h | 225 - .../msm/camera_v2/sensor/flash/Makefile | 2 + .../msm/camera_v2/sensor/flash/adp1660.c | 27 +- .../msm/camera_v2/sensor/flash/bd7710.c | 8 +- .../msm/camera_v2/sensor/flash/lm3642.c | 20 +- .../msm/camera_v2/sensor/flash/msm_flash.c | 14 +- .../camera_v2/sensor/flash/msm_led_flash.c | 42 +- .../camera_v2/sensor/flash/msm_led_flash.h | 18 +- .../sensor/flash/msm_led_i2c_trigger.c | 247 +- .../camera_v2/sensor/flash/msm_led_torch.c | 50 +- .../camera_v2/sensor/flash/msm_led_trigger.c | 654 +- .../platform/msm/camera_v2/sensor/gc0339.c | 704 - .../platform/msm/camera_v2/sensor/hi256.c | 2157 - .../platform/msm/camera_v2/sensor/imx132.c | 154 - .../platform/msm/camera_v2/sensor/imx134.c | 174 - .../platform/msm/camera_v2/sensor/imx135.c | 173 - .../platform/msm/camera_v2/sensor/io/Makefile | 2 +- .../camera_v2/sensor/io/msm_camera_cci_i2c.c | 143 +- .../camera_v2/sensor/io/msm_camera_dt_util.c | 640 +- .../camera_v2/sensor/io/msm_camera_dt_util.h | 5 - .../msm/camera_v2/sensor/io/msm_camera_i2c.h | 16 +- .../camera_v2/sensor/io/msm_camera_i2c_mux.c | 4 +- .../camera_v2/sensor/io/msm_camera_io_util.c | 215 +- .../camera_v2/sensor/io/msm_camera_qup_i2c.c | 280 +- .../msm/camera_v2/sensor/io/msm_camera_spi.c | 494 +- .../msm/camera_v2/sensor/io/msm_camera_spi.h | 47 +- .../msm/camera_v2/sensor/msm_sensor.c | 958 +- .../msm/camera_v2/sensor/msm_sensor.h | 14 +- .../msm/camera_v2/sensor/msm_sensor_driver.c | 942 +- .../msm/camera_v2/sensor/msm_sensor_driver.h | 29 +- .../msm/camera_v2/sensor/msm_sensor_init.c | 608 +- .../platform/msm/camera_v2/sensor/mt9m114.c | 362 +- .../msm/camera_v2/sensor/ois/msm_ois.c | 9 +- .../platform/msm/camera_v2/sensor/ov12830.c | 197 - .../platform/msm/camera_v2/sensor/ov2720.c | 155 - .../platform/msm/camera_v2/sensor/ov5645.c | 402 +- .../platform/msm/camera_v2/sensor/ov5648.c | 179 - .../platform/msm/camera_v2/sensor/ov8825.c | 173 - .../platform/msm/camera_v2/sensor/ov8865.c | 185 - .../platform/msm/camera_v2/sensor/ov9724.c | 167 - .../platform/msm/camera_v2/sensor/s5k3l1yx.c | 173 - .../platform/msm/camera_v2/sensor/s5k4e1.c | 167 - .../platform/msm/camera_v2/sensor/s5k4ecgx.h | 54 - .../msm/camera_v2/sensor/s5k4ecgx_regs.h | 6083 --- .../msm/camera_v2/sensor/s5k4ecgx_regs_gte.h | 6236 --- .../msm/camera_v2/sensor/s5k4ecgx_regs_j1x.h | 6250 --- .../msm/camera_v2/sensor/s5k4ecgx_yuv.c | 1587 - .../platform/msm/camera_v2/sensor/sp1628.c | 992 - .../platform/msm/camera_v2/sensor/sr130pc20.h | 36 - .../msm/camera_v2/sensor/sr130pc20_yuv.c | 706 - .../camera_v2/sensor/sr130pc20_yuv_matisse.h | 3070 -- .../platform/msm/camera_v2/sensor/sr200pc20.h | 31 - .../msm/camera_v2/sensor/sr200pc20_yuv.c | 810 - .../msm/camera_v2/sensor/sr200pc20_yuv.h | 13076 ------ .../sensor/sr200pc20_yuv_coreprime.h | 13371 ------ .../msm/camera_v2/sensor/sr200pc20_yuv_gte.h | 13048 ------ .../msm/camera_v2/sensor/sr200pc20_yuv_j1x.h | 11289 ----- .../platform/msm/camera_v2/sensor/sr352.h | 36 - .../platform/msm/camera_v2/sensor/sr352_yuv.c | 2300 - .../msm/camera_v2/sensor/sr352_yuv_matisse.h | 36748 ---------------- .../platform/msm/camera_v2_fortuna/Kconfig | 388 - .../platform/msm/camera_v2_fortuna/Makefile | 19 - .../msm/camera_v2_fortuna/cam_dummy.c | 250 - .../msm/camera_v2_fortuna/camera/Makefile | 3 - .../msm/camera_v2_fortuna/camera/camera.c | 813 - .../msm/camera_v2_fortuna/camera/camera.h | 23 - .../msm/camera_v2_fortuna/fd/Makefile | 4 - .../msm/camera_v2_fortuna/fd/msm_fd_dev.c | 1386 - .../msm/camera_v2_fortuna/fd/msm_fd_dev.h | 245 - .../msm/camera_v2_fortuna/fd/msm_fd_hw.c | 1182 - .../msm/camera_v2_fortuna/fd/msm_fd_hw.h | 69 - .../msm/camera_v2_fortuna/fd/msm_fd_regs.h | 149 - .../include/media/msm_cam_sensor.h | 987 - .../include/media/msm_camera.h | 19 - .../include/media/msm_camsensor_sdk.h | 311 - .../include/media/msmb_camera.h | 185 - .../include/media/msmb_isp.h | 465 - .../include/media/msmb_ispif.h | 124 - .../include/media/msmb_pproc.h | 362 - .../include/soc/qcom/camera2.h | 172 - .../include/uapi/media/msm_camera.h | 2280 - .../msm/camera_v2_fortuna/isp/Makefile | 4 - .../msm/camera_v2_fortuna/isp/msm_buf_mgr.c | 962 - .../msm/camera_v2_fortuna/isp/msm_buf_mgr.h | 170 - .../msm/camera_v2_fortuna/isp/msm_isp.c | 317 - .../msm/camera_v2_fortuna/isp/msm_isp.h | 538 - .../msm/camera_v2_fortuna/isp/msm_isp32.c | 1358 - .../msm/camera_v2_fortuna/isp/msm_isp32.h | 17 - .../msm/camera_v2_fortuna/isp/msm_isp40.c | 1835 - .../msm/camera_v2_fortuna/isp/msm_isp40.h | 17 - .../msm/camera_v2_fortuna/isp/msm_isp44.c | 1480 - .../msm/camera_v2_fortuna/isp/msm_isp44.h | 17 - .../msm/camera_v2_fortuna/isp/msm_isp46.c | 1917 - .../msm/camera_v2_fortuna/isp/msm_isp46.h | 17 - .../msm/camera_v2_fortuna/isp/msm_isp47.c | 1909 - .../msm/camera_v2_fortuna/isp/msm_isp47.h | 17 - .../camera_v2_fortuna/isp/msm_isp_axi_util.c | 1955 - .../camera_v2_fortuna/isp/msm_isp_axi_util.h | 61 - .../isp/msm_isp_stats_util.c | 575 - .../isp/msm_isp_stats_util.h | 25 - .../msm/camera_v2_fortuna/isp/msm_isp_util.c | 1653 - .../msm/camera_v2_fortuna/isp/msm_isp_util.h | 80 - .../msm/camera_v2_fortuna/ispif/Makefile | 3 - .../msm/camera_v2_fortuna/ispif/msm_ispif.c | 1368 - .../msm/camera_v2_fortuna/ispif/msm_ispif.h | 69 - .../ispif/msm_ispif_hwreg_v1.h | 115 - .../ispif/msm_ispif_hwreg_v2.h | 96 - .../msm/camera_v2_fortuna/jpeg_10/Makefile | 6 - .../jpeg_10/msm_jpeg_common.h | 39 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_core.c | 284 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_core.h | 40 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_dev.c | 315 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_hw.c | 416 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_hw.h | 105 - .../jpeg_10/msm_jpeg_hw_reg.h | 138 - .../jpeg_10/msm_jpeg_platform.c | 460 - .../jpeg_10/msm_jpeg_platform.h | 43 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_sync.c | 1292 - .../camera_v2_fortuna/jpeg_10/msm_jpeg_sync.h | 127 - .../platform/msm/camera_v2_fortuna/msm.c | 1196 - .../platform/msm/camera_v2_fortuna/msm.h | 145 - .../camera_v2_fortuna/msm_buf_mgr/Makefile | 2 - .../msm_buf_mgr/msm_generic_buf_mgr.c | 352 - .../msm_buf_mgr/msm_generic_buf_mgr.h | 40 - .../platform/msm/camera_v2_fortuna/msm_sd.h | 86 - .../msm/camera_v2_fortuna/msm_vb2/Makefile | 3 - .../msm/camera_v2_fortuna/msm_vb2/msm_vb2.c | 311 - .../msm/camera_v2_fortuna/msm_vb2/msm_vb2.h | 70 - .../msm/camera_v2_fortuna/pproc/Makefile | 2 - .../msm/camera_v2_fortuna/pproc/cpp/Makefile | 4 - .../msm/camera_v2_fortuna/pproc/cpp/msm_cpp.c | 2292 - .../msm/camera_v2_fortuna/pproc/cpp/msm_cpp.h | 233 - .../msm/camera_v2_fortuna/pproc/vpe/Makefile | 3 - .../msm/camera_v2_fortuna/pproc/vpe/msm_vpe.c | 1655 - .../msm/camera_v2_fortuna/pproc/vpe/msm_vpe.h | 255 - .../msm/camera_v2_fortuna/sensor/Makefile | 28 - .../sensor/actuator/Makefile | 4 - .../sensor/actuator/msm_actuator.c | 1394 - .../sensor/actuator/msm_actuator.h | 109 - .../msm/camera_v2_fortuna/sensor/cci/Makefile | 3 - .../sensor/cci/msm_cam_cci_hwreg.h | 58 - .../camera_v2_fortuna/sensor/cci/msm_cci.c | 1366 - .../camera_v2_fortuna/sensor/cci/msm_cci.h | 189 - .../camera_v2_fortuna/sensor/csid/Makefile | 3 - .../sensor/csid/include/msm_csid_2_0_hwreg.h | 56 - .../sensor/csid/include/msm_csid_2_2_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_0_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_1_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_2_hwreg.h | 55 - .../camera_v2_fortuna/sensor/csid/msm_csid.c | 844 - .../camera_v2_fortuna/sensor/csid/msm_csid.h | 92 - .../camera_v2_fortuna/sensor/csiphy/Makefile | 3 - .../csiphy/include/msm_csiphy_2_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_2_2_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_1_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_2_hwreg.h | 46 - .../sensor/csiphy/msm_csiphy.c | 937 - .../sensor/csiphy/msm_csiphy.h | 89 - .../msm/camera_v2_fortuna/sensor/db8221a.h | 33 - .../camera_v2_fortuna/sensor/db8221a_yuv.c | 703 - .../camera_v2_fortuna/sensor/db8221a_yuv.h | 3970 -- .../camera_v2_fortuna/sensor/eeprom/Makefile | 5 - .../sensor/eeprom/msm_eeprom.c | 1627 - .../sensor/eeprom/msm_eeprom.h | 50 - .../camera_v2_fortuna/sensor/eeprom/msm_otp.c | 2099 - .../sensor/eeprom/msm_otp_s5k5e3yx.h | 96 - .../sensor/eeprom/msm_otp_sr544.h | 2102 - .../camera_v2_fortuna/sensor/flash/Makefile | 9 - .../camera_v2_fortuna/sensor/flash/adp1660.c | 221 - .../camera_v2_fortuna/sensor/flash/bd7710.c | 209 - .../camera_v2_fortuna/sensor/flash/lm3642.c | 399 - .../sensor/flash/msm_flash.c | 1120 - .../sensor/flash/msm_flash.h | 116 - .../sensor/flash/msm_led_flash.c | 152 - .../sensor/flash/msm_led_flash.h | 91 - .../sensor/flash/msm_led_i2c_trigger.c | 745 - .../sensor/flash/msm_led_torch.c | 60 - .../sensor/flash/msm_led_trigger.c | 496 - .../msm/camera_v2_fortuna/sensor/gc0310.c | 1207 - .../msm/camera_v2_fortuna/sensor/gc0339.c | 704 - .../msm/camera_v2_fortuna/sensor/hi256.c | 2157 - .../msm/camera_v2_fortuna/sensor/imx132.c | 154 - .../msm/camera_v2_fortuna/sensor/imx134.c | 174 - .../msm/camera_v2_fortuna/sensor/imx135.c | 173 - .../msm/camera_v2_fortuna/sensor/io/Makefile | 4 - .../sensor/io/msm_camera_cci_i2c.c | 602 - .../sensor/io/msm_camera_dt_util.c | 1466 - .../sensor/io/msm_camera_dt_util.h | 61 - .../sensor/io/msm_camera_i2c.h | 130 - .../sensor/io/msm_camera_i2c_mux.c | 188 - .../sensor/io/msm_camera_i2c_mux.h | 46 - .../sensor/io/msm_camera_io_util.c | 638 - .../sensor/io/msm_camera_io_util.h | 60 - .../sensor/io/msm_camera_qup_i2c.c | 545 - .../sensor/io/msm_camera_spi.c | 406 - .../sensor/io/msm_camera_spi.h | 85 - .../msm/camera_v2_fortuna/sensor/msm_sensor.c | 1622 - .../msm/camera_v2_fortuna/sensor/msm_sensor.h | 113 - .../sensor/msm_sensor_driver.c | 1288 - .../sensor/msm_sensor_driver.h | 44 - .../sensor/msm_sensor_init.c | 576 - .../sensor/msm_sensor_init.h | 25 - .../msm/camera_v2_fortuna/sensor/mt9m114.c | 1510 - .../msm/camera_v2_fortuna/sensor/ois/Makefile | 4 - .../camera_v2_fortuna/sensor/ois/msm_ois.c | 758 - .../camera_v2_fortuna/sensor/ois/msm_ois.h | 61 - .../msm/camera_v2_fortuna/sensor/ov12830.c | 197 - .../msm/camera_v2_fortuna/sensor/ov2720.c | 155 - .../msm/camera_v2_fortuna/sensor/ov5645.c | 958 - .../msm/camera_v2_fortuna/sensor/ov5648.c | 179 - .../msm/camera_v2_fortuna/sensor/ov7695.c | 793 - .../msm/camera_v2_fortuna/sensor/ov8825.c | 173 - .../msm/camera_v2_fortuna/sensor/ov8865.c | 185 - .../msm/camera_v2_fortuna/sensor/ov9724.c | 167 - .../msm/camera_v2_fortuna/sensor/s5k3l1yx.c | 173 - .../msm/camera_v2_fortuna/sensor/s5k4e1.c | 167 - .../msm/camera_v2_fortuna/sensor/s5k4ecgx.h | 52 - .../camera_v2_fortuna/sensor/s5k4ecgx_regs.h | 6065 --- .../sensor/s5k4ecgx_regs_gte.h | 6236 --- .../camera_v2_fortuna/sensor/s5k4ecgx_yuv.c | 1553 - .../msm/camera_v2_fortuna/sensor/sp1628.c | 992 - .../msm/camera_v2_fortuna/sensor/sr030pc50.h | 20 - .../camera_v2_fortuna/sensor/sr030pc50_regs.h | 1097 - .../camera_v2_fortuna/sensor/sr030pc50_yuv.c | 834 - .../msm/camera_v2_fortuna/sensor/sr130pc20.h | 34 - .../camera_v2_fortuna/sensor/sr130pc20_regs.h | 3001 -- .../camera_v2_fortuna/sensor/sr130pc20_yuv.c | 782 - .../msm/camera_v2_fortuna/sensor/sr200pc20.h | 31 - .../camera_v2_fortuna/sensor/sr200pc20_yuv.c | 697 - .../camera_v2_fortuna/sensor/sr200pc20_yuv.h | 9650 ---- .../sensor/sr200pc20_yuv_gte.h | 13048 ------ .../media/platform/msm/camera_v2_j5/Kconfig | 341 - .../media/platform/msm/camera_v2_j5/Makefile | 19 - .../platform/msm/camera_v2_j5/cam_dummy.c | 250 - .../platform/msm/camera_v2_j5/camera/Makefile | 3 - .../platform/msm/camera_v2_j5/camera/camera.c | 813 - .../platform/msm/camera_v2_j5/camera/camera.h | 23 - .../include/media/msm_cam_sensor.h | 970 - .../camera_v2_j5/include/media/msm_camera.h | 19 - .../include/media/msm_camsensor_sdk.h | 311 - .../camera_v2_j5/include/media/msmb_camera.h | 185 - .../msm/camera_v2_j5/include/media/msmb_isp.h | 489 - .../camera_v2_j5/include/media/msmb_ispif.h | 124 - .../camera_v2_j5/include/media/msmb_pproc.h | 361 - .../camera_v2_j5/include/soc/qcom/camera2.h | 164 - .../include/uapi/media/msm_camera.h | 2280 - .../platform/msm/camera_v2_j5/isp/Makefile | 4 - .../msm/camera_v2_j5/isp/msm_buf_mgr.c | 962 - .../msm/camera_v2_j5/isp/msm_buf_mgr.h | 170 - .../platform/msm/camera_v2_j5/isp/msm_isp.c | 317 - .../platform/msm/camera_v2_j5/isp/msm_isp.h | 541 - .../platform/msm/camera_v2_j5/isp/msm_isp32.c | 1350 - .../platform/msm/camera_v2_j5/isp/msm_isp32.h | 17 - .../platform/msm/camera_v2_j5/isp/msm_isp40.c | 1862 - .../platform/msm/camera_v2_j5/isp/msm_isp40.h | 17 - .../platform/msm/camera_v2_j5/isp/msm_isp44.c | 1509 - .../platform/msm/camera_v2_j5/isp/msm_isp44.h | 17 - .../msm/camera_v2_j5/isp/msm_isp_axi_util.c | 1915 - .../msm/camera_v2_j5/isp/msm_isp_axi_util.h | 61 - .../msm/camera_v2_j5/isp/msm_isp_stats_util.c | 575 - .../msm/camera_v2_j5/isp/msm_isp_stats_util.h | 25 - .../msm/camera_v2_j5/isp/msm_isp_util.c | 1661 - .../msm/camera_v2_j5/isp/msm_isp_util.h | 80 - .../platform/msm/camera_v2_j5/ispif/Makefile | 3 - .../msm/camera_v2_j5/ispif/msm_ispif.c | 1368 - .../msm/camera_v2_j5/ispif/msm_ispif.h | 69 - .../camera_v2_j5/ispif/msm_ispif_hwreg_v1.h | 115 - .../camera_v2_j5/ispif/msm_ispif_hwreg_v2.h | 96 - .../msm/camera_v2_j5/jpeg_10/Makefile | 6 - .../camera_v2_j5/jpeg_10/msm_jpeg_common.h | 39 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_core.c | 284 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_core.h | 40 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_dev.c | 315 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.c | 416 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.h | 105 - .../camera_v2_j5/jpeg_10/msm_jpeg_hw_reg.h | 138 - .../camera_v2_j5/jpeg_10/msm_jpeg_platform.c | 460 - .../camera_v2_j5/jpeg_10/msm_jpeg_platform.h | 43 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.c | 1292 - .../msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.h | 127 - drivers/media/platform/msm/camera_v2_j5/msm.c | 1198 - drivers/media/platform/msm/camera_v2_j5/msm.h | 146 - .../msm/camera_v2_j5/msm_buf_mgr/Makefile | 2 - .../msm_buf_mgr/msm_generic_buf_mgr.c | 352 - .../msm_buf_mgr/msm_generic_buf_mgr.h | 40 - .../media/platform/msm/camera_v2_j5/msm_sd.h | 86 - .../msm/camera_v2_j5/msm_vb2/Makefile | 3 - .../msm/camera_v2_j5/msm_vb2/msm_vb2.c | 311 - .../msm/camera_v2_j5/msm_vb2/msm_vb2.h | 70 - .../platform/msm/camera_v2_j5/pproc/Makefile | 2 - .../msm/camera_v2_j5/pproc/cpp/Makefile | 4 - .../msm/camera_v2_j5/pproc/cpp/msm_cpp.c | 2291 - .../msm/camera_v2_j5/pproc/cpp/msm_cpp.h | 233 - .../msm/camera_v2_j5/pproc/vpe/Makefile | 3 - .../msm/camera_v2_j5/pproc/vpe/msm_vpe.c | 1655 - .../msm/camera_v2_j5/pproc/vpe/msm_vpe.h | 255 - .../platform/msm/camera_v2_j5/sensor/Makefile | 22 - .../msm/camera_v2_j5/sensor/actuator/Makefile | 4 - .../sensor/actuator/msm_actuator.c | 1368 - .../sensor/actuator/msm_actuator.h | 108 - .../msm/camera_v2_j5/sensor/cci/Makefile | 3 - .../sensor/cci/msm_cam_cci_hwreg.h | 58 - .../msm/camera_v2_j5/sensor/cci/msm_cci.c | 1366 - .../msm/camera_v2_j5/sensor/cci/msm_cci.h | 189 - .../msm/camera_v2_j5/sensor/csid/Makefile | 3 - .../sensor/csid/include/msm_csid_2_0_hwreg.h | 56 - .../sensor/csid/include/msm_csid_2_2_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_0_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_1_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_2_hwreg.h | 55 - .../msm/camera_v2_j5/sensor/csid/msm_csid.c | 844 - .../msm/camera_v2_j5/sensor/csid/msm_csid.h | 92 - .../msm/camera_v2_j5/sensor/csiphy/Makefile | 3 - .../csiphy/include/msm_csiphy_2_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_2_2_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_1_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_2_hwreg.h | 46 - .../camera_v2_j5/sensor/csiphy/msm_csiphy.c | 937 - .../camera_v2_j5/sensor/csiphy/msm_csiphy.h | 89 - .../msm/camera_v2_j5/sensor/eeprom/Makefile | 5 - .../camera_v2_j5/sensor/eeprom/msm_eeprom.c | 1575 - .../camera_v2_j5/sensor/eeprom/msm_eeprom.h | 50 - .../msm/camera_v2_j5/sensor/eeprom/msm_otp.c | 2099 - .../sensor/eeprom/msm_otp_s5k5e3yx.h | 96 - .../sensor/eeprom/msm_otp_sr544.h | 2102 - .../msm/camera_v2_j5/sensor/flash/Makefile | 9 - .../msm/camera_v2_j5/sensor/flash/adp1660.c | 212 - .../msm/camera_v2_j5/sensor/flash/bd7710.c | 209 - .../msm/camera_v2_j5/sensor/flash/lm3642.c | 399 - .../camera_v2_j5/sensor/flash/msm_led_flash.c | 140 - .../camera_v2_j5/sensor/flash/msm_led_flash.h | 92 - .../sensor/flash/msm_led_i2c_trigger.c | 746 - .../camera_v2_j5/sensor/flash/msm_led_torch.c | 60 - .../sensor/flash/msm_led_trigger.c | 566 - .../platform/msm/camera_v2_j5/sensor/gc0339.c | 704 - .../platform/msm/camera_v2_j5/sensor/hi256.c | 2157 - .../platform/msm/camera_v2_j5/sensor/imx132.c | 154 - .../platform/msm/camera_v2_j5/sensor/imx134.c | 174 - .../platform/msm/camera_v2_j5/sensor/imx135.c | 173 - .../msm/camera_v2_j5/sensor/io/Makefile | 4 - .../sensor/io/msm_camera_cci_i2c.c | 599 - .../sensor/io/msm_camera_dt_util.c | 1638 - .../sensor/io/msm_camera_dt_util.h | 65 - .../camera_v2_j5/sensor/io/msm_camera_i2c.h | 130 - .../sensor/io/msm_camera_i2c_mux.c | 188 - .../sensor/io/msm_camera_i2c_mux.h | 46 - .../sensor/io/msm_camera_io_util.c | 672 - .../sensor/io/msm_camera_io_util.h | 60 - .../sensor/io/msm_camera_qup_i2c.c | 546 - .../camera_v2_j5/sensor/io/msm_camera_spi.c | 407 - .../camera_v2_j5/sensor/io/msm_camera_spi.h | 85 - .../msm/camera_v2_j5/sensor/msm_sensor.c | 1728 - .../msm/camera_v2_j5/sensor/msm_sensor.h | 117 - .../camera_v2_j5/sensor/msm_sensor_driver.c | 1292 - .../camera_v2_j5/sensor/msm_sensor_driver.h | 43 - .../msm/camera_v2_j5/sensor/msm_sensor_init.c | 622 - .../msm/camera_v2_j5/sensor/msm_sensor_init.h | 25 - .../msm/camera_v2_j5/sensor/mt9m114.c | 1510 - .../msm/camera_v2_j5/sensor/ov12830.c | 197 - .../platform/msm/camera_v2_j5/sensor/ov2720.c | 155 - .../platform/msm/camera_v2_j5/sensor/ov5645.c | 958 - .../platform/msm/camera_v2_j5/sensor/ov5648.c | 179 - .../platform/msm/camera_v2_j5/sensor/ov8825.c | 173 - .../platform/msm/camera_v2_j5/sensor/ov8865.c | 185 - .../platform/msm/camera_v2_j5/sensor/ov9724.c | 167 - .../msm/camera_v2_j5/sensor/s5k3l1yx.c | 173 - .../platform/msm/camera_v2_j5/sensor/s5k4e1.c | 167 - .../platform/msm/camera_v2_j5/sensor/sp1628.c | 992 - .../msm/camera_v2_j5/sensor/sr200pc20.h | 31 - .../msm/camera_v2_j5/sensor/sr200pc20_yuv.c | 708 - .../msm/camera_v2_j5/sensor/sr200pc20_yuv.h | 15599 ------- .../sensor/sr200pc20_yuv_coreprime.h | 13371 ------ .../platform/msm/camera_v2_j7lte/Kconfig | 433 - .../platform/msm/camera_v2_j7lte/Makefile | 19 - .../platform/msm/camera_v2_j7lte/cam_dummy.c | 250 - .../msm/camera_v2_j7lte/camera/Makefile | 3 - .../msm/camera_v2_j7lte/camera/camera.c | 826 - .../msm/camera_v2_j7lte/camera/camera.h | 23 - .../platform/msm/camera_v2_j7lte/fd/Makefile | 4 - .../msm/camera_v2_j7lte/fd/msm_fd_dev.c | 1386 - .../msm/camera_v2_j7lte/fd/msm_fd_dev.h | 245 - .../msm/camera_v2_j7lte/fd/msm_fd_hw.c | 1182 - .../msm/camera_v2_j7lte/fd/msm_fd_hw.h | 69 - .../msm/camera_v2_j7lte/fd/msm_fd_regs.h | 149 - .../include/media/msm_cam_sensor.h | 1131 - .../include/media/msm_camera.h | 19 - .../include/media/msm_camsensor_sdk.h | 335 - .../include/media/msmb_camera.h | 186 - .../camera_v2_j7lte/include/media/msmb_isp.h | 528 - .../include/media/msmb_ispif.h | 125 - .../include/media/msmb_pproc.h | 362 - .../include/soc/qcom/camera2.h | 171 - .../include/uapi/media/msm_camera.h | 2280 - .../platform/msm/camera_v2_j7lte/isp/Makefile | 4 - .../msm/camera_v2_j7lte/isp/msm_buf_mgr.c | 962 - .../msm/camera_v2_j7lte/isp/msm_buf_mgr.h | 170 - .../msm/camera_v2_j7lte/isp/msm_isp.c | 317 - .../msm/camera_v2_j7lte/isp/msm_isp.h | 541 - .../msm/camera_v2_j7lte/isp/msm_isp32.c | 1353 - .../msm/camera_v2_j7lte/isp/msm_isp32.h | 17 - .../msm/camera_v2_j7lte/isp/msm_isp40.c | 1882 - .../msm/camera_v2_j7lte/isp/msm_isp40.h | 17 - .../msm/camera_v2_j7lte/isp/msm_isp44.c | 1513 - .../msm/camera_v2_j7lte/isp/msm_isp44.h | 17 - .../msm/camera_v2_j7lte/isp/msm_isp46.c | 1942 - .../msm/camera_v2_j7lte/isp/msm_isp46.h | 17 - .../msm/camera_v2_j7lte/isp/msm_isp47.c | 1933 - .../msm/camera_v2_j7lte/isp/msm_isp47.h | 17 - .../camera_v2_j7lte/isp/msm_isp_axi_util.c | 1967 - .../camera_v2_j7lte/isp/msm_isp_axi_util.h | 61 - .../camera_v2_j7lte/isp/msm_isp_stats_util.c | 575 - .../camera_v2_j7lte/isp/msm_isp_stats_util.h | 25 - .../msm/camera_v2_j7lte/isp/msm_isp_util.c | 1668 - .../msm/camera_v2_j7lte/isp/msm_isp_util.h | 80 - .../msm/camera_v2_j7lte/ispif/Makefile | 3 - .../msm/camera_v2_j7lte/ispif/msm_ispif.c | 1364 - .../msm/camera_v2_j7lte/ispif/msm_ispif.h | 69 - .../ispif/msm_ispif_hwreg_v1.h | 115 - .../ispif/msm_ispif_hwreg_v2.h | 96 - .../msm/camera_v2_j7lte/jpeg_10/Makefile | 6 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_common.h | 39 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_core.c | 284 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_core.h | 40 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_dev.c | 315 - .../msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.c | 416 - .../msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.h | 105 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_hw_reg.h | 138 - .../jpeg_10/msm_jpeg_platform.c | 460 - .../jpeg_10/msm_jpeg_platform.h | 43 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_sync.c | 1292 - .../camera_v2_j7lte/jpeg_10/msm_jpeg_sync.h | 127 - .../media/platform/msm/camera_v2_j7lte/msm.c | 1204 - .../media/platform/msm/camera_v2_j7lte/msm.h | 146 - .../msm/camera_v2_j7lte/msm_buf_mgr/Makefile | 2 - .../msm_buf_mgr/msm_generic_buf_mgr.c | 352 - .../msm_buf_mgr/msm_generic_buf_mgr.h | 40 - .../platform/msm/camera_v2_j7lte/msm_sd.h | 86 - .../msm/camera_v2_j7lte/msm_vb2/Makefile | 3 - .../msm/camera_v2_j7lte/msm_vb2/msm_vb2.c | 311 - .../msm/camera_v2_j7lte/msm_vb2/msm_vb2.h | 70 - .../msm/camera_v2_j7lte/pproc/Makefile | 2 - .../msm/camera_v2_j7lte/pproc/cpp/Makefile | 4 - .../msm/camera_v2_j7lte/pproc/cpp/msm_cpp.c | 2315 - .../msm/camera_v2_j7lte/pproc/cpp/msm_cpp.h | 233 - .../msm/camera_v2_j7lte/pproc/vpe/Makefile | 3 - .../msm/camera_v2_j7lte/pproc/vpe/msm_vpe.c | 1655 - .../msm/camera_v2_j7lte/pproc/vpe/msm_vpe.h | 255 - .../msm/camera_v2_j7lte/sensor/Makefile | 26 - .../camera_v2_j7lte/sensor/actuator/Makefile | 4 - .../sensor/actuator/msm_actuator.c | 1742 - .../sensor/actuator/msm_actuator.h | 108 - .../msm/camera_v2_j7lte/sensor/cci/Makefile | 3 - .../sensor/cci/msm_cam_cci_hwreg.h | 58 - .../msm/camera_v2_j7lte/sensor/cci/msm_cci.c | 1361 - .../msm/camera_v2_j7lte/sensor/cci/msm_cci.h | 189 - .../msm/camera_v2_j7lte/sensor/csid/Makefile | 3 - .../sensor/csid/include/msm_csid_2_0_hwreg.h | 56 - .../sensor/csid/include/msm_csid_2_2_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_0_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_1_hwreg.h | 55 - .../sensor/csid/include/msm_csid_3_2_hwreg.h | 55 - .../camera_v2_j7lte/sensor/csid/msm_csid.c | 854 - .../camera_v2_j7lte/sensor/csid/msm_csid.h | 92 - .../camera_v2_j7lte/sensor/csiphy/Makefile | 3 - .../csiphy/include/msm_csiphy_2_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_2_2_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_0_hwreg.h | 46 - .../csiphy/include/msm_csiphy_3_1_hwreg.h | 48 - .../csiphy/include/msm_csiphy_3_2_hwreg.h | 46 - .../sensor/csiphy/msm_csiphy.c | 952 - .../sensor/csiphy/msm_csiphy.h | 89 - .../msm/camera_v2_j7lte/sensor/db8221a.h | 33 - .../msm/camera_v2_j7lte/sensor/db8221a_yuv.c | 673 - .../msm/camera_v2_j7lte/sensor/db8221a_yuv.h | 3796 -- .../camera_v2_j7lte/sensor/eeprom/Makefile | 5 - .../sensor/eeprom/msm_eeprom.c | 1758 - .../sensor/eeprom/msm_eeprom.h | 64 - .../camera_v2_j7lte/sensor/eeprom/msm_otp.c | 2244 - .../sensor/eeprom/msm_otp_s5k5e3yx.h | 96 - .../sensor/eeprom/msm_otp_sr544.h | 2102 - .../sensor/eeprom/msm_otp_sr552.h | 2153 - .../camera_v2_j7lte/sensor/external/Makefile | 5 - .../camera_v2_j7lte/sensor/external/msm_ois.c | 2238 - .../camera_v2_j7lte/sensor/external/msm_ois.h | 225 - .../msm/camera_v2_j7lte/sensor/flash/Makefile | 9 - .../camera_v2_j7lte/sensor/flash/adp1660.c | 212 - .../msm/camera_v2_j7lte/sensor/flash/bd7710.c | 209 - .../msm/camera_v2_j7lte/sensor/flash/lm3642.c | 399 - .../camera_v2_j7lte/sensor/flash/msm_flash.c | 1139 - .../camera_v2_j7lte/sensor/flash/msm_flash.h | 116 - .../sensor/flash/msm_led_flash.c | 140 - .../sensor/flash/msm_led_flash.h | 92 - .../sensor/flash/msm_led_i2c_trigger.c | 746 - .../sensor/flash/msm_led_torch.c | 60 - .../sensor/flash/msm_led_trigger.c | 760 - .../msm/camera_v2_j7lte/sensor/gc0310.c | 1197 - .../msm/camera_v2_j7lte/sensor/gc0339.c | 704 - .../msm/camera_v2_j7lte/sensor/hi256.c | 2157 - .../msm/camera_v2_j7lte/sensor/imx132.c | 154 - .../msm/camera_v2_j7lte/sensor/imx134.c | 174 - .../msm/camera_v2_j7lte/sensor/imx135.c | 173 - .../msm/camera_v2_j7lte/sensor/io/Makefile | 4 - .../sensor/io/msm_camera_cci_i2c.c | 632 - .../sensor/io/msm_camera_dt_util.c | 1834 - .../sensor/io/msm_camera_dt_util.h | 66 - .../sensor/io/msm_camera_i2c.h | 130 - .../sensor/io/msm_camera_i2c_mux.c | 188 - .../sensor/io/msm_camera_i2c_mux.h | 46 - .../sensor/io/msm_camera_io_util.c | 689 - .../sensor/io/msm_camera_io_util.h | 60 - .../sensor/io/msm_camera_qup_i2c.c | 586 - .../sensor/io/msm_camera_spi.c | 406 - .../sensor/io/msm_camera_spi.h | 85 - .../msm/camera_v2_j7lte/sensor/msm_sensor.c | 1825 - .../msm/camera_v2_j7lte/sensor/msm_sensor.h | 113 - .../sensor/msm_sensor_driver.c | 1308 - .../sensor/msm_sensor_driver.h | 43 - .../camera_v2_j7lte/sensor/msm_sensor_init.c | 717 - .../camera_v2_j7lte/sensor/msm_sensor_init.h | 25 - .../msm/camera_v2_j7lte/sensor/mt9m114.c | 1510 - .../msm/camera_v2_j7lte/sensor/ois/Makefile | 4 - .../msm/camera_v2_j7lte/sensor/ois/msm_ois.c | 763 - .../msm/camera_v2_j7lte/sensor/ois/msm_ois.h | 61 - .../msm/camera_v2_j7lte/sensor/ov12830.c | 197 - .../msm/camera_v2_j7lte/sensor/ov2720.c | 155 - .../msm/camera_v2_j7lte/sensor/ov5645.c | 958 - .../msm/camera_v2_j7lte/sensor/ov5648.c | 179 - .../msm/camera_v2_j7lte/sensor/ov7695.c | 808 - .../msm/camera_v2_j7lte/sensor/ov8825.c | 173 - .../msm/camera_v2_j7lte/sensor/ov8865.c | 185 - .../msm/camera_v2_j7lte/sensor/ov9724.c | 167 - .../msm/camera_v2_j7lte/sensor/s5k3l1yx.c | 173 - .../msm/camera_v2_j7lte/sensor/s5k4e1.c | 167 - .../msm/camera_v2_j7lte/sensor/s5k4ecgx.h | 52 - .../camera_v2_j7lte/sensor/s5k4ecgx_regs.h | 6083 --- .../sensor/s5k4ecgx_regs_gte.h | 6220 --- .../sensor/s5k4ecgx_regs_j1x.h | 6217 --- .../msm/camera_v2_j7lte/sensor/s5k4ecgx_yuv.c | 1569 - .../msm/camera_v2_j7lte/sensor/sp1628.c | 992 - .../msm/camera_v2_j7lte/sensor/sr130pc20.h | 36 - .../camera_v2_j7lte/sensor/sr130pc20_yuv.c | 706 - .../sensor/sr130pc20_yuv_matisse.h | 3070 -- .../msm/camera_v2_j7lte/sensor/sr200pc20.h | 31 - .../camera_v2_j7lte/sensor/sr200pc20_yuv.c | 774 - .../camera_v2_j7lte/sensor/sr200pc20_yuv.h | 10930 ----- .../sensor/sr200pc20_yuv_coreprime.h | 13371 ------ .../sensor/sr200pc20_yuv_gte.h | 10902 ----- .../sensor/sr200pc20_yuv_j1x.h | 11301 ----- .../msm/camera_v2_j7lte/sensor/sr352.h | 36 - .../msm/camera_v2_j7lte/sensor/sr352_yuv.c | 2300 - .../sensor/sr352_yuv_matisse.h | 36748 ---------------- include/media/msm_cam_sensor.h | 829 +- include/media/msm_camsensor_sdk.h | 3 +- include/media/msmb_camera.h | 26 +- include/media/msmb_isp.h | 112 +- include/media/msmb_ispif.h | 1 + include/media/msmb_pproc.h | 181 +- 633 files changed, 11501 insertions(+), 542071 deletions(-) delete mode 100644 drivers/media/platform/msm/camera_v2/cam_dummy.c delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/db8221a.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_s5k5e3yx.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr544.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr552.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/external/Makefile delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.c delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/gc0339.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/hi256.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/imx132.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/imx134.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/imx135.c mode change 100644 => 100755 drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov12830.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov2720.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov5648.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov8825.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov8865.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/ov9724.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/s5k3l1yx.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/s5k4e1.c delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_gte.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_j1x.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sp1628.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr130pc20.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv_matisse.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/sr200pc20.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_coreprime.h delete mode 100755 drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_gte.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_j1x.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr352.h delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr352_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2/sensor/sr352_yuv_matisse.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/Kconfig delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/cam_dummy.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/camera/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/camera/camera.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/camera/camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_cam_sensor.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camera.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camsensor_sdk.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_camera.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_isp.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_ispif.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_pproc.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/include/soc/qcom/camera2.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/include/uapi/media/msm_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/ispif/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v1.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v2.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_common.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_dev.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw_reg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_sd.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cam_cci_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_s5k5e3yx.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_sr544.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/adp1660.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/bd7710.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/lm3642.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_i2c_trigger.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_torch.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_trigger.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0310.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0339.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/hi256.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/imx132.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/imx134.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/imx135.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_cci_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_qup_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/mt9m114.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.h delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov12830.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov2720.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5645.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5648.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov7695.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8825.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8865.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/ov9724.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k3l1yx.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4e1.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs_gte.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2_fortuna/sensor/sp1628.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.h delete mode 100755 drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv_gte.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/Kconfig delete mode 100644 drivers/media/platform/msm/camera_v2_j5/Makefile delete mode 100755 drivers/media/platform/msm/camera_v2_j5/cam_dummy.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/camera/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/camera/camera.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/camera/camera.h delete mode 100755 drivers/media/platform/msm/camera_v2_j5/include/media/msm_cam_sensor.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msm_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msm_camsensor_sdk.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msmb_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msmb_isp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msmb_ispif.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/media/msmb_pproc.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/soc/qcom/camera2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/include/uapi/media/msm_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/ispif/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v1.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_common.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_dev.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw_reg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_sd.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_vb2/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/cpp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/vpe/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/actuator/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/cci/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cam_cci_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.h delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_s5k5e3yx.h delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_sr544.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/adp1660.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/bd7710.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/lm3642.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_i2c_trigger.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_torch.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_trigger.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/gc0339.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/hi256.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/imx132.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/imx134.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/imx135.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_cci_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_qup_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.c delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.h delete mode 100644 drivers/media/platform/msm/camera_v2_j5/sensor/mt9m114.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov12830.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov2720.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov5645.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov5648.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov8825.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov8865.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/ov9724.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/s5k3l1yx.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/s5k4e1.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/sp1628.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20.h delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.h delete mode 100755 drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv_coreprime.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/Kconfig delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/cam_dummy.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/camera/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/camera/camera.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/camera/camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_cam_sensor.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camsensor_sdk.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_isp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_ispif.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_pproc.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/soc/qcom/camera2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/include/uapi/media/msm_camera.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/ispif/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v1.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_common.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_dev.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw_reg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_sd.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cam_cci_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_s5k5e3yx.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr544.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr552.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/external/Makefile delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/adp1660.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/bd7710.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/lm3642.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_i2c_trigger.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_torch.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_trigger.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0310.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0339.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/hi256.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/imx132.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/imx134.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/imx135.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_cci_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_qup_i2c.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/mt9m114.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/Makefile delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov12830.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov2720.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5645.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5648.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov7695.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8825.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8865.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/ov9724.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k3l1yx.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4e1.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_gte.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_j1x.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sp1628.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv_matisse.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.c delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_coreprime.h delete mode 100755 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_gte.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_j1x.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352.h delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv.c delete mode 100644 drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv_matisse.h diff --git a/drivers/media/platform/msm/Kconfig b/drivers/media/platform/msm/Kconfig index 6c3485940f7b..d42768b9732b 100644 --- a/drivers/media/platform/msm/Kconfig +++ b/drivers/media/platform/msm/Kconfig @@ -34,19 +34,7 @@ config MSMB_CAMERA_DEBUG Enable printk() debug for msm camera 2.0 if MSMB_CAMERA -if SEC_FORTUNA_PROJECT -source "drivers/media/platform/msm/camera_v2_fortuna/Kconfig" -endif # SEC_FORTUNA_PROJECT -if MACH_J5LTE_CHN_CMCC -source "drivers/media/platform/msm/camera_v2_j5/Kconfig" -endif # SEC_J5_PROJECT -if SEC_J7_PROJECT -source "drivers/media/platform/msm/camera_v2_j7lte/Kconfig" -endif # SEC_J7_PROJECT - -if !(SEC_FORTUNA_PROJECT || MACH_J5LTE_CHN_CMCC || SEC_J7_PROJECT) source "drivers/media/platform/msm/camera_v2/Kconfig" -endif # SEC_FORTUNA_PROJECT endif # MSMB_CAMERA source "drivers/media/platform/msm/vidc/Kconfig" diff --git a/drivers/media/platform/msm/Makefile b/drivers/media/platform/msm/Makefile index b8ab2896bc01..2c1a9318de15 100644 --- a/drivers/media/platform/msm/Makefile +++ b/drivers/media/platform/msm/Makefile @@ -7,14 +7,6 @@ obj-$(CONFIG_MSM_VIDC_V4L2) += vidc/ obj-y += broadcast/ obj-$(CONFIG_DVB_MPQ) += dvb/ -ifeq ($(CONFIG_MACH_J5LTE_CHN_CMCC),y) -obj-$(CONFIG_MSMB_CAMERA) += camera_v2_j5/ -else ifeq ($(CONFIG_SEC_FORTUNA_PROJECT),y) -obj-$(CONFIG_MSMB_CAMERA) += camera_v2_fortuna/ -else ifeq ($(CONFIG_SEC_J7_PROJECT),y) -obj-$(CONFIG_MSMB_CAMERA) += camera_v2_j7lte/ -else obj-$(CONFIG_MSMB_CAMERA) += camera_v2/ -endif obj-$(CONFIG_MSM_VPU) += vpu/ diff --git a/drivers/media/platform/msm/camera_v2/Kconfig b/drivers/media/platform/msm/camera_v2/Kconfig index 58f5778553c6..b94e4011b28d 100644 --- a/drivers/media/platform/msm/camera_v2/Kconfig +++ b/drivers/media/platform/msm/camera_v2/Kconfig @@ -91,24 +91,7 @@ config MSM_EEPROM Enable support for ROM Interface for Calibration Provides interface for reading the Claibration data. and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_FRONT_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_OTP - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data + Currently supports I2C, CCI and SPI protocol config MSM_ISPIF bool "Qualcomm MSM Image Signal Processing interface support" @@ -128,12 +111,6 @@ config MSM_ISPIF_V1 of any CID of MSM_CSI22_HEADER can be routed to of pixel or raw data interface in VFE. -config SENSOR_8_BPP - bool "8 bits per pixel YUV sensor output" - depends on MSMB_CAMERA - ---help--- - 8 bits per pixel YUV sensor output. - config IMX134 bool "Sensor IMX134 (BAYER 8M)" depends on MSMB_CAMERA @@ -152,22 +129,6 @@ config IMX132 snapshot config = 1920 x 1080 at 30 fps, Video HDR support. -config SR352 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 3MP sensor, - Rear sensor. - -config SR130PC20 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 1.3MP sensor, - Front sensor. - config OV9724 bool "Sensor OV9724 (BAYER 2M)" depends on MSMB_CAMERA @@ -212,20 +173,14 @@ config OV5645 1280 * 270. It does not support auto focus. It supports few special effects like saturation. -config SR200PC20 - bool "Sensor for front camera" +config OV7695 + bool "Sensor OV7695 (YUV 0.3MP)" depends on MSMB_CAMERA - default n ---help--- - Siliconfile 2.0MP sensor, - Front sensor. -config SR544 - bool "Sensor for back camera" - depends on MSMB_CAMERA - default n - ---help--- - 5MP sensor - Rear sensor + OV7695 is Omnivision YUV sensor. It supports 0.3 MP preview + and snapshot. The preview and snapshot resolution shall be + VGA. It does not support auto focus. It supports + few special effects like saturation. config SP1628 bool "Sensor SP1628 (YUV 720P)" @@ -245,6 +200,15 @@ config GC0339 Preview and snapshot resolution shall be 640*480 at 30 fps, It does not support auto focus. +config GC0310 + bool "Sensor GC0310 (YUV .3M)" + depends on MSMB_CAMERA + ---help--- + 0310 is a Galaxycore .3 MP YUV Sensor. + It supports 1 mipi lane. + Preview and snapshot resolution shall be 640*480 at 30 fps, + It does not support auto focus. + config OV8825 bool "OmniVision OV8825 (BAYER 8MP)" depends on MSMB_CAMERA @@ -272,63 +236,6 @@ config s5k4e1 and QSXGA snapshot at 15 fps. This sensor driver does not support auto focus. -config S5K8B1YX - bool "Sensor S5K8B1YX (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - LSI 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config S5K6A3YX - bool "Sensor S5K6A3YX (BAYER 1.9M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 2 MP Bayer Sensor, supports 2 mipi lanes, - -config S5K4H5YB - bool "Sensor S5K4H5YB (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - -config S5K3L2XX - bool "Sensor S5K3L2XX (BAYER 13M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 13MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K3P3SX - bool "Sensor S5K3P3SX (BAYER 16M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 16MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K5E3YX - bool "Sensor S5K5E3YX (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config SR552 - bool "Sensor SR552 (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config S5K4ECGX - bool "Sensor s5k4ecgx (SOC 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP SOC Sensor. It uses 2 mipi lanes, - Support auto focus, and flash - config OV12830 bool "OmniVision OV12830 (BAYER 12MP)" depends on MSMB_CAMERA @@ -361,81 +268,8 @@ config MSM_GEMINI ---help--- Enables support for the Gemini JPEG encoder engine for 8x60. -config SEC_CAMERA_TUNING - bool "Generic Tuning Concept" - ---help--- - Enable support for Tuning in eng Binary - -config CAM_USE_EXT_VANA_GPIO - bool "Samsung EXT_VANA_GPIO" - depends on MSMB_CAMERA - ---help--- - Board use external LDO controlled by GPIO. - -config CAM_DISABLE_LPM_MODE - bool "Camera is Disabled in LPM mode." - depends on NFC_PN547 - default n - ---help--- - Because NFC HW limitation which should not be turned on L16. - -config CAM_PN547_PVDD_EN_CONTROL - bool "PN547 NFC PVDD EN CONTROL" - depends on NFC_PN547 - default n - help - SAMSUNG PN547 NFC PVDD EN CONTROL feature. - This feature provides support for NXP PN547 products. - You should select this feature if your NFC product uses pvdd en pin. - Say Y here to compile support for NXP PN547 PVDD EN CONTROL feature into the - kernel. - -config SW_LANDING_FOR_MULTI_TASKING - bool "SW Landing is applied during multi tasking" - depends on ACTUATOR - default n - help - If Camera exit while multi tasking with call, actuator makes big noise. - SW landing is applied during multi tasking only. - -config CAMERA_SYSFS_V2 - bool "CAMERA SYS" - depends on MSMB_CAMERA - ---help--- - CAMERA SYS. - -config DB8221A - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Dongbu HiTek 2.0MP sensor, - Front sensor. - -config OIS - tristate "External ois support" - depends on MSMB_CAMERA - default n - ---help--- - Enables support for external ois module. - -config CAM_DUAL_POWER_SEQ - bool "Dual power up sequence enable" - depends on MSMB_CAMERA - ---help--- - This flag will allow us to write dual power up sequence. - -config FRONT_FLASH - bool "Rear LEd and Front LED both USING" - depends on MSMB_CAMERA - ---help--- - ONLY for Front FLASH Model using. - Front LED for LM3632 or KTD2692 Rear LED SM5703. - -config EEPROM_CAMERA_QUP_I2C - bool "Read EEPROM data in camera module" - depends on MSMB_CAMERA - default n - ---help--- - If the eeprom data in camera module is not read successfully, - it causes actuator to move lens to 0x00 position, which causes actuator noise. +config MSM_FD + tristate "Qualcomm MSM FD face detection engine support" + depends on MSMB_CAMERA + ---help--- + Enables support for the MSM FD face detection engine. diff --git a/drivers/media/platform/msm/camera_v2/Makefile b/drivers/media/platform/msm/camera_v2/Makefile index 445459ff7d7e..578390529114 100644 --- a/drivers/media/platform/msm/camera_v2/Makefile +++ b/drivers/media/platform/msm/camera_v2/Makefile @@ -6,9 +6,9 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2/pproc ccflags-y += -Idrivers/media/platform/msm/camera_v2/msm_vb2 ccflags-y += -Idrivers/media/platform/msm/camera_v2/camera ccflags-y += -Idrivers/media/platform/msm/camera_v2/jpeg_10 +ccflags-y += -Idrivers/media/platform/msm/camera_v2/fd obj-$(CONFIG_MSMB_CAMERA) += msm.o -obj-$(CONFIG_MSMB_CAMERA) += cam_dummy.o obj-$(CONFIG_MSMB_CAMERA) += camera/ obj-$(CONFIG_MSMB_CAMERA) += msm_vb2/ obj-$(CONFIG_MSMB_CAMERA) += sensor/ @@ -17,3 +17,4 @@ obj-$(CONFIG_MSMB_CAMERA) += isp/ obj-$(CONFIG_MSMB_CAMERA) += ispif/ obj-$(CONFIG_MSMB_JPEG) += jpeg_10/ obj-$(CONFIG_MSMB_CAMERA) += msm_buf_mgr/ +obj-$(CONFIG_MSM_FD) += fd/ diff --git a/drivers/media/platform/msm/camera_v2/cam_dummy.c b/drivers/media/platform/msm/camera_v2/cam_dummy.c deleted file mode 100644 index 7c2a73a20f0b..000000000000 --- a/drivers/media/platform/msm/camera_v2/cam_dummy.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" - -static struct v4l2_device *msm_v4l2_dev; -/* static struct msm_cam_dummy_queue cam_dummy_queue; */ - -#if defined CONFIG_SEC_CAMERA_TUNING -int rear_tune; -int front_tune; -#endif - -static int msm_open_cam_dummy(struct file *fp) -{ - int rc; - - pr_err("%s: E\n", __func__); - rc = msm_cam_get_module_init_status(); - pr_err("%s: X %d\n", __func__, rc); - return rc; -} - -#if !defined CONFIG_SEC_CAMERA_TUNING -static long msm_ioctl_cam_dummy(struct file *fp, unsigned int cmd, - unsigned long arg) -{ - return 0; -} -#endif -static int msm_close_cam_dummy(struct file *f) -{ - return 0; -} - -static struct v4l2_file_operations msm_fops_config = { - .owner = THIS_MODULE, - .open = msm_open_cam_dummy, - .release = msm_close_cam_dummy, -#if defined CONFIG_SEC_CAMERA_TUNING - .ioctl = video_ioctl2, -#else - .unlocked_ioctl = msm_ioctl_cam_dummy, -#endif -}; - -static const struct of_device_id cam_dummy_dt_match[] = { - {.compatible = "qcom,cam_dummy",}, - {} -}; - -MODULE_DEVICE_TABLE(of, cam_dummy_dt_match); - -static struct platform_driver cam_dummy_platform_driver = { - .driver = { - .name = "qcom,cam_dummy", - .owner = THIS_MODULE, - .of_match_table = cam_dummy_dt_match, - }, -}; - -#if defined CONFIG_SEC_CAMERA_TUNING -static int msm_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - pr_err("%s TUNING CTRL : ctrl->value %d",__func__,ctrl->value); - if(ctrl->id >= V4L2_CID_PRIVATE_BASE) - { - switch (ctrl->value){ - case NORMAL_MODE : - rear_tune = 0; - front_tune = 0; - pr_err("%s TUNING CTRL : Setting Normal Binary",__func__); - break; - case REAR_TUNING : - rear_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear Tuning Binary",__func__); - break; - case FRONT_TUNING : - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Front Tuning Binary",__func__); - break; - case REAR_FRONT_TUNING : - rear_tune = 1; - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear and Front Tuning Binary",__func__); - break; - } - } - return rc; -} - -static const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = { - .vidioc_s_ctrl = msm_v4l2_s_ctrl, -}; -#endif - -static int32_t cam_dummy_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - struct msm_video_device *pvdev; - - /* init_waitqueue_head(&cam_dummy_queue.state_wait);*/ - pr_err("%s:%d\n", __func__, __LINE__); - match = of_match_device(cam_dummy_dt_match, &pdev->dev); - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CAMERA_DUMMY_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-camdummy", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops_config; -#if defined CONFIG_SEC_CAMERA_TUNING - pvdev->vdev->ioctl_ops = &msm_v4l2_ioctl_ops; -#endif - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static int __init cam_dummy_init_module(void) -{ - int32_t rc = 0; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&cam_dummy_platform_driver, - cam_dummy_platform_probe); - pr_err("%s:%d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static void __exit cam_dummy_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - platform_driver_unregister(&cam_dummy_platform_driver); - return; -} - -module_init(cam_dummy_init_module); -module_exit(cam_dummy_exit_module); -MODULE_DESCRIPTION("cam_dummy"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2/camera/camera.c b/drivers/media/platform/msm/camera_v2/camera/camera.c index a4205552964b..9cf04ce68fc1 100644 --- a/drivers/media/platform/msm/camera_v2/camera/camera.c +++ b/drivers/media/platform/msm/camera_v2/camera/camera.c @@ -35,8 +35,6 @@ #define fh_to_private(__fh) \ container_of(__fh, struct camera_v4l2_private, fh) -extern struct task_struct *qdaemon_task; -#define QDAEMON "mm-qcamera" struct camera_v4l2_private { struct v4l2_fh fh; unsigned int stream_id; @@ -476,7 +474,7 @@ static int camera_v4l2_fh_open(struct file *filep) /* stream_id = open id */ stream_id = atomic_read(&pvdev->opened); sp->stream_id = find_first_zero_bit( - &stream_id, MSM_CAMERA_STREAM_CNT_BITS); + (const unsigned long *)&stream_id, MSM_CAMERA_STREAM_CNT_BITS); pr_debug("%s: Found stream_id=%d\n", __func__, sp->stream_id); v4l2_fh_init(&sp->fh, pvdev->vdev); @@ -561,10 +559,8 @@ static int camera_v4l2_open(struct file *filep) if (!atomic_read(&pvdev->opened)) { pm_stay_awake(&pvdev->vdev->dev); -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) /* Disable power collapse latency */ msm_pm_qos_update_request(CAMERA_DISABLE_PC_LATENCY); -#endif /* create a new session when first opened */ rc = msm_create_session(pvdev->vdev->num, pvdev->vdev); @@ -575,7 +571,7 @@ static int camera_v4l2_open(struct file *filep) } rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, + find_first_zero_bit((const unsigned long *)&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); if (rc < 0) { pr_err("%s : creation of command_ack queue failed\n", @@ -589,17 +585,6 @@ static int camera_v4l2_open(struct file *filep) if (rc < 0) { pr_err("%s : posting of NEW_SESSION event failed\n", __func__); - if (qdaemon_task) { - if (!strncmp(qdaemon_task->comm, QDAEMON, strlen(QDAEMON))) { - pr_err("%s, kill daemon", __func__); - send_sig(SIGKILL, qdaemon_task, 0); - pr_err("%s, kill this", __func__); - send_sig(SIGKILL, current, 0); - } else - pr_err("%s, now (%s : %d)", __func__, - qdaemon_task->comm, task_pid_nr(qdaemon_task)); - } else - pr_err("error!! can't look for daemon"); pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); goto post_fail; } @@ -610,9 +595,11 @@ static int camera_v4l2_open(struct file *filep) __func__, __LINE__, rc); goto post_fail; } + /* Enable power collapse latency */ + msm_pm_qos_update_request(CAMERA_ENABLE_PC_LATENCY); } else { rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, + find_first_zero_bit((const unsigned long *)&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); if (rc < 0) { pr_err("%s : creation of command_ack queue failed Line %d rc %d\n", @@ -620,10 +607,10 @@ static int camera_v4l2_open(struct file *filep) goto session_fail; } } - pr_debug("%s: Open stream_id=%d\n", __func__, - find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - idx |= (1 << find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); + idx |= (1 << find_first_zero_bit((const unsigned long *)&opn_idx, + MSM_CAMERA_STREAM_CNT_BITS)); atomic_cmpxchg(&pvdev->opened, opn_idx, idx); + return rc; post_fail: @@ -680,18 +667,13 @@ static int camera_v4l2_close(struct file *filep) camera_pack_event(filep, MSM_CAMERA_DEL_SESSION, 0, -1, &event); /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); + msm_post_event(&event, -1); msm_delete_command_ack_q(pvdev->vdev->num, 0); /* This should take care of both normal close * and application crashes */ msm_destroy_session(pvdev->vdev->num); -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* Enable power collapse latency */ - msm_pm_qos_update_request(CAMERA_ENABLE_PC_LATENCY); -#endif - pm_relax(&pvdev->vdev->dev); } else { camera_pack_event(filep, MSM_CAMERA_SET_PARM, diff --git a/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c b/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c index 148901d46330..fd1457abfe98 100644 --- a/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c +++ b/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c @@ -674,9 +674,13 @@ static int msm_fd_s_fmt_vid_out(struct file *file, static int msm_fd_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req) { + int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - return vb2_reqbufs(&ctx->vb2_q, req); + mutex_lock(&ctx->fd_device->recovery_lock); + ret = vb2_reqbufs(&ctx->vb2_q, req); + mutex_unlock(&ctx->fd_device->recovery_lock); + return ret; } /* @@ -688,9 +692,14 @@ static int msm_fd_reqbufs(struct file *file, static int msm_fd_qbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { + int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - return vb2_qbuf(&ctx->vb2_q, pb); + mutex_lock(&ctx->fd_device->recovery_lock); + ret = vb2_qbuf(&ctx->vb2_q, pb); + mutex_unlock(&ctx->fd_device->recovery_lock); + return ret; + } /* @@ -702,9 +711,13 @@ static int msm_fd_qbuf(struct file *file, void *fh, static int msm_fd_dqbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { + int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); + mutex_lock(&ctx->fd_device->recovery_lock); + ret = vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); + mutex_unlock(&ctx->fd_device->recovery_lock); + return ret; } /* @@ -1226,6 +1239,7 @@ static int fd_probe(struct platform_device *pdev) mutex_init(&fd->lock); spin_lock_init(&fd->slock); + mutex_init(&fd->recovery_lock); fd->dev = &pdev->dev; /* Get resources */ diff --git a/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h b/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h index ed7d4c3a88c7..fea078aa2ff8 100644 --- a/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h +++ b/drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h @@ -212,6 +212,7 @@ enum msm_fd_mem_resources { struct msm_fd_device { struct mutex lock; spinlock_t slock; + struct mutex recovery_lock; int ref_count; int irq_num; diff --git a/drivers/media/platform/msm/camera_v2/isp/Makefile b/drivers/media/platform/msm/camera_v2/isp/Makefile index ace2a53cb046..13495227b6de 100644 --- a/drivers/media/platform/msm/camera_v2/isp/Makefile +++ b/drivers/media/platform/msm/camera_v2/isp/Makefile @@ -1,4 +1,4 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2 ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io obj-$(CONFIG_MSMB_CAMERA) += msm_isp.o msm_buf_mgr.o msm_isp_util.o msm_isp_axi_util.o msm_isp_stats_util.o -obj-$(CONFIG_MSMB_CAMERA) += msm_isp44.o msm_isp40.o msm_isp32.o +obj-$(CONFIG_MSMB_CAMERA) += msm_isp47.o msm_isp46.o msm_isp44.o msm_isp40.o msm_isp32.o diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c index 3fbde930c6cc..bf0d2016d844 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014,2016 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -34,22 +34,20 @@ #include "msm.h" #include "msm_buf_mgr.h" -/*#define CONFIG_MSM_ISP_DBG*/ #undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) -static struct msm_isp_bufq *msm_isp_get_bufq( +struct msm_isp_bufq *msm_isp_get_bufq( struct msm_isp_buf_mgr *buf_mgr, uint32_t bufq_handle) { struct msm_isp_bufq *bufq = NULL; uint32_t bufq_index = bufq_handle & 0xFF; - if (bufq_index > buf_mgr->num_buf_q) - return bufq; + + if ((bufq_handle == 0) || + (bufq_index > buf_mgr->num_buf_q) || + (bufq_index >= BUF_MGR_NUM_BUF_Q) ) + return NULL; bufq = &buf_mgr->bufq[bufq_index]; if (bufq->bufq_handle == bufq_handle) @@ -116,26 +114,44 @@ static int msm_isp_free_buf_handle(struct msm_isp_buf_mgr *buf_mgr, return 0; } -static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, +static void msm_isp_copy_planes_from_v4l2_buffer( + struct msm_isp_qbuf_buffer *qbuf_buf, + const struct v4l2_buffer *v4l2_buf) +{ + int i; + qbuf_buf->num_planes = v4l2_buf->length; + for (i = 0; i < qbuf_buf->num_planes; i++) { + qbuf_buf->planes[i].addr = v4l2_buf->m.planes[i].m.userptr; + qbuf_buf->planes[i].offset = v4l2_buf->m.planes[i].data_offset; + } +} + +static int msm_isp_prepare_isp_buf(struct msm_isp_buf_mgr *buf_mgr, struct msm_isp_buffer *buf_info, - struct v4l2_buffer *v4l2_buf) + struct msm_isp_qbuf_buffer *qbuf_buf) { int i, rc = -1; struct msm_isp_buffer_mapped_info *mapped_info; struct buffer_cmd *buf_pending = NULL; + int domain_num; + + if (buf_mgr->secure_enable == NON_SECURE_MODE) + domain_num = buf_mgr->iommu_domain_num; + else + domain_num = buf_mgr->iommu_domain_num_secure; - for (i = 0; i < v4l2_buf->length; i++) { + for (i = 0; i < qbuf_buf->num_planes; i++) { mapped_info = &buf_info->mapped_info[i]; mapped_info->handle = ion_import_dma_buf(buf_mgr->client, - v4l2_buf->m.planes[i].m.userptr); + qbuf_buf->planes[i].addr); if (IS_ERR_OR_NULL(mapped_info->handle)) { - pr_err("%s: buf has null/error ION handle %pK\n", + pr_err("%s: buf has null/error ION handle %p\n", __func__, mapped_info->handle); goto ion_map_error; } if (ion_map_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0, SZ_4K, + domain_num, 0, SZ_4K, 0, &(mapped_info->paddr), &(mapped_info->len), 0, 0) < 0) { rc = -EINVAL; @@ -143,9 +159,9 @@ static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, ion_free(buf_mgr->client, mapped_info->handle); goto ion_map_error; } - mapped_info->paddr += v4l2_buf->m.planes[i].data_offset; + mapped_info->paddr += qbuf_buf->planes[i].offset; CDBG("%s: plane: %d addr:%lu\n", - __func__, i, (unsigned long int)(mapped_info->paddr)); + __func__, i, (unsigned long)mapped_info->paddr); buf_pending = kzalloc(sizeof(struct buffer_cmd), GFP_ATOMIC); if (!buf_pending) { @@ -156,7 +172,7 @@ static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, buf_pending->mapped_info = mapped_info; list_add_tail(&buf_pending->list, &buf_mgr->buffer_q); } - buf_info->num_planes = v4l2_buf->length; + buf_info->num_planes = qbuf_buf->num_planes; return 0; ion_map_error: for (--i; i >= 0; i--) { @@ -175,6 +191,12 @@ static void msm_isp_unprepare_v4l2_buf( int i; struct msm_isp_buffer_mapped_info *mapped_info; struct buffer_cmd *buf_pending = NULL; + int domain_num; + + if (buf_mgr->secure_enable == NON_SECURE_MODE) + domain_num = buf_mgr->iommu_domain_num; + else + domain_num = buf_mgr->iommu_domain_num_secure; for (i = 0; i < buf_info->num_planes; i++) { mapped_info = &buf_info->mapped_info[i]; @@ -186,7 +208,7 @@ static void msm_isp_unprepare_v4l2_buf( if (buf_pending->mapped_info == mapped_info) { ion_unmap_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0); + domain_num, 0); ion_free(buf_mgr->client, mapped_info->handle); list_del_init(&buf_pending->list); @@ -205,8 +227,7 @@ static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, unsigned long flags; struct msm_isp_bufq *bufq = NULL; struct msm_isp_buffer *buf_info = NULL; - struct v4l2_buffer *buf = NULL; - struct v4l2_plane *plane = NULL; + struct msm_isp_qbuf_buffer buf; buf_info = msm_isp_get_buf_ptr(buf_mgr, info->handle, info->buf_idx); @@ -237,37 +258,20 @@ static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, spin_unlock_irqrestore(&bufq->bufq_lock, flags); if (vb2_buf) { - buf = &vb2_buf->v4l2_buf; + msm_isp_copy_planes_from_v4l2_buffer(&buf, &vb2_buf->v4l2_buf); buf_info->vb2_buf = vb2_buf; } else { - buf = &info->buffer; - plane = - kzalloc(sizeof(struct v4l2_plane) * buf->length, - GFP_KERNEL); - if (!plane) { - pr_err("%s: Cannot alloc plane: %d\n", - __func__, buf_info->state); - return rc; - } - if (copy_from_user(plane, - (void __user *)(buf->m.planes), - sizeof(struct v4l2_plane) * buf->length)) { - kfree(plane); - return rc; - } - buf->m.planes = plane; + buf = info->buffer; } - rc = msm_isp_prepare_v4l2_buf(buf_mgr, buf_info, buf); + rc = msm_isp_prepare_isp_buf(buf_mgr, buf_info, &buf); if (rc < 0) { pr_err("%s: Prepare buffer error\n", __func__); - kfree(plane); return rc; } spin_lock_irqsave(&bufq->bufq_lock, flags); buf_info->state = MSM_ISP_BUFFER_STATE_PREPARED; spin_unlock_irqrestore(&bufq->bufq_lock, flags); - kfree(plane); return rc; } @@ -305,6 +309,48 @@ static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, return 0; } +static int msm_isp_get_buf_by_index(struct msm_isp_buf_mgr *buf_mgr, + uint32_t bufq_handle, uint32_t buf_index, + struct msm_isp_buffer **buf_info) +{ + int rc = -EINVAL; + unsigned long flags; + struct msm_isp_bufq *bufq = NULL; + struct msm_isp_buffer *temp_buf_info; + uint32_t i = 0; + + bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); + if (!bufq) { + pr_err("%s: Invalid bufq\n", __func__); + return rc; + } + + spin_lock_irqsave(&bufq->bufq_lock, flags); + if (buf_index >= bufq->num_bufs) { + pr_err("%s: Invalid buf index: %d max: %d\n", __func__, + buf_index, bufq->num_bufs); + spin_unlock_irqrestore(&bufq->bufq_lock, flags); + return rc; + } + + *buf_info = NULL; + for (i = 0; bufq->num_bufs; i++) { + temp_buf_info = &bufq->bufs[i]; + if (temp_buf_info && temp_buf_info->buf_idx == buf_index) { + *buf_info = temp_buf_info; + break; + } + } + + if (*buf_info) { + pr_debug("Found buf in isp buf mgr"); + rc = 0; + } + spin_unlock_irqrestore(&bufq->bufq_lock, flags); + return rc; +} + + static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info) { @@ -425,6 +471,7 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, default: pr_err("%s: Incorrect buf source.\n", __func__); rc = -EINVAL; + spin_unlock_irqrestore(&bufq->bufq_lock, flags); return rc; } @@ -479,6 +526,11 @@ static int msm_isp_put_buf(struct msm_isp_buf_mgr *buf_mgr, return rc; } + + buf_info->buf_get_count = 0; + buf_info->buf_put_count = 0; + memset(buf_info->buf_used, 0, sizeof(buf_info->buf_used)); + spin_lock_irqsave(&bufq->bufq_lock, flags); switch (buf_info->state) { case MSM_ISP_BUFFER_STATE_PREPARED: @@ -511,6 +563,53 @@ static int msm_isp_put_buf(struct msm_isp_buf_mgr *buf_mgr, return rc; } +static int msm_isp_put_buf_unsafe(struct msm_isp_buf_mgr *buf_mgr, + uint32_t bufq_handle, uint32_t buf_index) +{ + int rc = -1; + struct msm_isp_bufq *bufq = NULL; + struct msm_isp_buffer *buf_info = NULL; + + bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); + if (!bufq) { + pr_err("%s: Invalid bufq\n", __func__); + return rc; + } + + buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); + if (!buf_info) { + pr_err("%s: buf not found\n", __func__); + return rc; + } + + switch (buf_info->state) { + case MSM_ISP_BUFFER_STATE_PREPARED: + case MSM_ISP_BUFFER_STATE_DEQUEUED: + case MSM_ISP_BUFFER_STATE_DIVERTED: + if (BUF_SRC(bufq->stream_id)) + list_add_tail(&buf_info->list, &bufq->head); + else + buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, + bufq->session_id, bufq->stream_id); + buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; + rc = 0; + break; + case MSM_ISP_BUFFER_STATE_DISPATCHED: + buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; + rc = 0; + break; + case MSM_ISP_BUFFER_STATE_QUEUED: + rc = 0; + break; + default: + pr_err("%s: incorrect state = %d", + __func__, buf_info->state); + break; + } + + return rc; +} + static int msm_isp_buf_done(struct msm_isp_buf_mgr *buf_mgr, uint32_t bufq_handle, uint32_t buf_index, struct timeval *tv, uint32_t frame_id, uint32_t output_format) @@ -589,19 +688,34 @@ static int msm_isp_flush_buf(struct msm_isp_buf_mgr *buf_mgr, pr_err("%s: buf not found\n", __func__); continue; } - spin_lock_irqsave(&bufq->bufq_lock, flags); if (flush_type == MSM_ISP_BUFFER_FLUSH_DIVERTED && buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } else if (flush_type == MSM_ISP_BUFFER_FLUSH_ALL && - (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED || - buf_info->state == MSM_ISP_BUFFER_STATE_DISPATCHED)) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; + } else if (flush_type == MSM_ISP_BUFFER_FLUSH_ALL) { + if (buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { + CDBG("%s: no need to queue Diverted buffer\n", + __func__); + } else if (buf_info->state == + MSM_ISP_BUFFER_STATE_DEQUEUED) { + if (buf_info->buf_get_count == + ISP_SHARE_BUF_CLIENT) { + msm_isp_put_buf_unsafe(buf_mgr, + bufq_handle, buf_info->buf_idx); + } else { + buf_info->state = + MSM_ISP_BUFFER_STATE_DEQUEUED; + buf_info->buf_get_count = 0; + buf_info->buf_put_count = 0; + memset(buf_info->buf_used, 0, + sizeof(uint8_t) * 2); + } + } } + spin_unlock_irqrestore(&bufq->bufq_lock, flags); } + return 0; } @@ -710,6 +824,8 @@ static int msm_isp_get_bufq_handle(struct msm_isp_buf_mgr *buf_mgr, return buf_mgr->bufq[i].bufq_handle; } } + pr_err("%s: No match found 0x%x 0x%x\n", __func__, + session_id, stream_id); return 0; } @@ -815,36 +931,119 @@ static void msm_isp_release_all_bufq( } static void msm_isp_register_ctx(struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx) + struct device **iommu_ctx1, struct device **iommu_ctx2, + int num_iommu_ctx, int secure_num_iommu_ctx) { int i; buf_mgr->num_iommu_ctx = num_iommu_ctx; for (i = 0; i < num_iommu_ctx; i++) - buf_mgr->iommu_ctx[i] = iommu_ctx[i]; + buf_mgr->iommu_ctx[i] = iommu_ctx1[i]; + + buf_mgr->num_iommu_secure_ctx = secure_num_iommu_ctx; + for (i = 0; i < secure_num_iommu_ctx; i++) + buf_mgr->iommu_secure_ctx[i] = iommu_ctx2[i]; } -static int msm_isp_attach_ctx(struct msm_isp_buf_mgr *buf_mgr) +static int msm_isp_attach_ctx(struct msm_isp_buf_mgr *buf_mgr, + struct msm_vfe_smmu_attach_cmd *cmd) { int rc, i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { - rc = iommu_attach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); - if (rc) { - pr_err("%s: Iommu attach error\n", __func__); - return -EINVAL; + if (cmd->security_mode == NON_SECURE_MODE) { + /*non secure mode*/ + for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { + + if (buf_mgr->attach_ref_cnt[NON_SECURE_MODE][i] == 0) { + /* attach only once */ + rc = iommu_attach_device( + buf_mgr->iommu_domain, + buf_mgr->iommu_ctx[i]); + if (rc) { + pr_err("%s: attach error bank: %d, rc : %d\n", + __func__, i, rc); + return -EINVAL; + } + } + buf_mgr->attach_ref_cnt[NON_SECURE_MODE][i]++; + } + } else { + /*secure mode*/ + for (i = 0; i < buf_mgr->num_iommu_secure_ctx; i++) { + + if (buf_mgr->attach_ref_cnt[SECURE_MODE][i] == 0) { + /* attach only once */ + rc = iommu_attach_device( + buf_mgr->iommu_domain_secure, + buf_mgr->iommu_secure_ctx[i]); + if (rc) { + pr_err("%s: attach error bank: %d, rc : %d\n", + __func__, i, rc); + return -EINVAL; + } + } + buf_mgr->attach_ref_cnt[SECURE_MODE][i]++; } } + buf_mgr->attach_state = MSM_ISP_BUF_MGR_ATTACH; return 0; } -static void msm_isp_detach_ctx(struct msm_isp_buf_mgr *buf_mgr) +static int msm_isp_detach_ctx(struct msm_isp_buf_mgr *buf_mgr) { int i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) - iommu_detach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); + + if (buf_mgr->attach_state == MSM_ISP_BUF_MGR_DETACH || + buf_mgr->open_count) + return 0; + + if (buf_mgr->secure_enable == NON_SECURE_MODE) { + /*non secure mode*/ + for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { + /*Detach only if ref count is one*/ + if (buf_mgr->attach_ref_cnt[NON_SECURE_MODE][i] == 1) { + iommu_detach_device(buf_mgr->iommu_domain, + buf_mgr->iommu_ctx[i]); + } + if (buf_mgr->attach_ref_cnt[NON_SECURE_MODE][i] > 0) + --buf_mgr->attach_ref_cnt[NON_SECURE_MODE][i]; + } + } else { + /*secure mode*/ + for (i = 0; i < buf_mgr->num_iommu_secure_ctx; i++) { + /*Detach only if ref count is one*/ + if (buf_mgr->attach_ref_cnt[SECURE_MODE][i] == 1) { + iommu_detach_device( + buf_mgr->iommu_domain_secure, + buf_mgr->iommu_secure_ctx[i]); + } + if (buf_mgr->attach_ref_cnt[SECURE_MODE][i] > 0) + --buf_mgr->attach_ref_cnt[SECURE_MODE][i]; + } + } + buf_mgr->attach_state = MSM_ISP_BUF_MGR_DETACH; + return 0; +} + +int msm_isp_smmu_attach(struct msm_isp_buf_mgr *buf_mgr, + void *arg) +{ + struct msm_vfe_smmu_attach_cmd *cmd = arg; + int rc = 0; + pr_debug("%s: cmd->security_mode : %d\n", __func__, cmd->security_mode); + if (cmd->iommu_attach_mode == IOMMU_ATTACH) { + buf_mgr->secure_enable = cmd->security_mode; + rc = msm_isp_attach_ctx(buf_mgr, cmd); + if (rc < 0) { + pr_err("%s: smmu attach error, rc :%d\n", __func__, rc); + goto iommu_error; + } + } else + msm_isp_detach_ctx(buf_mgr); + +iommu_error: + return rc; } + static int msm_isp_init_isp_buf_mgr( struct msm_isp_buf_mgr *buf_mgr, const char *ctx_name, uint16_t num_buf_q) @@ -859,7 +1058,6 @@ static int msm_isp_init_isp_buf_mgr( } CDBG("%s: E\n", __func__); - msm_isp_attach_ctx(buf_mgr); INIT_LIST_HEAD(&buf_mgr->buffer_q); buf_mgr->num_buf_q = num_buf_q; buf_mgr->bufq = @@ -871,6 +1069,7 @@ static int msm_isp_init_isp_buf_mgr( } buf_mgr->client = msm_ion_client_create(ctx_name); buf_mgr->buf_handle_cnt = 0; + buf_mgr->pagefault_debug = 0; return 0; bufq_error: return rc; @@ -879,12 +1078,16 @@ bufq_error: static int msm_isp_deinit_isp_buf_mgr( struct msm_isp_buf_mgr *buf_mgr) { - if (--buf_mgr->open_count) + if (buf_mgr->open_count > 0) + buf_mgr->open_count--; + + if (buf_mgr->open_count) return 0; msm_isp_release_all_bufq(buf_mgr); ion_client_destroy(buf_mgr->client); kfree(buf_mgr->bufq); buf_mgr->num_buf_q = 0; + buf_mgr->pagefault_debug = 0; msm_isp_detach_ctx(buf_mgr); return 0; } @@ -912,6 +1115,53 @@ int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, return 0; } +int msm_isp_buf_mgr_debug(struct msm_isp_buf_mgr *buf_mgr) +{ + struct msm_isp_buffer *bufs = NULL; + uint32_t i = 0, j = 0, k = 0, rc = 0; + if (!buf_mgr) { + pr_err_ratelimited("%s: %d] NULL buf_mgr\n", + __func__, __LINE__); + return -EINVAL; + } + for (i = 0; i < BUF_MGR_NUM_BUF_Q; i++) { + if (buf_mgr->bufq[i].bufq_handle != 0) { + pr_err("%s:%d handle %x\n", __func__, i, + buf_mgr->bufq[i].bufq_handle); + pr_err("%s:%d session_id %d, stream_id %x,", + __func__, i, buf_mgr->bufq[i].session_id, + buf_mgr->bufq[i].stream_id); + pr_err("num_bufs %d, handle %x, type %d\n", + buf_mgr->bufq[i].num_bufs, + buf_mgr->bufq[i].bufq_handle, + buf_mgr->bufq[i].buf_type); + for (j = 0; j < buf_mgr->bufq[i].num_bufs; j++) { + bufs = &buf_mgr->bufq[i].bufs[j]; + if (!bufs) { + pr_err("bufs at %d is NULL breaking\n", + j); + break; + } + pr_err("%s:%d buf_idx %d, frame_id %d,", + __func__, j, bufs->buf_idx, + bufs->frame_id); + pr_err("num_planes %d, state %d\n", + bufs->num_planes, bufs->state); + for (k = 0; k < bufs->num_planes; k++) { + pr_err("%s:%d paddr %x, len %lu,", + __func__, k, (unsigned int) + bufs->mapped_info[k].paddr, + bufs->mapped_info[k].len); + pr_err(" ion handle %p\n", + bufs->mapped_info[k].handle); + } + } + } + } + buf_mgr->pagefault_debug = 1; + return rc; +} + static struct msm_isp_buf_ops isp_buf_ops = { .request_buf = msm_isp_request_bufq, .enqueue_buf = msm_isp_buf_enqueue, @@ -919,6 +1169,7 @@ static struct msm_isp_buf_ops isp_buf_ops = { .get_bufq_handle = msm_isp_get_bufq_handle, .get_buf_src = msm_isp_get_buf_src, .get_buf = msm_isp_get_buf, + .get_buf_by_index = msm_isp_get_buf_by_index, .put_buf = msm_isp_put_buf, .flush_buf = msm_isp_flush_buf, .buf_done = msm_isp_buf_done, @@ -926,6 +1177,8 @@ static struct msm_isp_buf_ops isp_buf_ops = { .register_ctx = msm_isp_register_ctx, .buf_mgr_init = msm_isp_init_isp_buf_mgr, .buf_mgr_deinit = msm_isp_deinit_isp_buf_mgr, + .buf_mgr_debug = msm_isp_buf_mgr_debug, + .get_bufq = msm_isp_get_bufq, }; int msm_isp_create_isp_buf_mgr( @@ -934,6 +1187,7 @@ int msm_isp_create_isp_buf_mgr( struct msm_iova_layout *iova_layout) { int rc = 0; + int i = 0, j = 0; if (buf_mgr->init_done) return rc; @@ -951,11 +1205,42 @@ int msm_isp_create_isp_buf_mgr( rc = -1; goto iommu_domain_error; } - buf_mgr->ops = &isp_buf_ops; buf_mgr->vb2_ops = vb2_ops; - buf_mgr->init_done = 1; buf_mgr->open_count = 0; + buf_mgr->pagefault_debug = 0; + buf_mgr->secure_enable = NON_SECURE_MODE; + buf_mgr->attach_state = MSM_ISP_BUF_MGR_DETACH; + + for (i = 0; i < MAX_PROTECTION_MODE; i++) + for (j = 0; j < MAX_IOMMU_CTX; j++) + buf_mgr->attach_ref_cnt[i][j] = 0; + return 0; +iommu_domain_error: + return rc; +} + +int msm_isp_create_secure_domain( + struct msm_isp_buf_mgr *buf_mgr, + struct msm_iova_layout *iova_layout) +{ + int rc = 0; + if (buf_mgr->init_done) + return rc; + buf_mgr->iommu_domain_num_secure = msm_register_domain(iova_layout); + if (buf_mgr->iommu_domain_num_secure < 0) { + pr_err("%s: Invalid iommu domain number\n", __func__); + rc = -1; + goto iommu_domain_error; + } + + buf_mgr->iommu_domain_secure = msm_get_iommu_domain( + buf_mgr->iommu_domain_num_secure); + if (!buf_mgr->iommu_domain_secure) { + pr_err("%s: Invalid iommu domain\n", __func__); + rc = -1; + goto iommu_domain_error; + } return 0; iommu_domain_error: return rc; diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h index 3160a36a0f92..dd82ec2fe381 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h +++ b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h @@ -25,6 +25,8 @@ MSM_ISP_BUFFER_SRC_HAL) #define ISP_SHARE_BUF_CLIENT 2 +#define BUF_MGR_NUM_BUF_Q 28 +#define MAX_IOMMU_CTX 2 struct msm_isp_buf_mgr; @@ -50,6 +52,11 @@ enum msm_isp_buffer_flush_t { MSM_ISP_BUFFER_FLUSH_ALL, }; +enum msm_isp_buf_mgr_state { + MSM_ISP_BUF_MGR_ATTACH, + MSM_ISP_BUF_MGR_DETACH, +}; + struct msm_isp_buffer_mapped_info { unsigned long len; dma_addr_t paddr; @@ -120,6 +127,10 @@ struct msm_isp_buf_ops { int (*get_buf) (struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info); + int (*get_buf_by_index) (struct msm_isp_buf_mgr *buf_mgr, + uint32_t bufq_handle, uint32_t buf_index, + struct msm_isp_buffer **buf_info); + int (*put_buf) (struct msm_isp_buf_mgr *buf_mgr, uint32_t bufq_handle, uint32_t buf_index); @@ -133,15 +144,20 @@ struct msm_isp_buf_ops { uint32_t bufq_handle, uint32_t buf_index, struct timeval *tv, uint32_t frame_id); void (*register_ctx) (struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx); + struct device **iommu_ctx1, struct device **iommu_ctx2, + int num_iommu_ctx1, int num_iommu_ctx2); int (*buf_mgr_init) (struct msm_isp_buf_mgr *buf_mgr, const char *ctx_name, uint16_t num_buf_q); int (*buf_mgr_deinit) (struct msm_isp_buf_mgr *buf_mgr); + int (*buf_mgr_debug) (struct msm_isp_buf_mgr *buf_mgr); + struct msm_isp_bufq * (*get_bufq)(struct msm_isp_buf_mgr *buf_mgr, + uint32_t bufq_handle); }; struct msm_isp_buf_mgr { int init_done; uint32_t open_count; + uint32_t pagefault_debug; spinlock_t lock; uint16_t num_buf_q; struct msm_isp_bufq *bufq; @@ -156,9 +172,20 @@ struct msm_isp_buf_mgr { int iommu_domain_num; struct iommu_domain *iommu_domain; + /*Add secure domain num and domain */ + int iommu_domain_num_secure; + struct iommu_domain *iommu_domain_secure; + + /*Add secure mode*/ + int secure_enable; + int num_iommu_ctx; struct device *iommu_ctx[2]; struct list_head buffer_q; + int num_iommu_secure_ctx; + struct device *iommu_secure_ctx[2]; + int attach_ref_cnt[MAX_PROTECTION_MODE][MAX_IOMMU_CTX]; + enum msm_isp_buf_mgr_state attach_state; }; int msm_isp_create_isp_buf_mgr(struct msm_isp_buf_mgr *buf_mgr, @@ -167,4 +194,10 @@ int msm_isp_create_isp_buf_mgr(struct msm_isp_buf_mgr *buf_mgr, int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, unsigned int cmd, void *arg); +int msm_isp_create_secure_domain(struct msm_isp_buf_mgr *buf_mgr, + struct msm_iova_layout *iova_layout); + +int msm_isp_smmu_attach(struct msm_isp_buf_mgr *buf_mgr, + void *arg); + #endif /* _MSM_ISP_BUF_H_ */ diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp.c index f2586f872f80..df2023864399 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,8 @@ #include "msm_isp_axi_util.h" #include "msm_isp_stats_util.h" #include "msm_sd.h" +#include "msm_isp47.h" +#include "msm_isp46.h" #include "msm_isp44.h" #include "msm_isp40.h" #include "msm_isp32.h" @@ -36,6 +39,14 @@ static struct msm_sd_req_vb2_q vfe_vb2_ops; static const struct of_device_id msm_vfe_dt_match[] = { + { + .compatible = "qcom,vfe47", + .data = &vfe47_hw_info, + }, + { + .compatible = "qcom,vfe46", + .data = &vfe46_hw_info, + }, { .compatible = "qcom,vfe44", .data = &vfe44_hw_info, @@ -57,12 +68,16 @@ static const struct platform_device_id msm_vfe_dev_id[] = { {"msm_vfe32", (kernel_ulong_t) &vfe32_hw_info}, {} }; +#define MAX_OVERFLOW_COUNTERS 29 +#define OVERFLOW_LENGTH 1024 +#define OVERFLOW_BUFFER_LENGTH 64 +static char stat_line[OVERFLOW_LENGTH]; -#define MAX_OVERFLOW_COUNTERS 15 -#define OVERFLOW_LENGTH 512 -#define OVERFLOW_BUFFER_LENGTH 32 static struct msm_isp_buf_mgr vfe_buf_mgr; -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats); +struct msm_isp_statistics stats; +struct msm_isp_ub_info ub_info; +static int msm_isp_enable_debugfs(struct vfe_device *vfe_dev, + struct msm_isp_bw_req_info *isp_req_hist); static char *stats_str[MAX_OVERFLOW_COUNTERS] = { "imgmaster0_overflow_cnt", "imgmaster1_overflow_cnt", @@ -79,8 +94,35 @@ static char *stats_str[MAX_OVERFLOW_COUNTERS] = { "cs_overflow_cnt", "ihist_overflow_cnt", "skinbhist_overflow_cnt", + "bfscale_overflow_cnt", + "ISP_VFE0_client_info.active", + "ISP_VFE0_client_info.ab", + "ISP_VFE0_client_info.ib", + "ISP_VFE1_client_info.active", + "ISP_VFE1_client_info.ab", + "ISP_VFE1_client_info.ib", + "ISP_CPP_client_info.active", + "ISP_CPP_client_info.ab", + "ISP_CPP_client_info.ib", + "ISP_last_overflow.ab", + "ISP_last_overflow.ib", + "ISP_VFE_CLK_RATE", + "ISP_CPP_CLK_RATE", }; +#define MAX_DEPTH_BW_REQ_HISTORY 25 +#define MAX_BW_HISTORY_BUFF_LEN 6144 +#define MAX_BW_HISTORY_LINE_BUFF_LEN 512 + +#define MAX_UB_INFO_BUFF_LEN 1024 +#define MAX_UB_INFO_LINE_BUFF_LEN 256 + +static struct msm_isp_bw_req_info + msm_isp_bw_request_history[MAX_DEPTH_BW_REQ_HISTORY]; +static int msm_isp_bw_request_history_idx; +static char bw_request_history_buff[MAX_BW_HISTORY_BUFF_LEN]; +static char ub_info_buffer[MAX_UB_INFO_BUFF_LEN]; +static spinlock_t req_history_lock; static int vfe_debugfs_statistics_open(struct inode *inode, struct file *file) { file->private_data = inode->i_private; @@ -91,51 +133,270 @@ static ssize_t vfe_debugfs_statistics_read(struct file *t_file, char *t_char, size_t t_size_t, loff_t *t_loff_t) { int i; - char name[OVERFLOW_LENGTH] = {0}; - int *ptr; + uint64_t *ptr; char buffer[OVERFLOW_BUFFER_LENGTH] = {0}; - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) + struct vfe_device *vfe_dev = (struct vfe_device *) t_file->private_data; - ptr = (int *)stats; + struct msm_isp_statistics *stats = vfe_dev->stats; + memset(stat_line, 0, sizeof(stat_line)); + msm_isp_util_get_bandwidth_stats(vfe_dev, stats); + ptr = (uint64_t *)(stats); for (i = 0; i < MAX_OVERFLOW_COUNTERS; i++) { - strlcat(name, stats_str[i], sizeof(name)); - strlcat(name, " ", sizeof(name)); - snprintf(buffer, sizeof(buffer), "%d", ptr[i]); - strlcat(name, buffer, sizeof(name)); - strlcat(name, "\r\n", sizeof(name)); + strlcat(stat_line, stats_str[i], sizeof(stat_line)); + strlcat(stat_line, " ", sizeof(stat_line)); + snprintf(buffer, sizeof(buffer), "%llu", ptr[i]); + strlcat(stat_line, buffer, sizeof(stat_line)); + strlcat(stat_line, "\r\n", sizeof(stat_line)); } return simple_read_from_buffer(t_char, t_size_t, - t_loff_t, name, strlen(name)); + t_loff_t, stat_line, strlen(stat_line)); } static ssize_t vfe_debugfs_statistics_write(struct file *t_file, const char *t_char, size_t t_size_t, loff_t *t_loff_t) { - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) + struct vfe_device *vfe_dev = (struct vfe_device *) t_file->private_data; + struct msm_isp_statistics *stats = vfe_dev->stats; memset(stats, 0, sizeof(struct msm_isp_statistics)); return sizeof(struct msm_isp_statistics); } +static int bw_history_open(struct inode *inode, struct file *file) +{ + file->private_data = inode->i_private; + return 0; +} + +static ssize_t bw_history_read(struct file *t_file, char *t_char, + size_t t_size_t, loff_t *t_loff_t) +{ + int i; + char *out_buffer = bw_request_history_buff; + char line_buffer[MAX_BW_HISTORY_LINE_BUFF_LEN] = {0}; + struct msm_isp_bw_req_info *isp_req_hist = + (struct msm_isp_bw_req_info *) t_file->private_data; + + memset(out_buffer, 0, MAX_BW_HISTORY_BUFF_LEN); + + snprintf(line_buffer, sizeof(line_buffer), + "Bus bandwidth request history in chronological order:\n"); + strlcat(out_buffer, line_buffer, sizeof(bw_request_history_buff)); + + snprintf(line_buffer, sizeof(line_buffer), + "MSM_ISP_MIN_AB = %u, MSM_ISP_MIN_IB = %u\n\n", + MSM_ISP_MIN_AB, MSM_ISP_MIN_IB); + strlcat(out_buffer, line_buffer, sizeof(bw_request_history_buff)); + + for (i = 0; i < MAX_DEPTH_BW_REQ_HISTORY; i++) { + snprintf(line_buffer, sizeof(line_buffer), + "idx = %d, client = %u, timestamp = %llu, ab = %llu, ib = %llu\n" + "ISP0.active = %x, ISP0.ab = %llu, ISP0.ib = %llu\n" + "ISP1.active = %x, ISP1.ab = %llu, ISP1.ib = %llu\n" + "CPP.active = %x, CPP.ab = %llu, CPP.ib = %llu\n\n", + i, isp_req_hist[i].client, isp_req_hist[i].timestamp, + isp_req_hist[i].total_ab, isp_req_hist[i].total_ib, + isp_req_hist[i].client_info[0].active, + isp_req_hist[i].client_info[0].ab, + isp_req_hist[i].client_info[0].ib, + isp_req_hist[i].client_info[1].active, + isp_req_hist[i].client_info[1].ab, + isp_req_hist[i].client_info[1].ib, + isp_req_hist[i].client_info[2].active, + isp_req_hist[i].client_info[2].ab, + isp_req_hist[i].client_info[2].ib); + strlcat(out_buffer, line_buffer, + sizeof(bw_request_history_buff)); + } + return simple_read_from_buffer(t_char, t_size_t, + t_loff_t, out_buffer, strlen(out_buffer)); +} + +static ssize_t bw_history_write(struct file *t_file, + const char *t_char, size_t t_size_t, loff_t *t_loff_t) +{ + struct msm_isp_bw_req_info *isp_req_hist = + (struct msm_isp_bw_req_info *) t_file->private_data; + + memset(isp_req_hist, 0, sizeof(msm_isp_bw_request_history)); + msm_isp_bw_request_history_idx = 0; + return sizeof(msm_isp_bw_request_history); +} + +static int ub_info_open(struct inode *inode, struct file *file) +{ + file->private_data = inode->i_private; + return 0; +} + +static ssize_t ub_info_read(struct file *t_file, char *t_char, + size_t t_size_t, loff_t *t_loff_t) +{ + int i; + char *out_buffer = ub_info_buffer; + char line_buffer[MAX_UB_INFO_LINE_BUFF_LEN] = {0}; + struct vfe_device *vfe_dev = + (struct vfe_device *) t_file->private_data; + struct msm_isp_ub_info *ub_info = vfe_dev->ub_info; + + memset(out_buffer, 0, MAX_UB_INFO_LINE_BUFF_LEN); + snprintf(line_buffer, sizeof(line_buffer), + "wm_ub_policy_type = %d\n" + "num_wm = %d\n" + "wm_ub = %d\n", + ub_info->policy, ub_info->num_wm, ub_info->wm_ub); + strlcat(out_buffer, line_buffer, + sizeof(ub_info_buffer)); + for (i = 0; i < ub_info->num_wm; i++) { + snprintf(line_buffer, sizeof(line_buffer), + "data[%d] = 0x%x, addr[%d] = 0x%llx\n", + i, ub_info->data[i], i, ub_info->addr[i]); + strlcat(out_buffer, line_buffer, + sizeof(ub_info_buffer)); + } + + return simple_read_from_buffer(t_char, t_size_t, + t_loff_t, out_buffer, strlen(out_buffer)); +} + +static ssize_t ub_info_write(struct file *t_file, + const char *t_char, size_t t_size_t, loff_t *t_loff_t) +{ + struct vfe_device *vfe_dev = + (struct vfe_device *) t_file->private_data; + struct msm_isp_ub_info *ub_info = vfe_dev->ub_info; + + memset(ub_info, 0, sizeof(struct msm_isp_ub_info)); + + return sizeof(struct msm_isp_ub_info); +} + static const struct file_operations vfe_debugfs_error = { .open = vfe_debugfs_statistics_open, .read = vfe_debugfs_statistics_read, .write = vfe_debugfs_statistics_write, }; -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats) +static const struct file_operations bw_history_ops = { + .open = bw_history_open, + .read = bw_history_read, + .write = bw_history_write, +}; + +static const struct file_operations ub_info_ops = { + .open = ub_info_open, + .read = ub_info_read, + .write = ub_info_write, +}; + +static int msm_isp_enable_debugfs(struct vfe_device *vfe_dev, + struct msm_isp_bw_req_info *isp_req_hist) { struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_isp", NULL); + char dirname[32] = {0}; + + snprintf(dirname, sizeof(dirname), "msm_isp%d", vfe_dev->pdev->id); + debugfs_base = debugfs_create_dir(dirname, NULL); if (!debugfs_base) return -ENOMEM; if (!debugfs_create_file("stats", S_IRUGO | S_IWUSR, debugfs_base, - stats, &vfe_debugfs_error)) + vfe_dev, &vfe_debugfs_error)) + return -ENOMEM; + + if (!debugfs_create_file("bw_req_history", S_IRUGO | S_IWUSR, + debugfs_base, isp_req_hist, &bw_history_ops)) return -ENOMEM; + + if (!debugfs_create_file("ub_info", S_IRUGO | S_IWUSR, + debugfs_base, vfe_dev, &ub_info_ops)) + return -ENOMEM; + return 0; } + +void msm_isp_update_req_history(uint32_t client, uint64_t ab, + uint64_t ib, + struct msm_isp_bandwidth_info *client_info, + unsigned long long ts) +{ + int i; + + spin_lock(&req_history_lock); + msm_isp_bw_request_history[msm_isp_bw_request_history_idx].client = + client; + msm_isp_bw_request_history[msm_isp_bw_request_history_idx].timestamp = + ts; + msm_isp_bw_request_history[msm_isp_bw_request_history_idx].total_ab = + ab; + msm_isp_bw_request_history[msm_isp_bw_request_history_idx].total_ib = + ib; + + for (i = 0; i < MAX_ISP_CLIENT; i++) { + msm_isp_bw_request_history[msm_isp_bw_request_history_idx]. + client_info[i].active = client_info[i].active; + msm_isp_bw_request_history[msm_isp_bw_request_history_idx]. + client_info[i].ab = client_info[i].ab; + msm_isp_bw_request_history[msm_isp_bw_request_history_idx]. + client_info[i].ib = client_info[i].ib; + } + + msm_isp_bw_request_history_idx = (msm_isp_bw_request_history_idx + 1) + % MAX_DEPTH_BW_REQ_HISTORY; + spin_unlock(&req_history_lock); +} + +#ifdef CONFIG_COMPAT +static long msm_isp_dqevent(struct file *file, struct v4l2_fh *vfh, void *arg) +{ + long rc; + if (is_compat_task()) { + struct msm_isp_event_data32 *event_data32; + struct msm_isp_event_data *event_data; + struct v4l2_event isp_event; + struct v4l2_event *isp_event_user; + + memset(&isp_event, 0, sizeof(isp_event)); + rc = v4l2_event_dequeue(vfh, &isp_event, + file->f_flags & O_NONBLOCK); + if (rc) + return rc; + event_data = (struct msm_isp_event_data *) + isp_event.u.data; + isp_event_user = (struct v4l2_event *)arg; + memcpy(isp_event_user, &isp_event, + sizeof(*isp_event_user)); + event_data32 = (struct msm_isp_event_data32 *) + isp_event_user->u.data; + memset(event_data32, 0, + sizeof(struct msm_isp_event_data32)); + event_data32->timestamp.tv_sec = + event_data->timestamp.tv_sec; + event_data32->timestamp.tv_usec = + event_data->timestamp.tv_usec; + event_data32->mono_timestamp.tv_sec = + event_data->mono_timestamp.tv_sec; + event_data32->mono_timestamp.tv_usec = + event_data->mono_timestamp.tv_usec; + event_data32->input_intf = event_data->input_intf; + event_data32->frame_id = event_data->frame_id; + memcpy(&(event_data32->u), &(event_data->u), + sizeof(event_data32->u)); + } else { + rc = v4l2_event_dequeue(vfh, arg, + file->f_flags & O_NONBLOCK); + } + return rc; +} +#else +static long msm_isp_dqevent(struct file *file, struct v4l2_fh *vfh, void *arg) +{ + return v4l2_event_dequeue(vfh, arg, + file->f_flags & O_NONBLOCK); +} +#endif + static long msm_isp_subdev_do_ioctl( struct file *file, unsigned int cmd, void *arg) { @@ -144,11 +405,12 @@ static long msm_isp_subdev_do_ioctl( struct v4l2_fh *vfh = file->private_data; switch (cmd) { - case VIDIOC_DQEVENT: + case VIDIOC_DQEVENT: { if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); + return msm_isp_dqevent(file, vfh, arg); + } + break; case VIDIOC_SUBSCRIBE_EVENT: return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); @@ -168,7 +430,7 @@ static long msm_isp_subdev_fops_ioctl(struct file *file, unsigned int cmd, static struct v4l2_file_operations msm_isp_v4l2_subdev_fops = { #ifdef CONFIG_COMPAT - .compat_ioctl = msm_isp_subdev_fops_ioctl, + .compat_ioctl32 = msm_isp_subdev_fops_ioctl, #endif .unlocked_ioctl = msm_isp_subdev_fops_ioctl }; @@ -194,13 +456,21 @@ static int vfe_probe(struct platform_device *pdev) vfe_dev = kzalloc(sizeof(struct vfe_device), GFP_KERNEL); if (!vfe_dev) { pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; + rc = -ENOMEM; + goto end; } vfe_dev->stats = kzalloc(sizeof(struct msm_isp_statistics), GFP_KERNEL); if (!vfe_dev->stats) { pr_err("%s: no enough memory\n", __func__); - kfree(vfe_dev); - return -ENOMEM; + rc = -ENOMEM; + goto probe_fail1; + } + + vfe_dev->ub_info = kzalloc(sizeof(struct msm_isp_ub_info), GFP_KERNEL); + if (!vfe_dev->ub_info) { + pr_err("%s: no enough memory\n", __func__); + rc = -ENOMEM; + goto probe_fail2; } if (pdev->dev.of_node) { of_property_read_u32((&pdev->dev)->of_node, @@ -208,8 +478,8 @@ static int vfe_probe(struct platform_device *pdev) match_dev = of_match_device(msm_vfe_dt_match, &pdev->dev); if (!match_dev) { pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; + rc = -EINVAL; + goto probe_fail3; } vfe_dev->hw_info = (struct msm_vfe_hardware_info *) match_dev->data; @@ -220,8 +490,8 @@ static int vfe_probe(struct platform_device *pdev) if (!vfe_dev->hw_info) { pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; + rc = -EINVAL; + goto probe_fail3; } ISP_DBG("%s: device id = %d\n", __func__, pdev->id); @@ -229,8 +499,8 @@ static int vfe_probe(struct platform_device *pdev) rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); if (rc < 0) { pr_err("%s: failed to get platform resources\n", __func__); - kfree(vfe_dev); - return -ENOMEM; + rc = -ENOMEM; + goto probe_fail3; } INIT_LIST_HEAD(&vfe_dev->tasklet_q); @@ -251,9 +521,7 @@ static int vfe_probe(struct platform_device *pdev) mutex_init(&vfe_dev->core_mutex); spin_lock_init(&vfe_dev->tasklet_lock); spin_lock_init(&vfe_dev->shared_data_lock); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spin_lock_init(&vfe_dev->sof_lock); -#endif + spin_lock_init(&req_history_lock); media_entity_init(&vfe_dev->subdev.sd.entity, 0, NULL, 0); vfe_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; vfe_dev->subdev.sd.entity.group_id = MSM_CAMERA_SUBDEV_VFE; @@ -262,8 +530,7 @@ static int vfe_probe(struct platform_device *pdev) rc = msm_sd_register(&vfe_dev->subdev); if (rc != 0) { pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - kfree(vfe_dev); - goto end; + goto probe_fail3; } msm_isp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; @@ -280,13 +547,44 @@ static int vfe_probe(struct platform_device *pdev) &vfe_vb2_ops, &vfe_layout); if (rc < 0) { pr_err("%s: Unable to create buffer manager\n", __func__); - kfree(vfe_dev); - return -EINVAL; + rc = -EINVAL; + goto probe_fail3; } - msm_isp_enable_debugfs(vfe_dev->stats); + /* create secure context banks*/ + if (vfe_dev->hw_info->num_iommu_secure_ctx) { + /*secure vfe layout*/ + struct msm_iova_layout vfe_secure_layout = { + .partitions = &vfe_partition, + .npartitions = 1, + .client_name = "vfe_secure", + .domain_flags = 0, + .is_secure = MSM_IOMMU_DOMAIN_SECURE, + }; + rc = msm_isp_create_secure_domain(vfe_dev->buf_mgr, + &vfe_secure_layout); + if (rc < 0) { + pr_err("%s: fail to create secure domain\n", __func__); + msm_sd_unregister(&vfe_dev->subdev); + rc = -EINVAL; + goto probe_fail3; + } + } + msm_isp_enable_debugfs(vfe_dev, msm_isp_bw_request_history); vfe_dev->buf_mgr->ops->register_ctx(vfe_dev->buf_mgr, - &vfe_dev->iommu_ctx[0], vfe_dev->hw_info->num_iommu_ctx); + &vfe_dev->iommu_ctx[0], &vfe_dev->iommu_secure_ctx[0], + vfe_dev->hw_info->num_iommu_ctx, + vfe_dev->hw_info->num_iommu_secure_ctx); + + vfe_dev->buf_mgr->init_done = 1; vfe_dev->vfe_open_cnt = 0; + return rc; + +probe_fail3: + kfree(vfe_dev->ub_info); +probe_fail2: + kfree(vfe_dev->stats); +probe_fail1: + kfree(vfe_dev); end: return rc; } diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h index aafc62c38895..4a02a901461d 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -19,11 +19,12 @@ #include #include #include -#include +#include #include #include #include #include + #include "msm_buf_mgr.h" #define VFE40_8974V1_VERSION 0x10000018 @@ -33,6 +34,7 @@ #define VFE40_8x26V2_VERSION 0x20010014 #define VFE40_8916_VERSION 0x10030000 #define VFE40_8939_VERSION 0x10040000 +#define VFE32_8909_VERSION 0x30600 #define MAX_IOMMU_CTX 2 #define MAX_NUM_WM 7 @@ -42,15 +44,7 @@ #define MAX_NUM_STATS_COMP_MASK 2 #define MAX_INIT_FRAME_DROP 31 #define ISP_Q2 (1 << 2) - -#define AVTIMER_MSW_PHY_ADDR 0xFE05300C -#define AVTIMER_LSW_PHY_ADDR 0xFE053008 -#define AVTIMER_MSW_PHY_ADDR_8916 0x7706010 -#define AVTIMER_LSW_PHY_ADDR_8916 0x770600C -#define AVTIMER_MODE_CTL_PHY_ADDR_8916 0x7706040 -/*AVTimer h/w is configured to generate 27Mhz ticks*/ -#define AVTIMER_TICK_SCALER_8916 27 -#define AVTIMER_ITERATION_CTR 16 +#define ISP_Q10 (1 << 10) #define VFE_PING_FLAG 0xFFFFFFFF #define VFE_PONG_FLAG 0x0 @@ -59,6 +53,9 @@ #define VFE_CLK_INFO_MAX 16 #define STATS_COMP_BIT_MASK 0xFF0000 +#define MSM_ISP_MIN_AB 11000000 +#define MSM_ISP_MIN_IB 11000000 + struct vfe_device; struct msm_vfe_axi_stream; struct msm_vfe_stats_stream; @@ -85,12 +82,6 @@ enum msm_isp_camif_update_state { DISABLE_CAMIF_IMMEDIATELY }; -enum msm_isp_reset_type { - ISP_RST_HARD, - ISP_RST_SOFT, - ISP_RST_MAX -}; - struct msm_isp_timestamp { /*Monotonic clock for v4l2 buffer*/ struct timeval buf_time; @@ -165,19 +156,25 @@ struct msm_vfe_axi_ops { uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); - long (*halt) (struct vfe_device *vfe_dev, uint32_t blocking); + int (*halt) (struct vfe_device *vfe_dev, uint32_t blocking); + int (*restart) (struct vfe_device *vfe_dev, uint32_t blocking, + uint32_t enable_camif); + void (*update_cgc_override) (struct vfe_device *vfe_dev, + uint8_t wm_idx, uint8_t cgc_override); }; struct msm_vfe_core_ops { void (*reg_update) (struct vfe_device *vfe_dev, uint32_t input_src); - long (*reset_hw) (struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, - uint32_t blocking); + long (*reset_hw) (struct vfe_device *vfe_dev, uint32_t first_start, + uint32_t blocking_call); int (*init_hw) (struct vfe_device *vfe_dev); void (*init_hw_reg) (struct vfe_device *vfe_dev); + void (*clear_status_reg) (struct vfe_device *vfe_dev); void (*release_hw) (struct vfe_device *vfe_dev); - void (*cfg_camif) (struct vfe_device *vfe_dev, + void (*cfg_input_mux) (struct vfe_device *vfe_dev, struct msm_vfe_pix_cfg *pix_cfg); + int (*start_fetch_eng)(struct vfe_device *vfe_dev, + void *arg); void (*update_camif_state) (struct vfe_device *vfe_dev, enum msm_isp_camif_update_state update_state); void (*cfg_rdi_reg) (struct vfe_device *vfe_dev, @@ -192,9 +189,8 @@ struct msm_vfe_core_ops { void (*restore_irq_mask) (struct vfe_device *vfe_dev); void (*get_halt_restart_mask) (uint32_t *irq0_mask, uint32_t *irq1_mask); - void (*init_vbif_counters) (struct vfe_device *vfe_dev); - void (*vbif_clear_counters) (struct vfe_device *vfe_dev); - void (*vbif_read_counters) (struct vfe_device *vfe_dev); + void (*get_rdi_wm_mask)(struct vfe_device *vfe_dev, + uint32_t *rdi_wm_mask); }; struct msm_vfe_stats_ops { int (*get_stats_idx) (enum msm_isp_stats_type stats_type); @@ -228,6 +224,9 @@ struct msm_vfe_stats_ops { uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); + + void (*update_cgc_override) (struct vfe_device *vfe_dev, + uint32_t stats_mask, uint8_t enable); }; struct msm_vfe_ops { @@ -239,6 +238,8 @@ struct msm_vfe_ops { struct msm_vfe_hardware_info { int num_iommu_ctx; + /* secure iommu ctx nums */ + int num_iommu_secure_ctx; int vfe_clk_idx; struct msm_vfe_ops vfe_ops; struct msm_vfe_axi_hardware_info *axi_hw_info; @@ -277,7 +278,7 @@ enum msm_vfe_axi_cfg_update_state { UPDATE_REQUESTED, }; -#define VFE_NO_DROP 0xFFFFFFFF +#define VFE_NO_DROP 0xFFFFFFFF #define VFE_DROP_EVERY_2FRAME 0x55555555 #define VFE_DROP_EVERY_4FRAME 0x11111111 #define VFE_DROP_EVERY_8FRAME 0x01010101 @@ -303,12 +304,13 @@ struct msm_vfe_axi_stream { uint32_t stream_id; uint32_t bufq_handle; uint32_t bufq_scratch_handle; + uint32_t controllable_output; uint32_t stream_handle; uint32_t request_frm_num; uint8_t buf_divert; enum msm_vfe_axi_stream_type stream_type; - uint32_t vt_enable; uint32_t frame_based; + enum msm_vfe_frame_skip_pattern frame_skip_pattern; uint32_t framedrop_period; uint32_t framedrop_pattern; uint32_t num_burst_capture;/*number of frame to capture*/ @@ -327,17 +329,10 @@ struct msm_vfe_axi_stream { uint32_t runtime_init_frame_drop; uint32_t runtime_burst_frame_count;/*number of sof before burst stop*/ uint32_t runtime_num_burst_capture; - uint8_t runtime_framedrop_update; + uint8_t runtime_framedrop_update; + uint8_t runtime_framedrop_update_burst; uint32_t runtime_output_format; - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - -}; - -enum msm_vfe_overflow_state { - NO_OVERFLOW, - OVERFLOW_DETECTED, - HALT_REQUESTED, - RESTART_REQUESTED, + enum msm_stream_memory_input_t memory_input; }; struct msm_vfe_axi_composite_info { @@ -353,17 +348,24 @@ struct msm_vfe_src_info { enum msm_vfe_inputmux input_mux; uint32_t width; long pixel_clock; - uint32_t session_id; uint32_t input_format;/*V4L2 pix format with bayer pattern*/ uint32_t last_updt_frm_id; }; +struct msm_vfe_fetch_engine_info { + uint32_t session_id; + uint32_t stream_id; + uint32_t bufq_handle; + uint32_t buf_idx; + uint8_t is_busy; +}; + enum msm_wm_ub_cfg_type { MSM_WM_UB_CFG_DEFAULT, MSM_WM_UB_EQUAL_SLICING, MSM_WM_UB_CFG_MAX_NUM }; -#define MAX_SESSIONS 5 + struct msm_vfe_axi_shared_data { struct msm_vfe_axi_hardware_info *hw_info; struct msm_vfe_axi_stream stream_info[MAX_NUM_STREAM]; @@ -372,19 +374,18 @@ struct msm_vfe_axi_shared_data { enum msm_wm_ub_cfg_type wm_ub_cfg_policy; uint8_t num_used_wm; uint8_t num_active_stream; + uint8_t num_rdi_stream; + uint8_t num_pix_stream; + uint32_t rdi_wm_mask; struct msm_vfe_axi_composite_info - composite_info[MAX_NUM_COMPOSITE_MASK]; + composite_info[MAX_NUM_COMPOSITE_MASK]; uint8_t num_used_composite_mask; uint32_t stream_update; atomic_t axi_cfg_update; enum msm_isp_camif_update_state pipeline_update; struct msm_vfe_src_info src_info[VFE_SRC_MAX]; uint16_t stream_handle_cnt; - uint16_t current_frame_src_mask[MAX_SESSIONS]; - uint16_t session_frame_src_mask[MAX_SESSIONS]; - unsigned int frame_id[MAX_SESSIONS]; uint32_t event_mask; - uint32_t burst_len; }; struct msm_vfe_stats_hardware_info { @@ -414,6 +415,7 @@ struct msm_vfe_stats_stream { uint32_t framedrop_pattern; uint32_t framedrop_period; uint32_t irq_subsample_pattern; + uint32_t init_stats_frame_drop; uint32_t buffer_offset; struct msm_isp_buffer *buf[2]; @@ -424,10 +426,9 @@ struct msm_vfe_stats_shared_data { struct msm_vfe_stats_stream stream_info[MSM_ISP_STATS_MAX]; uint8_t num_active_stream; atomic_t stats_comp_mask[MAX_NUM_STATS_COMP_MASK]; + uint32_t reg_mask; uint16_t stream_handle_cnt; atomic_t stats_update; - uint32_t stats_mask; - uint32_t stats_burst_len; }; struct msm_vfe_tasklet_queue_cmd { @@ -440,6 +441,13 @@ struct msm_vfe_tasklet_queue_cmd { #define MSM_VFE_TASKLETQ_SIZE 200 +enum msm_vfe_overflow_state { + NO_OVERFLOW, + OVERFLOW_DETECTED, + HALT_REQUESTED, + RESTART_REQUESTED, +}; + struct msm_vfe_error_info { atomic_t overflow_state; uint32_t overflow_recover_irq_mask0; @@ -455,28 +463,76 @@ struct msm_vfe_error_info { }; struct msm_isp_statistics { - int32_t imagemaster0_overflow; - int32_t imagemaster1_overflow; - int32_t imagemaster2_overflow; - int32_t imagemaster3_overflow; - int32_t imagemaster4_overflow; - int32_t imagemaster5_overflow; - int32_t imagemaster6_overflow; - int32_t be_overflow; - int32_t bg_overflow; - int32_t bf_overflow; - int32_t awb_overflow; - int32_t rs_overflow; - int32_t cs_overflow; - int32_t ihist_overflow; - int32_t skinbhist_overflow; -}; - -struct msm_vbif_cntrs { - int previous_write_val; - int vfe_total_iter; - int fb_err_lvl; - int total_vbif_cnt_2; + int64_t imagemaster0_overflow; + int64_t imagemaster1_overflow; + int64_t imagemaster2_overflow; + int64_t imagemaster3_overflow; + int64_t imagemaster4_overflow; + int64_t imagemaster5_overflow; + int64_t imagemaster6_overflow; + int64_t be_overflow; + int64_t bg_overflow; + int64_t bf_overflow; + int64_t awb_overflow; + int64_t rs_overflow; + int64_t cs_overflow; + int64_t ihist_overflow; + int64_t skinbhist_overflow; + int64_t bfscale_overflow; + + int64_t isp_vfe0_active; + int64_t isp_vfe0_ab; + int64_t isp_vfe0_ib; + + int64_t isp_vfe1_active; + int64_t isp_vfe1_ab; + int64_t isp_vfe1_ib; + + int64_t isp_cpp_active; + int64_t isp_cpp_ab; + int64_t isp_cpp_ib; + + int64_t last_overflow_ab; + int64_t last_overflow_ib; + + int64_t vfe_clk_rate; + int64_t cpp_clk_rate; +}; + +enum msm_isp_hw_client { + ISP_VFE0, + ISP_VFE1, + ISP_CPP, + MAX_ISP_CLIENT, +}; + +struct msm_isp_bandwidth_info { + uint32_t active; + uint64_t ab; + uint64_t ib; +}; + +struct msm_isp_bw_req_info { + uint32_t client; + unsigned long long timestamp; + uint64_t total_ab; + uint64_t total_ib; + struct msm_isp_bandwidth_info client_info[MAX_ISP_CLIENT]; +}; + +#define MSM_ISP_MAX_WM 7 +struct msm_isp_ub_info { + enum msm_wm_ub_cfg_type policy; + uint8_t num_wm; + uint32_t wm_ub; + uint32_t data[MSM_ISP_MAX_WM]; + uint64_t addr[MSM_ISP_MAX_WM]; +}; + +struct msm_vfe_hw_init_parms { + const char *entries; + const char *regs; + const char *settings; }; struct vfe_device { @@ -491,6 +547,8 @@ struct vfe_device { void __iomem *vfe_vbif_base; struct device *iommu_ctx[MAX_IOMMU_CTX]; + /*Add secure context banks*/ + struct device *iommu_secure_ctx[MAX_IOMMU_CTX]; struct regulator *fs_vfe; struct clk **vfe_clk; @@ -509,13 +567,11 @@ struct vfe_device { uint8_t taskletq_idx; spinlock_t tasklet_lock; spinlock_t shared_data_lock; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spinlock_t sof_lock; -#endif struct list_head tasklet_q; struct tasklet_struct vfe_tasklet; struct msm_vfe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VFE_TASKLETQ_SIZE]; + tasklet_queue_cmd[MSM_VFE_TASKLETQ_SIZE]; + uint32_t vfe_hw_version; struct msm_vfe_hardware_info *hw_info; struct msm_vfe_axi_shared_data axi_data; @@ -526,16 +582,17 @@ struct vfe_device { int vfe_clk_idx; uint32_t vfe_open_cnt; uint8_t vt_enable; - void __iomem *p_avtimer_msw; - void __iomem *p_avtimer_lsw; - void __iomem *p_avtimer_ctl; - uint8_t avtimer_scaler; uint8_t ignore_error; struct msm_isp_statistics *stats; - struct msm_vbif_cntrs vbif_cntrs; - uint32_t vfe_ub_size; - uint32_t frame_id; - uint32_t eof_event_occur; + struct msm_vfe_fetch_engine_info fetch_engine_info; + uint64_t msm_isp_last_overflow_ab; + uint64_t msm_isp_last_overflow_ib; + uint64_t msm_isp_vfe_clk_rate; + struct msm_isp_ub_info *ub_info; + uint32_t vfe_ub_policy; + uint32_t isp_sof_debug; + uint8_t reset_pending; + uint32_t bus_util_factor; }; #endif diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp32.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp32.c index 55cc514cf8a9..5029fffdb848 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp32.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp32.c @@ -22,8 +22,9 @@ #include "msm.h" #include "msm_camera_io_util.h" -#define VFE32_BURST_LEN 2 +#define VFE32_BURST_LEN 3 #define VFE32_UB_SIZE 1024 +#define VFE32_UB_SIZE_32KB 2048 #define VFE32_EQUAL_SLICE_UB 194 #define VFE32_AXI_SLICE_UB 792 #define VFE32_WM_BASE(idx) (0x4C + 0x18 * idx) @@ -42,18 +43,11 @@ static uint8_t stats_pingpong_offset_map[] = { (VFE32_STATS_BASE(idx) + 0x4 * \ (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) -#define VFE32_CLK_IDX 0 +#define VFE32_CLK_IDX 1 #define MSM_ISP32_TOTAL_WM_UB 792 /*792 double word*/ -static struct msm_cam_clk_info msm_vfe32_1_clk_info[] = { - /*vfe32 clock info for B-family: 8610 */ - {"vfe_clk_src", 266670000}, - {"vfe_clk", -1}, - {"vfe_ahb_clk", -1}, - {"csi_vfe_clk", -1}, - {"bus_clk", -1}, -}; +static struct msm_cam_clk_info msm_vfe32_1_clk_info[VFE_CLK_INFO_MAX]; static struct msm_cam_clk_info msm_vfe32_2_clk_info[] = { /*vfe32 clock info for A-family: 8960 */ @@ -62,6 +56,169 @@ static struct msm_cam_clk_info msm_vfe32_2_clk_info[] = { {"csi_vfe_clk", -1}, }; +static int32_t msm_vfe32_init_qos_parms(struct vfe_device *vfe_dev, + struct msm_vfe_hw_init_parms *qos_parms, + struct msm_vfe_hw_init_parms *ds_parms) +{ + void __iomem *vfebase = vfe_dev->vfe_base; + struct device_node *of_node; + uint32_t *ds_settings = NULL, *ds_regs = NULL, ds_entries = 0; + int32_t i = 0 , rc = 0; + uint32_t *qos_settings = NULL, *qos_regs = NULL, qos_entries = 0; + of_node = vfe_dev->pdev->dev.of_node; + + rc = of_property_read_u32(of_node, qos_parms->entries, + &qos_entries); + if (rc < 0 || !qos_entries) { + pr_err("%s: NO QOS entries found\n", __func__); + } else { + qos_settings = kzalloc(sizeof(uint32_t) * qos_entries, + GFP_KERNEL); + if (!qos_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + qos_regs = kzalloc(sizeof(uint32_t) * qos_entries, + GFP_KERNEL); + if (!qos_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(qos_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, qos_parms->regs, + qos_regs, qos_entries); + if (rc < 0) { + pr_err("%s: NO QOS BUS BDG info\n", __func__); + kfree(qos_settings); + kfree(qos_regs); + } else { + if (qos_parms->settings) { + rc = of_property_read_u32_array(of_node, + qos_parms->settings, + qos_settings, qos_entries); + if (rc < 0) { + pr_err("%s: NO QOS settings\n", + __func__); + kfree(qos_settings); + kfree(qos_regs); + } else { + for (i = 0; i < qos_entries; i++) + msm_camera_io_w(qos_settings[i], + vfebase + qos_regs[i]); + kfree(qos_settings); + kfree(qos_regs); + } + } else { + kfree(qos_settings); + kfree(qos_regs); + } + } + } + rc = of_property_read_u32(of_node, ds_parms->entries, + &ds_entries); + if (rc < 0 || !ds_entries) { + pr_err("%s: NO D/S entries found\n", __func__); + } else { + ds_settings = kzalloc(sizeof(uint32_t) * ds_entries, + GFP_KERNEL); + if (!ds_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + ds_regs = kzalloc(sizeof(uint32_t) * ds_entries, + GFP_KERNEL); + if (!ds_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(ds_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, ds_parms->regs, + ds_regs, ds_entries); + if (rc < 0) { + pr_err("%s: NO D/S register info\n", __func__); + kfree(ds_settings); + kfree(ds_regs); + } else { + if (ds_parms->settings) { + rc = of_property_read_u32_array(of_node, + ds_parms->settings, ds_settings, + ds_entries); + if (rc < 0) { + pr_err("%s: NO D/S settings\n", + __func__); + kfree(ds_settings); + kfree(ds_regs); + } else { + for (i = 0; i < ds_entries; i++) + msm_camera_io_w(ds_settings[i], + vfebase + ds_regs[i]); + kfree(ds_regs); + kfree(ds_settings); + } + } else { + kfree(ds_regs); + kfree(ds_settings); + } + } + } + return 0; +} + +static int32_t msm_vfe32_init_vbif_parms(struct vfe_device *vfe_dev, + struct msm_vfe_hw_init_parms *vbif_parms) +{ + void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; + struct device_node *of_node; + int32_t i = 0 , rc = 0; + uint32_t *vbif_settings = NULL, *vbif_regs = NULL, vbif_entries = 0; + of_node = vfe_dev->pdev->dev.of_node; + + rc = of_property_read_u32(of_node, vbif_parms->entries, + &vbif_entries); + if (rc < 0 || !vbif_entries) { + pr_err("%s: NO VBIF entries found\n", __func__); + } else { + vbif_settings = kzalloc(sizeof(uint32_t) * vbif_entries, + GFP_KERNEL); + if (!vbif_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + vbif_regs = kzalloc(sizeof(uint32_t) * vbif_entries, + GFP_KERNEL); + if (!vbif_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(vbif_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, vbif_parms->regs, + vbif_regs, vbif_entries); + if (rc < 0) { + pr_err("%s: NO VBIF info\n", __func__); + kfree(vbif_settings); + kfree(vbif_regs); + } else { + rc = of_property_read_u32_array(of_node, + vbif_parms->settings, + vbif_settings, vbif_entries); + if (rc < 0) { + pr_err("%s: NO VBIF settings\n", + __func__); + kfree(vbif_settings); + kfree(vbif_regs); + } else { + for (i = 0; i < vbif_entries; i++) + msm_camera_io_w( + vbif_settings[i], + vfe_vbif_base + vbif_regs[i]); + kfree(vbif_settings); + kfree(vbif_regs); + } + } + } + return 0; +} + static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) { int rc = -1; @@ -79,19 +236,26 @@ static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) goto fs_failed; } } + + rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, + &msm_vfe32_1_clk_info[0]); + if (rc < 0) { + pr_err("msm_isp_get_clk_info() failed\n"); + goto fs_failed; + } + if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; + pr_err("%s: Invalid num of clock\n", __func__); + goto fs_failed; } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } + vfe_dev->vfe_clk = + kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, + GFP_KERNEL); + if (!vfe_dev->vfe_clk) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe32_1_clk_info, vfe_dev->vfe_clk, ARRAY_SIZE(msm_vfe32_1_clk_info), 1); if (rc < 0) { @@ -113,6 +277,14 @@ static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) goto vfe_remap_failed; } + vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, + resource_size(vfe_dev->vfe_vbif_mem)); + if (!vfe_dev->vfe_vbif_base) { + rc = -ENOMEM; + pr_err("%s: vfe ioremap failed\n", __func__); + goto vbif_remap_failed; + } + rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, IRQF_TRIGGER_RISING, "vfe", vfe_dev); if (rc < 0) { @@ -122,7 +294,11 @@ static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) return rc; irq_req_failed: + iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; +vbif_remap_failed: iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; vfe_remap_failed: if (vfe_dev->vfe_clk_idx == 1) msm_cam_clk_enable(&vfe_dev->pdev->dev, @@ -135,7 +311,7 @@ vfe_remap_failed: clk_enable_failed: if (vfe_dev->fs_vfe) regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); + kfree(vfe_dev->vfe_clk); fs_failed: msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); bus_scale_register_failed: @@ -146,7 +322,10 @@ static void msm_vfe32_release_hardware(struct vfe_device *vfe_dev) { free_irq(vfe_dev->vfe_irq->start, vfe_dev); tasklet_kill(&vfe_dev->vfe_tasklet); + iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; if (vfe_dev->vfe_clk_idx == 1) msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe32_1_clk_info, vfe_dev->vfe_clk, @@ -162,15 +341,32 @@ static void msm_vfe32_release_hardware(struct vfe_device *vfe_dev) static void msm_vfe32_init_hardware_reg(struct vfe_device *vfe_dev) { + struct msm_vfe_hw_init_parms qos_parms; + struct msm_vfe_hw_init_parms vbif_parms; + struct msm_vfe_hw_init_parms ds_parms; + + qos_parms.entries = "qos-entries"; + qos_parms.regs = "qos-regs"; + qos_parms.settings = "qos-settings"; + vbif_parms.entries = "vbif-entries"; + vbif_parms.regs = "vbif-regs"; + vbif_parms.settings = "vbif-settings"; + ds_parms.entries = "ds-entries"; + ds_parms.regs = "ds-regs"; + ds_parms.settings = "ds-settings"; + + msm_vfe32_init_qos_parms(vfe_dev, &qos_parms, &ds_parms); + msm_vfe32_init_vbif_parms(vfe_dev, &vbif_parms); + /* CGC_OVERRIDE */ msm_camera_io_w(0x07FFFFFF, vfe_dev->vfe_base + 0xC); /* BUS_CFG */ msm_camera_io_w(0x00000009, vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(0x01000025, vfe_dev->vfe_base + 0x1C); + msm_camera_io_w(0x01000021, vfe_dev->vfe_base + 0x1C); msm_camera_io_w_mb(0x1CFFFFFF, vfe_dev->vfe_base + 0x20); msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x24); msm_camera_io_w_mb(0x1FFFFFFF, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x0, vfe_dev->vfe_base+0x6FC); + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x6FC); msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(1)); msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(2)); msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(0)); @@ -178,6 +374,15 @@ static void msm_vfe32_init_hardware_reg(struct vfe_device *vfe_dev) } +static void msm_vfe32_clear_status_reg(struct vfe_device *vfe_dev) +{ + msm_camera_io_w((1 << 23), vfe_dev->vfe_base + 0x1C); + msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x20); + msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x24); + msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x28); + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x18); +} + static void msm_vfe32_process_reset_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1) { @@ -217,8 +422,9 @@ static void msm_vfe32_process_camif_irq(struct vfe_device *vfe_dev, pix_stream_count == 0) { msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, + (1 << VFE_PIX_0)); + msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); } } } @@ -281,6 +487,24 @@ static void msm_vfe32_process_violation_status(struct vfe_device *vfe_dev) pr_err("%s: realign buf cr violation\n", __func__); } +static void msm_vfe32_get_overflow_mask(uint32_t *overflow_mask) +{ + *overflow_mask = 0x003FFF7E; +} + +static void msm_vfe32_get_rdi_wm_mask(struct vfe_device *vfe_dev, + uint32_t *rdi_wm_mask) +{ + *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; +} + +static void msm_vfe32_get_irq_mask(struct vfe_device *vfe_dev, + uint32_t *irq0_mask, uint32_t *irq1_mask) +{ + *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); + *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); +} + static void msm_vfe32_process_error_status(struct vfe_device *vfe_dev) { uint32_t error_status1 = vfe_dev->error_info.error_mask1; @@ -408,20 +632,24 @@ static void msm_vfe32_process_reg_update(struct vfe_device *vfe_dev, } if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, input_src); if (atomic_read(&vfe_dev->stats_data.stats_update)) msm_isp_stats_stream_update(vfe_dev); if (vfe_dev->axi_data.stream_update || atomic_read(&vfe_dev->stats_data.stats_update)) { if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, (1 << VFE_PIX_0)); } } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); + msm_isp_update_framedrop_reg(vfe_dev, input_src); + msm_isp_update_stats_framedrop_reg(vfe_dev); msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); + if ((input_src & (1 << VFE_RAW_0)) || + (input_src & (1 << VFE_RAW_1)) || + (input_src & (1 << VFE_RAW_2))) { + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, input_src); } return; @@ -433,29 +661,17 @@ static void msm_vfe32_reg_update( msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x260); } -static uint32_t msm_vfe32_reset_values[ISP_RST_MAX] = { - 0x3FF, /* ISP_RST_HARD reset everything */ - 0x3EF /* ISP_RST_SOFT same as HARD RESET */ -}; - -static long msm_vfe32_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) +static long msm_vfe32_reset_hardware(struct vfe_device *vfe_dev, + uint32_t first_start, uint32_t blocking) { - - uint32_t rst_val; long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe32_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0x4); + init_completion(&vfe_dev->reset_complete); + msm_camera_io_w_mb(0x3FF, vfe_dev->vfe_base + 0x4); rc = wait_for_completion_timeout( &vfe_dev->reset_complete, msecs_to_jiffies(50)); } else { - msm_camera_io_w_mb(0x3EF, vfe_dev->vfe_base + 0x4); + msm_camera_io_w_mb(0x3FF, vfe_dev->vfe_base + 0x4); } return rc; } @@ -660,6 +876,19 @@ static int32_t msm_vfe32_cfg_io_format(struct vfe_device *vfe_dev, return 0; } +static int msm_vfe32_start_fetch_engine(struct vfe_device *vfe_dev, + void *arg) +{ + return 0; +} + +static void msm_vfe32_cfg_fetch_engine(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ + pr_err("%s: Fetch engine not supported\n", __func__); + return; +} + static void msm_vfe32_cfg_camif(struct vfe_device *vfe_dev, struct msm_vfe_pix_cfg *pix_cfg) { @@ -691,6 +920,23 @@ static void msm_vfe32_cfg_camif(struct vfe_device *vfe_dev, msm_camera_io_w(val, vfe_dev->vfe_base + 0x6FC); } +static void msm_vfe32_cfg_input_mux(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ + switch (pix_cfg->input_mux) { + case CAMIF: + msm_vfe32_cfg_camif(vfe_dev, pix_cfg); + break; + case EXTERNAL_READ: + msm_vfe32_cfg_fetch_engine(vfe_dev, pix_cfg); + break; + default: + pr_err("%s: Unsupported input mux %d\n", + __func__, pix_cfg->input_mux); + } + return; +} + static void msm_vfe32_update_camif_state( struct vfe_device *vfe_dev, enum msm_isp_camif_update_state update_state) @@ -935,7 +1181,7 @@ static void msm_vfe32_cfg_axi_ub_equal_slicing(struct vfe_device *vfe_dev) static void msm_vfe32_cfg_axi_ub(struct vfe_device *vfe_dev) { struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING; + axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) msm_vfe32_cfg_axi_ub_equal_slicing(vfe_dev); else @@ -950,25 +1196,42 @@ static void msm_vfe32_update_ping_pong_addr(struct vfe_device *vfe_dev, VFE32_PING_PONG_BASE(wm_idx, pingpong_status)); } -static long msm_vfe32_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) +static int msm_vfe32_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { - uint32_t halt_mask; - uint32_t axi_busy_flag = false; + uint32_t axi_busy_flag = true; + + /* Keep only halt and restart mask */ + msm_camera_io_w(0x01800000, vfe_dev->vfe_base + 0x20); + /*Clear IRQ Status */ + msm_camera_io_w(0xFE7FFFFF, vfe_dev->vfe_base + 0x28); msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1D8); - if (blocking) { - axi_busy_flag = true; - } while (axi_busy_flag) { if (msm_camera_io_r( vfe_dev->vfe_base + 0x1DC) & 0x1) axi_busy_flag = false; } msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); - halt_mask &= 0xFEFFFFFF; - /* Disable AXI IRQ */ - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x20); + return 0; +} + +static int msm_vfe32_axi_restart(struct vfe_device *vfe_dev, + uint32_t blocking, uint32_t enable_camif) +{ + vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); + + /*Clear IRQ Status */ + msm_camera_io_w(0xFE7FFFFF, vfe_dev->vfe_base + 0x28); + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1D8); + msm_camera_io_w_mb(0xA, vfe_dev->vfe_base + 0x200); + /* Start AXI */ + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x1D8); + vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); + memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); + atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); + if (enable_camif) { + vfe_dev->hw_info->vfe_ops.core_ops. + update_camif_state(vfe_dev, ENABLE_CAMIF); + } return 0; } @@ -1024,6 +1287,21 @@ static int msm_vfe32_stats_check_streams( static void msm_vfe32_stats_cfg_comp_mask(struct vfe_device *vfe_dev, uint32_t stats_mask, uint8_t enable) { + uint32_t i = 0; + atomic_t *stats_comp; + struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; + stats_mask = stats_mask & 0x7F; + + for (i = 0; + i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { + stats_comp = &stats_data->stats_comp_mask[i]; + if (enable) + atomic_add(stats_mask, stats_comp); + else + atomic_sub(stats_mask, stats_comp); + ISP_DBG("%s: comp_mask: %x\n", + __func__, atomic_read(&stats_data->stats_comp_mask[i])); + } return; } @@ -1075,6 +1353,9 @@ static void msm_vfe32_stats_cfg_ub(struct vfe_device *vfe_dev) 7, /*MSM_ISP_STATS_BHIST*/ }; + if (vfe_dev->vfe_hw_version == VFE32_8909_VERSION) + ub_offset = VFE32_UB_SIZE_32KB; + for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { ub_offset -= ub_size[i]; msm_camera_io_w(ub_offset << 16 | (ub_size[i] - 1), @@ -1136,33 +1417,6 @@ static uint32_t msm_vfe32_stats_get_wm_mask(uint32_t irq_status0, return (irq_status0 >> 13) & 0x7F; } -static void msm_vfe32_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x002FFF7E; -} - -static void msm_vfe32_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x1C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = 0x0; - *irq1_mask = 0x01800000; -} - static uint32_t msm_vfe32_stats_get_comp_mask(uint32_t irq_status0, uint32_t irq_status1) { @@ -1171,9 +1425,7 @@ static uint32_t msm_vfe32_stats_get_comp_mask(uint32_t irq_status0, static uint32_t msm_vfe32_stats_get_frame_id(struct vfe_device *vfe_dev) { - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; + return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; } static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) @@ -1187,6 +1439,15 @@ static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) goto vfe_no_resource; } + vfe_dev->vfe_vbif_mem = platform_get_resource_byname( + vfe_dev->pdev, + IORESOURCE_MEM, "vfe_vbif"); + if (!vfe_dev->vfe_vbif_mem) { + pr_err("%s: no mem resource?\n", __func__); + rc = -ENODEV; + goto vfe_no_resource; + } + vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, IORESOURCE_IRQ, "vfe"); if (!vfe_dev->vfe_irq) { @@ -1207,7 +1468,7 @@ static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) if (!vfe_dev->pdev->dev.of_node) vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe_imgwr"); else - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0"); + vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); if (!vfe_dev->iommu_ctx[0]) { pr_err("%s: no iommux ctx resource?\n", __func__); @@ -1218,7 +1479,7 @@ static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) if (!vfe_dev->pdev->dev.of_node) vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe_misc"); else - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe0"); + vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe"); if (!vfe_dev->iommu_ctx[1]) { pr_err("%s: no iommux ctx resource?\n", __func__); @@ -1237,8 +1498,23 @@ static void msm_vfe32_get_error_mask(uint32_t *error_mask0, *error_mask1 = 0x007FFFFF; } + +static void msm_vfe32_restore_irq_mask(struct vfe_device *vfe_dev) +{ + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, + vfe_dev->vfe_base + 0x1C); + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, + vfe_dev->vfe_base + 0x20); +} + +static void msm_vfe32_get_halt_restart_mask(uint32_t *irq0_mask, + uint32_t *irq1_mask) +{ + *irq1_mask = 0x01800000; +} + struct msm_vfe_axi_hardware_info msm_vfe32_axi_hw_info = { - .num_wm = 5, + .num_wm = 6, .num_comp_mask = 3, .num_rdi = 3, .num_rdi_master = 3, @@ -1254,7 +1530,7 @@ static struct msm_vfe_stats_hardware_info msm_vfe32_stats_hw_info = { 1 << MSM_ISP_STATS_SKIN | 1 << MSM_ISP_STATS_BHIST, .stats_ping_pong_offset = stats_pingpong_offset_map, .num_stats_type = VFE32_NUM_STATS_TYPE, - .num_stats_comp_mask = 0, + .num_stats_comp_mask = 1, }; static struct v4l2_subdev_core_ops msm_vfe32_subdev_core_ops = { @@ -1274,6 +1550,7 @@ static struct v4l2_subdev_internal_ops msm_vfe32_internal_ops = { struct msm_vfe_hardware_info vfe32_hw_info = { .num_iommu_ctx = 2, + .num_iommu_secure_ctx = 0, .vfe_clk_idx = VFE32_CLK_IDX, .vfe_ops = { .irq_ops = { @@ -1307,19 +1584,23 @@ struct msm_vfe_hardware_info vfe32_hw_info = { .get_wm_mask = msm_vfe32_get_wm_mask, .get_pingpong_status = msm_vfe32_get_pingpong_status, .halt = msm_vfe32_axi_halt, + .restart = msm_vfe32_axi_restart, }, .core_ops = { .reg_update = msm_vfe32_reg_update, - .cfg_camif = msm_vfe32_cfg_camif, + .cfg_input_mux = msm_vfe32_cfg_input_mux, .update_camif_state = msm_vfe32_update_camif_state, + .start_fetch_eng = msm_vfe32_start_fetch_engine, .cfg_rdi_reg = msm_vfe32_cfg_rdi_reg, .reset_hw = msm_vfe32_reset_hardware, .init_hw = msm_vfe32_init_hardware, .init_hw_reg = msm_vfe32_init_hardware_reg, + .clear_status_reg = msm_vfe32_clear_status_reg, .release_hw = msm_vfe32_release_hardware, .get_platform_data = msm_vfe32_get_platform_data, .get_error_mask = msm_vfe32_get_error_mask, .get_overflow_mask = msm_vfe32_get_overflow_mask, + .get_rdi_wm_mask = msm_vfe32_get_rdi_wm_mask, .get_irq_mask = msm_vfe32_get_irq_mask, .restore_irq_mask = msm_vfe32_restore_irq_mask, .get_halt_restart_mask = diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp40.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp40.c index 418152f3b8c2..9de8e89113b0 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp40.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp40.c @@ -22,17 +22,11 @@ #include "msm.h" #include "msm_camera_io_util.h" -/*#define CONFIG_MSM_ISP_DBG*/ #undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) #define VFE40_BURST_LEN 1 -#define VFE40_BURST_LEN_8916_VERSION 2 -#define VFE40_BURST_LEN_8939_VERSION 3 +#define VFE40_BURST_LEN_8916_VERSION 3 #define VFE40_STATS_BURST_LEN 1 #define VFE40_STATS_BURST_LEN_8916_VERSION 2 #define VFE40_UB_SIZE 1536 /* 1536 * 128 bits = 24KB */ @@ -44,10 +38,6 @@ #define VFE40_TOTAL_WM_UB 1144 /* UB_SIZE - STATS SIZE */ #define VFE40_TOTAL_WM_UB_8916 1656 #define VFE40_TOTAL_WM_UB_8939 2680 - - -/* STATS_SIZE (BE + BG + BF+ RS + CS + IHIST + BHIST ) = 392 */ -#define VFE40_STATS_SIZE 392 #define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx) #define VFE40_RDI_BASE(idx) (0x2E8 + 0x4 * idx) #define VFE40_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) @@ -55,6 +45,15 @@ #define VFE40_PING_PONG_BASE(wm, ping_pong) \ (VFE40_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) +#define STATS_IDX_BE 0 +#define STATS_IDX_BG 1 +#define STATS_IDX_BF 2 +#define STATS_IDX_AWB 3 +#define STATS_IDX_RS 4 +#define STATS_IDX_CS 5 +#define STATS_IDX_IHIST 6 +#define STATS_IDX_BHIST 7 + static uint8_t stats_pingpong_offset_map[] = { 8, 9, 10, 11, 12, 13, 14, 15}; @@ -65,8 +64,6 @@ static uint8_t stats_pingpong_offset_map[] = { (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) #define VFE40_VBIF_CLKON 0x4 -#define VFE40_VBIF_FIXED_SORT_EN 0x30 -#define VFE40_VBIF_FIXED_SORT_SEL0 0x34 #define VFE40_VBIF_IN_RD_LIM_CONF0 0xB0 #define VFE40_VBIF_IN_RD_LIM_CONF1 0xB4 #define VFE40_VBIF_IN_RD_LIM_CONF2 0xB8 @@ -94,199 +91,169 @@ static uint8_t stats_pingpong_offset_map[] = { #define VFE40_BUS_BDG_QOS_CFG_7 0x000002E0 #define VFE40_CLK_IDX 1 -/*Iterations for averaging outstanding writes counts*/ -#define MAX_NUM_FRAMES 10 -/* Maximum outstanding writes to avoid image master bus -overflows*/ -#define MAX_OUT_WRITES_LEVEL 4000000 - static struct msm_cam_clk_info msm_vfe40_clk_info[VFE_CLK_INFO_MAX]; -static void msm_vfe40_init_qos_parms(struct vfe_device *vfe_dev) +static int32_t msm_vfe40_init_qos_parms(struct vfe_device *vfe_dev, + struct msm_vfe_hw_init_parms *qos_parms, + struct msm_vfe_hw_init_parms *ds_parms) { void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE40_8974V1_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26V2_VERSION) { - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0002AAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8974V2_VERSION || - vfe_dev->vfe_hw_version == VFE40_8974V3_VERSION) { - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION || - vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_7); + struct device_node *of_node; + uint32_t *ds_settings = NULL, *ds_regs = NULL, ds_entries = 0; + int32_t i = 0 , rc = 0; + uint32_t *qos_settings = NULL, *qos_regs = NULL, qos_entries = 0; + of_node = vfe_dev->pdev->dev.of_node; + + rc = of_property_read_u32(of_node, qos_parms->entries, + &qos_entries); + if (rc < 0 || !qos_entries) { + pr_err("%s: NO QOS entries found\n", __func__); } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); + qos_settings = kzalloc(sizeof(uint32_t) * qos_entries, + GFP_KERNEL); + if (!qos_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + qos_regs = kzalloc(sizeof(uint32_t) * qos_entries, + GFP_KERNEL); + if (!qos_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(qos_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, qos_parms->regs, + qos_regs, qos_entries); + if (rc < 0) { + pr_err("%s: NO QOS BUS BDG info\n", __func__); + kfree(qos_settings); + kfree(qos_regs); + } else { + if (qos_parms->settings) { + rc = of_property_read_u32_array(of_node, + qos_parms->settings, + qos_settings, qos_entries); + if (rc < 0) { + pr_err("%s: NO QOS settings\n", + __func__); + kfree(qos_settings); + kfree(qos_regs); + } else { + for (i = 0; i < qos_entries; i++) + msm_camera_io_w(qos_settings[i], + vfebase + qos_regs[i]); + kfree(qos_settings); + kfree(qos_regs); + } + } else { + kfree(qos_settings); + kfree(qos_regs); + } + } } + rc = of_property_read_u32(of_node, ds_parms->entries, + &ds_entries); + if (rc < 0 || !ds_entries) { + pr_err("%s: NO D/S entries found\n", __func__); + } else { + ds_settings = kzalloc(sizeof(uint32_t) * ds_entries, + GFP_KERNEL); + if (!ds_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + ds_regs = kzalloc(sizeof(uint32_t) * ds_entries, + GFP_KERNEL); + if (!ds_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(ds_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, ds_parms->regs, + ds_regs, ds_entries); + if (rc < 0) { + pr_err("%s: NO D/S register info\n", __func__); + kfree(ds_settings); + kfree(ds_regs); + } else { + if (ds_parms->settings) { + rc = of_property_read_u32_array(of_node, + ds_parms->settings, ds_settings, + ds_entries); + if (rc < 0) { + pr_err("%s: NO D/S settings\n", + __func__); + kfree(ds_settings); + kfree(ds_regs); + } else { + for (i = 0; i < ds_entries; i++) + msm_camera_io_w(ds_settings[i], + vfebase + ds_regs[i]); + kfree(ds_regs); + kfree(ds_settings); + } + } else { + kfree(ds_regs); + kfree(ds_settings); + } + } + } + return 0; } -static void msm_vfe40_init_vbif_parms_8974_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10010110, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_OCMEM_OUT_MAX_BURST); - msm_camera_io_w(0x00000030, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000001, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8974_v2(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8x26(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x000000FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x00FF00FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - return; -} - -static void msm_vfe40_init_vbif_parms_8939(struct vfe_device *vfe_dev) +static int32_t msm_vfe40_init_vbif_parms(struct vfe_device *vfe_dev, + struct msm_vfe_hw_init_parms *vbif_parms) { void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x00000fff, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_EN); - msm_camera_io_w(0x00555000, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_SEL0); - return; -} - -static void msm_vfe40_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8974V1_VERSION: - msm_vfe40_init_vbif_parms_8974_v1(vfe_dev); - break; - case VFE40_8974V2_VERSION: - case VFE40_8974V3_VERSION: - msm_vfe40_init_vbif_parms_8974_v2(vfe_dev); - break; - case VFE40_8x26_VERSION: - case VFE40_8x26V2_VERSION: - msm_vfe40_init_vbif_parms_8x26(vfe_dev); - break; - case VFE40_8916_VERSION: - /*Reset hardware values are correct vbif values. - So no need to set*/ - break; - case VFE40_8939_VERSION: - msm_vfe40_init_vbif_parms_8939(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); + struct device_node *of_node; + int32_t i = 0 , rc = 0; + uint32_t *vbif_settings = NULL, *vbif_regs = NULL, vbif_entries = 0; + of_node = vfe_dev->pdev->dev.of_node; + + rc = of_property_read_u32(of_node, vbif_parms->entries, + &vbif_entries); + if (rc < 0 || !vbif_entries) { + pr_err("%s: NO VBIF entries found\n", __func__); + } else { + vbif_settings = kzalloc(sizeof(uint32_t) * vbif_entries, + GFP_KERNEL); + if (!vbif_settings) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } + vbif_regs = kzalloc(sizeof(uint32_t) * vbif_entries, + GFP_KERNEL); + if (!vbif_regs) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + kfree(vbif_settings); + return -ENOMEM; + } + rc = of_property_read_u32_array(of_node, vbif_parms->regs, + vbif_regs, vbif_entries); + if (rc < 0) { + pr_err("%s: NO VBIF info\n", __func__); + kfree(vbif_settings); + kfree(vbif_regs); + } else { + rc = of_property_read_u32_array(of_node, + vbif_parms->settings, + vbif_settings, vbif_entries); + if (rc < 0) { + pr_err("%s: NO VBIF settings\n", + __func__); + kfree(vbif_settings); + kfree(vbif_regs); + } else { + for (i = 0; i < vbif_entries; i++) + msm_camera_io_w( + vbif_settings[i], + vfe_vbif_base + vbif_regs[i]); + kfree(vbif_settings); + kfree(vbif_regs); + } + } } - + return 0; } static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) @@ -312,20 +279,18 @@ static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) pr_err("msm_isp_get_clk_info() failed\n"); goto fs_failed; } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; + pr_err("%s: Invalid num of clock\n", __func__); + goto fs_failed; } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } + vfe_dev->vfe_clk = + kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, + GFP_KERNEL); + if (!vfe_dev->vfe_clk) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 1); if (rc < 0) @@ -356,15 +321,17 @@ static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) return rc; irq_req_failed: iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; vbif_remap_failed: iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; vfe_remap_failed: msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 0); clk_enable_failed: if (vfe_dev->fs_vfe) regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); + kfree(vfe_dev->vfe_clk); fs_failed: msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); bus_scale_register_failed: @@ -376,7 +343,9 @@ static void msm_vfe40_release_hardware(struct vfe_device *vfe_dev) free_irq(vfe_dev->vfe_irq->start, vfe_dev); tasklet_kill(&vfe_dev->vfe_tasklet); iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 0); kfree(vfe_dev->vfe_clk); @@ -386,47 +355,85 @@ static void msm_vfe40_release_hardware(struct vfe_device *vfe_dev) static void msm_vfe40_init_hardware_reg(struct vfe_device *vfe_dev) { - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - msm_vfe40_init_qos_parms(vfe_dev); - msm_vfe40_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0x3FFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); + struct msm_vfe_hw_init_parms qos_parms; + struct msm_vfe_hw_init_parms vbif_parms; + struct msm_vfe_hw_init_parms ds_parms; + + qos_parms.entries = "qos-entries"; + qos_parms.regs = "qos-regs"; + qos_parms.settings = "qos-settings"; + vbif_parms.entries = "vbif-entries"; + vbif_parms.regs = "vbif-regs"; + vbif_parms.settings = "vbif-settings"; + ds_parms.entries = "ds-entries"; + ds_parms.regs = "ds-regs"; + ds_parms.settings = "ds-settings"; + + switch (vfe_dev->vfe_hw_version) { + case VFE40_8974V1_VERSION: + case VFE40_8x26_VERSION: + case VFE40_8916_VERSION: + case VFE40_8939_VERSION: + break; + case VFE40_8x26V2_VERSION: + qos_parms.settings = "qos-v2-settings"; + break; + case VFE40_8974V2_VERSION: + case VFE40_8974V3_VERSION: + if (vfe_dev->vfe_hw_version == VFE40_8974V2_VERSION) + qos_parms.settings = "qos-v2-settings"; + else + qos_parms.settings = "qos-v3-settings"; + vbif_parms.entries = "vbif-v2-entries"; + vbif_parms.regs = "vbif-v2-regs"; + vbif_parms.settings = "vbif-v2-settings"; + break; + default: + pr_err("%s: QOS and VBIF is NOT configured for HW Version %x\n", + __func__, vfe_dev->vfe_hw_version); + } + + msm_vfe40_init_qos_parms(vfe_dev, &qos_parms, &ds_parms); + msm_vfe40_init_vbif_parms(vfe_dev, &vbif_parms); /* BUS_CFG */ msm_camera_io_w(0x10000009, vfe_dev->vfe_base + 0x50); - /* Changing the bus config MAL length to 1024 bits */ - msm_camera_io_w(0x90000009, vfe_dev->vfe_base + 0x50); - /* Enabling MAL for each WM*/ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x78); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x9C); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0xC0); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0xE4); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); + msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x28); msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x2C); msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - /* Enable EPOCH IRQ for 100 frame lines*/ - irq_mask |= BIT(3); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x640000, vfe_dev->vfe_base + 0x318); - msm_camera_io_w(vfe_dev->stats_data.stats_mask, + msm_camera_io_w(1, vfe_dev->vfe_base + 0x24); + msm_camera_io_w(0, vfe_dev->vfe_base + 0x30); + msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(1, vfe_dev->vfe_base + 0x24); + msm_camera_io_w(vfe_dev->stats_data.reg_mask, vfe_dev->vfe_base + 0x44); +} +static void msm_vfe40_clear_status_reg(struct vfe_device *vfe_dev) +{ + msm_camera_io_w((1 << 31), vfe_dev->vfe_base + 0x28); + msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2C); + msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); } static void msm_vfe40_process_reset_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1) { - if (irq_status0 & (1 << 31)) + if (irq_status0 & (1 << 31)){ complete(&vfe_dev->reset_complete); + vfe_dev->reset_pending = 0; + } } static void msm_vfe40_process_halt_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1) { - if (irq_status1 & (1 << 8)) + if (irq_status1 & (1 << 8)) { complete(&vfe_dev->halt_complete); + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); + } } static void msm_vfe40_process_epoch_irq(struct vfe_device *vfe_dev, @@ -443,7 +450,7 @@ static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1, struct msm_isp_timestamp *ts) { - int cnt; + int cnt = 0; if (!(irq_status0 & 0xF)) return; @@ -451,24 +458,21 @@ static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev, if (irq_status0 & (1 << 0)) { ISP_DBG("%s: SOF IRQ\n", __func__); cnt = vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count; - if (cnt > 0 && vfe_dev->axi_data.src_info[VFE_PIX_0].pix_stream_count == 0) { + if (cnt > 0 && vfe_dev->axi_data.src_info[VFE_PIX_0]. + pix_stream_count == 0) { msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, + (1 << VFE_PIX_0)); + msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); } } if (irq_status0 & (1 << 1)) ISP_DBG("%s: EOF IRQ\n", __func__); if (irq_status0 & (1 << 2)) ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) { + if (irq_status0 & (1 << 3)) ISP_DBG("%s: EPOCH1 IRQ\n", __func__); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->hw_info->vfe_ops.core_ops. - vbif_read_counters(vfe_dev); - } - } } static void msm_vfe40_process_violation_status( @@ -626,6 +630,11 @@ static void msm_vfe40_process_error_status(struct vfe_device *vfe_dev) pr_err_ratelimited("%s: status skin bhist bus overflow\n", __func__); } + + /* Update ab/ib values for any overflow that may have occured*/ + if ((error_status1 >> 9) & 0x7FFF) { + msm_isp_util_update_last_overflow_ab_ib(vfe_dev); + } } static void msm_vfe40_read_irq_status(struct vfe_device *vfe_dev, @@ -636,7 +645,6 @@ static void msm_vfe40_read_irq_status(struct vfe_device *vfe_dev, /* * Ignore composite 2/3 irq which is used for dual VFE only */ - if (*irq_status0 & 0x6000000) *irq_status0 &= ~(0x18000000); msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); @@ -683,22 +691,27 @@ static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev, } if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, input_src); if (atomic_read(&vfe_dev->stats_data.stats_update)) msm_isp_stats_stream_update(vfe_dev); if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) msm_isp_axi_cfg_update(vfe_dev); if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { + atomic_read(&vfe_dev->stats_data.stats_update) || + atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, (1 << VFE_PIX_0)); } } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); + msm_isp_update_framedrop_reg(vfe_dev, input_src); + msm_isp_update_stats_framedrop_reg(vfe_dev); msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); + if ((input_src & (1 << VFE_RAW_0)) || + (input_src & (1 << VFE_RAW_1)) || + (input_src & (1 << VFE_RAW_2))) { + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, input_src); } return; } @@ -708,30 +721,35 @@ static void msm_vfe40_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); } -static uint32_t msm_vfe40_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - - -static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) +static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev, + uint32_t first_start, uint32_t blocking_call) { - uint32_t rst_val; long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe40_reset_values[reset_type]; init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(1000)); + + if (blocking_call) + vfe_dev->reset_pending = 1; + + if (first_start) { + msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0xC); } else { msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + vfe_dev->hw_info->vfe_ops.axi_ops. + reload_wm(vfe_dev, 0x0003FFFF); + } + + + if (blocking_call) { + rc = wait_for_completion_timeout( + &vfe_dev->reset_complete, msecs_to_jiffies(50)); + if (rc <= 0) { + pr_err("%s:%d failed: reset timeout\n", __func__, + __LINE__); + vfe_dev->reset_pending = 0; + } } return rc; } @@ -742,6 +760,20 @@ static void msm_vfe40_axi_reload_wm( msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); } +static void msm_vfe40_axi_update_cgc_override(struct vfe_device *vfe_dev, + uint8_t wm_idx, uint8_t enable) +{ + uint32_t val; + + /* Change CGC override */ + val = msm_camera_io_r(vfe_dev->vfe_base + 0x974); + if (enable) + val |= (1 << wm_idx); + else + val &= ~(1 << wm_idx); + msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x974); +} + static void msm_vfe40_axi_enable_wm(struct vfe_device *vfe_dev, uint8_t wm_idx, uint8_t enable) { @@ -842,109 +874,6 @@ static void msm_vfe40_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); } -static void msm_vfe40_init_vbif_cntrs(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - - msm_camera_io_w(0x15, vfe_dev->vfe_vbif_base + 0x340); - msm_camera_io_w(0x40, vfe_dev->vfe_vbif_base + 0x344); - msm_camera_io_w(0x78, vfe_dev->vfe_vbif_base + 0x348); - - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - break; - default: - break; - } -} - -void msm_vfe40_vbif_clear_cnt(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - break; - default: - break; - } -} - -void msm_vfe40_vbif_read_cnt_epoch(struct vfe_device *vfe_dev) -{ - uint32_t vbif_cnt_0_l = 0; - uint32_t vbif_cnt_1_l = 0; - uint32_t vbif_cnt_2_l = 0; - struct msm_vbif_cntrs *vbif_cntrs = &vfe_dev->vbif_cntrs; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - - if (vfe_dev->axi_data.frame_id[session_id]%2 > 0) { - /*Disable counters before reading*/ - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x308); - /*Read counters*/ - vbif_cnt_0_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x360); - vbif_cnt_1_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x364); - vbif_cnt_2_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x368); - /*clear counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - /*Enable counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - - vbif_cntrs->total_vbif_cnt_2 += vbif_cnt_2_l; - vbif_cntrs->vfe_total_iter++; - - ISP_DBG("%s: VBIF cntr0 = %d, cntr1 = %d, cntr 2 = %d", - __func__, vbif_cnt_0_l, vbif_cnt_1_l, vbif_cnt_2_l); - - if ((vbif_cnt_2_l > 0) & (vbif_cntrs->previous_write_val > 0)) { - if ((vbif_cnt_2_l > (10 * - vbif_cntrs->previous_write_val)) - | (vbif_cnt_2_l > MAX_OUT_WRITES_LEVEL)) - vbif_cntrs->fb_err_lvl = 3; - else if (vbif_cnt_2_l > (5 * - vbif_cntrs->previous_write_val)) - vbif_cntrs->fb_err_lvl = 2; - else if (vbif_cnt_2_l > (2 * - (vbif_cntrs->previous_write_val))) - vbif_cntrs->fb_err_lvl = 1; - else - vbif_cntrs->fb_err_lvl = 0; - } - if ((vbif_cntrs->previous_write_val == 0) & - (vbif_cnt_2_l > 0)) { - vbif_cntrs->previous_write_val = vbif_cnt_2_l; - } - - if (vbif_cntrs->vfe_total_iter == MAX_NUM_FRAMES) { - vbif_cntrs->previous_write_val = - (vbif_cntrs->total_vbif_cnt_2)/MAX_NUM_FRAMES; - vbif_cntrs->vfe_total_iter = 0; - vbif_cntrs->total_vbif_cnt_2 = 0; - } - } -} - static void msm_vfe40_cfg_framedrop(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info) { @@ -1041,6 +970,13 @@ static int32_t msm_vfe40_cfg_io_format(struct vfe_device *vfe_dev, } io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); + if ((stream_src < RDI_INTF_0) && + (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == + EXTERNAL_READ)) { + + io_format_reg &= 0xFFC8FFFF; + io_format_reg |= (bpp_reg << 20 | pack_fmt << 16); + } switch (stream_src) { case PIX_ENCODER: case PIX_VIEWFINDER: @@ -1063,12 +999,28 @@ static int32_t msm_vfe40_cfg_io_format(struct vfe_device *vfe_dev, return 0; } +static int msm_vfe40_start_fetch_engine(struct vfe_device *vfe_dev, + void *arg) +{ + return 0; +} + +static void msm_vfe40_cfg_fetch_engine(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ + pr_err("%s: Fetch engine not supported\n", __func__); + return; +} + static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, struct msm_vfe_pix_cfg *pix_cfg) { uint16_t first_pixel, last_pixel, first_line, last_line; struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; + struct msm_vfe_camif_subsample_cfg *subsample_cfg = + &pix_cfg->camif_cfg.subsample_cfg; uint32_t val; + bool bus_sub_en = 0; first_pixel = camif_cfg->first_pixel; last_pixel = camif_cfg->last_pixel; @@ -1097,12 +1049,23 @@ static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, case CAMIF: val = 0x01; msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); + bus_sub_en = ((subsample_cfg->pixel_skip) | + subsample_cfg->line_skip) ? 1:0; + val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); + val &= 0xFFFFFFDF; + val = val | bus_sub_en << 5; + msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); + subsample_cfg->pixel_skip &= 0x0000FFFF; + subsample_cfg->line_skip &= 0x0000FFFF; + msm_camera_io_w((subsample_cfg->line_skip << 16) | + subsample_cfg->pixel_skip, vfe_dev->vfe_base + 0x30C); break; case TESTGEN: val = 0x01; msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); break; case EXTERNAL_READ: + break; default: pr_err("%s: not supported input_mux %d\n", __func__, pix_cfg->input_mux); @@ -1110,6 +1073,23 @@ static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, } } +static void msm_vfe40_cfg_input_mux(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ + switch (pix_cfg->input_mux) { + case CAMIF: + msm_vfe40_cfg_camif(vfe_dev, pix_cfg); + break; + case EXTERNAL_READ: + msm_vfe40_cfg_fetch_engine(vfe_dev, pix_cfg); + break; + default: + pr_err("%s: Unsupported input mux %d\n", + __func__, pix_cfg->input_mux); + } + return; +} + static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, enum msm_isp_camif_update_state update_state) { @@ -1122,7 +1102,7 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); val |= 0xF7; msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x640000, vfe_dev->vfe_base + 0x318); + msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x318); bus_en = ((vfe_dev->axi_data. @@ -1176,10 +1156,9 @@ static void msm_vfe40_axi_cfg_wm_reg( uint32_t burst_len; uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) + if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION || + vfe_dev->vfe_hw_version == VFE40_8939_VERSION) burst_len = VFE40_BURST_LEN_8916_VERSION; - else if(vfe_dev->vfe_hw_version == VFE40_8939_VERSION) - burst_len = VFE40_BURST_LEN_8939_VERSION; else burst_len = VFE40_BURST_LEN; @@ -1333,16 +1312,20 @@ static void msm_vfe40_cfg_axi_ub_equal_default( total_image_size += axi_data->wm_image_size[i]; } } - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) + + if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { + vfe_dev->ub_info->wm_ub = VFE40_TOTAL_WM_UB_8916; total_wm_ub = VFE40_TOTAL_WM_UB_8916; - else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION) + } else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION){ + vfe_dev->ub_info->wm_ub = VFE40_TOTAL_WM_UB_8939; total_wm_ub = VFE40_TOTAL_WM_UB_8939; - else + } else { + vfe_dev->ub_info->wm_ub = VFE40_TOTAL_WM_UB; total_wm_ub = VFE40_TOTAL_WM_UB; - + } + vfe_dev->ub_info->num_wm = axi_data->hw_info->num_wm; prop_size = total_wm_ub - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { if (axi_data->free_wm[i]) { uint64_t delta = 0; @@ -1353,10 +1336,17 @@ static void msm_vfe40_cfg_axi_ub_equal_default( wm_ub_size = axi_data->hw_info->min_wm_ub + delta; msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); + + vfe_dev->ub_info->data[i] = + ub_offset << 16 | (wm_ub_size - 1); + vfe_dev->ub_info->addr[i] = VFE40_WM_BASE(i) + 0x10; ub_offset += wm_ub_size; - } else + } else { msm_camera_io_w(0, vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); + vfe_dev->ub_info->data[i] = 0; + vfe_dev->ub_info->addr[i] = VFE40_WM_BASE(i) + 0x10; + } } } @@ -1365,16 +1355,27 @@ static void msm_vfe40_cfg_axi_ub_equal_slicing( { int i; uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; uint32_t equal_slice_ub; - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) + struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + + if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { + vfe_dev->ub_info->wm_ub = VFE40_EQUAL_SLICE_UB_8916; equal_slice_ub = VFE40_EQUAL_SLICE_UB_8916; - else + } else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION){ + vfe_dev->ub_info->wm_ub = VFE40_EQUAL_SLICE_UB_8939; + equal_slice_ub = VFE40_EQUAL_SLICE_UB_8939; + } else { + vfe_dev->ub_info->wm_ub = VFE40_EQUAL_SLICE_UB; equal_slice_ub = VFE40_EQUAL_SLICE_UB; + } + vfe_dev->ub_info->num_wm = axi_data->hw_info->num_wm; for (i = 0; i < axi_data->hw_info->num_wm; i++) { msm_camera_io_w(ub_offset << 16 | (equal_slice_ub - 1), vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); + vfe_dev->ub_info->data[i] = + ub_offset << 16 | (equal_slice_ub - 1); + vfe_dev->ub_info->addr[i] = VFE40_WM_BASE(i) + 0x10; ub_offset += equal_slice_ub; } } @@ -1382,11 +1383,15 @@ static void msm_vfe40_cfg_axi_ub_equal_slicing( static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev) { struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) + axi_data->wm_ub_cfg_policy = + (enum msm_wm_ub_cfg_type)vfe_dev->vfe_ub_policy; + if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) { + vfe_dev->ub_info->policy = MSM_WM_UB_EQUAL_SLICING; msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev); - else + } else { + vfe_dev->ub_info->policy = MSM_WM_UB_CFG_DEFAULT; msm_vfe40_cfg_axi_ub_equal_default(vfe_dev); + } } static void msm_vfe40_update_ping_pong_addr( @@ -1398,57 +1403,66 @@ static void msm_vfe40_update_ping_pong_addr( VFE40_PING_PONG_BASE(wm_idx, pingpong_status)); } -static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev, +static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { - long rc = 0; - /* Keep only restart mask and halt mask*/ + int rc = 0; + + /* Keep only halt and restart mask */ msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x28); msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x2C); - /* Clear IRQ Status*/ - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); + /*Clear IRQ Status */ + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + /* if any stream is waiting for update, signal complete */ + if (vfe_dev->axi_data.stream_update) { + pr_err("%s: calling complete on stream update\n", __func__); + complete(&vfe_dev->stream_config_complete); + } if (blocking) { - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); + init_completion(&vfe_dev->halt_complete); + /* Halt AXI Bus Bridge */ + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); rc = wait_for_completion_interruptible_timeout( &vfe_dev->halt_complete, msecs_to_jiffies(500)); + } else { + /* Halt AXI Bus Bridge */ + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); } + return rc; } -static uint32_t msm_vfe40_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) +static int msm_vfe40_axi_restart(struct vfe_device *vfe_dev, + uint32_t blocking, uint32_t enable_camif) { - return (irq_status0 >> 8) & 0x7F; -} + vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); + /* Clear IRQ Status */ + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x318); -static void msm_vfe40_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x00FFFE7E; -} + /* Start AXI */ + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); -static void msm_vfe40_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); -} + vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); + memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); + atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); -static void msm_vfe40_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x28); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x2C); + if (enable_camif) { + vfe_dev->hw_info->vfe_ops.core_ops. + update_camif_state(vfe_dev, ENABLE_CAMIF); + } + + return 0; } -static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) +static uint32_t msm_vfe40_get_wm_mask( + uint32_t irq_status0, uint32_t irq_status1) { - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); + return (irq_status0 >> 8) & 0x7F; } static uint32_t msm_vfe40_get_comp_mask( @@ -1497,7 +1511,7 @@ static int msm_vfe40_stats_check_streams( static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, uint32_t stats_mask, uint8_t enable) { - uint32_t reg_mask, comp_stats_mask; + uint32_t comp_stats_mask; uint32_t i = 0; atomic_t *stats_comp; struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; @@ -1516,15 +1530,17 @@ static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); + stats_data->reg_mask = + msm_camera_io_r(vfe_dev->vfe_base + 0x44); + comp_stats_mask = + stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); stats_comp = &stats_data->stats_comp_mask[i]; if (enable) { if (comp_stats_mask) continue; - reg_mask |= (stats_mask << (16 + i*8)); + stats_data->reg_mask |= (stats_mask << (16 + i*8)); atomic_add(stats_mask, stats_comp); } else { /* @@ -1537,14 +1553,13 @@ static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, continue; atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(stats_mask << (16 + i*8)); + stats_data->reg_mask &= ~(stats_mask << (16 + i*8)); } ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, + __func__, stats_data->reg_mask, atomic_read(&stats_data->stats_comp_mask[0]), atomic_read(&stats_data->stats_comp_mask[1])); - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - vfe_dev->stats_data.stats_mask = reg_mask; + msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x44); return; } } @@ -1606,10 +1621,8 @@ static void msm_vfe40_stats_clear_wm_reg( static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) { int i; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t ub_offset = vfe_dev->vfe_ub_size; - uint32_t stats_burst_len = stats_data->stats_burst_len; - + uint32_t ub_offset; + uint32_t stats_burst_len; uint32_t ub_size[VFE40_NUM_STATS_TYPE] = { 64, /*MSM_ISP_STATS_BE*/ 128, /*MSM_ISP_STATS_BG*/ @@ -1621,7 +1634,7 @@ static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) 16, /*MSM_ISP_STATS_BHIST*/ }; - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { + if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION ) { stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION; ub_offset = VFE40_UB_SIZE_8916; } else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { @@ -1640,6 +1653,55 @@ static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) } } +static void msm_vfe40_stats_update_cgc_override(struct vfe_device *vfe_dev, + uint32_t stats_mask, uint8_t enable) +{ + int i; + uint32_t module_cfg, cgc_mask = 0; + + for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { + if ((stats_mask >> i) & 0x1) { + switch (i) { + case STATS_IDX_BE: + cgc_mask |= (1 << 8); + break; + case STATS_IDX_BF: + cgc_mask |= (1 << 10); + break; + case STATS_IDX_BG: + cgc_mask |= (1 << 9); + break; + case STATS_IDX_BHIST: + cgc_mask |= (1 << 15); + break; + case STATS_IDX_AWB: + cgc_mask |= (1 << 11); + break; + case STATS_IDX_RS: + cgc_mask |= (1 << 12); + break; + case STATS_IDX_CS: + cgc_mask |= (1 << 13); + break; + case STATS_IDX_IHIST: + cgc_mask |= (1 << 14); + break; + default: + pr_err("%s: Invalid stats mask\n", __func__); + return; + } + } + } + + /* CGC override */ + module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x974); + if (enable) + module_cfg |= cgc_mask; + else + module_cfg &= ~cgc_mask; + msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x974); +} + static void msm_vfe40_stats_enable_module(struct vfe_device *vfe_dev, uint32_t stats_mask, uint8_t enable) { @@ -1703,9 +1765,7 @@ static uint32_t msm_vfe40_stats_get_comp_mask( static uint32_t msm_vfe40_stats_get_frame_id( struct vfe_device *vfe_dev) { - uint32_t session_id; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; + return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; } static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev) @@ -1751,6 +1811,14 @@ static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev) rc = -ENODEV; goto vfe_no_resource; } + if (vfe_dev->hw_info->num_iommu_secure_ctx) { + vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); + if (!vfe_dev->iommu_secure_ctx[0]) { + pr_err("%s: cannot get secure iommu_ctx\n", __func__); + rc = -ENODEV; + goto vfe_no_resource; + } + } vfe_no_resource: return rc; @@ -1763,6 +1831,41 @@ static void msm_vfe40_get_error_mask( *error_mask1 = 0x00FFFEFF; } +static void msm_vfe40_get_overflow_mask(uint32_t *overflow_mask) +{ + *overflow_mask = 0x00FFFE7E; +} + +static void msm_vfe40_get_rdi_wm_mask(struct vfe_device *vfe_dev, + uint32_t *rdi_wm_mask) +{ + *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; +} + +static void msm_vfe40_get_irq_mask(struct vfe_device *vfe_dev, + uint32_t *irq0_mask, uint32_t *irq1_mask) +{ + *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); + *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); +} + + +static void msm_vfe40_restore_irq_mask(struct vfe_device *vfe_dev) +{ + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, + vfe_dev->vfe_base + 0x28); + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, + vfe_dev->vfe_base + 0x2C); +} + + +static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask, + uint32_t *irq1_mask) +{ + *irq0_mask = BIT(31); + *irq1_mask = BIT(8); +} + static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = { .num_wm = 7, .num_comp_mask = 3, @@ -1799,6 +1902,7 @@ static struct v4l2_subdev_internal_ops msm_vfe40_internal_ops = { struct msm_vfe_hardware_info vfe40_hw_info = { .num_iommu_ctx = 1, + .num_iommu_secure_ctx = 1, .vfe_clk_idx = VFE40_CLK_IDX, .vfe_ops = { .irq_ops = { @@ -1833,27 +1937,30 @@ struct msm_vfe_hardware_info vfe40_hw_info = { .get_wm_mask = msm_vfe40_get_wm_mask, .get_pingpong_status = msm_vfe40_get_pingpong_status, .halt = msm_vfe40_axi_halt, + .restart = msm_vfe40_axi_restart, + .update_cgc_override = + msm_vfe40_axi_update_cgc_override, }, .core_ops = { .reg_update = msm_vfe40_reg_update, - .cfg_camif = msm_vfe40_cfg_camif, + .cfg_input_mux = msm_vfe40_cfg_input_mux, .update_camif_state = msm_vfe40_update_camif_state, + .start_fetch_eng = msm_vfe40_start_fetch_engine, .cfg_rdi_reg = msm_vfe40_cfg_rdi_reg, .reset_hw = msm_vfe40_reset_hardware, .init_hw = msm_vfe40_init_hardware, .init_hw_reg = msm_vfe40_init_hardware_reg, + .clear_status_reg = msm_vfe40_clear_status_reg, .release_hw = msm_vfe40_release_hardware, .get_platform_data = msm_vfe40_get_platform_data, .get_error_mask = msm_vfe40_get_error_mask, .get_overflow_mask = msm_vfe40_get_overflow_mask, + .get_rdi_wm_mask = msm_vfe40_get_rdi_wm_mask, .get_irq_mask = msm_vfe40_get_irq_mask, .restore_irq_mask = msm_vfe40_restore_irq_mask, .get_halt_restart_mask = msm_vfe40_get_halt_restart_mask, .process_error_status = msm_vfe40_process_error_status, - .init_vbif_counters = msm_vfe40_init_vbif_cntrs, - .vbif_clear_counters = msm_vfe40_vbif_clear_cnt, - .vbif_read_counters = msm_vfe40_vbif_read_cnt_epoch, }, .stats_ops = { .get_stats_idx = msm_vfe40_get_stats_idx, @@ -1871,6 +1978,8 @@ struct msm_vfe_hardware_info vfe40_hw_info = { .get_wm_mask = msm_vfe40_stats_get_wm_mask, .get_frame_id = msm_vfe40_stats_get_frame_id, .get_pingpong_status = msm_vfe40_get_pingpong_status, + .update_cgc_override = + msm_vfe40_stats_update_cgc_override, }, }, .dmi_reg_offset = 0x918, diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp44.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp44.c index a8d8085d9405..ad82df9ff162 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp44.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp44.c @@ -22,13 +22,8 @@ #include "msm.h" #include "msm_camera_io_util.h" -/*#define CONFIG_MSM_ISP_DBG*/ #undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) #define STATS_IDX_BF_SCALE 0 #define STATS_IDX_BE 1 @@ -43,9 +38,10 @@ #define VFE44_8084V1_VERSION 0x4000000A #define VFE44_BURST_LEN 3 +#define VFE44_FETCH_BURST_LEN 3 #define VFE44_STATS_BURST_LEN 2 #define VFE44_UB_SIZE 2048 -#define VFE44_EQUAL_SLICE_UB 228 +#define MSM_ISP44_TOTAL_IMAGE_UB 1528 #define VFE44_WM_BASE(idx) (0x6C + 0x24 * idx) #define VFE44_RDI_BASE(idx) (0x2E8 + 0x4 * idx) #define VFE44_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) @@ -53,6 +49,8 @@ #define VFE44_PING_PONG_BASE(wm, ping_pong) \ (VFE44_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) +#define VFE44_BUS_RD_CGC_OVERRIDE_BIT 16 + static uint8_t stats_pingpong_offset_map[] = { 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -173,20 +171,18 @@ static int msm_vfe44_init_hardware(struct vfe_device *vfe_dev) pr_err("msm_isp_get_clk_info() failed\n"); goto fs_failed; } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; + pr_err("%s: Invalid num of clock\n", __func__); + goto fs_failed; } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } + vfe_dev->vfe_clk = + kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, + GFP_KERNEL); + if (!vfe_dev->vfe_clk) { + pr_err("%s:%d No memory\n", __func__, __LINE__); + return -ENOMEM; + } } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 1); if (rc < 0) @@ -217,8 +213,10 @@ static int msm_vfe44_init_hardware(struct vfe_device *vfe_dev) return rc; irq_req_failed: iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; vbif_remap_failed: iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; vfe_remap_failed: msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 0); @@ -237,7 +235,9 @@ static void msm_vfe44_release_hardware(struct vfe_device *vfe_dev) free_irq(vfe_dev->vfe_irq->start, vfe_dev); tasklet_kill(&vfe_dev->vfe_tasklet); iounmap(vfe_dev->vfe_vbif_base); + vfe_dev->vfe_vbif_base = NULL; iounmap(vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, vfe_dev->vfe_clk, vfe_dev->num_clk, 0); kfree(vfe_dev->vfe_clk); @@ -249,29 +249,41 @@ static void msm_vfe44_init_hardware_reg(struct vfe_device *vfe_dev) { msm_vfe44_init_qos_parms(vfe_dev); msm_vfe44_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0xFBFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); /* BUS_CFG */ msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); + msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x28); msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x2C); msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(vfe_dev->stats_data.reg_mask, + vfe_dev->vfe_base + 0x44); +} + +static void msm_vfe44_clear_status_reg(struct vfe_device *vfe_dev) +{ + msm_camera_io_w(0x80000000, vfe_dev->vfe_base + 0x28); + msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2C); + msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); } static void msm_vfe44_process_reset_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1) { - if (irq_status0 & (1 << 31)) + if (irq_status0 & (1 << 31)) { complete(&vfe_dev->reset_complete); + vfe_dev->reset_pending = 0; + } } static void msm_vfe44_process_halt_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1) { - if (irq_status1 & (1 << 8)) + if (irq_status1 & (1 << 8)) { complete(&vfe_dev->halt_complete); + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); + } } static void msm_vfe44_process_epoch_irq(struct vfe_device *vfe_dev, @@ -283,14 +295,19 @@ static void msm_vfe44_process_epoch_irq(struct vfe_device *vfe_dev, if (irq_status0 & (1 << 2)) msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); } - -static void msm_vfe44_process_camif_irq(struct vfe_device *vfe_dev, +static void msm_vfe44_process_input_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1, struct msm_isp_timestamp *ts) { - if (!(irq_status0 & 0xF)) + if (!(irq_status0 & 0x100000F)) return; + if (irq_status0 & (1 << 24)) { + ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__); + msm_isp_fetch_engine_done_notify(vfe_dev, + &vfe_dev->fetch_engine_info); + } + if (irq_status0 & (1 << 0)) { ISP_DBG("%s: SOF IRQ\n", __func__); if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 @@ -298,8 +315,9 @@ static void msm_vfe44_process_camif_irq(struct vfe_device *vfe_dev, pix_stream_count == 0) { msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, + (1 << VFE_PIX_0)); + msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); } } if (irq_status0 & (1 << 1)) @@ -317,65 +335,65 @@ static void msm_vfe44_process_violation_status( if (!violation_status) return; - if (violation_status == 0) + if (violation_status & (1 << 0)) pr_err("%s: camif violation\n", __func__); - if (violation_status == 1) + if (violation_status & (1 << 1)) pr_err("%s: black violation\n", __func__); - if (violation_status == 2) + if (violation_status & (1 << 2)) pr_err("%s: rolloff violation\n", __func__); - if (violation_status == 3) + if (violation_status & (1 << 3)) pr_err("%s: demux violation\n", __func__); - if (violation_status == 4) + if (violation_status & (1 << 4)) pr_err("%s: demosaic violation\n", __func__); - if (violation_status == 5) + if (violation_status & (1 << 5)) pr_err("%s: wb violation\n", __func__); - if (violation_status == 6) + if (violation_status & (1 << 6)) pr_err("%s: clf violation\n", __func__); - if (violation_status == 7) + if (violation_status & (1 << 7)) pr_err("%s: color correct violation\n", __func__); - if (violation_status == 8) + if (violation_status & (1 << 8)) pr_err("%s: rgb lut violation\n", __func__); - if (violation_status == 9) + if (violation_status & (1 << 9)) pr_err("%s: la violation\n", __func__); - if (violation_status == 10) + if (violation_status & (1 << 10)) pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status == 11) + if (violation_status & (1 << 11)) pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status == 12) + if (violation_status & (1 << 12)) pr_err("%s: skin enhance violation\n", __func__); - if (violation_status == 13) + if (violation_status & (1 << 13)) pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status == 14) + if (violation_status & (1 << 14)) pr_err("%s: color tranform view violation\n", __func__); - if (violation_status == 15) + if (violation_status & (1 << 15)) pr_err("%s: scale enc y violation\n", __func__); - if (violation_status == 16) + if (violation_status & (1 << 16)) pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status == 17) + if (violation_status & (1 << 17)) pr_err("%s: scale view y violation\n", __func__); - if (violation_status == 18) + if (violation_status & (1 << 18)) pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status == 21) + if (violation_status & (1 << 21)) pr_err("%s: crop enc y violation\n", __func__); - if (violation_status == 22) + if (violation_status & (1 << 22)) pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status == 23) + if (violation_status & (1 << 23)) pr_err("%s: crop view y violation\n", __func__); - if (violation_status == 24) + if (violation_status & (1 << 24)) pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status == 25) + if (violation_status & (1 << 25)) pr_err("%s: realign buf y violation\n", __func__); - if (violation_status == 26) + if (violation_status & (1 << 26)) pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status == 27) + if (violation_status & (1 << 27)) pr_err("%s: realign buf cr violation\n", __func__); - if (violation_status == 28) + if (violation_status & (1 << 28)) pr_err("%s: ltm violation\n", __func__); - if (violation_status == 29) + if (violation_status & (1 << 29)) pr_err("%s: ltm cov violation\n", __func__); - if (violation_status == 30) + if (violation_status & (1 << 30)) pr_err("%s: abf violation\n", __func__); - if (violation_status == 31) + if (violation_status & (1 << 31)) pr_err("%s: bpc violation\n", __func__); } @@ -401,38 +419,70 @@ static void msm_vfe44_process_error_status(struct vfe_device *vfe_dev) pr_err("%s: violation\n", __func__); msm_vfe44_process_violation_status(vfe_dev); } - if (error_status1 & (1 << 9)) + if (error_status1 & (1 << 9)) { + vfe_dev->stats->imagemaster0_overflow++; pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) + } + if (error_status1 & (1 << 10)) { + vfe_dev->stats->imagemaster1_overflow++; pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) + } + if (error_status1 & (1 << 11)) { + vfe_dev->stats->imagemaster2_overflow++; pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) + } + if (error_status1 & (1 << 12)) { + vfe_dev->stats->imagemaster3_overflow++; pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) + } + if (error_status1 & (1 << 13)) { + vfe_dev->stats->imagemaster4_overflow++; pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) + } + if (error_status1 & (1 << 14)) { + vfe_dev->stats->imagemaster5_overflow++; pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) + } + if (error_status1 & (1 << 15)) { + vfe_dev->stats->imagemaster6_overflow++; pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) + } + if (error_status1 & (1 << 16)) { + vfe_dev->stats->be_overflow++; pr_err("%s: status be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) + } + if (error_status1 & (1 << 17)) { + vfe_dev->stats->bg_overflow++; pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) + } + if (error_status1 & (1 << 18)) { + vfe_dev->stats->bf_overflow++; pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) + } + if (error_status1 & (1 << 19)) { + vfe_dev->stats->awb_overflow++; pr_err("%s: status awb bus overflow\n", __func__); - if (error_status1 & (1 << 20)) + } + if (error_status1 & (1 << 20)) { + vfe_dev->stats->rs_overflow++; pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) + } + if (error_status1 & (1 << 21)) { + vfe_dev->stats->cs_overflow++; pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) + } + if (error_status1 & (1 << 22)) { + vfe_dev->stats->ihist_overflow++; pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) + } + if (error_status1 & (1 << 23)) { + vfe_dev->stats->skinbhist_overflow++; pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) + } + if (error_status1 & (1 << 24)) { + vfe_dev->stats->bfscale_overflow++; pr_err("%s: status bf scale bus overflow\n", __func__); + } } static void msm_vfe44_read_irq_status(struct vfe_device *vfe_dev, @@ -484,54 +534,66 @@ static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev, } if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); + msm_isp_axi_stream_update(vfe_dev, input_src); if (atomic_read(&vfe_dev->stats_data.stats_update)) msm_isp_stats_stream_update(vfe_dev); if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) msm_isp_axi_cfg_update(vfe_dev); if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { + atomic_read(&vfe_dev->stats_data.stats_update) || + atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, (1 << VFE_PIX_0)); } } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); + msm_isp_update_framedrop_reg(vfe_dev, input_src); + msm_isp_update_stats_framedrop_reg(vfe_dev); msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); + if ((input_src & (1 << VFE_RAW_0)) || + (input_src & (1 << VFE_RAW_1)) || + (input_src & (1 << VFE_RAW_2))) { + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, input_src); } return; } + static void msm_vfe44_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) { msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); } -static uint32_t msm_vfe44_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - static long msm_vfe44_reset_hardware(struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, uint32_t blocking) + uint32_t first_start, uint32_t blocking_call) { - uint32_t rst_val; long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe44_reset_values[reset_type]; init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); + + if (blocking_call) + vfe_dev->reset_pending = 1; + + if (first_start) { + msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0xC); } else { msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + vfe_dev->hw_info->vfe_ops.axi_ops. + reload_wm(vfe_dev, 0x0001FFFF); } + + if (blocking_call) { + rc = wait_for_completion_timeout( + &vfe_dev->reset_complete, msecs_to_jiffies(50)); + if (rc <= 0) { + pr_err("%s:%d failed: reset timeout\n", __func__, + __LINE__); + vfe_dev->reset_pending = 0; + } + } + return rc; } @@ -554,6 +616,20 @@ static void msm_vfe44_axi_enable_wm(struct vfe_device *vfe_dev, vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); } +static void msm_vfe44_axi_update_cgc_override(struct vfe_device *vfe_dev, + uint8_t wm_idx, uint8_t cgc_override) +{ + uint32_t val = 0; + + /* Change CGC override */ + val = msm_camera_io_r(vfe_dev->vfe_base + 0x974); + if (cgc_override) + val |= (1 << wm_idx); + else + val &= ~(1 << wm_idx); + msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x974); +} + static void msm_vfe44_axi_cfg_comp_mask(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info) { @@ -645,63 +721,106 @@ static void msm_vfe44_clear_framedrop(struct vfe_device *vfe_dev, VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); } -static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) +static int32_t msm_vfe44_convert_bpp_to_reg(int32_t bpp, uint32_t *bpp_reg) { - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - + int rc = 0; switch (bpp) { case 8: - bpp_reg = 0; + *bpp_reg = 0; break; case 10: - bpp_reg = 1 << 0; + *bpp_reg = 1 << 0; break; case 12: - bpp_reg = 1 << 1; + *bpp_reg = 1 << 1; break; default: pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); return -EINVAL; } - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } + return rc; +} + +static int32_t msm_vfe44_convert_io_fmt_to_reg( + enum msm_isp_pack_fmt pack_format, uint32_t *pack_reg) +{ + int rc = 0; + + switch (pack_format) { + case QCOM: + *pack_reg = 0x0; + break; + case MIPI: + *pack_reg = 0x1; + break; + case DPCM6: + *pack_reg = 0x2; + break; + case DPCM8: + *pack_reg = 0x3; + break; + case PLAIN8: + *pack_reg = 0x4; + break; + case PLAIN16: + *pack_reg = 0x5; + break; + default: + pr_err("%s: invalid pack fmt %d!\n", __func__, pack_format); + return -EINVAL; } + return rc; +} + +static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, + enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) +{ + int rc = 0; + int bpp = 0, read_bpp = 0; + enum msm_isp_pack_fmt pack_fmt = 0, read_pack_fmt = 0; + uint32_t bpp_reg = 0, pack_reg = 0; + uint32_t read_bpp_reg = 0, read_pack_reg = 0; + uint32_t io_format_reg = 0; /*io format register bit*/ + io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); + + /*input config*/ + if ((stream_src < RDI_INTF_0) && + (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == + EXTERNAL_READ)) { + read_bpp = msm_isp_get_bit_per_pixel( + vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); + rc = msm_vfe44_convert_bpp_to_reg(read_bpp, &read_bpp_reg); + if (rc < 0) { + pr_err("%s: convert_bpp_to_reg err! in_bpp %d rc %d\n", + __func__, read_bpp, rc); + return rc; + } + + read_pack_fmt = msm_isp_get_pack_format( + vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); + rc = msm_vfe44_convert_io_fmt_to_reg( + read_pack_fmt, &read_pack_reg); + if (rc < 0) { + pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", + __func__, rc); + return rc; + } + /*use input format(v4l2_pix_fmt) to get pack format*/ + io_format_reg &= 0xFFC8FFFF; + io_format_reg |= (read_bpp_reg << 20 | read_pack_reg << 16); + } + + bpp = msm_isp_get_bit_per_pixel(io_format); + rc = msm_vfe44_convert_bpp_to_reg(bpp, &bpp_reg); + if (rc < 0) { + pr_err("%s: convert_bpp_to_reg err! bpp %d rc = %d\n", + __func__, bpp, rc); + return rc; + } + switch (stream_src) { case PIX_ENCODER: case PIX_VIEWFINDER: @@ -710,6 +829,14 @@ static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, io_format_reg |= bpp_reg << 12; break; case IDEAL_RAW: + /*use output format(v4l2_pix_fmt) to get pack format*/ + pack_fmt = msm_isp_get_pack_format(io_format); + rc = msm_vfe44_convert_io_fmt_to_reg(pack_fmt, &pack_reg); + if (rc < 0) { + pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", + __func__, rc); + return rc; + } io_format_reg &= 0xFFFFFFC8; io_format_reg |= bpp_reg << 4 | pack_reg; break; @@ -720,10 +847,112 @@ static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, pr_err("%s: Invalid stream source\n", __func__); return -EINVAL; } + msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); return 0; } +static int msm_vfe44_fetch_engine_start(struct vfe_device *vfe_dev, + void *arg) +{ + int rc = 0; + uint32_t bufq_handle; + struct msm_isp_buffer *buf = NULL; + struct msm_vfe_fetch_eng_start *fe_cfg = arg; + + if (vfe_dev->fetch_engine_info.is_busy == 1) { + pr_err("%s: fetch engine busy\n", __func__); + return -EINVAL; + } + + /* There is other option of passing buffer address from user, + in such case, driver needs to map the buffer and use it*/ + bufq_handle = vfe_dev->buf_mgr->ops->get_bufq_handle( + vfe_dev->buf_mgr, fe_cfg->session_id, fe_cfg->stream_id); + vfe_dev->fetch_engine_info.bufq_handle = bufq_handle; + vfe_dev->fetch_engine_info.session_id = fe_cfg->session_id; + vfe_dev->fetch_engine_info.stream_id = fe_cfg->stream_id; + + rc = vfe_dev->buf_mgr->ops->get_buf_by_index( + vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf); + if (rc < 0) { + pr_err("%s: No fetch buffer\n", __func__); + return -EINVAL; + } + vfe_dev->fetch_engine_info.buf_idx = fe_cfg->buf_idx; + vfe_dev->fetch_engine_info.is_busy = 1; + + msm_camera_io_w(buf->mapped_info[0].paddr, vfe_dev->vfe_base + 0x228); + + msm_camera_io_w_mb(0x10000, vfe_dev->vfe_base + 0x4C); + msm_camera_io_w_mb(0x20000, vfe_dev->vfe_base + 0x4C); + + ISP_DBG("%s: Fetch Engine ready\n", __func__); + buf->state = MSM_ISP_BUFFER_STATE_DIVERTED; + + return 0; +} + +static void msm_vfe44_cfg_fetch_engine(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ + uint32_t x_size_word; + struct msm_vfe_fetch_engine_cfg *fe_cfg = NULL; + uint32_t temp = 0; + + if (pix_cfg->input_mux == EXTERNAL_READ) { + fe_cfg = &pix_cfg->fetch_engine_cfg; + pr_debug("%s: fetch_dbg wd x ht buf = %d x %d, fe = %d x %d\n", + __func__, fe_cfg->buf_width, fe_cfg->buf_height, + fe_cfg->fetch_width, fe_cfg->fetch_height); + + vfe_dev->hw_info->vfe_ops.axi_ops.update_cgc_override(vfe_dev, + VFE44_BUS_RD_CGC_OVERRIDE_BIT, 1); + + temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50); + temp &= 0xFFFFFFFD; + temp |= (1 << 1); + msm_camera_io_w(temp, vfe_dev->vfe_base + 0x50); + + temp = msm_camera_io_r(vfe_dev->vfe_base + 0x28); + temp &= 0xFEFFFFFF; + temp |= (1 << 24); + msm_camera_io_w(temp, vfe_dev->vfe_base + 0x28); + msm_camera_io_w((fe_cfg->fetch_height - 1) & 0xFFF, + vfe_dev->vfe_base + 0x238); + + x_size_word = msm_isp_cal_word_per_line( + vfe_dev->axi_data.src_info[VFE_PIX_0].input_format, + fe_cfg->fetch_width); + msm_camera_io_w((x_size_word - 1) << 16, + vfe_dev->vfe_base + 0x23C); + + msm_camera_io_w(x_size_word << 16 | + (fe_cfg->buf_height - 1) << 4 | VFE44_FETCH_BURST_LEN, + vfe_dev->vfe_base + 0x240); + + msm_camera_io_w(0 << 28 | 2 << 25 | + ((fe_cfg->buf_width - 1) & 0x1FFF) << 12 | + ((fe_cfg->buf_height - 1) & 0xFFF), vfe_dev->vfe_base + 0x244); + + /* need to use formulae to calculate MAIN_UNPACK_PATTERN*/ + msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x248); + msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x264); + + temp = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); + temp |= 2 << 16 | pix_cfg->pixel_pattern; + msm_camera_io_w(temp, vfe_dev->vfe_base + 0x1C); + + vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); + } else { + pr_err("%s: Invalid mux configuration - mux: %d", __func__, + pix_cfg->input_mux); + return; + } + + return; +} + static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, struct msm_vfe_pix_cfg *pix_cfg) { @@ -731,14 +960,31 @@ static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; uint32_t val; + msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, + vfe_dev->vfe_base + 0x1C); + + switch (pix_cfg->input_mux) { + case CAMIF: + val = 0x01; + msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); + break; + case TESTGEN: + val = 0x01; + msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); + break; + case EXTERNAL_READ: + return; + default: + pr_err("%s: not supported input_mux %d\n", + __func__, pix_cfg->input_mux); + break; + } + first_pixel = camif_cfg->first_pixel; last_pixel = camif_cfg->last_pixel; first_line = camif_cfg->first_line; last_line = camif_cfg->last_line; - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); @@ -754,21 +1000,23 @@ static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, val |= camif_cfg->camif_input; msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); +} + +static void msm_vfe44_cfg_input_mux(struct vfe_device *vfe_dev, + struct msm_vfe_pix_cfg *pix_cfg) +{ switch (pix_cfg->input_mux) { case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); + msm_vfe44_cfg_camif(vfe_dev, pix_cfg); break; case EXTERNAL_READ: + msm_vfe44_cfg_fetch_engine(vfe_dev, pix_cfg); + break; default: - pr_err("%s: not supported input_mux %d\n", + pr_err("%s: Unsupported input mux %d\n", __func__, pix_cfg->input_mux); - break; } + return; } static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, @@ -776,10 +1024,10 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, { uint32_t val; bool bus_en, vfe_en; + if (update_state == NO_UPDATE) return; - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); if (update_state == ENABLE_CAMIF) { val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); val |= 0xF5; @@ -795,13 +1043,14 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, val &= 0xFFFFFF3F; val = val | bus_en << 7 | vfe_en << 6; msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); + msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x2F4); msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; } else if (update_state == DISABLE_CAMIF) { msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x2, vfe_dev->vfe_base + 0x2F4); + msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x2F4); vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; } } @@ -964,8 +1213,6 @@ static void msm_vfe44_axi_clear_wm_xbar_reg( vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); } -#define MSM_ISP44_TOTAL_WM_UB 1203 - static void msm_vfe44_cfg_axi_ub_equal_default( struct vfe_device *vfe_dev) { @@ -977,22 +1224,22 @@ static void msm_vfe44_cfg_axi_ub_equal_default( uint8_t num_used_wms = 0; uint32_t prop_size = 0; uint32_t wm_ub_size; - uint32_t delta; - + uint64_t delta; for (i = 0; i < axi_data->hw_info->num_wm; i++) { if (axi_data->free_wm[i] > 0) { num_used_wms++; total_image_size += axi_data->wm_image_size[i]; } } - prop_size = MSM_ISP44_TOTAL_WM_UB - + prop_size = MSM_ISP44_TOTAL_IMAGE_UB - axi_data->hw_info->min_wm_ub * num_used_wms; for (i = 0; i < axi_data->hw_info->num_wm; i++) { if (axi_data->free_wm[i]) { - delta = - (axi_data->wm_image_size[i] * - prop_size)/total_image_size; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; + delta = (uint64_t)axi_data->wm_image_size[i] * + (uint64_t)prop_size; + do_div(delta, total_image_size); + wm_ub_size = axi_data->hw_info->min_wm_ub + + (uint32_t)delta; msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); ub_offset += wm_ub_size; @@ -1008,10 +1255,12 @@ static void msm_vfe44_cfg_axi_ub_equal_slicing( int i; uint32_t ub_offset = 0; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + uint32_t ub_equal_slice = MSM_ISP44_TOTAL_IMAGE_UB / + axi_data->hw_info->num_wm; for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (VFE44_EQUAL_SLICE_UB - 1), + msm_camera_io_w(ub_offset << 16 | (ub_equal_slice - 1), vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += VFE44_EQUAL_SLICE_UB; + ub_offset += ub_equal_slice; } } @@ -1034,16 +1283,81 @@ static void msm_vfe44_update_ping_pong_addr( VFE44_PING_PONG_BASE(wm_idx, pingpong_status)); } -static long msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) +static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, + uint32_t blocking) { - uint32_t halt_mask; - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - halt_mask |= (1 << 8); - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x2C); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - return wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); + int rc = 0; + + /* Keep only halt and restart mask */ + msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x28); + msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x2C); + + /*Clear IRQ Status0, only leave reset irq mask*/ + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + + /*Clear IRQ Status1, only leave halt irq mask*/ + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + + /*push clear cmd*/ + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + + if (blocking) { + init_completion(&vfe_dev->halt_complete); + /* Halt AXI Bus Bridge */ + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); + rc = wait_for_completion_timeout( + &vfe_dev->halt_complete, msecs_to_jiffies(500)); + } else { + /* Halt AXI Bus Bridge */ + msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); + } + + /* if any stream is waiting for update, signal complete */ + if (vfe_dev->axi_data.stream_update) { + ISP_DBG("%s: complete stream update\n", __func__); + msm_isp_axi_stream_update(vfe_dev, 0xF); + if (vfe_dev->axi_data.stream_update) + msm_isp_axi_stream_update(vfe_dev, 0xF); + } + + if (atomic_read(&vfe_dev->stats_data.stats_update)) { + ISP_DBG("%s: complete on stats update\n", __func__); + msm_isp_stats_stream_update(vfe_dev); + if (atomic_read(&vfe_dev->stats_data.stats_update)) + msm_isp_stats_stream_update(vfe_dev); + } + + if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { + ISP_DBG("%s: complete on axi config update\n", __func__); + msm_isp_axi_cfg_update(vfe_dev); + if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) + msm_isp_axi_cfg_update(vfe_dev); + } + + return rc; +} + +static int msm_vfe44_axi_restart(struct vfe_device *vfe_dev, + uint32_t blocking, uint32_t enable_camif) +{ + vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); + msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); + msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); + msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); + msm_camera_io_w_mb(0x200, vfe_dev->vfe_base + 0x318); + /* Start AXI */ + msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); + + vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); + memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); + atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); + + if (enable_camif) { + vfe_dev->hw_info->vfe_ops.core_ops. + update_camif_state(vfe_dev, ENABLE_CAMIF); + } + + return 0; } static uint32_t msm_vfe44_get_wm_mask( @@ -1117,11 +1431,16 @@ static void msm_vfe44_stats_cfg_comp_mask( struct vfe_device *vfe_dev, uint32_t stats_mask, uint8_t enable) { - uint32_t reg_mask, comp_stats_mask, mask_bf_scale; + uint32_t comp_stats_mask, mask_bf_scale; uint32_t i = 0; atomic_t *stats_comp; struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; + + if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask < 1) + /* no stats composite masks */ + return; + if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > MAX_NUM_STATS_COMP_MASK) { pr_err("%s: num of comp masks %d exceed max %d\n", @@ -1138,44 +1457,45 @@ static void msm_vfe44_stats_cfg_comp_mask( for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { stats_comp = &stats_data->stats_comp_mask[i]; - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); + stats_data->reg_mask = + msm_camera_io_r(vfe_dev->vfe_base + 0x44); + comp_stats_mask = + stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); if (enable) { if (comp_stats_mask) continue; - reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_add(stats_mask, stats_comp); + stats_data->reg_mask |= (mask_bf_scale << (16 + i*8)); + atomic_set(stats_comp, stats_mask | + atomic_read(stats_comp)); + break; + } else { + if (!(atomic_read(stats_comp) & stats_mask)) + continue; if (stats_mask & (1 << STATS_IDX_BF_SCALE) && atomic_read(stats_comp) & (1 << STATS_IDX_BF_SCALE)) - atomic_sub((1 << STATS_IDX_BF_SCALE), - stats_comp); - - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - mask_bf_scale)) - continue; + atomic_set(stats_comp, + ~(1 << STATS_IDX_BF_SCALE) & + atomic_read(stats_comp)); - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(mask_bf_scale << (16 + i*8)); + atomic_set(stats_comp, + ~stats_mask & atomic_read(stats_comp)); + stats_data->reg_mask &= ~(mask_bf_scale << (16 + i*8)); + break; } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - return; } + + ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", + __func__, stats_data->reg_mask, + atomic_read(&stats_data->stats_comp_mask[0]), + atomic_read(&stats_data->stats_comp_mask[1])); + + msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x44); + return; } static void msm_vfe44_stats_cfg_wm_irq_mask( @@ -1316,6 +1636,58 @@ static void msm_vfe44_stats_enable_module(struct vfe_device *vfe_dev, msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x888); } +static void msm_vfe44_stats_update_cgc_override(struct vfe_device *vfe_dev, + uint32_t stats_mask, uint8_t cgc_override) +{ + int i; + uint32_t val = 0, cgc_mask = 0; + + for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { + if ((stats_mask >> i) & 0x1) { + switch (i) { + case STATS_IDX_BE: + cgc_mask |= (1 << 8); + break; + case STATS_IDX_BG: + cgc_mask |= (1 << 9); + break; + case STATS_IDX_BF: + cgc_mask |= (1 << 10); + break; + case STATS_IDX_AWB: + cgc_mask |= (1 << 11); + break; + case STATS_IDX_RS: + cgc_mask |= (1 << 12); + break; + case STATS_IDX_CS: + cgc_mask |= (1 << 13); + break; + case STATS_IDX_IHIST: + cgc_mask |= (1 << 14); + break; + case STATS_IDX_BHIST: + cgc_mask |= (1 << 15); + break; + case STATS_IDX_BF_SCALE: + cgc_mask |= (1 << 10); + break; + default: + pr_err("%s: Invalid stats mask\n", __func__); + return; + } + } + } + + /* CGC override */ + val = msm_camera_io_r(vfe_dev->vfe_base + 0x974); + if (cgc_override) + val |= cgc_mask; + else + val &= ~cgc_mask; + msm_camera_io_w(val, vfe_dev->vfe_base + 0x974); +} + static void msm_vfe44_stats_update_ping_pong_addr( struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, dma_addr_t paddr) @@ -1341,9 +1713,7 @@ static uint32_t msm_vfe44_stats_get_comp_mask( static uint32_t msm_vfe44_stats_get_frame_id( struct vfe_device *vfe_dev) { - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; + return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; } static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev) @@ -1389,6 +1759,15 @@ static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev) rc = -ENODEV; goto vfe_no_resource; } + if (vfe_dev->hw_info->num_iommu_secure_ctx) { + vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); + if (!vfe_dev->iommu_secure_ctx[0]) { + pr_err("%s: cannot get secure iommu_ctx\n", __func__); + rc = -ENODEV; + goto vfe_no_resource; + } + } + vfe_no_resource: return rc; @@ -1401,12 +1780,47 @@ static void msm_vfe44_get_error_mask( *error_mask1 = 0x01FFFEFF; } +static void msm_vfe44_get_overflow_mask(uint32_t *overflow_mask) +{ + *overflow_mask = 0x00FFFE7E; +} + +static void msm_vfe44_get_rdi_wm_mask(struct vfe_device *vfe_dev, + uint32_t *rdi_wm_mask) +{ + *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; +} + +static void msm_vfe44_get_irq_mask(struct vfe_device *vfe_dev, + uint32_t *irq0_mask, uint32_t *irq1_mask) +{ + *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); + *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); +} + + +static void msm_vfe44_restore_irq_mask(struct vfe_device *vfe_dev) +{ + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, + vfe_dev->vfe_base + 0x28); + msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, + vfe_dev->vfe_base + 0x2C); +} + + +static void msm_vfe44_get_halt_restart_mask(uint32_t *irq0_mask, + uint32_t *irq1_mask) +{ + *irq0_mask = BIT(31); + *irq1_mask = BIT(8); +} + static struct msm_vfe_axi_hardware_info msm_vfe44_axi_hw_info = { - .num_wm = 5, + .num_wm = 6, .num_comp_mask = 3, .num_rdi = 3, .num_rdi_master = 3, - .min_wm_ub = 64, + .min_wm_ub = 96, }; static struct msm_vfe_stats_hardware_info msm_vfe44_stats_hw_info = { @@ -1438,11 +1852,12 @@ static struct v4l2_subdev_internal_ops msm_vfe44_internal_ops = { struct msm_vfe_hardware_info vfe44_hw_info = { .num_iommu_ctx = 1, + .num_iommu_secure_ctx = 1, .vfe_clk_idx = VFE44_CLK_IDX, .vfe_ops = { .irq_ops = { .read_irq_status = msm_vfe44_read_irq_status, - .process_camif_irq = msm_vfe44_process_camif_irq, + .process_camif_irq = msm_vfe44_process_input_irq, .process_reset_irq = msm_vfe44_process_reset_irq, .process_halt_irq = msm_vfe44_process_halt_irq, .process_reset_irq = msm_vfe44_process_reset_irq, @@ -1472,18 +1887,29 @@ struct msm_vfe_hardware_info vfe44_hw_info = { .get_wm_mask = msm_vfe44_get_wm_mask, .get_pingpong_status = msm_vfe44_get_pingpong_status, .halt = msm_vfe44_axi_halt, + .restart = msm_vfe44_axi_restart, + .update_cgc_override = + msm_vfe44_axi_update_cgc_override, }, .core_ops = { .reg_update = msm_vfe44_reg_update, - .cfg_camif = msm_vfe44_cfg_camif, + .cfg_input_mux = msm_vfe44_cfg_input_mux, .update_camif_state = msm_vfe44_update_camif_state, + .start_fetch_eng = msm_vfe44_fetch_engine_start, .cfg_rdi_reg = msm_vfe44_cfg_rdi_reg, .reset_hw = msm_vfe44_reset_hardware, .init_hw = msm_vfe44_init_hardware, .init_hw_reg = msm_vfe44_init_hardware_reg, + .clear_status_reg = msm_vfe44_clear_status_reg, .release_hw = msm_vfe44_release_hardware, .get_platform_data = msm_vfe44_get_platform_data, .get_error_mask = msm_vfe44_get_error_mask, + .get_overflow_mask = msm_vfe44_get_overflow_mask, + .get_rdi_wm_mask = msm_vfe44_get_rdi_wm_mask, + .get_irq_mask = msm_vfe44_get_irq_mask, + .restore_irq_mask = msm_vfe44_restore_irq_mask, + .get_halt_restart_mask = + msm_vfe44_get_halt_restart_mask, .process_error_status = msm_vfe44_process_error_status, }, .stats_ops = { @@ -1502,6 +1928,8 @@ struct msm_vfe_hardware_info vfe44_hw_info = { .get_wm_mask = msm_vfe44_stats_get_wm_mask, .get_frame_id = msm_vfe44_stats_get_frame_id, .get_pingpong_status = msm_vfe44_get_pingpong_status, + .update_cgc_override = + msm_vfe44_stats_update_cgc_override, }, }, .dmi_reg_offset = 0x918, diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c index cb74aabbfe70..054d26339a9e 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -14,11 +14,6 @@ #include #include "msm_isp_util.h" #include "msm_isp_axi_util.h" -#include "msm_camera_io_util.h" - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) -#define FAST_ISP_STREAM_OFF -#endif #define SRC_TO_INTF(src) \ ((src < RDI_INTF_0) ? VFE_PIX_0 : \ @@ -26,23 +21,15 @@ #define HANDLE_TO_IDX(handle) (handle & 0xFF) -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MIN_IB 1700000000 - int msm_isp_axi_create_stream( struct msm_vfe_axi_shared_data *axi_data, struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) { - int i, rc = -1; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == AVALIABLE) - break; - } - - if (i == MAX_NUM_STREAM) { - pr_err("%s: No free stream\n", __func__); - return rc; + uint32_t i = stream_cfg_cmd->stream_src; + if (i >= VFE_AXI_SRC_MAX) { + pr_err("%s:%d invalid stream_src %d\n", __func__, __LINE__, + stream_cfg_cmd->stream_src); + return -EINVAL; } if ((axi_data->stream_handle_cnt << 8) == 0) @@ -60,6 +47,10 @@ int msm_isp_axi_create_stream( axi_data->stream_info[i].state = INACTIVE; axi_data->stream_info[i].stream_handle = stream_cfg_cmd->axi_stream_handle; + axi_data->stream_info[i].controllable_output = + stream_cfg_cmd->controllable_output; + if (stream_cfg_cmd->controllable_output) + stream_cfg_cmd->frame_skip_pattern = SKIP_ALL; return 0; } @@ -84,8 +75,14 @@ int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; } else { pr_err("%s: Invalid axi_stream_handle\n", __func__); - return rc; + return rc; + } + + if (!stream_info) { + pr_err("%s: Stream info is NULL\n", __func__); + return -EINVAL; } + switch (stream_cfg_cmd->output_format) { case V4L2_PIX_FMT_YUYV: case V4L2_PIX_FMT_YVYU: @@ -103,6 +100,10 @@ int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, case V4L2_PIX_FMT_SGBRG12: case V4L2_PIX_FMT_SGRBG12: case V4L2_PIX_FMT_SRGGB12: + case V4L2_PIX_FMT_SBGGR14: + case V4L2_PIX_FMT_SGBRG14: + case V4L2_PIX_FMT_SGRBG14: + case V4L2_PIX_FMT_SRGGB14: case V4L2_PIX_FMT_QBGGR8: case V4L2_PIX_FMT_QGBRG8: case V4L2_PIX_FMT_QGRBG8: @@ -115,6 +116,14 @@ int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, case V4L2_PIX_FMT_QGBRG12: case V4L2_PIX_FMT_QGRBG12: case V4L2_PIX_FMT_QRGGB12: + case V4L2_PIX_FMT_QBGGR14: + case V4L2_PIX_FMT_QGBRG14: + case V4L2_PIX_FMT_QGRBG14: + case V4L2_PIX_FMT_QRGGB14: + case V4L2_PIX_FMT_P16BGGR10: + case V4L2_PIX_FMT_P16GBRG10: + case V4L2_PIX_FMT_P16GRBG10: + case V4L2_PIX_FMT_P16RGGB10: case V4L2_PIX_FMT_JPEG: case V4L2_PIX_FMT_META: stream_info->num_planes = 1; @@ -131,7 +140,8 @@ int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, break; /*TD: Add more image format*/ default: - pr_err("%s: Invalid output format\n", __func__); + msm_isp_print_fourcc_error(__func__, + stream_cfg_cmd->output_format); return rc; } @@ -214,10 +224,25 @@ static uint32_t msm_isp_axi_get_plane_size( case V4L2_PIX_FMT_QGBRG12: case V4L2_PIX_FMT_QGRBG12: case V4L2_PIX_FMT_QRGGB12: + case V4L2_PIX_FMT_SBGGR14: + case V4L2_PIX_FMT_SGBRG14: + case V4L2_PIX_FMT_SGRBG14: + case V4L2_PIX_FMT_SRGGB14: + case V4L2_PIX_FMT_QBGGR14: + case V4L2_PIX_FMT_QGBRG14: + case V4L2_PIX_FMT_QGRBG14: + case V4L2_PIX_FMT_QRGGB14: /* TODO: fix me */ size = plane_cfg[plane_idx].output_height * plane_cfg[plane_idx].output_width; break; + case V4L2_PIX_FMT_P16BGGR10: + case V4L2_PIX_FMT_P16GBRG10: + case V4L2_PIX_FMT_P16GRBG10: + case V4L2_PIX_FMT_P16RGGB10: + size = plane_cfg[plane_idx].output_height * + plane_cfg[plane_idx].output_width; + break; case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) @@ -243,7 +268,8 @@ static uint32_t msm_isp_axi_get_plane_size( break; /*TD: Add more image format*/ default: - pr_err("%s: Invalid output format\n", __func__); + msm_isp_print_fourcc_error(__func__, + stream_info->output_format); break; } return size; @@ -273,10 +299,16 @@ void msm_isp_axi_free_wm(struct msm_vfe_axi_shared_data *axi_data, struct msm_vfe_axi_stream *stream_info) { int i; + for (i = 0; i < stream_info->num_planes; i++) { axi_data->free_wm[stream_info->wm[i]] = 0; axi_data->num_used_wm--; } + if (stream_info->stream_src <= IDEAL_RAW) { + axi_data->num_pix_stream++; + } else if (stream_info->stream_src < VFE_AXI_SRC_MAX) { + axi_data->num_rdi_stream++; + } } void msm_isp_axi_reserve_comp_mask( @@ -370,7 +402,8 @@ int msm_isp_axi_check_stream_state( return -EINVAL; for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { + if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= + MAX_NUM_STREAM) { return -EINVAL; } stream_info = &axi_data->stream_info[ @@ -404,7 +437,8 @@ int msm_isp_axi_check_stream_state( return rc; } -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev) +void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev, + uint8_t input_src) { int i; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; @@ -422,17 +456,31 @@ void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev) cfg_framedrop(vfe_dev, stream_info); } } - if (stream_info->stream_type == BURST_STREAM) { - stream_info->runtime_burst_frame_count--; - if (stream_info->runtime_burst_frame_count == 0) { + if (stream_info->stream_type == BURST_STREAM && + ((1 << SRC_TO_INTF(stream_info->stream_src)) & + input_src)) { + if (stream_info->runtime_framedrop_update_burst) { + stream_info->runtime_framedrop_update_burst = 0; + stream_info->runtime_burst_frame_count = + stream_info->runtime_init_frame_drop + + (stream_info->runtime_num_burst_capture - + 1) * + (stream_info->framedrop_period + 1) + 1; vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); + cfg_framedrop(vfe_dev, stream_info); + } else { + stream_info->runtime_burst_frame_count--; + if (stream_info-> + runtime_burst_frame_count == 0) { + vfe_dev->hw_info->vfe_ops.axi_ops. + cfg_framedrop(vfe_dev, stream_info); + } } } } } -static void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, +void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info) { stream_info->runtime_init_frame_drop = stream_info->init_frame_drop; @@ -444,104 +492,39 @@ static void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(vfe_dev, stream_info); } -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { + enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) +{ struct msm_isp_event_data event_data; - uint32_t session_id; - unsigned long flags; - uint16_t session_mask = 0; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - session_mask = vfe_dev->axi_data.session_frame_src_mask[session_id]; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - if (!(session_mask & (1 << frame_src))) { - /*pr_err("%s: Ignoring the Sof for the source INTF %d\n", - __func__, (1 << frame_src));*/ - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - /*pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - session_mask, - session_id);*/ - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - session_mask)) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - switch (event_type) { - case ISP_EVENT_SOF: - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - break; - default: - break; + switch (event_type) { + case ISP_EVENT_SOF: + if ((frame_src == VFE_PIX_0) && (vfe_dev->isp_sof_debug < 5)) { + pr_err("%s: PIX0 frame id: %u\n", __func__, + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id); + vfe_dev->isp_sof_debug++; } - event_data.input_intf = session_mask; - event_data.frame_id = vfe_dev->axi_data.frame_id[session_id]; - event_data.timestamp = ts->event_time; - event_data.mono_timestamp = ts->buf_time; - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); - /*pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]);*/ + vfe_dev->axi_data.src_info[frame_src].frame_id++; + if (vfe_dev->axi_data.src_info[frame_src].frame_id == 0) + vfe_dev->axi_data.src_info[frame_src].frame_id = 1; + ISP_DBG("%s: frame_src %d frame id: %u\n", __func__, + frame_src, + vfe_dev->axi_data.src_info[frame_src].frame_id); + break; + case ISP_EVENT_REG_UPDATE: + vfe_dev->axi_data.src_info[frame_src].last_updt_frm_id = 0; + break; + default: + break; } -} -#else -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data event_data; - uint32_t session_id; - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - if (!(vfe_dev->axi_data.session_frame_src_mask[session_id] - & (1 << frame_src))) { - pr_err("%s: Ignoring the Sof for the sourece INTF %d\n", - __func__, (1 << frame_src)); - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - vfe_dev->axi_data.session_frame_src_mask[session_id], - session_id); - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - vfe_dev->axi_data.session_frame_src_mask[session_id])) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - switch (event_type) { - case ISP_EVENT_SOF: - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - break; - default: - break; - } - event_data.input_intf = - vfe_dev->axi_data.session_frame_src_mask[session_id]; - event_data.frame_id = vfe_dev->axi_data.frame_id[session_id]; - event_data.timestamp = ts->event_time; - event_data.mono_timestamp = ts->buf_time; - - //pr_err("%s: AAAAA SOF frame id = %u\n", - // __func__, vfe_dev->axi_data.frame_id[session_id]); - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); - pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]); - } + event_data.input_intf = frame_src; + event_data.frame_id = vfe_dev->axi_data.src_info[frame_src].frame_id; + event_data.timestamp = ts->event_time; + event_data.mono_timestamp = ts->buf_time; + msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); } -#endif - void msm_isp_calculate_framedrop( struct msm_vfe_axi_shared_data *axi_data, struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) @@ -552,15 +535,18 @@ void msm_isp_calculate_framedrop( stream_info = &axi_data->stream_info[ HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; } else { - pr_err("%s: Invalid stream handle",__func__); + pr_err("%s: Invalid stream handle", __func__); + return; + } + if (!stream_info) { + pr_err("%s: Stream info is NULL\n", __func__); return; } framedrop_period = msm_isp_get_framedrop_period( stream_cfg_cmd->frame_skip_pattern); - stream_info->frame_skip_pattern = - stream_cfg_cmd->frame_skip_pattern; + stream_cfg_cmd->frame_skip_pattern; if (stream_cfg_cmd->frame_skip_pattern == SKIP_ALL) stream_info->framedrop_pattern = 0x0; else @@ -596,39 +582,76 @@ void msm_isp_calculate_bandwidth( struct msm_vfe_axi_shared_data *axi_data, struct msm_vfe_axi_stream *stream_info) { + int bpp = 0; if (stream_info->stream_src < RDI_INTF_0) { stream_info->bandwidth = (axi_data->src_info[VFE_PIX_0].pixel_clock / axi_data->src_info[VFE_PIX_0].width) * stream_info->max_width; - stream_info->bandwidth = stream_info->bandwidth * + stream_info->bandwidth = (unsigned long)stream_info->bandwidth * stream_info->format_factor / ISP_Q2; } else { int rdi = SRC_TO_INTF(stream_info->stream_src); - stream_info->bandwidth = axi_data->src_info[rdi].pixel_clock; + bpp = msm_isp_get_bit_per_pixel(stream_info->output_format); + if (rdi < VFE_SRC_MAX) + stream_info->bandwidth = + (axi_data->src_info[rdi].pixel_clock / 8) * bpp; + else + pr_err("%s: Invalid rdi interface\n", __func__); } } -#if 0 //CONFIG_MSM_AVTIMER +#ifdef CONFIG_MSM_AVTIMER void msm_isp_start_avtimer(void) { avcs_core_open(); avcs_core_disable_power_collapse(1); } + +static inline void msm_isp_get_avtimer_ts( + struct msm_isp_timestamp *time_stamp) +{ + int rc = 0; + uint32_t avtimer_usec = 0; + uint64_t avtimer_tick = 0; + + rc = avcs_core_query_timer(&avtimer_tick); + if (rc < 0) { + pr_err("%s: Error: Invalid AVTimer Tick, rc=%d\n", + __func__, rc); + /* In case of error return zero AVTimer Tick Value */ + time_stamp->vt_time.tv_sec = 0; + time_stamp->vt_time.tv_usec = 0; + } else { + avtimer_usec = do_div(avtimer_tick, USEC_PER_SEC); + time_stamp->vt_time.tv_sec = (uint32_t)(avtimer_tick); + time_stamp->vt_time.tv_usec = avtimer_usec; + pr_debug("%s: AVTimer TS = %u:%u\n", __func__, + (uint32_t)(avtimer_tick), avtimer_usec); + } +} #else void msm_isp_start_avtimer(void) { pr_err("AV Timer is not supported\n"); } + +static inline void msm_isp_get_avtimer_ts( + struct msm_isp_timestamp *time_stamp) +{ + pr_err_ratelimited("%s: Error: AVTimer driver not available\n", + __func__); + time_stamp->vt_time.tv_sec = 0; + time_stamp->vt_time.tv_usec = 0; +} #endif int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) { int rc = 0, i; - uint32_t io_format = 0, avtimer_scaler = 0; + uint32_t io_format = 0; struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd = arg; struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; rc = msm_isp_axi_create_stream( &vfe_dev->axi_data, stream_cfg_cmd); @@ -641,12 +664,22 @@ int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) &vfe_dev->axi_data, stream_cfg_cmd); if (rc) { pr_err("%s: Request validation failed\n", __func__); - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) - msm_isp_axi_destroy_stream(&vfe_dev->axi_data,HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)); + if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < + MAX_NUM_STREAM) + msm_isp_axi_destroy_stream(&vfe_dev->axi_data, + HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)); return rc; } stream_info = &vfe_dev->axi_data. stream_info[HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; + if (!stream_info) { + pr_err("%s: can not find stream handle %x\n", __func__, + stream_cfg_cmd->axi_stream_handle); + return -EINVAL; + } + + stream_info->memory_input = stream_cfg_cmd->memory_input; + msm_isp_axi_reserve_wm(&vfe_dev->axi_data, stream_info); if (stream_info->stream_src < RDI_INTF_0) { @@ -655,7 +688,7 @@ int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) stream_info->stream_src == IDEAL_RAW) { if (stream_info->stream_src == CAMIF_RAW && io_format != stream_info->output_format) - pr_warn("%s: Overriding input format\n", + pr_debug("%s: Overriding input format\n", __func__); io_format = stream_info->output_format; @@ -674,34 +707,9 @@ int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) } msm_isp_calculate_framedrop(&vfe_dev->axi_data, stream_cfg_cmd); - stream_info->vt_enable = stream_cfg_cmd->vt_enable; - axi_data->burst_len = stream_cfg_cmd->burst_len; - - if (stream_info->vt_enable) { - vfe_dev->vt_enable = stream_info->vt_enable; + if (stream_cfg_cmd->vt_enable && !vfe_dev->vt_enable) { + vfe_dev->vt_enable = stream_cfg_cmd->vt_enable; msm_isp_start_avtimer(); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_ctl = - ioremap(AVTIMER_MODE_CTL_PHY_ADDR_8916, 4); - if (vfe_dev->p_avtimer_ctl) { - avtimer_scaler = - msm_camera_io_r(vfe_dev->p_avtimer_ctl); - /*If bit 2 is set, it indicates AVTimer - ticks are scaled*/ - if (avtimer_scaler & 0x00000002) - vfe_dev->avtimer_scaler = - AVTIMER_TICK_SCALER_8916; - } - } else { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR, 4); - } } if (stream_info->num_planes > 1) { msm_isp_axi_reserve_comp_mask( @@ -731,12 +739,14 @@ int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg) struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_stream_cfg_cmd stream_cfg; - if (HANDLE_TO_IDX(stream_release_cmd->stream_handle) >= MAX_NUM_STREAM) { + + if (HANDLE_TO_IDX(stream_release_cmd->stream_handle) >= + MAX_NUM_STREAM) { pr_err("%s: Invalid stream handle\n", __func__); return -EINVAL; } - stream_info = &axi_data->stream_info[HANDLE_TO_IDX(stream_release_cmd->stream_handle)]; - + stream_info = &axi_data->stream_info[ + HANDLE_TO_IDX(stream_release_cmd->stream_handle)]; if (stream_info->state == AVALIABLE) { pr_err("%s: Stream already released\n", __func__); return -EINVAL; @@ -783,10 +793,10 @@ static void msm_isp_axi_stream_enable_cfg( return; for (i = 0; i < stream_info->num_planes; i++) { if (stream_info->state == START_PENDING || - stream_info->state == RESUME_PENDING) + stream_info->state == RESUME_PENDING) { vfe_dev->hw_info->vfe_ops.axi_ops. enable_wm(vfe_dev, stream_info->wm[i], 1); - else { + } else { vfe_dev->hw_info->vfe_ops.axi_ops. enable_wm(vfe_dev, stream_info->wm[i], 0); /* Issue a reg update for Raw Snapshot Case @@ -806,24 +816,36 @@ static void msm_isp_axi_stream_enable_cfg( axi_data->num_active_stream--; } -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) +void msm_isp_axi_stream_update(struct vfe_device *vfe_dev, uint8_t input_src) { int i; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + for (i = 0; i < MAX_NUM_STREAM; i++) { if (axi_data->stream_info[i].state == START_PENDING || axi_data->stream_info[i].state == STOP_PENDING) { - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == - START_PENDING ? STARTING : STOPPING; + if ((1 << + SRC_TO_INTF(axi_data->stream_info[i]. + stream_src)) & + input_src) { + msm_isp_axi_stream_enable_cfg( + vfe_dev, &axi_data->stream_info[i]); + axi_data->stream_info[i].state = + axi_data->stream_info[i].state == + START_PENDING ? STARTING : STOPPING; + } } else if (axi_data->stream_info[i].state == STARTING || axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = + if ((1 << + SRC_TO_INTF(axi_data->stream_info[i]. + stream_src)) & + input_src) { + axi_data->stream_info[i].state = axi_data->stream_info[i].state == STARTING ? - ACTIVE : INACTIVE; + ACTIVE : INACTIVE; + vfe_dev->axi_data.stream_update--; + } } } @@ -835,7 +857,6 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) vfe_dev->axi_data.pipeline_update = NO_UPDATE; } - vfe_dev->axi_data.stream_update--; if (vfe_dev->axi_data.stream_update == 0) complete(&vfe_dev->stream_config_complete); } @@ -848,6 +869,8 @@ static void msm_isp_reload_ping_pong_offset(struct vfe_device *vfe_dev, struct msm_isp_buffer *buf; for (i = 0; i < 2; i++) { buf = stream_info->buf[i]; + if (!buf) + continue; flag = i ? VFE_PONG_FLAG : VFE_PING_FLAG; for (j = 0; j < stream_info->num_planes; j++) { vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( @@ -916,41 +939,61 @@ static void msm_isp_get_done_buf(struct vfe_device *vfe_dev, for (i = 0; i < stream_info->num_planes; i++) { if (pingpong_bit != (~(pingpong_status >> stream_info->wm[i]) & 0x1)) { - pr_warn("%s: Write master ping pong mismatch. Status: 0x%x\n", + pr_debug("%s: Write master ping pong mismatch. Status: 0x%x\n", __func__, pingpong_status); } } + *done_buf = stream_info->buf[pingpong_bit]; + + if (stream_info->controllable_output) { + stream_info->buf[pingpong_bit] = NULL; + stream_info->request_frm_num--; + } } static int msm_isp_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status) + struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status, + uint32_t pingpong_bit) { int i, rc = -1; struct msm_isp_buffer *buf = NULL; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = 0; + uint32_t bufq_handle = 0, frame_id = 0; uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); + if (stream_idx >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream_idx",__func__); + pr_err("%s: Invalid stream_idx", __func__); return rc; } - if (stream_info->bufq_scratch_handle && !stream_info->request_frm_num) - bufq_handle = stream_info->bufq_scratch_handle; - else - bufq_handle = stream_info->bufq_handle; - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); + if (stream_info->controllable_output && !stream_info->request_frm_num) + return 0; - if (rc < 0) { + frame_id = vfe_dev->axi_data. + src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id; + if (frame_id && stream_info->frame_id && + stream_info->frame_id == frame_id) { + /* This could happen if reg update ack is delayed */ + pr_err("%s: Duplicate frame streamId:%d stream_fid:%d frame_id:%d\n", + __func__, stream_info->stream_id, stream_info->frame_id, + frame_id); vfe_dev->error_info.stream_framedrop_count[stream_idx]++; return rc; } - if (stream_info->bufq_scratch_handle && - bufq_handle == stream_info->bufq_handle) - stream_info->request_frm_num--; + bufq_handle = stream_info->bufq_handle; + if (SRC_TO_INTF(stream_info->stream_src) < VFE_SRC_MAX) + rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, + vfe_dev->pdev->id, bufq_handle, &buf); + else { + pr_err("%s: Invalid stream index\n", __func__); + rc = -1; + } + + if (rc < 0) { + vfe_dev->error_info.stream_framedrop_count[stream_idx]++; + return rc; + } if (buf->num_planes != stream_info->num_planes) { pr_err("%s: Invalid buffer\n", __func__); @@ -963,8 +1006,9 @@ static int msm_isp_cfg_ping_pong_address(struct vfe_device *vfe_dev, vfe_dev, stream_info->wm[i], pingpong_status, buf->mapped_info[i].paddr + stream_info->plane_cfg[i].plane_addr_offset); - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); + stream_info->buf[pingpong_bit] = buf; + return 0; buf_error: vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, @@ -972,30 +1016,6 @@ buf_error: return rc; } -static inline void msm_isp_get_vt_tstamp(struct vfe_device *vfe_dev, - struct msm_isp_timestamp *time_stamp) -{ - uint32_t avtimer_msw_1st = 0, avtimer_lsw = 0; - uint32_t avtimer_msw_2nd = 0; - uint64_t av_timer_tick = 0; - - if (!vfe_dev->p_avtimer_msw || !vfe_dev->p_avtimer_lsw) { - pr_err("%s: ioremap failed\n", __func__); - return; - } - - do { - avtimer_msw_1st = msm_camera_io_r(vfe_dev->p_avtimer_msw); - avtimer_lsw = msm_camera_io_r(vfe_dev->p_avtimer_lsw); - avtimer_msw_2nd = msm_camera_io_r(vfe_dev->p_avtimer_msw); - } while (avtimer_msw_1st != avtimer_msw_2nd); - av_timer_tick = ((uint64_t)avtimer_msw_1st << 32) | avtimer_lsw; - do_div(av_timer_tick, vfe_dev->avtimer_scaler); - avtimer_lsw = do_div(av_timer_tick, USEC_PER_SEC); - time_stamp->vt_time.tv_sec = (uint32_t)(av_timer_tick); - time_stamp->vt_time.tv_usec = avtimer_lsw; -} - static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info, struct msm_isp_buffer *buf, struct msm_isp_timestamp *ts) @@ -1004,9 +1024,7 @@ static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, struct msm_isp_event_data buf_event; struct timeval *time_stamp; uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - uint32_t session_id = vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)].session_id; - uint32_t frame_id = vfe_dev->axi_data.frame_id[session_id]; + uint32_t frame_id; uint32_t buf_src; memset(&buf_event, 0, sizeof(buf_event)); @@ -1015,9 +1033,20 @@ static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, return; } + if (SRC_TO_INTF(stream_info->stream_src) < VFE_SRC_MAX) + frame_id = vfe_dev->axi_data. + src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id; + else { + pr_err("%s: Invalid stream index, put buf back to vb2 queue\n", + __func__); + vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, + buf->bufq_handle, buf->buf_idx); + return; + } + if (buf && ts) { if (vfe_dev->vt_enable) { - msm_isp_get_vt_tstamp(vfe_dev, ts); + msm_isp_get_avtimer_ts(ts); time_stamp = &ts->vt_time; } else @@ -1092,7 +1121,9 @@ static enum msm_isp_camif_update_state pix_stream_cnt++; } - if (pix_stream_cnt) { + if ((pix_stream_cnt) && + (axi_data->src_info[VFE_PIX_0].input_mux != EXTERNAL_READ)) { + if (cur_pix_stream_cnt == 0 && pix_stream_cnt && stream_cfg_cmd->cmd == START_STREAM) return ENABLE_CAMIF; @@ -1105,6 +1136,7 @@ static enum msm_isp_camif_update_state stream_cfg_cmd->cmd == STOP_IMMEDIATELY) return DISABLE_CAMIF_IMMEDIATELY; } + return NO_UPDATE; } @@ -1120,7 +1152,8 @@ static void msm_isp_update_camif_output_count( return; for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { + if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= + MAX_NUM_STREAM) { return; } stream_info = @@ -1130,6 +1163,7 @@ static void msm_isp_update_camif_output_count( continue; if (stream_info->stream_src == PIX_ENCODER || stream_info->stream_src == PIX_VIEWFINDER || + stream_info->stream_src == PIX_VIDEO || stream_info->stream_src == IDEAL_RAW) { if (stream_cfg_cmd->cmd == START_STREAM) vfe_dev->axi_data.src_info[VFE_PIX_0]. @@ -1148,6 +1182,7 @@ static void msm_isp_update_camif_output_count( } } + static void msm_isp_update_rdi_output_count( struct vfe_device *vfe_dev, struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) @@ -1161,9 +1196,8 @@ static void msm_isp_update_rdi_output_count( for (i = 0; i < stream_cfg_cmd->num_streams; i++) { if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { + > MAX_NUM_STREAM) return; - } stream_info = &axi_data->stream_info[ HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; @@ -1195,61 +1229,38 @@ static void msm_isp_update_rdi_output_count( } } -uint8_t msm_isp_get_curr_stream_cnt( +static uint8_t msm_isp_get_curr_stream_cnt( struct vfe_device *vfe_dev) { uint8_t curr_stream_cnt = 0; curr_stream_cnt = vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count; + raw_stream_count + + vfe_dev->axi_data.src_info[VFE_RAW_1]. + raw_stream_count + + vfe_dev->axi_data.src_info[VFE_RAW_2]. + raw_stream_count + + vfe_dev->axi_data.src_info[VFE_PIX_0]. + pix_stream_count + + vfe_dev->axi_data.src_info[VFE_PIX_0]. + raw_stream_count; return curr_stream_cnt; } -void msm_camera_io_dump_2(void __iomem *addr, int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - ISP_DBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - ISP_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - ISP_DBG("%s\n", line_str); -} - /*Factor in Q2 format*/ #define ISP_DEFAULT_FORMAT_FACTOR 6 -#define ISP_BUS_UTILIZATION_FACTOR 6 +#define ISP_BUS_UTILIZATION_FACTOR 1536 /* 1.5 in Q10 format */ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) { int i, rc = 0; struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; + uint64_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; uint32_t num_pix_streams = 0; uint32_t num_rdi_streams = 0; uint32_t total_streams = 0; uint64_t total_bandwidth = 0; - uint64_t ib_total_bandwidth = 0; + uint32_t bus_util_factor = ISP_BUS_UTILIZATION_FACTOR; for (i = 0; i < MAX_NUM_STREAM; i++) { stream_info = &axi_data->stream_info[i]; @@ -1264,29 +1275,20 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) } } } - if (num_pix_streams > 0) - total_pix_bandwidth = total_pix_bandwidth / - num_pix_streams * (num_pix_streams - 1) + - ((unsigned long)axi_data->src_info[VFE_PIX_0]. - pixel_clock) * ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2; total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; total_streams = num_pix_streams + num_rdi_streams; - if (total_streams == 1) { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2 - MSM_ISP_MIN_IB; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; + if (vfe_dev->bus_util_factor) + bus_util_factor = vfe_dev->bus_util_factor; + ISP_DBG("%s: bus_util_factor = %u\n", __func__, bus_util_factor); + + if (total_streams == 1) rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - (total_bandwidth - MSM_ISP_MIN_AB) , ib_total_bandwidth); - } - else { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; + total_bandwidth , + (total_bandwidth * bus_util_factor / ISP_Q10)); + else rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - total_bandwidth, ib_total_bandwidth); - } + (total_bandwidth + MSM_ISP_MIN_AB), (total_bandwidth * + bus_util_factor / ISP_Q10 + MSM_ISP_MIN_IB)); if (rc < 0) pr_err("%s: update failed\n", __func__); @@ -1301,11 +1303,6 @@ static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev, spin_lock_irqsave(&vfe_dev->shared_data_lock, flags); init_completion(&vfe_dev->stream_config_complete); vfe_dev->axi_data.pipeline_update = camif_update; -#if defined(FAST_ISP_STREAM_OFF) - vfe_dev->axi_data.stream_update = 1; -#else - vfe_dev->axi_data.stream_update = 2; -#endif spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags); rc = wait_for_completion_timeout( &vfe_dev->stream_config_complete, @@ -1326,7 +1323,7 @@ static int msm_isp_init_stream_ping_pong_reg( int rc = 0; /*Set address for both PING & PONG register */ rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG); + stream_info, VFE_PING_FLAG, 0); if (rc < 0) { pr_err("%s: No free buffer for ping\n", __func__); @@ -1342,7 +1339,7 @@ static int msm_isp_init_stream_ping_pong_reg( msm_isp_cfg_pong_address(vfe_dev, stream_info); } else { rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG); + stream_info, VFE_PONG_FLAG, 1); if (rc < 0) { pr_err("%s: No free buffer for pong\n", __func__); @@ -1360,9 +1357,10 @@ static void msm_isp_deinit_stream_ping_pong_reg( for (i = 0; i < 2; i++) { struct msm_isp_buffer *buf; buf = stream_info->buf[i]; - if (buf) + if (buf) { vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, buf->bufq_handle, buf->buf_idx); + } } } @@ -1375,28 +1373,146 @@ static void msm_isp_get_stream_wm_mask( *wm_reload_mask |= (1 << stream_info->wm[i]); } -#if defined(FAST_ISP_STREAM_OFF) -static void msm_isp_axi_stream_update_new(struct vfe_device *vfe_dev, enum msm_isp_camif_update_state camif_update) +int msm_isp_axi_halt(struct vfe_device *vfe_dev, + struct msm_vfe_axi_halt_cmd *halt_cmd) +{ + int rc = 0; + + if (halt_cmd->overflow_detected) { + /*Store current IRQ mask*/ + if (vfe_dev->error_info.overflow_recover_irq_mask0 == 0) { + vfe_dev->hw_info->vfe_ops.core_ops.get_irq_mask(vfe_dev, + &vfe_dev->error_info.overflow_recover_irq_mask0, + &vfe_dev->error_info.overflow_recover_irq_mask1); + } + atomic_set(&vfe_dev->error_info.overflow_state, + OVERFLOW_DETECTED); + } + + rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); + + if (halt_cmd->stop_camif) { + vfe_dev->hw_info->vfe_ops.core_ops. + update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); + } + + return rc; +} + +int msm_isp_axi_reset(struct vfe_device *vfe_dev, + struct msm_vfe_axi_reset_cmd *reset_cmd) { - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || axi_data->stream_info[i].state == STOP_PENDING) { - msm_isp_axi_stream_enable_cfg(vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = axi_data->stream_info[i].state == START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = axi_data->stream_info[i].state == STARTING ? ACTIVE : INACTIVE; - } - } - - if (camif_update == DISABLE_CAMIF) { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } + int rc = 0, i, j; + struct msm_vfe_axi_stream *stream_info; + struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + struct msm_isp_bufq *bufq = NULL; + + if (!reset_cmd) { + pr_err("%s: NULL pointer reset cmd %p\n", __func__, reset_cmd); + rc = -1; + return rc; + } + + rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, + 0, reset_cmd->blocking); + + for (i = 0, j = 0; j < axi_data->num_active_stream && + i < MAX_NUM_STREAM; i++, j++) { + stream_info = &axi_data->stream_info[i]; + if (stream_info->stream_src >= VFE_AXI_SRC_MAX) { + rc = -1; + pr_err("%s invalid stream src = %d\n", __func__, + stream_info->stream_src); + break; + } + if (stream_info->state != ACTIVE) { + j--; + continue; + } + + bufq = vfe_dev->buf_mgr->ops->get_bufq(vfe_dev->buf_mgr, + stream_info->bufq_handle); + if (!bufq) { + pr_err("%s: bufq null %p by handle %x\n", __func__, + bufq, stream_info->bufq_handle); + continue; + } + + if (bufq->buf_type != ISP_SHARE_BUF) { + msm_isp_deinit_stream_ping_pong_reg(vfe_dev, + stream_info); + } else { + vfe_dev->buf_mgr->ops->flush_buf(vfe_dev->buf_mgr, + stream_info->bufq_handle, + MSM_ISP_BUFFER_FLUSH_ALL); + } + axi_data->src_info[SRC_TO_INTF(stream_info->stream_src)]. + frame_id = reset_cmd->frame_id; + msm_isp_reset_burst_count_and_frame_drop(vfe_dev, stream_info); + } + if (rc < 0) + pr_err("%s Error! reset hw Timed out\n", __func__); + + return rc; +} + +int msm_isp_axi_restart(struct vfe_device *vfe_dev, + struct msm_vfe_axi_restart_cmd *restart_cmd) +{ + int rc = 0, i, j; + struct msm_vfe_axi_stream *stream_info; + struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + uint32_t wm_reload_mask = 0x0; + + for (i = 0, j = 0; j < axi_data->num_active_stream && + i < MAX_NUM_STREAM; i++, j++) { + stream_info = &axi_data->stream_info[i]; + if (stream_info->state != ACTIVE) { + j--; + continue; + } + msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); + msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info); + } + + vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, wm_reload_mask); + rc = vfe_dev->hw_info->vfe_ops.axi_ops.restart(vfe_dev, 0, + restart_cmd->enable_camif); + if (rc < 0) + pr_err("%s Error restarting HW\n", __func__); + + return rc; +} + +static int msm_isp_axi_update_cgc_override(struct vfe_device *vfe_dev, + struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, + uint8_t cgc_override) +{ + int i = 0, j = 0; + struct msm_vfe_axi_stream *stream_info; + struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + + if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) + return -EINVAL; + + for (i = 0; i < stream_cfg_cmd->num_streams; i++) { + if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= + MAX_NUM_STREAM) { + return -EINVAL; + } + stream_info = &axi_data->stream_info[ + HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; + for (j = 0; j < stream_info->num_planes; j++) { + if (vfe_dev->hw_info->vfe_ops.axi_ops. + update_cgc_override) + vfe_dev->hw_info->vfe_ops.axi_ops. + update_cgc_override(vfe_dev, + stream_info->wm[j], cgc_override); + } + } + return 0; } -#endif static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, @@ -1407,26 +1523,34 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, uint32_t wm_reload_mask = 0x0; struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; + uint8_t init_frm_drop = 0; if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) return -EINVAL; for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { + if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= + MAX_NUM_STREAM) { return -EINVAL; } stream_info = &axi_data->stream_info[ HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - stream_info->frame_id = 0; - src_state = axi_data->src_info[ - SRC_TO_INTF(stream_info->stream_src)].active; + if (SRC_TO_INTF(stream_info->stream_src) < VFE_SRC_MAX) + src_state = axi_data->src_info[ + SRC_TO_INTF(stream_info->stream_src)].active; + else { + pr_err("%s: invalid src info index\n", __func__); + return -EINVAL; + } msm_isp_calculate_bandwidth(axi_data, stream_info); msm_isp_reset_framedrop(vfe_dev, stream_info); + init_frm_drop = stream_info->init_frame_drop; msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); rc = msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info); if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, + pr_err("%s: No buffer for stream %d\n", + __func__, HANDLE_TO_IDX( stream_cfg_cmd->stream_handle[i])); return rc; @@ -1443,187 +1567,70 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); stream_info->state = ACTIVE; } - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].session_id = - stream_info->session_id; - vfe_dev->axi_data. - session_frame_src_mask[stream_info->session_id] |= - (1 << SRC_TO_INTF(stream_info->stream_src)); - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].frame_id = 0; + if (SRC_TO_INTF(stream_info->stream_src) != VFE_PIX_0 && + stream_info->stream_src < VFE_AXI_SRC_MAX) { + vfe_dev->axi_data.src_info[SRC_TO_INTF( + stream_info->stream_src)].frame_id = init_frm_drop; + } } msm_isp_update_stream_bandwidth(vfe_dev); vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, wm_reload_mask); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - - vfe_dev->hw_info->vfe_ops.core_ops.init_vbif_counters(vfe_dev); - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); if (camif_update == ENABLE_CAMIF) { + atomic_set(&vfe_dev->error_info.overflow_state, + NO_OVERFLOW); vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id = 0; vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, camif_update); } - if (vfe_dev->axi_data.src_info[VFE_RAW_0].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_0].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_1].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_1].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_2].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_2].frame_id = 0; -#if defined(FAST_ISP_STREAM_OFF) - if (wait_for_complete){ - msm_isp_axi_stream_update_new(vfe_dev, camif_update); + if (wait_for_complete) { + vfe_dev->axi_data.stream_update = stream_cfg_cmd->num_streams; rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); } -#else - if (wait_for_complete) - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif return rc; } -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, enum msm_isp_camif_update_state camif_update) { int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; + uint8_t wait_for_complete_for_this_stream = 0, cur_stream_cnt = 0; + uint8_t wait_for_complete = 0; struct msm_vfe_axi_stream *stream_info = NULL; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - unsigned long flags; + int ext_read = + axi_data->src_info[VFE_PIX_0].input_mux == EXTERNAL_READ; if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM || stream_cfg_cmd->num_streams == 0) return -EINVAL; + msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { + if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= + MAX_NUM_STREAM) { return -EINVAL; } stream_info = &axi_data->stream_info[ HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (cur_stream_cnt > 0) - wait_for_complete = 1; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count + vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count) >= 1) - skip_session_mask_update = 1; - else - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - } - - if (wait_for_complete) { - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } else { - pr_err("%s: Stop Immediately! stream_id=%d\n", __func__, - stream_info->stream_id); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - - if (cur_stream_cnt == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#else -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - + wait_for_complete_for_this_stream = 0; stream_info->state = STOP_PENDING; if (stream_info->stream_src == CAMIF_RAW || stream_info->stream_src == IDEAL_RAW) { /* We dont get reg update IRQ for raw snapshot * so frame skip cant be ocnfigured */ - wait_for_complete = 1; + if ((camif_update != DISABLE_CAMIF_IMMEDIATELY) && + (!ext_read)) + wait_for_complete_for_this_stream = 1; } else if (stream_info->stream_type == BURST_STREAM && stream_info->runtime_num_burst_capture == 0) { /* Configure AXI writemasters to stop immediately @@ -1633,46 +1640,28 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, if (stream_info->stream_src == RDI_INTF_0 || stream_info->stream_src == RDI_INTF_1 || stream_info->stream_src == RDI_INTF_2) - wait_for_complete = 1; - else { - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - } + wait_for_complete_for_this_stream = 1; } else { - wait_for_complete = 1; + if ((camif_update != DISABLE_CAMIF_IMMEDIATELY) && + (!ext_read) && + !(stream_info->stream_src == RDI_INTF_0 || + stream_info->stream_src == RDI_INTF_1 || + stream_info->stream_src == RDI_INTF_2)) + wait_for_complete_for_this_stream = 1; } - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count <= 1) && (vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count <= 1)) { - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - if (stream_info->stream_type == - BURST_STREAM) - skip_session_mask_update = 1; - } - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); + if (!wait_for_complete_for_this_stream) { + msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); + stream_info->state = INACTIVE; + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, 0xF); } - + wait_for_complete |= wait_for_complete_for_this_stream; } if (wait_for_complete) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); -#if defined(FAST_ISP_STREAM_OFF) - msm_isp_axi_stream_update_new(vfe_dev, DISABLE_CAMIF); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, NO_UPDATE); -#else + vfe_dev->axi_data.stream_update = stream_cfg_cmd->num_streams; + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, 0xF); rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif if (rc < 0) { pr_err("%s: wait for config done failed\n", __func__); for (i = 0; i < stream_cfg_cmd->num_streams; i++) { @@ -1680,44 +1669,42 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, HANDLE_TO_IDX( stream_cfg_cmd->stream_handle[i])]; stream_info->state = STOP_PENDING; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, 0xF); + msm_isp_axi_stream_enable_cfg( + vfe_dev, stream_info); stream_info->state = INACTIVE; } } } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) + if (camif_update == DISABLE_CAMIF) { vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); + } else if ((camif_update == DISABLE_CAMIF_IMMEDIATELY) || + (ext_read)) { + /*during stop immediately, stop output then stop input*/ + if (!ext_read) + vfe_dev->hw_info->vfe_ops.core_ops. + update_camif_state(vfe_dev, + DISABLE_CAMIF_IMMEDIATELY); + } if (cur_stream_cnt == 0) { - if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); + vfe_dev->ignore_error = 1; + vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); + vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, 1, 1); vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); + vfe_dev->ignore_error = 0; } + msm_isp_update_stream_bandwidth(vfe_dev); for (i = 0; i < stream_cfg_cmd->num_streams; i++) { stream_info = &axi_data->stream_info[ HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); } + return rc; } -#endif int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) @@ -1739,18 +1726,101 @@ int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) } camif_update = msm_isp_get_camif_update_state(vfe_dev, stream_cfg_cmd); - if (stream_cfg_cmd->cmd == START_STREAM) + if (stream_cfg_cmd->cmd == START_STREAM) { + msm_isp_axi_update_cgc_override(vfe_dev, stream_cfg_cmd, 1); + rc = msm_isp_start_axi_stream( vfe_dev, stream_cfg_cmd, camif_update); - else + } else { rc = msm_isp_stop_axi_stream( vfe_dev, stream_cfg_cmd, camif_update); + msm_isp_axi_update_cgc_override(vfe_dev, stream_cfg_cmd, 0); + } + if (rc < 0) pr_err("%s: start/stop stream failed\n", __func__); return rc; } +static int msm_isp_request_frame(struct vfe_device *vfe_dev, + struct msm_vfe_axi_stream *stream_info, uint32_t request_frm_num) +{ + struct msm_vfe_axi_stream_request_cmd stream_cfg_cmd; + int rc = 0; + uint32_t pingpong_status, pingpong_bit, wm_reload_mask = 0x0; + + if (!stream_info->controllable_output) + return 0; + + if (!request_frm_num) { + pr_err("%s: Invalid frame request.\n", __func__); + return -EINVAL; + } + + stream_info->request_frm_num += request_frm_num; + + stream_cfg_cmd.axi_stream_handle = stream_info->stream_handle; + stream_cfg_cmd.frame_skip_pattern = NO_SKIP; + stream_cfg_cmd.init_frame_drop = 0; + stream_cfg_cmd.burst_count = stream_info->request_frm_num; + msm_isp_calculate_framedrop(&vfe_dev->axi_data, &stream_cfg_cmd); + msm_isp_reset_framedrop(vfe_dev, stream_info); + + if (stream_info->request_frm_num != request_frm_num) { + pingpong_status = + vfe_dev->hw_info->vfe_ops.axi_ops.get_pingpong_status( + vfe_dev); + pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); + + if (!stream_info->buf[pingpong_bit]) { + rc = msm_isp_cfg_ping_pong_address(vfe_dev, stream_info, + pingpong_status, pingpong_bit); + if (rc) { + pr_err("%s:%d fail to set ping pong address\n", + __func__, __LINE__); + return rc; + } + } + + if (!stream_info->buf[!pingpong_bit] && request_frm_num > 1) { + rc = msm_isp_cfg_ping_pong_address(vfe_dev, stream_info, + ~pingpong_status, !pingpong_bit); + if (rc) { + pr_err("%s:%d fail to set ping pong address\n", + __func__, __LINE__); + return rc; + } + } + } else { + if (!stream_info->buf[0]) { + rc = msm_isp_cfg_ping_pong_address(vfe_dev, stream_info, + VFE_PING_FLAG, 0); + if (rc) { + pr_err("%s:%d fail to set ping pong address\n", + __func__, __LINE__); + return rc; + } + } + + if (!stream_info->buf[1] && request_frm_num > 1) { + rc = msm_isp_cfg_ping_pong_address(vfe_dev, stream_info, + VFE_PONG_FLAG, 1); + if (rc) { + pr_err("%s:%d fail to set ping pong address\n", + __func__, __LINE__); + return rc; + } + } + + msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); + vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, + wm_reload_mask); + } + + return rc; +} + int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) { int rc = 0, i, j; @@ -1772,7 +1842,8 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) for (i = 0; i < update_cmd->num_streams; i++) { update_info = &update_cmd->update_info[i]; /*check array reference bounds*/ - if (HANDLE_TO_IDX(update_info->stream_handle) >= MAX_NUM_STREAM) { + if (HANDLE_TO_IDX(update_info->stream_handle) >= + MAX_NUM_STREAM) { return -EINVAL; } stream_info = &axi_data->stream_info[ @@ -1782,15 +1853,6 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) pr_err("%s: Invalid stream state\n", __func__); return -EINVAL; } - if (stream_info->state == ACTIVE && - stream_info->stream_type == BURST_STREAM && - (1 != update_cmd->num_streams || - UPDATE_STREAM_FRAMEDROP_PATTERN != - update_cmd->update_type)) { - pr_err("%s: Cannot update active burst stream\n", - __func__); - return -EINVAL; - } } for (i = 0; i < update_cmd->num_streams; i++) { @@ -1812,14 +1874,18 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) uint32_t framedrop_period = msm_isp_get_framedrop_period( update_info->skip_pattern); - stream_info->runtime_init_frame_drop = 0; if (update_info->skip_pattern == SKIP_ALL) stream_info->framedrop_pattern = 0x0; else stream_info->framedrop_pattern = 0x1; stream_info->framedrop_period = framedrop_period - 1; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); + if (stream_info->stream_type == BURST_STREAM) { + stream_info->runtime_framedrop_update_burst = 1; + } else { + stream_info->runtime_init_frame_drop = 0; + vfe_dev->hw_info->vfe_ops.axi_ops. + cfg_framedrop(vfe_dev, stream_info); + } break; } case UPDATE_STREAM_AXI_CONFIG: { @@ -1845,8 +1911,11 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) break; } case UPDATE_STREAM_REQUEST_FRAMES: { - stream_info->request_frm_num += - update_info->request_frm_num; + rc = msm_isp_request_frame(vfe_dev, stream_info, + update_info->request_frm_num); + if (rc) + pr_err("%s failed to request frame!\n", + __func__); break; } default: @@ -1868,7 +1937,7 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_composite_info *comp_info; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t frame_id = 0; + uint32_t pingpong_bit = 0, frame_id = 0; comp_mask = vfe_dev->hw_info->vfe_ops.axi_ops. get_comp_mask(irq_status0, irq_status1); @@ -1880,12 +1949,15 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); pingpong_status = vfe_dev->hw_info->vfe_ops.axi_ops.get_pingpong_status(vfe_dev); + frame_id = vfe_dev->axi_data. + src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id; for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { rc = 0; comp_info = &axi_data->composite_info[i]; if (comp_mask & (1 << i)) { stream_idx = HANDLE_TO_IDX(comp_info->stream_handle); - if ((!comp_info->stream_handle) || (stream_idx >= MAX_NUM_STREAM)) { + if ((!comp_info->stream_handle) || + (stream_idx >= MAX_NUM_STREAM)) { pr_err("%s: Invalid handle for composite irq\n", __func__); } else { @@ -1893,18 +1965,9 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, HANDLE_TO_IDX(comp_info->stream_handle); stream_info = &axi_data->stream_info[stream_idx]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, - stream_info->frame_id); - return; - } - stream_info->frame_id = frame_id; + + pingpong_bit = (~(pingpong_status >> + stream_info->wm[0]) & 0x1); if (stream_info->stream_type == BURST_STREAM) stream_info-> @@ -1915,11 +1978,16 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, if (stream_info->stream_type == CONTINUOUS_STREAM || stream_info-> - runtime_num_burst_capture >= 1) { + runtime_num_burst_capture > 1) { rc = msm_isp_cfg_ping_pong_address( vfe_dev, stream_info, - pingpong_status); + pingpong_status, + pingpong_bit); } + stream_info->frame_id = frame_id; + ISP_DBG("%s: stream id:%d frame id:%d\n", + __func__, stream_info->stream_id, + stream_info->frame_id); if (done_buf && !rc) msm_isp_process_done_buf(vfe_dev, stream_info, done_buf, ts); @@ -1931,22 +1999,16 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, for (i = 0; i < axi_data->hw_info->num_wm; i++) { if (wm_mask & (1 << i)) { stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]); - if ((!axi_data->free_wm[i]) || (stream_idx >= MAX_NUM_STREAM)) { + if ((!axi_data->free_wm[i]) || + (stream_idx >= MAX_NUM_STREAM)) { pr_err("%s: Invalid handle for wm irq\n", __func__); continue; } stream_info = &axi_data->stream_info[stream_idx]; - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, stream_info->frame_id); - return; - } + + pingpong_bit = (~(pingpong_status >> + stream_info->wm[0]) & 0x1); if (stream_info->stream_type == BURST_STREAM) stream_info->runtime_num_burst_capture--; @@ -1956,8 +2018,13 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, if (stream_info->stream_type == CONTINUOUS_STREAM || stream_info->runtime_num_burst_capture > 1) { rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status); + stream_info, pingpong_status, + pingpong_bit); } + stream_info->frame_id = frame_id; + ISP_DBG("%s: stream id:%d frame id:%d\n", + __func__, stream_info->stream_id, + stream_info->frame_id); if (done_buf && !rc) msm_isp_process_done_buf(vfe_dev, stream_info, done_buf, ts); @@ -1965,3 +2032,30 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, } return; } +int msm_isp_user_buf_done(struct vfe_device *vfe_dev, + struct msm_isp_event_data *buf_cmd) +{ + int rc = 0; + struct msm_isp_event_data buf_event; + memset(&buf_event, 0, sizeof(buf_event)); + buf_event.input_intf = buf_cmd->input_intf; + buf_event.frame_id = buf_cmd->frame_id; + buf_event.timestamp = buf_cmd->timestamp; + buf_event.u.buf_done.session_id = + buf_cmd->u.buf_done.session_id; + buf_event.u.buf_done.stream_id = + buf_cmd->u.buf_done.stream_id; + buf_event.u.buf_done.output_format = + buf_cmd->u.buf_done.output_format; + buf_event.u.buf_done.buf_idx = + buf_cmd->u.buf_done.buf_idx; + buf_event.u.buf_done.handle = + buf_cmd->u.buf_done.handle; + + vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr, + buf_event.u.buf_done.handle, + buf_event.u.buf_done.buf_idx, + &buf_event.timestamp, buf_event.frame_id, + buf_event.u.buf_done.output_format); + return rc; +} diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h index 8ef7583af592..d9a24e053da5 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -38,24 +38,32 @@ int msm_isp_axi_check_stream_state( struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd); void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); + struct msm_vfe_axi_shared_data *axi_data, + struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); +void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, + struct msm_vfe_axi_stream *stream_info); int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev); +int msm_isp_axi_halt(struct vfe_device *vfe_dev, + struct msm_vfe_axi_halt_cmd *halt_cmd); +int msm_isp_axi_reset(struct vfe_device *vfe_dev, + struct msm_vfe_axi_reset_cmd *reset_cmd); +int msm_isp_axi_restart(struct vfe_device *vfe_dev, + struct msm_vfe_axi_restart_cmd *restart_cmd); +int msm_isp_user_buf_done(struct vfe_device *vfe_dev, + struct msm_isp_event_data *buf_cmd); +void msm_isp_axi_stream_update(struct vfe_device *vfe_dev, + uint8_t input_src); -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev); - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev); +void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev, + uint8_t input_src); void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts); void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, uint32_t irq_status0, uint32_t irq_status1, struct msm_isp_timestamp *ts); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -uint8_t msm_isp_get_curr_stream_cnt(struct vfe_device *vfe_dev); -#endif #endif /* __MSM_ISP_AXI_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c index 50b1940fc34c..8a07b74a4f22 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2015,2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -12,6 +12,7 @@ #include #include #include +#include #include "msm_isp_util.h" #include "msm_isp_stats_util.h" @@ -24,24 +25,23 @@ static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, uint32_t pingpong_bit = 0; uint32_t bufq_handle = stream_info->bufq_handle; uint32_t stats_pingpong_offset; + uint32_t stats_idx = STATS_IDX(stream_info->stream_handle); - if (STATS_IDX(stream_info->stream_handle) >= - vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, - STATS_IDX(stream_info->stream_handle)); + if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type || + stats_idx >= MSM_ISP_STATS_MAX) { + pr_err("%s Invalid stats index %d", __func__, stats_idx); return -EINVAL; } stats_pingpong_offset = vfe_dev->hw_info->stats_hw_info->stats_ping_pong_offset[ - STATS_IDX(stream_info->stream_handle)]; + stats_idx]; pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); if (rc < 0) { - vfe_dev->error_info.stats_framedrop_count[ - STATS_IDX(stream_info->stream_handle)]++; + vfe_dev->error_info.stats_framedrop_count[stats_idx]++; return rc; } @@ -76,7 +76,6 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, struct msm_isp_stats_event *stats_event = &buf_event.u.stats; struct msm_isp_buffer *done_buf; struct msm_vfe_stats_stream *stream_info = NULL; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; uint32_t pingpong_status; uint32_t comp_stats_type_mask = 0, atomic_stats_mask = 0; uint32_t stats_comp_mask = 0, stats_irq_mask = 0; @@ -117,7 +116,7 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, memset(&buf_event, 0, sizeof(struct msm_isp_event_data)); buf_event.timestamp = ts->event_time; buf_event.frame_id = - vfe_dev->axi_data.frame_id[session_id]; + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; buf_event.input_intf = VFE_PIX_0; pingpong_status = vfe_dev->hw_info-> vfe_ops.stats_ops.get_pingpong_status(vfe_dev); @@ -126,6 +125,8 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, i++) { if (!(stats_irq_mask & (1 << i))) continue; + + stats_irq_mask &= ~(1 << i); stream_info = &vfe_dev->stats_data.stream_info[i]; done_buf = NULL; msm_isp_stats_cfg_ping_pong_address(vfe_dev, @@ -135,7 +136,7 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, vfe_dev->buf_mgr, done_buf->bufq_handle, done_buf->buf_idx, &ts->buf_time, vfe_dev->axi_data. - frame_id[session_id]); + src_info[VFE_PIX_0].frame_id); if (rc != 0) continue; @@ -157,7 +158,6 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, 1 << stream_info->stats_type; } } - stats_irq_mask &= ~(1 << i); } if (comp_stats_type_mask) { @@ -216,6 +216,7 @@ int msm_isp_stats_create_stream(struct vfe_device *vfe_dev, stream_info->stats_type = stream_req_cmd->stats_type; stream_info->buffer_offset = stream_req_cmd->buffer_offset; stream_info->framedrop_pattern = stream_req_cmd->framedrop_pattern; + stream_info->init_stats_frame_drop = stream_req_cmd->init_frame_drop; stream_info->irq_subsample_pattern = stream_req_cmd->irq_subsample_pattern; stream_info->state = STATS_INACTIVE; @@ -267,7 +268,10 @@ int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg) vfe_dev->hw_info->vfe_ops.stats_ops. cfg_wm_irq_mask(vfe_dev, stream_info); - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg(vfe_dev, stream_info); + if (stream_info->init_stats_frame_drop == 0) + vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg(vfe_dev, + stream_info); + return rc; } @@ -350,6 +354,27 @@ static void msm_isp_deinit_stats_ping_pong_reg( } } +void msm_isp_update_stats_framedrop_reg(struct vfe_device *vfe_dev) +{ + int i; + struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; + struct msm_vfe_stats_stream *stream_info = NULL; + + for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; i++) { + stream_info = &stats_data->stream_info[i]; + if (stream_info->state != STATS_ACTIVE) + continue; + + if (stream_info->init_stats_frame_drop) { + stream_info->init_stats_frame_drop--; + if (stream_info->init_stats_frame_drop == 0) { + vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg( + vfe_dev, stream_info); + } + } + } +} + void msm_isp_stats_stream_update(struct vfe_device *vfe_dev) { int i; @@ -402,6 +427,35 @@ static int msm_isp_stats_wait_for_cfg_done(struct vfe_device *vfe_dev) return rc; } +static int msm_isp_stats_update_cgc_override(struct vfe_device *vfe_dev, + struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) +{ + int i; + uint32_t stats_mask = 0, idx; + + if (stream_cfg_cmd->num_streams > MSM_ISP_STATS_MAX) { + pr_err("%s invalid num_streams %d\n", __func__, + stream_cfg_cmd->num_streams); + return -EINVAL; + } + + for (i = 0; i < stream_cfg_cmd->num_streams; i++) { + idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); + + if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { + pr_err("%s Invalid stats index %d", __func__, idx); + return -EINVAL; + } + stats_mask |= 1 << idx; + } + + if (vfe_dev->hw_info->vfe_ops.stats_ops.update_cgc_override) { + vfe_dev->hw_info->vfe_ops.stats_ops.update_cgc_override( + vfe_dev, stats_mask, stream_cfg_cmd->enable); + } + return 0; +} + static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) { @@ -412,6 +466,12 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info; struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; + if (stream_cfg_cmd->num_streams > MSM_ISP_STATS_MAX) { + pr_err("%s invalid num_streams %d\n", __func__, + stream_cfg_cmd->num_streams); + return -EINVAL; + } + num_stats_comp_mask = vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; rc = vfe_dev->hw_info->vfe_ops.stats_ops.check_streams( @@ -464,6 +524,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, stats_data->num_active_stream); } + if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); } else { @@ -560,16 +621,80 @@ int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg) { int rc = 0; struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - stats_data->stats_burst_len = stream_cfg_cmd->stats_burst_len; - if (vfe_dev->stats_data.num_active_stream == 0) vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev); - if (stream_cfg_cmd->enable) + if (stream_cfg_cmd->num_streams > MSM_ISP_STATS_MAX) { + pr_err("%s invalid num_streams %d\n", __func__, + stream_cfg_cmd->num_streams); + return -EINVAL; + } + + if (stream_cfg_cmd->enable) { + msm_isp_stats_update_cgc_override(vfe_dev, stream_cfg_cmd); + rc = msm_isp_start_stats_stream(vfe_dev, stream_cfg_cmd); - else + } else { rc = msm_isp_stop_stats_stream(vfe_dev, stream_cfg_cmd); + msm_isp_stats_update_cgc_override(vfe_dev, stream_cfg_cmd); + } + + return rc; +} + +int msm_isp_update_stats_stream(struct vfe_device *vfe_dev, void *arg) +{ + int rc = 0, i; + struct msm_vfe_stats_stream *stream_info; + struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; + struct msm_vfe_axi_stream_update_cmd *update_cmd = arg; + struct msm_vfe_axi_stream_cfg_update_info *update_info = NULL; + + /*validate request*/ + for (i = 0; i < update_cmd->num_streams; i++) { + update_info = &update_cmd->update_info[i]; + /*check array reference bounds*/ + if (STATS_IDX(update_info->stream_handle) + > vfe_dev->hw_info->stats_hw_info->num_stats_type) { + pr_err("%s: stats idx %d out of bound!", __func__, + STATS_IDX(update_info->stream_handle)); + return -EINVAL; + } + } + + for (i = 0; i < update_cmd->num_streams; i++) { + update_info = &update_cmd->update_info[i]; + stream_info = &stats_data->stream_info[ + STATS_IDX(update_info->stream_handle)]; + if (stream_info->stream_handle != + update_info->stream_handle) { + pr_err("%s: stats stream handle %x %x mismatch!\n", + __func__, stream_info->stream_handle, + update_info->stream_handle); + continue; + } + + switch (update_cmd->update_type) { + case UPDATE_STREAM_STATS_FRAMEDROP_PATTERN: { + uint32_t framedrop_period = + msm_isp_get_framedrop_period( + update_info->skip_pattern); + if (update_info->skip_pattern == SKIP_ALL) + stream_info->framedrop_pattern = 0x0; + else + stream_info->framedrop_pattern = 0x1; + stream_info->framedrop_period = framedrop_period - 1; + if (stream_info->init_stats_frame_drop == 0) + vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg( + vfe_dev, stream_info); + break; + } + + default: + pr_err("%s: Invalid update type\n", __func__); + return -EINVAL; + } + } return rc; } diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.h index 7b4c4b4eb0dc..ef2557c62f22 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.h +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -20,6 +20,8 @@ void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, struct msm_isp_timestamp *ts); void msm_isp_stats_stream_update(struct vfe_device *vfe_dev); int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg); +int msm_isp_update_stats_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg); +void msm_isp_update_stats_framedrop_reg(struct vfe_device *vfe_dev); #endif /* __MSM_ISP_STATS_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c index a2ec4d0fe54f..669ff76bf671 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -21,55 +21,13 @@ #include "msm_camera_io_util.h" #define MAX_ISP_V4l2_EVENTS 100 +#define MAX_ISP_REG_LIST 100 static DEFINE_MUTEX(bandwidth_mgr_mutex); static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr; -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MSM_MIN_REQ_VFE_CPP_BW 1700000000 +static uint64_t msm_isp_cpp_clk_rate; #define VFE40_8974V2_VERSION 0x1001001A - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_BOOST -#endif - -#ifdef CAMERA_BOOST -#define MBYTE (1ULL << 20) - -#define BW_MBPS(_bw) \ -{ \ - .vectors = &(struct msm_bus_vectors){ \ - .src = 1, \ - .dst = 512, \ - .ib = (_bw) * MBYTE, \ - .ab = 0, \ - }, \ - .num_paths = 1, \ -} - -static struct msm_bus_paths bw_level_tbl[] = { - [0] = BW_MBPS(381), /* At least 50 MHz on bus. */ - [1] = BW_MBPS(4066), /* At least 533 MHz on bus. */ -}; - -static struct msm_bus_scale_pdata bus_client_pdata = { - .usecase = bw_level_tbl, - .num_usecases = ARRAY_SIZE(bw_level_tbl), - .active_only = 1, - .name = "Camera_boost", -}; - -static u32 bus_client; -#endif - -static bool camera_boost_flag = true; -int32_t msm_isp_camera_boost(bool flag){ - camera_boost_flag = flag; - return 0; -} -EXPORT_SYMBOL(msm_isp_camera_boost); - static struct msm_bus_vectors msm_isp_init_vectors[] = { { .src = MSM_BUS_MASTER_VFE, @@ -118,8 +76,40 @@ static struct msm_bus_scale_pdata msm_isp_bus_client_pdata = { .name = "msm_camera_isp", }; -static void msm_isp_print_fourcc_error(const char *origin, - uint32_t fourcc_format) + +void msm_camera_io_dump_2(void __iomem *addr, int size) +{ + char line_str[128], *p_str; + int i; + u32 *p = (u32 *) addr; + u32 data; + pr_err("%s: %p %d\n", __func__, addr, size); + line_str[0] = '\0'; + p_str = line_str; + for (i = 0; i < size/4; i++) { + if (i % 4 == 0) { +#ifdef CONFIG_COMPAT + snprintf(p_str, 20, "%016lx: ", (unsigned long) p); + p_str += 18; +#else + snprintf(p_str, 12, "%08lx: ", (unsigned long) p); + p_str += 10; +#endif + } + data = readl_relaxed(p++); + snprintf(p_str, 12, "%08x ", data); + p_str += 9; + if ((i + 1) % 4 == 0) { + pr_err("%s\n", line_str); + line_str[0] = '\0'; + p_str = line_str; + } + } + if (line_str[0] != '\0') + pr_err("%s\n", line_str); +} + +void msm_isp_print_fourcc_error(const char *origin, uint32_t fourcc_format) { int i; char text[5]; @@ -137,18 +127,6 @@ static void msm_isp_print_fourcc_error(const char *origin, return; } -#ifdef CONFIG_COMPAT -struct msm_vfe_cfg_cmd2_32 { - uint16_t num_cfg; - uint16_t cmd_len; - compat_caddr_t cfg_data; - compat_caddr_t cfg_cmd; -}; - -#define VIDIOC_MSM_VFE_REG_CFG_COMPAT \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2_32) -#endif /* CONFIG_COMPAT */ - int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client) { int rc = 0; @@ -171,13 +149,6 @@ int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client) isp_bandwidth_mgr.bus_client, isp_bandwidth_mgr.bus_vector_active_idx); -#ifdef CAMERA_BOOST - if (!bus_client && camera_boost_flag) { - bus_client = msm_bus_scale_register_client(&bus_client_pdata); - msm_bus_scale_client_update_request(bus_client, 1); - } -#endif - mutex_unlock(&bandwidth_mgr_mutex); return 0; } @@ -202,8 +173,8 @@ int msm_isp_update_bandwidth(enum msm_isp_hw_client client, path = &(msm_isp_bus_client_pdata.usecase[ isp_bandwidth_mgr.bus_vector_active_idx]); - path->vectors[0].ab = MSM_ISP_MIN_AB; - path->vectors[0].ib = MSM_ISP_MIN_IB; + path->vectors[0].ab = 0; + path->vectors[0].ib = 0; for (i = 0; i < MAX_ISP_CLIENT; i++) { if (isp_bandwidth_mgr.client_info[i].active) { path->vectors[0].ab += @@ -212,18 +183,26 @@ int msm_isp_update_bandwidth(enum msm_isp_hw_client client, isp_bandwidth_mgr.client_info[i].ib; } } - /* All the clients combined i.e. VFE + CPP should use at least - minimum recommended bandwidth */ - if (path->vectors[0].ib < MSM_MIN_REQ_VFE_CPP_BW) - path->vectors[0].ib = MSM_MIN_REQ_VFE_CPP_BW; + ISP_DBG("%s: Total AB = %llu IB = %llu\n", __func__, + path->vectors[0].ab, path->vectors[0].ib); msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, isp_bandwidth_mgr.bus_vector_active_idx); + /* Insert into circular buffer */ + msm_isp_update_req_history(isp_bandwidth_mgr.bus_client, + path->vectors[0].ab, + path->vectors[0].ib, + isp_bandwidth_mgr.client_info, + sched_clock()); mutex_unlock(&bandwidth_mgr_mutex); return 0; } void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client) { + if (client >= MAX_ISP_CLIENT) { + pr_err("invalid Client id %d", client); + return; + } mutex_lock(&bandwidth_mgr_mutex); memset(&isp_bandwidth_mgr.client_info[client], 0, sizeof(struct msm_isp_bandwidth_info)); @@ -241,19 +220,44 @@ void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client) msm_bus_scale_client_update_request( isp_bandwidth_mgr.bus_client, 0); msm_bus_scale_unregister_client(isp_bandwidth_mgr.bus_client); - -#ifdef CAMERA_BOOST - if(bus_client){ - msm_bus_scale_client_update_request(bus_client, 0); - msm_bus_scale_unregister_client(bus_client); - bus_client = 0; - } -#endif - isp_bandwidth_mgr.bus_client = 0; mutex_unlock(&bandwidth_mgr_mutex); } +void msm_isp_util_get_bandwidth_stats(struct vfe_device *vfe_dev, + struct msm_isp_statistics *stats) +{ + stats->isp_vfe0_active = isp_bandwidth_mgr.client_info[ISP_VFE0].active; + stats->isp_vfe0_ab = isp_bandwidth_mgr.client_info[ISP_VFE0].ab; + stats->isp_vfe0_ib = isp_bandwidth_mgr.client_info[ISP_VFE0].ib; + + stats->isp_vfe1_active = isp_bandwidth_mgr.client_info[ISP_VFE1].active; + stats->isp_vfe1_ab = isp_bandwidth_mgr.client_info[ISP_VFE1].ab; + stats->isp_vfe1_ib = isp_bandwidth_mgr.client_info[ISP_VFE1].ib; + + stats->isp_cpp_active = isp_bandwidth_mgr.client_info[ISP_CPP].active; + stats->isp_cpp_ab = isp_bandwidth_mgr.client_info[ISP_CPP].ab; + stats->isp_cpp_ib = isp_bandwidth_mgr.client_info[ISP_CPP].ib; + stats->last_overflow_ab = vfe_dev->msm_isp_last_overflow_ab; + stats->last_overflow_ib = vfe_dev->msm_isp_last_overflow_ib; + stats->vfe_clk_rate = vfe_dev->msm_isp_vfe_clk_rate; + stats->cpp_clk_rate = msm_isp_cpp_clk_rate; +} + +void msm_isp_util_update_last_overflow_ab_ib(struct vfe_device *vfe_dev) +{ + struct msm_bus_paths *path; + path = &(msm_isp_bus_client_pdata.usecase[ + isp_bandwidth_mgr.bus_vector_active_idx]); + vfe_dev->msm_isp_last_overflow_ab = path->vectors[0].ab; + vfe_dev->msm_isp_last_overflow_ib = path->vectors[0].ib; +} + +void msm_isp_util_update_clk_rate(long clock_rate) +{ + msm_isp_cpp_clk_rate = clock_rate; +} + uint32_t msm_isp_get_framedrop_period( enum msm_vfe_frame_skip_pattern frame_skip_pattern) { @@ -266,6 +270,13 @@ uint32_t msm_isp_get_framedrop_period( case EVERY_6FRAME: case EVERY_7FRAME: case EVERY_8FRAME: + case EVERY_9FRAME: + case EVERY_10FRAME: + case EVERY_11FRAME: + case EVERY_12FRAME: + case EVERY_13FRAME: + case EVERY_14FRAME: + case EVERY_15FRAME: return frame_skip_pattern + 1; case EVERY_16FRAME: return 16; @@ -321,7 +332,8 @@ int msm_isp_get_clk_info(struct vfe_device *vfe_dev, return rc; } for (i = 0; i < count; i++) { - vfe_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; + vfe_clk_info[i].clk_rate = + (rates[i] == 0) ? (long)-1 : rates[i]; ISP_DBG("clk_rate[%d] = %ld\n", i, vfe_clk_info[i].clk_rate); } vfe_dev->num_clk = count; @@ -383,14 +395,14 @@ static int msm_isp_get_max_clk_rate(struct vfe_device *vfe_dev, long *rate) long round_rate = 0; if (!vfe_dev || !rate) { - pr_err("%s:%d failed: vfe_dev %pK rate %pK\n", __func__, __LINE__, + pr_err("%s:%d failed: vfe_dev %p rate %p\n", __func__, __LINE__, vfe_dev, rate); return -EINVAL; } *rate = 0; if (!vfe_dev->hw_info) { - pr_err("%s:%d failed: vfe_dev->hw_info %pK\n", __func__, + pr_err("%s:%d failed: vfe_dev->hw_info %p\n", __func__, __LINE__, vfe_dev->hw_info); return -EINVAL; } @@ -430,9 +442,29 @@ static int msm_isp_set_clk_rate(struct vfe_device *vfe_dev, long *rate) return rc; } *rate = round_rate; + vfe_dev->msm_isp_vfe_clk_rate = round_rate; return 0; } +void msm_isp_fetch_engine_done_notify(struct vfe_device *vfe_dev, + struct msm_vfe_fetch_engine_info *fetch_engine_info) +{ + struct msm_isp_event_data fe_rd_done_event; + if (!fetch_engine_info->is_busy) + return; + memset(&fe_rd_done_event, 0, sizeof(struct msm_isp_event_data)); + fe_rd_done_event.frame_id = + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; + fe_rd_done_event.u.buf_done.session_id = fetch_engine_info->session_id; + fe_rd_done_event.u.buf_done.stream_id = fetch_engine_info->stream_id; + fe_rd_done_event.u.buf_done.handle = fetch_engine_info->bufq_handle; + fe_rd_done_event.u.buf_done.buf_idx = fetch_engine_info->buf_idx; + ISP_DBG("%s:VFE%d ISP_EVENT_FE_READ_DONE buf_idx %d\n", + __func__, vfe_dev->pdev->id, fetch_engine_info->buf_idx); + fetch_engine_info->is_busy = 0; + msm_isp_send_event(vfe_dev, ISP_EVENT_FE_READ_DONE, &fe_rd_done_event); +} + int msm_isp_cfg_pix(struct vfe_device *vfe_dev, struct msm_vfe_input_cfg *input_cfg) { @@ -446,8 +478,8 @@ int msm_isp_cfg_pix(struct vfe_device *vfe_dev, input_cfg->input_pix_clk; vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux = input_cfg->d.pix_cfg.input_mux; - vfe_dev->axi_data.src_info[VFE_PIX_0].width = - input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; + vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = + input_cfg->d.pix_cfg.input_format; rc = msm_isp_set_clk_rate(vfe_dev, &vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock); @@ -456,11 +488,19 @@ int msm_isp_cfg_pix(struct vfe_device *vfe_dev, return rc; } - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = - input_cfg->d.pix_cfg.input_format; + ISP_DBG("%s: input mux is %d CAMIF %d io_format 0x%x\n", __func__, + input_cfg->d.pix_cfg.input_mux, CAMIF, + input_cfg->d.pix_cfg.input_format); - vfe_dev->hw_info->vfe_ops.core_ops.cfg_camif( - vfe_dev, &input_cfg->d.pix_cfg); + if (input_cfg->d.pix_cfg.input_mux == CAMIF) { + vfe_dev->axi_data.src_info[VFE_PIX_0].width = + input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; + } else if (input_cfg->d.pix_cfg.input_mux == EXTERNAL_READ) { + vfe_dev->axi_data.src_info[VFE_PIX_0].width = + input_cfg->d.pix_cfg.fetch_engine_cfg.buf_stride; + } + vfe_dev->hw_info->vfe_ops.core_ops.cfg_input_mux( + vfe_dev, &input_cfg->d.pix_cfg); return rc; } @@ -502,12 +542,162 @@ int msm_isp_cfg_input(struct vfe_device *vfe_dev, void *arg) return rc; } +static int msm_isp_proc_cmd_list_unlocked(struct vfe_device *vfe_dev, void *arg) +{ + int rc = 0; + uint32_t count = 0; + struct msm_vfe_cfg_cmd_list *proc_cmd = + (struct msm_vfe_cfg_cmd_list *)arg; + struct msm_vfe_cfg_cmd_list cmd, cmd_next; + + if (!vfe_dev || !arg) { + pr_err("%s:%d failed: vfe_dev %p arg %p", __func__, __LINE__, + vfe_dev, arg); + return -EINVAL; + } + + rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd->cfg_cmd); + if (rc < 0) + pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); + + cmd = *proc_cmd; + + while (cmd.next) { + if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list)) { + pr_err("%s:%d failed: next size %u != expected %zu\n", + __func__, __LINE__, cmd.next_size, + sizeof(struct msm_vfe_cfg_cmd_list)); + break; + } + if (++count >= MAX_ISP_REG_LIST) { + pr_err("%s:%d Error exceeding the max register count:%u\n", + __func__, __LINE__, count); + rc = -EINVAL; + break; + } + if (copy_from_user(&cmd_next, (void __user *)cmd.next, + sizeof(struct msm_vfe_cfg_cmd_list))) { + rc = -EFAULT; + continue; + } + + rc = msm_isp_proc_cmd(vfe_dev, &cmd_next.cfg_cmd); + if (rc < 0) + pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); + + cmd = cmd_next; + } + return rc; +} + +#ifdef CONFIG_COMPAT +struct msm_vfe_cfg_cmd2_32 { + uint16_t num_cfg; + uint16_t cmd_len; + compat_caddr_t cfg_data; + compat_caddr_t cfg_cmd; +}; + +struct msm_vfe_cfg_cmd_list_32 { + struct msm_vfe_cfg_cmd2_32 cfg_cmd; + compat_caddr_t next; + uint32_t next_size; +}; + +#define VIDIOC_MSM_VFE_REG_CFG_COMPAT \ + _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2_32) +#define VIDIOC_MSM_VFE_REG_LIST_CFG_COMPAT \ + _IOWR('V', BASE_VIDIOC_PRIVATE+14, struct msm_vfe_cfg_cmd_list_32) + +static void msm_isp_compat_to_proc_cmd(struct msm_vfe_cfg_cmd2 *proc_cmd, + struct msm_vfe_cfg_cmd2_32 *proc_cmd_ptr32) +{ + proc_cmd->num_cfg = proc_cmd_ptr32->num_cfg; + proc_cmd->cmd_len = proc_cmd_ptr32->cmd_len; + proc_cmd->cfg_data = compat_ptr(proc_cmd_ptr32->cfg_data); + proc_cmd->cfg_cmd = compat_ptr(proc_cmd_ptr32->cfg_cmd); +} + +static int msm_isp_proc_cmd_list_compat(struct vfe_device *vfe_dev, void *arg) +{ + int rc = 0; + uint32_t count = 0; + struct msm_vfe_cfg_cmd_list_32 *proc_cmd = + (struct msm_vfe_cfg_cmd_list_32 *)arg; + struct msm_vfe_cfg_cmd_list_32 cmd, cmd_next; + struct msm_vfe_cfg_cmd2 current_cmd; + + if (!vfe_dev || !arg) { + pr_err("%s:%d failed: vfe_dev %p arg %p", __func__, __LINE__, + vfe_dev, arg); + return -EINVAL; + } + msm_isp_compat_to_proc_cmd(¤t_cmd, &proc_cmd->cfg_cmd); + rc = msm_isp_proc_cmd(vfe_dev, ¤t_cmd); + if (rc < 0) + pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); + + cmd = *proc_cmd; + + while (NULL != compat_ptr(cmd.next)) { + if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list_32)) { + pr_err("%s:%d failed: next size %u != expected %zu\n", + __func__, __LINE__, cmd.next_size, + sizeof(struct msm_vfe_cfg_cmd_list)); + break; + } + if (++count >= MAX_ISP_REG_LIST) { + pr_err("%s:%d Error exceeding the max register count:%u\n", + __func__, __LINE__, count); + rc = -EINVAL; + break; + } + if (copy_from_user(&cmd_next, compat_ptr(cmd.next), + sizeof(struct msm_vfe_cfg_cmd_list_32))) { + rc = -EFAULT; + continue; + } + + msm_isp_compat_to_proc_cmd(¤t_cmd, &cmd_next.cfg_cmd); + rc = msm_isp_proc_cmd(vfe_dev, ¤t_cmd); + if (rc < 0) + pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); + + cmd = cmd_next; + } + return rc; +} + +static int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) +{ + if (is_compat_task()) + return msm_isp_proc_cmd_list_compat(vfe_dev, arg); + else + return msm_isp_proc_cmd_list_unlocked(vfe_dev, arg); +} +#else /* CONFIG_COMPAT */ +static int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) +{ + return msm_isp_proc_cmd_list_unlocked(vfe_dev, arg); +} +#endif /* CONFIG_COMPAT */ + + static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { long rc = 0; struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); + if (!vfe_dev || !vfe_dev->vfe_base) { + pr_err("%s:%d failed: invalid params %p\n", + __func__, __LINE__, vfe_dev); + if (vfe_dev) + pr_err("%s:%d failed %p\n", __func__, + __LINE__, vfe_dev->vfe_base); + return -EINVAL; + } + /* use real time mutex for hard real-time ioctls such as * buffer operations and register updates. * Use core mutex for other ioctls that could take @@ -531,9 +721,9 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, case VIDIOC_MSM_ISP_REQUEST_BUF: case VIDIOC_MSM_ISP_ENQUEUE_BUF: case VIDIOC_MSM_ISP_RELEASE_BUF: { - mutex_lock(&vfe_dev->realtime_mutex); + mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_proc_buf_cmd(vfe_dev->buf_mgr, cmd, arg); - mutex_unlock(&vfe_dev->realtime_mutex); + mutex_unlock(&vfe_dev->core_mutex); break; } case VIDIOC_MSM_ISP_REQUEST_STREAM: @@ -551,15 +741,40 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, rc = msm_isp_cfg_axi_stream(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; + case VIDIOC_MSM_ISP_AXI_HALT: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_axi_halt(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; + case VIDIOC_MSM_ISP_AXI_RESET: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_axi_reset(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; + case VIDIOC_MSM_ISP_AXI_RESTART: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_axi_restart(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; case VIDIOC_MSM_ISP_INPUT_CFG: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_cfg_input(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; + case VIDIOC_MSM_ISP_FETCH_ENG_START: + mutex_lock(&vfe_dev->core_mutex); + rc = vfe_dev->hw_info->vfe_ops.core_ops. + start_fetch_eng(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; case VIDIOC_MSM_ISP_REG_UPDATE_CMD: if (arg) { - enum msm_vfe_input_src frame_src = *((enum msm_vfe_input_src *)arg); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << frame_src)); + enum msm_vfe_input_src frame_src = + *((enum msm_vfe_input_src *)arg); + vfe_dev->hw_info->vfe_ops.core_ops. + reg_update(vfe_dev, (1 << frame_src)); + vfe_dev->axi_data.src_info[frame_src].last_updt_frm_id = + vfe_dev->axi_data.src_info[frame_src].frame_id; } break; case VIDIOC_MSM_ISP_SET_SRC_STATE: @@ -582,11 +797,29 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, rc = msm_isp_cfg_stats_stream(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; + case VIDIOC_MSM_ISP_UPDATE_STATS_STREAM: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_update_stats_stream(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; case VIDIOC_MSM_ISP_UPDATE_STREAM: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_update_axi_stream(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; + case VIDIOC_MSM_ISP_SMMU_ATTACH: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_smmu_attach(vfe_dev->buf_mgr, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; + case MSM_SD_NOTIFY_FREEZE: + vfe_dev->isp_sof_debug = 0; + break; + case VIDIOC_MSM_ISP_BUF_DONE: + mutex_lock(&vfe_dev->core_mutex); + rc = msm_isp_user_buf_done(vfe_dev, arg); + mutex_unlock(&vfe_dev->core_mutex); + break; case MSM_SD_SHUTDOWN: while (vfe_dev->vfe_open_cnt != 0) msm_isp_close_node(sd, NULL); @@ -599,33 +832,68 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, return rc; } + #ifdef CONFIG_COMPAT static long msm_isp_ioctl_compat(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { + struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); long rc = 0; - void __user *up; - if (is_compat_task()) { - up = compat_ptr((unsigned long)arg); - arg = up; + + if (!vfe_dev || !vfe_dev->vfe_base) { + pr_err("%s:%d failed: invalid params %p\n", + __func__, __LINE__, vfe_dev); + if (vfe_dev) + pr_err("%s:%d failed %p\n", __func__, + __LINE__, vfe_dev->vfe_base); + return -EINVAL; } switch (cmd) { case VIDIOC_MSM_VFE_REG_CFG_COMPAT: { - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); struct msm_vfe_cfg_cmd2 proc_cmd; - struct msm_vfe_cfg_cmd2_32 *proc_cmd_ptr32; mutex_lock(&vfe_dev->realtime_mutex); - proc_cmd_ptr32 = (struct msm_vfe_cfg_cmd2_32 *) - compat_ptr((unsigned long)arg); - proc_cmd.num_cfg = proc_cmd_ptr32->num_cfg; - proc_cmd.cmd_len = proc_cmd_ptr32->cmd_len; - proc_cmd.cfg_data = compat_ptr(proc_cmd_ptr32->cfg_data); - proc_cmd.cfg_cmd = compat_ptr(proc_cmd_ptr32->cfg_cmd); + msm_isp_compat_to_proc_cmd(&proc_cmd, + (struct msm_vfe_cfg_cmd2_32 *) arg); rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd); mutex_unlock(&vfe_dev->realtime_mutex); break; } + case VIDIOC_MSM_VFE_REG_LIST_CFG_COMPAT: { + mutex_lock(&vfe_dev->realtime_mutex); + rc = msm_isp_proc_cmd_list(vfe_dev, arg); + mutex_unlock(&vfe_dev->realtime_mutex); + break; + } + case VIDIOC_MSM_ISP_BUF_DONE: { + struct msm_isp_event_data buf_event; + struct msm_isp_event_data32 *buf_event32; + memset(&buf_event, 0, sizeof(buf_event)); + buf_event32 = + (struct msm_isp_event_data32 *)arg; + buf_event.input_intf = buf_event32->input_intf; + buf_event.frame_id = buf_event32->frame_id; + buf_event.timestamp.tv_sec = + buf_event32->timestamp.tv_sec; + buf_event.timestamp.tv_usec = + buf_event32->timestamp.tv_usec; + buf_event.mono_timestamp.tv_sec = + buf_event32->mono_timestamp.tv_sec; + buf_event.mono_timestamp.tv_usec = + buf_event32->mono_timestamp.tv_usec; + buf_event.u.buf_done.session_id = + buf_event32->u.buf_done.session_id; + buf_event.u.buf_done.stream_id = + buf_event32->u.buf_done.stream_id; + buf_event.u.buf_done.output_format = + buf_event32->u.buf_done.output_format; + buf_event.u.buf_done.buf_idx = + buf_event32->u.buf_done.buf_idx; + buf_event.u.buf_done.handle = + buf_event32->u.buf_done.handle; + cmd = VIDIOC_MSM_ISP_BUF_DONE; + return msm_isp_ioctl_unlocked(sd, cmd, &buf_event); + } default: return msm_isp_ioctl_unlocked(sd, cmd, arg); } @@ -651,13 +919,13 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, uint32_t *cfg_data, uint32_t cmd_len) { if (!vfe_dev || !reg_cfg_cmd) { - pr_err("%s:%d failed: vfe_dev %pK reg_cfg_cmd %pK\n", __func__, + pr_err("%s:%d failed: vfe_dev %p reg_cfg_cmd %p\n", __func__, __LINE__, vfe_dev, reg_cfg_cmd); return -EINVAL; } if ((reg_cfg_cmd->cmd_type != VFE_CFG_MASK) && (!cfg_data || !cmd_len)) { - pr_err("%s:%d failed: cmd type %d cfg_data %pK cmd_len %d\n", + pr_err("%s:%d failed: cmd type %d cfg_data %p cmd_len %d\n", __func__, __LINE__, reg_cfg_cmd->cmd_type, cfg_data, cmd_len); return -EINVAL; @@ -672,7 +940,8 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || ((reg_cfg_cmd->u.rw_info.reg_offset + reg_cfg_cmd->u.rw_info.len) > - resource_size(vfe_dev->vfe_mem))) { + resource_size(vfe_dev->vfe_mem)) || + (reg_cfg_cmd->u.rw_info.reg_offset & 0x3)) { pr_err("%s:%d reg_offset %d len %d res %d\n", __func__, __LINE__, reg_cfg_cmd->u.rw_info.reg_offset, @@ -701,7 +970,7 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, case VFE_READ_DMI_32BIT: case VFE_READ_DMI_64BIT: { if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT || - reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { + reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { if ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset <= reg_cfg_cmd->u.dmi_info.lo_tbl_offset) || (reg_cfg_cmd->u.dmi_info.hi_tbl_offset - @@ -771,7 +1040,8 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, reg_cfg_cmd->u.mask_info.reg_offset) || (resource_size(vfe_dev->vfe_mem) < reg_cfg_cmd->u.mask_info.reg_offset + - sizeof(temp))) { + sizeof(temp)) || + (reg_cfg_cmd->u.mask_info.reg_offset & 0x3)) { pr_err("%s: VFE_CFG_MASK: Invalid length\n", __func__); return -EINVAL; } @@ -829,6 +1099,7 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, hi_tbl_ptr = cfg_data + reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; } + lo_tbl_ptr = cfg_data + reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; @@ -857,34 +1128,26 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, break; } case VFE_HW_UPDATE_LOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; uint32_t update_id = vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id; - if (vfe_dev->axi_data.frame_id[session_id] != *cfg_data - || update_id == *cfg_data) { - pr_err("hw update lock failed,acquire id %u\n", - *cfg_data); - pr_err("hw update lock failed,current id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - pr_err("hw update lock failed,last id %u\n", + if (update_id) { + ISP_DBG("%s hw update lock failed cur id %u, last id %u\n", + __func__, + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id, update_id); return -EINVAL; } break; } case VFE_HW_UPDATE_UNLOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - if (vfe_dev->axi_data.frame_id[session_id] + if (vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id != *cfg_data) { - pr_err("hw update across frame boundary,begin id %u\n", - *cfg_data); - pr_err("hw update across frame boundary,end id %u\n", - vfe_dev->axi_data.frame_id[session_id]); + ISP_DBG("hw update across frame boundary,begin id %u, end id %d\n", + *cfg_data, + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id); } vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id = - vfe_dev->axi_data.frame_id[session_id]; + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; break; } case VFE_READ: { @@ -906,26 +1169,29 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, } case GET_MAX_CLK_RATE: { int rc = 0; + unsigned long rate; - if (cmd_len < sizeof(unsigned long)) { + if (cmd_len != sizeof(__u32)) { pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", __func__, __LINE__, cmd_len, - sizeof(unsigned long)); + sizeof(__u32)); return -EINVAL; } - rc = msm_isp_get_max_clk_rate(vfe_dev, - (unsigned long *)cfg_data); + rc = msm_isp_get_max_clk_rate(vfe_dev, &rate); if (rc < 0) { pr_err("%s:%d failed: rc %d\n", __func__, __LINE__, rc); return -EINVAL; } + + *(__u32 *)cfg_data = (__u32)rate; + break; } case GET_ISP_ID: { uint32_t *isp_id = NULL; if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %u\n", + pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", __func__, __LINE__, cmd_len, sizeof(uint32_t)); return -EINVAL; @@ -935,14 +1201,17 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, *isp_id = vfe_dev->pdev->id; break; } - case SET_WM_UB_SIZE: { - if (cmd_len < sizeof(uint32_t)) { + case SET_WM_UB_SIZE: + break; + case SET_UB_POLICY: { + + if (cmd_len < sizeof(vfe_dev->vfe_ub_policy)) { pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", __func__, __LINE__, cmd_len, - sizeof(uint32_t)); + sizeof(vfe_dev->vfe_ub_policy)); return -EINVAL; } - vfe_dev->vfe_ub_size = *cfg_data; + vfe_dev->vfe_ub_policy = *cfg_data; break; } } @@ -992,16 +1261,9 @@ int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg) } } - //pr_err("%s: platform_id=%u, kernel_id=%u\n", __func__,proc_cmd->frame_id, vfe_dev->frame_id); - if( (vfe_dev->frame_id == proc_cmd->frame_id && vfe_dev->eof_event_occur != 1) - || proc_cmd->frame_id == 0) { - for (i = 0; i < proc_cmd->num_cfg; i++) - msm_isp_send_hw_cmd(vfe_dev, ®_cfg_cmd[i], cfg_data, proc_cmd->cmd_len); - } else{ - rc = MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR; - pr_err("%s: skip hw update, platform_id=%u, kernel_id=%u, eof_event_occur=%u\n", - __func__,proc_cmd->frame_id, vfe_dev->frame_id, vfe_dev->eof_event_occur); - } + for (i = 0; i < proc_cmd->num_cfg; i++) + rc = msm_isp_send_hw_cmd(vfe_dev, ®_cfg_cmd[i], + cfg_data, proc_cmd->cmd_len); if (copy_to_user(proc_cmd->cfg_data, cfg_data, proc_cmd->cmd_len)) { @@ -1017,47 +1279,6 @@ reg_cfg_failed: return rc; } -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_cfg_cmd_list *proc_cmd = - (struct msm_vfe_cfg_cmd_list *)arg; - struct msm_vfe_cfg_cmd_list cmd, cmd_next; - - if (!vfe_dev || !arg) { - pr_err("%s:%d failed: vfe_dev %pK arg %pK", __func__, __LINE__, - vfe_dev, arg); - return -EINVAL; - } - - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd->cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = *proc_cmd; - - while (cmd.next) { - if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list)) { - pr_err("%s:%d failed: next size %u != expected %zu\n", - __func__, __LINE__, cmd.next_size, - sizeof(struct msm_vfe_cfg_cmd_list)); - break; - } - if (copy_from_user(&cmd_next, (void __user *)cmd.next, - sizeof(struct msm_vfe_cfg_cmd_list))) { - rc = -EFAULT; - continue; - } - - rc = msm_isp_proc_cmd(vfe_dev, &cmd_next.cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = cmd_next; - } - return rc; -} - int msm_isp_send_event(struct vfe_device *vfe_dev, uint32_t event_type, struct msm_isp_event_data *event_data) @@ -1103,6 +1324,12 @@ int msm_isp_cal_word_per_line(uint32_t output_format, case V4L2_PIX_FMT_SRGGB12: val = CAL_WORD(pixel_per_line, 3, 16); break; + case V4L2_PIX_FMT_SBGGR14: + case V4L2_PIX_FMT_SGBRG14: + case V4L2_PIX_FMT_SGRBG14: + case V4L2_PIX_FMT_SRGGB14: + val = CAL_WORD(pixel_per_line, 7, 32); + break; case V4L2_PIX_FMT_QBGGR10: case V4L2_PIX_FMT_QGBRG10: case V4L2_PIX_FMT_QGRBG10: @@ -1115,6 +1342,12 @@ int msm_isp_cal_word_per_line(uint32_t output_format, case V4L2_PIX_FMT_QRGGB12: val = CAL_WORD(pixel_per_line, 1, 5); break; + case V4L2_PIX_FMT_QBGGR14: + case V4L2_PIX_FMT_QGBRG14: + case V4L2_PIX_FMT_QGRBG14: + case V4L2_PIX_FMT_QRGGB14: + val = CAL_WORD(pixel_per_line, 1, 4); + break; case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: case V4L2_PIX_FMT_NV14: @@ -1128,6 +1361,12 @@ int msm_isp_cal_word_per_line(uint32_t output_format, case V4L2_PIX_FMT_UYVY: case V4L2_PIX_FMT_VYUY: val = CAL_WORD(pixel_per_line, 2, 8); + break; + case V4L2_PIX_FMT_P16BGGR10: + case V4L2_PIX_FMT_P16GBRG10: + case V4L2_PIX_FMT_P16GRBG10: + case V4L2_PIX_FMT_P16RGGB10: + val = CAL_WORD(pixel_per_line, 1, 4); break; /*TD: Add more image format*/ default: @@ -1152,6 +1391,10 @@ enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format) case V4L2_PIX_FMT_SGBRG12: case V4L2_PIX_FMT_SGRBG12: case V4L2_PIX_FMT_SRGGB12: + case V4L2_PIX_FMT_SBGGR14: + case V4L2_PIX_FMT_SGBRG14: + case V4L2_PIX_FMT_SGRBG14: + case V4L2_PIX_FMT_SRGGB14: return MIPI; case V4L2_PIX_FMT_QBGGR8: case V4L2_PIX_FMT_QGBRG8: @@ -1165,7 +1408,16 @@ enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format) case V4L2_PIX_FMT_QGBRG12: case V4L2_PIX_FMT_QGRBG12: case V4L2_PIX_FMT_QRGGB12: + case V4L2_PIX_FMT_QBGGR14: + case V4L2_PIX_FMT_QGBRG14: + case V4L2_PIX_FMT_QGRBG14: + case V4L2_PIX_FMT_QRGGB14: return QCOM; + case V4L2_PIX_FMT_P16BGGR10: + case V4L2_PIX_FMT_P16GBRG10: + case V4L2_PIX_FMT_P16GRBG10: + case V4L2_PIX_FMT_P16RGGB10: + return PLAIN16; default: msm_isp_print_fourcc_error(__func__, output_format); break; @@ -1225,6 +1477,10 @@ int msm_isp_get_bit_per_pixel(uint32_t output_format) case V4L2_PIX_FMT_QRGGB10: case V4L2_PIX_FMT_Y10: case V4L2_PIX_FMT_Y10BPACK: + case V4L2_PIX_FMT_P16BGGR10: + case V4L2_PIX_FMT_P16GBRG10: + case V4L2_PIX_FMT_P16GRBG10: + case V4L2_PIX_FMT_P16RGGB10: return 10; case V4L2_PIX_FMT_SBGGR12: case V4L2_PIX_FMT_SGBRG12: @@ -1236,6 +1492,15 @@ int msm_isp_get_bit_per_pixel(uint32_t output_format) case V4L2_PIX_FMT_QRGGB12: case V4L2_PIX_FMT_Y12: return 12; + case V4L2_PIX_FMT_SBGGR14: + case V4L2_PIX_FMT_SGBRG14: + case V4L2_PIX_FMT_SGRBG14: + case V4L2_PIX_FMT_SRGGB14: + case V4L2_PIX_FMT_QBGGR14: + case V4L2_PIX_FMT_QGBRG14: + case V4L2_PIX_FMT_QGRBG14: + case V4L2_PIX_FMT_QRGGB14: + return 14; case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: case V4L2_PIX_FMT_Y16: @@ -1243,11 +1508,9 @@ int msm_isp_get_bit_per_pixel(uint32_t output_format) /*TD: Add more image format*/ default: msm_isp_print_fourcc_error(__func__, output_format); -#if defined(CONFIG_SENSOR_8_BPP) - return 8; -#else + pr_err("%s: Invalid output format %x\n", + __func__, output_format); return -EINVAL; -#endif } } @@ -1305,23 +1568,25 @@ static inline void msm_isp_update_error_info(struct vfe_device *vfe_dev, vfe_dev->error_info.error_count++; } -static inline void msm_isp_process_overflow_irq( +static void msm_isp_process_overflow_irq( struct vfe_device *vfe_dev, uint32_t *irq_status0, uint32_t *irq_status1) { uint32_t overflow_mask; - uint32_t halt_restart_mask0, halt_restart_mask1; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - uint8_t cur_stream_cnt = 0; -#endif + + /* if there are no active streams - do not start recovery */ + if (!vfe_dev->axi_data.num_active_stream) + return; + /*Mask out all other irqs if recovery is started*/ - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { + if (atomic_read(&vfe_dev->error_info.overflow_state) != NO_OVERFLOW) { + uint32_t halt_restart_mask0, halt_restart_mask1; vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); + get_halt_restart_mask(&halt_restart_mask0, + &halt_restart_mask1); *irq_status0 &= halt_restart_mask0; *irq_status1 &= halt_restart_mask1; + return; } @@ -1329,115 +1594,63 @@ static inline void msm_isp_process_overflow_irq( vfe_dev->hw_info->vfe_ops.core_ops. get_overflow_mask(&overflow_mask); overflow_mask &= *irq_status1; + if (overflow_mask) { -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - /* When immediate stop is issued during streamoff and - AXI bridge is halted, if write masters are still - active, then it's possible to get overflow Irq - because WM is still writing pixels into UB, but UB - has no way to write into bus. Since everything is - being stopped anyway, skip the overflow recovery */ - return; - } -#endif - pr_err("%s: Bus overflow detected: 0x%x\n", - __func__, overflow_mask); + struct msm_isp_event_data error_event; + + if (vfe_dev->reset_pending == 1) { + pr_err("%s:%d failed: overflow %x during reset\n", + __func__, __LINE__, overflow_mask); + /* Clear overflow bits since reset is pending */ + *irq_status1 &= ~overflow_mask; + return; + } + + ISP_DBG("%s: Bus overflow detected: 0x%x, start recovery!\n", + __func__, overflow_mask); atomic_set(&vfe_dev->error_info.overflow_state, - OVERFLOW_DETECTED); - pr_err("%s: Start bus overflow recovery\n", __func__); + OVERFLOW_DETECTED); /*Store current IRQ mask*/ vfe_dev->hw_info->vfe_ops.core_ops.get_irq_mask(vfe_dev, &vfe_dev->error_info.overflow_recover_irq_mask0, &vfe_dev->error_info.overflow_recover_irq_mask1); + + /*Halt the hardware & Clear all other IRQ mask*/ + vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 0); + /*Stop CAMIF Immediately*/ vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - /*Halt the hardware & Clear all other IRQ mask*/ - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 0); + /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, HALT_REQUESTED); *irq_status0 = 0; *irq_status1 = 0; - } -} -static inline void msm_isp_reset_burst_count( - struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_stream_request_cmd framedrop_info; - memset(&framedrop_info, 0, sizeof(struct msm_vfe_axi_stream_request_cmd)); - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - if (stream_info->stream_type == BURST_STREAM && - stream_info->num_burst_capture != 0) { - framedrop_info.axi_stream_handle = i; - framedrop_info.burst_count = - stream_info->num_burst_capture; - framedrop_info.frame_skip_pattern = - stream_info->frame_skip_pattern; - framedrop_info.init_frame_drop = 0; - msm_isp_calculate_framedrop(&vfe_dev->axi_data, - &framedrop_info); - } + memset(&error_event, 0, sizeof(error_event)); + error_event.frame_id = + vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; + error_event.u.error_info.error_mask = 1 << ISP_WM_BUS_OVERFLOW; + msm_isp_send_event(vfe_dev, + ISP_EVENT_WM_BUS_OVERFLOW, &error_event); } } -static void msm_isp_process_overflow_recovery( - struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) +void msm_isp_reset_burst_count_and_frame_drop( + struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info) { - uint32_t halt_restart_mask0, halt_restart_mask1; - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - irq_status0 &= halt_restart_mask0; - irq_status1 &= halt_restart_mask1; - if (irq_status0 == 0 && irq_status1 == 0) + uint32_t framedrop_period = 0; + if (stream_info->state != ACTIVE || + stream_info->stream_type != BURST_STREAM) { return; - - switch (atomic_read(&vfe_dev->error_info.overflow_state)) { - case HALT_REQUESTED: { - pr_err("%s: Halt done, Restart Pending\n", __func__); - /*Reset the hardware*/ - vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_SOFT, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, - RESTART_REQUESTED); } - break; - case RESTART_REQUESTED: { - pr_err("%s: Restart done, Resuming\n", __func__); - /*Reset the burst stream frame drop pattern, in the - *case where bus overflow happens during the burstshot, - *the framedrop pattern might be updated after reg update - *to skip all the frames after the burst shot. The burst shot - *might not be completed due to the overflow, so the framedrop - *pattern need to change back to the original settings in order - *to recovr from overflow. - */ - msm_isp_reset_burst_count(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0xFFFFFFFF); - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - break; - case NO_OVERFLOW: - case OVERFLOW_DETECTED: - default: - break; + if (stream_info->num_burst_capture != 0) { + framedrop_period = msm_isp_get_framedrop_period( + stream_info->frame_skip_pattern); + stream_info->burst_frame_count = + stream_info->init_frame_drop + + (stream_info->num_burst_capture - 1) * + framedrop_period + 1; + msm_isp_reset_framedrop(vfe_dev, stream_info); } } @@ -1451,13 +1664,16 @@ irqreturn_t msm_isp_process_irq(int irq_num, void *data) vfe_dev->hw_info->vfe_ops.irq_ops. read_irq_status(vfe_dev, &irq_status0, &irq_status1); + if ((irq_status0 == 0) && (irq_status1 == 0)) { - pr_err_ratelimited("%s: irq_status0 & 1 are both 0\n", - __func__); + pr_err_ratelimited("%s:VFE%d irq_status0 & 1 are both 0\n", + __func__, vfe_dev->pdev->id); return IRQ_HANDLED; } + msm_isp_process_overflow_irq(vfe_dev, &irq_status0, &irq_status1); + vfe_dev->hw_info->vfe_ops.core_ops. get_error_mask(&error_mask0, &error_mask1); error_mask0 &= irq_status0; @@ -1471,8 +1687,7 @@ irqreturn_t msm_isp_process_irq(int irq_num, void *data) if ((irq_status0 == 0) && (irq_status1 == 0) && (!(((error_mask0 != 0) || (error_mask1 != 0)) && vfe_dev->error_info.error_count == 1))) { - ISP_DBG("%s: irq status 0 and 1 = 0, also error irq hadnled!\n", - __func__); + ISP_DBG("%s: error_mask0/1 & error_count are set!\n", __func__); return IRQ_HANDLED; } @@ -1521,19 +1736,19 @@ void msm_isp_do_tasklet(unsigned long data) irq_status1 = queue_cmd->vfeInterruptStatus1; ts = queue_cmd->ts; spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - pr_err_ratelimited("There is Overflow, kicking up recovery !!!!"); - msm_isp_process_overflow_recovery(vfe_dev, - irq_status0, irq_status1); - continue; - } ISP_DBG("%s: status0: 0x%x status1: 0x%x\n", __func__, irq_status0, irq_status1); irq_ops->process_reset_irq(vfe_dev, irq_status0, irq_status1); irq_ops->process_halt_irq(vfe_dev, irq_status0, irq_status1); + if (atomic_read(&vfe_dev->error_info.overflow_state) + != NO_OVERFLOW) { + pr_err("%s: Recovery in processing, Ignore IRQs!!!\n", + __func__); + continue; + } + msm_isp_process_error_info(vfe_dev); irq_ops->process_camif_irq(vfe_dev, irq_status0, irq_status1, &ts); irq_ops->process_axi_irq(vfe_dev, @@ -1544,7 +1759,6 @@ void msm_isp_do_tasklet(unsigned long data) irq_status0, irq_status1, &ts); irq_ops->process_epoch_irq(vfe_dev, irq_status0, irq_status1, &ts); - msm_isp_process_error_info(vfe_dev); } } @@ -1555,24 +1769,60 @@ int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg) return -EINVAL; vfe_dev->axi_data.src_info[src_state->input_src].active = src_state->src_active; + vfe_dev->axi_data.src_info[src_state->input_src].frame_id = + src_state->src_frame_id; return 0; } +static int msm_vfe_iommu_fault_handler(struct iommu_domain *domain, + struct device *dev, unsigned long iova, int flags, void *token) +{ + struct vfe_device *vfe_dev = NULL; + if (token) { + vfe_dev = (struct vfe_device *)token; + if (!vfe_dev->buf_mgr || !vfe_dev->buf_mgr->ops) { + pr_err("%s:%d] buf_mgr %p\n", __func__, + __LINE__, vfe_dev->buf_mgr); + goto end; + } + if (!vfe_dev->buf_mgr->pagefault_debug) { + pr_err("%s:%d] vfe_dev %p id %d\n", __func__, + __LINE__, vfe_dev, vfe_dev->pdev->id); + vfe_dev->buf_mgr->ops->buf_mgr_debug(vfe_dev->buf_mgr); + } + } else { + ISP_DBG("%s:%d] no token received: %p\n", + __func__, __LINE__, token); + goto end; + } +end: + return -ENOSYS; +} + int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) { struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - long rc; + long rc = 0; ISP_DBG("%s\n", __func__); mutex_lock(&vfe_dev->realtime_mutex); mutex_lock(&vfe_dev->core_mutex); - if (vfe_dev->vfe_open_cnt++) { + if (vfe_dev->vfe_open_cnt++ && vfe_dev->vfe_base) { mutex_unlock(&vfe_dev->core_mutex); mutex_unlock(&vfe_dev->realtime_mutex); return 0; } + if (vfe_dev->vfe_base) { + pr_err("%s:%d invalid params cnt %d base %p\n", __func__, + __LINE__, vfe_dev->vfe_open_cnt, vfe_dev->vfe_base); + vfe_dev->vfe_base = NULL; + } + + vfe_dev->reset_pending = 0; + vfe_dev->isp_sof_debug = 0; + if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) { pr_err("%s: init hardware failed\n", __func__); vfe_dev->vfe_open_cnt--; @@ -1581,12 +1831,16 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) return -EBUSY; } - rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_HARD, 1); + memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); + atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); + + vfe_dev->hw_info->vfe_ops.core_ops.clear_status_reg(vfe_dev); + + rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, 1, 1); if (rc <= 0) { pr_err("%s: reset timeout\n", __func__); - vfe_dev->vfe_open_cnt--; vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); + vfe_dev->vfe_open_cnt--; mutex_unlock(&vfe_dev->core_mutex); mutex_unlock(&vfe_dev->realtime_mutex); return -EINVAL; @@ -1596,25 +1850,31 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - vfe_dev->buf_mgr->ops->buf_mgr_init(vfe_dev->buf_mgr, "msm_isp", 28); + vfe_dev->buf_mgr->ops->buf_mgr_init(vfe_dev->buf_mgr, + "msm_isp", BUF_MGR_NUM_BUF_Q); memset(&vfe_dev->axi_data, 0, sizeof(struct msm_vfe_axi_shared_data)); memset(&vfe_dev->stats_data, 0, sizeof(struct msm_vfe_stats_shared_data)); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); + memset(&vfe_dev->fetch_engine_info, 0, + sizeof(vfe_dev->fetch_engine_info)); vfe_dev->axi_data.hw_info = vfe_dev->hw_info->axi_hw_info; vfe_dev->taskletq_idx = 0; vfe_dev->vt_enable = 0; - vfe_dev->p_avtimer_lsw = NULL; - vfe_dev->p_avtimer_msw = NULL; - vfe_dev->p_avtimer_ctl = NULL; - vfe_dev->avtimer_scaler = 1; /*No scaling*/ + vfe_dev->bus_util_factor = 0; + rc = of_property_read_u32(vfe_dev->pdev->dev.of_node, + "bus-util-factor", &vfe_dev->bus_util_factor); + if (rc < 0) + ISP_DBG("%s: Use default bus utilization factor\n", __func__); + iommu_set_fault_handler(vfe_dev->buf_mgr->iommu_domain, + msm_vfe_iommu_fault_handler, vfe_dev); mutex_unlock(&vfe_dev->core_mutex); mutex_unlock(&vfe_dev->realtime_mutex); return 0; } -#if 0 //CONFIG_MSM_AVTIMER +#ifdef CONFIG_MSM_AVTIMER void msm_isp_end_avtimer(void) { avcs_core_disable_power_collapse(0); @@ -1628,9 +1888,9 @@ void msm_isp_end_avtimer(void) int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) { - long rc; + long rc = 0; struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - ISP_DBG("%s\n", __func__); + ISP_DBG("%s E\n", __func__); mutex_lock(&vfe_dev->realtime_mutex); mutex_lock(&vfe_dev->core_mutex); @@ -1655,12 +1915,8 @@ int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr); vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); if (vfe_dev->vt_enable) { - iounmap(vfe_dev->p_avtimer_lsw); - iounmap(vfe_dev->p_avtimer_msw); - iounmap(vfe_dev->p_avtimer_ctl); msm_isp_end_avtimer(); vfe_dev->vt_enable = 0; - vfe_dev->avtimer_scaler = 1; } mutex_unlock(&vfe_dev->core_mutex); mutex_unlock(&vfe_dev->realtime_mutex); diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.h index 57b23a20ee07..3242602ed0f5 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.h +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.h @@ -24,18 +24,6 @@ #endif #define ALT_VECTOR_IDX(x) {x = 3 - x; } -struct msm_isp_bandwidth_info { - uint32_t active; - uint64_t ab; - uint64_t ib; -}; - -enum msm_isp_hw_client { - ISP_VFE0, - ISP_VFE1, - ISP_CPP, - MAX_ISP_CLIENT, -}; struct msm_isp_bandwidth_mgr { uint32_t bus_client; @@ -46,10 +34,20 @@ struct msm_isp_bandwidth_mgr { uint32_t msm_isp_get_framedrop_period( enum msm_vfe_frame_skip_pattern frame_skip_pattern); +void msm_isp_reset_burst_count_and_frame_drop( + struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info); int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client); int msm_isp_update_bandwidth(enum msm_isp_hw_client client, uint64_t ab, uint64_t ib); +void msm_isp_util_get_bandwidth_stats(struct vfe_device *vfe_dev, + struct msm_isp_statistics *stats); +void msm_isp_util_update_last_overflow_ab_ib(struct vfe_device *vfe_dev); +void msm_isp_util_update_clk_rate(long clock_rate); +void msm_isp_update_req_history(uint32_t client, uint64_t ab, + uint64_t ib, + struct msm_isp_bandwidth_info *client_info, + unsigned long long ts); void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client); int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, @@ -73,8 +71,11 @@ void msm_isp_process_error_info(struct vfe_device *vfe_dev); int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); long msm_isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg); -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg); int msm_isp_get_clk_info(struct vfe_device *vfe_dev, struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info); +void msm_isp_fetch_engine_done_notify(struct vfe_device *vfe_dev, + struct msm_vfe_fetch_engine_info *fetch_engine_info); +void msm_camera_io_dump_2(void __iomem *addr, int size); +void msm_isp_print_fourcc_error(const char *origin, uint32_t fourcc_format); #endif /* __MSM_ISP_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c b/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c index 7dfea3c1a97e..73aeedebf108 100644 --- a/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c +++ b/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -61,27 +61,22 @@ static void msm_ispif_io_dump_reg(struct ispif_device *ispif) static inline int msm_ispif_is_intf_valid(uint32_t csid_version, enum msm_ispif_vfe_intf intf_type) { - return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) || - (intf_type >= VFE_MAX)) ? false : true; + return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) || + (intf_type >= VFE_MAX)) ? false : true; } static struct msm_cam_clk_info ispif_8626_reset_clk_info[] = { {"ispif_ahb_clk", NO_SET_RATE}, - {"camss_top_ahb_clk", NO_SET_RATE}, - {"csi0_ahb_clk", NO_SET_RATE}, {"csi0_src_clk", NO_SET_RATE}, - {"csi0_phy_clk", NO_SET_RATE}, {"csi0_clk", NO_SET_RATE}, {"csi0_pix_clk", NO_SET_RATE}, {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_ahb_clk", NO_SET_RATE}, {"csi1_src_clk", NO_SET_RATE}, - {"csi1_phy_clk", NO_SET_RATE}, {"csi1_clk", NO_SET_RATE}, {"csi1_pix_clk", NO_SET_RATE}, {"csi1_rdi_clk", NO_SET_RATE}, - {"camss_vfe_vfe_clk", NO_SET_RATE}, - {"camss_csi_vfe_clk", NO_SET_RATE}, + {"camss_vfe_vfe0_clk", NO_SET_RATE}, + {"camss_csi_vfe0_clk", NO_SET_RATE}, }; static struct msm_cam_clk_info ispif_8974_ahb_clk_info[ISPIF_CLK_INFO_MAX]; @@ -111,9 +106,9 @@ static struct msm_cam_clk_info ispif_8974_reset_clk_info[] = { {"camss_csi_vfe1_clk", NO_SET_RATE}, }; -static int msm_ispif_reset_hw(struct ispif_device *ispif) +static int msm_ispif_reset_hw(struct ispif_device *ispif, int release) { - int rc = 0; + int rc = 0, i; long timeout = 0; struct clk *reset_clk[ARRAY_SIZE(ispif_8974_reset_clk_info)]; struct clk *reset_clk1[ARRAY_SIZE(ispif_8626_reset_clk_info)]; @@ -138,6 +133,17 @@ static int msm_ispif_reset_hw(struct ispif_device *ispif) ispif->clk_idx = 1; } + if (release) { + for (i = 0; i < ispif->vfe_info.num_vfe; i++) { + msm_camera_io_w_mb(ISPIF_STOP_INTF_IMMEDIATELY, + ispif->base + ISPIF_VFE_m_INTF_CMD_0(i)); + msm_camera_io_w_mb(ISPIF_STOP_INTF_IMMEDIATELY, + ispif->base + ISPIF_VFE_m_INTF_CMD_1(i)); + } + msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, + ispif->base + ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); + } + init_completion(&ispif->reset_complete[VFE0]); if (ispif->hw_num_isps > 1) init_completion(&ispif->reset_complete[VFE1]); @@ -207,9 +213,10 @@ static int msm_ispif_reset_hw(struct ispif_device *ispif) } int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, - struct platform_device *pdev) + struct platform_device *pdev, + struct msm_cam_clk_info *ahb_clk_info) { - uint32_t count; + uint32_t count, num_ahb_clk = 0; int i, rc; uint32_t rates[ISPIF_CLK_INFO_MAX]; @@ -224,23 +231,12 @@ int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, return 0; } - count = ISPIF_AHB_CLK_INFO; if (count > ISPIF_CLK_INFO_MAX) { pr_err("invalid count=%d, max is %d\n", count, ISPIF_CLK_INFO_MAX); return -EINVAL; } - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(ispif_8974_ahb_clk_info[i].clk_name)); - CDBG("clock-names[%d] = %s\n", - i, ispif_8974_ahb_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } rc = of_property_read_u32_array(of_node, "qcom,clock-rates", rates, count); if (rc < 0) { @@ -248,12 +244,24 @@ int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, return rc; } for (i = 0; i < count; i++) { - ispif_8974_ahb_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - CDBG("clk_rate[%d] = %ld\n", i, - ispif_8974_ahb_clk_info[i].clk_rate); + rc = of_property_read_string_index(of_node, "clock-names", + i, &(ahb_clk_info[num_ahb_clk].clk_name)); + CDBG("clock-names[%d] = %s\n", + i, ahb_clk_info[i].clk_name); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + return rc; + } + if (strnstr(ahb_clk_info[num_ahb_clk].clk_name, "ahb", + sizeof(ahb_clk_info[num_ahb_clk].clk_name))) { + ahb_clk_info[num_ahb_clk].clk_rate = + (rates[i] == 0) ? (long)-1 : rates[i]; + CDBG("clk_rate[%d] = %ld\n", i, + ahb_clk_info[i].clk_rate); + num_ahb_clk++; + } } - ispif_dev->num_clk = count; + ispif_dev->num_ahb_clk = num_ahb_clk; return 0; } @@ -261,12 +269,8 @@ static int msm_ispif_clk_ahb_enable(struct ispif_device *ispif, int enable) { int rc = 0; - if (ispif->csid_version < CSID_VERSION_V30) { - /* Older ISPIF versiond don't need ahb clokc */ - return 0; - } - - rc = msm_ispif_get_ahb_clk_info(ispif, ispif->pdev); + rc = msm_ispif_get_ahb_clk_info(ispif, ispif->pdev, + ispif_8974_ahb_clk_info); if (rc < 0) { pr_err("%s: msm_isp_get_clk_info() failed", __func__); return -EFAULT; @@ -274,7 +278,7 @@ static int msm_ispif_clk_ahb_enable(struct ispif_device *ispif, int enable) rc = msm_cam_clk_enable(&ispif->pdev->dev, ispif_8974_ahb_clk_info, ispif->ahb_clk, - ispif->num_clk, enable); + ispif->num_ahb_clk, enable); if (rc < 0) { pr_err("%s: cannot enable clock, error = %d", __func__, rc); @@ -345,7 +349,7 @@ static int msm_ispif_subdev_g_chip_ident(struct v4l2_subdev *sd, } static void msm_ispif_sel_csid_core(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) + uint8_t intftype, uint8_t csid, enum msm_ispif_vfe_intf vfe_intf) { uint32_t data; @@ -360,23 +364,23 @@ static void msm_ispif_sel_csid_core(struct ispif_device *ispif, switch (intftype) { case PIX0: data &= ~(BIT(1) | BIT(0)); - data |= (uint32_t) csid; + data |= (uint32_t)csid; break; case RDI0: data &= ~(BIT(5) | BIT(4)); - data |= ((uint32_t) csid) << 4; + data |= (uint32_t)(csid << 4); break; case PIX1: data &= ~(BIT(9) | BIT(8)); - data |= ((uint32_t) csid) << 8; + data |= (uint32_t)(csid << 8); break; case RDI1: data &= ~(BIT(13) | BIT(12)); - data |= ((uint32_t) csid) << 12; + data |= (uint32_t)(csid << 12); break; case RDI2: data &= ~(BIT(21) | BIT(20)); - data |= ((uint32_t) csid) << 20; + data |= (uint32_t)(csid << 20); break; } @@ -385,7 +389,7 @@ static void msm_ispif_sel_csid_core(struct ispif_device *ispif, } static void msm_ispif_enable_crop(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf, uint16_t start_pixel, + uint8_t intftype, enum msm_ispif_vfe_intf vfe_intf, uint16_t start_pixel, uint16_t end_pixel) { uint32_t data; @@ -417,7 +421,7 @@ static void msm_ispif_enable_crop(struct ispif_device *ispif, } static void msm_ispif_enable_intf_cids(struct ispif_device *ispif, - uint8_t intftype, uint16_t cid_mask, uint8_t vfe_intf, uint8_t enable) + uint8_t intftype, uint16_t cid_mask, enum msm_ispif_vfe_intf vfe_intf, uint8_t enable) { uint32_t intf_addr, data; @@ -452,14 +456,14 @@ static void msm_ispif_enable_intf_cids(struct ispif_device *ispif, data = msm_camera_io_r(ispif->base + intf_addr); if (enable) - data |= (uint32_t) cid_mask; + data |= (uint32_t)cid_mask; else - data &= ~((uint32_t) cid_mask); + data &= ~((uint32_t)cid_mask); msm_camera_io_w_mb(data, ispif->base + intf_addr); } static int msm_ispif_validate_intf_status(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf) + uint8_t intftype, enum msm_ispif_vfe_intf vfe_intf) { int rc = 0; uint32_t data = 0; @@ -499,7 +503,7 @@ static int msm_ispif_validate_intf_status(struct ispif_device *ispif, } static void msm_ispif_select_clk_mux(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) + uint8_t intftype, uint8_t csid, enum msm_ispif_vfe_intf vfe_intf) { uint32_t data = 0; @@ -558,7 +562,7 @@ static uint16_t msm_ispif_get_cids_mask_from_cfg( BUG_ON(!entry); - for (i = 0; i < entry->num_cids; i++) + for (i = 0; i < entry->num_cids && i < MAX_CID_CH_V2; i++) cids_mask |= (1 << entry->cids[i]); return cids_mask; @@ -575,6 +579,12 @@ static int msm_ispif_config(struct ispif_device *ispif, BUG_ON(!ispif); BUG_ON(!params); + if (!ispif->base) { + pr_err("%s: ispif base is NULL\n", __func__); + rc = -EPERM; + return rc; + } + if (ispif->ispif_state != ISPIF_POWER_UP) { pr_err("%s: ispif invalid state %d\n", __func__, ispif->ispif_state); @@ -590,6 +600,11 @@ static int msm_ispif_config(struct ispif_device *ispif, for (i = 0; i < params->num; i++) { vfe_intf = params->entries[i].vfe_intf; + if (vfe_intf >= VFE_MAX) { + pr_err("%s: %d invalid i %d vfe_intf %d\n", __func__, + __LINE__, i, vfe_intf); + return -EINVAL; + } if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { pr_err("%s: invalid interface type\n", __func__); @@ -687,7 +702,7 @@ static void msm_ispif_intf_cmd(struct ispif_device *ispif, uint32_t cmd_bits, pr_err("%s: invalid interface type\n", __func__); return; } - if (params->entries[i].num_cids > MAX_CID_CH) { + if (params->entries[i].num_cids > MAX_CID_CH_V2) { pr_err("%s: out of range of cid_num %d\n", __func__, params->entries[i].num_cids); return; @@ -716,7 +731,6 @@ static void msm_ispif_intf_cmd(struct ispif_device *ispif, uint32_t cmd_bits, (cmd_bits << (vc * 2 + intf_type * 8)); } } - /* cmd for PIX0, PIX1, RDI0, RDI1 */ if (ispif->applied_intf_cmd[vfe_intf].intf_cmd != 0xFFFFFFFF) msm_camera_io_w_mb( @@ -736,7 +750,6 @@ static int msm_ispif_stop_immediately(struct ispif_device *ispif, { int i, rc = 0; uint16_t cid_mask = 0; - BUG_ON(!ispif); BUG_ON(!params); @@ -789,6 +802,183 @@ static int msm_ispif_start_frame_boundary(struct ispif_device *ispif, return rc; } +static int msm_ispif_restart_frame_boundary(struct ispif_device *ispif, + struct msm_ispif_param_data *params) +{ + int rc = 0, i; + long timeout = 0; + uint16_t cid_mask; + enum msm_ispif_intftype intftype; + enum msm_ispif_vfe_intf vfe_intf; + uint32_t vfe_mask = 0; + uint32_t intf_addr; + struct clk *reset_clk[ARRAY_SIZE(ispif_8974_reset_clk_info)]; + struct clk *reset_clk1[ARRAY_SIZE(ispif_8626_reset_clk_info)]; + ispif->clk_idx = 0; + + if (ispif->ispif_state != ISPIF_POWER_UP) { + pr_err("%s: ispif invalid state %d\n", __func__, + ispif->ispif_state); + rc = -EPERM; + return rc; + } + if (params->num > MAX_PARAM_ENTRIES) { + pr_err("%s: invalid param entries %d\n", __func__, + params->num); + rc = -EINVAL; + return rc; + } + + for (i = 0; i < params->num; i++) { + vfe_intf = params->entries[i].vfe_intf; + if (vfe_intf >= VFE_MAX) { + pr_err("%s: %d invalid i %d vfe_intf %d\n", __func__, + __LINE__, i, vfe_intf); + return -EINVAL; + } + vfe_mask |= (1 << vfe_intf); + } + + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8974_reset_clk_info, reset_clk, + ARRAY_SIZE(ispif_8974_reset_clk_info), 1); + if (rc < 0) { + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8626_reset_clk_info, reset_clk1, + ARRAY_SIZE(ispif_8626_reset_clk_info), 1); + if (rc < 0) { + pr_err("%s: cannot enable clock, error = %d", + __func__, rc); + } else { + /* This is set when device is 8x26 */ + ispif->clk_idx = 2; + } + } else { + /* This is set when device is 8974 */ + ispif->clk_idx = 1; + } + + if (vfe_mask & (1 << VFE0)) { + init_completion(&ispif->reset_complete[VFE0]); + pr_err("%s Init completion VFE0\n", __func__); + /* initiate reset of ISPIF */ + msm_camera_io_w(0x00001FF9, + ispif->base + ISPIF_RST_CMD_ADDR); + } + if (ispif->hw_num_isps > 1 && (vfe_mask & (1 << VFE1))) { + init_completion(&ispif->reset_complete[VFE1]); + pr_err("%s Init completion VFE1\n", __func__); + msm_camera_io_w(0x00001FF9, + ispif->base + ISPIF_RST_CMD_1_ADDR); + } + + if (vfe_mask & (1 << VFE0)) { + timeout = wait_for_completion_timeout( + &ispif->reset_complete[VFE0], msecs_to_jiffies(500)); + if (timeout <= 0) { + pr_err("%s: VFE0 reset wait timeout\n", __func__); + rc = -ETIMEDOUT; + goto disable_clk; + } + } + + if (ispif->hw_num_isps > 1 && (vfe_mask & (1 << VFE1))) { + timeout = wait_for_completion_timeout( + &ispif->reset_complete[VFE1], + msecs_to_jiffies(500)); + if (timeout <= 0) { + pr_err("%s: VFE1 reset wait timeout\n", __func__); + rc = -ETIMEDOUT; + goto disable_clk; + } + } + + pr_info("%s: ISPIF reset hw done", __func__); + + if (ispif->clk_idx == 1) { + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8974_reset_clk_info, reset_clk, + ARRAY_SIZE(ispif_8974_reset_clk_info), 0); + if (rc < 0) { + pr_err("%s: cannot disable clock, error = %d", + __func__, rc); + goto end; + } + } + + if (ispif->clk_idx == 2) { + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8626_reset_clk_info, reset_clk1, + ARRAY_SIZE(ispif_8626_reset_clk_info), 0); + if (rc < 0) { + pr_err("%s: cannot disable clock, error = %d", + __func__, rc); + goto end; + } + } + + for (i = 0; i < params->num; i++) { + intftype = params->entries[i].intftype; + vfe_intf = params->entries[i].vfe_intf; + + switch (params->entries[0].intftype) { + case PIX0: + intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0); + break; + case RDI0: + intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0); + break; + case PIX1: + intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1); + break; + case RDI1: + intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1); + break; + case RDI2: + intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2); + break; + default: + pr_err("%s: invalid intftype=%d\n", __func__, + params->entries[i].intftype); + rc = -EPERM; + goto end; + } + + msm_ispif_intf_cmd(ispif, + ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY, params); + } + + for (i = 0; i < params->num; i++) { + intftype = params->entries[i].intftype; + + vfe_intf = params->entries[i].vfe_intf; + + + cid_mask = msm_ispif_get_cids_mask_from_cfg( + ¶ms->entries[i]); + + msm_ispif_enable_intf_cids(ispif, intftype, + cid_mask, vfe_intf, 1); + } + +end: + return rc; +disable_clk: + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8974_reset_clk_info, reset_clk, + ARRAY_SIZE(ispif_8974_reset_clk_info), 0); + if (rc < 0) { + rc = msm_cam_clk_enable(&ispif->pdev->dev, + ispif_8626_reset_clk_info, reset_clk1, + ARRAY_SIZE(ispif_8626_reset_clk_info), 0); + if (rc < 0) + pr_err("%s: cannot enable clock, error = %d", + __func__, rc); + } + + return -ETIMEDOUT; +} + static int msm_ispif_stop_frame_boundary(struct ispif_device *ispif, struct msm_ispif_param_data *params) { @@ -880,7 +1070,11 @@ static void ispif_process_irq(struct ispif_device *ispif, if (out[vfe_id].ispifIrqStatus0 & ISPIF_IRQ_STATUS_PIX_SOF_MASK) { + if (ispif->ispif_sof_debug < 5) + pr_err("%s: PIX0 frame id: %u\n", __func__, + ispif->sof_count[vfe_id].sof_cnt[PIX0]); ispif->sof_count[vfe_id].sof_cnt[PIX0]++; + ispif->ispif_sof_debug++; } if (out[vfe_id].ispifIrqStatus0 & ISPIF_IRQ_STATUS_RDI0_SOF_MASK) { @@ -987,9 +1181,15 @@ static irqreturn_t msm_io_ispif_irq(int irq_num, void *data) static int msm_ispif_set_vfe_info(struct ispif_device *ispif, struct msm_ispif_vfe_info *vfe_info) { - memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info)); - if (ispif->vfe_info.num_vfe > ispif->hw_num_isps) + if (!vfe_info || (vfe_info->num_vfe <= 0) || + ((uint32_t)(vfe_info->num_vfe) > ispif->hw_num_isps)) { + pr_err("Invalid VFE info: %p %d\n", vfe_info, + (vfe_info ? vfe_info->num_vfe:0)); return -EINVAL; + } + + memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info)); + return 0; } @@ -1018,7 +1218,7 @@ static int msm_ispif_init(struct ispif_device *ispif, if (ispif->csid_version >= CSID_VERSION_V30) { if (!ispif->clk_mux_mem || !ispif->clk_mux_io) { - pr_err("%s csi clk mux mem %pK io %pK\n", __func__, + pr_err("%s csi clk mux mem %p io %p\n", __func__, ispif->clk_mux_mem, ispif->clk_mux_io); rc = -ENOMEM; return rc; @@ -1052,7 +1252,7 @@ static int msm_ispif_init(struct ispif_device *ispif, goto error_ahb; } - msm_ispif_reset_hw(ispif); + msm_ispif_reset_hw(ispif, 0); rc = msm_ispif_reset(ispif); if (rc == 0) { @@ -1085,8 +1285,10 @@ static void msm_ispif_release(struct ispif_device *ispif) return; } + msm_ispif_clk_ahb_enable(ispif, 1); + /* make sure no streaming going on */ - msm_ispif_reset(ispif); + msm_ispif_reset_hw(ispif, 1); msm_ispif_clk_ahb_enable(ispif, 0); @@ -1126,6 +1328,11 @@ static long msm_ispif_cmd(struct v4l2_subdev *sd, void *arg) rc = msm_ispif_start_frame_boundary(ispif, &pcdata->params); msm_ispif_io_dump_reg(ispif); break; + case ISPIF_RESTART_FRAME_BOUNDARY: + rc = msm_ispif_restart_frame_boundary(ispif, &pcdata->params); + msm_ispif_io_dump_reg(ispif); + break; + case ISPIF_STOP_FRAME_BOUNDARY: rc = msm_ispif_stop_frame_boundary(ispif, &pcdata->params); msm_ispif_io_dump_reg(ispif); @@ -1153,22 +1360,24 @@ static struct v4l2_file_operations msm_ispif_v4l2_subdev_fops; static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { -#ifdef CONFIG_COMPAT - void __user *up; - if (is_compat_task()) { - up = (void __user *)compat_ptr((unsigned long)arg); - arg = up; - } -#endif + struct ispif_device *ispif = + (struct ispif_device *)v4l2_get_subdevdata(sd); switch (cmd) { case VIDIOC_MSM_ISPIF_CFG: return msm_ispif_cmd(sd, arg); + case MSM_SD_NOTIFY_FREEZE: { + ispif->ispif_sof_debug = 0; + return 0; + } case MSM_SD_SHUTDOWN: { struct ispif_device *ispif = (struct ispif_device *)v4l2_get_subdevdata(sd); - if (ispif && ispif->base) + if (ispif && ispif->base) { + mutex_lock(&ispif->mutex); msm_ispif_release(ispif); + mutex_unlock(&ispif->mutex); + } return 0; } default: @@ -1325,7 +1534,7 @@ static int ispif_probe(struct platform_device *pdev) #ifdef CONFIG_COMPAT msm_ispif_v4l2_subdev_fops.compat_ioctl32 = msm_ispif_subdev_fops_ioctl; #endif - + ispif->msm_sd.sd.devnode->fops = &msm_ispif_v4l2_subdev_fops; ispif->pdev = pdev; ispif->ispif_state = ISPIF_POWER_DOWN; ispif->open_cnt = 0; diff --git a/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.h b/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.h index 26ceb29febb5..6a1844e747fc 100644 --- a/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.h +++ b/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.h @@ -19,8 +19,7 @@ #include #include "msm_sd.h" -#define ISPIF_CLK_INFO_MAX 16 -#define ISPIF_AHB_CLK_INFO 2 +#define ISPIF_CLK_INFO_MAX 24 struct ispif_irq_status { uint32_t ispifIrqStatus0; @@ -63,7 +62,8 @@ struct ispif_device { struct clk *ahb_clk[ISPIF_CLK_INFO_MAX]; struct completion reset_complete[VFE_MAX]; uint32_t hw_num_isps; - uint32_t num_clk; + uint32_t num_ahb_clk; uint32_t clk_idx; + uint32_t ispif_sof_debug; }; #endif diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/Makefile b/drivers/media/platform/msm/camera_v2/jpeg_10/Makefile index 35a3195accaf..714df2d9c1bd 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/Makefile +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/Makefile @@ -1,4 +1,4 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) +GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) ccflags-y += -Idrivers/media/platform/msm/camera_v2/jpeg_10 ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_common.h b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_common.h index 634becafc575..b7efe1cbc261 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_common.h +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_common.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -13,11 +13,7 @@ #ifndef MSM_JPEG_COMMON_H #define MSM_JPEG_COMMON_H -#ifdef MSM_JPEG_DEBUG -#define JPEG_DBG(fmt, args...) pr_info(fmt, ##args) -#else -#define JPEG_DBG(fmt, args...) do { } while (0) -#endif +#define JPEG_DBG(fmt, args...) pr_debug(fmt, ##args) #define JPEG_PR_ERR pr_err #define JPEG_DBG_HIGH pr_debug diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.c b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.c index 52011346fb80..a0474fcc12d5 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.c +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013,The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014,The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -30,9 +30,13 @@ int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, sizeof(pgmn_dev->we_pingpong_buf)); spin_lock_irqsave(&pgmn_dev->reset_lock, flags); pgmn_dev->reset_done_ack = 0; - msm_jpeg_hw_reset(base, size); + if (pgmn_dev->core_type == MSM_JPEG_CORE_CODEC) + msm_jpeg_hw_reset(base, size); + else + msm_jpeg_hw_reset_dma(base, size); + spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - rc = wait_event_interruptible_timeout( + rc = wait_event_timeout( pgmn_dev->reset_wait, pgmn_dev->reset_done_ack, msecs_to_jiffies(tm)); @@ -86,8 +90,12 @@ int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, JPEG_DBG("%s:%d] 0x%08x %d 0x%08x %d\n", __func__, __LINE__, (int) buf->y_buffer_addr, buf->y_len, (int) buf->cbcr_buffer_addr, buf->cbcr_len); - return msm_jpeg_hw_pingpong_update(&pgmn_dev->fe_pingpong_buf, buf, - pgmn_dev->base); + if (pgmn_dev->core_type == MSM_JPEG_CORE_CODEC) + return msm_jpeg_hw_pingpong_update(&pgmn_dev->fe_pingpong_buf, + buf, pgmn_dev->base); + else + return msm_jpegdma_hw_pingpong_update( + &pgmn_dev->fe_pingpong_buf, buf, pgmn_dev->base); } void *msm_jpeg_core_fe_pingpong_irq(int jpeg_irq_status, @@ -104,8 +112,12 @@ int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, buf->y_len); pgmn_dev->we_pingpong_buf.buf[0] = *buf; pgmn_dev->we_pingpong_buf.buf_status[0] = 1; - msm_jpeg_hw_we_buffer_update( - &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); + if (pgmn_dev->core_type == MSM_JPEG_CORE_CODEC) + msm_jpeg_hw_we_buffer_update( + &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); + else + msm_jpegdma_hw_we_buffer_update( + &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); return 0; } @@ -273,6 +285,72 @@ irqreturn_t msm_jpeg_core_irq(int irq_num, void *context) return IRQ_HANDLED; } +irqreturn_t msm_jpegdma_core_irq(int irq_num, void *context) +{ + void *data = NULL; + unsigned long flags; + int jpeg_irq_status; + struct msm_jpeg_device *pgmn_dev = context; + + JPEG_DBG("%s:%d] irq_num = %d\n", __func__, __LINE__, irq_num); + + jpeg_irq_status = msm_jpegdma_hw_irq_get_status(pgmn_dev->base); + + JPEG_DBG("%s:%d] jpeg_irq_status = %0x\n", __func__, __LINE__, + jpeg_irq_status); + + /*For reset and framedone IRQs, clear all bits*/ + if (pgmn_dev->state == MSM_JPEG_IDLE) { + JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", + __func__, __LINE__, pgmn_dev->state); + JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, + __LINE__); + msm_jpegdma_hw_irq_clear(JPEGDMA_IRQ_CLEAR_BMSK, + JPEGDMA_IRQ_CLEAR_ALL, pgmn_dev->base); + return IRQ_HANDLED; + } else if (jpeg_irq_status & 0x00000400) { + msm_jpegdma_hw_irq_clear(JPEGDMA_IRQ_CLEAR_BMSK, + JPEGDMA_IRQ_CLEAR_ALL, pgmn_dev->base); + } else if (jpeg_irq_status & 0x1) { + msm_jpegdma_hw_irq_clear(JPEGDMA_IRQ_CLEAR_BMSK, + JPEGDMA_IRQ_CLEAR_ALL, pgmn_dev->base); + } else { + msm_jpegdma_hw_irq_clear(JPEGDMA_IRQ_CLEAR_BMSK, + jpeg_irq_status, pgmn_dev->base); + } + + if (msm_jpegdma_hw_irq_is_frame_done(jpeg_irq_status)) { + /* send fe ping pong irq */ + JPEG_DBG_HIGH("%s:%d] Session done\n", __func__, __LINE__); + data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, + pgmn_dev); + if (msm_jpeg_irq_handler) + msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, + context, data); + data = msm_jpeg_core_framedone_irq(jpeg_irq_status, + pgmn_dev); + if (msm_jpeg_irq_handler) + msm_jpeg_irq_handler( + MSM_JPEG_HW_MASK_COMP_FRAMEDONE, + context, data); + pgmn_dev->state = MSM_JPEG_INIT; + } + if (msm_jpegdma_hw_irq_is_reset_ack(jpeg_irq_status)) { + data = msm_jpeg_core_reset_ack_irq(jpeg_irq_status, + pgmn_dev); + spin_lock_irqsave(&pgmn_dev->reset_lock, flags); + pgmn_dev->reset_done_ack = 1; + spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); + wake_up(&pgmn_dev->reset_wait); + if (msm_jpeg_irq_handler) + msm_jpeg_irq_handler( + MSM_JPEG_HW_MASK_COMP_RESET_ACK, + context, data); + } + + return IRQ_HANDLED; +} + void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)) { msm_jpeg_irq_handler = irq_handler; diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.h b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.h index 212eaff91d88..a68b443bd7b9 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.h +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_core.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -20,7 +20,7 @@ #define msm_jpeg_core_buf msm_jpeg_hw_buf irqreturn_t msm_jpeg_core_irq(int irq_num, void *context); - +irqreturn_t msm_jpegdma_core_irq(int irq_num, void *context); void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)); void msm_jpeg_core_irq_remove(void); diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_dev.c b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_dev.c index 8164ec805910..e2c868443067 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_dev.c +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_dev.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -158,11 +159,32 @@ static const struct v4l2_subdev_ops msm_jpeg_subdev_ops = { .core = &msm_jpeg_subdev_core_ops, }; +struct msm_jpeg_priv_data { + enum msm_jpeg_core_type core_type; +}; + +static const struct msm_jpeg_priv_data msm_jpeg_priv_data_jpg = { + .core_type = MSM_JPEG_CORE_CODEC +}; +static const struct msm_jpeg_priv_data msm_jpeg_priv_data_dma = { + .core_type = MSM_JPEG_CORE_DMA +}; + +static const struct of_device_id msm_jpeg_dt_match[] = { + {.compatible = "qcom,jpeg", .data = &msm_jpeg_priv_data_jpg}, + {.compatible = "qcom,jpeg_dma", .data = &msm_jpeg_priv_data_dma}, + {} +}; + +MODULE_DEVICE_TABLE(of, msm_jpeg_dt_match); + static int msm_jpeg_init_dev(struct platform_device *pdev) { int rc = -1; struct device *dev; struct msm_jpeg_device *msm_jpeg_device_p; + const struct of_device_id *device_id; + const struct msm_jpeg_priv_data *priv_data; char devname[DEV_NAME_LEN]; msm_jpeg_device_p = kzalloc(sizeof(struct msm_jpeg_device), GFP_ATOMIC); @@ -173,6 +195,15 @@ static int msm_jpeg_init_dev(struct platform_device *pdev) msm_jpeg_device_p->pdev = pdev; + device_id = of_match_device(msm_jpeg_dt_match, &pdev->dev); + if (!device_id) { + JPEG_PR_ERR("%s: device_id is NULL\n", __func__); + goto fail; + } + + priv_data = device_id->data; + msm_jpeg_device_p->core_type = priv_data->core_type; + if (pdev->dev.of_node) of_property_read_u32((&pdev->dev)->of_node, "cell-index", &pdev->id); @@ -187,8 +218,8 @@ static int msm_jpeg_init_dev(struct platform_device *pdev) v4l2_subdev_init(&msm_jpeg_device_p->subdev, &msm_jpeg_subdev_ops); v4l2_set_subdev_hostdata(&msm_jpeg_device_p->subdev, msm_jpeg_device_p); - JPEG_DBG("%s: msm_jpeg_device_p 0x%x", __func__, - (uint32_t)msm_jpeg_device_p); + JPEG_DBG("%s: msm_jpeg_device_p 0x%lx", __func__, + (unsigned long)msm_jpeg_device_p); rc = alloc_chrdev_region(&msm_jpeg_device_p->msm_jpeg_devno, 0, 1, devname); @@ -283,13 +314,6 @@ static int __msm_jpeg_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id msm_jpeg_dt_match[] = { - {.compatible = "qcom,jpeg"}, - {}, -}; - -MODULE_DEVICE_TABLE(of, msm_jpeg_dt_match); - static struct platform_driver msm_jpeg_driver = { .probe = __msm_jpeg_probe, .remove = __msm_jpeg_remove, diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.c b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.c index 95c0e9e84748..04e74beaaac8 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.c +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.c @@ -49,6 +49,37 @@ int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, return 0; } +int msm_jpegdma_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, + struct msm_jpeg_hw_buf *buf, void *base) +{ + int buf_free_index = -1; + + if (!pingpong_hw->buf_status[0]) { + buf_free_index = 0; + } else if (!pingpong_hw->buf_status[1]) { + buf_free_index = 1; + } else { + JPEG_PR_ERR("%s:%d: pingpong buffer busy\n", + __func__, __LINE__); + return -EBUSY; + } + + pingpong_hw->buf[buf_free_index] = *buf; + pingpong_hw->buf_status[buf_free_index] = 1; + + if (pingpong_hw->is_fe) { + /* it is fe */ + msm_jpegdma_hw_fe_buffer_update( + &pingpong_hw->buf[buf_free_index], buf_free_index, + base); + } else { + /* it is we */ + msm_jpegdma_hw_we_buffer_update( + &pingpong_hw->buf[buf_free_index], buf_free_index, + base); + } + return 0; +} void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw) { struct msm_jpeg_hw_buf *buf_p = NULL; @@ -87,6 +118,19 @@ int msm_jpeg_hw_irq_get_status(void *base) return n_irq_status; } +struct msm_jpeg_hw_cmd hw_cmd_irq_get_dmastatus[] = { + /* type, repeat n times, offset, mask, data or pdata */ + {MSM_JPEG_HW_CMD_TYPE_READ, 1, JPEGDMA_IRQ_STATUS_ADDR, + JPEGDMA_IRQ_STATUS_BMSK, {0} }, +}; + +int msm_jpegdma_hw_irq_get_status(void *base) +{ + uint32_t n_irq_status = 0; + n_irq_status = msm_jpeg_hw_read(&hw_cmd_irq_get_dmastatus[0], base); + return n_irq_status; +} + struct msm_jpeg_hw_cmd hw_cmd_encode_output_size[] = { /* type, repeat n times, offset, mask, data or pdata */ {MSM_JPEG_HW_CMD_TYPE_READ, 1, @@ -104,18 +148,30 @@ long msm_jpeg_hw_encode_output_size(void *base) return encode_output_size; } -struct msm_jpeg_hw_cmd hw_cmd_irq_clear[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_CLEAR_BMSK, {JPEG_IRQ_CLEAR_ALL} }, -}; - void msm_jpeg_hw_irq_clear(uint32_t mask, uint32_t data, void *base) { + struct msm_jpeg_hw_cmd cmd_irq_clear; + + cmd_irq_clear.type = MSM_JPEG_HW_CMD_TYPE_WRITE; + cmd_irq_clear.n = 1; + cmd_irq_clear.offset = JPEG_IRQ_CLEAR_ADDR; + cmd_irq_clear.mask = mask; + cmd_irq_clear.data = data; JPEG_DBG("%s:%d] mask %0x data %0x", __func__, __LINE__, mask, data); - hw_cmd_irq_clear[0].mask = mask; - hw_cmd_irq_clear[0].data = data; - msm_jpeg_hw_write(&hw_cmd_irq_clear[0], base); + msm_jpeg_hw_write(&cmd_irq_clear, base); +} + +void msm_jpegdma_hw_irq_clear(uint32_t mask, uint32_t data, void *base) +{ + struct msm_jpeg_hw_cmd cmd_irq_clear; + + cmd_irq_clear.type = MSM_JPEG_HW_CMD_TYPE_WRITE; + cmd_irq_clear.n = 1; + cmd_irq_clear.offset = JPEGDMA_IRQ_CLEAR_ADDR; + cmd_irq_clear.mask = mask; + cmd_irq_clear.data = data; + JPEG_DBG("%s:%d] mask %0x data %0x", __func__, __LINE__, mask, data); + msm_jpeg_hw_write(&cmd_irq_clear, base); } struct msm_jpeg_hw_cmd hw_cmd_fe_ping_update[] = { @@ -142,6 +198,7 @@ void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, uint8_t pingpong_index, void *base) { struct msm_jpeg_hw_cmd *hw_cmd_p; + struct msm_jpeg_hw_cmd tmp_hw_cmd; if (pingpong_index == 0) { hw_cmd_p = &hw_cmd_fe_ping_update[0]; @@ -152,23 +209,63 @@ void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, wmb(); msm_jpeg_hw_write(hw_cmd_p++, base); wmb(); - hw_cmd_p->data = p_input->y_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->y_buffer_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); wmb(); msm_jpeg_hw_write(hw_cmd_p++, base); wmb(); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->cbcr_buffer_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); wmb(); msm_jpeg_hw_write(hw_cmd_p++, base); wmb(); - hw_cmd_p->data = p_input->pln2_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->pln2_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); wmb(); } return; } +struct msm_jpeg_hw_cmd hw_dma_cmd_fe_ping_update[] = { + /* type, repeat n times, offset, mask, data or pdata */ + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_IRQ_MASK_ADDR, + JPEGDMA_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_CMD_ADDR, + JPEGDMA_CMD_BMSK, {JPEGDMA_CMD_CLEAR_READ_PLN_QUEUES} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, MSM_JPEGDMA_FE_0_RD_PNTR, + JPEG_PLN0_RD_PNTR_BMSK, {0} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, MSM_JPEGDMA_FE_1_RD_PNTR, + JPEG_PLN1_RD_PNTR_BMSK, {0} }, +}; + +void msm_jpegdma_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, + uint8_t pingpong_index, void *base) +{ + struct msm_jpeg_hw_cmd *hw_cmd_p; + struct msm_jpeg_hw_cmd tmp_hw_cmd; + + if (pingpong_index != 0) + return; + + hw_cmd_p = &hw_dma_cmd_fe_ping_update[0]; + wmb(); + msm_jpeg_hw_write(hw_cmd_p++, base); + wmb(); + msm_jpeg_hw_write(hw_cmd_p++, base); + wmb(); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->y_buffer_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); + wmb(); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->cbcr_buffer_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); + wmb(); +} + struct msm_jpeg_hw_cmd hw_cmd_fe_start[] = { /* type, repeat n times, offset, mask, data or pdata */ {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, @@ -212,25 +309,68 @@ void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, uint8_t pingpong_index, void *base) { struct msm_jpeg_hw_cmd *hw_cmd_p; + struct msm_jpeg_hw_cmd tmp_hw_cmd; if (pingpong_index == 0) { hw_cmd_p = &hw_cmd_we_ping_update[0]; - hw_cmd_p->data = p_input->y_buffer_addr; + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->y_buffer_addr; JPEG_DBG_HIGH("%s Output pln0 buffer address is %x\n", __func__, p_input->y_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->cbcr_buffer_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); + + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->cbcr_buffer_addr; JPEG_DBG_HIGH("%s Output pln1 buffer address is %x\n", __func__, p_input->cbcr_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->pln2_addr; + msm_jpeg_hw_write(&tmp_hw_cmd, base); + + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->pln2_addr; JPEG_DBG_HIGH("%s Output pln2 buffer address is %x\n", __func__, p_input->pln2_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); + msm_jpeg_hw_write(&tmp_hw_cmd, base); } return; } +struct msm_jpeg_hw_cmd hw_dma_cmd_we_ping_update[] = { + /* type, repeat n times, offset, mask, data or pdata */ + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_CMD_ADDR, + JPEGDMA_CMD_BMSK, {JPEGDMA_CMD_CLEAR_WRITE_PLN_QUEUES} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, MSM_JPEGDMA_WE_0_WR_PNTR, + JPEG_PLN0_WR_PNTR_BMSK, {0} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, MSM_JPEGDMA_WE_1_WR_PNTR, + JPEG_PLN0_WR_PNTR_BMSK, {0} }, +}; +void msm_jpegdma_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, + uint8_t pingpong_index, void *base) +{ + struct msm_jpeg_hw_cmd *hw_cmd_p; + struct msm_jpeg_hw_cmd tmp_hw_cmd; + + if (pingpong_index != 0) + return; + + hw_cmd_p = &hw_dma_cmd_we_ping_update[0]; + msm_jpeg_hw_write(hw_cmd_p++, base); + + wmb(); + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->y_buffer_addr; + JPEG_DBG_HIGH("%s Output we 0 buffer address is %x\n", __func__, + p_input->y_buffer_addr); + msm_jpeg_hw_write(&tmp_hw_cmd, base); + wmb(); + + tmp_hw_cmd = *hw_cmd_p++; + tmp_hw_cmd.data = p_input->cbcr_buffer_addr; + JPEG_DBG_HIGH("%s Output we 1 buffer address is %x\n", __func__, + p_input->cbcr_buffer_addr); + msm_jpeg_hw_write(&tmp_hw_cmd, base); + wmb(); +} + struct msm_jpeg_hw_cmd hw_cmd_reset[] = { /* type, repeat n times, offset, mask, data or pdata */ {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, @@ -260,6 +400,35 @@ void msm_jpeg_hw_reset(void *base, int size) return; } +struct msm_jpeg_hw_cmd hw_cmd_reset_dma[] = { + /* type, repeat n times, offset, mask, data or pdata */ + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_IRQ_MASK_ADDR, + JPEGDMA_IRQ_MASK_BMSK, {JPEGDMA_IRQ_DISABLE_ALL} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_IRQ_CLEAR_ADDR, + JPEGDMA_IRQ_MASK_BMSK, {JPEGDMA_IRQ_CLEAR_ALL} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_IRQ_MASK_ADDR, + JPEGDMA_IRQ_MASK_BMSK, {JPEGDMA_IRQ_ALLSOURCES_ENABLE} }, + {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEGDMA_RESET_CMD_ADDR, + JPEGDMA_RESET_CMD_BMSK, {JPEGDMA_RESET_DEFAULT} }, +}; + +void msm_jpeg_hw_reset_dma(void *base, int size) +{ + struct msm_jpeg_hw_cmd *hw_cmd_p; + + hw_cmd_p = &hw_cmd_reset_dma[0]; + wmb(); + msm_jpeg_hw_write(hw_cmd_p++, base); + wmb(); + msm_jpeg_hw_write(hw_cmd_p++, base); + wmb(); + msm_jpeg_hw_write(hw_cmd_p++, base); + wmb(); + msm_jpeg_hw_write(hw_cmd_p, base); + wmb(); + + return; +} uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *hw_cmd_p, void *jpeg_region_base) @@ -393,7 +562,7 @@ void msm_jpeg_io_dump(void *base, int size) int i; u32 *p = (u32 *) addr; u32 data; - JPEG_DBG_HIGH("%s:%d] %pK %d", __func__, __LINE__, addr, size); + JPEG_DBG_HIGH("%s:%d] %p %d", __func__, __LINE__, addr, size); line_str[0] = '\0'; p_str = line_str; for (i = 0; i < size/4; i++) { diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.h b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.h index c3c5bd77231c..96bf8828d2db 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.h +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -41,12 +41,16 @@ struct msm_jpeg_hw_pingpong { int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, struct msm_jpeg_hw_buf *buf, void *); +int msm_jpegdma_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, + struct msm_jpeg_hw_buf *buf, void *); void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw); void *msm_jpeg_hw_pingpong_active_buffer(struct msm_jpeg_hw_pingpong *pingpong_hw); void msm_jpeg_hw_irq_clear(uint32_t, uint32_t, void *); +void msm_jpegdma_hw_irq_clear(uint32_t, uint32_t, void *); int msm_jpeg_hw_irq_get_status(void *); +int msm_jpegdma_hw_irq_get_status(void *); long msm_jpeg_hw_encode_output_size(void *); #define MSM_JPEG_HW_MASK_COMP_FRAMEDONE \ MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK @@ -79,10 +83,36 @@ long msm_jpeg_hw_encode_output_size(void *); #define msm_jpeg_hw_irq_is_err(jpeg_irq_status) \ (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_ERR) + +#define MSM_JPEGDMA_HW_MASK_COMP_FRAMEDONE \ + MSM_JPEGDMA_HW_IRQ_STATUS_FRAMEDONE_MASK +#define MSM_JPEGDMA_HW_MASK_COMP_FE \ + MSM_JPEGDMA_HW_IRQ_STATUS_FE_RD_DONE_MASK +#define MSM_JPEGDMA_HW_MASK_COMP_WE \ + (MSM_JPEGDMA_HW_IRQ_STATUS_WE_WR_DONE_MASK) +#define MSM_JPEGDMA_HW_MASK_COMP_RESET_ACK \ + MSM_JPEGDMA_HW_IRQ_STATUS_RESET_ACK_MASK + + +#define msm_jpegdma_hw_irq_is_frame_done(jpeg_irq_status) \ + (jpeg_irq_status & MSM_JPEGDMA_HW_MASK_COMP_FRAMEDONE) +#define msm_jpegdma_hw_irq_is_fe_pingpong(jpeg_irq_status) \ + (jpeg_irq_status & MSM_JPEGDMA_HW_MASK_COMP_FE) +#define msm_jpegdma_hw_irq_is_we_pingpong(jpeg_irq_status) \ + (jpeg_irq_status & MSM_JPEGDMA_HW_MASK_COMP_WE) +#define msm_jpegdma_hw_irq_is_reset_ack(jpeg_irq_status) \ + (jpeg_irq_status & MSM_JPEGDMA_HW_MASK_COMP_RESET_ACK) + + void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, uint8_t pingpong_index, void *); void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, uint8_t pingpong_index, void *); +void msm_jpegdma_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, + uint8_t pingpong_index, void *); +void msm_jpegdma_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, + uint8_t pingpong_index, void *); + void msm_jpeg_hw_we_buffer_cfg(uint8_t is_realtime); @@ -101,5 +131,6 @@ int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *, uint32_t , void msm_jpeg_hw_region_dump(int size); void msm_jpeg_io_dump(void *base, int size); void msm_jpeg_decode_status(void *base); +void msm_jpeg_hw_reset_dma(void *base, int size); #endif /* MSM_JPEG_HW_H */ diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw_reg.h b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw_reg.h index 4fbab4b3ea71..3d45eb47444e 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw_reg.h +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw_reg.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -55,7 +55,7 @@ #define JPEG_OFFLINE_CMD_START 0x00000001 -#define JPEG_RESET_DEFAULT 0x00032013 +#define JPEG_RESET_DEFAULT 0x00030013 #define JPEG_IRQ_DISABLE_ALL 0x00000000 #define JPEG_IRQ_CLEAR_ALL 0xFFFFFFFF @@ -64,22 +64,22 @@ #define JPEG_PLN0_RD_PNTR_BMSK 0xFFFFFFFF #define JPEG_PLN0_RD_OFFSET_ADDR 0x0000003C -#define JPEG_PLN0_RD_OFFSET_BMSK 0x1FFFFFFF +#define JPEG_PLN0_RD_OFFSET_BMSK 0xFFFFFFFF #define JPEG_PLN1_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000044) #define JPEG_PLN1_RD_PNTR_BMSK 0xFFFFFFFF #define JPEG_PLN1_RD_OFFSET_ADDR 0x00000048 -#define JPEG_PLN1_RD_OFFSET_BMSK 0x1FFFFFFF +#define JPEG_PLN1_RD_OFFSET_BMSK 0xFFFFFFFF #define JPEG_PLN2_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000050) #define JPEG_PLN2_RD_PNTR_BMSK 0xFFFFFFFF #define JPEG_PLN2_RD_OFFSET_ADDR 0x00000054 -#define JPEG_PLN2_RD_OFFSET_BMSK 0x1FFFFFFF +#define JPEG_PLN2_RD_OFFSET_BMSK 0xFFFFFFFF #define JPEG_CMD_ADDR (JPEG_REG_BASE + 0x00000010) -#define JPEG_CMD_BMSK 0x00000FFF +#define JPEG_CMD_BMSK 0xFFFFFFFF #define JPEG_CMD_CLEAR_WRITE_PLN_QUEUES 0x700 #define JPEG_PLN0_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000cc) @@ -135,4 +135,40 @@ #define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 #define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 +#define JPEGDMA_IRQ_MASK_ADDR (JPEG_REG_BASE + 0x0000000C) +#define JPEGDMA_IRQ_MASK_BMSK 0xFFFFFFFF +#define JPEGDMA_IRQ_ALLSOURCES_ENABLE 0xFFFFFFFF + +#define JPEGDMA_IRQ_CLEAR_ADDR (JPEG_REG_BASE + 0x00000014) +#define JPEGDMA_IRQ_CLEAR_BMSK 0xFFFFFFFF + +#define JPEGDMA_RESET_CMD_ADDR (JPEG_REG_BASE + 0x00000008) +#define JPEGDMA_RESET_CMD_BMSK 0xFFFFFFFF + +#define JPEGDMA_IRQ_STATUS_ADDR (JPEG_REG_BASE + 0x00000010) +#define JPEGDMA_IRQ_STATUS_BMSK 0xFFFFFFFF +#define JPEGDMA_RESET_DEFAULT 0x00030083 + + +#define JPEGDMA_CMD_ADDR (JPEG_REG_BASE + 0x0000001C) +#define JPEGDMA_CMD_BMSK (0xFFFFFFFF) +#define JPEGDMA_CMD_CLEAR_READ_PLN_QUEUES 0x030 +#define JPEGDMA_CMD_CLEAR_WRITE_PLN_QUEUES 0x300 + +#define JPEGDMA_IRQ_DISABLE_ALL 0x00000000 +#define JPEGDMA_IRQ_CLEAR_ALL 0x00001FFF +#define MSM_JPEGDMA_HW_IRQ_STATUS_FRAMEDONE_MASK 0x00000001 +#define MSM_JPEGDMA_HW_IRQ_STATUS_FRAMEDONE_SHIFT 0x00000000 +#define MSM_JPEGDMA_HW_IRQ_STATUS_FE_RD_DONE_MASK 0x00000006 +#define MSM_JPEGDMA_HW_IRQ_STATUS_FE_RD_DONE_SHIFT 0x00000001 +#define MSM_JPEGDMA_HW_IRQ_STATUS_WE_WR_DONE_MASK 0x00000060 +#define MSM_JPEGDMA_HW_IRQ_STATUS_WE_WR_DONE_SHIFT 0x00000005 +#define MSM_JPEGDMA_HW_IRQ_STATUS_RESET_ACK_MASK 0x00000400 +#define MSM_JPEGDMA_HW_IRQ_STATUS_RESET_ACK_SHIFT 0x0000000a + +#define MSM_JPEGDMA_FE_0_RD_PNTR (JPEG_REG_BASE + 0x00000034) +#define MSM_JPEGDMA_FE_1_RD_PNTR (JPEG_REG_BASE + 0x00000078) +#define MSM_JPEGDMA_WE_0_WR_PNTR (JPEG_REG_BASE + 0x000000BC) +#define MSM_JPEGDMA_WE_1_WR_PNTR (JPEG_REG_BASE + 0x000000EC) + #endif /* MSM_JPEG_HW_REG_H */ diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.c b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.c index 1243d8b42fef..923636be66f3 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.c +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.c @@ -27,18 +27,13 @@ #include "msm_jpeg_sync.h" #include "msm_jpeg_common.h" #include "msm_jpeg_hw.h" -#include "msm_camera_io_util.h" - -#define JPEG_CLK_INFO_MAX 16 - -static struct msm_cam_clk_info jpeg_8x_clk_info[JPEG_CLK_INFO_MAX]; static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, struct platform_device *pdev) { uint32_t count; int i, rc; - uint32_t rates[JPEG_CLK_INFO_MAX]; + uint32_t rates[JPEG_CLK_MAX]; struct device_node *of_node; of_node = pdev->dev.of_node; @@ -51,17 +46,17 @@ static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, return 0; } - if (count > JPEG_CLK_INFO_MAX) { + if (count > JPEG_CLK_MAX) { pr_err("invalid count=%d, max is %d\n", count, - JPEG_CLK_INFO_MAX); + JPEG_CLK_MAX); return -EINVAL; } for (i = 0; i < count; i++) { rc = of_property_read_string_index(of_node, "clock-names", - i, &(jpeg_8x_clk_info[i].clk_name)); + i, &(jpeg_dev->jpeg_clk_info[i].clk_name)); JPEG_DBG("clock-names[%d] = %s\n", - i, jpeg_8x_clk_info[i].clk_name); + i, jpeg_dev->jpeg_clk_info[i].clk_name); if (rc < 0) { pr_err("%s failed %d\n", __func__, __LINE__); return rc; @@ -74,10 +69,10 @@ static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, return rc; } for (i = 0; i < count; i++) { - jpeg_8x_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; + jpeg_dev->jpeg_clk_info[i].clk_rate = + (rates[i] == 0) ? (long) -1 : (long) rates[i]; JPEG_DBG("clk_rate[%d] = %ld\n", - i, jpeg_8x_clk_info[i].clk_rate); + i, jpeg_dev->jpeg_clk_info[i].clk_rate); } jpeg_dev->num_clk = count; return 0; @@ -94,11 +89,20 @@ int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, if (IS_ERR(jpeg_clk)) { JPEG_PR_ERR("%s get failed\n", "core_clk"); rc = PTR_ERR(jpeg_clk); - return rc; + goto error; } + clk_rate = clk_round_rate(jpeg_clk, clk_rate); + if (clk_rate < 0) { + JPEG_PR_ERR("%s:%d] round rate failed", __func__, __LINE__); + rc = -EINVAL; + goto error; + } + JPEG_DBG("%s:%d] jpeg clk rate %ld", __func__, __LINE__, clk_rate); + rc = clk_set_rate(jpeg_clk, clk_rate); +error: return rc; } @@ -302,8 +306,8 @@ int msm_jpeg_platform_init(struct platform_device *pdev, return -ENODEV; } jpeg_irq = jpeg_irq_res->start; - JPEG_DBG("%s base address: 0x%x, jpeg irq number: %d\n", __func__, - jpeg_mem->start, jpeg_irq); + JPEG_DBG("%s base address: 0x%lx, jpeg irq number: %d\n", __func__, + (unsigned long)jpeg_mem->start, jpeg_irq); pgmn_dev->jpeg_bus_client = msm_bus_scale_register_client(&msm_jpeg_bus_client_pdata); @@ -343,7 +347,7 @@ int msm_jpeg_platform_init(struct platform_device *pdev, goto fail_fs; } - rc = msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, + rc = msm_cam_clk_enable(&pgmn_dev->pdev->dev, pgmn_dev->jpeg_clk_info, pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 1); if (rc < 0) { JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); @@ -361,9 +365,8 @@ int msm_jpeg_platform_init(struct platform_device *pdev, JPEG_PR_ERR("%s: ioremap failed\n", __func__); goto fail_vbif; } - - JPEG_DBG("%s:%d] jpeg_vbif 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->jpeg_vbif); + JPEG_DBG("%s:%d] jpeg_vbif 0x%lx", __func__, __LINE__, + (unsigned long)pgmn_dev->jpeg_vbif); rc = msm_jpeg_attach_iommu(pgmn_dev); if (rc < 0) @@ -371,8 +374,8 @@ int msm_jpeg_platform_init(struct platform_device *pdev, set_vbif_params(pgmn_dev, pgmn_dev->jpeg_vbif); - rc = request_irq(jpeg_irq, handler, IRQF_TRIGGER_RISING, "jpeg", - context); + rc = request_irq(jpeg_irq, handler, IRQF_TRIGGER_RISING, + dev_name(&pdev->dev), context); if (rc) { JPEG_PR_ERR("%s: request_irq failed, %d\n", __func__, jpeg_irq); @@ -383,7 +386,7 @@ int msm_jpeg_platform_init(struct platform_device *pdev, *base = jpeg_base; *irq = jpeg_irq; - pgmn_dev->jpeg_client = msm_ion_client_create("camera/jpeg"); + pgmn_dev->jpeg_client = msm_ion_client_create(dev_name(&pdev->dev)); JPEG_DBG("%s:%d] success\n", __func__, __LINE__); pgmn_dev->state = MSM_JPEG_INIT; @@ -397,17 +400,12 @@ fail_iommu: fail_vbif: - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, + msm_cam_clk_enable(&pgmn_dev->pdev->dev, pgmn_dev->jpeg_clk_info, pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); fail_clk: - rc = regulator_disable(pgmn_dev->jpeg_fs); - if (!rc) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, rc); - pgmn_dev->jpeg_fs = NULL; + regulator_disable(pgmn_dev->jpeg_fs); + regulator_put(pgmn_dev->jpeg_fs); fail_fs: iounmap(jpeg_base); @@ -436,7 +434,7 @@ int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, msm_bus_scale_unregister_client(pgmn_dev->jpeg_bus_client); } - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, + msm_cam_clk_enable(&pgmn_dev->pdev->dev, pgmn_dev->jpeg_clk_info, pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); JPEG_DBG("%s:%d] clock disbale done", __func__, __LINE__); diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.c b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.c index fac3da77d26f..56296aecbe32 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.c +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.c @@ -25,14 +25,24 @@ #include "msm_jpeg_common.h" #define JPEG_REG_SIZE 0x308 -#define JPEG_DEV_CNT 3 +#define JPEG_DEV_CNT 4 #define JPEG_DEC_ID 2 #define UINT32_MAX (0xFFFFFFFFU) #ifdef CONFIG_COMPAT + +#define MSM_JPEG_IOCTL_GET_HW_VERSION32 \ + _IOW(MSM_JPEG_IOCTL_MAGIC, 1, struct msm_jpeg_hw_cmd32) + #define MSM_JPEG_IOCTL_RESET32 \ _IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd32) +#define MSM_JPEG_IOCTL_STOP32 \ + _IOW(MSM_JPEG_IOCTL_MAGIC, 3, struct msm_jpeg_hw_cmds32) + +#define MSM_JPEG_IOCTL_START32 \ + _IOW(MSM_JPEG_IOCTL_MAGIC, 4, struct msm_jpeg_hw_cmds32) + #define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32 \ _IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf32) @@ -48,6 +58,12 @@ #define MSM_JPEG_IOCTL_EVT_GET32 \ _IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd32) +#define MSM_JPEG_IOCTL_HW_CMD32 \ + _IOW(MSM_JPEG_IOCTL_MAGIC, 13, struct msm_jpeg_hw_cmd32) + +#define MSM_JPEG_IOCTL_HW_CMDS32 \ + _IOW(MSM_JPEG_IOCTL_MAGIC, 14, struct msm_jpeg_hw_cmds32) + #define MSM_JPEG_IOCTL_TEST_DUMP_REGION32 \ _IOW(MSM_JPEG_IOCTL_MAGIC, 15, compat_ulong_t) @@ -75,6 +91,27 @@ struct msm_jpeg_buf32 { uint32_t pln2_len; }; +struct msm_jpeg_hw_cmd32 { + + uint32_t type:4; + + /* n microseconds of timeout for WAIT */ + /* n microseconds of time for DELAY */ + /* repeat n times for READ/WRITE */ + /* max is 0xFFF, 4095 */ + uint32_t n:12; + uint32_t offset:16; + uint32_t mask; + union { + uint32_t data; /* for single READ/WRITE/WAIT, n = 1 */ + compat_uptr_t pdata; /* for multiple READ/WRITE/WAIT, n > 1 */ + }; +}; + +struct msm_jpeg_hw_cmds32 { + uint32_t m; /* number of elements in the hw_cmd array */ + struct msm_jpeg_hw_cmd32 hw_cmd[1]; +}; #endif @@ -160,7 +197,7 @@ inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p) int rc; JPEG_DBG("%s:%d] %s wait\n", __func__, __LINE__, q_p->name); - rc = wait_event_interruptible_timeout(q_p->wait, + rc = wait_event_timeout(q_p->wait, (!list_empty_careful(&q_p->q) || q_p->unblck), msecs_to_jiffies(tm)); JPEG_DBG("%s:%d] %s wait done\n", __func__, __LINE__, q_p->name); @@ -174,9 +211,6 @@ inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p) __LINE__, q_p->name); q_p->unblck = 0; rc = -ECANCELED; - } else if (rc < 0) { - JPEG_PR_ERR("%s:%d] %s rc %d\n", __func__, __LINE__, - q_p->name, rc); } } return rc; @@ -277,8 +311,8 @@ int msm_jpeg_evt_get(struct msm_jpeg_device *pgmn_dev, ctrl_cmd.type = buf_p->vbuf.type; kfree(buf_p); - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) ctrl_cmd.value, ctrl_cmd.len); + JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__, + (unsigned long) ctrl_cmd.value, ctrl_cmd.len); if (copy_to_user(to, &ctrl_cmd, sizeof(ctrl_cmd))) { JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); @@ -379,8 +413,8 @@ int msm_jpeg_output_get(struct msm_jpeg_device *pgmn_dev, void __user *to) pgmn_dev->domain_num); kfree(buf_p); - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); + JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__, + (unsigned long) buf_cmd.vaddr, buf_cmd.y_len); if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { JPEG_PR_ERR("%s:%d]", __func__, __LINE__); @@ -397,11 +431,27 @@ int msm_jpeg_output_get_unblock(struct msm_jpeg_device *pgmn_dev) return 0; } +static inline int msm_jpeg_add_u32_check(uint32_t *p, uint32_t n, uint32_t *res) +{ + *res = 0; + + while (n--) { + if ((*res + *p) < *res) + return -EFAULT; + *res += *p++; + } + return 0; +} + int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev, void __user *arg) { struct msm_jpeg_buf buf_cmd; struct msm_jpeg_core_buf *buf_p; + uint32_t buf_len_params[10]; + uint32_t total_len = 0; + int n = 0; + memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); @@ -410,25 +460,38 @@ int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev, return -EFAULT; } + buf_len_params[n++] = buf_cmd.y_len; + buf_len_params[n++] = buf_cmd.cbcr_len; + buf_len_params[n++] = buf_cmd.pln2_len; + buf_len_params[n++] = buf_cmd.offset; + buf_len_params[n++] = buf_cmd.y_off; + if (msm_jpeg_add_u32_check(buf_len_params, n, &total_len) < 0) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); if (!buf_p) { JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); return -EFAULT; } - JPEG_DBG("%s:%d] vaddr = 0x%08x y_len = %d\n, fd = %d", - __func__, __LINE__, (int) buf_cmd.vaddr, buf_cmd.y_len, - buf_cmd.fd); + + JPEG_DBG("%s:%d] vaddr = 0x%08lx y_len = %d\n, fd = %d", + __func__, __LINE__, (unsigned long) buf_cmd.vaddr, + buf_cmd.y_len, buf_cmd.fd); buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + buf_cmd.pln2_len, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); + total_len, &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); + if (!buf_p->y_buffer_addr) { JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); kfree(buf_p); return -EFAULT; } + buf_p->y_buffer_addr += buf_cmd.offset + buf_cmd.y_off; + if (buf_cmd.cbcr_len) buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + buf_cmd.y_len; @@ -514,8 +577,8 @@ int msm_jpeg_input_get(struct msm_jpeg_device *pgmn_dev, void __user *to) pgmn_dev->domain_num); kfree(buf_p); - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); + JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__, + (unsigned long) buf_cmd.vaddr, buf_cmd.y_len); if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); @@ -537,12 +600,30 @@ int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, { struct msm_jpeg_core_buf *buf_p; struct msm_jpeg_buf buf_cmd; + uint32_t buf_len_params[10]; + uint32_t total_len = 0; + int n = 0; + memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); return -EFAULT; } + buf_len_params[n++] = buf_cmd.y_len; + buf_len_params[n++] = buf_cmd.cbcr_len; + buf_len_params[n++] = buf_cmd.pln2_len; + buf_len_params[n++] = buf_cmd.offset; + buf_len_params[n++] = buf_cmd.y_off; + if (buf_cmd.cbcr_len) + buf_len_params[n++] = buf_cmd.cbcr_off; + if (buf_cmd.pln2_len) + buf_len_params[n++] = buf_cmd.pln2_off; + + if (msm_jpeg_add_u32_check(buf_len_params, n, &total_len) < 0) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); if (!buf_p) { @@ -550,14 +631,20 @@ int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, return -EFAULT; } - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); + JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__, + (unsigned long) buf_cmd.vaddr, buf_cmd.y_len); buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + - buf_cmd.pln2_len + buf_cmd.offset, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num) + - buf_cmd.offset + buf_cmd.y_off; + total_len, &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); + + if (!buf_p->y_buffer_addr) { + JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); + kfree(buf_p); + return -EFAULT; + } + + buf_p->y_buffer_addr += buf_cmd.offset + buf_cmd.y_off; + buf_p->y_len = buf_cmd.y_len; buf_p->cbcr_len = buf_cmd.cbcr_len; buf_p->pln2_len = buf_cmd.pln2_len; @@ -581,11 +668,6 @@ int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, JPEG_DBG("pln2_addr = %x, pln2_len = %d, fd =%d\n", buf_p->pln2_addr, buf_p->pln2_len, buf_cmd.fd); - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } buf_p->vbuf = buf_cmd; msm_jpeg_q_in(&pgmn_dev->input_buf_q, buf_p); @@ -628,7 +710,7 @@ int msm_jpeg_irq(int event, void *context, void *data) int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev) { int rc; - + irqreturn_t (*core_irq)(int, void *); mutex_lock(&pgmn_dev->lock); if (pgmn_dev->open_count) { /* only open once */ @@ -640,16 +722,21 @@ int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev) mutex_unlock(&pgmn_dev->lock); msm_jpeg_core_irq_install(msm_jpeg_irq); + if (pgmn_dev->core_type == MSM_JPEG_CORE_CODEC) + core_irq = msm_jpeg_core_irq; + else + core_irq = msm_jpegdma_core_irq; + rc = msm_jpeg_platform_init(pgmn_dev->pdev, &pgmn_dev->mem, &pgmn_dev->base, - &pgmn_dev->irq, msm_jpeg_core_irq, pgmn_dev); + &pgmn_dev->irq, core_irq, pgmn_dev); if (rc) { JPEG_PR_ERR("%s:%d] platform_init fail %d\n", __func__, __LINE__, rc); return rc; } - JPEG_DBG("%s:%d] platform resources - mem %pK, base %pK, irq %d\n", + JPEG_DBG("%s:%d] platform resources - mem %p, base %p, irq %d\n", __func__, __LINE__, pgmn_dev->mem, pgmn_dev->base, pgmn_dev->irq); pgmn_dev->res_size = resource_size(pgmn_dev->mem); @@ -711,9 +798,10 @@ int msm_jpeg_ioctl_hw_cmd(struct msm_jpeg_device *pgmn_dev, is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1, pgmn_dev->res_size, pgmn_dev->base); - JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x,pdata %x\n", + JPEG_DBG( + "%s:%d] type %d, n %d, offset %d, mask %x, data %x, pdata %lx\n", __func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset, - hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata); + hw_cmd.mask, hw_cmd.data, (unsigned long) hw_cmd.pdata); if (is_copy_to_user >= 0) { if (copy_to_user(arg, &hw_cmd, sizeof(hw_cmd))) { @@ -780,7 +868,8 @@ int msm_jpeg_ioctl_hw_cmds(struct msm_jpeg_device *pgmn_dev, return 0; } -int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg) +int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg, + int (*hw_ioctl)(struct msm_jpeg_device *, void * __user)) { struct msm_jpeg_core_buf *buf_out; struct msm_jpeg_core_buf *buf_out_free[2] = {NULL, NULL}; @@ -818,33 +907,32 @@ int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg) for (i = 0; i < 2; i++) kfree(buf_out_free[i]); - pgmn_dev->state = MSM_JPEG_EXECUTING; JPEG_DBG_HIGH("%s:%d] START\n", __func__, __LINE__); + pgmn_dev->state = MSM_JPEG_EXECUTING; wmb(); - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, arg); + rc = hw_ioctl(pgmn_dev, arg); wmb(); - JPEG_DBG("%s:%d]", __func__, __LINE__); return rc; } -int msm_jpeg_ioctl_reset(struct msm_jpeg_device *pgmn_dev, - void * __user arg) +int msm_jpeg_ioctl_reset(struct msm_jpeg_device *pgmn_dev, void * __user arg) { int rc; - struct msm_jpeg_ctrl_cmd ctrl_cmd; + struct msm_jpeg_ctrl_cmd ctrl_cmd, *p_ctrl_cmd; JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); + p_ctrl_cmd = &ctrl_cmd; if (pgmn_dev->state == MSM_JPEG_INIT) { if (copy_from_user(&ctrl_cmd, arg, sizeof(ctrl_cmd))) { JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); return -EFAULT; } - pgmn_dev->op_mode = ctrl_cmd.type; + pgmn_dev->op_mode = p_ctrl_cmd->type; - rc = msm_jpeg_core_reset(pgmn_dev, pgmn_dev->op_mode, pgmn_dev->base, - resource_size(pgmn_dev->mem)); + rc = msm_jpeg_core_reset(pgmn_dev, pgmn_dev->op_mode, + pgmn_dev->base, resource_size(pgmn_dev->mem)); } else { JPEG_PR_ERR("%s:%d] JPEG not been initialized Wrong state\n", __func__, __LINE__); @@ -891,7 +979,7 @@ int msm_jpeg_ioctl_set_clk_rate(struct msm_jpeg_device *pgmn_dev, return 0; } #ifdef CONFIG_COMPAT -int msm_jpeg_get_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, +int msm_jpeg_get_ctrl_cmd32(struct msm_jpeg_ctrl_cmd *ctrl_cmd, void __user *arg) { struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; @@ -908,7 +996,7 @@ int msm_jpeg_get_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, return 0; } -int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, +int msm_jpeg_put_ctrl_cmd32(struct msm_jpeg_ctrl_cmd *ctrl_cmd, void __user *arg) { struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; @@ -919,7 +1007,7 @@ int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, temp = (unsigned long) ctrl_cmd->value; ctrl_cmd32.value = (compat_uptr_t) temp; - if (copy_from_user(arg, &ctrl_cmd32, + if (copy_to_user(arg, &ctrl_cmd32, sizeof(struct msm_jpeg_ctrl_cmd32))) { JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); return -EFAULT; @@ -928,7 +1016,7 @@ int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, return 0; } -int msm_jpeg_get_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, +int msm_jpeg_get_jpeg_buf32(struct msm_jpeg_buf *jpeg_buf, void __user *arg) { struct msm_jpeg_buf32 jpeg_buf32; @@ -953,7 +1041,7 @@ int msm_jpeg_get_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, return 0; } -int msm_jpeg_put_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, +int msm_jpeg_put_jpeg_buf32(struct msm_jpeg_buf *jpeg_buf, void __user *arg) { struct msm_jpeg_buf32 jpeg_buf32; @@ -980,28 +1068,196 @@ int msm_jpeg_put_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, return 0; } +int msm_jpeg_put_hw_cmd32(void __user *arg, + struct msm_jpeg_hw_cmd *phw_cmd, int copy) +{ + struct msm_jpeg_hw_cmd32 hw_cmd32; + struct msm_jpeg_hw_cmd32 *phw_cmd32; + + phw_cmd32 = (struct msm_jpeg_hw_cmd32 *) arg; + if (copy) + phw_cmd32 = &hw_cmd32; + + + phw_cmd32->type = phw_cmd->type; + phw_cmd32->n = phw_cmd->n; + phw_cmd32->offset = phw_cmd->offset; + phw_cmd32->mask = phw_cmd->mask; + phw_cmd32->data = phw_cmd->data; + + if (copy && copy_to_user(arg, &hw_cmd32, sizeof(hw_cmd32))) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + + return 0; +} +int msm_jpeg_get_hw_cmd32(struct msm_jpeg_hw_cmd *phw_cmd, + void __user *arg, int copy) +{ + struct msm_jpeg_hw_cmd32 hw_cmd32; + struct msm_jpeg_hw_cmd32 *phw_cmd32; + + if (copy) { + phw_cmd32 = &hw_cmd32; + if (copy_from_user(&hw_cmd32, arg, sizeof(hw_cmd32))) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + } else { + phw_cmd32 = (struct msm_jpeg_hw_cmd32 *) arg; + } + phw_cmd->type = phw_cmd32->type; + phw_cmd->n = phw_cmd32->n; + phw_cmd->offset = phw_cmd32->offset; + phw_cmd->mask = phw_cmd32->mask; + phw_cmd->data = phw_cmd32->data; + + return 0; +} +int msm_jpeg_ioctl_hw_cmds32(struct msm_jpeg_device *pgmn_dev, + void __user *arg) +{ + int is_copy_to_user; + uint32_t len, len32; + uint32_t m; + struct msm_jpeg_hw_cmds32 *phw_cmds32; + struct msm_jpeg_hw_cmds *phw_cmds; + + if (copy_from_user(&m, arg, sizeof(m))) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + + if ((m == 0) || (m > ((UINT32_MAX - sizeof(struct msm_jpeg_hw_cmds32)) / + sizeof(struct msm_jpeg_hw_cmd32)))) { + JPEG_PR_ERR("%s:%d] m_cmds out of range\n", __func__, __LINE__); + return -EFAULT; + } + + len32 = sizeof(struct msm_jpeg_hw_cmds32) + + sizeof(struct msm_jpeg_hw_cmd32) * (m - 1); + phw_cmds32 = kmalloc(len32, GFP_KERNEL); + if (!phw_cmds32) { + JPEG_PR_ERR("%s:%d] no mem %d\n", __func__, __LINE__, len32); + return -EFAULT; + } + + if (copy_from_user(phw_cmds32, arg, len32)) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + kfree(phw_cmds32); + return -EFAULT; + } + len = sizeof(struct msm_jpeg_hw_cmds) + + sizeof(struct msm_jpeg_hw_cmd) * (m - 1); + phw_cmds = kmalloc(len, GFP_KERNEL); + if (!phw_cmds) { + JPEG_PR_ERR("%s:%d] no mem %d\n", __func__, __LINE__, len); + kfree(phw_cmds32); + return -EFAULT; + } + (phw_cmds)->m = m; + while (m--) { + struct msm_jpeg_hw_cmd32 *src; + struct msm_jpeg_hw_cmd *dst; + src = &phw_cmds32->hw_cmd[m]; + dst = &(phw_cmds)->hw_cmd[m]; + msm_jpeg_get_hw_cmd32(dst, src, 0); + } + + is_copy_to_user = msm_jpeg_hw_exec_cmds(phw_cmds->hw_cmd, phw_cmds->m, + pgmn_dev->res_size, pgmn_dev->base); + + if (is_copy_to_user >= 0) { + m = phw_cmds->m; + while (m--) { + struct msm_jpeg_hw_cmd *src; + struct msm_jpeg_hw_cmd32 *dst; + dst = &phw_cmds32->hw_cmd[m]; + src = &phw_cmds->hw_cmd[m]; + + msm_jpeg_put_hw_cmd32(dst, src, 0); + } + if (copy_to_user(arg, phw_cmds32, len32)) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + kfree(phw_cmds); + kfree(phw_cmds32); + return -EFAULT; + } + + } else { + kfree(phw_cmds); + kfree(phw_cmds32); + return is_copy_to_user; + } + kfree(phw_cmds); + kfree(phw_cmds32); + + return 0; +} +int msm_jpeg_ioctl_hw_cmd32(struct msm_jpeg_device *pgmn_dev, + void * __user arg) +{ + struct msm_jpeg_hw_cmd hw_cmd; + int is_copy_to_user; + + if (msm_jpeg_get_hw_cmd32(&hw_cmd, arg, 1)) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + + is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1, + pgmn_dev->res_size, pgmn_dev->base); + JPEG_DBG("%s:%d] type %d, n %d, offst %d, mask %x, data %x pdata %lx\n", + __func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset, + hw_cmd.mask, hw_cmd.data, (unsigned long) hw_cmd.pdata); + + if (is_copy_to_user >= 0) { + if (msm_jpeg_put_hw_cmd32(arg, &hw_cmd, 1)) { + JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); + return -EFAULT; + } + } else + return is_copy_to_user; + + + return 0; +} + long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, unsigned int cmd, unsigned long arg) { int rc = 0; - struct msm_jpeg_ctrl_cmd ctrl_cmd; + struct msm_jpeg_ctrl_cmd *pctrl_cmd = NULL, ctrl_cmd; struct msm_jpeg_buf jpeg_buf; + mm_segment_t old_fs; + + old_fs = get_fs(); + switch (cmd) { case MSM_JPEG_IOCTL_GET_HW_VERSION: JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); break; + case MSM_JPEG_IOCTL_GET_HW_VERSION32: + JPEG_DBG("%s:%d] VERSION 1 32bit\n", __func__, __LINE__); + rc = msm_jpeg_ioctl_hw_cmd32(pgmn_dev, (void __user *) arg); + break; case MSM_JPEG_IOCTL_RESET: rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); break; case MSM_JPEG_IOCTL_RESET32: - rc = msm_jpeg_get_compat_ctrl_cmd(&ctrl_cmd, + rc = msm_jpeg_get_ctrl_cmd32(&ctrl_cmd, (void __user *) arg); if (rc < 0) break; + + set_fs(KERNEL_DS); rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) &ctrl_cmd); + set_fs(old_fs); + kfree(pctrl_cmd); break; case MSM_JPEG_IOCTL_STOP: @@ -1009,8 +1265,19 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, pgmn_dev->state = MSM_JPEG_STOPPED; break; + case MSM_JPEG_IOCTL_STOP32: + rc = msm_jpeg_ioctl_hw_cmds32(pgmn_dev, (void __user *) arg); + pgmn_dev->state = MSM_JPEG_STOPPED; + break; + case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); + rc = msm_jpeg_start(pgmn_dev, (void __user *) arg, + msm_jpeg_ioctl_hw_cmds); + break; + + case MSM_JPEG_IOCTL_START32: + rc = msm_jpeg_start(pgmn_dev, (void __user *) arg, + msm_jpeg_ioctl_hw_cmds32); break; case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: @@ -1019,11 +1286,13 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); + rc = msm_jpeg_get_jpeg_buf32(&jpeg_buf, (void __user *) arg); if (rc < 0) break; + set_fs(KERNEL_DS); rc = msm_jpeg_input_buf_enqueue(pgmn_dev, (void __user *) &jpeg_buf); + set_fs(old_fs); break; case MSM_JPEG_IOCTL_INPUT_GET: @@ -1031,10 +1300,12 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_INPUT_GET32: + set_fs(KERNEL_DS); rc = msm_jpeg_input_get(pgmn_dev, (void __user *) &jpeg_buf); + set_fs(old_fs); if (rc < 0) break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); + rc = msm_jpeg_put_jpeg_buf32(&jpeg_buf, (void __user *) arg); break; @@ -1048,11 +1319,13 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); + rc = msm_jpeg_get_jpeg_buf32(&jpeg_buf, (void __user *) arg); if (rc < 0) break; + set_fs(KERNEL_DS); rc = msm_jpeg_output_buf_enqueue(pgmn_dev, (void __user *) &jpeg_buf); + set_fs(old_fs); break; case MSM_JPEG_IOCTL_OUTPUT_GET: @@ -1060,10 +1333,12 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_OUTPUT_GET32: + set_fs(KERNEL_DS); rc = msm_jpeg_output_get(pgmn_dev, (void __user *) &jpeg_buf); + set_fs(old_fs); if (rc < 0) break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); + rc = msm_jpeg_put_jpeg_buf32(&jpeg_buf, (void __user *) arg); break; case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: @@ -1075,20 +1350,30 @@ long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_EVT_GET32: + set_fs(KERNEL_DS); rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) &ctrl_cmd); + set_fs(old_fs); if (rc < 0) break; - msm_jpeg_put_compat_ctrl_cmd(&ctrl_cmd, (void __user *) arg); + msm_jpeg_put_ctrl_cmd32(&ctrl_cmd, (void __user *) arg); break; case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: rc = msm_jpeg_evt_get_unblock(pgmn_dev); break; + case MSM_JPEG_IOCTL_HW_CMD32: + rc = msm_jpeg_ioctl_hw_cmd32(pgmn_dev, (void __user *) arg); + break; + case MSM_JPEG_IOCTL_HW_CMD: rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); break; + case MSM_JPEG_IOCTL_HW_CMDS32: + rc = msm_jpeg_ioctl_hw_cmds32(pgmn_dev, (void __user *) arg); + break; + case MSM_JPEG_IOCTL_HW_CMDS: rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); break; @@ -1142,7 +1427,8 @@ long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, break; case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); + rc = msm_jpeg_start(pgmn_dev, (void __user *) arg, + msm_jpeg_ioctl_hw_cmds); break; case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: @@ -1227,7 +1513,7 @@ int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) #ifdef CONFIG_MSM_IOMMU int i = 0, j = 0; char *iommu_name[JPEG_DEV_CNT] = {"jpeg_enc0", "jpeg_enc1", - "jpeg_dec"}; + "jpeg_dec", "jpeg_dma"}; #endif mutex_init(&pgmn_dev->lock); @@ -1251,8 +1537,8 @@ int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) for (i = 0; i < pgmn_dev->iommu_cnt; i++) { pgmn_dev->iommu_ctx_arr[i] = msm_iommu_get_ctx(iommu_name[j]); JPEG_DBG("%s:%d] name %s", __func__, __LINE__, iommu_name[j]); - JPEG_DBG("%s:%d] ctx 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->iommu_ctx_arr[i]); + JPEG_DBG("%s:%d] ctx 0x%lx", __func__, __LINE__, + (unsigned long)pgmn_dev->iommu_ctx_arr[i]); if (!pgmn_dev->iommu_ctx_arr[i]) { JPEG_PR_ERR("%s: No iommu fw context found\n", __func__); @@ -1268,8 +1554,8 @@ int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) goto error; } pgmn_dev->domain = msm_get_iommu_domain(pgmn_dev->domain_num); - JPEG_DBG("%s:%d] dom 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->domain); + JPEG_DBG("%s:%d] dom 0x%lx", __func__, __LINE__, + (unsigned long)pgmn_dev->domain); if (!pgmn_dev->domain) { JPEG_PR_ERR("%s: cannot find domain\n", __func__); goto error; diff --git a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.h b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.h index 1698f17175c0..203e5d28072f 100644 --- a/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.h +++ b/drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_sync.h @@ -21,10 +21,12 @@ #include #include #include +#include "msm_camera_io_util.h" #include "msm_jpeg_hw.h" #define JPEG_8974_V1 0x10000000 #define JPEG_8974_V2 0x10010000 +#define JPEG_CLK_MAX 16 enum msm_jpeg_state { MSM_JPEG_INIT, @@ -34,6 +36,11 @@ enum msm_jpeg_state { MSM_JPEG_IDLE }; +enum msm_jpeg_core_type { + MSM_JPEG_CORE_CODEC, + MSM_JPEG_CORE_DMA +}; + struct msm_jpeg_q { char const *name; struct list_head q; @@ -52,7 +59,9 @@ struct msm_jpeg_device { struct resource *mem; int irq; void *base; - struct clk *jpeg_clk[5]; + struct clk *jpeg_clk[JPEG_CLK_MAX]; + struct msm_cam_clk_info jpeg_clk_info[JPEG_CLK_MAX]; + struct regulator *jpeg_fs; uint32_t hw_version; @@ -108,6 +117,7 @@ struct msm_jpeg_device { uint32_t jpeg_bus_client; uint32_t num_clk; enum msm_jpeg_state state; + enum msm_jpeg_core_type core_type; }; int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev); diff --git a/drivers/media/platform/msm/camera_v2/msm.c b/drivers/media/platform/msm/camera_v2/msm.c index ee9aa8da4b2a..51e651fe5643 100644 --- a/drivers/media/platform/msm/camera_v2/msm.c +++ b/drivers/media/platform/msm/camera_v2/msm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2015, 2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -34,9 +34,7 @@ static struct v4l2_device *msm_v4l2_dev; static struct list_head ordered_sd_list; -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) static struct pm_qos_request msm_v4l2_pm_qos_request; -#endif static struct msm_queue_head *msm_session_q; @@ -46,11 +44,6 @@ spinlock_t msm_eventq_lock; static struct pid *msm_pid; spinlock_t msm_pid_lock; -static int module_init_status; -struct msm_cam_dummy_queue { - wait_queue_head_t state_wait; -}; -static struct msm_cam_dummy_queue cam_dummy_queue; #define msm_dequeue(queue, type, member) ({ \ unsigned long flags; \ @@ -196,29 +189,24 @@ static inline int __msm_queue_find_command_ack_q(void *d1, void *d2) return (ack->stream_id == *(unsigned int *)d2) ? 1 : 0; } -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) static void msm_pm_qos_add_request(void) { - pr_err("%s: add request",__func__); - pm_qos_add_request(&msm_v4l2_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); + pr_info("%s: add request",__func__); + pm_qos_add_request(&msm_v4l2_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, + PM_QOS_DEFAULT_VALUE); } static void msm_pm_qos_remove_request(void) { - pr_err("%s: remove request",__func__); - msm_v4l2_pm_qos_request.type = PM_QOS_REQ_AFFINE_CORES; - msm_v4l2_pm_qos_request.cpus_affine.bits[0] = 0xF0; - - pm_qos_remove_request(&msm_v4l2_pm_qos_request); + pr_info("%s: remove request",__func__); + pm_qos_remove_request(&msm_v4l2_pm_qos_request); } void msm_pm_qos_update_request(int val) { - pr_err("%s: update request %d",__func__,val); - pm_qos_update_request(&msm_v4l2_pm_qos_request, val); + pr_info("%s: update request %d",__func__,val); + pm_qos_update_request(&msm_v4l2_pm_qos_request, val); } -#endif struct msm_session *msm_session_find(unsigned int session_id) { @@ -370,24 +358,6 @@ int msm_sd_unregister(struct msm_sd_subdev *msm_subdev) return 0; } -int msm_cam_get_module_init_status(void) -{ - int rc; - pr_warn("msm_cam_get_module_init_status : start\n"); - if (module_init_status == 1) - return 0; - while (1) { - rc = wait_event_interruptible(cam_dummy_queue.state_wait, - (module_init_status == 1)); - if (rc == -ETIMEDOUT) - continue; - else if (rc == 0) - break; - } - pr_err("msm_cam_get_module_init_status : end %d\n", rc); - return 0; -} - int msm_create_session(unsigned int session_id, struct video_device *vdev) { struct msm_session *session = NULL; @@ -504,6 +474,16 @@ static inline int __msm_sd_close_subdevs(struct msm_sd_subdev *msm_sd, return 0; } +static inline int __msm_sd_notify_freeze_subdevs(struct msm_sd_subdev *msm_sd) +{ + struct v4l2_subdev *sd; + sd = &msm_sd->sd; + + v4l2_subdev_call(sd, core, ioctl, MSM_SD_NOTIFY_FREEZE, NULL); + + return 0; +} + static inline int __msm_destroy_session_streams(void *d1, void *d2) { struct msm_stream *stream = d1; @@ -557,6 +537,7 @@ int msm_destroy_session(unsigned int session_id) { struct msm_session *session; struct v4l2_subdev *buf_mgr_subdev; + struct msm_sd_close_ioctl session_info; session = msm_queue_find(msm_session_q, struct msm_session, list, __msm_queue_find_session, &session_id); @@ -571,8 +552,10 @@ int msm_destroy_session(unsigned int session_id) list, session); buf_mgr_subdev = msm_buf_mngr_get_subdev(); if (buf_mgr_subdev) { + session_info.session = session_id; + session_info.stream = 0; v4l2_subdev_call(buf_mgr_subdev, core, ioctl, - MSM_SD_SHUTDOWN, NULL); + MSM_SD_SHUTDOWN, &session_info); } else { pr_err("%s: Buff manger device node is NULL\n", __func__); } @@ -606,13 +589,7 @@ static long msm_private_ioctl(struct file *file, void *fh, unsigned int session_id; unsigned int stream_id; unsigned long spin_flags = 0; - - if (cmd == MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS) { - module_init_status = *(int *) arg; - if (module_init_status) - wake_up(&cam_dummy_queue.state_wait); - return rc; - } + struct msm_sd_subdev *msm_sd; session_id = event_data->session_id; stream_id = event_data->stream_id; @@ -672,6 +649,15 @@ static long msm_private_ioctl(struct file *file, void *fh, } break; + case MSM_CAM_V4L2_IOCTL_NOTIFY_FREEZE: { + pr_err("Notifying subdevs about potential sof freeze\n"); + if (!list_empty(&msm_v4l2_dev->subdevs)) { + list_for_each_entry(msm_sd, &ordered_sd_list, list) + __msm_sd_notify_freeze_subdevs(msm_sd); + } + } + break; + case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR: /* send v4l2_event to HAL next*/ msm_queue_traverse_action(msm_session_q, @@ -747,7 +733,6 @@ int msm_post_event(struct v4l2_event *event, int timeout) struct msm_command *cmd; int session_id, stream_id; unsigned long flags = 0; - int wait_count = 2000; session_id = event_data->session_id; stream_id = event_data->stream_id; @@ -789,26 +774,22 @@ int msm_post_event(struct v4l2_event *event, int timeout) if (timeout < 0) { mutex_unlock(&session->lock); - pr_err("%s : timeout cannot be negative Line %d\n", + pr_debug("%s : timeout cannot be negative Line %d\n", __func__, __LINE__); return rc; } /* should wait on session based condition */ - do { - rc = wait_for_completion_timeout(&cmd_ack->wait_complete, + rc = wait_for_completion_timeout(&cmd_ack->wait_complete, msecs_to_jiffies(timeout)); - wait_count--; - if(rc != -ERESTARTSYS) - break; - usleep(1000); /* wait for 2ms */ - } while(wait_count > 0); + if (list_empty_careful(&cmd_ack->command_q.list)) { if (!rc) { pr_err("%s: Timed out\n", __func__); msm_print_event_error(event); - rc = -ETIMEDOUT; + mutex_unlock(&session->lock); + return -ETIMEDOUT; } else { pr_err("%s: Error: No timeout but list empty!", __func__); @@ -861,10 +842,8 @@ static int msm_close(struct file *filep) list_for_each_entry(msm_sd, &ordered_sd_list, list) __msm_sd_close_subdevs(msm_sd, &sd_close); -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) /* remove msm_v4l2_pm_qos_request */ msm_pm_qos_remove_request(); -#endif /* send v4l2_event to HAL next*/ msm_queue_traverse_action(msm_session_q, struct msm_session, list, @@ -904,11 +883,9 @@ static int msm_open(struct file *filep) BUG_ON(!pvdev); /* !!! only ONE open is allowed !!! */ - if (atomic_read(&pvdev->opened)) + if (atomic_cmpxchg(&pvdev->opened, 0, 1)) return -EBUSY; - atomic_set(&pvdev->opened, 1); - spin_lock_irqsave(&msm_pid_lock, flags); msm_pid = get_pid(task_pid(current)); spin_unlock_irqrestore(&msm_pid_lock, flags); @@ -922,10 +899,8 @@ static int msm_open(struct file *filep) msm_eventq = filep->private_data; spin_unlock_irqrestore(&msm_eventq_lock, flags); -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) /* register msm_v4l2_pm_qos_request */ msm_pm_qos_add_request(); -#endif return rc; } @@ -1148,7 +1123,6 @@ static int msm_probe(struct platform_device *pdev) spin_lock_init(&msm_eventq_lock); spin_lock_init(&msm_pid_lock); INIT_LIST_HEAD(&ordered_sd_list); - init_waitqueue_head(&cam_dummy_queue.state_wait); goto probe_end; v4l2_fail: diff --git a/drivers/media/platform/msm/camera_v2/msm.h b/drivers/media/platform/msm/camera_v2/msm.h index 5fc057f9ece3..825f0772ca43 100644 --- a/drivers/media/platform/msm/camera_v2/msm.h +++ b/drivers/media/platform/msm/camera_v2/msm.h @@ -30,29 +30,12 @@ #include #include -#if defined CONFIG_SEC_CAMERA_TUNING -#define MSM_POST_EVT_TIMEOUT 40000 -#else #define MSM_POST_EVT_TIMEOUT 5000 -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -enum CAMERA_TUNING -{ -NORMAL_MODE, -REAR_TUNING, -FRONT_TUNING, -REAR_FRONT_TUNING -}; -#endif - #define MSM_POST_EVT_NOTIMEOUT 0xFFFFFFFF #define MSM_CAMERA_STREAM_CNT_BITS 32 -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_DISABLE_PC_LATENCY 200 +#define CAMERA_DISABLE_PC_LATENCY 100 #define CAMERA_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE -#endif struct msm_video_device { struct video_device *vdev; @@ -123,11 +106,8 @@ struct msm_session { struct mutex lock_q; }; -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) void msm_pm_qos_update_request(int val); -#endif -int msm_cam_get_module_init_status(void); int msm_post_event(struct v4l2_event *event, int timeout); int msm_create_session(unsigned int session, struct video_device *vdev); int msm_destroy_session(unsigned int session_id); diff --git a/drivers/media/platform/msm/camera_v2/msm_buf_mgr/msm_generic_buf_mgr.c b/drivers/media/platform/msm/camera_v2/msm_buf_mgr/msm_generic_buf_mgr.c index eb385616d75d..ab297eabf87c 100644 --- a/drivers/media/platform/msm/camera_v2/msm_buf_mgr/msm_generic_buf_mgr.c +++ b/drivers/media/platform/msm/camera_v2/msm_buf_mgr/msm_generic_buf_mgr.c @@ -100,20 +100,27 @@ static int32_t msm_buf_mngr_put_buf(struct msm_buf_mngr_device *buf_mngr_dev, return ret; } -static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *buf_mngr_dev) +static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *buf_mngr_dev, + struct msm_sd_close_ioctl *session) { unsigned long flags; struct msm_get_bufs *bufs, *save; + BUG_ON(!buf_mngr_dev); + BUG_ON(!session); + spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); if (!list_empty(&buf_mngr_dev->buf_qhead)) { list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - pr_err("%s: Error delete invalid bufs =%x, ses_id=%d, str_id=%d, idx=%d\n", - __func__, (unsigned int)bufs, bufs->session_id, - bufs->stream_id, bufs->vb2_buf->v4l2_buf.index); - list_del_init(&bufs->entry); - kfree(bufs); + pr_info("%s: Delete invalid bufs =%lx, session_id=%u, bufs->ses_id=%d, str_id=%d, idx=%d\n", + __func__, (unsigned long)bufs, session->session, + bufs->session_id, bufs->stream_id, + bufs->vb2_buf->v4l2_buf.index); + if (session->session == bufs->session_id) { + list_del_init(&bufs->entry); + kfree(bufs); + } } } spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); @@ -174,8 +181,10 @@ static long msm_buf_mngr_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_BUF_MNGR_DEINIT: rc = msm_generic_buf_mngr_close(sd, NULL); break; + case MSM_SD_NOTIFY_FREEZE: + break; case MSM_SD_SHUTDOWN: - msm_buf_mngr_sd_shutdown(buf_mngr_dev); + msm_buf_mngr_sd_shutdown(buf_mngr_dev, argp); break; default: return -ENOIOCTLCMD; @@ -191,21 +200,21 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file, struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); int32_t rc = 0; - void __user *up = compat_ptr(arg); + void __user *up = (void __user *)arg; - struct msm_buf_mngr_info32_t *buf_info32 = NULL; - struct msm_buf_mngr_info *buf_info; + struct msm_buf_mngr_info32_t buf_info32; + struct msm_buf_mngr_info buf_info; - if (copy_from_user(buf_info32, (void __user *)up, + if (copy_from_user(&buf_info32, (void __user *)up, sizeof(struct msm_buf_mngr_info32_t))) return -EFAULT; - buf_info->session_id = buf_info32->session_id; - buf_info->stream_id = buf_info32->stream_id; - buf_info->frame_id = buf_info32->frame_id; - buf_info->index = buf_info32->index; - buf_info->timestamp.tv_sec = (long) buf_info32->timestamp.tv_sec; - buf_info->timestamp.tv_usec = (long) buf_info32->timestamp.tv_usec; + buf_info.session_id = buf_info32.session_id; + buf_info.stream_id = buf_info32.stream_id; + buf_info.frame_id = buf_info32.frame_id; + buf_info.index = buf_info32.index; + buf_info.timestamp.tv_sec = (long) buf_info32.timestamp.tv_sec; + buf_info.timestamp.tv_usec = (long) buf_info32.timestamp.tv_usec; /* Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's * except VIDIOC_MSM_CPP_CFG32, which needs special @@ -223,27 +232,32 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file, break; default: pr_debug("%s : unsupported compat type", __func__); - break; + return -ENOIOCTLCMD; } switch (cmd) { case VIDIOC_MSM_BUF_MNGR_GET_BUF: case VIDIOC_MSM_BUF_MNGR_BUF_DONE: case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = v4l2_subdev_call(sd, core, ioctl, cmd, buf_info); + rc = v4l2_subdev_call(sd, core, ioctl, cmd, &buf_info); + if (rc < 0) { + pr_debug("%s : Subdev cmd %d fail", __func__, cmd); + return rc; + } break; default: pr_debug("%s : unsupported compat type", __func__); + return -ENOIOCTLCMD; break; } - buf_info32->session_id = buf_info->session_id; - buf_info32->stream_id = buf_info->stream_id; - buf_info32->index = buf_info->index; - buf_info32->timestamp.tv_sec = (int32_t) buf_info->timestamp.tv_sec; - buf_info32->timestamp.tv_usec = (int32_t) buf_info->timestamp.tv_usec; + buf_info32.session_id = buf_info.session_id; + buf_info32.stream_id = buf_info.stream_id; + buf_info32.index = buf_info.index; + buf_info32.timestamp.tv_sec = (int32_t) buf_info.timestamp.tv_sec; + buf_info32.timestamp.tv_usec = (int32_t) buf_info.timestamp.tv_usec; - if (copy_to_user((void __user *)up, buf_info32, + if (copy_to_user((void __user *)up, &buf_info32, sizeof(struct msm_buf_mngr_info32_t))) return -EFAULT; diff --git a/drivers/media/platform/msm/camera_v2/msm_sd.h b/drivers/media/platform/msm/camera_v2/msm_sd.h index 7c1519dd66eb..151f721bf849 100644 --- a/drivers/media/platform/msm/camera_v2/msm_sd.h +++ b/drivers/media/platform/msm/camera_v2/msm_sd.h @@ -35,6 +35,8 @@ struct msm_sd_close_ioctl { #define MSM_SD_SHUTDOWN \ _IOWR('V', BASE_VIDIOC_PRIVATE + 29, struct msm_sd_close_ioctl) +#define MSM_SD_NOTIFY_FREEZE \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 30, struct msm_sd_close_ioctl) /* * This is used to install Sequence in msm_sd_register. * During msm_close, proper close sequence will be triggered. diff --git a/drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c b/drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c index 6e9336a20d29..f9c0bd7d0225 100644 --- a/drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c +++ b/drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -226,6 +226,7 @@ static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, { struct msm_stream *stream; struct msm_vb2_buffer *msm_vb2; + struct vb2_buffer *vb2_buf = NULL; int rc = 0; unsigned long flags; stream = msm_get_stream(session_id, stream_id); @@ -234,6 +235,17 @@ static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, spin_lock_irqsave(&stream->stream_lock, flags); if (vb) { + list_for_each_entry(msm_vb2, &(stream->queued_list), list) { + vb2_buf = &(msm_vb2->vb2_buf); + if (vb2_buf == vb) + break; + } + if (vb2_buf != vb) { + pr_err("VB buffer is INVALID vb=%p, ses_id=%d, str_id=%d\n", + vb, session_id, stream_id); + spin_unlock_irqrestore(&stream->stream_lock, flags); + return -EINVAL; + } msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); if (msm_vb2->in_freeq) { @@ -242,7 +254,8 @@ static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, } else rc = -EINVAL; } else { - pr_err("%s: VB buffer is null\n", __func__); + pr_err(" VB buffer is null for ses_id=%d, str_id=%d\n", + session_id, stream_id); rc = -EINVAL; } spin_unlock_irqrestore(&stream->stream_lock, flags); @@ -269,11 +282,10 @@ static int msm_vb2_buf_done(struct vb2_buffer *vb, int session_id, break; } if (vb2_buf != vb) { - pr_err("%s:%d VB buffer is INVALID vb=%x, ses_id=%d, str_id=%d\n", - __func__, __LINE__, (unsigned int)vb, - session_id, stream_id); - rc = -EINVAL; - goto out; + pr_err("VB buffer is INVALID ses_id=%d, str_id=%d, vb=%p\n", + session_id, stream_id, vb); + spin_unlock_irqrestore(&stream->stream_lock, flags); + return -EINVAL; } msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); @@ -285,11 +297,10 @@ static int msm_vb2_buf_done(struct vb2_buffer *vb, int session_id, } else rc = -EINVAL; } else { - pr_err("%s:%d VB buffer is NULL for ses_id=%d, str_id=%d\n", - __func__, __LINE__, session_id, stream_id); + pr_err(" VB buffer is NULL for ses_id=%d, str_id=%d\n", + session_id, stream_id); rc = -EINVAL; } -out: spin_unlock_irqrestore(&stream->stream_lock, flags); return rc; } diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c index bb706db36059..5645cef9d9d9 100644 --- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -53,9 +52,6 @@ #define CPP_CMD_TIMEOUT_MS 300 -#define MSM_CPP_CORE_CLK_IDX 4 -#define MSM_MICRO_IFACE_CLK_IDX 7 - #define MSM_CPP_NOMINAL_CLOCK 266670000 #define MSM_CPP_TURBO_CLOCK 320000000 @@ -68,6 +64,7 @@ #define STRIPE_BASE_FW_1_2_0 130 #define STRIPE_BASE_FW_1_4_0 140 #define STRIPE_BASE_FW_1_6_0 464 +#define STRIPE_BASE_FW_1_8_0 493 /* dump the frame command before writing to the hardware */ @@ -93,6 +90,57 @@ static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, ((to) ? "to" : "from")) #define ERR_COPY_FROM_USER() ERR_USER_COPY(0) +/* CPP bus bandwidth definitions */ +static struct msm_bus_vectors msm_cpp_init_vectors[] = { + { + .src = MSM_BUS_MASTER_CPP, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, +}; + +static struct msm_bus_vectors msm_cpp_ping_vectors[] = { + { + .src = MSM_BUS_MASTER_CPP, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, +}; + +static struct msm_bus_vectors msm_cpp_pong_vectors[] = { + { + .src = MSM_BUS_MASTER_CPP, + .dst = MSM_BUS_SLAVE_EBI_CH0, + .ab = 0, + .ib = 0, + }, +}; + + + +static struct msm_bus_paths msm_cpp_bus_client_config[] = { + { + ARRAY_SIZE(msm_cpp_init_vectors), + msm_cpp_init_vectors, + }, + { + ARRAY_SIZE(msm_cpp_ping_vectors), + msm_cpp_ping_vectors, + }, + { + ARRAY_SIZE(msm_cpp_pong_vectors), + msm_cpp_pong_vectors, + }, +}; + +static struct msm_bus_scale_pdata msm_cpp_bus_scale_data = { + msm_cpp_bus_client_config, + ARRAY_SIZE(msm_cpp_bus_client_config), + .name = "msm_camera_cpp", +}; + #define msm_dequeue(queue, member) ({ \ unsigned long flags; \ struct msm_device_queue *__q = (queue); \ @@ -108,6 +156,8 @@ static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, qcmd; \ }) +#define MSM_CPP_MAX_TIMEOUT_TRIAL 3 + struct msm_cpp_timer_data_t { struct cpp_device *cpp_dev; struct msm_cpp_frame_info_t *processed_frame; @@ -121,6 +171,57 @@ struct msm_cpp_timer_t { struct msm_cpp_timer_t cpp_timer; +static int msm_cpp_init_bandwidth_mgr(struct cpp_device *cpp_dev) +{ + int rc = 0; + + cpp_dev->bus_client = + msm_bus_scale_register_client(&msm_cpp_bus_scale_data); + if (!cpp_dev->bus_client) { + pr_err("Fail to register bus client\n"); + return -ENOENT; + } + + rc = msm_bus_scale_client_update_request(cpp_dev->bus_client, 1); + if (rc < 0) { + pr_err("Fail bus scale update %d\n", rc); + return -EINVAL; + } + cpp_dev->bus_idx = 1; + + return 0; +} + +static int msm_cpp_update_bandwidth(struct cpp_device *cpp_dev, + uint64_t ab, uint64_t ib) +{ + + int rc; + struct msm_bus_paths *path; + + path = &(msm_cpp_bus_scale_data.usecase[cpp_dev->bus_idx]); + path->vectors[0].ab = ab; + path->vectors[0].ib = ib; + + rc = msm_bus_scale_client_update_request(cpp_dev->bus_client, + cpp_dev->bus_idx); + if (rc < 0) { + pr_err("Fail bus scale update %d\n", rc); + return -EINVAL; + } + cpp_dev->bus_idx = 3 - cpp_dev->bus_idx; + + return 0; +} + +void msm_cpp_deinit_bandwidth_mgr(struct cpp_device *cpp_dev) +{ + if (cpp_dev->bus_client) { + msm_bus_scale_unregister_client(cpp_dev->bus_client); + cpp_dev->bus_client = 0; + } +} + static void msm_queue_init(struct msm_device_queue *queue, const char *name) { CPP_DBG("E\n"); @@ -166,7 +267,19 @@ static void msm_enqueue(struct msm_device_queue *queue, static struct msm_cam_clk_info cpp_clk_info[CPP_CLK_INFO_MAX]; -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev); +static int get_clock_index(const char *clk_name) +{ + uint32_t i = 0; + for (i = 0; i < ARRAY_SIZE(cpp_clk_info); i++) { + if (!strcmp(clk_name, cpp_clk_info[i].clk_name)) + return i; + } + return -EINVAL; +} + + +static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev, + uint8_t put_buf); static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin); static void cpp_timer_callback(unsigned long data); @@ -178,12 +291,22 @@ static void msm_cpp_write(u32 data, void __iomem *cpp_base) writel_relaxed((data), cpp_base + MSM_CPP_MICRO_FIFO_RX_DATA); } +static void msm_cpp_clear_timer(struct cpp_device *cpp_dev) +{ + if (atomic_read(&cpp_timer.used)) { + atomic_set(&cpp_timer.used, 0); + del_timer(&cpp_timer.cpp_timer); + cpp_timer.data.processed_frame = NULL; + cpp_dev->timeout_trial_cnt = 0; + } +} + static uint32_t msm_cpp_read(void __iomem *cpp_base) { uint32_t tmp, retry = 0; do { tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_STAT); - } while (((tmp & 0x2) == 0x0) && (retry++ < 10)) ; + } while (((tmp & 0x2) == 0x0) && (retry++ < 10)); if (retry < 10) { tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_DATA); CPP_DBG("Read data: 0%x\n", tmp); @@ -211,7 +334,7 @@ static struct msm_cpp_buff_queue_info_t *msm_cpp_get_buff_queue_entry( } if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", + CPP_DBG("buffer queue entry for sess:%d strm:%d not found\n", session_id, stream_id); } return buff_queue_info; @@ -219,7 +342,7 @@ static struct msm_cpp_buff_queue_info_t *msm_cpp_get_buff_queue_entry( static unsigned long msm_cpp_get_phy_addr(struct cpp_device *cpp_dev, struct msm_cpp_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff, int *fd) + uint8_t native_buff, int32_t *fd) { unsigned long phy_add = 0; struct list_head *buff_head; @@ -273,7 +396,7 @@ static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, buffer_info->fd); if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { pr_err("ION import failed\n"); - goto QUEUE_BUFF_ERROR1; + goto queue_buff_error1; } rc = ion_map_iommu(cpp_dev->client, buff->map_info.ion_handle, cpp_dev->domain_num, 0, SZ_4K, 0, @@ -281,7 +404,7 @@ static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, &buff->map_info.len, 0, 0); if (rc < 0) { pr_err("ION mmap failed\n"); - goto QUEUE_BUFF_ERROR2; + goto queue_buff_error2; } INIT_LIST_HEAD(&buff->entry); @@ -289,9 +412,9 @@ static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, return buff->map_info.phy_addr; -QUEUE_BUFF_ERROR2: +queue_buff_error2: ion_free(cpp_dev->client, buff->map_info.ion_handle); -QUEUE_BUFF_ERROR1: +queue_buff_error1: buff->map_info.ion_handle = NULL; kzfree(buff); @@ -315,7 +438,7 @@ static void msm_cpp_dequeue_buffer_info(struct cpp_device *cpp_dev, static unsigned long msm_cpp_fetch_buffer_info(struct cpp_device *cpp_dev, struct msm_cpp_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id, int *fd) + uint32_t stream_id, int32_t *fd) { unsigned long phy_addr = 0; struct msm_cpp_buff_queue_info_t *buff_queue_info; @@ -490,10 +613,12 @@ static void msm_cpp_poll_rx_empty(void __iomem *cpp_base) tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); while (((tmp & 0x2) != 0x0) && (retry++ < MSM_CPP_POLL_RETRIES)) { - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to read rx fifo.*/ + /* + * Below usleep values are chosen based on experiments + * and this was the smallest number which works. This + * sleep is needed to leave enough time for Microcontroller + * to read rx fifo. + */ usleep_range(200, 300); tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); } @@ -547,7 +672,7 @@ static irqreturn_t msm_cpp_irq(int irq_num, void *data) struct cpp_device *cpp_dev = data; struct msm_cpp_tasklet_queue_cmd *queue_cmd; irq_status = msm_camera_io_r(cpp_dev->base + MSM_CPP_MICRO_IRQGEN_STAT); - CPP_DBG("status: 0x%x\n", irq_status); + if (irq_status & 0x8) { tx_level = msm_camera_io_r(cpp_dev->base + MSM_CPP_MICRO_FIFO_TX_STAT) >> 2; @@ -621,7 +746,6 @@ void msm_cpp_do_tasklet(unsigned long data) uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; struct cpp_device *cpp_dev = (struct cpp_device *) data; struct msm_cpp_tasklet_queue_cmd *queue_cmd; - struct msm_cpp_timer_t *timer = NULL; while (atomic_read(&cpp_dev->irq_cnt)) { spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); @@ -649,29 +773,24 @@ void msm_cpp_do_tasklet(unsigned long data) if ((msg_id == MSM_CPP_MSG_ID_FRAME_ACK) && (atomic_read(&cpp_timer.used))) { CPP_DBG("Frame done!!\n"); - /* delete CPP timer */ CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); + /* delete CPP timer */ + msm_cpp_clear_timer(cpp_dev); + msm_cpp_notify_frame_done(cpp_dev, 0); } else if ((msg_id == MSM_CPP_MSG_ID_FRAME_NACK) && (atomic_read(&cpp_timer.used))) { pr_err("NACK error from hw!!\n"); CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); + msm_cpp_clear_timer(cpp_dev); + msm_cpp_notify_frame_done(cpp_dev, 0); } i += cmd_len + 2; } } } } + static void cpp_get_clk_freq_tbl(struct clk *clk, struct cpp_hw_info *hw_info) { uint32_t count; @@ -697,7 +816,14 @@ static void cpp_get_clk_freq_tbl(struct clk *clk, struct cpp_hw_info *hw_info) static int cpp_init_hardware(struct cpp_device *cpp_dev) { int rc = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_CPP); + uint32_t msm_cpp_core_clk_idx; + uint32_t msm_micro_iface_idx; + uint32_t vbif_version; + + if (cpp_dev->bus_master_flag) + rc = msm_cpp_init_bandwidth_mgr(cpp_dev); + else + rc = msm_isp_init_bandwidth_mgr(ISP_CPP); if (rc < 0) { pr_err("%s: Bandwidth registration Failed!\n", __func__); goto bus_scale_register_failed; @@ -709,57 +835,64 @@ static int cpp_init_hardware(struct cpp_device *cpp_dev) if (IS_ERR(cpp_dev->fs_cpp)) { pr_err("Regulator cpp vdd get failed %ld\n", PTR_ERR(cpp_dev->fs_cpp)); + rc = -EINVAL; cpp_dev->fs_cpp = NULL; goto fs_failed; - } else if (regulator_enable(cpp_dev->fs_cpp)) { + } + + rc = regulator_enable(cpp_dev->fs_cpp); + if (rc != 0) { pr_err("Regulator cpp vdd enable failed\n"); regulator_put(cpp_dev->fs_cpp); cpp_dev->fs_cpp = NULL; goto fs_failed; } } + msm_micro_iface_idx = get_clock_index("micro_iface_clk"); + if (msm_micro_iface_idx < 0) { + pr_err("Fail to get clock index\n"); + rc = msm_micro_iface_idx; + goto fs_failed; + } - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX] = - clk_get(&cpp_dev->pdev->dev, - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - if (IS_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX])) { - pr_err("%s get failed\n", - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - rc = - PTR_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_ASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", - __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to resets all its registers.*/ - usleep_range(10000, 12000); + cpp_dev->cpp_clk[msm_micro_iface_idx] = + clk_get(&cpp_dev->pdev->dev, + cpp_clk_info[msm_micro_iface_idx].clk_name); + if (IS_ERR(cpp_dev->cpp_clk[msm_micro_iface_idx])) { + pr_err("%s get failed\n", + cpp_clk_info[msm_micro_iface_idx].clk_name); + rc = PTR_ERR(cpp_dev->cpp_clk[msm_micro_iface_idx]); + goto remap_failed; + } - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_DEASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments and - this was the smallest number which works. This sleep is - needed to leave enough time for Microcontroller to - resets all its registers.*/ - usleep_range(1000, 1200); + rc = clk_reset(cpp_dev->cpp_clk[msm_micro_iface_idx], + CLK_RESET_ASSERT); + if (rc) { + pr_err("%s:micro_iface_clk assert failed\n", + __func__); + clk_put(cpp_dev->cpp_clk[msm_micro_iface_idx]); + goto remap_failed; + } + /*Below usleep values are chosen based on experiments + and this was the smallest number which works. This + sleep is needed to leave enough time for Microcontroller + to resets all its registers.*/ + usleep_range(10000, 12000); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); + rc = clk_reset(cpp_dev->cpp_clk[msm_micro_iface_idx], + CLK_RESET_DEASSERT); + if (rc) { + pr_err("%s:micro_iface_clk assert failed\n", __func__); + clk_put(cpp_dev->cpp_clk[msm_micro_iface_idx]); + goto remap_failed; } + /*Below usleep values are chosen based on experiments and + this was the smallest number which works. This sleep is + needed to leave enough time for Microcontroller to + resets all its registers.*/ + usleep_range(1000, 1200); + + clk_put(cpp_dev->cpp_clk[msm_micro_iface_idx]); rc = msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, cpp_dev->cpp_clk, cpp_dev->num_clk, 1); @@ -812,36 +945,44 @@ static int cpp_init_hardware(struct cpp_device *cpp_dev) cpp_dev->hw_info.cpp_hw_version = msm_camera_io_r(cpp_dev->cpp_hw_base); + if (cpp_dev->hw_info.cpp_hw_version == CPP_HW_VERSION_4_1_0) { + vbif_version = msm_camera_io_r(cpp_dev->vbif_base); + if (vbif_version == VBIF_VERSION_2_3_0) + cpp_dev->hw_info.cpp_hw_version = CPP_HW_VERSION_4_0_0; + } pr_info("CPP HW Version: 0x%x\n", cpp_dev->hw_info.cpp_hw_version); cpp_dev->hw_info.cpp_hw_caps = msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4); - cpp_get_clk_freq_tbl(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], + msm_cpp_core_clk_idx = get_clock_index("cpp_core_clk"); + if (msm_cpp_core_clk_idx < 0) { + pr_err("cpp_core_clk: fail to get clock index\n"); + rc = msm_cpp_core_clk_idx; + goto req_irq_fail; + } + cpp_get_clk_freq_tbl(cpp_dev->cpp_clk[msm_cpp_core_clk_idx], &cpp_dev->hw_info); pr_debug("CPP HW Caps: 0x%x\n", cpp_dev->hw_info.cpp_hw_caps); msm_camera_io_w(0x1, cpp_dev->vbif_base + 0x4); cpp_dev->taskletq_idx = 0; atomic_set(&cpp_dev->irq_cnt, 0); - msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE); + rc = msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE); + if (rc < 0) { + pr_err("%s: create buff queue failed with err %d\n", + __func__, rc); + goto req_irq_fail; + } pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); cpp_dev->stream_cnt = 0; - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - if (cpp_dev->is_firmware_loaded == 1) { - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - msm_camera_io_w_mb(0x7C8, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - } - } else { - msm_camera_io_w(0x1, - cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w_mb(0x7C8, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); + if (cpp_dev->is_firmware_loaded == 1) { + disable_irq(cpp_dev->irq->start); + cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); + enable_irq(cpp_dev->irq->start); + msm_camera_io_w_mb(0x7C8, cpp_dev->base + + MSM_CPP_MICRO_IRQGEN_MASK); + msm_camera_io_w_mb(0xFFFF, cpp_dev->base + + MSM_CPP_MICRO_IRQGEN_CLR); } + return rc; req_irq_fail: iounmap(cpp_dev->cpp_hw_base); @@ -856,7 +997,10 @@ clk_failed: regulator_disable(cpp_dev->fs_cpp); regulator_put(cpp_dev->fs_cpp); fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_CPP); + if (cpp_dev->bus_master_flag) + msm_cpp_deinit_bandwidth_mgr(cpp_dev); + else + msm_isp_deinit_bandwidth_mgr(ISP_CPP); bus_scale_register_failed: return rc; } @@ -886,10 +1030,16 @@ static void cpp_release_hardware(struct cpp_device *cpp_dev) cpp_dev->fs_cpp = NULL; if (cpp_dev->stream_cnt > 0) { pr_err("error: stream count active\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); + if (cpp_dev->bus_master_flag) + rc = msm_cpp_update_bandwidth(cpp_dev, 0, 0); + else + rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0); } cpp_dev->stream_cnt = 0; - msm_isp_deinit_bandwidth_mgr(ISP_CPP); + if (cpp_dev->bus_master_flag) + msm_cpp_deinit_bandwidth_mgr(cpp_dev); + else + msm_isp_deinit_bandwidth_mgr(ISP_CPP); } static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin) @@ -910,7 +1060,7 @@ static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin) rc = request_firmware(&fw, fw_name_bin, dev); if (rc) { dev_err(dev, - "Fail to loc blob %s from dev %pK, Error: %d\n", + "Fail to loc blob %s from dev %p, Error: %d\n", fw_name_bin, dev, rc); } if (NULL != fw) @@ -983,9 +1133,19 @@ static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) { int rc; uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); + struct cpp_device *cpp_dev = NULL; CPP_DBG("E\n"); + if (!sd || !fh) { + pr_err("Wrong input parameters sd %p fh %p!", + sd, fh); + return -EINVAL; + } + cpp_dev = v4l2_get_subdevdata(sd); + if (!cpp_dev) { + pr_err("failed: cpp_dev %p\n", cpp_dev); + return -EINVAL; + } mutex_lock(&cpp_dev->mutex); if (cpp_dev->cpp_open_cnt == MAX_ACTIVE_CPP_INSTANCE) { pr_err("No free CPP instance\n"); @@ -1006,7 +1166,7 @@ static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) return -ENODEV; } - CPP_DBG("open %d %pK\n", i, &fh->vfh); + CPP_DBG("open %d %p\n", i, &fh->vfh); cpp_dev->cpp_open_cnt++; if (cpp_dev->cpp_open_cnt == 1) { rc = cpp_init_hardware(cpp_dev); @@ -1018,7 +1178,6 @@ static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) return rc; } - iommu_attach_device(cpp_dev->domain, cpp_dev->iommu_ctx); cpp_init_mem(cpp_dev); cpp_dev->state = CPP_STATE_IDLE; } @@ -1029,12 +1188,18 @@ static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) { uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); + struct cpp_device *cpp_dev = NULL; struct msm_device_queue *processing_q = NULL; struct msm_device_queue *eventData_q = NULL; + if (!sd) { + pr_err("Wrong input sd parameter"); + return -EINVAL; + } + cpp_dev = v4l2_get_subdevdata(sd); + if (!cpp_dev) { - pr_err("failed: cpp_dev %pK\n", cpp_dev); + pr_err("failed: cpp_dev %p\n", cpp_dev); return -EINVAL; } @@ -1094,9 +1259,14 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) pr_debug("DEBUG_R1: 0x%x\n", msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - cpp_deinit_mem(cpp_dev); - iommu_detach_device(cpp_dev->domain, cpp_dev->iommu_ctx); + msm_cpp_clear_timer(cpp_dev); cpp_release_hardware(cpp_dev); + if (cpp_dev->iommu_state == CPP_IOMMU_STATE_ATTACHED) { + iommu_detach_device(cpp_dev->domain, + cpp_dev->iommu_ctx); + cpp_dev->iommu_state = CPP_IOMMU_STATE_DETACHED; + } + cpp_deinit_mem(cpp_dev); msm_cpp_empty_list(processing_q, list_frame); msm_cpp_empty_list(eventData_q, list_eventdata); cpp_dev->state = CPP_STATE_OFF; @@ -1123,7 +1293,8 @@ static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, return rc; } -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) +static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev, + uint8_t put_buf) { struct v4l2_event v4l2_evt; struct msm_queue_cmd *frame_qcmd = NULL; @@ -1137,16 +1308,17 @@ static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) if (frame_qcmd) { processed_frame = frame_qcmd->command; do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); if (!event_qcmd) { - pr_err("Insufficient memory. return"); + pr_err("Insufficient memory\n"); + kfree(frame_qcmd); return -ENOMEM; } atomic_set(&event_qcmd->on_heap, 1); event_qcmd->command = processed_frame; CPP_DBG("fid %d\n", processed_frame->frame_id); msm_enqueue(&cpp_dev->eventData_q, &event_qcmd->list_eventdata); + kfree(frame_qcmd); if (!processed_frame->output_buffer_info[0].processed_divert && !processed_frame->output_buffer_info[0].native_buff) { @@ -1160,12 +1332,22 @@ static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) buff_mgr_info.timestamp = processed_frame->timestamp; buff_mgr_info.index = processed_frame->output_buffer_info[0].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; + if (put_buf) { + rc = msm_cpp_buffer_ops(cpp_dev, + VIDIOC_MSM_BUF_MNGR_PUT_BUF, + &buff_mgr_info); + if (rc < 0) { + pr_err("error putting buffer\n"); + rc = -EINVAL; + } + } else { + rc = msm_cpp_buffer_ops(cpp_dev, + VIDIOC_MSM_BUF_MNGR_BUF_DONE, + &buff_mgr_info); + if (rc < 0) { + pr_err("error putting buffer\n"); + rc = -EINVAL; + } } } @@ -1182,12 +1364,22 @@ static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) buff_mgr_info.timestamp = processed_frame->timestamp; buff_mgr_info.index = processed_frame->output_buffer_info[1].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, + if (put_buf) { + rc = msm_cpp_buffer_ops(cpp_dev, + VIDIOC_MSM_BUF_MNGR_PUT_BUF, &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; + if (rc < 0) { + pr_err("error putting buffer\n"); + rc = -EINVAL; + } + } else { + rc = msm_cpp_buffer_ops(cpp_dev, + VIDIOC_MSM_BUF_MNGR_BUF_DONE, + &buff_mgr_info); + if (rc < 0) { + pr_err("error putting buffer\n"); + rc = -EINVAL; + } } } v4l2_evt.id = processed_frame->inst_id; @@ -1221,18 +1413,16 @@ static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) static void msm_cpp_do_timeout_work(struct work_struct *work) { - int ret; - uint32_t i = 0; - struct msm_cpp_frame_info_t *this_frame = NULL; - pr_err("cpp_timer_callback called. (jiffies=%lu)\n", + pr_info("cpp_timer_callback called. (jiffies=%lu)\n", jiffies); - if (!work) { - pr_err("Invalid work:%pK\n", work); + if (!work || cpp_timer.data.cpp_dev->state != CPP_STATE_ACTIVE) { + pr_err("Invalid work:%p or state:%d\n", work, + cpp_timer.data.cpp_dev->state); return; } if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); + pr_info("Delayed trigger, IRQ serviced\n"); return; } @@ -1245,7 +1435,7 @@ static void msm_cpp_do_timeout_work(struct work_struct *work) atomic_set(&cpp_timer.used, 0); cpp_load_fw(cpp_timer.data.cpp_dev, cpp_timer.data.cpp_dev->fw_name_bin); - pr_err("Firmware loading done\n"); + pr_info("Firmware loading done\n"); enable_irq(cpp_timer.data.cpp_dev->irq->start); msm_camera_io_w_mb(0x8, cpp_timer.data.cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); @@ -1253,22 +1443,14 @@ static void msm_cpp_do_timeout_work(struct work_struct *work) cpp_timer.data.cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - this_frame = cpp_timer.data.processed_frame; - atomic_set(&cpp_timer.used, 1); - pr_err("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - pr_err("Rescheduling for identity=0x%x, frame_id=%03d\n", - this_frame->identity, this_frame->frame_id); - msm_cpp_write(0x6, cpp_timer.data.cpp_dev->base); - msm_cpp_dump_frame_cmd(this_frame); - for (i = 0; i < this_frame->msg_len; i++) - msm_cpp_write(this_frame->cpp_cmd_msg[i], - cpp_timer.data.cpp_dev->base); + mutex_lock(&cpp_timer.data.cpp_dev->mutex); + msm_cpp_dump_frame_cmd(cpp_timer.data.processed_frame); + msm_cpp_notify_frame_done(cpp_timer.data.cpp_dev, 1); + atomic_set(&cpp_timer.used, 0); + cpp_timer.data.processed_frame = NULL; + cpp_timer.data.cpp_dev->timeout_trial_cnt = 0; + mutex_unlock(&cpp_timer.data.cpp_dev->mutex); + pr_info("exit\n"); return; } @@ -1296,6 +1478,7 @@ static int msm_cpp_send_frame_to_hardware(struct cpp_device *cpp_dev, cpp_timer.data.processed_frame = process_frame; atomic_set(&cpp_timer.used, 1); /* install timer for cpp timeout */ + init_timer(&cpp_timer.cpp_timer); CPP_DBG("Installing cpp_timer\n"); setup_timer(&cpp_timer.cpp_timer, cpp_timer_callback, (unsigned long)&cpp_timer); @@ -1305,7 +1488,6 @@ static int msm_cpp_send_frame_to_hardware(struct cpp_device *cpp_dev, jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); if (ret) pr_err("error in mod_timer\n"); - msm_cpp_write(0x6, cpp_dev->base); msm_cpp_dump_frame_cmd(process_frame); msm_cpp_poll_rx_empty(cpp_dev->base); @@ -1334,68 +1516,87 @@ static int msm_cpp_flush_frames(struct cpp_device *cpp_dev) return 0; } -static int msm_cpp_cfg(struct cpp_device *cpp_dev, +static struct msm_cpp_frame_info_t *msm_cpp_get_frame( struct msm_camera_v4l2_ioctl_t *ioctl_ptr) { - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_cpp_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); uint32_t *cpp_frame_msg; - unsigned long in_phyaddr, out_phyaddr0, out_phyaddr1; - uint16_t num_stripes = 0; - struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info; - int32_t status = 0; - int32_t stripe_base = 0; + struct msm_cpp_frame_info_t *new_frame = NULL; + int32_t rc = 0; - int in_fd; + new_frame = kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); - int i = 0; if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; + pr_err("Insufficient memory\n"); + rc = -ENOMEM; + goto no_mem_err; } rc = (copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); + sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); if (rc) { ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR1; + goto frame_err; } if ((new_frame->msg_len == 0) || (new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) { pr_err("%s:%d: Invalid frame len:%d\n", __func__, __LINE__, new_frame->msg_len); - rc = -EINVAL; - goto ERROR1; + goto frame_err; } - cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len, + cpp_frame_msg = kzalloc(sizeof(uint32_t) * new_frame->msg_len, GFP_KERNEL); if (!cpp_frame_msg) { - pr_err("Insufficient memory. return"); - rc = -ENOMEM; - goto ERROR1; + pr_err("Insufficient memory\n"); + goto frame_err; } rc = (copy_from_user(cpp_frame_msg, (void __user *)new_frame->cpp_cmd_msg, - sizeof(uint32_t)*new_frame->msg_len) ? -EFAULT : 0); + sizeof(uint32_t) * new_frame->msg_len) ? -EFAULT : 0); if (rc) { ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR2; + goto frame_msg_err; } - new_frame->cpp_cmd_msg = cpp_frame_msg; - if (cpp_frame_msg == NULL || + return new_frame; + +frame_msg_err: + kfree(cpp_frame_msg); +frame_err: + kfree(new_frame); +no_mem_err: + return NULL; +} + +static int msm_cpp_cfg_frame(struct cpp_device *cpp_dev, + struct msm_cpp_frame_info_t *new_frame) +{ + int32_t rc = 0; + struct msm_queue_cmd *frame_qcmd = NULL; + uint32_t *cpp_frame_msg; + unsigned long in_phyaddr, out_phyaddr0, out_phyaddr1; + unsigned long tnr_scratch_buffer0, tnr_scratch_buffer1; + uint16_t num_stripes = 0; + struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info; + int32_t stripe_base = 0; + int32_t in_fd; + int32_t i = 0; + + if (!new_frame) { + pr_err("%s: Frame is Null\n", __func__); + return -EINVAL; + } + cpp_frame_msg = new_frame->cpp_cmd_msg; + + if (cpp_frame_msg == NULL || (new_frame->msg_len < MSM_CPP_MIN_FRAME_LENGTH)) { pr_err("%s %d Length is not correct or frame message is missing\n", __func__, __LINE__); return -EINVAL; } + if (cpp_frame_msg[new_frame->msg_len - 1] != MSM_CPP_MSG_ID_TRAILER) { pr_err("%s %d Invalid frame message\n", __func__, __LINE__); return -EINVAL; @@ -1403,12 +1604,12 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev, &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), &in_fd); + ((new_frame->input_buffer_info.identity >> 16) & 0xFFFF), + (new_frame->input_buffer_info.identity & 0xFFFF), &in_fd); if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); + pr_err("%s: error gettting input physical address\n", __func__); rc = -EINVAL; - goto ERROR2; + goto frame_msg_err; } if (new_frame->output_buffer_info[0].native_buff == 0) { @@ -1420,8 +1621,9 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, &buff_mgr_info); if (rc < 0) { rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR2; + pr_debug("%s: error getting buffer rc:%d\n", + __func__, rc); + goto frame_msg_err; } new_frame->output_buffer_info[0].index = buff_mgr_info.index; } @@ -1432,9 +1634,10 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, (new_frame->identity & 0xFFFF), &new_frame->output_buffer_info[0].fd); if (!out_phyaddr0) { - pr_err("error gettting output physical address\n"); + pr_err("%s: error gettting output physical address\n", + __func__); rc = -EINVAL; - goto ERROR3; + goto phyaddr_err; } out_phyaddr1 = out_phyaddr0; @@ -1453,8 +1656,9 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, &dup_buff_mgr_info); if (rc < 0) { rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR3; + pr_debug("%s: error getting buffer rc:%d\n", + __func__, rc); + goto phyaddr_err; } new_frame->output_buffer_info[1].index = dup_buff_mgr_info.index; @@ -1468,101 +1672,275 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev, rc = -EINVAL; msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, &dup_buff_mgr_info); - goto ERROR3; + goto phyaddr_err; } /* set duplicate enable bit */ cpp_frame_msg[5] |= 0x1; CPP_DBG("out_phyaddr1= %08x\n", (uint32_t)out_phyaddr1); } - num_stripes = ((cpp_frame_msg[12] >> 20) & 0x3FF) + - ((cpp_frame_msg[12] >> 10) & 0x3FF) + - (cpp_frame_msg[12] & 0x3FF); + if ((cpp_dev->fw_version & 0xffff0000) != CPP_FW_VERSION_1_8_0) { + num_stripes = ((cpp_frame_msg[12] >> 20) & 0x3FF) + + ((cpp_frame_msg[12] >> 10) & 0x3FF) + + (cpp_frame_msg[12] & 0x3FF); + + if ((cpp_dev->fw_version & 0xffff0000) == + CPP_FW_VERSION_1_2_0) { + stripe_base = STRIPE_BASE_FW_1_2_0; + } else if ((cpp_dev->fw_version & 0xffff0000) == + CPP_FW_VERSION_1_4_0) { + stripe_base = STRIPE_BASE_FW_1_4_0; + } else if ((cpp_dev->fw_version & 0xffff0000) == + CPP_FW_VERSION_1_6_0) { + stripe_base = STRIPE_BASE_FW_1_6_0; + } else { + pr_err("invalid fw version %08x", cpp_dev->fw_version); + goto phyaddr_err; + } + + if ((stripe_base + num_stripes*27 + 1) != new_frame->msg_len) { + pr_err("Invalid frame message\n"); + rc = -EINVAL; + goto phyaddr_err; + } - if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_2_0) { - stripe_base = STRIPE_BASE_FW_1_2_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_4_0) { - stripe_base = STRIPE_BASE_FW_1_4_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_6_0) { - stripe_base = STRIPE_BASE_FW_1_6_0; + for (i = 0; i < num_stripes; i++) { + cpp_frame_msg[stripe_base + 5 + i*27] += + (uint32_t) in_phyaddr; + cpp_frame_msg[stripe_base + 11 + i * 27] += + (uint32_t) out_phyaddr0; + cpp_frame_msg[stripe_base + 12 + i * 27] += + (uint32_t) out_phyaddr1; + cpp_frame_msg[stripe_base + 13 + i * 27] += + (uint32_t) out_phyaddr0; + cpp_frame_msg[stripe_base + 14 + i * 27] += + (uint32_t) out_phyaddr1; + } } else { - pr_err("invalid fw version %08x", cpp_dev->fw_version); - //goto ERROR3; - } - if ((stripe_base + num_stripes*27 + 1) != new_frame->msg_len) { - pr_err("Invalid frame message\n"); - rc = -EINVAL; - goto ERROR3; - } + tnr_scratch_buffer0 = msm_cpp_fetch_buffer_info(cpp_dev, + &new_frame->tnr_scratch_buffer_info[0], + ((new_frame->identity >> 16) & 0xFFFF), + (new_frame->identity & 0xFFFF), + &new_frame->tnr_scratch_buffer_info[0].fd); + if (!tnr_scratch_buffer0) { + pr_err("error getting scratch buffer physical address\n"); + rc = -EINVAL; + goto phyaddr_err; + } - for (i = 0; i < num_stripes; i++) { - cpp_frame_msg[stripe_base + 5 + i*27] += - (uint32_t) in_phyaddr; - cpp_frame_msg[stripe_base + 11 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 12 + i * 27] += - (uint32_t) out_phyaddr1; - cpp_frame_msg[stripe_base + 13 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 14 + i * 27] += - (uint32_t) out_phyaddr1; + tnr_scratch_buffer1 = msm_cpp_fetch_buffer_info(cpp_dev, + &new_frame->tnr_scratch_buffer_info[1], + ((new_frame->identity >> 16) & 0xFFFF), + (new_frame->identity & 0xFFFF), + &new_frame->tnr_scratch_buffer_info[1].fd); + if (!tnr_scratch_buffer1) { + pr_err("error getting scratch buffer physical address\n"); + rc = -EINVAL; + goto phyaddr_err; + } + num_stripes = ((cpp_frame_msg[9] >> 20) & 0x3FF) + + ((cpp_frame_msg[9] >> 10) & 0x3FF) + + (cpp_frame_msg[9] & 0x3FF); + + stripe_base = STRIPE_BASE_FW_1_8_0; + + if ((stripe_base + num_stripes*48 + 1) != new_frame->msg_len) { + pr_err("Invalid frame message\n"); + rc = -EINVAL; + goto phyaddr_err; + } + + for (i = 0; i < num_stripes; i++) { + + cpp_frame_msg[stripe_base + 8 + i * 48] += + (uint32_t) in_phyaddr; + cpp_frame_msg[stripe_base + 14 + i * 48] += + (uint32_t) tnr_scratch_buffer0; + cpp_frame_msg[stripe_base + 20 + i * 48] += + (uint32_t) out_phyaddr0; + cpp_frame_msg[stripe_base + 21 + i * 48] += + (uint32_t) out_phyaddr1; + cpp_frame_msg[stripe_base + 22 + i * 48] += + (uint32_t) out_phyaddr0; + cpp_frame_msg[stripe_base + 23 + i * 48] += + (uint32_t) out_phyaddr1; + cpp_frame_msg[stripe_base + 30 + i * 48] += + (uint32_t) tnr_scratch_buffer1; + } + + cpp_frame_msg[10] = out_phyaddr0 - in_phyaddr; } frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); + pr_err("%s: Insufficient memory\n", __func__); rc = -ENOMEM; - goto ERROR3; + goto qcmd_err; } atomic_set(&frame_qcmd->on_heap, 1); frame_qcmd->command = new_frame; rc = msm_cpp_send_frame_to_hardware(cpp_dev, frame_qcmd); if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); + pr_err("%s: error cannot send frame to hardware\n", __func__); rc = -EINVAL; - goto ERROR4; + goto qcmd_err; } - ioctl_ptr->trans_code = rc; - status = rc; - rc = (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR4; - } return rc; -ERROR4: +qcmd_err: kfree(frame_qcmd); -ERROR3: +phyaddr_err: if (new_frame->output_buffer_info[0].native_buff == 0) msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, &buff_mgr_info); -ERROR2: +frame_msg_err: kfree(cpp_frame_msg); -ERROR1: + return rc; +} + +static int msm_cpp_cfg(struct cpp_device *cpp_dev, + struct msm_camera_v4l2_ioctl_t *ioctl_ptr) +{ + struct msm_cpp_frame_info_t *frame = NULL; + struct msm_cpp_frame_info_t k_frame_info; + int32_t rc = 0; + + if (copy_from_user(&k_frame_info, + (void __user *)ioctl_ptr->ioctl_ptr, + sizeof(k_frame_info))) + return -EFAULT; + + frame = msm_cpp_get_frame(ioctl_ptr); + if (!frame) { + pr_err("%s: Error allocating frame\n", __func__); + return -ENOMEM; + } else { + rc = msm_cpp_cfg_frame(cpp_dev, frame); + } + ioctl_ptr->trans_code = rc; - status = rc; - if (copy_to_user((void __user *)new_frame->status, &status, + + if (copy_to_user((void __user *)k_frame_info.status, &rc, sizeof(int32_t))) pr_err("error cannot copy error\n"); - kfree(new_frame); + return rc; } +void msm_cpp_clean_queue(struct cpp_device *cpp_dev) +{ + struct msm_queue_cmd *frame_qcmd = NULL; + struct msm_cpp_frame_info_t *processed_frame = NULL; + struct msm_device_queue *queue = NULL; + + while (cpp_dev->processing_q.len) { + pr_info("queue len:%d\n", cpp_dev->processing_q.len); + queue = &cpp_dev->processing_q; + frame_qcmd = msm_dequeue(queue, list_frame); + if (frame_qcmd) { + processed_frame = frame_qcmd->command; + kfree(frame_qcmd); + if (processed_frame) + kfree(processed_frame->cpp_cmd_msg); + kfree(processed_frame); + } + } +} + +#ifdef CONFIG_COMPAT +static int msm_cpp_copy_from_ioctl_ptr(void *dst_ptr, + struct msm_camera_v4l2_ioctl_t *ioctl_ptr) +{ + int ret; + if ((ioctl_ptr->ioctl_ptr == NULL) || (ioctl_ptr->len == 0)) { + pr_err("%s: Wrong ioctl_ptr %p / len %zu\n", __func__, + ioctl_ptr, ioctl_ptr->len); + return -EINVAL; + } + + /* For compat task, source ptr is in kernel space */ + if (is_compat_task()) { + memcpy(dst_ptr, ioctl_ptr->ioctl_ptr, ioctl_ptr->len); + ret = 0; + } else { + ret = copy_from_user(dst_ptr, + (void __user *)ioctl_ptr->ioctl_ptr, ioctl_ptr->len); + if (ret) + pr_err("Copy from user fail %d\n", ret); + } + return ret ? -EFAULT : 0; +} +#else +static int msm_cpp_copy_from_ioctl_ptr(void *dst_ptr, + struct msm_camera_v4l2_ioctl_t *ioctl_ptr) +{ + int ret; + if ((ioctl_ptr->ioctl_ptr == NULL) || (ioctl_ptr->len == 0)) { + pr_err("%s: Wrong ioctl_ptr %p / len %zu\n", __func__, + ioctl_ptr, ioctl_ptr->len); + return -EINVAL; + } + + ret = copy_from_user(dst_ptr, + (void __user *)ioctl_ptr->ioctl_ptr, ioctl_ptr->len); + if (ret) + pr_err("Copy from user fail %d\n", ret); + + return ret ? -EFAULT : 0; +} +#endif + +static int msm_cpp_validate_ioctl_input(unsigned int cmd, void *arg, + struct msm_camera_v4l2_ioctl_t **ioctl_ptr) +{ + switch (cmd) { + case MSM_SD_SHUTDOWN: + case MSM_SD_NOTIFY_FREEZE: + case VIDIOC_MSM_CPP_IOMMU_ATTACH: + case VIDIOC_MSM_CPP_IOMMU_DETACH: + break; + default: + if (ioctl_ptr == NULL) { + pr_err("Wrong ioctl_ptr for cmd %u\n", cmd); + return -EINVAL; + } + + *ioctl_ptr = arg; + if (((*ioctl_ptr) == NULL) || + ((*ioctl_ptr)->ioctl_ptr == NULL) || + ((*ioctl_ptr)->len == 0)) { + pr_err("Error invalid ioctl argument cmd %u", cmd); + return -EINVAL; + } + break; + } + return 0; +} + long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; + struct cpp_device *cpp_dev = NULL; + struct msm_camera_v4l2_ioctl_t *ioctl_ptr = NULL; int rc = 0; - if ((ioctl_ptr == NULL) || (ioctl_ptr->ioctl_ptr == NULL)) { - pr_err("ioctl_ptr is null\n"); + if (sd == NULL) { + pr_err("sd %pK\n", sd); + return -EINVAL; + } + rc = msm_cpp_validate_ioctl_input(cmd, arg, &ioctl_ptr); + if (rc != 0) { + pr_err("input validation failed\n"); + return rc; + } + + if (_IOC_DIR(cmd) == _IOC_NONE) { + pr_err("Invalid ioctl/subdev cmd %u", cmd); return -EINVAL; } + + cpp_dev = v4l2_get_subdevdata(sd); if (cpp_dev == NULL) { pr_err("cpp_dev is null\n"); return -EINVAL; @@ -1589,7 +1967,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, cpp_dev->fw_name_bin = NULL; } if ((ioctl_ptr->len == 0) || - (ioctl_ptr->len > MSM_CPP_MAX_FW_NAME_LEN)) { + (ioctl_ptr->len >= MSM_CPP_MAX_FW_NAME_LEN)) { pr_err("ioctl_ptr->len is 0\n"); mutex_unlock(&cpp_dev->mutex); return -EINVAL; @@ -1604,6 +1982,8 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, } if (ioctl_ptr->ioctl_ptr == NULL) { pr_err("ioctl_ptr->ioctl_ptr=NULL\n"); + kfree(cpp_dev->fw_name_bin); + cpp_dev->fw_name_bin = NULL; mutex_unlock(&cpp_dev->mutex); return -EINVAL; } @@ -1637,6 +2017,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: { struct msm_cpp_stream_buff_info_t *u_stream_buff_info; struct msm_cpp_stream_buff_info_t k_stream_buff_info; + struct msm_cpp_buff_queue_info_t *buff_queue_info; CPP_DBG("VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO\n"); if (sizeof(struct msm_cpp_stream_buff_info_t) != ioctl_ptr->len) { @@ -1644,7 +2025,6 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, mutex_unlock(&cpp_dev->mutex); return -EINVAL; } - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); if (!u_stream_buff_info) { pr_err("%s:%d: malloc error\n", __func__, __LINE__); @@ -1652,16 +2032,14 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, return -EINVAL; } - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); + rc = msm_cpp_copy_from_ioctl_ptr(u_stream_buff_info, + ioctl_ptr); if (rc) { ERR_COPY_FROM_USER(); kfree(u_stream_buff_info); mutex_unlock(&cpp_dev->mutex); return -EINVAL; } - if (u_stream_buff_info->num_buffs == 0) { pr_err("%s:%d: Invalid number of buffers\n", __func__, __LINE__); @@ -1679,6 +2057,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, mutex_unlock(&cpp_dev->mutex); return -EINVAL; } + k_stream_buff_info.buffer_info = kzalloc(k_stream_buff_info.num_buffs * sizeof(struct msm_cpp_buffer_info_t), GFP_KERNEL); @@ -1701,21 +2080,32 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, mutex_unlock(&cpp_dev->mutex); return -EINVAL; } - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { + + buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, + (k_stream_buff_info.identity >> 16) & 0xFFFF, + k_stream_buff_info.identity & 0xFFFF); + + if (buff_queue_info == NULL) { rc = msm_cpp_add_buff_queue_entry(cpp_dev, ((k_stream_buff_info.identity >> 16) & 0xFFFF), (k_stream_buff_info.identity & 0xFFFF)); } + if (!rc) rc = msm_cpp_enqueue_buff_info_list(cpp_dev, &k_stream_buff_info); kfree(k_stream_buff_info.buffer_info); kfree(u_stream_buff_info); + if (cpp_dev->stream_cnt == 0) { + cpp_dev->state = CPP_STATE_ACTIVE; + msm_cpp_clear_timer(cpp_dev); + msm_cpp_clean_queue(cpp_dev); + } - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { + if (buff_queue_info == NULL) { cpp_dev->stream_cnt++; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); + CPP_DBG("stream_cnt:%d\n", cpp_dev->stream_cnt); } break; } @@ -1723,13 +2113,12 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, uint32_t identity; struct msm_cpp_buff_queue_info_t *buff_queue_info; CPP_DBG("VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO\n"); - - if (ioctl_ptr->len != sizeof(uint32_t)) + if (ioctl_ptr->len != sizeof(uint32_t)) { + mutex_unlock(&cpp_dev->mutex); return -EINVAL; + } - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); + rc = msm_cpp_copy_from_ioctl_ptr(&identity, ioctl_ptr); if (rc) { ERR_COPY_FROM_USER(); mutex_unlock(&cpp_dev->mutex); @@ -1751,11 +2140,19 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, buff_queue_info->stream_id); if (cpp_dev->stream_cnt > 0) { cpp_dev->stream_cnt--; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); + pr_info("stream_cnt:%d\n", cpp_dev->stream_cnt); if (cpp_dev->stream_cnt == 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0); + if (cpp_dev->bus_master_flag) + rc = msm_cpp_update_bandwidth(cpp_dev, + 0, 0); + else + rc = msm_isp_update_bandwidth(ISP_CPP, + 0, 0); if (rc < 0) pr_err("Bandwidth Reset Failed!\n"); + cpp_dev->state = CPP_STATE_IDLE; + msm_cpp_clear_timer(cpp_dev); + msm_cpp_clean_queue(cpp_dev); } } else { pr_err("error: stream count underflow %d\n", @@ -1780,6 +2177,9 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, process_frame, sizeof(struct msm_cpp_frame_info_t))) { mutex_unlock(&cpp_dev->mutex); + kfree(process_frame->cpp_cmd_msg); + kfree(process_frame); + kfree(event_qcmd); return -EINVAL; } @@ -1789,6 +2189,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, break; } case VIDIOC_MSM_CPP_SET_CLOCK: { + uint32_t msm_cpp_core_clk_idx; struct msm_cpp_clock_settings_t clock_settings; unsigned long clock_rate = 0; CPP_DBG("VIDIOC_MSM_CPP_SET_CLOCK\n"); @@ -1810,9 +2211,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, return -EINVAL; } - rc = (copy_from_user(&clock_settings, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); + rc = msm_cpp_copy_from_ioctl_ptr(&clock_settings, ioctl_ptr); if (rc) { ERR_COPY_FROM_USER(); mutex_unlock(&cpp_dev->mutex); @@ -1820,29 +2219,52 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, } if (clock_settings.clock_rate > 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, - clock_settings.avg, - clock_settings.inst); + msm_cpp_core_clk_idx = get_clock_index("cpp_core_clk"); + if (msm_cpp_core_clk_idx < 0) { + pr_err(" Fail to get clock index\n"); + return -EINVAL; + } + if (cpp_dev->bus_master_flag) + rc = msm_cpp_update_bandwidth(cpp_dev, + clock_settings.avg, + clock_settings.inst); + else + rc = msm_isp_update_bandwidth(ISP_CPP, + clock_settings.avg, + clock_settings.inst); if (rc < 0) { pr_err("Bandwidth Set Failed!\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); + if (cpp_dev->bus_master_flag) + rc = msm_cpp_update_bandwidth(cpp_dev, + 0, 0); + else + rc = msm_isp_update_bandwidth(ISP_CPP, + 0, 0); mutex_unlock(&cpp_dev->mutex); return -EINVAL; } clock_rate = clk_round_rate( - cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], + cpp_dev->cpp_clk[msm_cpp_core_clk_idx], clock_settings.clock_rate); if (clock_rate != clock_settings.clock_rate) pr_err("clock rate differ from settings\n"); - - clk_set_rate(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], + clk_set_rate(cpp_dev->cpp_clk[msm_cpp_core_clk_idx], clock_rate); + msm_isp_util_update_clk_rate(clock_rate); } break; } + case MSM_SD_NOTIFY_FREEZE: + break; case MSM_SD_SHUTDOWN: CPP_DBG("MSM_SD_SHUTDOWN\n"); mutex_unlock(&cpp_dev->mutex); + pr_info("shutdown cpp node. open cnt:%d\n", + cpp_dev->cpp_open_cnt); + + if (atomic_read(&cpp_timer.used)) + pr_info("Timer state not cleared\n"); + while (cpp_dev->cpp_open_cnt != 0) cpp_close_node(sd, NULL); mutex_lock(&cpp_dev->mutex); @@ -1851,10 +2273,12 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_CPP_QUEUE_BUF: { struct msm_pproc_queue_buf_info queue_buf_info; CPP_DBG("VIDIOC_MSM_CPP_QUEUE_BUF\n"); - rc = (copy_from_user(&queue_buf_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_pproc_queue_buf_info)) ? - -EFAULT : 0); + + if (ioctl_ptr->len != sizeof(struct msm_pproc_queue_buf_info)) { + pr_err("%s: Not valid ioctl_ptr->len\n", __func__); + return -EINVAL; + } + rc = msm_cpp_copy_from_ioctl_ptr(&queue_buf_info, ioctl_ptr); if (rc) { ERR_COPY_FROM_USER(); break; @@ -1879,13 +2303,19 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_CPP_POP_STREAM_BUFFER: { struct msm_buf_mngr_info buff_mgr_info; struct msm_cpp_frame_info_t frame_info; - rc = (copy_from_user(&frame_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); + if (ioctl_ptr->ioctl_ptr == NULL || + (ioctl_ptr->len != + sizeof(struct msm_cpp_frame_info_t))) { + rc = -EINVAL; + break; + } + + rc = msm_cpp_copy_from_ioctl_ptr(&frame_info, ioctl_ptr); if (rc) { ERR_COPY_FROM_USER(); break; } + memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); buff_mgr_info.session_id = ((frame_info.identity >> 16) & 0xFFFF); @@ -1909,6 +2339,37 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, default: pr_err_ratelimited("invalid value: cmd=0x%x\n", cmd); break; + case VIDIOC_MSM_CPP_IOMMU_ATTACH: { + if (cpp_dev->iommu_state == CPP_IOMMU_STATE_DETACHED) { + rc = iommu_attach_device(cpp_dev->domain, + cpp_dev->iommu_ctx); + if (rc < 0) { + pr_err("%s:%dError iommu_attach_device failed\n", + __func__, __LINE__); + rc = -EINVAL; + break; + } + cpp_dev->iommu_state = CPP_IOMMU_STATE_ATTACHED; + } else { + pr_err("%s:%d IOMMMU attach triggered in invalid state\n", + __func__, __LINE__); + rc = -EINVAL; + } + break; + } + case VIDIOC_MSM_CPP_IOMMU_DETACH: { + if ((cpp_dev->iommu_state == CPP_IOMMU_STATE_ATTACHED) && + (cpp_dev->stream_cnt == 0)) { + iommu_detach_device(cpp_dev->domain, + cpp_dev->iommu_ctx); + cpp_dev->iommu_state = CPP_IOMMU_STATE_DETACHED; + } else { + pr_err("%s:%d IOMMMU detach triggered in invalid state\n", + __func__, __LINE__); + rc = -EINVAL; + } + break; + } } mutex_unlock(&cpp_dev->mutex); CPP_DBG("X\n"); @@ -1939,14 +2400,25 @@ static const struct v4l2_subdev_ops msm_cpp_subdev_ops = { .core = &msm_cpp_subdev_core_ops, }; -static struct v4l2_file_operations msm_cpp_v4l2_subdev_fops; - static long msm_cpp_subdev_do_ioctl( struct file *file, unsigned int cmd, void *arg) { - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; + struct video_device *vdev; + struct v4l2_subdev *sd; + struct v4l2_fh *vfh = NULL; + + if ((arg == NULL) || (file == NULL)) { + pr_err("Invalid input parameters arg %p, file %p\n", arg, file); + return -EINVAL; + } + vdev = video_devdata(file); + sd = vdev_to_v4l2_subdev(vdev); + + if (sd == NULL) { + pr_err("Invalid input parameter sd %p\n", sd); + return -EINVAL; + } + vfh = file->private_data; switch (cmd) { case VIDIOC_DQEVENT: @@ -1993,6 +2465,475 @@ static long msm_cpp_subdev_fops_ioctl(struct file *file, unsigned int cmd, return video_usercopy(file, cmd, arg, msm_cpp_subdev_do_ioctl); } + +#ifdef CONFIG_COMPAT +static struct msm_cpp_frame_info_t *get_64bit_cpp_frame_from_compat( + struct msm_camera_v4l2_ioctl_t *kp_ioctl) +{ + struct msm_cpp_frame_info32_t *new_frame32 = NULL; + struct msm_cpp_frame_info_t *new_frame = NULL; + uint32_t *cpp_frame_msg; + void *cpp_cmd_msg_64bit; + int32_t rc; + + new_frame32 = kzalloc(sizeof(struct msm_cpp_frame_info32_t), + GFP_KERNEL); + if (!new_frame32) { + pr_err("Insufficient memory\n"); + goto no_mem32; + } + new_frame = kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); + if (!new_frame) { + pr_err("Insufficient memory\n"); + goto no_mem; + } + + rc = (copy_from_user(new_frame32, (void __user *)kp_ioctl->ioctl_ptr, + sizeof(struct msm_cpp_frame_info32_t)) ? -EFAULT : 0); + if (rc) { + ERR_COPY_FROM_USER(); + goto frame_err; + } + + new_frame->frame_id = new_frame32->frame_id; + new_frame->inst_id = new_frame32->inst_id; + new_frame->client_id = new_frame32->client_id; + new_frame->frame_type = new_frame32->frame_type; + new_frame->num_strips = new_frame32->num_strips; + new_frame->strip_info = compat_ptr(new_frame32->strip_info); + + new_frame->src_fd = new_frame32->src_fd; + new_frame->dst_fd = new_frame32->dst_fd; + + new_frame->timestamp.tv_sec = + (unsigned long)new_frame32->timestamp.tv_sec; + new_frame->timestamp.tv_usec = + (unsigned long)new_frame32->timestamp.tv_usec; + + new_frame->in_time.tv_sec = + (unsigned long)new_frame32->in_time.tv_sec; + new_frame->in_time.tv_usec = + (unsigned long)new_frame32->in_time.tv_usec; + + new_frame->out_time.tv_sec = + (unsigned long)new_frame32->out_time.tv_sec; + new_frame->out_time.tv_usec = + (unsigned long)new_frame32->out_time.tv_usec; + + new_frame->msg_len = new_frame32->msg_len; + new_frame->identity = new_frame32->identity; + new_frame->input_buffer_info = new_frame32->input_buffer_info; + new_frame->output_buffer_info[0] = + new_frame32->output_buffer_info[0]; + new_frame->output_buffer_info[1] = + new_frame32->output_buffer_info[1]; + new_frame->tnr_scratch_buffer_info[0] = + new_frame32->tnr_scratch_buffer_info[0]; + new_frame->tnr_scratch_buffer_info[1] = + new_frame32->tnr_scratch_buffer_info[1]; + new_frame->duplicate_output = new_frame32->duplicate_output; + new_frame->duplicate_identity = new_frame32->duplicate_identity; + + /* Convert the 32 bit pointer to 64 bit pointer */ + new_frame->cookie = compat_ptr(new_frame32->cookie); + new_frame->status = compat_ptr(new_frame32->status); + cpp_cmd_msg_64bit = compat_ptr(new_frame32->cpp_cmd_msg); + if ((new_frame->msg_len == 0) || + (new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) { + pr_err("%s:%d: Invalid frame len:%d\n", __func__, + __LINE__, new_frame->msg_len); + goto frame_err; + } + + cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len, + GFP_KERNEL); + if (!cpp_frame_msg) { + pr_err("Insufficient memory\n"); + goto frame_err; + } + + rc = (copy_from_user(cpp_frame_msg, + (void __user *)cpp_cmd_msg_64bit, + sizeof(uint32_t)*new_frame->msg_len) ? -EFAULT : 0); + if (rc) { + ERR_COPY_FROM_USER(); + goto frame_msg_err; + } + new_frame->cpp_cmd_msg = cpp_frame_msg; + + kfree(new_frame32); + return new_frame; + +frame_msg_err: + kfree(cpp_frame_msg); +frame_err: + kfree(new_frame); +no_mem: + kfree(new_frame32); +no_mem32: + return NULL; +} + +static void get_compat_frame_from_64bit(struct msm_cpp_frame_info_t *frame, + struct msm_cpp_frame_info32_t *k32_frame) +{ + k32_frame->frame_id = frame->frame_id; + k32_frame->inst_id = frame->inst_id; + k32_frame->client_id = frame->client_id; + k32_frame->frame_type = frame->frame_type; + k32_frame->num_strips = frame->num_strips; + k32_frame->strip_info = ptr_to_compat(frame->strip_info); + + k32_frame->src_fd = frame->src_fd; + k32_frame->dst_fd = frame->dst_fd; + + k32_frame->timestamp.tv_sec = (uint32_t)frame->timestamp.tv_sec; + k32_frame->timestamp.tv_usec = (uint32_t)frame->timestamp.tv_usec; + + k32_frame->in_time.tv_sec = (uint32_t)frame->in_time.tv_sec; + k32_frame->in_time.tv_usec = (uint32_t)frame->in_time.tv_usec; + + k32_frame->out_time.tv_sec = (uint32_t)frame->out_time.tv_sec; + k32_frame->out_time.tv_usec = (uint32_t)frame->out_time.tv_usec; + + k32_frame->msg_len = frame->msg_len; + k32_frame->identity = frame->identity; + k32_frame->input_buffer_info = frame->input_buffer_info; + k32_frame->output_buffer_info[0] = frame->output_buffer_info[0]; + k32_frame->output_buffer_info[1] = frame->output_buffer_info[1]; + k32_frame->duplicate_output = frame->duplicate_output; + k32_frame->duplicate_identity = frame->duplicate_identity; + k32_frame->cookie = ptr_to_compat(frame->cookie); +} + +static long msm_cpp_subdev_fops_compat_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + struct cpp_device *cpp_dev = NULL; + + int32_t rc = 0; + struct msm_camera_v4l2_ioctl_t kp_ioctl; + struct msm_camera_v4l2_ioctl32_t up32_ioctl; + struct msm_cpp_clock_settings_t clock_settings; + struct msm_pproc_queue_buf_info k_queue_buf; + struct msm_cpp_stream_buff_info_t k_cpp_buff_info; + struct msm_cpp_frame_info32_t k32_frame_info; + struct msm_cpp_frame_info_t k64_frame_info; + void __user *up = (void __user *)arg; + bool is_copytouser_req = true; + + if (sd == NULL) { + pr_err("%s: Subdevice is NULL\n", __func__); + return -EINVAL; + } + cpp_dev = v4l2_get_subdevdata(sd); + if (!vdev || !cpp_dev) { + pr_err("Invalid vdev %p or cpp_dev %p structures!", + vdev, cpp_dev); + return -EINVAL; + } + /* + * copy the user space 32 bit pointer to kernel space 32 bit compat + * pointer + */ + if (copy_from_user(&up32_ioctl, (void __user *)up, + sizeof(up32_ioctl))) + return -EFAULT; + + /* copy the data from 32 bit compat to kernel space 64 bit pointer */ + kp_ioctl.id = up32_ioctl.id; + kp_ioctl.len = up32_ioctl.len; + kp_ioctl.trans_code = up32_ioctl.trans_code; + /* Convert the 32 bit pointer to 64 bit pointer */ + kp_ioctl.ioctl_ptr = compat_ptr(up32_ioctl.ioctl_ptr); + if (!kp_ioctl.ioctl_ptr) { + pr_err("%s: Invalid ioctl pointer\n", __func__); + return -EINVAL; + } + + /* + * Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's + * except VIDIOC_MSM_CPP_CFG32, which needs special + * processing + */ + switch (cmd) { + case VIDIOC_MSM_CPP_CFG32: + { + struct msm_camera_v4l2_ioctl32_t *up32 = + (struct msm_camera_v4l2_ioctl32_t *)up; + struct msm_cpp_frame_info32_t *u32_frame_info = + (struct msm_cpp_frame_info32_t *)compat_ptr(up32->ioctl_ptr); + struct msm_cpp_frame_info_t *cpp_frame = NULL; + int32_t *status; + + /* Get the cpp frame pointer */ + cpp_frame = get_64bit_cpp_frame_from_compat(&kp_ioctl); + + /* Configure the cpp frame */ + if (cpp_frame) + rc = msm_cpp_cfg_frame(cpp_dev, cpp_frame); + else { + pr_err("%s: Error getting frame\n", __func__); + return -ENOMEM; + } + + kp_ioctl.trans_code = rc; + + /* Convert the 32 bit pointer to 64 bit pointer */ + status = compat_ptr(u32_frame_info->status); + + if (copy_to_user((void __user *)cpp_frame->status, &rc, + sizeof(int32_t))) + pr_err("error cannot copy error\n"); + + cmd = VIDIOC_MSM_CPP_CFG; + break; + } + case VIDIOC_MSM_CPP_GET_HW_INFO32: + { + struct cpp_hw_info_32_t u32_cpp_hw_info; + uint32_t i; + + u32_cpp_hw_info.cpp_hw_version = + cpp_dev->hw_info.cpp_hw_version; + u32_cpp_hw_info.cpp_hw_caps = cpp_dev->hw_info.cpp_hw_caps; + memset(&u32_cpp_hw_info.freq_tbl, 0x00, + sizeof(u32_cpp_hw_info.freq_tbl)); + for (i = 0; i < cpp_dev->hw_info.freq_tbl_count; i++) + u32_cpp_hw_info.freq_tbl[i] = + cpp_dev->hw_info.freq_tbl[i]; + + u32_cpp_hw_info.freq_tbl_count = + cpp_dev->hw_info.freq_tbl_count; + if (copy_to_user((void __user *)kp_ioctl.ioctl_ptr, + &u32_cpp_hw_info, sizeof(struct cpp_hw_info_32_t))) + return -EINVAL; + + cmd = VIDIOC_MSM_CPP_GET_HW_INFO; + break; + } + case VIDIOC_MSM_CPP_LOAD_FIRMWARE32: + cmd = VIDIOC_MSM_CPP_LOAD_FIRMWARE; + break; + case VIDIOC_MSM_CPP_GET_INST_INFO32: + { + struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); + struct msm_cpp_frame_info32_t inst_info; + struct v4l2_fh *vfh = NULL; + uint32_t i; + vfh = file->private_data; + memset(&inst_info, 0, sizeof(struct msm_cpp_frame_info32_t)); + for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { + if (cpp_dev->cpp_subscribe_list[i].vfh == vfh) { + inst_info.inst_id = i; + break; + } + } + if (copy_to_user( + (void __user *)kp_ioctl.ioctl_ptr, &inst_info, + sizeof(struct msm_cpp_frame_info32_t))) { + return -EINVAL; + } + cmd = VIDIOC_MSM_CPP_GET_INST_INFO; + break; + } + case VIDIOC_MSM_CPP_FLUSH_QUEUE32: + cmd = VIDIOC_MSM_CPP_FLUSH_QUEUE; + break; + case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO32: + case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO32: + { + struct msm_cpp_stream_buff_info32_t *u32_cpp_buff_info = + (struct msm_cpp_stream_buff_info32_t *)kp_ioctl.ioctl_ptr; + + k_cpp_buff_info.identity = u32_cpp_buff_info->identity; + k_cpp_buff_info.num_buffs = u32_cpp_buff_info->num_buffs; + k_cpp_buff_info.buffer_info = + compat_ptr(u32_cpp_buff_info->buffer_info); + + kp_ioctl.ioctl_ptr = (void *)&k_cpp_buff_info; + if (is_compat_task()) { + if (kp_ioctl.len != sizeof( + struct msm_cpp_stream_buff_info32_t)) + return -EINVAL; + else + kp_ioctl.len = + sizeof(struct msm_cpp_stream_buff_info_t); + } + is_copytouser_req = false; + if (cmd == VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO32) + cmd = VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO; + else + cmd = VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO; + break; + } + case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO32: + cmd = VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO; + break; + case VIDIOC_MSM_CPP_GET_EVENTPAYLOAD32: + { + struct msm_device_queue *queue = &cpp_dev->eventData_q; + struct msm_queue_cmd *event_qcmd; + struct msm_cpp_frame_info_t *process_frame; + struct msm_cpp_frame_info32_t k32_process_frame; + + CPP_DBG("VIDIOC_MSM_CPP_GET_EVENTPAYLOAD\n"); + mutex_lock(&cpp_dev->mutex); + event_qcmd = msm_dequeue(queue, list_eventdata); + if (!event_qcmd) { + pr_err("no queue cmd available"); + mutex_unlock(&cpp_dev->mutex); + return -EINVAL; + } + process_frame = event_qcmd->command; + + memset(&k32_process_frame, 0, sizeof(k32_process_frame)); + get_compat_frame_from_64bit(process_frame, &k32_process_frame); + + CPP_DBG("fid %d\n", process_frame->frame_id); + if (copy_to_user((void __user *)kp_ioctl.ioctl_ptr, + &k32_process_frame, + sizeof(struct msm_cpp_frame_info32_t))) { + kfree(process_frame->cpp_cmd_msg); + kfree(process_frame); + kfree(event_qcmd); + mutex_unlock(&cpp_dev->mutex); + return -EINVAL; + } + + kfree(process_frame->cpp_cmd_msg); + kfree(process_frame); + kfree(event_qcmd); + cmd = VIDIOC_MSM_CPP_GET_EVENTPAYLOAD; + mutex_unlock(&cpp_dev->mutex); + break; + } + case VIDIOC_MSM_CPP_SET_CLOCK32: + { + struct msm_cpp_clock_settings32_t *clock_settings32 = + (struct msm_cpp_clock_settings32_t *)kp_ioctl.ioctl_ptr; + clock_settings.clock_rate = clock_settings32->clock_rate; + clock_settings.avg = clock_settings32->avg; + clock_settings.inst = clock_settings32->inst; + kp_ioctl.ioctl_ptr = (void *)&clock_settings; + if (is_compat_task()) { + if (kp_ioctl.len != sizeof( + struct msm_cpp_clock_settings32_t)) + return -EINVAL; + else + kp_ioctl.len = + sizeof(struct msm_cpp_clock_settings_t); + } + is_copytouser_req = false; + cmd = VIDIOC_MSM_CPP_SET_CLOCK; + break; + } + case VIDIOC_MSM_CPP_QUEUE_BUF32: + { + struct msm_pproc_queue_buf_info32_t *u32_queue_buf = + (struct msm_pproc_queue_buf_info32_t *)kp_ioctl.ioctl_ptr; + + k_queue_buf.is_buf_dirty = u32_queue_buf->is_buf_dirty; + k_queue_buf.buff_mgr_info.session_id = + u32_queue_buf->buff_mgr_info.session_id; + k_queue_buf.buff_mgr_info.stream_id = + u32_queue_buf->buff_mgr_info.stream_id; + k_queue_buf.buff_mgr_info.frame_id = + u32_queue_buf->buff_mgr_info.frame_id; + k_queue_buf.buff_mgr_info.index = + u32_queue_buf->buff_mgr_info.index; + k_queue_buf.buff_mgr_info.timestamp.tv_sec = + u32_queue_buf->buff_mgr_info.timestamp.tv_sec; + k_queue_buf.buff_mgr_info.timestamp.tv_usec = + u32_queue_buf->buff_mgr_info.timestamp.tv_usec; + + kp_ioctl.ioctl_ptr = (void *)&k_queue_buf; + kp_ioctl.len = sizeof(struct msm_pproc_queue_buf_info); + is_copytouser_req = false; + cmd = VIDIOC_MSM_CPP_QUEUE_BUF; + break; + } + case VIDIOC_MSM_CPP_POP_STREAM_BUFFER32: + { + if (kp_ioctl.len != sizeof(struct msm_cpp_frame_info32_t)) + return -EINVAL; + else + kp_ioctl.len = sizeof(struct msm_cpp_frame_info_t); + + if (copy_from_user(&k32_frame_info, + (void __user *)kp_ioctl.ioctl_ptr, + sizeof(k32_frame_info))) + return -EFAULT; + + memset(&k64_frame_info, 0, sizeof(k64_frame_info)); + k64_frame_info.identity = k32_frame_info.identity; + k64_frame_info.frame_id = k32_frame_info.frame_id; + + kp_ioctl.ioctl_ptr = (void *)&k64_frame_info; + cmd = VIDIOC_MSM_CPP_POP_STREAM_BUFFER; + break; + } + case VIDIOC_MSM_CPP_IOMMU_ATTACH32: + cmd = VIDIOC_MSM_CPP_IOMMU_ATTACH; + break; + case VIDIOC_MSM_CPP_IOMMU_DETACH32: + cmd = VIDIOC_MSM_CPP_IOMMU_DETACH; + break; + case MSM_SD_NOTIFY_FREEZE: + break; + case MSM_SD_SHUTDOWN: + cmd = MSM_SD_SHUTDOWN; + break; + default: + pr_err_ratelimited("%s: unsupported compat type :%d\n", + __func__, cmd); + return -EINVAL; + } + + switch (cmd) { + case VIDIOC_MSM_CPP_LOAD_FIRMWARE: + case VIDIOC_MSM_CPP_FLUSH_QUEUE: + case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO: + case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: + case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO: + case VIDIOC_MSM_CPP_SET_CLOCK: + case VIDIOC_MSM_CPP_QUEUE_BUF: + case VIDIOC_MSM_CPP_POP_STREAM_BUFFER: + case VIDIOC_MSM_CPP_IOMMU_ATTACH: + case VIDIOC_MSM_CPP_IOMMU_DETACH: + case MSM_SD_SHUTDOWN: + rc = v4l2_subdev_call(sd, core, ioctl, cmd, &kp_ioctl); + break; + case VIDIOC_MSM_CPP_GET_HW_INFO: + case VIDIOC_MSM_CPP_CFG: + case VIDIOC_MSM_CPP_GET_EVENTPAYLOAD: + case VIDIOC_MSM_CPP_GET_INST_INFO: + break; + case MSM_SD_NOTIFY_FREEZE: + break; + default: + pr_err_ratelimited("%s: unsupported compat type :%d\n", + __func__, cmd); + return -EINVAL; + } + + if (is_copytouser_req) { + up32_ioctl.id = kp_ioctl.id; + up32_ioctl.len = kp_ioctl.len; + up32_ioctl.trans_code = kp_ioctl.trans_code; + up32_ioctl.ioctl_ptr = ptr_to_compat(kp_ioctl.ioctl_ptr); + + if (copy_to_user((void __user *)up, &up32_ioctl, + sizeof(up32_ioctl))) + return -EFAULT; + } + + return rc; +} +#endif + static int cpp_register_domain(void) { struct msm_iova_partition cpp_fw_partition = { @@ -2049,19 +2990,27 @@ static int msm_cpp_get_clk_info(struct cpp_device *cpp_dev, return rc; } for (i = 0; i < count; i++) { - cpp_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; + cpp_clk_info[i].clk_rate = (rates[i] == 0) ? + (long)-1 : rates[i]; CPP_DBG("clk_rate[%d] = %ld\n", i, cpp_clk_info[i].clk_rate); } cpp_dev->num_clk = count; return 0; } +struct v4l2_file_operations msm_cpp_v4l2_subdev_fops = { + .unlocked_ioctl = msm_cpp_subdev_fops_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl32 = msm_cpp_subdev_fops_compat_ioctl, +#endif +}; static int cpp_probe(struct platform_device *pdev) { struct cpp_device *cpp_dev; int rc = 0; CPP_DBG("E"); + cpp_dev = kzalloc(sizeof(struct cpp_device), GFP_KERNEL); if (!cpp_dev) { pr_err("no enough memory\n"); @@ -2073,7 +3022,7 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->cpp_clk) { pr_err("no enough memory\n"); rc = -ENOMEM; - goto ERROR1; + goto clk_err; } v4l2_subdev_init(&cpp_dev->msm_sd.sd, &msm_cpp_subdev_ops); @@ -2098,7 +3047,7 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->mem) { pr_err("no mem resource?\n"); rc = -ENODEV; - goto ERROR2; + goto mem_err; } cpp_dev->vbif_mem = platform_get_resource_byname(pdev, @@ -2106,7 +3055,7 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->vbif_mem) { pr_err("no mem resource?\n"); rc = -ENODEV; - goto ERROR2; + goto mem_err; } cpp_dev->cpp_hw_mem = platform_get_resource_byname(pdev, @@ -2114,7 +3063,7 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->cpp_hw_mem) { pr_err("no mem resource?\n"); rc = -ENODEV; - goto ERROR2; + goto mem_err; } cpp_dev->irq = platform_get_resource_byname(pdev, @@ -2122,7 +3071,7 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->irq) { pr_err("%s: no irq resource?\n", __func__); rc = -ENODEV; - goto ERROR2; + goto mem_err; } cpp_dev->io = request_mem_region(cpp_dev->mem->start, @@ -2130,14 +3079,14 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->io) { pr_err("%s: no valid mem region\n", __func__); rc = -EBUSY; - goto ERROR2; + goto mem_err; } cpp_dev->domain_num = cpp_register_domain(); if (cpp_dev->domain_num < 0) { pr_err("%s: could not register domain\n", __func__); rc = -ENODEV; - goto ERROR3; + goto iommu_err; } cpp_dev->domain = @@ -2145,19 +3094,34 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->domain) { pr_err("%s: cannot find domain\n", __func__); rc = -ENODEV; - goto ERROR3; + goto iommu_err; + } + + if (msm_cpp_get_clk_info(cpp_dev, pdev) < 0) { + pr_err("msm_cpp_get_clk_info() failed\n"); + goto iommu_err; } - cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp"); + if (pdev->dev.of_node) + rc = of_property_read_u32(pdev->dev.of_node, "bus_master", + &cpp_dev->bus_master_flag); + if (rc) + cpp_dev->bus_master_flag = 0; + pr_err("Bus master %d\n", cpp_dev->bus_master_flag); + + rc = cpp_init_hardware(cpp_dev); + if (rc < 0) + goto cpp_probe_init_error; + + if (cpp_dev->hw_info.cpp_hw_version == CPP_HW_VERSION_5_0_0) + cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp_0"); + else + cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp"); + if (IS_ERR(cpp_dev->iommu_ctx)) { pr_err("%s: cannot get iommu_ctx\n", __func__); rc = -EPROBE_DEFER; - goto ERROR3; - } - - if (msm_cpp_get_clk_info(cpp_dev, pdev) < 0) { - pr_err("msm_cpp_get_clk_info() failed\n"); - goto ERROR3; + goto iommu_err; } media_entity_init(&cpp_dev->msm_sd.sd.entity, 0, NULL, 0); @@ -2168,7 +3132,6 @@ static int cpp_probe(struct platform_device *pdev) msm_sd_register(&cpp_dev->msm_sd); msm_cpp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; msm_cpp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_cpp_v4l2_subdev_fops.unlocked_ioctl = msm_cpp_subdev_fops_ioctl; msm_cpp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; msm_cpp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; @@ -2176,10 +3139,6 @@ static int cpp_probe(struct platform_device *pdev) cpp_dev->msm_sd.sd.entity.revision = cpp_dev->msm_sd.sd.devnode->num; cpp_dev->state = CPP_STATE_BOOT; - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) - goto CPP_PROBE_INIT_ERROR; - msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); msm_camera_io_w(0xFFFF, cpp_dev->base + @@ -2201,12 +3160,13 @@ static int cpp_probe(struct platform_device *pdev) if (!cpp_dev->work) { pr_err("no enough memory\n"); rc = -ENOMEM; - goto CPP_PROBE_INIT_ERROR; + goto cpp_probe_init_error; } INIT_WORK((struct work_struct *)cpp_dev->work, msm_cpp_do_timeout_work); cpp_dev->cpp_open_cnt = 0; cpp_dev->is_firmware_loaded = 0; + cpp_dev->iommu_state = CPP_IOMMU_STATE_DETACHED; cpp_timer.data.cpp_dev = cpp_dev; atomic_set(&cpp_timer.used, 0); cpp_dev->fw_name_bin = NULL; @@ -2215,14 +3175,14 @@ static int cpp_probe(struct platform_device *pdev) else CPP_DBG("FAILED."); return rc; -CPP_PROBE_INIT_ERROR: +cpp_probe_init_error: media_entity_cleanup(&cpp_dev->msm_sd.sd.entity); msm_sd_unregister(&cpp_dev->msm_sd); -ERROR3: +iommu_err: release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); -ERROR2: +mem_err: kfree(cpp_dev->cpp_clk); -ERROR1: +clk_err: kfree(cpp_dev); return rc; } diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h index e306335a826d..fb28e4f41294 100644 --- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h +++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h @@ -31,6 +31,9 @@ #define CPP_HW_VERSION_2_0_0 0x20000000 #define CPP_HW_VERSION_4_0_0 0x40000000 #define CPP_HW_VERSION_4_1_0 0x40010000 +#define CPP_HW_VERSION_5_0_0 0x50000000 + +#define VBIF_VERSION_2_3_0 0x20030000 #define MAX_ACTIVE_CPP_INSTANCE 8 #define MAX_CPP_PROCESSING_FRAME 2 @@ -81,7 +84,7 @@ #define MSM_CPP_START_ADDRESS 0x0 #define MSM_CPP_END_ADDRESS 0x3F00 -#define MSM_CPP_POLL_RETRIES 20 +#define MSM_CPP_POLL_RETRIES 200 #define MSM_CPP_TASKLETQ_SIZE 16 #define MSM_CPP_TX_FIFO_LEVEL 16 #define MSM_CPP_RX_FIFO_LEVEL 512 @@ -168,11 +171,6 @@ struct msm_cpp_work_t { struct work_struct my_work; struct cpp_device *cpp_dev; }; -struct msm_cpp_clock_settings_t { - long clock_rate; - uint64_t avg; - uint64_t inst; -}; struct cpp_device { struct platform_device *pdev; @@ -198,6 +196,7 @@ struct cpp_device { struct msm_cpp_work_t *work; uint32_t fw_version; uint8_t stream_cnt; + uint8_t timeout_trial_cnt; int domain_num; struct iommu_domain *domain; @@ -229,5 +228,8 @@ struct cpp_device { struct msm_cpp_buff_queue_info_t *buff_queue; uint32_t num_buffq; struct v4l2_subdev *buf_mgr_subdev; + uint32_t bus_client; + uint32_t bus_idx; + uint32_t bus_master_flag; }; #endif /* __MSM_CPP_H__ */ diff --git a/drivers/media/platform/msm/camera_v2/pproc/vpe/msm_vpe.c b/drivers/media/platform/msm/camera_v2/pproc/vpe/msm_vpe.c index aa3be88b72b8..11f806bbf0b0 100644 --- a/drivers/media/platform/msm/camera_v2/pproc/vpe/msm_vpe.c +++ b/drivers/media/platform/msm/camera_v2/pproc/vpe/msm_vpe.c @@ -52,12 +52,12 @@ static void vpe_mem_dump(const char * const name, const void * const addr, int i; u32 *p = (u32 *) addr; u32 data; - VPE_DBG("%s: (%s) %pK %d\n", __func__, name, addr, size); + VPE_DBG("%s: (%s) %p %d\n", __func__, name, addr, size); line_str[0] = '\0'; p_str = line_str; for (i = 0; i < size/4; i++) { if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); + snprintf(p_str, 12, "%p: ", p); p_str += 10; } data = *p++; @@ -594,7 +594,7 @@ static int vpe_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) goto err_mutex_unlock; } - VPE_DBG("open %d %pK\n", i, &fh->vfh); + VPE_DBG("open %d %p\n", i, &fh->vfh); vpe_dev->vpe_open_cnt++; if (vpe_dev->vpe_open_cnt == 1) { rc = vpe_init_hardware(vpe_dev); @@ -649,7 +649,7 @@ static int vpe_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) return -ENODEV; } - VPE_DBG("close %d %pK\n", i, &fh->vfh); + VPE_DBG("close %d %p\n", i, &fh->vfh); vpe_dev->vpe_open_cnt--; if (vpe_dev->vpe_open_cnt == 0) { vpe_deinit_mem(vpe_dev); @@ -689,6 +689,11 @@ static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev) if (queue->len > 0) { frame_qcmd = msm_dequeue(queue, list_frame); + if (!frame_qcmd) { + pr_err("%s: %d frame_qcmd is NULL\n", + __func__ , __LINE__); + return -EINVAL; + } processed_frame = frame_qcmd->command; do_gettimeofday(&(processed_frame->out_time)); kfree(frame_qcmd); @@ -1219,7 +1224,7 @@ static long msm_vpe_subdev_ioctl(struct v4l2_subdev *sd, struct msm_vpe_transaction_setup_cfg *cfg; VPE_DBG("VIDIOC_MSM_VPE_TRANSACTION_SETUP\n"); if (sizeof(*cfg) != ioctl_ptr->len) { - pr_err("%s: size mismatch cmd=%d, len=%d, expected=%d", + pr_err("%s: size mismatch cmd=%d, len=%zu, expected=%zu", __func__, cmd, ioctl_ptr->len, sizeof(*cfg)); rc = -EINVAL; @@ -1366,12 +1371,19 @@ static long msm_vpe_subdev_ioctl(struct v4l2_subdev *sd, struct msm_vpe_frame_info_t *process_frame; VPE_DBG("VIDIOC_MSM_VPE_GET_EVENTPAYLOAD\n"); event_qcmd = msm_dequeue(queue, list_eventdata); + if (!event_qcmd) { + pr_err("%s: %d event_qcmd is NULL\n", + __func__ , __LINE__); + return -EINVAL; + } process_frame = event_qcmd->command; VPE_DBG("fid %d\n", process_frame->frame_id); if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, process_frame, sizeof(struct msm_vpe_frame_info_t))) { mutex_unlock(&vpe_dev->mutex); + kfree(process_frame); + kfree(event_qcmd); return -EINVAL; } diff --git a/drivers/media/platform/msm/camera_v2/sensor/Makefile b/drivers/media/platform/msm/camera_v2/sensor/Makefile index 35156e65aa01..09afb7b66fb8 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/Makefile +++ b/drivers/media/platform/msm/camera_v2/sensor/Makefile @@ -3,24 +3,9 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2/msm_vb2 ccflags-y += -Idrivers/media/platform/msm/camera_v2/camera ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ flash/ eeprom/ +obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ flash/ eeprom/ ois/ obj-$(CONFIG_MSM_CAMERA_SENSOR) += msm_sensor_init.o msm_sensor_driver.o msm_sensor.o -obj-$(CONFIG_IMX132) += imx132.o -obj-$(CONFIG_IMX134) += imx134.o -obj-$(CONFIG_OV8825) += ov8825.o -obj-$(CONFIG_OV8865) += ov8865.o -obj-$(CONFIG_s5k4e1) += s5k4e1.o -obj-$(CONFIG_OV12830) += ov12830.o -obj-$(CONFIG_OV9724) += ov9724.o -obj-$(CONFIG_HI256) += hi256.o -obj-$(CONFIG_OV5648) += ov5648.o obj-$(CONFIG_MT9M114) += mt9m114.o -obj-$(CONFIG_MT9M114) += ov5645.o -obj-$(CONFIG_SP1628) += sp1628.o -obj-$(CONFIG_GC0339) += gc0339.o -obj-$(CONFIG_SR200PC20) += sr200pc20_yuv.o -obj-$(CONFIG_S5K4ECGX) += s5k4ecgx_yuv.o -obj-$(CONFIG_SR352) += sr352_yuv.o -obj-$(CONFIG_SR130PC20) += sr130pc20_yuv.o -obj-$(CONFIG_DB8221A) += db8221a_yuv.o -obj-$(CONFIG_OIS) += external/ +obj-$(CONFIG_OV5645) += ov5645.o +obj-$(CONFIG_OV5645) += ov7695.o +obj-$(CONFIG_GC0310) += gc0310.o diff --git a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c index 903c163d6876..0aa4a3d3dacb 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c +++ b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -20,81 +20,28 @@ DEFINE_MSM_MUTEX(msm_actuator_mutex); #undef CDBG -#ifdef MSM_ACUTUATOR_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else #define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif +#define MAX_QVALUE 4096 +static struct v4l2_file_operations msm_actuator_v4l2_subdev_fops; -#define LENS_POSITION_CENTER_10BIT 500 -#define LENS_POSITION_BOTTOM_10BIT 10 +#define PARK_LENS_LONG_STEP 7 +#define PARK_LENS_MID_STEP 5 +#define PARK_LENS_SMALL_STEP 3 static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); static struct msm_actuator msm_vcm_actuator_table; static struct msm_actuator msm_piezo_actuator_table; -static struct msm_actuator msm_hall_effect_actuator_table; +static struct msm_actuator msm_hvcm_actuator_table; static struct i2c_driver msm_actuator_i2c_driver; static struct msm_actuator *actuators[] = { &msm_vcm_actuator_table, &msm_piezo_actuator_table, - &msm_hall_effect_actuator_table, - &msm_piezo_actuator_table, /* dummy entries */ + &msm_hvcm_actuator_table, }; - -#if defined(CONFIG_OIS) -struct msm_actuator_ctrl_t *g_msm_actuator_t; - - -/***** for only ois selftest , set the actuator initial position to 256 *****/ -int16_t msm_actuator_move_for_ois_test(void) -{ - int rc = 0; - pr_err("[%s::%d] : E \n", __func__, __LINE__); - - g_msm_actuator_t->i2c_data_type = MSM_ACTUATOR_BYTE_DATA; - g_msm_actuator_t->i2c_client.addr_type = MSM_ACTUATOR_BYTE_ADDR; - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x00, 0x80, /* SET Position MSB - 0x00 */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x01, 0x00, /* SET Position LSB - 0x00 */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x02, 0x00, /* SET Active Mode */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - pr_err("[%s::%d] : X \n", __func__, __LINE__); - return rc; -} - - -static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, - int config); -void msm_actuator_power_for_ois_test(int on) -{ - msm_actuator_vreg_control(g_msm_actuator_t, on); -} - -#endif - - - static int32_t msm_actuator_piezo_set_default_focus( struct msm_actuator_ctrl_t *a_ctrl, struct msm_actuator_move_params_t *move_params) @@ -112,7 +59,6 @@ static int32_t msm_actuator_piezo_set_default_focus( reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; reg_setting.data_type = a_ctrl->i2c_data_type; reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; rc = a_ctrl->i2c_client.i2c_func_tbl-> i2c_write_table_w_microdelay( &a_ctrl->i2c_client, ®_setting); @@ -195,138 +141,63 @@ static int32_t msm_actuator_init_focus(struct msm_actuator_ctrl_t *a_ctrl, { int32_t rc = -EFAULT; int32_t i = 0; + enum msm_camera_i2c_reg_addr_type save_addr_type; CDBG("Enter\n"); + save_addr_type = a_ctrl->i2c_client.addr_type; for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_ACT_WRITE: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } + + switch (settings[i].addr_type) { + case MSM_ACTUATOR_BYTE_ADDR: + a_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_BYTE_ADDR; break; - } - case MSM_ACT_POLL: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } + case MSM_ACTUATOR_WORD_ADDR: + a_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; + break; + default: + pr_err("Unsupport addr type: %d\n", + settings[i].addr_type); break; } - } + + switch (settings[i].i2c_operation) { + case MSM_ACT_WRITE: + rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( + &a_ctrl->i2c_client, + settings[i].reg_addr, + settings[i].reg_data, + settings[i].data_type); + break; + case MSM_ACT_POLL: + rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( + &a_ctrl->i2c_client, + settings[i].reg_addr, + settings[i].reg_data, + settings[i].data_type); + break; + default: + pr_err("Unsupport i2c_operation: %d\n", + settings[i].i2c_operation); + break; if (0 != settings[i].delay) msleep(settings[i].delay); if (rc < 0) break; + } } a_ctrl->curr_step_pos = 0; + /* + * Recover register addr_type after the init + * settings are written. + */ + a_ctrl->i2c_client.addr_type = save_addr_type; CDBG("Exit\n"); return rc; } -static int32_t msm_actuator_vcm_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - uint16_t delay = 0; - uint16_t status_addr = 0; - uint16_t status_data = 0; - uint16_t status = 0; - uint16_t delay_count = 0; - uint16_t delay_count_limit = 0; - - CDBG("%s Enter, size %d\n", __func__, size); - - for (i = 0; i < size; i++) { - if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_DELAY) { - delay = settings[i].reg_data; - usleep_range(delay, delay + 1000); - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - } - else if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_READ_STATUS) { - /* reg_data[i] = limitation for delay count for read status */ - delay_count_limit = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - i++; - /*reg_addr[i+1] = addr for status register*/ - status_addr = settings[i].reg_addr; - /*reg_data[i+1] = value for stopping to read the status register*/ - status_data = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - delay_count = 0; - do { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, status_addr, &status, - MSM_CAMERA_I2C_BYTE_DATA); - CDBG("%s %d status %d\n", __func__, __LINE__,status); - if (rc < 0) { - CDBG("%s Failed I2C read Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(1000, 2000); - delay_count++; - if(delay_count >= delay_count_limit) break; - } while (status != status_data); - } - else { - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, settings[i].reg_addr, - settings[i].reg_data, MSM_CAMERA_I2C_BYTE_DATA); - if(rc < 0){ - pr_err("%s:%d I2C write failure size[%d] writen[%d]\n", - __func__, __LINE__, size, i); - break; - } - } - } - - CDBG("Exit\n"); - return 0; -} - static void msm_actuator_write_focus( struct msm_actuator_ctrl_t *a_ctrl, uint16_t curr_lens_pos, @@ -380,8 +251,17 @@ static int32_t msm_actuator_piezo_move_focus( return -EFAULT; } - if (num_steps == 0) - return rc; + if (num_steps <= 0 || num_steps > MAX_NUMBER_OF_STEPS) { + pr_err("num_steps out of range = %d\n", + num_steps); + return -EFAULT; + } + + if (dest_step_position > a_ctrl->total_steps) { + pr_err("Step pos greater than total steps = %d\n", + dest_step_position); + return -EFAULT; + } a_ctrl->i2c_tbl_index = 0; a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, @@ -392,7 +272,6 @@ static int32_t msm_actuator_piezo_move_focus( reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; reg_setting.data_type = a_ctrl->i2c_data_type; reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( &a_ctrl->i2c_client, ®_setting); if (rc < 0) { @@ -421,6 +300,11 @@ static int32_t msm_actuator_move_focus( int32_t num_steps = move_params->num_steps; struct msm_camera_i2c_reg_setting reg_setting; + if (a_ctrl->step_position_table == NULL) { + pr_err("Step Position Table is NULL"); + return -EFAULT; + } + if (copy_from_user(&ringing_params_kernel, &(move_params->ringing_params[a_ctrl->curr_region_index]), sizeof(struct damping_params_t))) { @@ -490,7 +374,6 @@ static int32_t msm_actuator_move_focus( reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; reg_setting.data_type = a_ctrl->i2c_data_type; reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( &a_ctrl->i2c_client, ®_setting); if (rc < 0) { @@ -503,25 +386,118 @@ static int32_t msm_actuator_move_focus( return rc; } -static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, + +static int32_t msm_actuator_park_lens(struct msm_actuator_ctrl_t *a_ctrl) +{ + int32_t rc = 0; + uint16_t next_lens_pos = 0; + struct msm_camera_i2c_reg_setting reg_setting; + + a_ctrl->i2c_tbl_index = 0; + if ((a_ctrl->curr_step_pos > a_ctrl->total_steps) || + (!a_ctrl->park_lens.max_step) || + (!a_ctrl->step_position_table) || + (!a_ctrl->i2c_reg_tbl) || + (!a_ctrl->func_tbl) || + (!a_ctrl->func_tbl->actuator_parse_i2c_params)) { + pr_err("%s:%d Failed to park lens.\n", + __func__, __LINE__); + return -EFAULT; + } + + if (a_ctrl->park_lens.max_step > a_ctrl->max_code_size) + a_ctrl->park_lens.max_step = a_ctrl->max_code_size; + + next_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; + while (next_lens_pos) { + /* conditions which help to reduce park lens time */ + if (next_lens_pos > (a_ctrl->park_lens.max_step * + PARK_LENS_LONG_STEP)) { + next_lens_pos = next_lens_pos - + (a_ctrl->park_lens.max_step * + PARK_LENS_LONG_STEP); + } else if (next_lens_pos > (a_ctrl->park_lens.max_step * + PARK_LENS_MID_STEP)) { + next_lens_pos = next_lens_pos - + (a_ctrl->park_lens.max_step * + PARK_LENS_MID_STEP); + } else if (next_lens_pos > (a_ctrl->park_lens.max_step * + PARK_LENS_SMALL_STEP)) { + next_lens_pos = next_lens_pos - + (a_ctrl->park_lens.max_step * + PARK_LENS_SMALL_STEP); + } else { + next_lens_pos = (next_lens_pos > + a_ctrl->park_lens.max_step) ? + (next_lens_pos - a_ctrl->park_lens. + max_step) : 0; + } + a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, + next_lens_pos, a_ctrl->park_lens.hw_params, + a_ctrl->park_lens.damping_delay); + + reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; + reg_setting.size = a_ctrl->i2c_tbl_index; + reg_setting.data_type = a_ctrl->i2c_data_type; + + rc = a_ctrl->i2c_client.i2c_func_tbl-> + i2c_write_table_w_microdelay( + &a_ctrl->i2c_client, ®_setting); + if (rc < 0) { + pr_err("%s Failed I2C write Line %d\n", + __func__, __LINE__); + return rc; + } + a_ctrl->i2c_tbl_index = 0; + /* Use typical damping time delay to avoid tick sound */ + usleep_range(10000, 12000); + } + + return 0; +} + +static int32_t msm_actuator_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, struct msm_actuator_set_info_t *set_info) { int16_t code_per_step = 0; + uint32_t qvalue = 0; int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; + uint16_t step_index = 0, region_index = 0; uint16_t step_boundary = 0; uint32_t max_code_size = 1; uint16_t data_size = set_info->actuator_params.data_size; CDBG("Enter\n"); + + /* validate the actuator state */ + if (a_ctrl->actuator_state != ACTUATOR_POWER_UP) { + pr_err("%s:%d invalid actuator_state %d\n" + , __func__, __LINE__, a_ctrl->actuator_state); + return -EINVAL; + } + for (; data_size > 0; data_size--) max_code_size *= 2; + + a_ctrl->max_code_size = max_code_size; + /* free the step_position_table to allocate a new one */ kfree(a_ctrl->step_position_table); + a_ctrl->step_position_table = NULL; + + if (set_info->af_tuning_params.total_steps + > MAX_ACTUATOR_AF_TOTAL_STEPS) { + pr_err("Max actuator totalsteps exceeded = %d\n", + set_info->af_tuning_params.total_steps); + return -EFAULT; + } + /* Fill step position table */ a_ctrl->step_position_table = - kmalloc(sizeof(uint16_t) * + kzalloc(sizeof(uint16_t) * (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); + if (a_ctrl->step_position_table == NULL) return -ENOMEM; + cur_code = set_info->af_tuning_params.initial_code; a_ctrl->step_position_table[step_index++] = cur_code; for (region_index = 0; @@ -529,20 +505,30 @@ static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ct region_index++) { code_per_step = a_ctrl->region_params[region_index].code_per_step; + qvalue = + a_ctrl->region_params[region_index].qvalue; step_boundary = a_ctrl->region_params[region_index]. step_bound[MOVE_NEAR]; - if (step_boundary > set_info->af_tuning_params.total_steps - 1) { - CDBG("%s: Error af steps mismatch!", __func__); - return -EFAULT; + if (step_boundary > + set_info->af_tuning_params.total_steps) { + pr_err("invalid step_boundary = %d, max_val = %d", + step_boundary, + set_info->af_tuning_params.total_steps); + kfree(a_ctrl->step_position_table); + a_ctrl->step_position_table = NULL; + return -EINVAL; } - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) + for (; step_index <= step_boundary; step_index++) { + if (qvalue > 1 && qvalue <= MAX_QVALUE) + cur_code = step_index * code_per_step / qvalue; + else + cur_code = step_index * code_per_step; + cur_code += set_info->af_tuning_params.initial_code; + if (cur_code < max_code_size) { a_ctrl->step_position_table[step_index] = cur_code; - else { + } else { for (; step_index < set_info->af_tuning_params.total_steps; step_index++) @@ -551,13 +537,9 @@ static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ct step_index] = max_code_size; } - } - } - for (step_index = 0; - step_index < set_info->af_tuning_params.total_steps; - step_index++) { - CDBG("step_position_table[%d] = %d", step_index, + CDBG("step_position_table [%d] %d\n", step_index, a_ctrl->step_position_table[step_index]); + } } CDBG("Exit\n"); return 0; @@ -581,6 +563,7 @@ static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, { int rc = 0, i, cnt; struct msm_actuator_vreg *vreg_cfg; + struct device *dev = NULL; vreg_cfg = &a_ctrl->vreg_cfg; cnt = vreg_cfg->num_vreg; @@ -592,17 +575,21 @@ static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, return -EINVAL; } + if (a_ctrl->act_device_type == MSM_CAMERA_I2C_DEVICE) + dev = &(a_ctrl->i2c_client.client->dev); + else if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) + dev = &(a_ctrl->pdev->dev); + + if (dev == NULL) { + pr_err("%s:a_ctrl device structure got corrupted\n", __func__); + return -EINVAL; + } + for (i = 0; i < cnt; i++) { - if (a_ctrl->pdev) - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - else - rc = msm_camera_config_single_vreg(&(a_ctrl->i2c_client.client->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); + rc = msm_camera_config_single_vreg(dev, + &vreg_cfg->cam_vreg[i], + (struct regulator **)&vreg_cfg->data[i], + config); } return rc; } @@ -612,10 +599,12 @@ static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) int32_t rc = 0; CDBG("Enter\n"); if (a_ctrl->actuator_state != ACTUATOR_POWER_DOWN) { - if (a_ctrl->vcm_enable) { - rc = gpio_direction_output(a_ctrl->vcm_pwd, 0); - if (!rc) - gpio_free(a_ctrl->vcm_pwd); + + if (a_ctrl->func_tbl && a_ctrl->func_tbl->actuator_park_lens) { + rc = a_ctrl->func_tbl->actuator_park_lens(a_ctrl); + if (rc < 0) + pr_err("%s:%d Lens park failed.\n", + __func__, __LINE__); } rc = msm_actuator_vreg_control(a_ctrl, 0); @@ -624,9 +613,11 @@ static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) return rc; } - kfree(a_ctrl->step_position_table); + if (a_ctrl->step_position_table != NULL) + kfree(a_ctrl->step_position_table); a_ctrl->step_position_table = NULL; - kfree(a_ctrl->i2c_reg_tbl); + if (a_ctrl->i2c_reg_tbl != NULL) + kfree(a_ctrl->i2c_reg_tbl); a_ctrl->i2c_reg_tbl = NULL; a_ctrl->i2c_tbl_index = 0; a_ctrl->actuator_state = ACTUATOR_POWER_DOWN; @@ -635,65 +626,47 @@ static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) return rc; } -static void msm_actuator_set_position_tbl( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t pos, uint16_t delay) -{ - uint16_t msb, lsb, reg_addr; - reg_addr = a_ctrl->reg_tbl[0].reg_addr; - CDBG("%s reg_addr = %d\n", __func__, reg_addr); - - msb = (pos>>8)&0x00ff; - lsb = pos&0x00ff; - - CDBG("%s pos=%d msb= 0x%X, lsb=0x%X\n", __func__, pos, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr+1; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - -} - -static int32_t msm_actuator_vcm_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) +static int32_t msm_actuator_set_position( + struct msm_actuator_ctrl_t *a_ctrl, + struct msm_actuator_set_position_t *set_pos) { + int32_t rc = 0; + int32_t index; + uint16_t next_lens_position; + uint16_t delay; + uint32_t hw_params = 0; + struct msm_camera_i2c_reg_setting reg_setting; + CDBG("%s Enter %d\n", __func__, __LINE__); + if (set_pos->number_of_steps <= 0 || + set_pos->number_of_steps > MAX_NUMBER_OF_STEPS) { + pr_err("num_steps out of range = %d\n", + set_pos->number_of_steps); + return -EFAULT; + } - int32_t rc = 0; - int32_t index; - uint16_t pos, delay; - struct msm_camera_i2c_reg_setting reg_setting; - - CDBG("%s Enter : steps = %d\n", __func__, set_pos->number_of_steps); - - if (set_pos->number_of_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - - for (index = 0; index < set_pos->number_of_steps; index++) { - pos = a_ctrl->step_position_table[set_pos->pos[index]]; - delay = set_pos->delay[index]; - msm_actuator_set_position_tbl(a_ctrl, pos, delay); - } + a_ctrl->i2c_tbl_index = 0; + for (index = 0; index < set_pos->number_of_steps; index++) { + next_lens_position = set_pos->pos[index]; + delay = set_pos->delay[index]; + a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, + next_lens_position, hw_params, delay); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } + reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; + reg_setting.size = a_ctrl->i2c_tbl_index; + reg_setting.data_type = a_ctrl->i2c_data_type; - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; + rc = a_ctrl->i2c_client.i2c_func_tbl-> + i2c_write_table_w_microdelay( + &a_ctrl->i2c_client, ®_setting); + if (rc < 0) { + pr_err("%s Failed I2C write Line %d\n", + __func__, __LINE__); + return rc; + } + a_ctrl->i2c_tbl_index = 0; + } + CDBG("%s exit %d\n", __func__, __LINE__); + return rc; } static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, @@ -713,7 +686,7 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, } if (rc < 0) { - pr_err("Actuator function table not found : act_type = %d\n", set_info->actuator_params.act_type); + pr_err("Actuator function table not found\n"); return rc; } if (set_info->af_tuning_params.total_steps @@ -760,13 +733,16 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, return -EFAULT; } - kfree(a_ctrl->i2c_reg_tbl); + if ((a_ctrl->actuator_state == ACTUATOR_POWER_UP) && + (a_ctrl->i2c_reg_tbl != NULL)) { + kfree(a_ctrl->i2c_reg_tbl); + } a_ctrl->i2c_reg_tbl = NULL; a_ctrl->i2c_reg_tbl = - kmalloc(sizeof(struct msm_camera_i2c_reg_array) * + kzalloc(sizeof(struct msm_camera_i2c_reg_array) * (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); if (!a_ctrl->i2c_reg_tbl) { - pr_err("kmalloc fail\n"); + pr_err("kzalloc fail\n"); return -ENOMEM; } @@ -781,9 +757,9 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, if (set_info->actuator_params.init_setting_size && set_info->actuator_params.init_setting_size - <= MAX_ACTUATOR_REG_TBL_SIZE) { + <= MAX_ACTUATOR_INIT_SET) { if (a_ctrl->func_tbl->actuator_init_focus) { - init_settings = kmalloc(sizeof(struct reg_settings_t) * + init_settings = kzalloc(sizeof(struct reg_settings_t) * (set_info->actuator_params.init_setting_size), GFP_KERNEL); if (init_settings == NULL) { @@ -806,6 +782,7 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, set_info->actuator_params.init_setting_size, init_settings); kfree(init_settings); + init_settings = NULL; if (rc < 0) { kfree(a_ctrl->i2c_reg_tbl); a_ctrl->i2c_reg_tbl = NULL; @@ -815,6 +792,8 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, } } + /* Park lens data */ + a_ctrl->park_lens = set_info->actuator_params.park_lens; a_ctrl->initial_code = set_info->af_tuning_params.initial_code; if (a_ctrl->func_tbl->actuator_init_step_table) rc = a_ctrl->func_tbl-> @@ -822,146 +801,11 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, a_ctrl->curr_step_pos = 0; a_ctrl->curr_region_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_UP; CDBG("Exit\n"); return rc; } -static int32_t msm_actuator_vcm_sw_landing( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params, int sw_landing_type) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - struct damping_params_t *damping_params; - struct damping_params_t damping_params_k; - struct damping_params_t damping_params_sacoff; - - int16_t pos_index, First_damping_lens_pos, Second_damping_lens_pos, damp_delay, damp_step, lens_pos; - - if(a_ctrl == NULL || a_ctrl->step_position_table == NULL || move_params == NULL || move_params->ringing_params == NULL) - { - pr_err("%s %d NULL Pointer\n", __func__, __LINE__); - return 0; - } - - CDBG("%s Enter %d\n", __func__, __LINE__); - /*get first and second damping position, damp delay and step*/ - if (copy_from_user(&damping_params_k,&move_params->ringing_params[2],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - if (copy_from_user(&damping_params_sacoff,&move_params->ringing_params[3],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - damping_params = &damping_params_k; - damp_delay = damping_params->damping_delay; - damp_step = damping_params->damping_step; - pos_index = (damping_params->hw_params&0xffff); // low 4byte : ker index, high 4byte : dac - - if (pos_index > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", pos_index); - return -EFAULT; - } - - if (sw_landing_type == MSM_ACTUATOR_MULTI_TASKING_SW_LANDING) { - First_damping_lens_pos = LENS_POSITION_CENTER_10BIT; - Second_damping_lens_pos = LENS_POSITION_BOTTOM_10BIT; - } else { - First_damping_lens_pos = a_ctrl->step_position_table[pos_index];// - Second_damping_lens_pos = (First_damping_lens_pos>>2) ; // for old version - } - - CDBG("%s %d First damping index =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - CDBG("%s %d damp_delay=%d, damp_step=%d\n", __func__, __LINE__, damp_delay, damp_step); - /*set the starting lens pos to first damping lens pos*/ - lens_pos = First_damping_lens_pos;// - CDBG("%s %d curr_lens_pos=%d\n", __func__, __LINE__, lens_pos); - - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - - // 1. Go to pan_focus// - if(damping_params_sacoff.damping_step & 0x1 ) - { - Second_damping_lens_pos = ((damping_params->hw_params>>16)&0xffff); // default 0, dac value - if (Second_damping_lens_pos < 0) - Second_damping_lens_pos = 0; - CDBG("%s %d First damping index new =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - a_ctrl->i2c_tbl_index = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - CDBG("%s %d i2c_tbl_index %d\n", __func__, __LINE__, a_ctrl->i2c_tbl_index); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - //reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s %d Go to pan_focus, lens_pos=%d\n", __func__, __LINE__, lens_pos); - } - - // 2. SAC mode off// - if(damping_params_sacoff.damping_step & 0x02 ) - { - - uint16_t addr, data ; - addr = ((damping_params_sacoff.hw_params>>16)&0xffff); // 0x02 - data = ((damping_params_sacoff.hw_params)&0xffff); // 0x00 - usleep_range(damping_params_sacoff.damping_delay , damping_params_sacoff.damping_delay+1000); //10 msec - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr,data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s SAC mode off delay=%d, addr=0x%x, data =0x%x \n", __func__, damping_params_sacoff.damping_delay, addr, data); - } - - // 3. Start SW landing// - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - a_ctrl->i2c_tbl_index = 0; - do{ - if(lens_pos < Second_damping_lens_pos + damp_step) break; - else{ - lens_pos -= damp_step; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - } - }while(lens_pos > Second_damping_lens_pos); - - /*set final position*/ - CDBG("%s %d set the final position in the table\n", __func__, __LINE__); - lens_pos = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - return rc; -} - static int msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl) { int rc = 0; @@ -985,11 +829,7 @@ static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, { struct msm_actuator_cfg_data *cdata = (struct msm_actuator_cfg_data *)argp; - int32_t rc = 0; - - if (!a_ctrl) - return -1; - + int32_t rc = -EINVAL; mutex_lock(a_ctrl->actuator_mutex); CDBG("Enter\n"); CDBG("%s type %d\n", __func__, cdata->cfgtype); @@ -1002,6 +842,7 @@ static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, case CFG_GET_ACTUATOR_INFO: cdata->is_af_supported = 1; cdata->cfg.cam_name = a_ctrl->cam_name; + rc = 0; break; case CFG_SET_ACTUATOR_INFO: @@ -1011,46 +852,41 @@ static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, break; case CFG_SET_DEFAULT_FOCUS: - rc = a_ctrl->func_tbl->actuator_set_default_focus(a_ctrl, - &cdata->cfg.move); + if (a_ctrl->func_tbl && + a_ctrl->func_tbl->actuator_set_default_focus) + rc = a_ctrl->func_tbl->actuator_set_default_focus( + a_ctrl, &cdata->cfg.move); if (rc < 0) pr_err("move focus failed %d\n", rc); break; case CFG_MOVE_FOCUS: - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, - &cdata->cfg.move); + if (a_ctrl->func_tbl && + a_ctrl->func_tbl->actuator_move_focus) + rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, + &cdata->cfg.move); if (rc < 0) pr_err("move focus failed %d\n", rc); break; case CFG_ACTUATOR_POWERDOWN: -#if !defined(CONFIG_OIS) rc = msm_actuator_power_down(a_ctrl); if (rc < 0) pr_err("msm_actuator_power_down failed %d\n", rc); -#endif break; case CFG_SET_POSITION: - rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl, - &cdata->cfg.setpos); + if (a_ctrl->func_tbl && + a_ctrl->func_tbl->actuator_set_position) + rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl, + &cdata->cfg.setpos); if (rc < 0) pr_err("actuator_set_position failed %d\n", rc); break; - case CFG_SET_ACTUATOR_SW_LANDING: - if (a_ctrl && a_ctrl->func_tbl && a_ctrl->func_tbl->actuator_sw_landing) { - rc = a_ctrl->func_tbl->actuator_sw_landing(a_ctrl, &cdata->cfg.move, cdata->sw_landing_type); - if (rc < 0) - pr_err("actuator_sw_landing failed %d\n", rc); - } - case CFG_ACTUATOR_POWERUP: -#if !defined(CONFIG_OIS) rc = msm_actuator_power_up(a_ctrl); if (rc < 0) pr_err("Failed actuator power up%d\n", rc); -#endif break; default: @@ -1108,7 +944,8 @@ static int msm_actuator_close(struct v4l2_subdev *sd, int rc = 0; struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); CDBG("Enter\n"); - if (!a_ctrl) { + if (!a_ctrl || !a_ctrl->i2c_client.i2c_func_tbl) { + /* check to make sure that init happens before release */ pr_err("failed\n"); return -EINVAL; } @@ -1135,41 +972,184 @@ static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd, struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); void __user *argp = (void __user *)arg; CDBG("Enter\n"); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); + CDBG("%s:%d a_ctrl %p argp %p\n", __func__, __LINE__, a_ctrl, argp); switch (cmd) { case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: return msm_actuator_get_subdev_id(a_ctrl, argp); case VIDIOC_MSM_ACTUATOR_CFG: return msm_actuator_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_actuator_close(sd, NULL); + case MSM_SD_NOTIFY_FREEZE: return 0; + case MSM_SD_SHUTDOWN: + if (!a_ctrl->i2c_client.i2c_func_tbl) { + pr_err("a_ctrl->i2c_client.i2c_func_tbl NULL\n"); + return -EINVAL; + } else { + return msm_actuator_close(sd, NULL); + } default: return -ENOIOCTLCMD; } } +#ifdef CONFIG_COMPAT +static long msm_actuator_subdev_do_ioctl( + struct file *file, unsigned int cmd, void *arg) +{ + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + struct msm_actuator_cfg_data32 *u32 = + (struct msm_actuator_cfg_data32 *)arg; + struct msm_actuator_cfg_data actuator_data; + void *parg = arg; + long rc; + + switch (cmd) { + case VIDIOC_MSM_ACTUATOR_CFG32: + cmd = VIDIOC_MSM_ACTUATOR_CFG; + switch (u32->cfgtype) { + case CFG_SET_ACTUATOR_INFO: + actuator_data.cfgtype = u32->cfgtype; + actuator_data.is_af_supported = u32->is_af_supported; + actuator_data.cfg.set_info.actuator_params.act_type = + u32->cfg.set_info.actuator_params.act_type; + + actuator_data.cfg.set_info.actuator_params + .reg_tbl_size = + u32->cfg.set_info.actuator_params.reg_tbl_size; + + actuator_data.cfg.set_info.actuator_params.data_size = + u32->cfg.set_info.actuator_params.data_size; + + actuator_data.cfg.set_info.actuator_params + .init_setting_size = + u32->cfg.set_info.actuator_params + .init_setting_size; + + actuator_data.cfg.set_info.actuator_params.i2c_addr = + u32->cfg.set_info.actuator_params.i2c_addr; + + actuator_data.cfg.set_info.actuator_params + .i2c_addr_type = + u32->cfg.set_info.actuator_params.i2c_addr_type; + + actuator_data.cfg.set_info.actuator_params + .i2c_data_type = + u32->cfg.set_info.actuator_params.i2c_data_type; + + actuator_data.cfg.set_info.actuator_params + .reg_tbl_params = + compat_ptr( + u32->cfg.set_info.actuator_params + .reg_tbl_params); + + actuator_data.cfg.set_info.actuator_params + .init_settings = + compat_ptr( + u32->cfg.set_info.actuator_params + .init_settings); + + actuator_data.cfg.set_info.af_tuning_params + .initial_code = + u32->cfg.set_info.af_tuning_params.initial_code; + + actuator_data.cfg.set_info.af_tuning_params.pwd_step = + u32->cfg.set_info.af_tuning_params.pwd_step; + + actuator_data.cfg.set_info.af_tuning_params + .region_size = + u32->cfg.set_info.af_tuning_params.region_size; + + actuator_data.cfg.set_info.af_tuning_params + .total_steps = + u32->cfg.set_info.af_tuning_params.total_steps; + + actuator_data.cfg.set_info.af_tuning_params + .region_params = compat_ptr( + u32->cfg.set_info.af_tuning_params + .region_params); + + actuator_data.cfg.set_info.actuator_params.park_lens = + u32->cfg.set_info.actuator_params.park_lens; + + parg = &actuator_data; + break; + case CFG_SET_DEFAULT_FOCUS: + case CFG_MOVE_FOCUS: + actuator_data.cfgtype = u32->cfgtype; + actuator_data.is_af_supported = u32->is_af_supported; + actuator_data.cfg.move.dir = u32->cfg.move.dir; + + actuator_data.cfg.move.sign_dir = + u32->cfg.move.sign_dir; + + actuator_data.cfg.move.dest_step_pos = + u32->cfg.move.dest_step_pos; + + actuator_data.cfg.move.num_steps = + u32->cfg.move.num_steps; + + actuator_data.cfg.move.curr_lens_pos = + u32->cfg.move.curr_lens_pos; + + actuator_data.cfg.move.ringing_params = + compat_ptr(u32->cfg.move.ringing_params); + parg = &actuator_data; + break; + case CFG_SET_POSITION: + actuator_data.cfgtype = u32->cfgtype; + actuator_data.is_af_supported = u32->is_af_supported; + memcpy(&actuator_data.cfg.setpos, &(u32->cfg.setpos), + sizeof(struct msm_actuator_set_position_t)); + break; + default: + actuator_data.cfgtype = u32->cfgtype; + parg = &actuator_data; + break; + } + } + + rc = msm_actuator_subdev_ioctl(sd, cmd, parg); + + switch (cmd) { + + case VIDIOC_MSM_ACTUATOR_CFG: + + switch (u32->cfgtype) { + + case CFG_SET_DEFAULT_FOCUS: + case CFG_MOVE_FOCUS: + u32->cfg.move.curr_lens_pos = + actuator_data.cfg.move.curr_lens_pos; + break; + default: + break; + } + } + + return rc; +} + +static long msm_actuator_subdev_fops_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return video_usercopy(file, cmd, arg, msm_actuator_subdev_do_ioctl); +} +#endif + static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl) { int rc = 0; CDBG("%s called\n", __func__); - CDBG("vcm info: %d %d\n", a_ctrl->vcm_pwd, - a_ctrl->vcm_enable); - rc = msm_actuator_vreg_control(a_ctrl, 1); if (rc < 0) { pr_err("%s failed %d\n", __func__, __LINE__); return rc; } - if (a_ctrl->vcm_enable) { - rc = gpio_request(a_ctrl->vcm_pwd, "msm_actuator"); - if (!rc) { - CDBG("Enable VCM PWD\n"); - gpio_direction_output(a_ctrl->vcm_pwd, 1); - } - } + a_ctrl->actuator_state = ACTUATOR_POWER_UP; + CDBG("Exit\n"); return rc; } @@ -1208,12 +1188,12 @@ static int32_t msm_actuator_i2c_probe(struct i2c_client *client, { int rc = 0; struct msm_actuator_ctrl_t *act_ctrl_t = NULL; - pr_err("msm_actuator_i2c_probe: Enter\n"); + struct msm_actuator_vreg *vreg_cfg = NULL; + CDBG("Enter\n"); if (client == NULL) { pr_err("msm_actuator_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; + return -EINVAL; } act_ctrl_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), @@ -1225,55 +1205,46 @@ static int32_t msm_actuator_i2c_probe(struct i2c_client *client, if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { pr_err("i2c_check_functionality failed\n"); - kfree(act_ctrl_t); goto probe_failure; } - CDBG("client = 0x%pK\n", client); + CDBG("client = 0x%p\n", client); rc = of_property_read_u32(client->dev.of_node, "cell-index", &act_ctrl_t->subdev_id); CDBG("cell-index %d, rc %d\n", act_ctrl_t->subdev_id, rc); if (rc < 0) { pr_err("failed rc %d\n", rc); - kfree(act_ctrl_t); - return rc; + goto probe_failure; + } + + if (of_find_property(client->dev.of_node, + "qcom,cam-vreg-name", NULL)) { + vreg_cfg = &act_ctrl_t->vreg_cfg; + rc = msm_camera_get_dt_vreg_data(client->dev.of_node, + &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); + if (rc < 0) { + pr_err("failed rc %d\n", rc); + goto probe_failure; + } } act_ctrl_t->i2c_driver = &msm_actuator_i2c_driver; act_ctrl_t->i2c_client.client = client; act_ctrl_t->curr_step_pos = 0, act_ctrl_t->curr_region_index = 0, + act_ctrl_t->actuator_state = ACTUATOR_POWER_DOWN; /* Set device type as I2C */ act_ctrl_t->act_device_type = MSM_CAMERA_I2C_DEVICE; act_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; act_ctrl_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; act_ctrl_t->actuator_mutex = &msm_actuator_mutex; - act_ctrl_t->cam_name = act_ctrl_t->subdev_id; CDBG("act_ctrl_t->cam_name: %d", act_ctrl_t->cam_name); /* Assign name for sub device */ snprintf(act_ctrl_t->msm_sd.sd.name, sizeof(act_ctrl_t->msm_sd.sd.name), "%s", act_ctrl_t->i2c_driver->driver.name); - -#if defined(CONFIG_OIS) - if (of_find_property(client->dev.of_node, - "qcom,cam-vreg-name", NULL)) { - - struct msm_actuator_vreg *vreg_cfg; - - vreg_cfg = &act_ctrl_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data(client->dev.of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(act_ctrl_t); - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - return rc; - } - } -#endif - /* Initialize sub device */ v4l2_i2c_subdev_init(&act_ctrl_t->msm_sd.sd, act_ctrl_t->i2c_client.client, @@ -1286,15 +1257,23 @@ static int32_t msm_actuator_i2c_probe(struct i2c_client *client, act_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; act_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; msm_sd_register(&act_ctrl_t->msm_sd); + msm_actuator_v4l2_subdev_fops = v4l2_subdev_fops; -#if defined(CONFIG_OIS) - g_msm_actuator_t = act_ctrl_t; +#ifdef CONFIG_COMPAT + msm_actuator_v4l2_subdev_fops.compat_ioctl32 = + msm_actuator_subdev_fops_ioctl; #endif + act_ctrl_t->msm_sd.sd.devnode->fops = + &msm_actuator_v4l2_subdev_fops; + act_ctrl_t->actuator_state = ACTUATOR_POWER_DOWN; pr_info("msm_actuator_i2c_probe: succeeded\n"); - pr_err("msm_actuator_i2c_probe: Exit\n"); + CDBG("Exit\n"); + + return 0; probe_failure: + kfree(act_ctrl_t); return rc; } @@ -1304,7 +1283,7 @@ static int32_t msm_actuator_platform_probe(struct platform_device *pdev) struct msm_camera_cci_client *cci_client = NULL; struct msm_actuator_ctrl_t *msm_actuator_t = NULL; struct msm_actuator_vreg *vreg_cfg; - pr_err("msm_actuator_platform_probe: Enter\n"); + CDBG("Enter\n"); if (!pdev->dev.of_node) { pr_err("of_node NULL\n"); @@ -1380,277 +1359,19 @@ static int32_t msm_actuator_platform_probe(struct platform_device *pdev) msm_actuator_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; msm_actuator_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; msm_sd_register(&msm_actuator_t->msm_sd); - -#if defined(CONFIG_OIS) - g_msm_actuator_t = msm_actuator_t; -#endif - pr_err("msm_actuator_platform_probe: Exit\n"); - return rc; -} - -static int32_t msm_actuator_hall_effect_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - uint16_t wait_time = 0; - int32_t dest_step_position = move_params->dest_step_pos; - struct damping_params_t *damping_params = - &move_params->ringing_params[0]; - - uint16_t curr_lens_pos; - int16_t target_lens_pos; - uint8_t lsb; - uint8_t msb; - CDBG("%s Enter %d\n", __func__, __LINE__); - wait_time = damping_params->damping_delay; - - /* NULL CHECK */ - if (a_ctrl->step_position_table == NULL ) { - pr_err("[%s::%d] NULL pointer check fail !\n", - __func__, __LINE__); - return -EFAULT; - } - curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; - target_lens_pos = a_ctrl->step_position_table[dest_step_position]; - - CDBG("%s curr_lens_pos=%d dest_lens_pos=%d\n", __func__, - curr_lens_pos, target_lens_pos); - CDBG("%s curr_step_pos=%d dest_step_position=%d\n", __func__, - a_ctrl->curr_step_pos, dest_step_position); - - if (curr_lens_pos != target_lens_pos) { - msb = ((target_lens_pos << 7) & 0x80); - lsb = target_lens_pos >> 1; - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x00, lsb, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, - __LINE__); - return rc; - } - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x01, msb, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(wait_time, wait_time + 1000); - } - - a_ctrl->curr_step_pos = dest_step_position; - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_hall_effect_init_focus( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, - struct reg_settings_t *settings) -{ - int32_t rc = 0; - - CDBG("%s [QTI] Enter %d\n", __func__, __LINE__); - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - #if 0 //////////////////////////////////////////////////////////////////////// - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x08, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x01, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - msleep(200); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x03, 0x04, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - msleep(50); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - #endif ///////////////////////////////////////////////////////////////////// - - CDBG("%s exit Line %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_hall_effect_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) -{ - int32_t rc = 0; - int32_t index; -#ifdef CHECK_MERGE - uint16_t next_lens_position; - uint16_t delay; - uint32_t hw_params = 0; + msm_actuator_t->actuator_state = ACTUATOR_POWER_DOWN; + msm_actuator_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_actuator_v4l2_subdev_fops.compat_ioctl32 = + msm_actuator_subdev_fops_ioctl; #endif - uint8_t lsb, msb; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("%s Enter : steps = %d \n", __func__, set_pos->number_of_steps); - if (set_pos->number_of_steps == 0) - return rc; + msm_actuator_t->msm_sd.sd.devnode->fops = + &msm_actuator_v4l2_subdev_fops; - /* NULL CHECK */ - if (a_ctrl->i2c_reg_tbl == NULL ) { - pr_err("[%s::%d] NULL pointer check fail !\n", __func__, __LINE__); - return -EFAULT; - } - - a_ctrl->i2c_tbl_index = 0; -#ifdef CHECK_MERGE - for (index = 0; index < set_pos->number_of_steps; index++) { - next_lens_position = set_pos->pos[index]; - delay = set_pos->delay[index]; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - next_lens_position, hw_params, delay); - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.data_type = a_ctrl->i2c_data_type; - - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", - __func__, __LINE__); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - } -#endif - - for (index = 0; index < set_pos->number_of_steps; index++) { - msb = ((set_pos->pos[index] << 7) & 0x80); - lsb = set_pos->pos[index] >> 1; - CDBG("%s index=%d msb= 0x%X, lsb=0x%X\n", __func__, index, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = 0x00; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = 0x01; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = set_pos->delay[index]; - a_ctrl->i2c_tbl_index++; - } - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.data_type = a_ctrl->i2c_data_type; - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - CDBG("%s exit %d\n", __func__, __LINE__); + CDBG("Exit\n"); return rc; } - -static int32_t msm_actuator_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) -{ - int16_t code_per_step = 0; - int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; - uint16_t step_boundary = 0; - uint32_t max_code_size = 1; - uint16_t data_size = set_info->actuator_params.data_size; - CDBG("Enter\n"); - - for (; data_size > 0; data_size--) - max_code_size *= 2; - - if (a_ctrl->step_position_table) { - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - } - - if (set_info->af_tuning_params.total_steps - > MAX_ACTUATOR_AF_TOTAL_STEPS) { - pr_err("[%s::%d] Max actuator totalsteps exceeded = %d\n", - __func__, __LINE__, set_info->af_tuning_params.total_steps); - return -EFAULT; - } - /* Fill step position table */ - a_ctrl->step_position_table = - kmalloc(sizeof(uint16_t) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (a_ctrl->step_position_table == NULL) { - pr_err("[%s::%d] mem alloc fail !\n", __func__, __LINE__); - return -ENOMEM; - } - - cur_code = set_info->af_tuning_params.initial_code; - a_ctrl->step_position_table[step_index++] = cur_code; - for (region_index = 0; - region_index < a_ctrl->region_size; - region_index++) { - code_per_step = - a_ctrl->region_params[region_index].code_per_step; - step_boundary = - a_ctrl->region_params[region_index]. - step_bound[MOVE_NEAR]; - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) - a_ctrl->step_position_table[step_index] = - cur_code; - else { - for (; step_index < - set_info->af_tuning_params.total_steps; - step_index++) - a_ctrl-> - step_position_table[ - step_index] = - max_code_size; - } - } - } - CDBG("Exit\n"); - return 0; -} - static const struct of_device_id msm_actuator_i2c_dt_match[] = { {.compatible = "qcom,actuator"}, {} @@ -1687,26 +1408,27 @@ static struct platform_driver msm_actuator_platform_driver = { static int __init msm_actuator_init_module(void) { int32_t rc = 0; - pr_err("msm_actuator_init_module: Enter\n"); + CDBG("Enter\n"); rc = platform_driver_probe(&msm_actuator_platform_driver, msm_actuator_platform_probe); if (!rc) return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); + + CDBG("%s:%d rc %d\n", __func__, __LINE__, rc); return i2c_add_driver(&msm_actuator_i2c_driver); } static struct msm_actuator msm_vcm_actuator_table = { .act_type = ACTUATOR_VCM, .func_tbl = { - .actuator_init_step_table = msm_actuator_vcm_init_step_table, + .actuator_init_step_table = msm_actuator_init_step_table, .actuator_move_focus = msm_actuator_move_focus, .actuator_write_focus = msm_actuator_write_focus, .actuator_set_default_focus = msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_vcm_init_focus, + .actuator_init_focus = msm_actuator_init_focus, .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_vcm_set_position, - .actuator_sw_landing = msm_actuator_vcm_sw_landing, + .actuator_set_position = msm_actuator_set_position, + .actuator_park_lens = msm_actuator_park_lens, }, }; @@ -1720,21 +1442,22 @@ static struct msm_actuator msm_piezo_actuator_table = { msm_actuator_piezo_set_default_focus, .actuator_init_focus = msm_actuator_init_focus, .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, + .actuator_park_lens = NULL, }, }; -static struct msm_actuator msm_hall_effect_actuator_table = { - .act_type = ACTUATOR_HALL_EFFECT, - .func_tbl = { - .actuator_init_step_table = msm_actuator_init_step_table, - .actuator_move_focus = msm_actuator_hall_effect_move_focus, - .actuator_write_focus = NULL, - .actuator_set_default_focus = - msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_hall_effect_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_hall_effect_set_position, - }, +static struct msm_actuator msm_hvcm_actuator_table = { + .act_type = ACTUATOR_HVCM, + .func_tbl = { + .actuator_init_step_table = msm_actuator_init_step_table, + .actuator_move_focus = msm_actuator_move_focus, + .actuator_write_focus = msm_actuator_write_focus, + .actuator_set_default_focus = msm_actuator_set_default_focus, + .actuator_init_focus = msm_actuator_init_focus, + .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, + .actuator_set_position = msm_actuator_set_position, + .actuator_park_lens = msm_actuator_park_lens, + }, }; module_init(msm_actuator_init_module); diff --git a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.h b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.h index 35f096619a29..b978eccb5c72 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.h +++ b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -30,8 +30,8 @@ struct msm_actuator_ctrl_t; enum msm_actuator_state_t { - ACTUATOR_POWER_UP, ACTUATOR_POWER_DOWN, + ACTUATOR_POWER_UP, }; struct msm_actuator_func_tbl { @@ -42,9 +42,9 @@ struct msm_actuator_func_tbl { struct msm_actuator_set_info_t *); int32_t (*actuator_init_focus)(struct msm_actuator_ctrl_t *, uint16_t, struct reg_settings_t *); - int32_t (*actuator_set_default_focus) (struct msm_actuator_ctrl_t *, + int32_t (*actuator_set_default_focus)(struct msm_actuator_ctrl_t *, struct msm_actuator_move_params_t *); - int32_t (*actuator_move_focus) (struct msm_actuator_ctrl_t *, + int32_t (*actuator_move_focus)(struct msm_actuator_ctrl_t *, struct msm_actuator_move_params_t *); void (*actuator_parse_i2c_params)(struct msm_actuator_ctrl_t *, int16_t, uint32_t, uint16_t); @@ -55,8 +55,7 @@ struct msm_actuator_func_tbl { int16_t); int32_t (*actuator_set_position)(struct msm_actuator_ctrl_t *, struct msm_actuator_set_position_t *); - int32_t (*actuator_sw_landing)(struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *, int); + int32_t (*actuator_park_lens)(struct msm_actuator_ctrl_t *); }; struct msm_actuator { @@ -92,8 +91,6 @@ struct msm_actuator_ctrl_t { struct msm_actuator_reg_params_t reg_tbl[MAX_ACTUATOR_REG_TBL_SIZE]; uint16_t region_size; void *user_data; - uint32_t vcm_pwd; - uint32_t vcm_enable; uint32_t total_steps; uint16_t pwd_step; uint16_t initial_code; @@ -103,6 +100,8 @@ struct msm_actuator_ctrl_t { uint32_t subdev_id; enum msm_actuator_state_t actuator_state; struct msm_actuator_vreg vreg_cfg; + struct park_lens_data_t park_lens; + uint32_t max_code_size; }; #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c b/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c index c6ced96e3d4a..dc8e0138f990 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c +++ b/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c @@ -26,8 +26,8 @@ #define V4L2_IDENT_CCI 50005 #define CCI_I2C_QUEUE_0_SIZE 64 #define CCI_I2C_QUEUE_1_SIZE 16 -#define CYCLES_PER_MICRO_SEC 4915 -#define CCI_MAX_DELAY 10000 +#define CYCLES_PER_MICRO_SEC_DEFAULT 4915 +#define CCI_MAX_DELAY 1000000 #define CCI_TIMEOUT msecs_to_jiffies(100) @@ -35,32 +35,33 @@ #define MSM_CCI_DRV_NAME "msm_cci" #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG #define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do {} while (0) -#endif /* Max bytes that can be read per CCI read transaction */ #define CCI_READ_MAX 12 #define CCI_I2C_READ_MAX_RETRIES 3 #define CCI_I2C_MAX_READ 8192 #define CCI_I2C_MAX_WRITE 8192 -#define CCI_NUM_CLK_MAX 16 static struct v4l2_subdev *g_cci_subdev; static struct msm_cam_clk_info cci_clk_info[CCI_NUM_CLK_MAX]; -static void msm_cci_set_clk_param(struct cci_device *cci_dev, +static int32_t msm_cci_set_clk_param(struct cci_device *cci_dev, struct msm_camera_cci_ctrl *c_ctrl) { struct msm_cci_clk_params_t *clk_params = NULL; enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; enum i2c_freq_mode_t i2c_freq_mode = c_ctrl->cci_info->i2c_freq_mode; + int32_t rc = 0; + if ((i2c_freq_mode >= I2C_MAX_MODES) || (i2c_freq_mode < 0)) { + pr_err("%s:%d Invalid i2c_freq_mode =%d\n", + __func__, __LINE__, i2c_freq_mode); + return -EINVAL; + } if (cci_dev->master_clk_init[master]) - return; + return rc; clk_params = &cci_dev->cci_clk_params[i2c_freq_mode]; if (MASTER_0 == master) { @@ -95,7 +96,7 @@ static void msm_cci_set_clk_param(struct cci_device *cci_dev, cci_dev->base + CCI_I2C_M1_MISC_CTL_ADDR); } cci_dev->master_clk_init[master] = 1; - return; + return rc; } static void msm_cci_flush_queue(struct cci_device *cci_dev, @@ -104,7 +105,7 @@ static void msm_cci_flush_queue(struct cci_device *cci_dev, int32_t rc = 0; msm_camera_io_w_mb(1 << master, cci_dev->base + CCI_HALT_REQ_ADDR); - rc = wait_for_completion_interruptible_timeout( + rc = wait_for_completion_timeout( &cci_dev->cci_master_info[master].reset_complete, CCI_TIMEOUT); if (rc < 0) { pr_err("%s:%d wait failed\n", __func__, __LINE__); @@ -123,7 +124,7 @@ static void msm_cci_flush_queue(struct cci_device *cci_dev, cci_dev->base + CCI_RESET_CMD_ADDR); /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( + rc = wait_for_completion_timeout( &cci_dev->cci_master_info[master].reset_complete, CCI_TIMEOUT); if (rc <= 0) @@ -163,12 +164,12 @@ static int32_t msm_cci_validate_queue(struct cci_device *cci_dev, CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); msm_camera_io_w_mb(reg_val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s line %d wait_for_completion_interruptible\n", + CDBG("%s line %d wait_for_completion_timeout\n", __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> + rc = wait_for_completion_timeout(&cci_dev-> cci_master_info[master].reset_complete, CCI_TIMEOUT); if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", + pr_err("%s: wait_for_completion_timeout %d\n", __func__, __LINE__); if (rc == 0) rc = -ETIMEDOUT; @@ -183,7 +184,7 @@ static int32_t msm_cci_validate_queue(struct cci_device *cci_dev, } static int32_t msm_cci_data_queue(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl, enum cci_i2c_queue_t queue, uint8_t is_burst) + struct msm_camera_cci_ctrl *c_ctrl, enum cci_i2c_queue_t queue) { uint16_t i = 0, j = 0, k = 0, h = 0, len = 0; int32_t rc = 0; @@ -224,9 +225,8 @@ static int32_t msm_cci_data_queue(struct cci_device *cci_dev, cmd_size, i2c_cmd->reg_addr, i2c_cmd->reg_data); delay = i2c_cmd->delay; data[i++] = CCI_I2C_WRITE_CMD; - if (i2c_cmd->reg_addr) { + if (i2c_cmd->reg_addr) reg_addr = i2c_cmd->reg_addr; - } /* either byte or word addr */ if (i2c_msg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) data[i++] = reg_addr; @@ -236,19 +236,16 @@ static int32_t msm_cci_data_queue(struct cci_device *cci_dev, } /* max of 10 data bytes */ do { - if ((i2c_msg->data_type == MSM_CAMERA_I2C_BYTE_DATA) || - (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA)) { + if (i2c_msg->data_type == MSM_CAMERA_I2C_BYTE_DATA) { data[i++] = i2c_cmd->reg_data; - if (!is_burst) - reg_addr++; + reg_addr++; } else { if ((i + 1) <= 10) { data[i++] = (i2c_cmd->reg_data & 0xFF00) >> 8; /* MSB */ data[i++] = i2c_cmd->reg_data & 0x00FF; /* LSB */ - if (!is_burst) - reg_addr += 2; + reg_addr += 2; } else break; } @@ -272,7 +269,7 @@ static int32_t msm_cci_data_queue(struct cci_device *cci_dev, master * 0x200 + queue * 0x100); } if ((delay > 0) && (delay < CCI_MAX_DELAY)) { - cmd = (uint32_t)((delay * CYCLES_PER_MICRO_SEC) / + cmd = (uint32_t)((delay * cci_dev->cycles_per_us) / 0x100); cmd <<= 4; cmd |= CCI_I2C_WAIT_CMD; @@ -320,10 +317,17 @@ static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, enum cci_i2c_queue_t queue = QUEUE_1; struct cci_device *cci_dev = NULL; struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; + CDBG("%s line %d\n", __func__, __LINE__); cci_dev = v4l2_get_subdevdata(sd); master = c_ctrl->cci_info->cci_i2c_master; read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; + if (master >= MASTER_MAX || master < 0) { + pr_err("%s:%d Invalid I2C master %d\n", + __func__, __LINE__, master); + return -EINVAL; + } + mutex_lock(&cci_dev->cci_master_info[master].mutex); /* @@ -412,12 +416,12 @@ static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, val = 1 << ((master * 2) + queue); msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, + CDBG("%s:%d E wait_for_completion_timeout\n", __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> + rc = wait_for_completion_timeout(&cci_dev-> cci_master_info[master].reset_complete, CCI_TIMEOUT); if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", + pr_err("%s: wait_for_completion_timeout %d\n", __func__, __LINE__); if (rc == 0) rc = -ETIMEDOUT; @@ -426,7 +430,7 @@ static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, } else { rc = 0; } - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, + CDBG("%s:%d E wait_for_completion_timeout\n", __func__, __LINE__); read_words = msm_camera_io_r_mb(cci_dev->base + @@ -476,7 +480,7 @@ static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, uint16_t read_bytes = 0; if (!sd || !c_ctrl) { - pr_err("%s:%d sd %pK c_ctrl %pK\n", __func__, + pr_err("%s:%d sd %p c_ctrl %p\n", __func__, __LINE__, sd, c_ctrl); return -EINVAL; } @@ -528,7 +532,7 @@ ERROR: } static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl, uint8_t is_burst) + struct msm_camera_cci_ctrl *c_ctrl) { int32_t rc = 0; struct cci_device *cci_dev; @@ -536,13 +540,12 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, enum cci_i2c_master_t master; enum cci_i2c_queue_t queue = QUEUE_0; cci_dev = v4l2_get_subdevdata(sd); - - master = c_ctrl->cci_info->cci_i2c_master; - if (master >= MASTER_MAX - || master < 0) { + if (c_ctrl->cci_info->cci_i2c_master > MASTER_MAX + || c_ctrl->cci_info->cci_i2c_master < 0) { pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); return -EINVAL; } + master = c_ctrl->cci_info->cci_i2c_master; CDBG("%s master %d, queue %d\n", __func__, master, queue); CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, @@ -586,7 +589,7 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, goto ERROR; } - rc = msm_cci_data_queue(cci_dev, c_ctrl, queue, is_burst); + rc = msm_cci_data_queue(cci_dev, c_ctrl, queue); if (rc < 0) { CDBG("%s failed line %d\n", __func__, __LINE__); goto ERROR; @@ -618,12 +621,12 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s:%d E wait_for_completion_interruptible\n", + CDBG("%s:%d E wait_for_completion_timeout\n", __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> + rc = wait_for_completion_timeout(&cci_dev-> cci_master_info[master].reset_complete, CCI_TIMEOUT); if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", + pr_err("%s: wait_for_completion_timeout %d\n", __func__, __LINE__); if (rc == 0) rc = -ETIMEDOUT; @@ -632,7 +635,7 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, } else { rc = cci_dev->cci_master_info[master].status; } - CDBG("%s:%d X wait_for_completion_interruptible\n", __func__, + CDBG("%s:%d X wait_for_completion_timeout\n", __func__, __LINE__); ERROR: @@ -693,7 +696,7 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, cci_dev = v4l2_get_subdevdata(sd); if (!cci_dev || !c_ctrl) { - pr_err("%s:%d failed: invalid params %pK %pK\n", __func__, + pr_err("%s:%d failed: invalid params %p %p\n", __func__, __LINE__, cci_dev, c_ctrl); rc = -ENOMEM; return rc; @@ -702,6 +705,12 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); master = c_ctrl->cci_info->cci_i2c_master; CDBG("%s:%d master %d\n", __func__, __LINE__, master); + rc = msm_cci_set_clk_param(cci_dev, c_ctrl); + if (rc < 0) { + pr_err("%s:%d msm_cci_set_clk_parm failed rc = %d\n", + __func__, __LINE__, rc); + return rc; + } if (master < MASTER_MAX && master >= 0) { mutex_lock(&cci_dev->cci_master_info[master].mutex); /* Set reset pending flag to TRUE */ @@ -714,7 +723,7 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, msm_camera_io_w_mb(CCI_M1_RESET_RMSK, cci_dev->base + CCI_RESET_CMD_ADDR); /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( + rc = wait_for_completion_timeout( &cci_dev->cci_master_info[master]. reset_complete, CCI_TIMEOUT); @@ -743,14 +752,25 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, __func__, __LINE__); } if (rc < 0) { - cci_dev->ref_count--; CDBG("%s: request gpio failed\n", __func__); goto request_gpio_failed; } + cci_dev->reg_ptr = regulator_get(&(cci_dev->pdev->dev), + "qcom,gdscr-vdd"); + if (IS_ERR_OR_NULL(cci_dev->reg_ptr)) { + pr_err(" %s: Failed in getting TOP gdscr regulator handle", + __func__); + } else { + rc = regulator_enable(cci_dev->reg_ptr); + if (rc) { + pr_err(" %s: regulator enable failed for TOP GDSCR\n", + __func__); + goto clk_enable_failed; + } + } rc = msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, cci_dev->cci_clk, cci_dev->num_clk, 1); if (rc < 0) { - cci_dev->ref_count--; CDBG("%s: clk enable failed\n", __func__); goto clk_enable_failed; } @@ -763,11 +783,11 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, msm_camera_io_w_mb(CCI_RESET_CMD_RMSK, cci_dev->base + CCI_RESET_CMD_ADDR); msm_camera_io_w_mb(0x1, cci_dev->base + CCI_RESET_CMD_ADDR); - rc = wait_for_completion_interruptible_timeout( + rc = wait_for_completion_timeout( &cci_dev->cci_master_info[MASTER_0].reset_complete, CCI_TIMEOUT); if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", + pr_err("%s: wait_for_completion_timeout %d\n", __func__, __LINE__); if (rc == 0) rc = -ETIMEDOUT; @@ -775,7 +795,13 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, } for (i = 0; i < MASTER_MAX; i++) cci_dev->master_clk_init[i] = 0; - msm_cci_set_clk_param(cci_dev, c_ctrl); + rc = msm_cci_set_clk_param(cci_dev, c_ctrl); + if (rc < 0) { + pr_err("%s:%d msm_cci_set_clk_parm failed rc = %d\n", + __func__, __LINE__, rc); + return rc; + } + msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, cci_dev->base + CCI_IRQ_MASK_0_ADDR); msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, @@ -799,6 +825,12 @@ clk_enable_failed: } msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, cci_dev->cci_gpio_tbl_size, 0); + + if (!IS_ERR_OR_NULL(cci_dev->reg_ptr)) { + regulator_disable(cci_dev->reg_ptr); + regulator_put(cci_dev->reg_ptr); + cci_dev->reg_ptr = NULL; + } request_gpio_failed: cci_dev->ref_count--; return rc; @@ -822,6 +854,11 @@ static int32_t msm_cci_release(struct v4l2_subdev *sd) disable_irq(cci_dev->irq->start); msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, cci_dev->cci_clk, cci_dev->num_clk, 0); + if (!IS_ERR_OR_NULL(cci_dev->reg_ptr)) { + regulator_disable(cci_dev->reg_ptr); + regulator_put(cci_dev->reg_ptr); + cci_dev->reg_ptr = NULL; + } if (cci_dev->cci_pinctrl_status) { rc = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, cci_dev->cci_pinctrl.gpio_state_suspend); @@ -856,10 +893,7 @@ static int32_t msm_cci_config(struct v4l2_subdev *sd, rc = msm_cci_i2c_read_bytes(sd, cci_ctrl); break; case MSM_CCI_I2C_WRITE: - rc = msm_cci_i2c_write(sd, cci_ctrl, 0); - break; - case MSM_CCI_I2C_WRITE_BURST: - rc = msm_cci_i2c_write(sd, cci_ctrl, 1); + rc = msm_cci_i2c_write(sd, cci_ctrl); break; case MSM_CCI_GPIO_WRITE: break; @@ -952,8 +986,13 @@ static long msm_cci_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_CCI_CFG: rc = msm_cci_config(sd, arg); break; + case MSM_SD_NOTIFY_FREEZE: + break; case MSM_SD_SHUTDOWN: { - return rc; + struct msm_camera_cci_ctrl ctrl_cmd; + ctrl_cmd.cmd = MSM_CCI_RELEASE; + rc = msm_cci_config(sd, &ctrl_cmd); + break; } default: rc = -ENOIOCTLCMD; @@ -1220,18 +1259,34 @@ static int msm_cci_get_clk_info(struct cci_device *cci_dev, return rc; } for (i = 0; i < count; i++) { - cci_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; + cci_clk_info[i].clk_rate = (rates[i] == 0) ? + (long)-1 : rates[i]; CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, cci_clk_info[i].clk_rate); } return 0; } +static uint32_t msm_get_cycles_per_ms(void) +{ + int i = 0; + for (i = 0; i < CCI_NUM_CLK_MAX; i++) { + if (!strcmp(cci_clk_info[i].clk_name, "cci_src_clk")) { + CDBG("%s:%d i %d cci_src_clk\n", + __func__, __LINE__, i); + return ((cci_clk_info[i].clk_rate/1000)*256)/1000; + } + } + pr_err("%s:%d, failed: Can use default: %d", + __func__, __LINE__, CYCLES_PER_MICRO_SEC_DEFAULT); + return CYCLES_PER_MICRO_SEC_DEFAULT; +} + static int msm_cci_probe(struct platform_device *pdev) { struct cci_device *new_cci_dev; int rc = 0; - pr_err("%s: pdev %pK device id = %d\n", __func__, pdev, pdev->id); + CDBG("%s: pdev %p device id = %d\n", __func__, pdev, pdev->id); new_cci_dev = kzalloc(sizeof(struct cci_device), GFP_KERNEL); if (!new_cci_dev) { CDBG("%s: no enough memory\n", __func__); @@ -1243,17 +1298,19 @@ static int msm_cci_probe(struct platform_device *pdev) ARRAY_SIZE(new_cci_dev->msm_sd.sd.name), "msm_cci"); v4l2_set_subdevdata(&new_cci_dev->msm_sd.sd, new_cci_dev); platform_set_drvdata(pdev, &new_cci_dev->msm_sd.sd); - CDBG("%s sd %pK\n", __func__, &new_cci_dev->msm_sd.sd); + CDBG("%s sd %p\n", __func__, &new_cci_dev->msm_sd.sd); if (pdev->dev.of_node) of_property_read_u32((&pdev->dev)->of_node, "cell-index", &pdev->id); + new_cci_dev->reg_ptr = NULL; rc = msm_cci_get_clk_info(new_cci_dev, pdev); if (rc < 0) { pr_err("%s: msm_cci_get_clk_info() failed", __func__); return -EFAULT; } + new_cci_dev->cycles_per_us = msm_get_cycles_per_ms(); new_cci_dev->ref_count = 0; new_cci_dev->mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cci"); @@ -1306,7 +1363,7 @@ static int msm_cci_probe(struct platform_device *pdev) pr_err("%s: failed to add child nodes, rc=%d\n", __func__, rc); new_cci_dev->cci_state = CCI_STATE_DISABLED; g_cci_subdev = &new_cci_dev->msm_sd.sd; - CDBG("%s cci subdev %pK\n", __func__, &new_cci_dev->msm_sd.sd); + CDBG("%s cci subdev %p\n", __func__, &new_cci_dev->msm_sd.sd); CDBG("%s line %d\n", __func__, __LINE__); return 0; @@ -1318,7 +1375,7 @@ cci_no_resource: return 0; } -static int __exit msm_cci_exit(struct platform_device *pdev) +static int msm_cci_exit(struct platform_device *pdev) { struct v4l2_subdev *subdev = platform_get_drvdata(pdev); struct cci_device *cci_dev = diff --git a/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.h b/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.h index b9d3f142b4ad..5e1ff6fe1016 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.h +++ b/drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.h @@ -29,8 +29,8 @@ #define CCI_PINCTRL_STATE_DEFAULT "cci_default" #define CCI_PINCTRL_STATE_SLEEP "cci_suspend" -#define CCI_NUM_CLK_MAX 16 +#define CCI_NUM_CLK_MAX 16 enum cci_i2c_queue_t { QUEUE_0, @@ -58,7 +58,6 @@ enum msm_cci_cmd_type { MSM_CCI_I2C_READ, MSM_CCI_I2C_WRITE, MSM_CCI_GPIO_WRITE, - MSM_CCI_I2C_WRITE_BURST, }; struct msm_camera_cci_wait_sync_cfg { @@ -146,6 +145,8 @@ struct cci_device { uint8_t master_clk_init[MASTER_MAX]; struct msm_pinctrl_info cci_pinctrl; uint8_t cci_pinctrl_status; + struct regulator *reg_ptr; + uint32_t cycles_per_us; }; enum msm_cci_i2c_cmd_type { @@ -181,7 +182,13 @@ enum msm_cci_gpio_cmd_type { CCI_GPIO_INVALID_CMD, }; +#ifdef CONFIG_MSM_CCI struct v4l2_subdev *msm_cci_get_subdev(void); +#else +static inline struct v4l2_subdev *msm_cci_get_subdev(void) { + return NULL; +} +#endif #define VIDIOC_MSM_CCI_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct msm_camera_cci_ctrl *) diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_0_hwreg.h index 7bfeb200c80a..74373a952fd7 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_0_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_0_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSID_2_0_HWREG_H #define MSM_CSID_2_0_HWREG_H -#include "msm_csid.h" +#include struct csid_reg_parms_t csid_v2_0 = { diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_2_hwreg.h index 4ad1c2924b1f..837d59c800b8 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_2_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_2_2_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSID_2_2_HWREG_H #define MSM_CSID_2_2_HWREG_H -#include "msm_csid.h" +#include struct csid_reg_parms_t csid_v2_2 = { /* MIPI CSID registers */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_0_hwreg.h index 980f497e4596..414659079ead 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_0_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_0_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSID_3_0_HWREG_H #define MSM_CSID_3_0_HWREG_H -#include "msm_csid.h" +#include struct csid_reg_parms_t csid_v3_0 = { /* MIPI CSID registers */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_1_hwreg.h index d53867f5e5c5..1bb598384fe7 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_1_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_1_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSID_3_1_HWREG_H #define MSM_CSID_3_1_HWREG_H -#include "msm_csid.h" +#include struct csid_reg_parms_t csid_v3_1 = { /* MIPI CSID registers */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_2_hwreg.h index b002d78e6f04..49a691f9c66f 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_2_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_2_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSID_3_2_HWREG_H #define MSM_CSID_3_2_HWREG_H -#include "msm_csid.h" +#include struct csid_reg_parms_t csid_v3_2 = { /* MIPI CSID registers */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c index 99bd2a0aac2d..7dd2959fbb39 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c @@ -29,9 +29,11 @@ #define CSID_VERSION_V30 0x30000000 #define CSID_VERSION_V31 0x30010000 #define CSID_VERSION_V31_1 0x30010001 +#define CSID_VERSION_V31_3 0x30010003 #define CSID_VERSION_V32 0x30020000 #define CSID_VERSION_V33 0x30030000 #define CSID_VERSION_V34 0x30040000 +#define CSID_VERSION_V37 0x30070000 #define CSID_VERSION_V40 0x40000000 #define MSM_CSID_DRV_NAME "msm_csid" @@ -40,26 +42,22 @@ #define TRUE 1 #define FALSE 0 -#define CSID_NUM_CLK_MAX 16 - -extern int32_t msm_isp_camera_boost(bool flag); - #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) + static struct msm_cam_clk_info csid_clk_info[CSID_NUM_CLK_MAX]; static struct msm_cam_clk_info csid_clk_src_info[CSID_NUM_CLK_MAX]; static struct camera_vreg_t csid_vreg_info[] = { - {"qcom,mipi-csi-vdd", REG_LDO, 0, 0, 12000}, + {"qcom,mipi-csi-vdd", 0, 0, 12000}, }; static struct camera_vreg_t csid_8960_vreg_info[] = { - {"mipi_csi_vdd", REG_LDO, 1200000, 1200000, 20000}, + {"mipi_csi_vdd", 1200000, 1200000, 20000}, }; +#ifdef CONFIG_COMPAT +static struct v4l2_file_operations msm_csid_v4l2_subdev_fops; +#endif static int msm_csid_cid_lut( struct msm_camera_csid_lut_params *csid_lut_params, @@ -77,9 +75,10 @@ static int msm_csid_cid_lut( csid_lut_params->num_cid || csid_lut_params->vc_cfg[i]->cid < 0) { pr_err("%s: cid outside range %d\n", - __func__, csid_lut_params->vc_cfg[i]->cid); + __func__, csid_lut_params->vc_cfg[i]->cid); return -EINVAL; } + CDBG("%s lut params num_cid = %d, cid = %d\n", __func__, csid_lut_params->num_cid, @@ -141,11 +140,12 @@ static int msm_csid_config(struct csid_device *csid_dev, struct msm_camera_csid_params *csid_params) { int rc = 0; - uint32_t val = 0; + uint32_t val = 0, clk_rate = 0, round_rate = 0; + struct clk **csid_clk_ptr; void __iomem *csidbase; csidbase = csid_dev->base; if (!csidbase || !csid_params) { - pr_err("%s:%d csidbase %pK, csid params %pK\n", __func__, + pr_err("%s:%d csidbase %p, csid params %p\n", __func__, __LINE__, csidbase, csid_params); return -EINVAL; } @@ -157,8 +157,30 @@ static int msm_csid_config(struct csid_device *csid_dev, CDBG("%s csid_params phy_sel = %d\n", __func__, csid_params->phy_sel); + csid_dev->csid_lane_cnt = csid_params->lane_cnt; msm_csid_reset(csid_dev); + csid_clk_ptr = csid_dev->csid_clk; + if (!csid_clk_ptr) { + pr_err("csi_src_clk get failed\n"); + return -EINVAL; + } + + clk_rate = (csid_params->csi_clk > 0) ? + (csid_params->csi_clk) : csid_dev->csid_max_clk; + round_rate = clk_round_rate(csid_clk_ptr[csid_dev->csid_clk_index], + clk_rate); + if (round_rate > csid_dev->csid_max_clk) + round_rate = csid_dev->csid_max_clk; + pr_debug("usr set rate csi_clk clk_rate = %u round_rate = %u\n", + clk_rate, round_rate); + rc = clk_set_rate(csid_clk_ptr[csid_dev->csid_clk_index], + round_rate); + if (rc < 0) { + pr_err("csi_src_clk set failed\n"); + return rc; + } + val = csid_params->lane_cnt - 1; val |= csid_params->lane_assign << csid_dev->ctrl_reg->csid_reg.csid_dl_input_sel_shift; @@ -187,26 +209,36 @@ static int msm_csid_config(struct csid_device *csid_dev, static irqreturn_t msm_csid_irq(int irq_num, void *data) { uint32_t irq; - struct csid_device *csid_dev; - void __iomem *csidbase; + uint32_t short_dt = 0; + struct csid_device *csid_dev = data; - if (!data) { - pr_err("%s:%d data NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - }//prevent - csid_dev = data ; - if (!csid_dev->base) { + if (!csid_dev) { pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); return IRQ_HANDLED; } - csidbase = csid_dev->base; irq = msm_camera_io_r(csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - CDBG("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", - __func__, csid_dev->pdev->id, irq); + if (csid_dev->csid_sof_debug == 1) + pr_err("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", + __func__, csid_dev->pdev->id, irq); + else + CDBG("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", + __func__, csid_dev->pdev->id, irq); if (irq & (0x1 << csid_dev->ctrl_reg->csid_reg.csid_rst_done_irq_bitshift)) complete(&csid_dev->reset_complete); + if (irq & (0x1 << 9)) { + if (csid_dev->csid_sof_debug == 1) { + short_dt = msm_camera_io_r(csid_dev->base + + csid_dev->ctrl_reg->csid_reg. + csid_captured_short_pkt_addr); + short_dt = short_dt >> 24; + pr_err("%s: core %d short dt %x\n", __func__, + csid_dev->pdev->id, short_dt); + } + msm_camera_io_w(0x101, csid_dev->base + + csid_dev->ctrl_reg->csid_reg.csid_rst_cmd_addr); + } msm_camera_io_w(irq, csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); return IRQ_HANDLED; @@ -242,6 +274,8 @@ static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) return rc; } + csid_dev->reg_ptr = NULL; + if (csid_dev->csid_state == CSID_POWER_UP) { pr_err("%s: csid invalid state %d\n", __func__, csid_dev->csid_state); @@ -287,6 +321,20 @@ static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) goto vreg_enable_failed; } + csid_dev->reg_ptr = regulator_get(&(csid_dev->pdev->dev), + "qcom,gdscr-vdd"); + if (IS_ERR_OR_NULL(csid_dev->reg_ptr)) { + pr_err(" %s: Failed in getting TOP gdscr regulator handle", + __func__); + } else { + rc = regulator_enable(csid_dev->reg_ptr); + if (rc) { + pr_err(" %s: regulator enable failed for GDSCR\n", + __func__); + goto gdscr_regulator_enable_failed; + } + } + if (csid_dev->ctrl_reg->csid_reg.csid_version == CSID_VERSION_V22) msm_cam_clk_sel_src(&csid_dev->pdev->dev, &csid_clk_info[3], csid_clk_src_info, @@ -308,6 +356,7 @@ static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) CDBG("%s:%d called csid_dev->hw_version %x\n", __func__, __LINE__, csid_dev->hw_version); *csid_version = csid_dev->hw_version; + csid_dev->csid_sof_debug = 0; init_completion(&csid_dev->reset_complete); @@ -327,6 +376,13 @@ clk_enable_failed: csid_vreg_info, ARRAY_SIZE(csid_vreg_info), NULL, 0, &csid_dev->csi_vdd, 0); } +gdscr_regulator_enable_failed: + if (!IS_ERR_OR_NULL(csid_dev->reg_ptr)) { + regulator_disable(csid_dev->reg_ptr); + regulator_put(csid_dev->reg_ptr); + csid_dev->reg_ptr = NULL; + } + vreg_enable_failed: if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { msm_camera_config_vreg(&csid_dev->pdev->dev, @@ -392,7 +448,8 @@ static int msm_csid_release(struct csid_device *csid_dev) } else if ((csid_dev->hw_version >= CSID_VERSION_V30 && csid_dev->hw_version < CSID_VERSION_V31) || (csid_dev->hw_version == CSID_VERSION_V40) || - (csid_dev->hw_version == CSID_VERSION_V31_1)) { + (csid_dev->hw_version == CSID_VERSION_V31_1) || + (csid_dev->hw_version == CSID_VERSION_V31_3)) { msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, csid_dev->csid_clk, csid_dev->num_clk, 0); msm_camera_enable_vreg(&csid_dev->pdev->dev, @@ -404,6 +461,7 @@ static int msm_csid_release(struct csid_device *csid_dev) } else if ((csid_dev->hw_version == CSID_VERSION_V31) || (csid_dev->hw_version == CSID_VERSION_V32) || (csid_dev->hw_version == CSID_VERSION_V33) || + (csid_dev->hw_version == CSID_VERSION_V37) || (csid_dev->hw_version == CSID_VERSION_V34)) { msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, csid_dev->csid_clk, csid_dev->num_clk, 0); @@ -420,19 +478,24 @@ static int msm_csid_release(struct csid_device *csid_dev) return -EINVAL; } + if (!IS_ERR_OR_NULL(csid_dev->reg_ptr)) { + regulator_disable(csid_dev->reg_ptr); + regulator_put(csid_dev->reg_ptr); + } + iounmap(csid_dev->base); csid_dev->base = NULL; csid_dev->csid_state = CSID_POWER_DOWN; return 0; } -static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) +static int32_t msm_csid_cmd(struct csid_device *csid_dev, void __user *arg) { int rc = 0; struct csid_cfg_data *cdata = (struct csid_cfg_data *)arg; if (!csid_dev || !cdata) { - pr_err("%s:%d csid_dev %pK, cdata %pK\n", __func__, __LINE__, + pr_err("%s:%d csid_dev %p, cdata %p\n", __func__, __LINE__, csid_dev, cdata); return -EINVAL; } @@ -440,7 +503,6 @@ static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) switch (cdata->cfgtype) { case CSID_INIT: rc = msm_csid_init(csid_dev, &cdata->cfg.csid_version); - msm_isp_camera_boost(true); CDBG("%s csid version 0x%x\n", __func__, cdata->cfg.csid_version); break; @@ -464,7 +526,7 @@ static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) } for (i = 0; i < csid_params.lut_params.num_cid; i++) { vc_cfg = kzalloc(sizeof(struct msm_camera_csid_vc_cfg), - GFP_KERNEL); + GFP_KERNEL); if (!vc_cfg) { pr_err("%s: %d failed\n", __func__, __LINE__); for (i--; i >= 0; i--) @@ -484,6 +546,7 @@ static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) } csid_params.lut_params.vc_cfg[i] = vc_cfg; } + csid_dev->csid_sof_debug = 0; if (rc < 0) { pr_err("%s:%d failed\n", __func__, __LINE__); break; @@ -496,9 +559,6 @@ static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) case CSID_RELEASE: rc = msm_csid_release(csid_dev); break; - case CSID_BOOSTOFF: - msm_isp_camera_boost(false); - break; default: pr_err("%s: %d failed\n", __func__, __LINE__); rc = -ENOIOCTLCMD; @@ -533,6 +593,153 @@ static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, case VIDIOC_MSM_CSID_IO_CFG: rc = msm_csid_cmd(csid_dev, arg); break; + case MSM_SD_NOTIFY_FREEZE: { + if (csid_dev->csid_state != CSID_POWER_UP) + break; + csid_dev->csid_sof_debug = 1; + break; + } + case VIDIOC_MSM_CSID_RELEASE: + case MSM_SD_SHUTDOWN: + rc = msm_csid_release(csid_dev); + break; + default: + pr_err_ratelimited("%s: command not found\n", __func__); + } + CDBG("%s:%d\n", __func__, __LINE__); + mutex_unlock(&csid_dev->mutex); + return rc; +} + + +#ifdef CONFIG_COMPAT +static int32_t msm_csid_cmd32(struct csid_device *csid_dev, void __user *arg) +{ + int rc = 0; + struct csid_cfg_data *cdata; + struct csid_cfg_data32 *arg32 = (struct csid_cfg_data32 *) (arg); + struct csid_cfg_data local_arg; + local_arg.cfgtype = arg32->cfgtype; + cdata = &local_arg; + + if (!csid_dev || !cdata) { + pr_err("%s:%d csid_dev %p, cdata %p\n", __func__, __LINE__, + csid_dev, cdata); + return -EINVAL; + } + + CDBG("%s cfgtype = %d\n", __func__, cdata->cfgtype); + switch (cdata->cfgtype) { + case CSID_INIT: + rc = msm_csid_init(csid_dev, &cdata->cfg.csid_version); + arg32->cfg.csid_version = local_arg.cfg.csid_version; + CDBG("%s csid version 0x%x\n", __func__, + cdata->cfg.csid_version); + break; + case CSID_CFG: { + + struct msm_camera_csid_params csid_params; + struct msm_camera_csid_vc_cfg *vc_cfg = NULL; + int8_t i = 0; + struct msm_camera_csid_lut_params32 lut_par32; + struct msm_camera_csid_params32 csid_params32; + struct msm_camera_csid_vc_cfg vc_cfg32; + + if (copy_from_user(&csid_params32, + (void *)compat_ptr(arg32->cfg.csid_params), + sizeof(struct msm_camera_csid_params32))) { + pr_err("%s: %d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + csid_params.lane_cnt = csid_params32.lane_cnt; + csid_params.lane_assign = csid_params32.lane_assign; + csid_params.phy_sel = csid_params32.phy_sel; + csid_params.csi_clk = csid_params32.csi_clk; + + lut_par32 = csid_params32.lut_params; + csid_params.lut_params.num_cid = lut_par32.num_cid; + + if (csid_params.lut_params.num_cid < 1 || + csid_params.lut_params.num_cid > MAX_CID) { + pr_err("%s: %d num_cid outside range\n", + __func__, __LINE__); + rc = -EINVAL; + break; + } + + for (i = 0; i < lut_par32.num_cid; i++) { + vc_cfg = kzalloc(sizeof(struct msm_camera_csid_vc_cfg), + GFP_KERNEL); + if (!vc_cfg) { + pr_err("%s: %d failed\n", __func__, __LINE__); + for (i--; i >= 0; i--) + kfree(csid_params.lut_params.vc_cfg[i]); + rc = -ENOMEM; + break; + } + /* msm_camera_csid_vc_cfg size + * does not change in COMPAT MODE + */ + if (copy_from_user(&vc_cfg32, + (void *)compat_ptr(lut_par32.vc_cfg[i]), + sizeof(vc_cfg32))) { + pr_err("%s: %d failed\n", __func__, __LINE__); + for (i--; i >= 0; i--) { + kfree(csid_params.lut_params.vc_cfg[i]); + csid_params.lut_params.vc_cfg[i] = NULL; + } + kfree(vc_cfg); + vc_cfg = NULL; + rc = -EFAULT; + break; + } + vc_cfg->cid = vc_cfg32.cid; + vc_cfg->dt = vc_cfg32.dt; + vc_cfg->decode_format = vc_cfg32.decode_format; + csid_params.lut_params.vc_cfg[i] = vc_cfg; + } + + if (rc < 0) + break; + rc = msm_csid_config(csid_dev, &csid_params); + for (i--; i >= 0; i--) + kfree(csid_params.lut_params.vc_cfg[i]); + break; + } + case CSID_RELEASE: + rc = msm_csid_release(csid_dev); + break; + default: + pr_err("%s: %d failed\n", __func__, __LINE__); + rc = -ENOIOCTLCMD; + break; + } + return rc; +} + +static long msm_csid_subdev_ioctl32(struct v4l2_subdev *sd, + unsigned int cmd, void *arg) +{ + int rc = -ENOIOCTLCMD; + struct csid_device *csid_dev = v4l2_get_subdevdata(sd); + + mutex_lock(&csid_dev->mutex); + CDBG("%s:%d id %d\n", __func__, __LINE__, csid_dev->pdev->id); + switch (cmd) { + case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: + rc = msm_csid_get_subdev_id(csid_dev, arg); + break; + case VIDIOC_MSM_CSID_IO_CFG32: + rc = msm_csid_cmd32(csid_dev, arg); + break; + case MSM_SD_NOTIFY_FREEZE: { + if (csid_dev->csid_state != CSID_POWER_UP) + break; + csid_dev->csid_sof_debug = 1; + break; + } case VIDIOC_MSM_CSID_RELEASE: case MSM_SD_SHUTDOWN: rc = msm_csid_release(csid_dev); @@ -545,6 +752,21 @@ static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, return rc; } +static long msm_csid_subdev_do_ioctl32( + struct file *file, unsigned int cmd, void *arg) +{ + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + + return msm_csid_subdev_ioctl32(sd, cmd, arg); +} + +static long msm_csid_subdev_fops_ioctl32(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return video_usercopy(file, cmd, arg, msm_csid_subdev_do_ioctl32); +} +#endif static const struct v4l2_subdev_internal_ops msm_csid_internal_ops; static struct v4l2_subdev_core_ops msm_csid_subdev_core_ops = { @@ -634,7 +856,14 @@ static int msm_csid_get_clk_info(struct csid_device *csid_dev, return rc; } for (i = 0; i < count; i++) { - csid_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; + csid_clk_info[i].clk_rate = (rates[i] == 0) ? + (long)-1 : rates[i]; + if (!strcmp(csid_clk_info[i].clk_name, "csi_src_clk")) { + CDBG("%s:%d, copy csi_src_clk", + __func__, __LINE__); + csid_dev->csid_max_clk = rates[i]; + csid_dev->csid_clk_index = i; + } CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, csid_clk_info[i].clk_rate); } @@ -688,7 +917,6 @@ static int csid_probe(struct platform_device *pdev) GFP_KERNEL); if (!new_csid_dev->ctrl_reg) { pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csid_dev); return -ENOMEM; } @@ -703,7 +931,6 @@ static int csid_probe(struct platform_device *pdev) if (rc < 0) { pr_err("%s:%d failed to read cell-index\n", __func__, __LINE__); - rc = -ENODEV; goto csid_no_resource; } CDBG("%s device id %d\n", __func__, pdev->id); @@ -713,7 +940,6 @@ static int csid_probe(struct platform_device *pdev) if (rc < 0) { pr_err("%s:%d failed to read qcom,csi-vdd-voltage\n", __func__, __LINE__); - rc = -ENODEV; goto csid_no_resource; } CDBG("%s:%d reading mipi_csi_vdd is %d\n", __func__, __LINE__, @@ -726,8 +952,7 @@ static int csid_probe(struct platform_device *pdev) rc = msm_csid_get_clk_info(new_csid_dev, pdev); if (rc < 0) { pr_err("%s: msm_csid_get_clk_info() failed", __func__); - rc = -ENODEV; - goto csid_no_resource; + return -EFAULT; } @@ -764,6 +989,12 @@ static int csid_probe(struct platform_device *pdev) new_csid_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x5; msm_sd_register(&new_csid_dev->msm_sd); +#ifdef CONFIG_COMPAT + msm_csid_v4l2_subdev_fops = v4l2_subdev_fops; + msm_csid_v4l2_subdev_fops.compat_ioctl32 = msm_csid_subdev_fops_ioctl32; + new_csid_dev->msm_sd.sd.devnode->fops = &msm_csid_v4l2_subdev_fops; +#endif + rc = request_irq(new_csid_dev->irq->start, msm_csid_irq, IRQF_TRIGGER_RISING, "csid", new_csid_dev); if (rc < 0) { @@ -808,8 +1039,7 @@ static int csid_probe(struct platform_device *pdev) } else { pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, new_csid_dev->hw_dts_version); - rc = -ENODEV; - goto csid_no_resource; + return -EINVAL; } new_csid_dev->csid_state = CSID_POWER_DOWN; @@ -819,7 +1049,7 @@ csid_no_resource: mutex_destroy(&new_csid_dev->mutex); kfree(new_csid_dev->ctrl_reg); kfree(new_csid_dev); - return rc; + return 0; } static const struct of_device_id msm_csid_dt_match[] = { diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h index c2770157b22d..884b48d4dd79 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h @@ -20,6 +20,8 @@ #include #include "msm_sd.h" +#define CSID_NUM_CLK_MAX 16 + struct csid_reg_parms_t { /* MIPI CSID registers */ uint32_t csid_hw_version_addr; @@ -83,10 +85,14 @@ struct csid_device { struct csid_ctrl_t *ctrl_reg; uint32_t num_clk; uint32_t num_clk_src_info; - - struct clk *csid_clk[11]; + struct regulator *reg_ptr; + struct clk *csid_clk[CSID_NUM_CLK_MAX]; + uint32_t csid_clk_index; + uint32_t csid_max_clk; + uint32_t csid_sof_debug; + uint32_t csid_lane_cnt; }; #define VIDIOC_MSM_CSID_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct v4l2_subdev*) + _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct v4l2_subdev*) #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h index 5abf99123365..3b9213c4ca28 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSIPHY_2_0_HWREG_H #define MSM_CSIPHY_2_0_HWREG_H -#include "msm_csiphy.h" +#include struct csiphy_reg_parms_t csiphy_v2_0 = { /*MIPI CSI PHY registers*/ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h index 8682478f7e98..7ed88c564c5a 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSIPHY_2_2_HWREG_H #define MSM_CSIPHY_2_2_HWREG_H -#include "msm_csiphy.h" +#include struct csiphy_reg_parms_t csiphy_v2_2 = { /*MIPI CSI PHY registers*/ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h index af4d3e03a7ce..238fef0f4d5a 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSIPHY_3_0_HWREG_H #define MSM_CSIPHY_3_0_HWREG_H -#include "msm_csiphy.h" +#include struct csiphy_reg_parms_t csiphy_v3_0 = { /*MIPI CSI PHY registers*/ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h index a08d95fde94c..8a9b877368d8 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSIPHY_3_1_HWREG_H #define MSM_CSIPHY_3_1_HWREG_H -#include "msm_csiphy.h" +#include #define MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET 0x1FC @@ -28,8 +28,8 @@ struct csiphy_reg_parms_t csiphy_v3_1 = { 0x104, 0x108, 0x10C, - 0x110, - 0x128, + 0x1C, + 0x28, 0x140, 0x144, 0x164, diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h index 19f14e73a92c..77129f08c8c2 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h @@ -13,7 +13,7 @@ #ifndef MSM_CSIPHY_3_2_HWREG_H #define MSM_CSIPHY_3_2_HWREG_H -#include "msm_csiphy.h" +#include struct csiphy_reg_parms_t csiphy_v3_2 = { /*MIPI CSI PHY registers*/ diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c b/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c index 1e8dff7d4d30..bf8f2b4a7afa 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,7 +17,6 @@ #include #include #include -#include #include "msm_csiphy.h" #include "msm_sd.h" #include "msm_camera_io_util.h" @@ -30,7 +29,6 @@ #define DBG_CSIPHY 0 #define SOC_REVISION_3 0x30000 - #define V4L2_IDENT_CSIPHY 50003 #define CSIPHY_VERSION_V22 0x01 #define CSIPHY_VERSION_V20 0x00 @@ -38,29 +36,30 @@ #define CSIPHY_VERSION_V31 0x31 #define CSIPHY_VERSION_V32 0x32 #define MSM_CSIPHY_DRV_NAME "msm_csiphy" - -#define CSIPHY_NUM_CLK_MAX 16 +#define CLK_LANE_OFFSET 1 +#define NUM_LANES_OFFSET 4 #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) + static struct msm_cam_clk_info csiphy_clk_info[CSIPHY_NUM_CLK_MAX]; +static struct v4l2_file_operations msm_csiphy_v4l2_subdev_fops; uint32_t is_3_1_rev3 = 0; - static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, struct msm_camera_csiphy_params *csiphy_params) { int rc = 0; - int j = 0; - uint32_t val = 0; + int j = 0, curr_lane = 0; + uint32_t val = 0, clk_rate = 0, round_rate = 0; uint8_t lane_cnt = 0; uint16_t lane_mask = 0; void __iomem *csiphybase; uint8_t csiphy_id = csiphy_dev->pdev->id; + int32_t lane_val = 0, lane_right = 0, num_lanes = 0; + struct clk **csid_phy_clk_ptr; + int ratio = 1; + csiphybase = csiphy_dev->base; if (!csiphybase) { pr_err("%s: csiphybase NULL\n", __func__); @@ -76,6 +75,35 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, return rc; } + csid_phy_clk_ptr = csiphy_dev->csiphy_clk; + if (!csid_phy_clk_ptr) { + pr_err("csiphy_timer_src_clk get failed\n"); + return -EINVAL; + } + + clk_rate = (csiphy_params->csiphy_clk > 0) + ? csiphy_params->csiphy_clk : + csiphy_dev->csiphy_max_clk; + round_rate = clk_round_rate( + csid_phy_clk_ptr[csiphy_dev->csiphy_clk_index], + clk_rate); + if (round_rate >= csiphy_dev->csiphy_max_clk) + round_rate = csiphy_dev->csiphy_max_clk; + else { + ratio = csiphy_dev->csiphy_max_clk/round_rate; + csiphy_params->settle_cnt = csiphy_params->settle_cnt/ratio; + } + + CDBG("set from usr csiphy_clk clk_rate = %u round_rate = %u\n", + clk_rate, round_rate); + rc = clk_set_rate( + csid_phy_clk_ptr[csiphy_dev->csiphy_clk_index], + round_rate); + if (rc < 0) { + pr_err("csiphy_timer_src_clk set failed\n"); + return rc; + } + CDBG("%s csiphy_params, mask = 0x%x cnt = %d\n", __func__, csiphy_params->lane_mask, @@ -87,7 +115,7 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, if (csiphy_dev->hw_version >= CSIPHY_VERSION_V30) { val = msm_camera_io_r(csiphy_dev->clk_mux_base); if (csiphy_params->combo_mode && - (csiphy_params->lane_mask & 0x18)) { + (csiphy_params->lane_mask & 0x18) == 0x18) { val &= ~0xf0; val |= csiphy_params->csid_core << 4; } else { @@ -95,7 +123,7 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, val |= csiphy_params->csid_core; } msm_camera_io_w(val, csiphy_dev->clk_mux_base); - CDBG("%s clk mux addr %pK val 0x%x\n", __func__, + CDBG("%s clk mux addr %p val 0x%x\n", __func__, csiphy_dev->clk_mux_base, val); mb(); } @@ -117,9 +145,6 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_lnck_cfg3_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg4_addr); msm_camera_io_w(0x24, csiphybase + csiphy_dev->ctrl_reg-> csiphy_reg.mipi_csiphy_interrupt_mask0_addr); @@ -127,8 +152,10 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, csiphybase + csiphy_dev->ctrl_reg-> csiphy_reg.mipi_csiphy_interrupt_clear0_addr); } else { - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) { - msm_camera_io_w(0x01, csiphybase + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); + if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && + is_3_1_rev3) { + msm_camera_io_w(0x01, csiphybase + + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); } val = 0x1; msm_camera_io_w((lane_mask << 1) | val, @@ -141,9 +168,6 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_glbl_reset_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40); } lane_mask &= 0x1f; @@ -167,9 +191,40 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, mipi_csiphy_interrupt_mask_val, csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_interrupt_clear_addr + 0x4*j); - msm_camera_io_w(0xff, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40*j); + if (csiphy_dev->is_3_1_20nm_hw == 1) { + if (j > CLK_LANE_OFFSET) { + lane_right = 0x8; + num_lanes = (lane_cnt - curr_lane) + << NUM_LANES_OFFSET; + if (lane_cnt < curr_lane) { + pr_err("%s: Lane_cnt is less than curr_lane number\n", + __func__); + return -EINVAL; + } + lane_val = lane_right|num_lanes; + } else if (j == 1) { + lane_val = 0x4; + } + if (csiphy_params->combo_mode == 1) { + /* + * In the case of combo mode, the clock is always + * 4th lane for the second sensor. + * So check whether the sensor is of one lane + * sensor and curr_lane for 0. + */ + if (curr_lane == 0 && + ((csiphy_params->lane_mask & + 0x18) == 0x18)) + lane_val = 0x4; + } + msm_camera_io_w(lane_val, csiphybase + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_misc1_addr + 0x40*j); + msm_camera_io_w(0x17, csiphybase + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_test_imp + 0x40*j); + curr_lane++; + } j++; lane_mask >>= 1; } @@ -191,7 +246,7 @@ static irqreturn_t msm_csiphy_irq(int irq_num, void *data) csiphy_dev->base + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_interrupt_clear0_addr + 0x4*i); - pr_err("%s MIPI_CSIPHY%d_INTERRUPT_STATUS%d = 0x%x\n", + CDBG("%s MIPI_CSIPHY%d_INTERRUPT_STATUS%d = 0x%x\n", __func__, csiphy_dev->pdev->id, i, irq); msm_camera_io_w(0x1, csiphy_dev->base + csiphy_dev->ctrl_reg-> @@ -225,61 +280,6 @@ static int msm_csiphy_subdev_g_chip_ident(struct v4l2_subdev *sd, return 0; } -static int msm_csiphy_recovery(struct csiphy_device *csiphy_dev) -{ - int i = 0; - uint16_t csi_lane_mask; - - pr_err("msm_csiphy_recovery: E\n"); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - csiphy_dev->ref_count = 0; - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - pr_err("msm_csiphy_recovery: X\n"); - return 0; -} - #if DBG_CSIPHY static int msm_csiphy_init(struct csiphy_device *csiphy_dev) { @@ -294,9 +294,8 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); + rc = -EINVAL; + return rc; } CDBG("%s:%d called\n", __func__, __LINE__); @@ -323,7 +322,7 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) csiphy_dev->num_clk, 1); } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, + pr_err("%s clk mux mem %p io %p\n", __func__, csiphy_dev->clk_mux_mem, csiphy_dev->clk_mux_io); rc = -ENOMEM; @@ -392,9 +391,8 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); + rc = -EINVAL; + return rc; } CDBG("%s:%d called\n", __func__, __LINE__); @@ -420,7 +418,7 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) csiphy_dev->num_clk, 1); } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, + pr_err("%s clk mux mem %p io %p\n", __func__, csiphy_dev->clk_mux_mem, csiphy_dev->clk_mux_io); rc = -ENOMEM; @@ -467,6 +465,7 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) else csiphy_dev->hw_version = csiphy_dev->hw_dts_version; + csiphy_dev->csiphy_sof_freeze = 0; CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, csiphy_dev->hw_version); csiphy_dev->csiphy_state = CSIPHY_POWER_UP; @@ -501,7 +500,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) mipi_csiphy_lnn_cfg2_addr + 0x40*i); } else { if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, + pr_err("%s:%d failed: csi_lane_params %p\n", __func__, __LINE__, csi_lane_params); return -EINVAL; } @@ -523,12 +522,20 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) msm_camera_io_w(0x0, csiphy_dev->base + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_lnn_cfg2_addr + 0x40*i); + msm_camera_io_w(0x0, csiphy_dev->base + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_misc1_addr + 0x40*i); + msm_camera_io_w(0x0, csiphy_dev->base + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_test_imp + 0x40*i); } csi_lane_mask >>= 1; i++; } - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) - msm_camera_io_w(0x00, csiphy_dev->base + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); + if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && + is_3_1_rev3) + msm_camera_io_w(0x00, csiphy_dev->base + + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); } if (--csiphy_dev->ref_count) { @@ -586,7 +593,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) mipi_csiphy_lnn_cfg2_addr + 0x40*i); } else { if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, + pr_err("%s:%d failed: csi_lane_params %p\n", __func__, __LINE__, csi_lane_params); return -EINVAL; } @@ -608,12 +615,20 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) msm_camera_io_w(0x0, csiphy_dev->base + csiphy_dev->ctrl_reg->csiphy_reg. mipi_csiphy_lnn_cfg2_addr + 0x40*i); + msm_camera_io_w(0x0, csiphy_dev->base + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_misc1_addr + 0x40*i); + msm_camera_io_w(0x0, csiphy_dev->base + + csiphy_dev->ctrl_reg->csiphy_reg. + mipi_csiphy_lnn_test_imp + 0x40*i); } csi_lane_mask >>= 1; i++; } - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) - msm_camera_io_w(0x00, csiphy_dev->base + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); + if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && + is_3_1_rev3) + msm_camera_io_w(0x00, csiphy_dev->base + + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); } if (--csiphy_dev->ref_count) { @@ -627,6 +642,9 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) msm_camera_io_w(0x0, csiphy_dev->base + csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); + if (csiphy_dev->csiphy_sof_freeze == 1) + disable_irq(csiphy_dev->irq->start); + if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { msm_cam_clk_enable(&csiphy_dev->pdev->dev, csiphy_clk_info, csiphy_dev->csiphy_clk, @@ -645,7 +663,6 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) } #endif - static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg) { int rc = 0; @@ -668,6 +685,7 @@ static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg) rc = -EFAULT; break; } + csiphy_dev->csiphy_sof_freeze = 0; rc = msm_csiphy_lane_config(csiphy_dev, &csiphy_params); break; case CSIPHY_RELEASE: @@ -719,6 +737,14 @@ static long msm_csiphy_subdev_ioctl(struct v4l2_subdev *sd, case MSM_SD_SHUTDOWN: rc = msm_csiphy_release(csiphy_dev, arg); break; + case MSM_SD_NOTIFY_FREEZE: { + if (!csiphy_dev || !csiphy_dev->ctrl_reg || + !csiphy_dev->ref_count) + break; + csiphy_dev->csiphy_sof_freeze = 1; + enable_irq(csiphy_dev->irq->start); + break; + } default: pr_err_ratelimited("%s: command not found\n", __func__); } @@ -727,6 +753,35 @@ static long msm_csiphy_subdev_ioctl(struct v4l2_subdev *sd, return rc; } +#ifdef CONFIG_COMPAT +static long msm_csiphy_subdev_do_ioctl( + struct file *file, unsigned int cmd, void *arg) +{ + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + struct csiphy_cfg_data32 *u32 = + (struct csiphy_cfg_data32 *)arg; + struct csiphy_cfg_data csiphy_data; + + switch (cmd) { + case VIDIOC_MSM_CSIPHY_IO_CFG32: + cmd = VIDIOC_MSM_CSIPHY_IO_CFG; + csiphy_data.cfgtype = u32->cfgtype; + csiphy_data.cfg.csiphy_params = + compat_ptr(u32->cfg.csiphy_params); + return msm_csiphy_subdev_ioctl(sd, cmd, &csiphy_data); + default: + return msm_csiphy_subdev_ioctl(sd, cmd, arg); + } +} + +static long msm_csiphy_subdev_fops_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return video_usercopy(file, cmd, arg, msm_csiphy_subdev_do_ioctl); +} +#endif + static const struct v4l2_subdev_internal_ops msm_csiphy_internal_ops; static struct v4l2_subdev_core_ops msm_csiphy_subdev_core_ops = { @@ -781,7 +836,15 @@ static int msm_csiphy_get_clk_info(struct csiphy_device *csiphy_dev, return rc; } for (i = 0; i < count; i++) { - csiphy_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; + csiphy_clk_info[i].clk_rate = (rates[i] == 0) ? + (long)-1 : rates[i]; + if (!strcmp(csiphy_clk_info[i].clk_name, + "csiphy_timer_src_clk")) { + CDBG("%s:%d, copy csiphy_timer_src_clk", + __func__, __LINE__); + csiphy_dev->csiphy_max_clk = rates[i]; + csiphy_dev->csiphy_clk_index = i; + } CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, csiphy_clk_info[i].clk_rate); } @@ -798,12 +861,12 @@ static int csiphy_probe(struct platform_device *pdev) pr_err("%s: no enough memory\n", __func__); return -ENOMEM; } + new_csiphy_dev->is_3_1_20nm_hw = 0; new_csiphy_dev->ctrl_reg = NULL; new_csiphy_dev->ctrl_reg = kzalloc(sizeof(struct csiphy_ctrl_t), GFP_KERNEL); if (!new_csiphy_dev->ctrl_reg) { pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csiphy_dev); return -ENOMEM; } v4l2_subdev_init(&new_csiphy_dev->msm_sd.sd, &msm_csiphy_subdev_ops); @@ -821,9 +884,9 @@ static int csiphy_probe(struct platform_device *pdev) rc = msm_csiphy_get_clk_info(new_csiphy_dev, pdev); if (rc < 0) { pr_err("%s: msm_csiphy_get_clk_info() failed", __func__); - rc = -EFAULT; - goto csiphy_no_resource; + return -EFAULT; } + new_csiphy_dev->mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "csiphy"); if (!new_csiphy_dev->mem) { @@ -895,6 +958,11 @@ static int csiphy_probe(struct platform_device *pdev) "qcom,csiphy-v3.1")) { new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_1; new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V31; + } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, + "qcom,csiphy-v3.1.1")) { + new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_1; + new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V31; + new_csiphy_dev->is_3_1_20nm_hw = 1; } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, "qcom,csiphy-v3.2")) { new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_2; @@ -902,10 +970,16 @@ static int csiphy_probe(struct platform_device *pdev) } else { pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, new_csiphy_dev->hw_dts_version); - rc = -EINVAL; - goto csiphy_no_resource; + return -EINVAL; } + msm_csiphy_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_csiphy_v4l2_subdev_fops.compat_ioctl32 = + msm_csiphy_subdev_fops_ioctl; +#endif + new_csiphy_dev->msm_sd.sd.devnode->fops = + &msm_csiphy_v4l2_subdev_fops; new_csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; return 0; @@ -913,7 +987,7 @@ csiphy_no_resource: mutex_destroy(&new_csiphy_dev->mutex); kfree(new_csiphy_dev->ctrl_reg); kfree(new_csiphy_dev); - return rc; + return 0; } static const struct of_device_id msm_csiphy_dt_match[] = { @@ -937,7 +1011,6 @@ static int __init msm_csiphy_init_module(void) if (early_machine_is_msm8939()) if (socinfo_get_version() == SOC_REVISION_3) is_3_1_rev3 = 1; - return platform_driver_register(&csiphy_driver); } diff --git a/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.h b/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.h index 608924708f4a..794487a63e57 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.h +++ b/drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.h @@ -21,6 +21,7 @@ #include "msm_sd.h" #define MAX_CSIPHY 3 +#define CSIPHY_NUM_CLK_MAX 16 struct csiphy_reg_parms_t { /*MIPI CSI PHY registers*/ @@ -33,8 +34,8 @@ struct csiphy_reg_parms_t { uint32_t mipi_csiphy_lnck_cfg2_addr; uint32_t mipi_csiphy_lnck_cfg3_addr; uint32_t mipi_csiphy_lnck_cfg4_addr; - uint32_t mipi_csiphy_lnck_cfg5_addr; - uint32_t mipi_csiphy_lnck_misc1_addr; + uint32_t mipi_csiphy_lnn_test_imp; + uint32_t mipi_csiphy_lnn_misc1_addr; uint32_t mipi_csiphy_glbl_reset_addr; uint32_t mipi_csiphy_glbl_pwr_cfg_addr; uint32_t mipi_csiphy_glbl_irq_cmd_addr; @@ -77,11 +78,13 @@ struct csiphy_device { enum msm_csiphy_state_t csiphy_state; struct csiphy_ctrl_t *ctrl_reg; uint32_t num_clk; - - struct clk *csiphy_clk[8]; - + struct clk *csiphy_clk[CSIPHY_NUM_CLK_MAX]; int32_t ref_count; uint16_t lane_mask[MAX_CSIPHY]; + uint32_t is_3_1_20nm_hw; + uint32_t csiphy_clk_index; + uint32_t csiphy_max_clk; + uint32_t csiphy_sof_freeze; }; #define VIDIOC_MSM_CSIPHY_RELEASE \ diff --git a/drivers/media/platform/msm/camera_v2/sensor/db8221a.h b/drivers/media/platform/msm/camera_v2/sensor/db8221a.h deleted file mode 100755 index 660cfa515937..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/db8221a.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __db8221a_H__ -#define __db8221a_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef db8221a_DEBUG -#undef CDBG -#define db8221a_DEBUG -#ifdef db8221a_DEBUG -#define CDBG(fmt, args...) pr_err("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#else -#define CDBG(fmt, args...) pr_debug("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ diff --git a/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.c b/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.c deleted file mode 100755 index e23e9681de66..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.c +++ /dev/null @@ -1,703 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "db8221a.h" -#include "db8221a_yuv.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define DB8221A_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define DB8221A_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl db8221a_ctrl; -static exif_data_t db8221a_exif; - -static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; -static int32_t prev_fps = 0; - -#if defined CONFIG_SEC_CAMERA_TUNING -#define FILENAME "/data/db8221a_yuv.h" -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif - -static int db8221a_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 coarseTime = 0; - u16 lineLength = 0; - const int SensorInputClock = 72000000; - int rc = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x06, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x07, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - coarseTime = ((read_value1&0xFF) << 8) | read_value2; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0A, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0B, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - lineLength = ((read_value1&0xFF) << 8) | read_value2; - CDBG("%s::%d coarseTime = %d, lineLength = %d",__func__,__LINE__,coarseTime,lineLength); - - if(coarseTime == 0 || lineLength == 0){ - pr_err("%s : %d I2C data is 0\n", __func__, __LINE__); - rc = -EFAULT; - } - else{ - db8221a_exif.shutterspeed = SensorInputClock/(coarseTime*lineLength*2); - CDBG("Exposure time = %d", db8221a_exif.shutterspeed); - } - return rc; -} - -static int db8221a_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (db8221a_exif.shutterspeed <= 10) - db8221a_exif.iso = 400; - else if (db8221a_exif.shutterspeed > 10 && db8221a_exif.shutterspeed <= 20) - db8221a_exif.iso = 200; - else if (db8221a_exif.shutterspeed > 20 && db8221a_exif.shutterspeed <= 30) - db8221a_exif.iso = 100; - else - db8221a_exif.iso = 50; - CDBG("ISO = %d", db8221a_exif.iso); - return 0; -} - -static int db8221a_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - CDBG("%s : %d E",__func__,__LINE__); - rc = db8221a_exif_shutter_speed(s_ctrl); - if( rc < 0 ) return rc; - rc = db8221a_exif_iso(s_ctrl); - return rc; -} - -int32_t db8221a_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - CDBG("%s : %d E",__func__,__LINE__); - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = db8221a_exif.iso; - exif_info->value_3 = db8221a_exif.shutterspeed; - return 0; -} - -int32_t db8221a_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - DB8221A_WRITE_LIST(db8221a_bright_m4); - break; - case CAMERA_EV_M3: - DB8221A_WRITE_LIST(db8221a_bright_m3); - break; - case CAMERA_EV_M2: - DB8221A_WRITE_LIST(db8221a_bright_m2); - break; - case CAMERA_EV_M1: - DB8221A_WRITE_LIST(db8221a_bright_m1); - break; - case CAMERA_EV_DEFAULT: - DB8221A_WRITE_LIST(db8221a_bright_default); - break; - case CAMERA_EV_P1: - DB8221A_WRITE_LIST(db8221a_bright_p1); - break; - case CAMERA_EV_P2: - DB8221A_WRITE_LIST(db8221a_bright_p2); - break; - case CAMERA_EV_P3: - DB8221A_WRITE_LIST(db8221a_bright_p3); - break; - case CAMERA_EV_P4: - DB8221A_WRITE_LIST(db8221a_bright_p4); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - DB8221A_WRITE_LIST(db8221a_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - DB8221A_WRITE_LIST(db8221a_wb_incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - DB8221A_WRITE_LIST(db8221a_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_Capture_1600_1200_for_24fps); - } - else { - DB8221A_WRITE_LIST(db8221a_Capture_1600_1200); - } - break; - case MSM_SENSOR_RES_QTR: -#if defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder); - } else { - if (24000 == prev_fps) { // from 24fps to auto fps - CDBG("prev_fps is 24!"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - DB8221A_WRITE_LIST(db8221a_preview_640_480); - } -#else - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder_800_600); - } - else { - DB8221A_WRITE_LIST(db8221a_preview_800_600); - } -#endif - break; - case MSM_SENSOR_RES_2: - DB8221A_WRITE_LIST(db8221a_preview_640_480); - break; - case MSM_SENSOR_RES_3: - DB8221A_WRITE_LIST(db8221a_preview_352_288); - break; - case MSM_SENSOR_RES_4: - DB8221A_WRITE_LIST(db8221a_preview_320_240); - break; - case MSM_SENSOR_RES_5: - DB8221A_WRITE_LIST(db8221a_preview_176_144); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - - return rc; -} - -int32_t db8221a_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - DB8221A_WRITE_LIST(db8221a_effect_none); - break; - case CAMERA_EFFECT_MONO: - DB8221A_WRITE_LIST(db8221a_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - DB8221A_WRITE_LIST(db8221a_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - DB8221A_WRITE_LIST(db8221a_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - - CDBG(" CFG_GET_SENSOR_INFO"); - - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); -#if 0 - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); -#endif - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); - db8221a_ctrl.vtcall_mode = 0; - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("%s[%d] %s inside CFG_SET_INIT_SETTING", __func__, __LINE__ ,FILENAME); - } -#endif - break; - - case CFG_SET_RESOLUTION: - CDBG("CFG_SET_RESOLUTION"); - resolution = *((int32_t *)cdata->cfg.setting); - - if((db8221a_ctrl.prev_mode == CAMERA_MODE_INIT || db8221a_ctrl.prev_mode == CAMERA_MODE_RECORDING) - && (db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW)){ - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW){ - db8221a_set_resolution(s_ctrl, resolution); - } - else if((db8221a_ctrl.prev_mode == CAMERA_MODE_PREVIEW) - && (db8221a_ctrl.op_mode == CAMERA_MODE_CAPTURE)){ - CDBG("capture seq"); - if( resolution == MSM_SENSOR_RES_FULL ){ - db8221a_set_resolution(s_ctrl , resolution); - db8221a_get_exif(s_ctrl); - } - else{ - pr_err("%s:%d invalid capture size\n", __func__, __LINE__); - rc = -EINVAL; - } - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_RECORDING){ - CDBG("recording seq"); - if (db8221a_ctrl.prev_mode == CAMERA_MODE_INIT) { - - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - msleep(50); - - } - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - pr_err("%s:%d invalid sequence db8221a_ctrl.prev_mode:%d, db8221a_ctrl.op_mode:%d\n", - __func__, __LINE__, db8221a_ctrl.prev_mode, db8221a_ctrl.op_mode); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - DB8221A_WRITE_LIST(db8221a_stream_stop); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); -#if 0 - { - int slave_index = 0; - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - } -#endif - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - prev_fps = 0; - streamon = 0; - db8221a_ctrl.op_mode = CAMERA_MODE_INIT; - db8221a_ctrl.prev_mode = CAMERA_MODE_INIT; - db8221a_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - db8221a_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - db8221a_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - db8221a_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - db8221a_ctrl.settings.effect = CAMERA_EFFECT_OFF; - db8221a_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } - else { - pr_err("%s : %d undefined sensor_power_up",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } - else{ - pr_err("%s : %d undefined sensor_power_down",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - pr_err("%s: %d invalid\n", __func__, __LINE__); - //rc = -EINVAL; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - - return rc; -} - -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cam_info->mode) { - case EXT_CAM_EV: - db8221a_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - db8221a_set_exposure_compensation(s_ctrl, db8221a_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - db8221a_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - db8221a_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - db8221a_ctrl.prev_mode = db8221a_ctrl.op_mode; - db8221a_ctrl.op_mode = cam_info->value_1; - break; - case EXT_CAM_EXIF: - db8221a_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - db8221a_ctrl.vtcall_mode = cam_info->value_1; - break; - case EXT_CAM_FPS_RANGE: - CDBG("Prev_fps %d EXT_CAM_FPS_RANGE %d", db8221a_ctrl.fixed_fps_val, cam_info->value_1); - prev_fps = db8221a_ctrl.fixed_fps_val; - db8221a_ctrl.fixed_fps_val = cam_info->value_1; - break; - default: - pr_err("%s: %d unsupport mode : %d\n", __func__, __LINE__, cam_info->mode); - //rc = -EINVAL; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("%s : %d EXIT", __func__, __LINE__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.h b/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.h deleted file mode 100755 index df7d5eafba6e..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/db8221a_yuv.h +++ /dev/null @@ -1,3970 +0,0 @@ -/* DB8221A_regs_goya.h - * - * Driver for DB8221A (2MP Camera) from dongbu - * - * Copyright (C) 2015, SAMSUNG ELECTRONICS - * - * 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. - * - */ - -#ifndef _DB8221A_REGS_H_ -#define _DB8221A_REGS_H_ - -#if defined(CONFIG_SEC_GTES_PROJECT) -#define INIT_RES_800_600 -#endif - -#if defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -#define MIPI_CLK_277MHZ -#endif - -/*==============================================*/ -/* CAMERA_Init */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr -#if defined(INIT_RES_800_600) - {0x14, 0x06}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x40}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#else - {0x14, 0x05}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x00}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#endif - -/*===================================*/ -/* For Analog Setting */ -/*===================================*/ - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - -/*==================================*/ -/* ADF Anlog */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - -/*==================================*/ -/* Line Length & Flip */ -/*==================================*/ - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - -/*==================================*/ -/* AE Gain Table */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // x1.8 - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - {0xDB, 0x0E}, // x2.0 - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - {0xDE, 0x0E}, // x3.0 - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - {0xE1, 0x0F}, // x4.0 - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - {0xE4, 0x0A}, // x5.0 - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - {0xE7, 0x0E}, // x6.0 - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - {0xEA, 0x0F}, // x7.0 - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - {0xED, 0x0F}, // x8.0 - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - {0xF0, 0x0F}, // x9.0 - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - -/*==================================*/ -/* AE */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0x07, 0x01}, // Variable Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x03}, // MinFrame 8fps - {0x7F, 0x21}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x01}, // SCLHorScale -#if defined(INIT_RES_800_600) - {0x55, 0xFF}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0xFF}, // -#else - {0x55, 0x99}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0x99}, // -#endif - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // -#if defined(INIT_RES_800_600) - {0x5C, 0x03}, // SCLCropEndX - {0x5D, 0x20}, // - {0x5E, 0x02}, // SCLCropEndY - {0x5F, 0x58}, // -#else - {0x5C, 0x02}, // SCLCropEndX - {0x5D, 0x80}, // - {0x5E, 0x01}, // SCLCropEndY - {0x5F, 0xE0}, // -#endif - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_Init - VT Call Initial 셋팅 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_VT_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr - {0x14, 0x01}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x60}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 - - //=================================== - // For Analog Setting - //=================================== - //Bayer Setting - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - // Pixel - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - // CDS - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - // CPGA - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - // Qt_rst, Qt_sig - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - //IClamp - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - // RAMP - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - // qbitline - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - // Line buffer - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - // Scanlath - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - // LineStart - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - // MIPI - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - - //================================== - // ADF Anlog - //================================== - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - - //================================== - // Line Length & Flip - //================================== - //LineLength - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - - //================================== - // AE Gain Table - //================================== - //Table1 X1.8 - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - //Table2 X2 - {0xDB, 0x0E}, // - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - //Table3 X3 - {0xDE, 0x0E}, // - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - //Table4 X4 - {0xE1, 0x0F}, // - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - //Table5 X5 - {0xE4, 0x0A}, // - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - //Table6 X6 - {0xE7, 0x0E}, // - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - //Table7 X7 - {0xEA, 0x0F}, // - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - //Table8 X8 - {0xED, 0x0F}, // - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - //Table9 X9 - {0xF0, 0x0F}, // - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - - //================================== - // AE - //================================== - {0xFF, 0x93}, // Page - {0x07, 0x02}, // Fixed Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x05}, // MinFrame 15fps - {0x7F, 0xDD}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - //D65 - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - //A light - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - //Out door CCM - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - // BGT2 - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - // SAT for Gamut - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - // VGA_PR - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x00}, //SCLHorScale - {0x55, 0x71}, // - {0x56, 0x00}, //SCLVerScale - {0x57, 0x7B}, // - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // - {0x5C, 0x00}, //SCLCropEndX - {0x5D, 0xB0}, // - {0x5E, 0x00}, //SCLCropEndY - {0x5F, 0x90}, // - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - // SXGA_PR - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 800x600) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_800_600[]= { - -// 80{0x60, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x16}, // Wait 25 -#else - {0xFE, 0x64}, // Wait 100 -#endif - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x32}, // Wait 50 - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - - {0xFE, 0x16}, // Wait 25 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#endif - - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 704x576) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_704_576[] = { - -// 704x576_PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xC3}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xEC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0xC0}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x40}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 640x480) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_640_480[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0x99}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - -#if defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x16}, // Wait 25 -#else - {0xFE, 0x64}, // Wait 100 -#endif - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#if defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x32}, // Wait 50 - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0x99}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xFE, 0x16}, // Wait 25 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on -#endif -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 352x288) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_352_288[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0xC0}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xE1}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xF5}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x60}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0x20}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 320x240) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_320_240[] = { - // 320x240 Size - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xCC}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xCC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x40}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0xF0}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 176x144) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_176_144[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x01}, - {0x15, 0x60}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0x70}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0x7A}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x00}, // SCLCropEndX - {0xC8, 0xB0}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0x90}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_SNAPSHOT (Size : 1600x1200) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_1600_1200[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x0C}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x00}, // SCLCtrl - {0xBF, 0x03}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x05}, // SCLCropEndX - {0xC8, 0x00}, - {0xC9, 0x04}, // SCLCropEndY - {0xCA, 0x00}, - - {0xFE, 0x96}, // Wait 150 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -struct msm_camera_i2c_reg_conf db8221a_Capture_1600_1200_for_24fps[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0x92}, - {0xED, 0x10}, // Func - - {0xFF, 0xE4}, - {0x14, 0x0C}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xE4, 0x05}, // - {0xE5, 0xF6}, // - {0xBE, 0x00}, // SCLCtrl - {0xBF, 0x03}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x05}, // SCLCropEndX - {0xC8, 0x00}, - {0xC9, 0x04}, // SCLCropEndY - {0xCA, 0x00}, - - {0xEA, 0x00}, // X Sub-Sampling - {0xEB, 0x00}, // Y Sub-Sampling - {0xFE, 0x96}, // Wait 150 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_STREAM_STOP */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_stream_stop[]= { - - {0xFF, 0xE4}, - {0x04, 0x00}, -}; - - -/*==============================================*/ -/* CAMERA_I2C_CHECK - for ESD */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_DTP_On[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0x00}, // BayerFunc - {0xBA, 0x28}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x05}, // TPG Gamma - - {0xFE, 0x64}, // Wait 100ms -}; - -struct msm_camera_i2c_reg_conf db8221a_DTP_Off[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0xFF}, // BayerFunc - {0xBA, 0xFF}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x00}, // TPG Disable - - {0xFE, 0x64}, // Wait 100 -}; - - -/*==============================================*/ -/* CAMERA_Flip_X */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_X_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x01}, // X-Flip - -}; - - -/*==============================================*/ -/* CAMERA_Flip_Y */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_Y_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x02}, // Y-Flip - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m4[] = { - -// Brightness -4 - {0xFF, 0x98}, // Page mode - {0xBC, 0xB8}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_2 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m3[] = { - -// Brightness -3 - {0xFF, 0x98}, // Page mode - {0xBC, 0xCA}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_3 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m2[] = { - -// Brightness -2 - {0xFF, 0x98}, // Page mode - {0xBC, 0xDC}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_4 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m1[] = { - -// Brightness -1 - {0xFF, 0x98}, // Page mode - {0xBC, 0xEE}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_5 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_default[] = { - -// Brightness 0 - {0xFF, 0x98}, // Page mode - {0xBC, 0x00}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_6 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p1[] = { - -// Brightness +1 - {0xFF, 0x98}, // Page mode - {0xBC, 0x12}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_7 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p2[] = { - -// Brightness +2 - {0xFF, 0x98}, // Page mode - {0xBC, 0x24}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_8 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p3[] = { - -// Brightness +3 - {0xFF, 0x98}, // Page mode - {0xBC, 0x36}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_9 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p4[] = { - -// Brightness +4 - {0xFF, 0x98}, // Page mode - {0xBC, 0x48}, // Brightness - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m4[] = { - -// Contrast -4 - {0xFF, 0x98}, // Page mode - {0xBD, 0xA0}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m3[] = { - -// Contrast -3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x98}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m2[] = { - -// Contrast -2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x90}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m1[] = { - -// Contrast -1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x88}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_default[] = { - -// Contrast 0 - {0xFF, 0x98}, // Page mode - {0xBD, 0x80}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p1[] = { - -// Contrast +1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x78}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p2[] = { - - // Contrast +2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x70}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p3[] = { - -// Contrast +3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x68}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p4[] = { - -// Contrast +4 - {0xFF, 0x98}, // Page mode - {0xBD, 0x60}, // Contrast - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_EFFECCT_NORMAL */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_none[] = { - - {0xFF, 0x98}, - {0xCB, 0x00}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_NEGATIVE */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_negative[] = { - - {0xFF, 0x98}, - {0xCB, 0x20}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_GRAY */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_gray[] = { - - {0xFF, 0x98}, - {0xCB, 0x08}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_SEPIA */ -/*==============================================*/ -#if defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x53}, // PEDData2 - {0xCE, 0x98}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#else -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 -#if defined(CONFIG_SEC_GTES_PROJECT) - {0xCD, 0x67}, // PEDData2 -#else - {0xCD, 0x71}, // PEDData2 -#endif - {0xCE, 0x9A}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#endif -/*==============================================*/ -/* CAMERA_EFFECT_AQUA */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_aqua[] = { - - {0xFF, 0x98}, - {0xCB, 0x18}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0xAB}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_AWB_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_auto[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x30}, - {0xDC, 0x01}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, - - {0x5B, 0x06}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_DayLight */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_daylight[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0x48}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x48}, - {0x4E, 0x04}, // Min Bgain - {0x4F, 0x80}, - {0x50, 0x04}, // Max BGain - {0x51, 0x80}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_CLOUDY (í린날) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_cloudy[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xF8}, - {0x50, 0x04}, // Max BGain - {0x51, 0x10}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_FLUORESCENT (형광등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_fluorescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x05}, // Min Bgain - {0x4F, 0xA8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xC0}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_INCA (백열등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_incandescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x20}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x03}, // Min Rgain - {0x4B, 0xD8}, - {0x4C, 0x03}, // Max Rgain - {0x4D, 0xF0}, - {0x4E, 0x06}, // Min Bgain - {0x4F, 0x5F}, - {0x50, 0x06}, // Max BGain - {0x51, 0x77}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_FPS_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_auto_fps[] = { - - {0xFF, 0x93}, - {0x07, 0x01}, // AEMODE - {0x7E, 0x03}, // Min Frame High - {0x7F, 0x21}, // Min Frame Low - - {0x82, 0x0F}, // 60Hz Max - {0x83, 0x0A}, // 60Hz 3 Lut - {0x84, 0x08}, // 60Hz 2 Lut - {0x85, 0x08}, // 60Hz 1 Lut - {0x86, 0x0C}, // 50Hz Max - {0x87, 0x08}, // 50Hz 3 Lut - {0x88, 0x06}, // 50Hz 2 Lut - {0x89, 0x06}, // 50Hz 1 Lut - {0x8A, 0x05}, // 60Hz Max Frame High -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // 60Hz Max Frame Low - {0x8C, 0x05}, // 50Hz Max Frame High - {0x8D, 0x26}, // 50Hz Max Frame Low -#else - {0x8B, 0x04}, // 60Hz Max Frame Low - {0x8C, 0x04}, // 50Hz Max Frame High - {0x8D, 0xF4}, // 50Hz Max Frame Low -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_CAMCORDER */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_24fps_Camcoder[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0x33}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xEA, 0x00}, // HorSubsampling - {0xEB, 0x01}, // VerSubsampling - - -// Fixed Frame - {0xFF, 0x93}, - {0x07, 0x02}, // AEMODE - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x01}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x01}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - {0x79, 0xC0}, // Gain Max - {0x7E, 0x09}, // Min Frame High - {0x7F, 0x61}, // Min Frame Low - - {0x72, 0x0D}, // Sensor clock -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF8}, // -#endif - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - - {0x18, 0x01}, // AESpeed - - {0x1B, 0x08}, //Analog gain Max - - - {0x82, 0x04}, // 60Hz Max - {0x83, 0x04}, // 60Hz 3 Lut - {0x84, 0x04}, // 60Hz 2 Lut - {0x85, 0x04}, // 60Hz 1 Lut - {0x86, 0x03}, // 50Hz Max - {0x87, 0x03}, // 50Hz 3 Lut - {0x88, 0x03}, // 50Hz 2 Lut - {0x89, 0x03}, // 50Hz 1 Lut -#if defined(MIPI_CLK_277MHZ) - {0x8A, 0x03}, // 60Hz Max Frame High - {0x8B, 0x0D}, // 60Hz Max Frame Low - {0x8C, 0x03}, // 50Hz Max Frame High - {0x8D, 0x34}, // 50Hz Max Frame Low -#else - {0x8A, 0x02}, // 60Hz Max Frame High - {0x8B, 0xF3}, // 60Hz Max Frame Low - {0x8C, 0x02}, // 50Hz Max Frame High - {0x8D, 0xD5}, // 50Hz Max Frame Low -#endif - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -struct msm_camera_i2c_reg_conf db8221a_24fps_Camcoder_800_600[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - - {0xEA, 0x00}, // HorSubsampling - {0xEB, 0x01}, // VerSubsampling - - -// Fixed Frame - {0xFF, 0x93}, - {0x07, 0x02}, // AEMODE - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x01}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x01}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - {0x79, 0xC0}, // Gain Max - {0x7E, 0x09}, // Min Frame High - {0x7F, 0x61}, // Min Frame Low - - {0x72, 0x0D}, // Sensor clock -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF8}, // -#endif - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - - {0x18, 0x01}, // AESpeed - - {0x1B, 0x08}, //Analog gain Max - - - {0x82, 0x04}, // 60Hz Max - {0x83, 0x04}, // 60Hz 3 Lut - {0x84, 0x04}, // 60Hz 2 Lut - {0x85, 0x04}, // 60Hz 1 Lut - {0x86, 0x03}, // 50Hz Max - {0x87, 0x03}, // 50Hz 3 Lut - {0x88, 0x03}, // 50Hz 2 Lut - {0x89, 0x03}, // 50Hz 1 Lut -#if defined(MIPI_CLK_277MHZ) - {0x8A, 0x03}, // 60Hz Max Frame High - {0x8B, 0x0D}, // 60Hz Max Frame Low - {0x8C, 0x03}, // 50Hz Max Frame High - {0x8D, 0x34}, // 50Hz Max Frame Low -#else - {0x8A, 0x02}, // 60Hz Max Frame High - {0x8B, 0xF3}, // 60Hz Max Frame Low - {0x8C, 0x02}, // 50Hz Max Frame High - {0x8D, 0xD5}, // 50Hz Max Frame Low -#endif - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_50Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_50Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x05}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x4B}, - {0x1F, 0x14}, -#else - {0x1E, 0x74}, - {0x1F, 0x7C}, -#endif - {0x08, 0x3D}, // 50Hz - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_60Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_60Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x04}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x69}, - {0x1F, 0x3B}, -#else - {0x1E, 0x8B}, - {0x1F, 0xBC}, -#endif - {0x08, 0x3F}, // 60Hz - -}; - - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_matrix[] = { - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_center[] = { - -// AE : Center - {0xFF, 0x93}, - {0x0B, 0x11}, //Weight_0 - {0x0C, 0x11}, //Weight_1 - {0x0D, 0x11}, //Weight_2 - {0x0E, 0xC8}, //Weight_3 - {0x0F, 0x18}, //Weight_4 - {0x10, 0xC1}, //Weight_5 - {0x11, 0xCF}, //Weight_6 - {0x12, 0x11}, //Weight_7 - {0x13, 0xC8}, //Weight_8 - {0x14, 0x18}, //Weight_9 - {0x15, 0x11}, //Weight_10 - {0x16, 0x11}, //Weight_11 - {0x17, 0x01}, //Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_spot[] = { - -// AE : Spot - {0xFF, 0x93}, - {0x0B, 0x00}, //Weight_0 - {0x0C, 0x00}, //Weight_1 - {0x0D, 0x00}, //Weight_2 - {0x0E, 0x11}, //Weight_3 - {0x0F, 0x01}, //Weight_4 - {0x10, 0x10}, //Weight_5 - {0x11, 0x1F}, //Weight_6 - {0x12, 0x00}, //Weight_7 - {0x13, 0x11}, //Weight_8 - {0x14, 0x01}, //Weight_9 - {0x15, 0x00}, //Weight_10 - {0x16, 0x00}, //Weight_11 - {0x17, 0x00}, //Weight_12 - -}; - -#endif /* _DB8221A_REGS_H_ */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/Makefile b/drivers/media/platform/msm/camera_v2/sensor/eeprom/Makefile index 16290200a8d9..de843fb87088 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/Makefile +++ b/drivers/media/platform/msm/camera_v2/sensor/eeprom/Makefile @@ -2,4 +2,3 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2 ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci obj-$(CONFIG_MSM_EEPROM) += msm_eeprom.o -obj-$(CONFIG_MSM_OTP) += msm_otp.o \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.c b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.c index f2cd88b13fb4..fc6fc5a252db 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.c +++ b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -14,312 +14,17 @@ #include #include #include -#include #include "msm_sd.h" #include "msm_cci.h" #include "msm_eeprom.h" #undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else #define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#if defined(CONFIG_SEC_XCOVER3_PROJECT) -#define EEPROM_CAM_PIN_USE -#endif - -#if defined(CONFIG_EEPROM_CAMERA_QUP_I2C) -#define EEPROM_QUP_I2C -#define MAX_READ_SIZE 3824 -#endif DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -struct msm_eeprom_ctrl_t *g_ectrl[MAX_CAMERAS]; - -void *msm_get_eeprom_data_base(int id, uint32_t *size) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - e_ctrl = g_ectrl[id]; - if (!e_ctrl || !size) - return NULL; - - *size = e_ctrl->cal_data.num_data; - return e_ctrl->cal_data.mapdata; -} - -/** - * msm_eeprom_parse_memory_map() - parse memory map in device node - * @of: device node - * @str: id string - * @data: memory block for output - * - * This functions parses @of to fill @data. It allocates map itself, parses - * the @of node, calculate total data length, and allocates required buffer. - * It only fills the map, but does not perform actual reading. - */ -static int msm_eeprom_parse_memory_map(struct device_node *of, const char *str, - struct msm_eeprom_memory_block_t *data) -{ - int i, rc = 0; - char property[PROPERTY_MAXSIZE]; - uint32_t count = 6; - struct msm_eeprom_memory_map_t *map; - uint32_t total_size = 0; - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-num-blocks", str); - rc = of_property_read_u32(of, property, &data->num_map); - CDBG("%s: %s %d\n", __func__, property, data->num_map); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-page%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-poll%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-mem%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - - CDBG("%s num_bytes %d\n", __func__, data->num_data); - - // if total-size is defined at dtsi file. - // set num_data as total-size - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - CDBG("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - CDBG("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - - -#if defined(CONFIG_SEC_J5X_PROJECT) -struct msm_eeprom_crc_check crc_data[EEPROM_CRC_DATA_BLOCKS_NUM] = -{ - [0] = { .data_addr = 0xFC, .data_size = 4, - .check_range_start = 0x00, - .check_range_end = 0x5F, - }, - - [1] = { .data_addr = 0x8FC, .data_size = 4, - .check_range_start = 0x100, - .check_range_end = 0x8AF, - }, - - [2] = { .data_addr = 0x9FC, .data_size = 4, - .check_range_start = 0x900, - .check_range_end = 0x91F, - }, - - [3] = { .data_addr = 0x11FC, .data_size = 4, - .check_range_start = 0xA00, - .check_range_end = 0x10FF, - } -}; - -/** -* format eeprom data for CRC check -*/ -static int format_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int i = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - - block->num_map = EEPROM_CRC_DATA_BLOCKS_NUM*2; - - for( i=0; imap, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - int j; - struct msm_eeprom_memory_map_t *emap = block->map; - uint8_t *memptr = block->mapdata; -#ifdef EEPROM_QUP_I2C - uint32_t size = 0; -#endif - - pr_err("%s Enter \n", __func__); - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].page.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].page.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), emap[j].page.addr, - emap[j].page.data, emap[j].page.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].page.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].page.delay); - if (rc < 0) { - pr_err("%s: page write failed\n", __func__); - return rc; - } - } - - if (emap[j].poll.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].poll.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &(e_ctrl->i2c_client), emap[j].poll.addr, - emap[j].poll.data, emap[j].poll.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].poll.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].poll.delay); - if (rc < 0) { - pr_err("%s: poll failed\n", __func__); - return rc; - } - } - - if (emap[j].mem.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].mem.addr_t; - -#ifdef EEPROM_QUP_I2C - /* In A8 Project, EEPROM uses QUP I2C, QUP supports 3825bytes I2C read at a time, - Here 4608Bytes will be read from EEPROM, So 4608Bytes are divided into two parts, - 3824 bytes and 784 bytes. */ - if(emap[j].mem.valid_size > MAX_READ_SIZE) - { - memptr = block->mapdata + emap[j].mem.addr; - size = MAX_READ_SIZE; - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)emap[j].mem.addr, (uint32_t)memptr, size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - - size = emap[j].mem.valid_size - MAX_READ_SIZE; - memptr += MAX_READ_SIZE; - - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)(emap[j].mem.addr + MAX_READ_SIZE), (uint32_t)memptr, size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client),(emap[j].mem.addr + MAX_READ_SIZE) , - memptr, size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += size; - } - else - { - memptr = block->mapdata + emap[j].mem.addr; - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)emap[j].mem.addr, (uint32_t)memptr, emap[j].mem.valid_size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; - } -#else - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - pr_err("%s %d \n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; -#endif - } - } -#if defined(CONFIG_SEC_J5X_PROJECT) - if( e_ctrl->subdev_id == 0) // for rear sensor only - { - rc = format_eeprom_data(e_ctrl,block); - if(rc<0) - pr_err("%s: format failed\n", __func__); - } -#endif - pr_err("%s Exit \n", __func__); - return rc; -} - /** * msm_eeprom_verify_sum - verify crc32 checksum * @mem: data buffer @@ -330,7 +35,7 @@ static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, */ static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) { - uint32_t crc = ~0UL; + uint32_t crc = ~0; /* check overflow */ if (size > crc - sizeof(uint32_t)) @@ -338,8 +43,7 @@ static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) crc = crc32_le(crc, mem, size); if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); + CDBG("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); return -EINVAL; } CDBG("%s: checksum pass 0x%x\n", __func__, sum); @@ -361,7 +65,7 @@ static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) int j, rc; uint32_t *sum; uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; + uint8_t *memptr; struct msm_eeprom_memory_map_t *map; if (!data) { @@ -369,107 +73,55 @@ static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) return -EINVAL; } map = data->map; + memptr = data->mapdata; for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) continue; - - sum = (uint32_t *)memptr_crc; - pr_err("%s : j= %d map[j].mem.valid_size = %d, map[j+1].mem.valid_size = %d \n",__func__,j,map[j].mem.valid_size,map[j+1].mem.valid_size); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size,*sum); - if (!rc) { - ret |= 1 << (j/2); + if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { + memptr += map[j].mem.valid_size + + map[j+1].mem.valid_size; + continue; } + if (map[j+1].mem.valid_size != sizeof(uint32_t)) { + CDBG("%s: malformatted data mapping\n", __func__); + return -EINVAL; + } + sum = (uint32_t *) (memptr + map[j].mem.valid_size); + rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, + *sum); + if (!rc) + ret |= 1 << (j/2); + memptr += map[j].mem.valid_size + map[j+1].mem.valid_size; } return ret; } -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - - pr_info("%s: read 0x%02X%02X, check Fidelix 16M:0x%02X%02X, Winbond 8M:0x%02X%02X, Winbond 16M:0x%02X%02X\n", __func__, - id[0], id[1], client->spi_client->mfr_id0, client->spi_client->device_id0, - client->spi_client->mfr_id1, client->spi_client->device_id1, - client->spi_client->mfr_id2, client->spi_client->device_id2); - - if ((id[0] == client->spi_client->mfr_id0 && id[1] == client->spi_client->device_id0) - || (id[0] == client->spi_client->mfr_id1 && id[1] == client->spi_client->device_id1) - || (id[0] == client->spi_client->mfr_id2 && id[1] == client->spi_client->device_id2)) - return 0; - - return -ENODEV; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl, bool *down) +static int msm_eeprom_get_cmm_data(struct msm_eeprom_ctrl_t *e_ctrl, + struct msm_eeprom_cfg_data *cdata) { int rc = 0; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - rc = msm_eeprom_match_id(e_ctrl); - pr_warn("%s : E", __func__); - - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || rc < 0) { - if (down) *down = true; - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - } else { - if (down) *down = false; - } + struct msm_eeprom_cmm_t *cmm_data = &e_ctrl->eboard_info->cmm_data; + cdata->cfg.get_cmm_data.cmm_support = cmm_data->cmm_support; + cdata->cfg.get_cmm_data.cmm_compression = cmm_data->cmm_compression; + cdata->cfg.get_cmm_data.cmm_size = cmm_data->cmm_size; return rc; } -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl, bool down) -{ - pr_warn("%s : E", __func__); - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || down) - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - else - return 0; -} - static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) + struct msm_eeprom_cfg_data *cdata) { int rc; /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); + if (cdata->cfg.read_data.num_bytes > + e_ctrl->cal_data.num_data) { + CDBG("%s: Invalid size. exp %u, req %u\n", __func__, + e_ctrl->cal_data.num_data, + cdata->cfg.read_data.num_bytes); return -EINVAL; } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); + if (!e_ctrl->cal_data.mapdata) return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); rc = copy_to_user(cdata->cfg.read_data.dbuffer, e_ctrl->cal_data.mapdata, cdata->cfg.read_data.num_bytes); @@ -477,281 +129,23 @@ static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, return rc; } -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - bool down; - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } -#ifdef EEPROM_CAM_PIN_USE - if (query_cam_power_status() == 0) { - rc = msm_eeprom_power_up(e_ctrl, &down); - } -#else - rc = msm_eeprom_power_up(e_ctrl, &down); -#endif - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf, cdata->cfg.read_data.num_bytes); - CDBG("%s: read data, rc addr = 0x%pK %d %d\n", __func__, (void*)cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes, rc); - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: -#ifdef EEPROM_CAM_PIN_USE - if (query_cam_power_status() == 0) { - msm_eeprom_power_down(e_ctrl, down); - } -#else - msm_eeprom_power_down(e_ctrl, down); -#endif -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; -#if 0 // just once to power up when load lib - bool down; -#endif - - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if 0 // just once to power up when load lib - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } -#endif - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf_comp, cdata->cfg.read_data.comp_size); - - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl, down); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - bool down; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - compressed_buf, compressed_size); - - // write CRC32 for compressed data - rc |= e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size, - (uint8_t *)&crc, 4); - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - buf, cdata->cfg.write_data.num_bytes); - } - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - bool down; - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl, down); - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - CDBG("%s:%d Enter\n", __func__, __LINE__); - /* check eeprom id */ - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) { - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - return rc; - } - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - return rc; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s:%d Exit\n", __func__, __LINE__); - return rc; -} - static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) + void __user *argp) { struct msm_eeprom_cfg_data *cdata = (struct msm_eeprom_cfg_data *)argp; int rc = 0; size_t length = 0; - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); + CDBG("%s E\n", __func__); switch (cdata->cfgtype) { case CFG_EEPROM_GET_INFO: CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); cdata->is_supported = e_ctrl->is_supported; length = strlen(e_ctrl->eboard_info->eeprom_name) + 1; if (length > MAX_EEPROM_NAME) { - pr_err("%s:%d invalid eeprom_name length %d\n", - __func__,__LINE__, (int)length); + pr_err("%s:%d invalid eeprom name length %d\n", + __func__, __LINE__, (int)length); rc = -EINVAL; break; } @@ -767,52 +161,9 @@ static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); rc = eeprom_config_read_cal_data(e_ctrl, cdata); break; - case CFG_EEPROM_READ_DATA: - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before%X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after%X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_ERASESIZE: - CDBG("%s E CFG_EEPROM_GET_ERASESIZE\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->i2c_client.spi_client->erase_size; - break; - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl, NULL); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl, true); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); + case CFG_EEPROM_GET_MM_INFO: + CDBG("%s E CFG_EEPROM_GET_MM_INFO\n", __func__); + rc = msm_eeprom_get_cmm_data(e_ctrl, cdata); break; default: break; @@ -843,7 +194,7 @@ static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); void __user *argp = (void __user *)arg; CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); + CDBG("%s:%d a_ctrl %p argp %p\n", __func__, __LINE__, e_ctrl, argp); switch (cmd) { case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: return msm_eeprom_get_subdev_id(e_ctrl, argp); @@ -853,74 +204,252 @@ static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, return -ENOIOCTLCMD; } - CDBG("%s X\n", __func__); -} + CDBG("%s X\n", __func__); +} + +static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { + .i2c_read = msm_camera_cci_i2c_read, + .i2c_read_seq = msm_camera_cci_i2c_read_seq, + .i2c_write = msm_camera_cci_i2c_write, + .i2c_write_seq = msm_camera_cci_i2c_write_seq, + .i2c_write_table = msm_camera_cci_i2c_write_table, + .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, + .i2c_write_table_w_microdelay = + msm_camera_cci_i2c_write_table_w_microdelay, + .i2c_util = msm_sensor_cci_i2c_util, + .i2c_poll = msm_camera_cci_i2c_poll, +}; + +static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { + .i2c_read = msm_camera_qup_i2c_read, + .i2c_read_seq = msm_camera_qup_i2c_read_seq, + .i2c_write = msm_camera_qup_i2c_write, + .i2c_write_table = msm_camera_qup_i2c_write_table, + .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, + .i2c_write_table_w_microdelay = + msm_camera_qup_i2c_write_table_w_microdelay, +}; + +static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { + .i2c_read = msm_camera_spi_read, + .i2c_read_seq = msm_camera_spi_read_seq, +}; + +static int msm_eeprom_open(struct v4l2_subdev *sd, + struct v4l2_subdev_fh *fh) { + int rc = 0; + struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); + CDBG("%s E\n", __func__); + if (!e_ctrl) { + pr_err("%s failed e_ctrl is NULL\n", __func__); + return -EINVAL; + } + CDBG("%s X\n", __func__); + return rc; +} + +static int msm_eeprom_close(struct v4l2_subdev *sd, + struct v4l2_subdev_fh *fh) { + int rc = 0; + struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); + CDBG("%s E\n", __func__); + if (!e_ctrl) { + pr_err("%s failed e_ctrl is NULL\n", __func__); + return -EINVAL; + } + CDBG("%s X\n", __func__); + return rc; +} + +static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { + .open = msm_eeprom_open, + .close = msm_eeprom_close, +}; +/** + * read_eeprom_memory() - read map data into buffer + * @e_ctrl: eeprom control struct + * @block: block to be read + * + * This function iterates through blocks stored in block->map, reads each + * region and concatenate them into the pre-allocated block->mapdata + */ +static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, + struct msm_eeprom_memory_block_t *block) +{ + int rc = 0; + int j; + struct msm_eeprom_memory_map_t *emap = block->map; + struct msm_eeprom_board_info *eb_info; + uint8_t *memptr = block->mapdata; + + if (!e_ctrl) { + pr_err("%s e_ctrl is NULL", __func__); + return -EINVAL; + } + + eb_info = e_ctrl->eboard_info; + + for (j = 0; j < block->num_map; j++) { + if (emap[j].saddr.addr) { + eb_info->i2c_slaveaddr = emap[j].saddr.addr; + e_ctrl->i2c_client.cci_client->sid = + eb_info->i2c_slaveaddr >> 1; + pr_err("qcom,slave-addr = 0x%X\n", + eb_info->i2c_slaveaddr); + } + + if (emap[j].page.valid_size) { + e_ctrl->i2c_client.addr_type = emap[j].page.addr_t; + rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( + &(e_ctrl->i2c_client), emap[j].page.addr, + emap[j].page.data, emap[j].page.data_t); + msleep(emap[j].page.delay); + if (rc < 0) { + pr_err("%s: page write failed\n", __func__); + return rc; + } + } + if (emap[j].pageen.valid_size) { + e_ctrl->i2c_client.addr_type = emap[j].pageen.addr_t; + rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( + &(e_ctrl->i2c_client), emap[j].pageen.addr, + emap[j].pageen.data, emap[j].pageen.data_t); + msleep(emap[j].pageen.delay); + if (rc < 0) { + pr_err("%s: page enable failed\n", __func__); + return rc; + } + } + if (emap[j].poll.valid_size) { + e_ctrl->i2c_client.addr_type = emap[j].poll.addr_t; + rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_poll( + &(e_ctrl->i2c_client), emap[j].poll.addr, + emap[j].poll.data, emap[j].poll.data_t); + msleep(emap[j].poll.delay); + if (rc < 0) { + pr_err("%s: poll failed\n", __func__); + return rc; + } + } + + if (emap[j].mem.valid_size) { + e_ctrl->i2c_client.addr_type = emap[j].mem.addr_t; + rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( + &(e_ctrl->i2c_client), emap[j].mem.addr, + memptr, emap[j].mem.valid_size); + if (rc < 0) { + pr_err("%s: read failed\n", __func__); + return rc; + } + memptr += emap[j].mem.valid_size; + } + if (emap[j].pageen.valid_size) { + e_ctrl->i2c_client.addr_type = emap[j].pageen.addr_t; + rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( + &(e_ctrl->i2c_client), emap[j].pageen.addr, + 0, emap[j].pageen.data_t); + if (rc < 0) { + pr_err("%s: page disable failed\n", __func__); + return rc; + } + } + } + return rc; +} +/** + * msm_eeprom_parse_memory_map() - parse memory map in device node + * @of: device node + * @data: memory block for output + * + * This functions parses @of to fill @data. It allocates map itself, parses + * the @of node, calculate total data length, and allocates required buffer. + * It only fills the map, but does not perform actual reading. + */ +static int msm_eeprom_parse_memory_map(struct device_node *of, + struct msm_eeprom_memory_block_t *data) +{ + int i, rc = 0; + char property[PROPERTY_MAXSIZE]; + uint32_t count = 6; + struct msm_eeprom_memory_map_t *map; + + snprintf(property, PROPERTY_MAXSIZE, "qcom,num-blocks"); + rc = of_property_read_u32(of, property, &data->num_map); + CDBG("%s: %s %d\n", __func__, property, data->num_map); + if (rc < 0) { + pr_err("%s failed rc %d\n", __func__, rc); + return rc; + } + + map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); + if (!map) { + pr_err("%s failed line %d\n", __func__, __LINE__); + return -ENOMEM; + } + data->map = map; -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; + for (i = 0; i < data->num_map; i++) { + snprintf(property, PROPERTY_MAXSIZE, "qcom,page%d", i); + rc = of_property_read_u32_array(of, property, + (uint32_t *) &map[i].page, count); + if (rc < 0) { + pr_err("%s: failed %d\n", __func__, __LINE__); + goto ERROR; + } -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; + snprintf(property, PROPERTY_MAXSIZE, + "qcom,pageen%d", i); + rc = of_property_read_u32_array(of, property, + (uint32_t *) &map[i].pageen, count); + if (rc < 0) + pr_err("%s: pageen not needed\n", __func__); -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; + snprintf(property, PROPERTY_MAXSIZE, "qcom,saddr%d", i); + rc = of_property_read_u32_array(of, property, + (uint32_t *) &map[i].saddr.addr, 1); + if (rc < 0) + CDBG("%s: saddr not needed - block %d\n", __func__, i); -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; + snprintf(property, PROPERTY_MAXSIZE, "qcom,poll%d", i); + rc = of_property_read_u32_array(of, property, + (uint32_t *) &map[i].poll, count); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR; + } + + snprintf(property, PROPERTY_MAXSIZE, "qcom,mem%d", i); + rc = of_property_read_u32_array(of, property, + (uint32_t *) &map[i].mem, count); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR; + } + data->num_data += map[i].mem.valid_size; } - CDBG("%s X\n", __func__); - return rc; -} -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; + CDBG("%s num_bytes %d\n", __func__, data->num_data); + + data->mapdata = kzalloc(data->num_data, GFP_KERNEL); + if (!data->mapdata) { + pr_err("%s failed line %d\n", __func__, __LINE__); + rc = -ENOMEM; + goto ERROR; } - CDBG("%s X\n", __func__); return rc; -} -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; +ERROR: + kfree(data->map); + memset(data, 0, sizeof(*data)); + return rc; +} static struct msm_cam_clk_info cam_8960_clk_info[] = { [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, }; static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, + [SENSOR_CAM_MCLK] = {"cam_src_clk", 19200000}, [SENSOR_CAM_CLK] = {"cam_clk", 0}, }; @@ -932,103 +461,54 @@ static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { .core = &msm_eeprom_subdev_core_ops, }; -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - #define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ { \ - rc = of_property_read_u32_array( \ + if (of_property_read_u32_array( \ spic->spi_master->dev.of_node, \ - str, out, size); \ - if (rc < 0) \ - return rc; \ + str, out, size)) { \ + return -EFAULT; \ + } else { \ spic->cmd_tbl.name.opcode = out[0]; \ spic->cmd_tbl.name.addr_len = out[1]; \ spic->cmd_tbl.name.dummy_len = out[2]; \ - spic->cmd_tbl.name.delay_intv = out[3]; \ - spic->cmd_tbl.name.delay_count = out[4]; \ + } \ } static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) { int rc = -EFAULT; - uint32_t tmp[5]; - struct device_node *of = spic->spi_master->dev.of_node; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-read", read, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readseq", read_seq, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-queryid", query_id, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-pprog", - page_program, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-wenable", - write_enable, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readst", - read_status, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-erase", erase, tmp, 5); - - rc = of_property_read_u32(of, "qcom,spi-busy-mask", tmp); - if (rc < 0) { - pr_err("%s: Failed to get busy mask\n", __func__); - return rc; - } - spic->busy_mask = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-page-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get page size\n", __func__); - return rc; - } - spic->page_size = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-erase-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get erase size\n", __func__); - return rc; - } - spic->erase_size = tmp[0]; + uint32_t tmp[3]; + msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,read", read, tmp, 3); + msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,readseq", read_seq, tmp, 3); + msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,queryid", query_id, tmp, 3); - rc = of_property_read_u32_array(of, "qcom,eeprom-id0", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 0\n", __func__); + rc = of_property_read_u32_array(spic->spi_master->dev.of_node, + "qcom,eeprom-id", tmp, 2); + if (rc) { + pr_err("%s: Failed to get eeprom id\n", __func__); return rc; } spic->mfr_id0 = tmp[0]; spic->device_id0 = tmp[1]; - rc = of_property_read_u32_array(of, "qcom,eeprom-id1", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 1\n", __func__); - return rc; - } - spic->mfr_id1 = tmp[0]; - spic->device_id1 = tmp[1]; + return 0; +} - rc = of_property_read_u32_array(of, "qcom,eeprom-id2", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 2\n", __func__); +static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) +{ + int rc; + struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; + uint8_t id[2]; + + rc = msm_camera_spi_query_id(client, 0, &id[0], 2); + if (rc < 0) return rc; - } - spic->mfr_id2 = tmp[0]; - spic->device_id2 = tmp[1]; + CDBG("%s: read 0x%x 0x%x, check 0x%x 0x%x\n", __func__, id[0], + id[1], client->spi_client->mfr_id0, + client->spi_client->device_id0); + if (id[0] != client->spi_client->mfr_id0 + || id[1] != client->spi_client->device_id0) + return -ENODEV; return 0; } @@ -1041,7 +521,7 @@ static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) &e_ctrl->eboard_info->power_info; struct device_node *of_node = NULL; struct msm_camera_gpio_conf *gconf = NULL; - int16_t gpio_array_size = 0; + uint16_t gpio_array_size = 0; uint16_t *gpio_array = NULL; eb_info = e_ctrl->eboard_info; @@ -1053,25 +533,24 @@ static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) of_node = e_ctrl->i2c_client.client->dev.of_node; + if (!of_node) { + pr_err("%s: %d of_node is NULL\n", __func__ , __LINE__); + return -ENOMEM; + } rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); + if (rc < 0) return rc; - } rc = msm_camera_get_dt_power_setting_data(of_node, power_info->cam_vreg, power_info->num_vreg, power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); + if (rc < 0) goto ERROR1; - } power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); rc = -ENOMEM; goto ERROR2; } @@ -1079,7 +558,7 @@ static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) gpio_array_size = of_gpio_count(of_node); CDBG("%s gpio count %d\n", __func__, gpio_array_size); - if (gpio_array_size > 0) { + if (gpio_array_size) { gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, GFP_KERNEL); if (!gpio_array) { @@ -1105,27 +584,54 @@ static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) pr_err("%s failed %d\n", __func__, __LINE__); goto ERROR4; } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); kfree(gpio_array); } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); return rc; ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); kfree(gpio_array); ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); kfree(power_info->gpio_conf); ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); kfree(power_info->cam_vreg); ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); kfree(power_info->power_setting); return rc; } + +static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, + struct device_node *of_node) +{ + int rc = 0; + struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; + + cmm_data->cmm_support = + of_property_read_bool(of_node, "qcom,cmm-data-support"); + if (!cmm_data->cmm_support) + return -EINVAL; + cmm_data->cmm_compression = + of_property_read_bool(of_node, "qcom,cmm-data-compressed"); + if (!cmm_data->cmm_compression) + CDBG("No MM compression data\n"); + + rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", + &cmm_data->cmm_offset); + if (rc < 0) + CDBG("No MM offset data\n"); + + rc = of_property_read_u32(of_node, "qcom,cmm-data-size", + &cmm_data->cmm_size); + if (rc < 0) + CDBG("No MM size data\n"); + + CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", + cmm_data->cmm_compression, + cmm_data->cmm_offset, + cmm_data->cmm_size); + return 0; +} + static int msm_eeprom_spi_setup(struct spi_device *spi) { struct msm_eeprom_ctrl_t *e_ctrl = NULL; @@ -1134,7 +640,6 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) struct msm_eeprom_board_info *eb_info; struct msm_camera_power_ctrl_t *power_info = NULL; int rc = 0; - uint32_t temp = 0; e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); if (!e_ctrl) { @@ -1155,10 +660,10 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) rc = of_property_read_u32(spi->dev.of_node, "cell-index", &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); + CDBG("cell-index %d, rc %d\n", e_ctrl->subdev_id, rc); if (rc < 0) { pr_err("failed rc %d\n", rc); - goto spi_free; + return rc; } e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; @@ -1168,10 +673,8 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) client->addr_type = MSM_CAMERA_I2C_3B_ADDR; eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) { - pr_err("%s : eb_info is NULL", __func__); + if (!eb_info) goto spi_free; - } e_ctrl->eboard_info = eb_info; rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", &eb_info->eeprom_name); @@ -1181,6 +684,11 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) pr_err("%s failed %d\n", __func__, __LINE__); goto board_free; } + + rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, spi->dev.of_node); + if (rc < 0) + CDBG("%s MM data miss:%d\n", __func__, __LINE__); + power_info = &eb_info->power_info; power_info->clk_info = cam_8974_clk_info; @@ -1188,10 +696,8 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) power_info->dev = &spi->dev; rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) { - pr_err("%s : msm_eeprom_get_dt_data", __func__); + if (rc < 0) goto board_free; - } /* set spi instruction info */ spi_client->retry_delay = 1; @@ -1205,7 +711,7 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) } /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, "cal", + rc = msm_eeprom_parse_memory_map(spi->dev.of_node, &e_ctrl->cal_data); if (rc < 0) CDBG("%s: no cal memory map\n", __func__); @@ -1242,11 +748,6 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) goto caldata_free; } - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - /* initiazlie subdev */ v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, e_ctrl->i2c_client.spi_client->spi_master, @@ -1255,7 +756,6 @@ static int msm_eeprom_spi_setup(struct spi_device *spi) e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; msm_sd_register(&e_ctrl->msm_sd); @@ -1325,171 +825,115 @@ static int msm_eeprom_spi_remove(struct spi_device *sdev) kfree(e_ctrl); return 0; } -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - pr_err("%s E\n", __func__); - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - e_ctrl = kzalloc(sizeof(struct msm_eeprom_ctrl_t), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - CDBG("%s client = %x\n", __func__, (unsigned int)client); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -ENOMEM; - goto board_free; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto memdata_free; - } - rc = of_property_read_u32(of_node, "cell-index", &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto memdata_free; +#ifdef CONFIG_COMPAT +static int eeprom_config_read_cal_data32(struct msm_eeprom_ctrl_t *e_ctrl, + void __user *arg) +{ + int rc; + uint8_t *ptr_dest = NULL; + struct msm_eeprom_cfg_data32 *cdata32 = + (struct msm_eeprom_cfg_data32 *) arg; + struct msm_eeprom_cfg_data cdata; + + cdata.cfgtype = cdata32->cfgtype; + cdata.is_supported = cdata32->is_supported; + cdata.cfg.read_data.num_bytes = cdata32->cfg.read_data.num_bytes; + /* check range */ + if (cdata.cfg.read_data.num_bytes > + e_ctrl->cal_data.num_data) { + CDBG("%s: Invalid size. exp %u, req %u\n", __func__, + e_ctrl->cal_data.num_data, + cdata.cfg.read_data.num_bytes); + return -EINVAL; } + if (!e_ctrl->cal_data.mapdata) + return -EFAULT; - if (g_ectrl[e_ctrl->subdev_id]) { - pr_err("eeprom id already present!\n"); - goto memdata_free; - } + ptr_dest = (uint8_t *) compat_ptr(cdata32->cfg.read_data.dbuffer); - g_ectrl[e_ctrl->subdev_id] = NULL; + rc = copy_to_user(ptr_dest, e_ctrl->cal_data.mapdata, + cdata.cfg.read_data.num_bytes); - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto memdata_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto memdata_free; - rc = msm_eeprom_parse_memory_map(of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - pr_warn("%s: no cal memory map\n", __func__); - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("%s failed power up %d\n", __func__, __LINE__); - goto memdata_free; - } + return rc; +} - e_ctrl->pvdd_is_en = 0; - of_property_read_u32(of_node, "qcom,pvdd_is_en", &e_ctrl->pvdd_is_en); - if (e_ctrl->pvdd_is_en) { - e_ctrl->pvdd_en = of_get_named_gpio(of_node, "qcom,pvdd_en", 0); +static int msm_eeprom_config32(struct msm_eeprom_ctrl_t *e_ctrl, + void __user *argp) +{ + struct msm_eeprom_cfg_data *cdata = (struct msm_eeprom_cfg_data *)argp; + int rc = 0; + size_t length = 0; - rc = gpio_request(e_ctrl->pvdd_en, "cam_eeprom"); - if (rc) { - pr_err("failed to request about pvdd_en pin. rc = %d\n", rc); - gpio_free(e_ctrl->pvdd_en); - return -ENODEV; + CDBG("%s E\n", __func__); + switch (cdata->cfgtype) { + case CFG_EEPROM_GET_INFO: + CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); + cdata->is_supported = e_ctrl->is_supported; + length = strlen(e_ctrl->eboard_info->eeprom_name) + 1; + if (length > MAX_EEPROM_NAME) { + pr_err("%s:%d invalid eeprom name length %d\n", + __func__, __LINE__, (int)length); + rc = -EINVAL; + break; } - gpio_direction_output(e_ctrl->pvdd_en, 1); - pr_err("%s : pvdd-gpio value = %d\n", __func__, gpio_get_value(e_ctrl->pvdd_en)); + memcpy(cdata->cfg.eeprom_name, + e_ctrl->eboard_info->eeprom_name, length); + break; + case CFG_EEPROM_GET_CAL_DATA: + CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); + cdata->cfg.get_data.num_bytes = + e_ctrl->cal_data.num_data; + break; + case CFG_EEPROM_READ_CAL_DATA: + CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); + rc = eeprom_config_read_cal_data32(e_ctrl, argp); + break; + default: + break; } - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); + CDBG("%s X rc: %d\n", __func__, rc); + return rc; +} - if (e_ctrl->pvdd_is_en) - gpio_free(e_ctrl->pvdd_en); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; +static long msm_eeprom_subdev_ioctl32(struct v4l2_subdev *sd, + unsigned int cmd, void *arg) +{ + struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); + void __user *argp = (void __user *)arg; + + CDBG("%s E\n", __func__); + CDBG("%s:%d a_ctrl %p argp %p\n", __func__, __LINE__, e_ctrl, argp); + switch (cmd) { + case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: + return msm_eeprom_get_subdev_id(e_ctrl, argp); + case VIDIOC_MSM_EEPROM_CFG32: + return msm_eeprom_config32(e_ctrl, argp); + default: + return -ENOIOCTLCMD; } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s Rear Cam e_ctrl->is_supported rc %x\n", __func__, e_ctrl->is_supported); + CDBG("%s X\n", __func__); +} - if (e_ctrl->pvdd_is_en) { - gpio_direction_output(e_ctrl->pvdd_en, 0); - gpio_free(e_ctrl->pvdd_en); - } +static long msm_eeprom_subdev_do_ioctl32( + struct file *file, unsigned int cmd, void *arg) +{ + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - g_ectrl[e_ctrl->subdev_id] = e_ctrl; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -board_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; + return msm_eeprom_subdev_ioctl32(sd, cmd, arg); } + +static long msm_eeprom_subdev_fops_ioctl32(struct file *file, unsigned int cmd, + unsigned long arg) +{ + return video_usercopy(file, cmd, arg, msm_eeprom_subdev_do_ioctl32); +} + +#endif + static int msm_eeprom_platform_probe(struct platform_device *pdev) { int rc = 0; @@ -1515,7 +959,6 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) e_ctrl->is_supported = 0; if (!of_node) { pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); return -EINVAL; } @@ -1524,7 +967,6 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) CDBG("cell-index %d, rc %d\n", pdev->id, rc); if (rc < 0) { pr_err("failed rc %d\n", rc); - kfree(e_ctrl); return rc; } e_ctrl->subdev_id = pdev->id; @@ -1534,14 +976,12 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); if (rc < 0) { pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); return rc; } rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); if (rc < 0) { pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); return rc; } @@ -1554,9 +994,7 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) struct msm_camera_cci_client), GFP_KERNEL); if (!e_ctrl->i2c_client.cci_client) { pr_err("%s failed no memory\n", __func__); - rc = -ENOMEM; - kfree(e_ctrl); - return rc; + return -ENOMEM; } e_ctrl->eboard_info = kzalloc(sizeof( @@ -1574,6 +1012,14 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); power_info->dev = &pdev->dev; + + rc = of_property_read_u32(of_node, "qcom,i2c-freq-mode", + &eb_info->i2c_freq_mode); + if (rc < 0 || (eb_info->i2c_freq_mode >= I2C_MAX_MODES)) { + eb_info->i2c_freq_mode = I2C_STANDARD_MODE; + CDBG("%s Default I2C standard speed mode.\n", __func__); + } + CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); cci_client = e_ctrl->i2c_client.cci_client; cci_client->cci_subdev = msm_cci_get_subdev(); @@ -1581,6 +1027,7 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) cci_client->sid = eb_info->i2c_slaveaddr >> 1; cci_client->retries = 3; cci_client->id_map = 0; + cci_client->i2c_freq_mode = eb_info->i2c_freq_mode; rc = of_property_read_string(of_node, "qcom,eeprom-name", &eb_info->eeprom_name); @@ -1591,11 +1038,15 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) goto board_free; } + rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); + if (rc < 0) + CDBG("%s MM data miss:%d\n", __func__, __LINE__); + rc = msm_eeprom_get_dt_data(e_ctrl); if (rc) goto board_free; - rc = msm_eeprom_parse_memory_map(of_node, "cal", &e_ctrl->cal_data); + rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); if (rc < 0) goto board_free; @@ -1622,12 +1073,6 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) pr_err("failed rc %d\n", rc); goto memdata_free; } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - v4l2_subdev_init(&e_ctrl->msm_sd.sd, e_ctrl->eeprom_v4l2_subdev_ops); v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); @@ -1637,11 +1082,17 @@ static int msm_eeprom_platform_probe(struct platform_device *pdev) snprintf(e_ctrl->msm_sd.sd.name, ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; msm_sd_register(&e_ctrl->msm_sd); +#ifdef CONFIG_COMPAT + msm_eeprom_v4l2_subdev_fops = v4l2_subdev_fops; + msm_eeprom_v4l2_subdev_fops.compat_ioctl32 = + msm_eeprom_subdev_fops_ioctl32; + e_ctrl->msm_sd.sd.devnode->fops = &msm_eeprom_v4l2_subdev_fops; +#endif + e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; CDBG("%s X\n", __func__); return rc; @@ -1686,6 +1137,174 @@ static int msm_eeprom_platform_remove(struct platform_device *pdev) return 0; } +static int msm_eeprom_i2c_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + int rc = 0; + int j = 0; + uint32_t temp; + struct msm_eeprom_ctrl_t *e_ctrl = NULL; + struct msm_camera_power_ctrl_t *power_info = NULL; + struct msm_eeprom_board_info *eb_info = NULL; + struct device_node *of_node = client->dev.of_node; + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { + pr_err("%s i2c_check_functionality failed\n", __func__); + goto probe_failure; + } + + e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); + if (!e_ctrl) { + pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); + return -ENOMEM; + } + e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; + e_ctrl->eeprom_mutex = &msm_eeprom_mutex; + e_ctrl->eboard_info = kzalloc(sizeof( + struct msm_eeprom_board_info), GFP_KERNEL); + if (!e_ctrl->eboard_info) { + pr_err("%s failed line %d\n", __func__, __LINE__); + rc = -ENOMEM; + goto ectrl_free; + } + e_ctrl->is_supported = 0; + if (!client->dev.of_node) { + pr_err("%s dev.of_node NULL\n", __func__); + return -EINVAL; + } + + rc = of_property_read_u32(client->dev.of_node, "cell-index", + &e_ctrl->subdev_id); + CDBG("cell-index %d, rc %d\n", e_ctrl->subdev_id, rc); + if (rc < 0) { + pr_err("failed rc %d\n", rc); + return rc; + } + + rc = of_property_read_u32(client->dev.of_node, "qcom,slave-addr", + &temp); + if (rc < 0) { + pr_err("%s failed rc %d\n", __func__, rc); + return rc; + } + + eb_info = e_ctrl->eboard_info; + power_info = &e_ctrl->eboard_info->power_info; + e_ctrl->i2c_client.client = client; + eb_info->i2c_slaveaddr = temp; + + /* Set device type as I2C */ + e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; + e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; + + rc = of_property_read_string(client->dev.of_node, "qcom,eeprom-name", + &eb_info->eeprom_name); + CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, + eb_info->eeprom_name, rc); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto i2c_board_free; + } + + if (e_ctrl->eboard_info->i2c_slaveaddr != 0) + e_ctrl->i2c_client.client->addr = + e_ctrl->eboard_info->i2c_slaveaddr; + power_info->clk_info = cam_8960_clk_info; + power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); + power_info->dev = &client->dev; + + rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); + if (rc < 0) + CDBG("%s MM data miss:%d\n", __func__, __LINE__); + + rc = msm_eeprom_get_dt_data(e_ctrl); + if (rc) + goto i2c_board_free; + + rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); + if (rc < 0) + goto i2c_board_free; + + rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, + &e_ctrl->i2c_client); + if (rc) { + pr_err("failed rc %d\n", rc); + goto i2c_memdata_free; + } + rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); + if (rc < 0) { + pr_err("%s read_eeprom_memory failed\n", __func__); + goto i2c_power_down; + } + for (j = 0; j < e_ctrl->cal_data.num_data; j++) + CDBG("memory_data[%d] = 0x%X\n", j, + e_ctrl->cal_data.mapdata[j]); + + e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); + + rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, + &e_ctrl->i2c_client); + if (rc) { + pr_err("failed rc %d\n", rc); + goto i2c_memdata_free; + } + /*IMPLEMENT READING PART*/ + /* Initialize sub device */ + v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, + e_ctrl->i2c_client.client, + e_ctrl->eeprom_v4l2_subdev_ops); + v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); + e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; + e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + snprintf(e_ctrl->msm_sd.sd.name, + ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); + media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); + e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; + e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; + msm_sd_register(&e_ctrl->msm_sd); + e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; + return rc; + +i2c_power_down: + msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, + &e_ctrl->i2c_client); +i2c_memdata_free: + kfree(e_ctrl->cal_data.mapdata); + kfree(e_ctrl->cal_data.map); +i2c_board_free: + kfree(e_ctrl->eboard_info); +ectrl_free: + kfree(e_ctrl); +probe_failure: + pr_err("%s failed! rc = %d\n", __func__, rc); + return rc; +} + +static int msm_eeprom_i2c_remove(struct i2c_client *client) +{ + struct v4l2_subdev *sd = i2c_get_clientdata(client); + struct msm_eeprom_ctrl_t *e_ctrl; + if (!sd) { + pr_err("%s: Subdevice is NULL\n", __func__); + return 0; + } + + e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); + if (!e_ctrl) { + pr_err("%s: eeprom device is NULL\n", __func__); + return 0; + } + + kfree(e_ctrl->cal_data.mapdata); + kfree(e_ctrl->cal_data.map); + if (e_ctrl->eboard_info) { + kfree(e_ctrl->eboard_info->power_info.gpio_conf); + kfree(e_ctrl->eboard_info); + } + kfree(e_ctrl); + return 0; +} + static const struct of_device_id msm_eeprom_dt_match[] = { { .compatible = "qcom,eeprom" }, { } @@ -1693,6 +1312,13 @@ static const struct of_device_id msm_eeprom_dt_match[] = { MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); +static const struct of_device_id msm_eeprom_i2c_dt_match[] = { + { .compatible = "qcom,eeprom" }, + { } +}; + +MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); + static struct platform_driver msm_eeprom_platform_driver = { .driver = { .name = "qcom,eeprom", @@ -1703,7 +1329,7 @@ static struct platform_driver msm_eeprom_platform_driver = { }; static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,eeprom", (kernel_ulong_t)NULL}, + { "msm_eeprom", (kernel_ulong_t)NULL}, { } }; @@ -1712,9 +1338,9 @@ static struct i2c_driver msm_eeprom_i2c_driver = { .probe = msm_eeprom_i2c_probe, .remove = msm_eeprom_i2c_remove, .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, + .name = "msm_eeprom", + .owner = THIS_MODULE, + .of_match_table = msm_eeprom_i2c_dt_match, }, }; @@ -1731,17 +1357,13 @@ static struct spi_driver msm_eeprom_spi_driver = { static int __init msm_eeprom_init_module(void) { int rc = 0; - pr_err("%s E\n", __func__); + CDBG("%s E\n", __func__); rc = platform_driver_probe(&msm_eeprom_platform_driver, msm_eeprom_platform_probe); CDBG("%s:%d platform rc %d\n", __func__, __LINE__, rc); -// rc = spi_register_driver(&msm_eeprom_spi_driver); -// CDBG("%s:%d spi rc %d\n", __func__, __LINE__, rc); - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0 /*&& spi_rc < 0*/) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - - return rc; + rc = spi_register_driver(&msm_eeprom_spi_driver); + CDBG("%s:%d spi rc %d\n", __func__, __LINE__, rc); + return i2c_add_driver(&msm_eeprom_i2c_driver); } static void __exit msm_eeprom_exit_module(void) diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.h b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.h index 83c6965e5ba3..9a04f06ae671 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.h +++ b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_eeprom.h @@ -28,19 +28,6 @@ struct msm_eeprom_ctrl_t; static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) #define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 - -#if defined(CONFIG_SEC_J5X_PROJECT) -#define EEPROM_CRC_DATA_BLOCKS_NUM 4 - -struct msm_eeprom_crc_check -{ - u32 data_addr; - u32 data_size; - u32 check_range_start; - u32 check_range_end; -}; -#endif struct msm_eeprom_ctrl_t { struct platform_device *pdev; @@ -54,11 +41,9 @@ struct msm_eeprom_ctrl_t { struct msm_camera_i2c_client i2c_client; struct msm_eeprom_memory_block_t cal_data; - uint16_t is_supported; + uint8_t is_supported; struct msm_eeprom_board_info *eboard_info; uint32_t subdev_id; - int pvdd_en; - int pvdd_is_en; }; #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp.c b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp.c deleted file mode 100644 index d7b6974fbfb8..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp.c +++ /dev/null @@ -1,2244 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#if defined(CONFIG_SR544) -#include "msm_otp_sr544.h" -#elif defined(CONFIG_SR552) -#include "msm_otp_sr552.h" -#else -#include "msm_otp_s5k5e3yx.h" -#endif -#include - -//#define MSM_EEPROM_DEBUG 1 - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#undef EEPROM_MMAP_DEBUG - -uint8_t *map_data = NULL; - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl); -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block); - - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl); -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - pr_err("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - - for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; - - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr_crc); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, *sum); - if (!rc) - { - ret |= 1 << (j/2); - } - } - return ret; -} - -static int msm_eeprom_get_cmm_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &e_ctrl->eboard_info->cmm_data; - cdata->cfg.get_cmm_data.cmm_support = cmm_data->cmm_support; - cdata->cfg.get_cmm_data.cmm_compression = cmm_data->cmm_compression; - cdata->cfg.get_cmm_data.cmm_size = cmm_data->cmm_size; - return rc; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0; - pr_warn("%s : E", __func__); - - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - - return rc; -} -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl) -{ - pr_warn("%s : E", __func__); - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); -} - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) -static int prepare_read_write_data(struct msm_eeprom_ctrl_t *e_ctrl, uint8_t addr_h, uint8_t addr_l, enum msm_camera_i2c_data_type data_type, int isWrite) -{ - int rc=0; - - isWrite = !(!isWrite)+1; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_otp); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - addr_h, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - addr_l, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - isWrite, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - return rc; -} -#endif - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - /* this below code is giving probelm in device -> encrypt -> came launch - Ideally we should not free this data until dtor. so commentiong out */ - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - uint16_t data; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - return rc; -#endif - - buf = kmalloc(cdata->cfg.read_data.num_bytes+1, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on otp\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf[i]=data; - } - -#if !defined(CONFIG_SR544) && !defined(CONFIG_SR552) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - buf[cdata->cfg.read_data.num_bytes] = '\0'; - pr_err("[sjlee] %s : buf[%s]\n", __func__, buf); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_fw_version(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - memset(buf, 0, cdata->cfg.read_data.num_bytes); - if(e_ctrl->cal_data.num_data < (cdata->cfg.read_data.addr + cdata->cfg.read_data.num_bytes)) { - pr_err("%s : requested data size was mismatched! addr:size[0x%x:%d]\n", __func__, cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes); - rc = -ENOMEM; - goto FREE; - } - - memcpy(buf, &map_data[cdata->cfg.read_data.addr], cdata->cfg.read_data.num_bytes); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); - -FREE: - - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - uint16_t data; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.comp_size; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf_comp[i]=data; - } - -#if !defined(CONFIG_SR544) && !defined(CONFIG_SR552) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - if (cdata->cfg.write_data.compress) { - - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - addr_h = ((cdata->cfg.write_data.addr+compressed_size)>>8)&0xFF; - addr_l = (cdata->cfg.write_data.addr+compressed_size)&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } else { - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } -#else - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size+i, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } -#endif - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - - int rc = 0; -#if 0 - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl); -#endif - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - /* power up */ - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - return rc; - } - - /* read cal data */ - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto POWER_DOWN; - } - - /* update support info */ - e_ctrl->is_supported = (msm_eeprom_match_crc(&e_ctrl->cal_data) << 1) | 1; - pr_err("%s:%d is_supported = 0x%X\n", __func__, __LINE__, e_ctrl->is_supported); - -POWER_DOWN: - /* power down */ - if (msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client) < 0) - pr_err("%s:%d pwoer down failed\n", __func__, __LINE__); - pr_err("%s:%d Exit\n", __func__, __LINE__); - - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - - CDBG("%s:%d: subdevid: %d, cfgtype: %d\n",__func__,__LINE__,e_ctrl->subdev_id, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, - sizeof(cdata->cfg.eeprom_name)); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before : %X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after : %X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_MM_INFO: - CDBG("%s E CFG_EEPROM_GET_MM_INFO\n", __func__); - rc = msm_eeprom_get_cmm_data(e_ctrl, cdata); - break; - - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_GET_FW_VERSION_INFO\n", __func__); - rc = eeprom_config_read_fw_version(e_ctrl, cdata); - break; - default: - break; - } - - pr_err("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - pr_err("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -uint8_t* get_eeprom_data_addr() -{ - return map_data; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -#if defined(CONFIG_SR544) -// compare dtsi file to GTA when L-OS upgrade for rossa/core-prime. -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr544_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %pK\n", __func__, __LINE__ , memptr); - } - return rc; -} -#elif defined(CONFIG_SR552) -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr552_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0);//version - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0);//bank - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %pK\n", __func__, __LINE__ , memptr); - } - return rc; -} -#else -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint8_t page; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), 0x0A04, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - page = 2; - break; - case 3: - page = 3; - break; - case 7: - page = 4; - break; - case 0xF: - page = 5; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - init_read_otp.reg_setting[1].reg_data = page; - init_write_otp.reg_setting[7].reg_data = page; - - if (emap[j].mem.valid_size) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - for (i=0x0A08; i<=0x0A41; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), i, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i-0x0A08] = OTP_Data; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - return rc; - } -#ifdef EEPROM_MMAP_DEBUG - for (i=0; inum_map); - pr_err("%s::%d %s %d\n", __func__, __LINE__, property, data->num_map); - if (rc < 0) { - pr_err("%s::%d failed rc %d\n", __func__,__LINE__,rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - pr_err("%s, %d: i = %d\n", __func__, __LINE__, i); - - snprintf(property, PROPERTY_MAXSIZE, "qcom,page%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,poll%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,mem%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - pr_err("%s::%d valid size = %d\n", __func__,__LINE__, data->num_data); - - total_size = 0; - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - // if total-size is defined at dtsi file. - // set num_data as total-size (refer dtsi file of GTA) - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - pr_err("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - pr_err("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } -#endif - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - int j; - - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - return -EINVAL; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - goto probe_failure; - } - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - pr_err("%s client = 0x%pK\n", __func__, client); - - //e_ctrl->eboard_info = (struct msm_eeprom_board_info *)(id->driver_data); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -EINVAL; - goto memdata_free; - } - - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto board_free; - } - - rc = of_property_read_u32(of_node, "cell-index", - &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto board_free; - } - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - - pr_err("%s:%d e_ctrl->eboard_info->i2c_slaveaddr = %d\n", __func__, __LINE__ , e_ctrl->eboard_info->i2c_slaveaddr); - - /* Set device type as I2C */ - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - pr_err("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - pr_err("%s: no cal memory map\n", __func__); - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto board_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - -// e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = 1; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -board_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -memdata_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - if (of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size)) { \ - return -EFAULT; \ - } else { \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - } \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[3]; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,read", read, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,readseq", read_seq, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,queryid", query_id, tmp, 3); - - rc = of_property_read_u32_array(spic->spi_master->dev.of_node, - "qcom,eeprom-id", tmp, 2); - if (rc) { - pr_err("%s: Failed to get eeprom id\n", __func__); - return rc; - } - spic->mfr_id = tmp[0]; - spic->device_id = tmp[1]; - - return 0; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - pr_err("%s: read 0x%x 0x%x, check 0x%x 0x%x\n", __func__, id[0], - id[1], client->spi_client->mfr_id, client->spi_client->device_id); - if (id[0] != client->spi_client->mfr_id - || id[1] != client->spi_client->device_id) - return -ENODEV; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - pr_err("msm_camera_get_dt_power_setting_data : %d\n", __LINE__); - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - pr_err("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - pr_err("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - - -static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, - struct device_node *of_node) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; - - cmm_data->cmm_support = - of_property_read_bool(of_node, "qcom,cmm-data-support"); - if (!cmm_data->cmm_support){ - pr_err("%s::%d qcom,cmm-data-support failed ",__func__,__LINE__); - return -EINVAL; - } - cmm_data->cmm_compression = - of_property_read_bool(of_node, "qcom,cmm-data-compressed"); - if (!cmm_data->cmm_compression) - CDBG("No MM compression data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", - &cmm_data->cmm_offset); - if (rc < 0) - CDBG("No MM offset data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-size", - &cmm_data->cmm_size); - if (rc < 0) - CDBG("No MM size data\n"); - - CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", - cmm_data->cmm_compression, - cmm_data->cmm_offset, - cmm_data->cmm_size); - return 0; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) - goto spi_free; - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, spi->dev.of_node); - if (rc < 0) - CDBG("%s MM data miss:%d\n", __func__, __LINE__); - - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) - goto board_free; - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - pr_err("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - pr_err("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - pr_err("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - pr_err("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - kfree(e_ctrl); - return -ENOMEM; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->i2c_freq_mode = I2C_FAST_MODE; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); - if (rc < 0){ - pr_err("%s MM data miss:%d\n", __func__, __LINE__); - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_otp"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - pr_err("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,otp" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct of_device_id msm_eeprom_i2c_dt_match[] = { - { .compatible = "qcom,otp"}, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,otp", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_i2c_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0 /*, spi_rc = 0*/; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - if(rc<0){ - pr_err("%s:%d platform rc %d\n", __func__, __LINE__, rc); - return rc; - } - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_s5k5e3yx.h b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_s5k5e3yx.h deleted file mode 100644 index b53b01418ded..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_s5k5e3yx.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include -#include -#include -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 17 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array init_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_read_otp = { - init_read_s5k5e3yx_otp_reg, sizeof(init_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting finish_read_otp = { - finish_read_s5k5e3yx_otp_reg, sizeof(finish_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array init_write_s5k5e3yx_otp_reg[] = { - {0x3b42, 0x68, NULL, 0}, - {0x3b41, 0x01, NULL, 0}, - {0x3b40, 0x00, NULL, 0}, - {0x3b45, 0x02, NULL, 0}, - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x03, NULL, 0}, - {0x3b42, 0x00, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x03, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_write_otp = { - init_write_s5k5e3yx_otp_reg, sizeof(init_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_write_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, - {0x3b40, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting finish_write_otp = { - finish_write_s5k5e3yx_otp_reg, sizeof(finish_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr544.h b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr544.h deleted file mode 100644 index 630af2b838ff..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr544.h +++ /dev/null @@ -1,2102 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include -#include -#include -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr544_init_reg[] = { -{0x0118, 0x0000}, //sleep On - -//--- SRAM timing control---// -{0x0E00, 0x0101}, -{0x0E02, 0x0101}, -{0x0E04, 0x0101}, -{0x0E06, 0x0101}, -{0x0E08, 0x0101}, -{0x0E0A, 0x0101}, -{0x0E0C, 0x0101}, -{0x0E0E, 0x0101}, - -//Firmware 2Lane v0.39, LB OTP Burst On + double luma under dark. FW 20140804 -{0x2000, 0x4031}, -{0x2002, 0x83F8}, -{0x2004, 0x4104}, -{0x2006, 0x4307}, -{0x2008, 0x4382}, -{0x200a, 0x80D0}, -{0x200c, 0x4382}, -{0x200e, 0x8070}, -{0x2010, 0x43A2}, -{0x2012, 0x0B80}, -{0x2014, 0x0C0A}, -{0x2016, 0x4382}, -{0x2018, 0x0B90}, -{0x201a, 0x0C0A}, -{0x201c, 0x4382}, -{0x201e, 0x0B9C}, -{0x2020, 0x0C0A}, -{0x2022, 0x93D2}, -{0x2024, 0x003D}, -{0x2026, 0x2002}, -{0x2028, 0x4030}, -{0x202a, 0xF6C0}, -{0x202c, 0x43C2}, -{0x202e, 0x0F82}, -{0x2030, 0x425F}, -{0x2032, 0x0118}, -{0x2034, 0xF37F}, -{0x2036, 0x930F}, -{0x2038, 0x2002}, -{0x203a, 0x0CC8}, -{0x203c, 0x3FF9}, -{0x203e, 0x4F82}, -{0x2040, 0x809A}, -{0x2042, 0x43D2}, -{0x2044, 0x0A80}, -{0x2046, 0x43D2}, -{0x2048, 0x0180}, -{0x204a, 0x43D2}, -{0x204c, 0x019A}, -{0x204e, 0x40F2}, -{0x2050, 0x0009}, -{0x2052, 0x019B}, -{0x2054, 0x12B0}, -{0x2056, 0xFE26}, -{0x2058, 0x4382}, -{0x205a, 0x8094}, -{0x205c, 0x93D2}, -{0x205e, 0x003E}, -{0x2060, 0x2002}, -{0x2062, 0x4030}, -{0x2064, 0xF5A0}, -{0x2066, 0x4308}, -{0x2068, 0x5038}, -{0x206a, 0x0030}, -{0x206c, 0x480F}, -{0x206e, 0x12B0}, -{0x2070, 0xFE38}, -{0x2072, 0x403B}, -{0x2074, 0x7606}, -{0x2076, 0x4B29}, -{0x2078, 0x5318}, -{0x207a, 0x480F}, -{0x207c, 0x12B0}, -{0x207e, 0xFE38}, -{0x2080, 0x4B2A}, -{0x2082, 0x5318}, -{0x2084, 0x480F}, -{0x2086, 0x12B0}, -{0x2088, 0xFE38}, -{0x208a, 0x4A0D}, -{0x208c, 0xF03D}, -{0x208e, 0x000F}, -{0x2090, 0x108D}, -{0x2092, 0x4B2E}, -{0x2094, 0x5E0E}, -{0x2096, 0x5E0E}, -{0x2098, 0x5E0E}, -{0x209a, 0x5E0E}, -{0x209c, 0x4A0F}, -{0x209e, 0xC312}, -{0x20a0, 0x100F}, -{0x20a2, 0x110F}, -{0x20a4, 0x110F}, -{0x20a6, 0x110F}, -{0x20a8, 0x590D}, -{0x20aa, 0x4D87}, -{0x20ac, 0x5000}, -{0x20ae, 0x5F0E}, -{0x20b0, 0x4E87}, -{0x20b2, 0x6000}, -{0x20b4, 0x5327}, -{0x20b6, 0x5038}, -{0x20b8, 0xFFD1}, -{0x20ba, 0x9038}, -{0x20bc, 0x0300}, -{0x20be, 0x2BD4}, -{0x20c0, 0x0261}, -{0x20c2, 0x0000}, -{0x20c4, 0x43A2}, -{0x20c6, 0x0384}, -{0x20c8, 0x42B2}, -{0x20ca, 0x0386}, -{0x20cc, 0x43C2}, -{0x20ce, 0x0180}, -{0x20d0, 0x43D2}, -{0x20d2, 0x003D}, -{0x20d4, 0x40B2}, -{0x20d6, 0x808B}, -{0x20d8, 0x0B88}, -{0x20da, 0x0C0A}, -{0x20dc, 0x40B2}, -{0x20de, 0x1009}, -{0x20e0, 0x0B8A}, -{0x20e2, 0x0C0A}, -{0x20e4, 0x40B2}, -{0x20e6, 0xC40C}, -{0x20e8, 0x0B8C}, -{0x20ea, 0x0C0A}, -{0x20ec, 0x40B2}, -{0x20ee, 0xC9E1}, -{0x20f0, 0x0B8E}, -{0x20f2, 0x0C0A}, -{0x20f4, 0x40B2}, -{0x20f6, 0x0C1E}, -{0x20f8, 0x0B92}, -{0x20fa, 0x0C0A}, -{0x20fc, 0x43D2}, -{0x20fe, 0x0F82}, -{0x2100, 0x0C3C}, -{0x2102, 0x0C3C}, -{0x2104, 0x0C3C}, -{0x2106, 0x0C3C}, -{0x2108, 0x421F}, -{0x210a, 0x00A6}, -{0x210c, 0x503F}, -{0x210e, 0x07D0}, -{0x2110, 0x3811}, -{0x2112, 0x4F82}, -{0x2114, 0x7100}, -{0x2116, 0x0004}, -{0x2118, 0x0C0D}, -{0x211a, 0x0005}, -{0x211c, 0x0C04}, -{0x211e, 0x000D}, -{0x2120, 0x0C09}, -{0x2122, 0x003D}, -{0x2124, 0x0C1D}, -{0x2126, 0x003C}, -{0x2128, 0x0C13}, -{0x212a, 0x0004}, -{0x212c, 0x0C09}, -{0x212e, 0x0004}, -{0x2130, 0x533F}, -{0x2132, 0x37EF}, -{0x2134, 0x4392}, -{0x2136, 0x8096}, -{0x2138, 0x4382}, -{0x213a, 0x809E}, -{0x213c, 0x4382}, -{0x213e, 0x80B6}, -{0x2140, 0x4382}, -{0x2142, 0x80BE}, -{0x2144, 0x4382}, -{0x2146, 0x80A2}, -{0x2148, 0x40B2}, -{0x214a, 0x0028}, -{0x214c, 0x7000}, -{0x214e, 0x43A2}, -{0x2150, 0x80A0}, -{0x2152, 0xB3E2}, -{0x2154, 0x00B4}, -{0x2156, 0x2402}, -{0x2158, 0x4392}, -{0x215a, 0x80A0}, -{0x215c, 0x4326}, -{0x215e, 0xB3D2}, -{0x2160, 0x00B4}, -{0x2162, 0x2002}, -{0x2164, 0x4030}, -{0x2166, 0xF590}, -{0x2168, 0x4306}, -{0x216a, 0x4384}, -{0x216c, 0x0002}, -{0x216e, 0x4384}, -{0x2170, 0x0006}, -{0x2172, 0x4382}, -{0x2174, 0x809C}, -{0x2176, 0x4382}, -{0x2178, 0x8098}, -{0x217a, 0x40B2}, -{0x217c, 0x0005}, -{0x217e, 0x7320}, -{0x2180, 0x4392}, -{0x2182, 0x7326}, -{0x2184, 0x12B0}, -{0x2186, 0xF952}, -{0x2188, 0x4392}, -{0x218a, 0x731C}, -{0x218c, 0x9382}, -{0x218e, 0x8096}, -{0x2190, 0x200A}, -{0x2192, 0x0B00}, -{0x2194, 0x7302}, -{0x2196, 0x02BC}, -{0x2198, 0x4382}, -{0x219a, 0x7004}, -{0x219c, 0x430F}, -{0x219e, 0x12B0}, -{0x21a0, 0xF752}, -{0x21a2, 0x12B0}, -{0x21a4, 0xF952}, -{0x21a6, 0x4392}, -{0x21a8, 0x80BC}, -{0x21aa, 0x4382}, -{0x21ac, 0x740E}, -{0x21ae, 0xB3E2}, -{0x21b0, 0x0080}, -{0x21b2, 0x2402}, -{0x21b4, 0x4392}, -{0x21b6, 0x740E}, -{0x21b8, 0x431F}, -{0x21ba, 0x12B0}, -{0x21bc, 0xF752}, -{0x21be, 0x4392}, -{0x21c0, 0x7004}, -{0x21c2, 0x4682}, -{0x21c4, 0x7110}, -{0x21c6, 0x9382}, -{0x21c8, 0x8092}, -{0x21ca, 0x2005}, -{0x21cc, 0x9392}, -{0x21ce, 0x7110}, -{0x21d0, 0x2402}, -{0x21d2, 0x4030}, -{0x21d4, 0xF494}, -{0x21d6, 0x9392}, -{0x21d8, 0x7110}, -{0x21da, 0x20A4}, -{0x21dc, 0x0B00}, -{0x21de, 0x7302}, -{0x21e0, 0x0032}, -{0x21e2, 0x4382}, -{0x21e4, 0x7004}, -{0x21e6, 0x0B00}, -{0x21e8, 0x7302}, -{0x21ea, 0x03E8}, -{0x21ec, 0x0800}, -{0x21ee, 0x7114}, -{0x21f0, 0x425F}, -{0x21f2, 0x0C9C}, -{0x21f4, 0x4F4E}, -{0x21f6, 0x430F}, -{0x21f8, 0x4E0D}, -{0x21fa, 0x430C}, -{0x21fc, 0x421F}, -{0x21fe, 0x0C9A}, -{0x2200, 0xDF0C}, -{0x2202, 0x1204}, -{0x2204, 0x440F}, -{0x2206, 0x532F}, -{0x2208, 0x120F}, -{0x220a, 0x1212}, -{0x220c, 0x0CA2}, -{0x220e, 0x403E}, -{0x2210, 0x80C0}, -{0x2212, 0x403F}, -{0x2214, 0x8072}, -{0x2216, 0x12B0}, -{0x2218, 0xF7BA}, -{0x221a, 0x4F07}, -{0x221c, 0x425F}, -{0x221e, 0x0CA0}, -{0x2220, 0x4F4E}, -{0x2222, 0x430F}, -{0x2224, 0x4E0D}, -{0x2226, 0x430C}, -{0x2228, 0x421F}, -{0x222a, 0x0C9E}, -{0x222c, 0xDF0C}, -{0x222e, 0x440F}, -{0x2230, 0x522F}, -{0x2232, 0x120F}, -{0x2234, 0x532F}, -{0x2236, 0x120F}, -{0x2238, 0x1212}, -{0x223a, 0x0CA4}, -{0x223c, 0x403E}, -{0x223e, 0x80A4}, -{0x2240, 0x403F}, -{0x2242, 0x8050}, -{0x2244, 0x12B0}, -{0x2246, 0xF7BA}, -{0x2248, 0x4F08}, -{0x224a, 0x430D}, -{0x224c, 0x441E}, -{0x224e, 0x0004}, -{0x2250, 0x442F}, -{0x2252, 0x5031}, -{0x2254, 0x000C}, -{0x2256, 0x9E0F}, -{0x2258, 0x2C01}, -{0x225a, 0x431D}, -{0x225c, 0x8E0F}, -{0x225e, 0x930F}, -{0x2260, 0x3402}, -{0x2262, 0xE33F}, -{0x2264, 0x531F}, -{0x2266, 0x421E}, -{0x2268, 0x0CA2}, -{0x226a, 0xC312}, -{0x226c, 0x100E}, -{0x226e, 0x9E0F}, -{0x2270, 0x2804}, -{0x2272, 0x930D}, -{0x2274, 0x2001}, -{0x2276, 0x5317}, -{0x2278, 0x5D08}, -{0x227a, 0x403B}, -{0x227c, 0x0196}, -{0x227e, 0x403D}, -{0x2280, 0x0040}, -{0x2282, 0x4D0F}, -{0x2284, 0x8B2F}, -{0x2286, 0x470A}, -{0x2288, 0x4F0C}, -{0x228a, 0x12B0}, -{0x228c, 0xFE58}, -{0x228e, 0x4E09}, -{0x2290, 0xC312}, -{0x2292, 0x1009}, -{0x2294, 0x1109}, -{0x2296, 0x1109}, -{0x2298, 0x1109}, -{0x229a, 0x1109}, -{0x229c, 0x1109}, -{0x229e, 0x4D0F}, -{0x22a0, 0x8B2F}, -{0x22a2, 0x480A}, -{0x22a4, 0x4F0C}, -{0x22a6, 0x12B0}, -{0x22a8, 0xFE58}, -{0x22aa, 0x4E0F}, -{0x22ac, 0xC312}, -{0x22ae, 0x100F}, -{0x22b0, 0x110F}, -{0x22b2, 0x110F}, -{0x22b4, 0x110F}, -{0x22b6, 0x110F}, -{0x22b8, 0x110F}, -{0x22ba, 0x5F09}, -{0x22bc, 0xC312}, -{0x22be, 0x1009}, -{0x22c0, 0x92B2}, -{0x22c2, 0x80BE}, -{0x22c4, 0x280C}, -{0x22c6, 0x90B2}, -{0x22c8, 0x0096}, -{0x22ca, 0x80B6}, -{0x22cc, 0x2408}, -{0x22ce, 0x0900}, -{0x22d0, 0x710E}, -{0x22d2, 0x0B00}, -{0x22d4, 0x7302}, -{0x22d6, 0x0320}, -{0x22d8, 0x12B0}, -{0x22da, 0xF6F2}, -{0x22dc, 0x3F74}, -{0x22de, 0x470A}, -{0x22e0, 0x580A}, -{0x22e2, 0xC312}, -{0x22e4, 0x100A}, -{0x22e6, 0x890A}, -{0x22e8, 0xB3E2}, -{0x22ea, 0x0C81}, -{0x22ec, 0x2418}, -{0x22ee, 0x425F}, -{0x22f0, 0x0C92}, -{0x22f2, 0xF37F}, -{0x22f4, 0x9F0A}, -{0x22f6, 0x280E}, -{0x22f8, 0x425F}, -{0x22fa, 0x0C92}, -{0x22fc, 0xF37F}, -{0x22fe, 0x4A0E}, -{0x2300, 0x8F0E}, -{0x2302, 0x4E82}, -{0x2304, 0x0CAC}, -{0x2306, 0x425F}, -{0x2308, 0x0C92}, -{0x230a, 0xF37F}, -{0x230c, 0x8F0A}, -{0x230e, 0x4A82}, -{0x2310, 0x0CAE}, -{0x2312, 0x3FDD}, -{0x2314, 0x4382}, -{0x2316, 0x0CAC}, -{0x2318, 0x4382}, -{0x231a, 0x0CAE}, -{0x231c, 0x3FD8}, -{0x231e, 0x4A82}, -{0x2320, 0x0CAC}, -{0x2322, 0x3FF5}, -{0x2324, 0x0B00}, -{0x2326, 0x7302}, -{0x2328, 0x0002}, -{0x232a, 0x069A}, -{0x232c, 0x0C1F}, -{0x232e, 0x0403}, -{0x2330, 0x0C05}, -{0x2332, 0x0001}, -{0x2334, 0x0C01}, -{0x2336, 0x0003}, -{0x2338, 0x0C03}, -{0x233a, 0x000B}, -{0x233c, 0x0C33}, -{0x233e, 0x0003}, -{0x2340, 0x0C03}, -{0x2342, 0x0653}, -{0x2344, 0x0C03}, -{0x2346, 0x065B}, -{0x2348, 0x0C13}, -{0x234a, 0x065F}, -{0x234c, 0x0C43}, -{0x234e, 0x0657}, -{0x2350, 0x0C03}, -{0x2352, 0x0653}, -{0x2354, 0x0C03}, -{0x2356, 0x0643}, -{0x2358, 0x0C0F}, -{0x235a, 0x067D}, -{0x235c, 0x0C01}, -{0x235e, 0x077F}, -{0x2360, 0x0C01}, -{0x2362, 0x0677}, -{0x2364, 0x0C01}, -{0x2366, 0x0673}, -{0x2368, 0x0C67}, -{0x236a, 0x0677}, -{0x236c, 0x0C03}, -{0x236e, 0x077D}, -{0x2370, 0x0C19}, -{0x2372, 0x0013}, -{0x2374, 0x0C27}, -{0x2376, 0x0003}, -{0x2378, 0x0C45}, -{0x237a, 0x0675}, -{0x237c, 0x0C01}, -{0x237e, 0x0671}, -{0x2380, 0x4392}, -{0x2382, 0x7004}, -{0x2384, 0x430F}, -{0x2386, 0x9382}, -{0x2388, 0x80BC}, -{0x238a, 0x2001}, -{0x238c, 0x431F}, -{0x238e, 0x4F82}, -{0x2390, 0x80BC}, -{0x2392, 0x930F}, -{0x2394, 0x2473}, -{0x2396, 0x0B00}, -{0x2398, 0x7302}, -{0x239a, 0x033A}, -{0x239c, 0x0675}, -{0x239e, 0x0C02}, -{0x23a0, 0x0339}, -{0x23a2, 0xAE0C}, -{0x23a4, 0x0C01}, -{0x23a6, 0x003C}, -{0x23a8, 0x0C01}, -{0x23aa, 0x0004}, -{0x23ac, 0x0C01}, -{0x23ae, 0x0642}, -{0x23b0, 0x0B00}, -{0x23b2, 0x7302}, -{0x23b4, 0x0386}, -{0x23b6, 0x0643}, -{0x23b8, 0x0C05}, -{0x23ba, 0x0001}, -{0x23bc, 0x0C01}, -{0x23be, 0x0003}, -{0x23c0, 0x0C03}, -{0x23c2, 0x000B}, -{0x23c4, 0x0C33}, -{0x23c6, 0x0003}, -{0x23c8, 0x0C03}, -{0x23ca, 0x0653}, -{0x23cc, 0x0C03}, -{0x23ce, 0x065B}, -{0x23d0, 0x0C13}, -{0x23d2, 0x065F}, -{0x23d4, 0x0C43}, -{0x23d6, 0x0657}, -{0x23d8, 0x0C03}, -{0x23da, 0x0653}, -{0x23dc, 0x0C03}, -{0x23de, 0x0643}, -{0x23e0, 0x0C0F}, -{0x23e2, 0x067D}, -{0x23e4, 0x0C01}, -{0x23e6, 0x077F}, -{0x23e8, 0x0C01}, -{0x23ea, 0x0677}, -{0x23ec, 0x0C01}, -{0x23ee, 0x0673}, -{0x23f0, 0x0C67}, -{0x23f2, 0x0677}, -{0x23f4, 0x0C03}, -{0x23f6, 0x077D}, -{0x23f8, 0x0C19}, -{0x23fa, 0x0013}, -{0x23fc, 0x0C27}, -{0x23fe, 0x0003}, -{0x2400, 0x0C45}, -{0x2402, 0x0675}, -{0x2404, 0x0C01}, -{0x2406, 0x0671}, -{0x2408, 0x12B0}, -{0x240a, 0xF6F2}, -{0x240c, 0x930F}, -{0x240e, 0x2405}, -{0x2410, 0x4292}, -{0x2412, 0x8096}, -{0x2414, 0x809E}, -{0x2416, 0x4382}, -{0x2418, 0x8096}, -{0x241a, 0x9382}, -{0x241c, 0x80BC}, -{0x241e, 0x241E}, -{0x2420, 0x0B00}, -{0x2422, 0x7302}, -{0x2424, 0x069E}, -{0x2426, 0x0675}, -{0x2428, 0x0C02}, -{0x242a, 0x0339}, -{0x242c, 0xAE0C}, -{0x242e, 0x0C01}, -{0x2430, 0x003C}, -{0x2432, 0x0C01}, -{0x2434, 0x0004}, -{0x2436, 0x0C01}, -{0x2438, 0x0642}, -{0x243a, 0x0C01}, -{0x243c, 0x06A1}, -{0x243e, 0x0C03}, -{0x2440, 0x06A0}, -{0x2442, 0x9382}, -{0x2444, 0x80D0}, -{0x2446, 0x2004}, -{0x2448, 0x930F}, -{0x244a, 0x26BD}, -{0x244c, 0x4030}, -{0x244e, 0xF18C}, -{0x2450, 0x43C2}, -{0x2452, 0x0A80}, -{0x2454, 0x0B00}, -{0x2456, 0x7302}, -{0x2458, 0xFFF0}, -{0x245a, 0x3EB5}, -{0x245c, 0x0B00}, -{0x245e, 0x7302}, -{0x2460, 0x069E}, -{0x2462, 0x0675}, -{0x2464, 0x0C02}, -{0x2466, 0x0301}, -{0x2468, 0xAE0C}, -{0x246a, 0x0C01}, -{0x246c, 0x0004}, -{0x246e, 0x0C03}, -{0x2470, 0x0642}, -{0x2472, 0x0C01}, -{0x2474, 0x06A1}, -{0x2476, 0x0C03}, -{0x2478, 0x06A0}, -{0x247a, 0x3FE3}, -{0x247c, 0x0B00}, -{0x247e, 0x7302}, -{0x2480, 0x033A}, -{0x2482, 0x0675}, -{0x2484, 0x0C02}, -{0x2486, 0x0301}, -{0x2488, 0xAE0C}, -{0x248a, 0x0C01}, -{0x248c, 0x0004}, -{0x248e, 0x0C03}, -{0x2490, 0x0642}, -{0x2492, 0x3F8E}, -{0x2494, 0x0B00}, -{0x2496, 0x7302}, -{0x2498, 0x0002}, -{0x249a, 0x069A}, -{0x249c, 0x0C1F}, -{0x249e, 0x0402}, -{0x24a0, 0x0C05}, -{0x24a2, 0x0001}, -{0x24a4, 0x0C01}, -{0x24a6, 0x0003}, -{0x24a8, 0x0C03}, -{0x24aa, 0x000B}, -{0x24ac, 0x0C33}, -{0x24ae, 0x0003}, -{0x24b0, 0x0C03}, -{0x24b2, 0x0653}, -{0x24b4, 0x0C03}, -{0x24b6, 0x065B}, -{0x24b8, 0x0C13}, -{0x24ba, 0x065F}, -{0x24bc, 0x0C43}, -{0x24be, 0x0657}, -{0x24c0, 0x0C03}, -{0x24c2, 0x0653}, -{0x24c4, 0x0C03}, -{0x24c6, 0x0643}, -{0x24c8, 0x0C0F}, -{0x24ca, 0x077D}, -{0x24cc, 0x0C01}, -{0x24ce, 0x067F}, -{0x24d0, 0x0C01}, -{0x24d2, 0x0677}, -{0x24d4, 0x0C01}, -{0x24d6, 0x0673}, -{0x24d8, 0x0C5F}, -{0x24da, 0x0663}, -{0x24dc, 0x0C6F}, -{0x24de, 0x0667}, -{0x24e0, 0x0C01}, -{0x24e2, 0x0677}, -{0x24e4, 0x0C01}, -{0x24e6, 0x077D}, -{0x24e8, 0x0C33}, -{0x24ea, 0x0013}, -{0x24ec, 0x0C27}, -{0x24ee, 0x0003}, -{0x24f0, 0x0C4F}, -{0x24f2, 0x0675}, -{0x24f4, 0x0C01}, -{0x24f6, 0x0671}, -{0x24f8, 0x0CFF}, -{0x24fa, 0x0C78}, -{0x24fc, 0x0661}, -{0x24fe, 0x4392}, -{0x2500, 0x7004}, -{0x2502, 0x430F}, -{0x2504, 0x9382}, -{0x2506, 0x80BC}, -{0x2508, 0x2001}, -{0x250a, 0x431F}, -{0x250c, 0x4F82}, -{0x250e, 0x80BC}, -{0x2510, 0x12B0}, -{0x2512, 0xF6F2}, -{0x2514, 0x930F}, -{0x2516, 0x2405}, -{0x2518, 0x4292}, -{0x251a, 0x8096}, -{0x251c, 0x809E}, -{0x251e, 0x4382}, -{0x2520, 0x8096}, -{0x2522, 0x9382}, -{0x2524, 0x80BC}, -{0x2526, 0x2019}, -{0x2528, 0x0B00}, -{0x252a, 0x7302}, -{0x252c, 0x0562}, -{0x252e, 0x0665}, -{0x2530, 0x0C02}, -{0x2532, 0x0301}, -{0x2534, 0xA60C}, -{0x2536, 0x0204}, -{0x2538, 0xAE0C}, -{0x253a, 0x0C03}, -{0x253c, 0x0642}, -{0x253e, 0x0C13}, -{0x2540, 0x06A1}, -{0x2542, 0x0C03}, -{0x2544, 0x06A0}, -{0x2546, 0x9382}, -{0x2548, 0x80D0}, -{0x254a, 0x277E}, -{0x254c, 0x43C2}, -{0x254e, 0x0A80}, -{0x2550, 0x0B00}, -{0x2552, 0x7302}, -{0x2554, 0xFFF0}, -{0x2556, 0x4030}, -{0x2558, 0xF1C6}, -{0x255a, 0x0B00}, -{0x255c, 0x7302}, -{0x255e, 0x0562}, -{0x2560, 0x0665}, -{0x2562, 0x0C02}, -{0x2564, 0x0339}, -{0x2566, 0xA60C}, -{0x2568, 0x023C}, -{0x256a, 0xAE0C}, -{0x256c, 0x0C01}, -{0x256e, 0x0004}, -{0x2570, 0x0C01}, -{0x2572, 0x0642}, -{0x2574, 0x0C13}, -{0x2576, 0x06A1}, -{0x2578, 0x0C03}, -{0x257a, 0x06A0}, -{0x257c, 0x9382}, -{0x257e, 0x80D0}, -{0x2580, 0x2763}, -{0x2582, 0x43C2}, -{0x2584, 0x0A80}, -{0x2586, 0x0B00}, -{0x2588, 0x7302}, -{0x258a, 0xFFF0}, -{0x258c, 0x4030}, -{0x258e, 0xF1C6}, -{0x2590, 0xB3E2}, -{0x2592, 0x00B4}, -{0x2594, 0x2002}, -{0x2596, 0x4030}, -{0x2598, 0xF16A}, -{0x259a, 0x4316}, -{0x259c, 0x4030}, -{0x259e, 0xF16A}, -{0x25a0, 0x4392}, -{0x25a2, 0x760E}, -{0x25a4, 0x425F}, -{0x25a6, 0x0118}, -{0x25a8, 0xF37F}, -{0x25aa, 0x930F}, -{0x25ac, 0x2005}, -{0x25ae, 0x43C2}, -{0x25b0, 0x0A80}, -{0x25b2, 0x0B00}, -{0x25b4, 0x7302}, -{0x25b6, 0xFFF0}, -{0x25b8, 0x9382}, -{0x25ba, 0x760C}, -{0x25bc, 0x2002}, -{0x25be, 0x0C64}, -{0x25c0, 0x3FF1}, -{0x25c2, 0x4F82}, -{0x25c4, 0x809A}, -{0x25c6, 0x421F}, -{0x25c8, 0x760A}, -{0x25ca, 0x932F}, -{0x25cc, 0x2013}, -{0x25ce, 0x4292}, -{0x25d0, 0x018A}, -{0x25d2, 0x80B8}, -{0x25d4, 0x12B0}, -{0x25d6, 0xFE26}, -{0x25d8, 0x40B2}, -{0x25da, 0x0005}, -{0x25dc, 0x7600}, -{0x25de, 0x4382}, -{0x25e0, 0x7602}, -{0x25e2, 0x0262}, -{0x25e4, 0x0000}, -{0x25e6, 0x0222}, -{0x25e8, 0x0000}, -{0x25ea, 0x0262}, -{0x25ec, 0x0000}, -{0x25ee, 0x0260}, -{0x25f0, 0x0000}, -{0x25f2, 0x3FD6}, -{0x25f4, 0x903F}, -{0x25f6, 0x0003}, -{0x25f8, 0x285B}, -{0x25fa, 0x903F}, -{0x25fc, 0x0102}, -{0x25fe, 0x204E}, -{0x2600, 0x425F}, -{0x2602, 0x0186}, -{0x2604, 0x4F4C}, -{0x2606, 0x93D2}, -{0x2608, 0x018F}, -{0x260a, 0x2446}, -{0x260c, 0x425F}, -{0x260e, 0x018F}, -{0x2610, 0x4F4D}, -{0x2612, 0x4308}, -{0x2614, 0x421B}, -{0x2616, 0x80B8}, -{0x2618, 0x431F}, -{0x261a, 0x480E}, -{0x261c, 0x930E}, -{0x261e, 0x2403}, -{0x2620, 0x5F0F}, -{0x2622, 0x831E}, -{0x2624, 0x23FD}, -{0x2626, 0xFC0F}, -{0x2628, 0x242F}, -{0x262a, 0x430F}, -{0x262c, 0x9D0F}, -{0x262e, 0x2C2C}, -{0x2630, 0x4B0E}, -{0x2632, 0x4E82}, -{0x2634, 0x7600}, -{0x2636, 0x4882}, -{0x2638, 0x7602}, -{0x263a, 0x4C82}, -{0x263c, 0x7604}, -{0x263e, 0x0264}, -{0x2640, 0x0000}, -{0x2642, 0x0224}, -{0x2644, 0x0000}, -{0x2646, 0x0264}, -{0x2648, 0x0000}, -{0x264a, 0x0260}, -{0x264c, 0x0000}, -{0x264e, 0x0268}, -{0x2650, 0x0000}, -{0x2652, 0x0C18}, -{0x2654, 0x02E8}, -{0x2656, 0x0000}, -{0x2658, 0x0C30}, -{0x265a, 0x02A8}, -{0x265c, 0x0000}, -{0x265e, 0x0C30}, -{0x2660, 0x0C30}, -{0x2662, 0x0C30}, -{0x2664, 0x0C30}, -{0x2666, 0x0C30}, -{0x2668, 0x0C30}, -{0x266a, 0x0C30}, -{0x266c, 0x0C30}, -{0x266e, 0x0C00}, -{0x2670, 0x02E8}, -{0x2672, 0x0000}, -{0x2674, 0x0C30}, -{0x2676, 0x0268}, -{0x2678, 0x0000}, -{0x267a, 0x0C18}, -{0x267c, 0x0260}, -{0x267e, 0x0000}, -{0x2680, 0x0C18}, -{0x2682, 0x531F}, -{0x2684, 0x9D0F}, -{0x2686, 0x2BD5}, -{0x2688, 0x5318}, -{0x268a, 0x9238}, -{0x268c, 0x2BC5}, -{0x268e, 0x0260}, -{0x2690, 0x0000}, -{0x2692, 0x5392}, -{0x2694, 0x80B8}, -{0x2696, 0x3F84}, -{0x2698, 0x432D}, -{0x269a, 0x3FBB}, -{0x269c, 0x903F}, -{0x269e, 0x0201}, -{0x26a0, 0x237F}, -{0x26a2, 0x5392}, -{0x26a4, 0x80B8}, -{0x26a6, 0x421F}, -{0x26a8, 0x80B8}, -{0x26aa, 0x12B0}, -{0x26ac, 0xFE38}, -{0x26ae, 0x3F78}, -{0x26b0, 0x931F}, -{0x26b2, 0x2376}, -{0x26b4, 0x12B0}, -{0x26b6, 0xFE26}, -{0x26b8, 0x4292}, -{0x26ba, 0x018A}, -{0x26bc, 0x80B8}, -{0x26be, 0x3FF3}, -{0x26c0, 0x4382}, -{0x26c2, 0x0B88}, -{0x26c4, 0x0C0A}, -{0x26c6, 0x4382}, -{0x26c8, 0x0B8A}, -{0x26ca, 0x0C0A}, -{0x26cc, 0x40B2}, -{0x26ce, 0x000C}, -{0x26d0, 0x0B8C}, -{0x26d2, 0x0C0A}, -{0x26d4, 0x40B2}, -{0x26d6, 0xB5E1}, -{0x26d8, 0x0B8E}, -{0x26da, 0x0C0A}, -{0x26dc, 0x40B2}, -{0x26de, 0x641C}, -{0x26e0, 0x0B92}, -{0x26e2, 0x0C0A}, -{0x26e4, 0x43C2}, -{0x26e6, 0x003D}, -{0x26e8, 0x4030}, -{0x26ea, 0xF02C}, -{0x26ec, 0x5231}, -{0x26ee, 0x4030}, -{0x26f0, 0xFE54}, -{0x26f2, 0xE3B2}, -{0x26f4, 0x740E}, -{0x26f6, 0x425F}, -{0x26f8, 0x0118}, -{0x26fa, 0xF37F}, -{0x26fc, 0x4F82}, -{0x26fe, 0x809A}, -{0x2700, 0x930F}, -{0x2702, 0x2005}, -{0x2704, 0x93C2}, -{0x2706, 0x0A82}, -{0x2708, 0x2402}, -{0x270a, 0x4392}, -{0x270c, 0x80D0}, -{0x270e, 0x9382}, -{0x2710, 0x809A}, -{0x2712, 0x2002}, -{0x2714, 0x4392}, -{0x2716, 0x8070}, -{0x2718, 0x421F}, -{0x271a, 0x710E}, -{0x271c, 0x93A2}, -{0x271e, 0x7110}, -{0x2720, 0x2411}, -{0x2722, 0x9382}, -{0x2724, 0x710E}, -{0x2726, 0x240C}, -{0x2728, 0x5292}, -{0x272a, 0x80A0}, -{0x272c, 0x7110}, -{0x272e, 0x4382}, -{0x2730, 0x740E}, -{0x2732, 0x9382}, -{0x2734, 0x80BA}, -{0x2736, 0x2402}, -{0x2738, 0x4392}, -{0x273a, 0x740E}, -{0x273c, 0x4392}, -{0x273e, 0x80BC}, -{0x2740, 0x430F}, -{0x2742, 0x4130}, -{0x2744, 0xF31F}, -{0x2746, 0x27ED}, -{0x2748, 0x40B2}, -{0x274a, 0x0003}, -{0x274c, 0x7110}, -{0x274e, 0x431F}, -{0x2750, 0x4130}, -{0x2752, 0x4F0E}, -{0x2754, 0x421D}, -{0x2756, 0x8070}, -{0x2758, 0x425F}, -{0x275a, 0x0118}, -{0x275c, 0xF37F}, -{0x275e, 0x903E}, -{0x2760, 0x0003}, -{0x2762, 0x2405}, -{0x2764, 0x931E}, -{0x2766, 0x2403}, -{0x2768, 0x0B00}, -{0x276a, 0x7302}, -{0x276c, 0x0384}, -{0x276e, 0x930F}, -{0x2770, 0x241A}, -{0x2772, 0x930D}, -{0x2774, 0x2018}, -{0x2776, 0x9382}, -{0x2778, 0x7308}, -{0x277a, 0x2402}, -{0x277c, 0x930E}, -{0x277e, 0x2419}, -{0x2780, 0x9382}, -{0x2782, 0x7328}, -{0x2784, 0x2402}, -{0x2786, 0x931E}, -{0x2788, 0x2414}, -{0x278a, 0x9382}, -{0x278c, 0x710E}, -{0x278e, 0x2402}, -{0x2790, 0x932E}, -{0x2792, 0x240F}, -{0x2794, 0x9382}, -{0x2796, 0x7114}, -{0x2798, 0x2402}, -{0x279a, 0x922E}, -{0x279c, 0x240A}, -{0x279e, 0x903E}, -{0x27a0, 0x0003}, -{0x27a2, 0x23DA}, -{0x27a4, 0x3C06}, -{0x27a6, 0x43C2}, -{0x27a8, 0x0A80}, -{0x27aa, 0x0B00}, -{0x27ac, 0x7302}, -{0x27ae, 0xFFF0}, -{0x27b0, 0x3FD3}, -{0x27b2, 0x4F82}, -{0x27b4, 0x809A}, -{0x27b6, 0x431F}, -{0x27b8, 0x4130}, -{0x27ba, 0x120B}, -{0x27bc, 0x120A}, -{0x27be, 0x1209}, -{0x27c0, 0x1208}, -{0x27c2, 0x1207}, -{0x27c4, 0x1206}, -{0x27c6, 0x1205}, -{0x27c8, 0x1204}, -{0x27ca, 0x8221}, -{0x27cc, 0x403B}, -{0x27ce, 0x0016}, -{0x27d0, 0x510B}, -{0x27d2, 0x4F08}, -{0x27d4, 0x4E09}, -{0x27d6, 0x4BA1}, -{0x27d8, 0x0000}, -{0x27da, 0x4B1A}, -{0x27dc, 0x0002}, -{0x27de, 0x4B91}, -{0x27e0, 0x0004}, -{0x27e2, 0x0002}, -{0x27e4, 0x4304}, -{0x27e6, 0x4305}, -{0x27e8, 0x4306}, -{0x27ea, 0x4307}, -{0x27ec, 0x9382}, -{0x27ee, 0x80B4}, -{0x27f0, 0x2425}, -{0x27f2, 0x438A}, -{0x27f4, 0x0000}, -{0x27f6, 0x430B}, -{0x27f8, 0x4B0F}, -{0x27fa, 0x5F0F}, -{0x27fc, 0x5F0F}, -{0x27fe, 0x580F}, -{0x2800, 0x4C8F}, -{0x2802, 0x0000}, -{0x2804, 0x4D8F}, -{0x2806, 0x0002}, -{0x2808, 0x4B0F}, -{0x280a, 0x5F0F}, -{0x280c, 0x590F}, -{0x280e, 0x41AF}, -{0x2810, 0x0000}, -{0x2812, 0x531B}, -{0x2814, 0x923B}, -{0x2816, 0x2BF0}, -{0x2818, 0x430B}, -{0x281a, 0x4B0F}, -{0x281c, 0x5F0F}, -{0x281e, 0x5F0F}, -{0x2820, 0x580F}, -{0x2822, 0x5F34}, -{0x2824, 0x6F35}, -{0x2826, 0x4B0F}, -{0x2828, 0x5F0F}, -{0x282a, 0x590F}, -{0x282c, 0x4F2E}, -{0x282e, 0x430F}, -{0x2830, 0x5E06}, -{0x2832, 0x6F07}, -{0x2834, 0x531B}, -{0x2836, 0x923B}, -{0x2838, 0x2BF0}, -{0x283a, 0x3C18}, -{0x283c, 0x4A2E}, -{0x283e, 0x4E0F}, -{0x2840, 0x5F0F}, -{0x2842, 0x5F0F}, -{0x2844, 0x580F}, -{0x2846, 0x4C8F}, -{0x2848, 0x0000}, -{0x284a, 0x4D8F}, -{0x284c, 0x0002}, -{0x284e, 0x5E0E}, -{0x2850, 0x590E}, -{0x2852, 0x41AE}, -{0x2854, 0x0000}, -{0x2856, 0x4A2F}, -{0x2858, 0x903F}, -{0x285a, 0x0007}, -{0x285c, 0x2404}, -{0x285e, 0x531F}, -{0x2860, 0x4F8A}, -{0x2862, 0x0000}, -{0x2864, 0x3FD9}, -{0x2866, 0x438A}, -{0x2868, 0x0000}, -{0x286a, 0x3FD6}, -{0x286c, 0x440C}, -{0x286e, 0x450D}, -{0x2870, 0x460A}, -{0x2872, 0x470B}, -{0x2874, 0x12B0}, -{0x2876, 0xFEAA}, -{0x2878, 0x4C08}, -{0x287a, 0x4D09}, -{0x287c, 0x4C0E}, -{0x287e, 0x430F}, -{0x2880, 0x4E0A}, -{0x2882, 0x4F0B}, -{0x2884, 0x460C}, -{0x2886, 0x470D}, -{0x2888, 0x12B0}, -{0x288a, 0xFE6E}, -{0x288c, 0x8E04}, -{0x288e, 0x7F05}, -{0x2890, 0x440E}, -{0x2892, 0x450F}, -{0x2894, 0xC312}, -{0x2896, 0x100F}, -{0x2898, 0x100E}, -{0x289a, 0x110F}, -{0x289c, 0x100E}, -{0x289e, 0x110F}, -{0x28a0, 0x100E}, -{0x28a2, 0x411D}, -{0x28a4, 0x0002}, -{0x28a6, 0x4E8D}, -{0x28a8, 0x0000}, -{0x28aa, 0x480F}, -{0x28ac, 0x5221}, -{0x28ae, 0x4134}, -{0x28b0, 0x4135}, -{0x28b2, 0x4136}, -{0x28b4, 0x4137}, -{0x28b6, 0x4138}, -{0x28b8, 0x4139}, -{0x28ba, 0x413A}, -{0x28bc, 0x413B}, -{0x28be, 0x4130}, -{0x28c0, 0x120A}, -{0x28c2, 0x4F0D}, -{0x28c4, 0x4E0C}, -{0x28c6, 0x425F}, -{0x28c8, 0x00BA}, -{0x28ca, 0x4F4A}, -{0x28cc, 0x503A}, -{0x28ce, 0x0010}, -{0x28d0, 0x931D}, -{0x28d2, 0x242B}, -{0x28d4, 0x932D}, -{0x28d6, 0x2421}, -{0x28d8, 0x903D}, -{0x28da, 0x0003}, -{0x28dc, 0x2418}, -{0x28de, 0x922D}, -{0x28e0, 0x2413}, -{0x28e2, 0x903D}, -{0x28e4, 0x0005}, -{0x28e6, 0x2407}, -{0x28e8, 0x903D}, -{0x28ea, 0x0006}, -{0x28ec, 0x2028}, -{0x28ee, 0xC312}, -{0x28f0, 0x100A}, -{0x28f2, 0x110A}, -{0x28f4, 0x3C24}, -{0x28f6, 0x4A0E}, -{0x28f8, 0xC312}, -{0x28fa, 0x100E}, -{0x28fc, 0x110E}, -{0x28fe, 0x4E0F}, -{0x2900, 0x110F}, -{0x2902, 0x4E0A}, -{0x2904, 0x5F0A}, -{0x2906, 0x3C1B}, -{0x2908, 0xC312}, -{0x290a, 0x100A}, -{0x290c, 0x3C18}, -{0x290e, 0x4A0E}, -{0x2910, 0xC312}, -{0x2912, 0x100E}, -{0x2914, 0x4E0F}, -{0x2916, 0x110F}, -{0x2918, 0x3FF3}, -{0x291a, 0x4A0F}, -{0x291c, 0xC312}, -{0x291e, 0x100F}, -{0x2920, 0x4F0E}, -{0x2922, 0x110E}, -{0x2924, 0x4F0A}, -{0x2926, 0x5E0A}, -{0x2928, 0x3C0A}, -{0x292a, 0x4A0F}, -{0x292c, 0xC312}, -{0x292e, 0x100F}, -{0x2930, 0x4F0E}, -{0x2932, 0x110E}, -{0x2934, 0x4F0A}, -{0x2936, 0x5E0A}, -{0x2938, 0x4E0F}, -{0x293a, 0x110F}, -{0x293c, 0x3FE3}, -{0x293e, 0x12B0}, -{0x2940, 0xFE58}, -{0x2942, 0x4E0F}, -{0x2944, 0xC312}, -{0x2946, 0x100F}, -{0x2948, 0x110F}, -{0x294a, 0x110F}, -{0x294c, 0x110F}, -{0x294e, 0x413A}, -{0x2950, 0x4130}, -{0x2952, 0x120B}, -{0x2954, 0x120A}, -{0x2956, 0x1209}, -{0x2958, 0x1208}, -{0x295a, 0x425F}, -{0x295c, 0x0080}, -{0x295e, 0xF36F}, -{0x2960, 0x4F0E}, -{0x2962, 0xF32E}, -{0x2964, 0x4E82}, -{0x2966, 0x80BA}, -{0x2968, 0xB3D2}, -{0x296a, 0x0786}, -{0x296c, 0x2402}, -{0x296e, 0x4392}, -{0x2970, 0x7002}, -{0x2972, 0x4392}, -{0x2974, 0x80BC}, -{0x2976, 0x4382}, -{0x2978, 0x740E}, -{0x297a, 0x9382}, -{0x297c, 0x80BA}, -{0x297e, 0x2402}, -{0x2980, 0x4392}, -{0x2982, 0x740E}, -{0x2984, 0x93C2}, -{0x2986, 0x00C6}, -{0x2988, 0x2406}, -{0x298a, 0xB392}, -{0x298c, 0x732A}, -{0x298e, 0x2403}, -{0x2990, 0xB3D2}, -{0x2992, 0x00C7}, -{0x2994, 0x2412}, -{0x2996, 0x4292}, -{0x2998, 0x01A8}, -{0x299a, 0x0688}, -{0x299c, 0x4292}, -{0x299e, 0x01AA}, -{0x29a0, 0x068A}, -{0x29a2, 0x4292}, -{0x29a4, 0x01AC}, -{0x29a6, 0x068C}, -{0x29a8, 0x4292}, -{0x29aa, 0x01AE}, -{0x29ac, 0x068E}, -{0x29ae, 0x4292}, -{0x29b0, 0x0190}, -{0x29b2, 0x0A92}, -{0x29b4, 0x4292}, -{0x29b6, 0x0192}, -{0x29b8, 0x0A94}, -{0x29ba, 0x430E}, -{0x29bc, 0x425F}, -{0x29be, 0x00C7}, -{0x29c0, 0xF35F}, -{0x29c2, 0xF37F}, -{0x29c4, 0xF21F}, -{0x29c6, 0x732A}, -{0x29c8, 0x200C}, -{0x29ca, 0xB3D2}, -{0x29cc, 0x00C7}, -{0x29ce, 0x2003}, -{0x29d0, 0xB392}, -{0x29d2, 0x80A2}, -{0x29d4, 0x2006}, -{0x29d6, 0xB3A2}, -{0x29d8, 0x732A}, -{0x29da, 0x2003}, -{0x29dc, 0x9382}, -{0x29de, 0x8096}, -{0x29e0, 0x2401}, -{0x29e2, 0x431E}, -{0x29e4, 0x4E82}, -{0x29e6, 0x80B4}, -{0x29e8, 0x930E}, -{0x29ea, 0x2002}, -{0x29ec, 0x4030}, -{0x29ee, 0xFDE4}, -{0x29f0, 0x4382}, -{0x29f2, 0x80BE}, -{0x29f4, 0x421F}, -{0x29f6, 0x732A}, -{0x29f8, 0xF31F}, -{0x29fa, 0x4F82}, -{0x29fc, 0x80A2}, -{0x29fe, 0x425F}, -{0x2a00, 0x008C}, -{0x2a02, 0x4FC2}, -{0x2a04, 0x8092}, -{0x2a06, 0x43C2}, -{0x2a08, 0x8093}, -{0x2a0a, 0x425F}, -{0x2a0c, 0x009E}, -{0x2a0e, 0x4F48}, -{0x2a10, 0x425F}, -{0x2a12, 0x009F}, -{0x2a14, 0xF37F}, -{0x2a16, 0x5F08}, -{0x2a18, 0x1108}, -{0x2a1a, 0x1108}, -{0x2a1c, 0x425F}, -{0x2a1e, 0x00B2}, -{0x2a20, 0x4F49}, -{0x2a22, 0x425F}, -{0x2a24, 0x00B3}, -{0x2a26, 0xF37F}, -{0x2a28, 0x5F09}, -{0x2a2a, 0x1109}, -{0x2a2c, 0x1109}, -{0x2a2e, 0x425F}, -{0x2a30, 0x00BA}, -{0x2a32, 0x4F4C}, -{0x2a34, 0x407A}, -{0x2a36, 0x001C}, -{0x2a38, 0x12B0}, -{0x2a3a, 0xFE8E}, -{0x2a3c, 0x934C}, -{0x2a3e, 0x25BE}, -{0x2a40, 0x403E}, -{0x2a42, 0x0080}, -{0x2a44, 0x4E0F}, -{0x2a46, 0xF37F}, -{0x2a48, 0x108F}, -{0x2a4a, 0xD03F}, -{0x2a4c, 0x008B}, -{0x2a4e, 0x4F82}, -{0x2a50, 0x0B88}, -{0x2a52, 0x0C0A}, -{0x2a54, 0x403C}, -{0x2a56, 0x0813}, -{0x2a58, 0x403D}, -{0x2a5a, 0x007F}, -{0x2a5c, 0x403F}, -{0x2a5e, 0x00BA}, -{0x2a60, 0x4F6E}, -{0x2a62, 0x90FF}, -{0x2a64, 0x0010}, -{0x2a66, 0x0000}, -{0x2a68, 0x2D13}, -{0x2a6a, 0x403C}, -{0x2a6c, 0x1005}, -{0x2a6e, 0x430D}, -{0x2a70, 0x425E}, -{0x2a72, 0x00BA}, -{0x2a74, 0x4E4F}, -{0x2a76, 0x108F}, -{0x2a78, 0xDD0F}, -{0x2a7a, 0x4F82}, -{0x2a7c, 0x0B90}, -{0x2a7e, 0x0C0A}, -{0x2a80, 0x4C82}, -{0x2a82, 0x0B8A}, -{0x2a84, 0x0C0A}, -{0x2a86, 0x425F}, -{0x2a88, 0x0C87}, -{0x2a8a, 0x4F4E}, -{0x2a8c, 0x425F}, -{0x2a8e, 0x0C88}, -{0x2a90, 0xF37F}, -{0x2a92, 0x12B0}, -{0x2a94, 0xF8C0}, -{0x2a96, 0x4F82}, -{0x2a98, 0x0C8C}, -{0x2a9a, 0x425F}, -{0x2a9c, 0x0C85}, -{0x2a9e, 0x4F4E}, -{0x2aa0, 0x425F}, -{0x2aa2, 0x0C89}, -{0x2aa4, 0xF37F}, -{0x2aa6, 0x12B0}, -{0x2aa8, 0xF8C0}, -{0x2aaa, 0x4F82}, -{0x2aac, 0x0C8A}, -{0x2aae, 0x425E}, -{0x2ab0, 0x00B7}, -{0x2ab2, 0x5E4E}, -{0x2ab4, 0x4EC2}, -{0x2ab6, 0x0CB0}, -{0x2ab8, 0x425F}, -{0x2aba, 0x00B8}, -{0x2abc, 0x5F4F}, -{0x2abe, 0x4FC2}, -{0x2ac0, 0x0CB1}, -{0x2ac2, 0x480E}, -{0x2ac4, 0x5E0E}, -{0x2ac6, 0x5E0E}, -{0x2ac8, 0x5E0E}, -{0x2aca, 0x5E0E}, -{0x2acc, 0x490F}, -{0x2ace, 0x5F0F}, -{0x2ad0, 0x5F0F}, -{0x2ad2, 0x5F0F}, -{0x2ad4, 0x5F0F}, -{0x2ad6, 0x5F0F}, -{0x2ad8, 0x5F0F}, -{0x2ada, 0x5F0F}, -{0x2adc, 0xDF0E}, -{0x2ade, 0x4E82}, -{0x2ae0, 0x0A8E}, -{0x2ae2, 0xB229}, -{0x2ae4, 0x2401}, -{0x2ae6, 0x5339}, -{0x2ae8, 0xB3E2}, -{0x2aea, 0x0080}, -{0x2aec, 0x2403}, -{0x2aee, 0x40F2}, -{0x2af0, 0x0003}, -{0x2af2, 0x00B5}, -{0x2af4, 0x40B2}, -{0x2af6, 0x1000}, -{0x2af8, 0x7500}, -{0x2afa, 0x40B2}, -{0x2afc, 0x1001}, -{0x2afe, 0x7502}, -{0x2b00, 0x40B2}, -{0x2b02, 0x0803}, -{0x2b04, 0x7504}, -{0x2b06, 0x40B2}, -{0x2b08, 0x080F}, -{0x2b0a, 0x7506}, -{0x2b0c, 0x40B2}, -{0x2b0e, 0x6003}, -{0x2b10, 0x7508}, -{0x2b12, 0x40B2}, -{0x2b14, 0x0801}, -{0x2b16, 0x750A}, -{0x2b18, 0x40B2}, -{0x2b1a, 0x0800}, -{0x2b1c, 0x750C}, -{0x2b1e, 0x40B2}, -{0x2b20, 0x1400}, -{0x2b22, 0x750E}, -{0x2b24, 0x403F}, -{0x2b26, 0x0003}, -{0x2b28, 0x12B0}, -{0x2b2a, 0xF752}, -{0x2b2c, 0x421F}, -{0x2b2e, 0x0098}, -{0x2b30, 0x821F}, -{0x2b32, 0x0092}, -{0x2b34, 0x531F}, -{0x2b36, 0xC312}, -{0x2b38, 0x100F}, -{0x2b3a, 0x4F82}, -{0x2b3c, 0x0A86}, -{0x2b3e, 0x421F}, -{0x2b40, 0x00AC}, -{0x2b42, 0x821F}, -{0x2b44, 0x00A6}, -{0x2b46, 0x531F}, -{0x2b48, 0x4F82}, -{0x2b4a, 0x0A88}, -{0x2b4c, 0xB0B2}, -{0x2b4e, 0x0010}, -{0x2b50, 0x0A84}, -{0x2b52, 0x248F}, -{0x2b54, 0x421E}, -{0x2b56, 0x068C}, -{0x2b58, 0xC312}, -{0x2b5a, 0x100E}, -{0x2b5c, 0x4E82}, -{0x2b5e, 0x0782}, -{0x2b60, 0x4292}, -{0x2b62, 0x068E}, -{0x2b64, 0x0784}, -{0x2b66, 0xB3D2}, -{0x2b68, 0x0CB6}, -{0x2b6a, 0x2418}, -{0x2b6c, 0x421A}, -{0x2b6e, 0x0CB8}, -{0x2b70, 0x430B}, -{0x2b72, 0x425F}, -{0x2b74, 0x0CBA}, -{0x2b76, 0x4F4E}, -{0x2b78, 0x430F}, -{0x2b7a, 0x4E0F}, -{0x2b7c, 0x430E}, -{0x2b7e, 0xDE0A}, -{0x2b80, 0xDF0B}, -{0x2b82, 0x421F}, -{0x2b84, 0x0CBC}, -{0x2b86, 0x4F0C}, -{0x2b88, 0x430D}, -{0x2b8a, 0x421F}, -{0x2b8c, 0x0CBE}, -{0x2b8e, 0x430E}, -{0x2b90, 0xDE0C}, -{0x2b92, 0xDF0D}, -{0x2b94, 0x12B0}, -{0x2b96, 0xFEAA}, -{0x2b98, 0x4C82}, -{0x2b9a, 0x0194}, -{0x2b9c, 0xB2A2}, -{0x2b9e, 0x0A84}, -{0x2ba0, 0x2412}, -{0x2ba2, 0x421E}, -{0x2ba4, 0x0A96}, -{0x2ba6, 0xC312}, -{0x2ba8, 0x100E}, -{0x2baa, 0x110E}, -{0x2bac, 0x110E}, -{0x2bae, 0x43C2}, -{0x2bb0, 0x0A98}, -{0x2bb2, 0x431D}, -{0x2bb4, 0x4E0F}, -{0x2bb6, 0x9F82}, -{0x2bb8, 0x0194}, -{0x2bba, 0x2850}, -{0x2bbc, 0x5E0F}, -{0x2bbe, 0x531D}, -{0x2bc0, 0x903D}, -{0x2bc2, 0x0009}, -{0x2bc4, 0x2BF8}, -{0x2bc6, 0x4292}, -{0x2bc8, 0x0084}, -{0x2bca, 0x7524}, -{0x2bcc, 0x4292}, -{0x2bce, 0x0088}, -{0x2bd0, 0x7316}, -{0x2bd2, 0x9382}, -{0x2bd4, 0x8092}, -{0x2bd6, 0x2403}, -{0x2bd8, 0x4292}, -{0x2bda, 0x008A}, -{0x2bdc, 0x7316}, -{0x2bde, 0x430E}, -{0x2be0, 0x421F}, -{0x2be2, 0x0086}, -{0x2be4, 0x822F}, -{0x2be6, 0x9F82}, -{0x2be8, 0x0084}, -{0x2bea, 0x2801}, -{0x2bec, 0x431E}, -{0x2bee, 0x4292}, -{0x2bf0, 0x0086}, -{0x2bf2, 0x7314}, -{0x2bf4, 0x93C2}, -{0x2bf6, 0x00BC}, -{0x2bf8, 0x2007}, -{0x2bfa, 0xB31E}, -{0x2bfc, 0x2405}, -{0x2bfe, 0x421F}, -{0x2c00, 0x0084}, -{0x2c02, 0x522F}, -{0x2c04, 0x4F82}, -{0x2c06, 0x7314}, -{0x2c08, 0x425F}, -{0x2c0a, 0x00BC}, -{0x2c0c, 0xF37F}, -{0x2c0e, 0xFE0F}, -{0x2c10, 0x2406}, -{0x2c12, 0x421E}, -{0x2c14, 0x0086}, -{0x2c16, 0x503E}, -{0x2c18, 0xFFFB}, -{0x2c1a, 0x4E82}, -{0x2c1c, 0x7524}, -{0x2c1e, 0x430E}, -{0x2c20, 0x421F}, -{0x2c22, 0x7524}, -{0x2c24, 0x9F82}, -{0x2c26, 0x809C}, -{0x2c28, 0x2C07}, -{0x2c2a, 0x9382}, -{0x2c2c, 0x8096}, -{0x2c2e, 0x2004}, -{0x2c30, 0x9382}, -{0x2c32, 0x8098}, -{0x2c34, 0x2001}, -{0x2c36, 0x431E}, -{0x2c38, 0x40B2}, -{0x2c3a, 0x0032}, -{0x2c3c, 0x7522}, -{0x2c3e, 0x4292}, -{0x2c40, 0x7524}, -{0x2c42, 0x809C}, -{0x2c44, 0x930E}, -{0x2c46, 0x24E6}, -{0x2c48, 0x421F}, -{0x2c4a, 0x7316}, -{0x2c4c, 0xC312}, -{0x2c4e, 0x100F}, -{0x2c50, 0x832F}, -{0x2c52, 0x4F82}, -{0x2c54, 0x7522}, -{0x2c56, 0x53B2}, -{0x2c58, 0x7524}, -{0x2c5a, 0x3CDC}, -{0x2c5c, 0x431F}, -{0x2c5e, 0x4D0E}, -{0x2c60, 0x533E}, -{0x2c62, 0x930E}, -{0x2c64, 0x2403}, -{0x2c66, 0x5F0F}, -{0x2c68, 0x831E}, -{0x2c6a, 0x23FD}, -{0x2c6c, 0x4FC2}, -{0x2c6e, 0x0A98}, -{0x2c70, 0x3FAA}, -{0x2c72, 0x4292}, -{0x2c74, 0x0A86}, -{0x2c76, 0x0782}, -{0x2c78, 0x421F}, -{0x2c7a, 0x0A88}, -{0x2c7c, 0x490E}, -{0x2c7e, 0x930E}, -{0x2c80, 0x2404}, -{0x2c82, 0xC312}, -{0x2c84, 0x100F}, -{0x2c86, 0x831E}, -{0x2c88, 0x23FC}, -{0x2c8a, 0x4F82}, -{0x2c8c, 0x0784}, -{0x2c8e, 0x3F6B}, -{0x2c90, 0x90F2}, -{0x2c92, 0x0010}, -{0x2c94, 0x00BA}, -{0x2c96, 0x2809}, -{0x2c98, 0x90F2}, -{0x2c9a, 0x0031}, -{0x2c9c, 0x00BA}, -{0x2c9e, 0x2C05}, -{0x2ca0, 0x403C}, -{0x2ca2, 0x0E05}, -{0x2ca4, 0x403D}, -{0x2ca6, 0x003C}, -{0x2ca8, 0x3EE3}, -{0x2caa, 0x90F2}, -{0x2cac, 0x0031}, -{0x2cae, 0x00BA}, -{0x2cb0, 0x280D}, -{0x2cb2, 0x90F2}, -{0x2cb4, 0x0039}, -{0x2cb6, 0x00BA}, -{0x2cb8, 0x2C09}, -{0x2cba, 0x403C}, -{0x2cbc, 0x0E09}, -{0x2cbe, 0x403D}, -{0x2cc0, 0x003C}, -{0x2cc2, 0x425E}, -{0x2cc4, 0x00BA}, -{0x2cc6, 0x507E}, -{0x2cc8, 0x0003}, -{0x2cca, 0x3ED4}, -{0x2ccc, 0x90F2}, -{0x2cce, 0x0039}, -{0x2cd0, 0x00BA}, -{0x2cd2, 0x280D}, -{0x2cd4, 0x90F2}, -{0x2cd6, 0x0041}, -{0x2cd8, 0x00BA}, -{0x2cda, 0x2C09}, -{0x2cdc, 0x403C}, -{0x2cde, 0x0C0B}, -{0x2ce0, 0x403D}, -{0x2ce2, 0x003C}, -{0x2ce4, 0x425E}, -{0x2ce6, 0x00BA}, -{0x2ce8, 0x507E}, -{0x2cea, 0x0005}, -{0x2cec, 0x3EC3}, -{0x2cee, 0x90F2}, -{0x2cf0, 0x0041}, -{0x2cf2, 0x00BA}, -{0x2cf4, 0x280D}, -{0x2cf6, 0x90F2}, -{0x2cf8, 0x0051}, -{0x2cfa, 0x00BA}, -{0x2cfc, 0x2C09}, -{0x2cfe, 0x403C}, -{0x2d00, 0x0A0F}, -{0x2d02, 0x403D}, -{0x2d04, 0x003C}, -{0x2d06, 0x425E}, -{0x2d08, 0x00BA}, -{0x2d0a, 0x507E}, -{0x2d0c, 0x0009}, -{0x2d0e, 0x3EB2}, -{0x2d10, 0x90F2}, -{0x2d12, 0x0051}, -{0x2d14, 0x00BA}, -{0x2d16, 0x280D}, -{0x2d18, 0x90F2}, -{0x2d1a, 0x0061}, -{0x2d1c, 0x00BA}, -{0x2d1e, 0x2C09}, -{0x2d20, 0x403C}, -{0x2d22, 0x0A11}, -{0x2d24, 0x403D}, -{0x2d26, 0x003C}, -{0x2d28, 0x425E}, -{0x2d2a, 0x00BA}, -{0x2d2c, 0x507E}, -{0x2d2e, 0x000B}, -{0x2d30, 0x3EA1}, -{0x2d32, 0x90F2}, -{0x2d34, 0x0061}, -{0x2d36, 0x00BA}, -{0x2d38, 0x2807}, -{0x2d3a, 0x90F2}, -{0x2d3c, 0x0075}, -{0x2d3e, 0x00BA}, -{0x2d40, 0x2C03}, -{0x2d42, 0x403C}, -{0x2d44, 0x0813}, -{0x2d46, 0x3FF0}, -{0x2d48, 0x90F2}, -{0x2d4a, 0x0075}, -{0x2d4c, 0x00BA}, -{0x2d4e, 0x280B}, -{0x2d50, 0x90F2}, -{0x2d52, 0xFF91}, -{0x2d54, 0x00BA}, -{0x2d56, 0x2C07}, -{0x2d58, 0x403C}, -{0x2d5a, 0x0813}, -{0x2d5c, 0x425E}, -{0x2d5e, 0x00BA}, -{0x2d60, 0x507E}, -{0x2d62, 0x000C}, -{0x2d64, 0x3E87}, -{0x2d66, 0x90F2}, -{0x2d68, 0xFF91}, -{0x2d6a, 0x00BA}, -{0x2d6c, 0x280B}, -{0x2d6e, 0x90F2}, -{0x2d70, 0xFFB1}, -{0x2d72, 0x00BA}, -{0x2d74, 0x2C07}, -{0x2d76, 0x403D}, -{0x2d78, 0x0060}, -{0x2d7a, 0x425E}, -{0x2d7c, 0x00BA}, -{0x2d7e, 0x507E}, -{0x2d80, 0x000D}, -{0x2d82, 0x3E78}, -{0x2d84, 0x90F2}, -{0x2d86, 0xFFB1}, -{0x2d88, 0x00BA}, -{0x2d8a, 0x280B}, -{0x2d8c, 0x90F2}, -{0x2d8e, 0xFFD1}, -{0x2d90, 0x00BA}, -{0x2d92, 0x2C07}, -{0x2d94, 0x403D}, -{0x2d96, 0x0050}, -{0x2d98, 0x425E}, -{0x2d9a, 0x00BA}, -{0x2d9c, 0x507E}, -{0x2d9e, 0x000E}, -{0x2da0, 0x3E69}, -{0x2da2, 0x403D}, -{0x2da4, 0x003C}, -{0x2da6, 0x403F}, -{0x2da8, 0x00BA}, -{0x2daa, 0x4F6E}, -{0x2dac, 0x507E}, -{0x2dae, 0x000F}, -{0x2db0, 0x90FF}, -{0x2db2, 0xFFF1}, -{0x2db4, 0x0000}, -{0x2db6, 0x2A5E}, -{0x2db8, 0x437E}, -{0x2dba, 0x3E5C}, -{0x2dbc, 0x425F}, -{0x2dbe, 0x00BA}, -{0x2dc0, 0x4F4C}, -{0x2dc2, 0x407A}, -{0x2dc4, 0x001C}, -{0x2dc6, 0x12B0}, -{0x2dc8, 0xFE8E}, -{0x2dca, 0x4E4F}, -{0x2dcc, 0xC312}, -{0x2dce, 0x104F}, -{0x2dd0, 0x114F}, -{0x2dd2, 0xF37F}, -{0x2dd4, 0x5F0F}, -{0x2dd6, 0x5F0F}, -{0x2dd8, 0x5F0F}, -{0x2dda, 0x5F0F}, -{0x2ddc, 0x403E}, -{0x2dde, 0x00F0}, -{0x2de0, 0x8F0E}, -{0x2de2, 0x3E30}, -{0x2de4, 0x421F}, -{0x2de6, 0x80BE}, -{0x2de8, 0x903F}, -{0x2dea, 0x0009}, -{0x2dec, 0x2C05}, -{0x2dee, 0x531F}, -{0x2df0, 0x4F82}, -{0x2df2, 0x80BE}, -{0x2df4, 0x4030}, -{0x2df6, 0xF9F4}, -{0x2df8, 0x421F}, -{0x2dfa, 0x80B6}, -{0x2dfc, 0x903F}, -{0x2dfe, 0x0098}, -{0x2e00, 0x2C05}, -{0x2e02, 0x531F}, -{0x2e04, 0x4F82}, -{0x2e06, 0x80B6}, -{0x2e08, 0x4030}, -{0x2e0a, 0xF9F4}, -{0x2e0c, 0x4382}, -{0x2e0e, 0x80B6}, -{0x2e10, 0x4030}, -{0x2e12, 0xF9F4}, -{0x2e14, 0x4E82}, -{0x2e16, 0x8098}, -{0x2e18, 0xD392}, -{0x2e1a, 0x7102}, -{0x2e1c, 0x4138}, -{0x2e1e, 0x4139}, -{0x2e20, 0x413A}, -{0x2e22, 0x413B}, -{0x2e24, 0x4130}, -{0x2e26, 0x0260}, -{0x2e28, 0x0000}, -{0x2e2a, 0x0C18}, -{0x2e2c, 0x0240}, -{0x2e2e, 0x0000}, -{0x2e30, 0x0260}, -{0x2e32, 0x0000}, -{0x2e34, 0x0C05}, -{0x2e36, 0x4130}, -{0x2e38, 0x4382}, -{0x2e3a, 0x7602}, -{0x2e3c, 0x4F82}, -{0x2e3e, 0x7600}, -{0x2e40, 0x0270}, -{0x2e42, 0x0000}, -{0x2e44, 0x0C07}, -{0x2e46, 0x0270}, -{0x2e48, 0x0001}, -{0x2e4a, 0x421F}, -{0x2e4c, 0x7606}, -{0x2e4e, 0x4FC2}, -{0x2e50, 0x0188}, -{0x2e52, 0x4130}, -{0x2e54, 0xDF02}, -{0x2e56, 0x3FFE}, -{0x2e58, 0x430E}, -{0x2e5a, 0x930A}, -{0x2e5c, 0x2407}, -{0x2e5e, 0xC312}, -{0x2e60, 0x100C}, -{0x2e62, 0x2801}, -{0x2e64, 0x5A0E}, -{0x2e66, 0x5A0A}, -{0x2e68, 0x930C}, -{0x2e6a, 0x23F7}, -{0x2e6c, 0x4130}, -{0x2e6e, 0x430E}, -{0x2e70, 0x430F}, -{0x2e72, 0x3C08}, -{0x2e74, 0xC312}, -{0x2e76, 0x100D}, -{0x2e78, 0x100C}, -{0x2e7a, 0x2802}, -{0x2e7c, 0x5A0E}, -{0x2e7e, 0x6B0F}, -{0x2e80, 0x5A0A}, -{0x2e82, 0x6B0B}, -{0x2e84, 0x930C}, -{0x2e86, 0x23F6}, -{0x2e88, 0x930D}, -{0x2e8a, 0x23F4}, -{0x2e8c, 0x4130}, -{0x2e8e, 0xEE4E}, -{0x2e90, 0x407B}, -{0x2e92, 0x0009}, -{0x2e94, 0x3C05}, -{0x2e96, 0x100D}, -{0x2e98, 0x6E4E}, -{0x2e9a, 0x9A4E}, -{0x2e9c, 0x2801}, -{0x2e9e, 0x8A4E}, -{0x2ea0, 0x6C4C}, -{0x2ea2, 0x6D0D}, -{0x2ea4, 0x835B}, -{0x2ea6, 0x23F7}, -{0x2ea8, 0x4130}, -{0x2eaa, 0xEF0F}, -{0x2eac, 0xEE0E}, -{0x2eae, 0x4039}, -{0x2eb0, 0x0021}, -{0x2eb2, 0x3C0A}, -{0x2eb4, 0x1008}, -{0x2eb6, 0x6E0E}, -{0x2eb8, 0x6F0F}, -{0x2eba, 0x9B0F}, -{0x2ebc, 0x2805}, -{0x2ebe, 0x2002}, -{0x2ec0, 0x9A0E}, -{0x2ec2, 0x2802}, -{0x2ec4, 0x8A0E}, -{0x2ec6, 0x7B0F}, -{0x2ec8, 0x6C0C}, -{0x2eca, 0x6D0D}, -{0x2ecc, 0x6808}, -{0x2ece, 0x8319}, -{0x2ed0, 0x23F1}, -{0x2ed2, 0x4130}, -{0x2ed4, 0x0000}, -{0x2ffe, 0xf000}, -{0x3000, 0x00AE}, -{0x3002, 0x00AE}, -{0x3004, 0x00AE}, -{0x3006, 0x00AE}, -{0x3008, 0x00AE}, -{0x4000, 0x0400}, -{0x4002, 0x0400}, -{0x4004, 0x0C04}, -{0x4006, 0x0C04}, -{0x4008, 0x0C04}, - -//--- FW End ---// - - -//--- Initial Set file ---// -{0x0B02, 0x0014}, -{0x0B04, 0x07C8}, -{0x0B06, 0x5ED7}, -{0x0B14, 0x430F}, //PLL Main Div[15:8]. Mclk 26.022Mhz / 0x430F = Pclk(87.174Mhz) -{0x0B16, 0x4A0B}, -{0x0B18, 0x0000}, -{0x0B1A, 0x1044}, - -{0x004C, 0x0100}, //tg_enable. -{0x000C, 0x0000}, -{0x0036, 0x0048}, //ramp_rst_offset -{0x0038, 0x4800}, //ramp_sig_poffset -{0x0138, 0x0104}, //pxl_drv_pwr -{0x013A, 0x0100}, //tx_idle -{0x0C00, 0x3BC7}, //BLC_ctl1. Line BLC on = 0x3b, off = 0x2A //LBLC_ctl1. [0]en_blc, [1]en_lblc_dpc, [2]en_channel_blc, [3]en_adj_pxl_dpc, [4]en_adp_dead_pxl_th -{0x0C0E, 0x0500}, //0x07 BLC display On, 0x05 BLC D off //BLC_ctl3. Frame BLC On = 0x05, off=0x04 //FBLC_ctl3. [0]en_fblc, [1]en_blc_bypass, [2]en_fblc_dpc, [5]en_fobp_dig_offset, [7]en_lobp_dpc_bypass -{0x0C10, 0x0510}, //dig_blc_offset_h -{0x0C16, 0x0000}, //fobp_dig_b_offset. red b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C18, 0x0000}, //fobp_dig_Gb_offset. Gr b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C36, 0x0100}, //r_g_sum_ctl. [0]:g_sum_en. '1'enable, '0'disable. - -//--- MIPI blank time --------------// -{0x0902, 0x4101}, //mipi_value_clk_trail. MIPI CLK mode [1]'1'cont(0x43),'0'non-cont(0x41) [6]'1'2lane(0x41), '0'1lane(0x01) -{0x090A, 0x03E4}, //mipi_vblank_delay_h. -{0x090C, 0x0020}, //mipi_hblank_short_delay_h. -{0x090E, 0x0020}, //mipi_hblank_long_delay_h. -{0x0910, 0x5D07}, //05 mipi_LPX -{0x0912, 0x061e}, //05 mipi_CLK_prepare -{0x0914, 0x0407}, //02 mipi_clk_pre -{0x0916, 0x0d0a}, //09 mipi_data_zero -{0x0918, 0x0e09}, //0c mipi_clk_post - -//--- Pixel Array Addressing ------// -{0x000E, 0x0000}, -{0x0014, 0x003F}, -{0x0010, 0x0050}, -{0x0016, 0x008F}, -{0x0012, 0x00AA}, -{0x0018, 0x0ACD}, -{0x0020, 0x0700}, -{0x0022, 0x0004}, -{0x0028, 0x000B}, -{0x0024, 0xFFFA}, -{0x002A, 0xFFFF}, -{0x0026, 0x0016}, -{0x002C, 0x07b1}, -{0x0034, 0x0700}, - -{0x0128, 0x0002}, // digital_crop_x_offset_l -{0x012A, 0x0000}, // digital_crop_y_offset_l -{0x012C, 0x0A20}, //2C}, //2592 digital_crop_image_width -{0x012E, 0x0798}, //A4}, //1944 digital_crop_image_height - -//----< Image FMT Size >--------------------// -//Image size 2592x1944 -{0x0110, 0x0A20}, //X_output_size_h -{0x0112, 0x0798}, //Y_output_size_h - -//----< Frame / Line Length >--------------// -{0x0006, 0x07c0}, //frame_length_h 1984 -{0x0008, 0x0B40}, //line_length_h 2880 -{0x000A, 0x0DB0}, -//---------------------------------------// -//--- ETC set ----// -{0x003C, 0x0000}, //fixed frame off. b[0] '1'enable, '0'disable -{0x0500, 0x0000}, //DGA_ctl. b[1]'0'OTP_color_ratio_disable, '1' OTP_color_ratio_enable, b[2]'0'data_pedestal_en, '1'data_pedestal_dis. -{0x0700, 0x0590}, //Scaler Normal -{0x001E, 0x0101}, -{0x0032, 0x0101}, -{0x0A02, 0x0100}, // Fast sleep Enable -{0x0C12, 0x0100}, // BLC Offset -{0x0116, 0x0024}, // FBLC Ratio -//----------------// - -//--- AG / DG control ----------------// -//AG -{0x003A, 0x0000}, //Analog Gain. 0x00=x1, 0x70=x8, 0xf0=x16. - -//DG -{0x0508, 0x0100}, //DG_Gr_h. 0x01=x1, 0x07=x8. -{0x050a, 0x0100}, //DG_Gb_h. 0x01=x1, 0x07=x8. -{0x050c, 0x0100}, //DG_R_h. 0x01=x1, 0x07=x8. -{0x050e, 0x0100}, //DG_B_h. 0x01=x1, 0x07=x8. -//----------------------------------// - -//-----< Exp.Time >------------------------// -// Pclk_88Mhz @ Line_length_pclk : 2880 @Exp.Time 33.33ms -{0x0002, 0x0539}, //Fine_int : 33.33ms@Pclk88mhz@Line_length2880 -{0x0004, 0x07E0}, //coarse_int : 33.33ms@Pclk88mhz@Line_length2880 - -//--- ISP enable Selection ---------------// -{0x0A04, 0x011A}, //isp_en. [9]s-gamma,[8]MIPI_en,[6]compresion10to8,[5]Scaler,[4]window,[3]DG,[2]LSC,[1]adpc,[0]tpg -//----------------------------------------// - -{0x0118, 0x0100}, //sleep Off -}; - -struct msm_camera_i2c_reg_setting sr544_init = { - sr544_init_reg, sizeof(sr544_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0118, 0x00, 0x00, 100}, //sleep On - {0x0F02, 0x00, 0x00, 0}, - {0x011A, 0x01, 0x00, 0}, - {0x011B, 0x09, 0x00, 0}, - {0x0D04, 0x01, 0x00, 0}, - {0x0D00, 0x07, 0x00, 0}, - {0x004C, 0x01, 0x00, 0}, - {0x003E, 0x01, 0x00, 0}, - {0x0118, 0x01, 0x00, 0}, -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr552.h b/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr552.h deleted file mode 100644 index 2f183bd01d9b..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/eeprom/msm_otp_sr552.h +++ /dev/null @@ -1,2153 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include -#include -#include -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr552_init_reg[] = { -{0x0e00, 0x0102}, //tg_pmem_sckpw/sdly -{0x0e02, 0x0102}, //tg_dmem_sckpw/sdly -{0x0e04, 0x0102}, //tg_lsc_sram_sckpw/sdly -{0x2000, 0x7400}, -{0x2002, 0x1303}, -{0x2004, 0x7006}, -{0x2006, 0x1303}, -{0x2008, 0x0bd4}, -{0x200a, 0x5001}, -{0x200c, 0x5021}, -{0x200e, 0x0047}, -{0x2010, 0x0044}, -{0x2012, 0x03c4}, -{0x2014, 0x14c9}, -{0x2016, 0x207c}, -{0x2018, 0x0053}, -{0x201a, 0x0fd1}, -{0x201c, 0x00d2}, -{0x201e, 0x00a3}, -{0x2020, 0x00c9}, -{0x2022, 0x030b}, -{0x2024, 0x7008}, -{0x2026, 0x82c0}, -{0x2028, 0x01d9}, -{0x202a, 0x0024}, -{0x202c, 0x0018}, -{0x202e, 0x7006}, -{0x2030, 0x0fe4}, -{0x2032, 0x0018}, -{0x2034, 0x20fa}, -{0x2036, 0x1640}, -{0x2038, 0x7014}, -{0x203a, 0x14c0}, -{0x203c, 0x0253}, -{0x203e, 0x0d45}, -{0x2040, 0x00cc}, -{0x2042, 0x00c5}, -{0x2044, 0x00cc}, -{0x2046, 0x04d9}, -{0x2048, 0x20fc}, -{0x204a, 0x0018}, -{0x204c, 0x70d2}, -{0x204e, 0x2ffa}, -{0x2050, 0x17d8}, -{0x2052, 0x0024}, -{0x2054, 0x8351}, -{0x2056, 0x2128}, -{0x2058, 0x2100}, -{0x205a, 0x7047}, -{0x205c, 0x2f06}, -{0x205e, 0x2300}, -{0x2060, 0x7800}, -{0x2062, 0x7400}, -{0x2064, 0x0005}, -{0x2066, 0x7002}, -{0x2068, 0x1303}, -{0x206a, 0x00c5}, -{0x206c, 0x5083}, -{0x206e, 0x0047}, -{0x2070, 0x0044}, -{0x2072, 0x02d4}, -{0x2074, 0x7000}, -{0x2076, 0x85d0}, -{0x2078, 0x0044}, -{0x207a, 0x0009}, -{0x207c, 0x206c}, -{0x207e, 0x7001}, -{0x2080, 0x0fd1}, -{0x2082, 0x00d2}, -{0x2084, 0x00a3}, -{0x2086, 0x0020}, -{0x2088, 0x0089}, -{0x208a, 0x030b}, -{0x208c, 0x0459}, -{0x208e, 0x0024}, -{0x2090, 0x0018}, -{0x2092, 0x05a4}, -{0x2094, 0x0018}, -{0x2096, 0x20fa}, -{0x2098, 0x50c0}, -{0x209a, 0x0540}, -{0x209c, 0x0053}, -{0x209e, 0x0c45}, -{0x20a0, 0x00cc}, -{0x20a2, 0x00c5}, -{0x20a4, 0x00cc}, -{0x20a6, 0x04d9}, -{0x20a8, 0x20fc}, -{0x20aa, 0x0018}, -{0x20ac, 0x703a}, -{0x20ae, 0x2ffa}, -{0x20b0, 0x17d8}, -{0x20b2, 0x0024}, -{0x20b4, 0x8757}, -{0x20b6, 0x2128}, -{0x20b8, 0x2100}, -{0x20ba, 0x7800}, -{0x20bc, 0x3100}, -{0x20be, 0x01c6}, -{0x20c0, 0x01c4}, -{0x20c2, 0x01c0}, -{0x20c4, 0x01c6}, -{0x20c6, 0x2700}, -{0x20c8, 0x3300}, -{0x20ca, 0x7800}, -{0x20cc, 0x4031}, -{0x20ce, 0x83fa}, -{0x20d0, 0x43c2}, -{0x20d2, 0x807c}, -{0x20d4, 0x93d2}, -{0x20d6, 0x003d}, -{0x20d8, 0x2002}, -{0x20da, 0x4030}, -{0x20dc, 0xf712}, -{0x20de, 0x0900}, -{0x20e0, 0x7312}, -{0x20e2, 0x43d2}, -{0x20e4, 0x003d}, -{0x20e6, 0x4392}, -{0x20e8, 0x7326}, -{0x20ea, 0x4382}, -{0x20ec, 0x82f4}, -{0x20ee, 0xb3e2}, -{0x20f0, 0x0080}, -{0x20f2, 0x2402}, -{0x20f4, 0x4392}, -{0x20f6, 0x82f4}, -{0x20f8, 0x425f}, -{0x20fa, 0x008c}, -{0x20fc, 0xf37f}, -{0x20fe, 0x4f82}, -{0x2100, 0x8058}, -{0x2102, 0x40b2}, -{0x2104, 0x9887}, -{0x2106, 0x0b82}, -{0x2108, 0x40b2}, -{0x210a, 0xc540}, -{0x210c, 0x0b84}, -{0x210e, 0x40b2}, -{0x2110, 0xb540}, -{0x2112, 0x0b86}, -{0x2114, 0x40b2}, -{0x2116, 0xc085}, -{0x2118, 0x0b88}, -{0x211a, 0x40b2}, -{0x211c, 0xd651}, -{0x211e, 0x0b8a}, -{0x2120, 0x40b2}, -{0x2122, 0x0440}, -{0x2124, 0x0b8c}, -{0x2126, 0x40b2}, -{0x2128, 0xc600}, -{0x212a, 0x0b8e}, -{0x212c, 0x4392}, -{0x212e, 0x0ba6}, -{0x2130, 0x930f}, -{0x2132, 0x2406}, -{0x2134, 0x40b2}, -{0x2136, 0xdc55}, -{0x2138, 0x0b8a}, -{0x213a, 0x40b2}, -{0x213c, 0xc608}, -{0x213e, 0x0b8e}, -{0x2140, 0x43d2}, -{0x2142, 0x01a0}, -{0x2144, 0x43d2}, -{0x2146, 0x01a1}, -{0x2148, 0x43d2}, -{0x214a, 0x019d}, -{0x214c, 0x43d2}, -{0x214e, 0x0f82}, -{0x2150, 0x0cff}, -{0x2152, 0x0cff}, -{0x2154, 0x0cff}, -{0x2156, 0x0cff}, -{0x2158, 0x0cff}, -{0x215a, 0x0cff}, -{0x215c, 0x0cff}, -{0x215e, 0x0cff}, -{0x2160, 0x0cff}, -{0x2162, 0x0cff}, -{0x2164, 0x0cff}, -{0x2166, 0x0cff}, -{0x2168, 0x0cff}, -{0x216a, 0x0cff}, -{0x216c, 0x0cff}, -{0x216e, 0x0c28}, -{0x2170, 0x40f2}, -{0x2172, 0x000e}, -{0x2174, 0x0f90}, -{0x2176, 0x4392}, -{0x2178, 0x7326}, -{0x217a, 0x90f2}, -{0x217c, 0x0010}, -{0x217e, 0x00bf}, -{0x2180, 0x2002}, -{0x2182, 0x4030}, -{0x2184, 0xf69c}, -{0x2186, 0x4392}, -{0x2188, 0x7f10}, -{0x218a, 0x403f}, -{0x218c, 0x07ff}, -{0x218e, 0x4f82}, -{0x2190, 0x7100}, -{0x2192, 0x0800}, -{0x2194, 0x7f08}, -{0x2196, 0x4382}, -{0x2198, 0x7f00}, -{0x219a, 0x40b2}, -{0x219c, 0xf0bc}, -{0x219e, 0x7f02}, -{0x21a0, 0x0900}, -{0x21a2, 0x7f04}, -{0x21a4, 0x832f}, -{0x21a6, 0xb03f}, -{0x21a8, 0x8000}, -{0x21aa, 0x37f1}, -{0x21ac, 0x4382}, -{0x21ae, 0x7f10}, -{0x21b0, 0x4392}, -{0x21b2, 0x8072}, -{0x21b4, 0x40b2}, -{0x21b6, 0x02bc}, -{0x21b8, 0x731e}, -{0x21ba, 0x425f}, -{0x21bc, 0x009e}, -{0x21be, 0xf07f}, -{0x21c0, 0x000f}, -{0x21c2, 0x4f4e}, -{0x21c4, 0x425f}, -{0x21c6, 0x009f}, -{0x21c8, 0xf07f}, -{0x21ca, 0x000f}, -{0x21cc, 0xf37f}, -{0x21ce, 0x5f0e}, -{0x21d0, 0xc312}, -{0x21d2, 0x100e}, -{0x21d4, 0x4e82}, -{0x21d6, 0x80b8}, -{0x21d8, 0x403c}, -{0x21da, 0x00b2}, -{0x21dc, 0x4c6f}, -{0x21de, 0xf07f}, -{0x21e0, 0x000f}, -{0x21e2, 0x4f4e}, -{0x21e4, 0x403d}, -{0x21e6, 0x00b3}, -{0x21e8, 0x4d6f}, -{0x21ea, 0xf07f}, -{0x21ec, 0x000f}, -{0x21ee, 0xf37f}, -{0x21f0, 0x5f0e}, -{0x21f2, 0xc312}, -{0x21f4, 0x100e}, -{0x21f6, 0x4e82}, -{0x21f8, 0x82bc}, -{0x21fa, 0x4c6f}, -{0x21fc, 0xf07f}, -{0x21fe, 0x000f}, -{0x2200, 0x4f4e}, -{0x2202, 0x4d6f}, -{0x2204, 0xf07f}, -{0x2206, 0x000f}, -{0x2208, 0xf37f}, -{0x220a, 0x5f0e}, -{0x220c, 0x533e}, -{0x220e, 0x4e82}, -{0x2210, 0x8080}, -{0x2212, 0x43a2}, -{0x2214, 0x8082}, -{0x2216, 0xb3e2}, -{0x2218, 0x00b4}, -{0x221a, 0x2402}, -{0x221c, 0x4392}, -{0x221e, 0x8082}, -{0x2220, 0x43a1}, -{0x2222, 0x0000}, -{0x2224, 0xb3d2}, -{0x2226, 0x00b4}, -{0x2228, 0x2002}, -{0x222a, 0x4030}, -{0x222c, 0xf68a}, -{0x222e, 0x4381}, -{0x2230, 0x0000}, -{0x2232, 0x403e}, -{0x2234, 0x0030}, -{0x2236, 0x403f}, -{0x2238, 0x0180}, -{0x223a, 0x12b0}, -{0x223c, 0xfd94}, -{0x223e, 0x4382}, -{0x2240, 0x8078}, -{0x2242, 0x421f}, -{0x2244, 0x8078}, -{0x2246, 0x503f}, -{0x2248, 0x0430}, -{0x224a, 0x12b0}, -{0x224c, 0xfd80}, -{0x224e, 0x403b}, -{0x2250, 0x7606}, -{0x2252, 0x4ba2}, -{0x2254, 0x804a}, -{0x2256, 0x421f}, -{0x2258, 0x8078}, -{0x225a, 0x503f}, -{0x225c, 0x0431}, -{0x225e, 0x12b0}, -{0x2260, 0xfd80}, -{0x2262, 0x4ba2}, -{0x2264, 0x807e}, -{0x2266, 0x421f}, -{0x2268, 0x8078}, -{0x226a, 0x503f}, -{0x226c, 0x0432}, -{0x226e, 0x12b0}, -{0x2270, 0xfd80}, -{0x2272, 0x4ba2}, -{0x2274, 0x82f8}, -{0x2276, 0x421f}, -{0x2278, 0x8078}, -{0x227a, 0x503f}, -{0x227c, 0x0433}, -{0x227e, 0x12b0}, -{0x2280, 0xfd80}, -{0x2282, 0x4ba2}, -{0x2284, 0x8088}, -{0x2286, 0x421d}, -{0x2288, 0x807e}, -{0x228a, 0x4d0e}, -{0x228c, 0xf37e}, -{0x228e, 0x108e}, -{0x2290, 0xd21e}, -{0x2292, 0x804a}, -{0x2294, 0x4e82}, -{0x2296, 0x82f2}, -{0x2298, 0x425f}, -{0x229a, 0x8088}, -{0x229c, 0x108f}, -{0x229e, 0xd21f}, -{0x22a0, 0x82f8}, -{0x22a2, 0x4f82}, -{0x22a4, 0x82be}, -{0x22a6, 0x930f}, -{0x22a8, 0x2002}, -{0x22aa, 0x930e}, -{0x22ac, 0x240f}, -{0x22ae, 0x930d}, -{0x22b0, 0x2402}, -{0x22b2, 0x4030}, -{0x22b4, 0xf682}, -{0x22b6, 0x42df}, -{0x22b8, 0x804a}, -{0x22ba, 0x0000}, -{0x22bc, 0x421f}, -{0x22be, 0x8078}, -{0x22c0, 0x522f}, -{0x22c2, 0x4f82}, -{0x22c4, 0x8078}, -{0x22c6, 0x903f}, -{0x22c8, 0x0032}, -{0x22ca, 0x2bbb}, -{0x22cc, 0x4037}, -{0x22ce, 0x0098}, -{0x22d0, 0x4038}, -{0x22d2, 0x0092}, -{0x22d4, 0x472f}, -{0x22d6, 0x882f}, -{0x22d8, 0x531f}, -{0x22da, 0x4f0c}, -{0x22dc, 0x421a}, -{0x22de, 0x80b8}, -{0x22e0, 0x12b0}, -{0x22e2, 0xff0e}, -{0x22e4, 0x4c82}, -{0x22e6, 0x0a86}, -{0x22e8, 0x4039}, -{0x22ea, 0x00a6}, -{0x22ec, 0x421f}, -{0x22ee, 0x00ac}, -{0x22f0, 0x892f}, -{0x22f2, 0x531f}, -{0x22f4, 0x4f0c}, -{0x22f6, 0x421a}, -{0x22f8, 0x82bc}, -{0x22fa, 0x12b0}, -{0x22fc, 0xff0e}, -{0x22fe, 0x4c82}, -{0x2300, 0x0a88}, -{0x2302, 0x425f}, -{0x2304, 0x82bc}, -{0x2306, 0x5f4f}, -{0x2308, 0x5f4f}, -{0x230a, 0x5f4f}, -{0x230c, 0x5f4f}, -{0x230e, 0x425e}, -{0x2310, 0x80b8}, -{0x2312, 0x5e4e}, -{0x2314, 0xde4f}, -{0x2316, 0xd25f}, -{0x2318, 0x8058}, -{0x231a, 0x4fc2}, -{0x231c, 0x0a8e}, -{0x231e, 0x48a2}, -{0x2320, 0x0a8c}, -{0x2322, 0x47a2}, -{0x2324, 0x0a9e}, -{0x2326, 0x49a2}, -{0x2328, 0x0a8a}, -{0x232a, 0x40b2}, -{0x232c, 0x0034}, -{0x232e, 0x7000}, -{0x2330, 0x12b0}, -{0x2332, 0xfb08}, -{0x2334, 0x4392}, -{0x2336, 0x7f06}, -{0x2338, 0x43a2}, -{0x233a, 0x7f0a}, -{0x233c, 0x9382}, -{0x233e, 0x8058}, -{0x2340, 0x2596}, -{0x2342, 0x42a2}, -{0x2344, 0x7f0a}, -{0x2346, 0x43a2}, -{0x2348, 0x8050}, -{0x234a, 0x40b2}, -{0x234c, 0x016e}, -{0x234e, 0x8052}, -{0x2350, 0x40b2}, -{0x2352, 0x02da}, -{0x2354, 0x8054}, -{0x2356, 0x40b2}, -{0x2358, 0x0446}, -{0x235a, 0x8056}, -{0x235c, 0x40b2}, -{0x235e, 0xf062}, -{0x2360, 0x82c6}, -{0x2362, 0x4382}, -{0x2364, 0x8078}, -{0x2366, 0x9382}, -{0x2368, 0x7f0a}, -{0x236a, 0x2413}, -{0x236c, 0x430e}, -{0x236e, 0x421d}, -{0x2370, 0x82c6}, -{0x2372, 0x0800}, -{0x2374, 0x7f08}, -{0x2376, 0x4e0f}, -{0x2378, 0x5f0f}, -{0x237a, 0x4f92}, -{0x237c, 0x8050}, -{0x237e, 0x7f00}, -{0x2380, 0x4d82}, -{0x2382, 0x7f02}, -{0x2384, 0x531e}, -{0x2386, 0x421f}, -{0x2388, 0x7f0a}, -{0x238a, 0x9f0e}, -{0x238c, 0x2bf2}, -{0x238e, 0x4e82}, -{0x2390, 0x8078}, -{0x2392, 0x40f1}, -{0x2394, 0xff8b}, -{0x2396, 0x0004}, -{0x2398, 0x4392}, -{0x239a, 0x731c}, -{0x239c, 0x9382}, -{0x239e, 0x8072}, -{0x23a0, 0x240f}, -{0x23a2, 0x4382}, -{0x23a4, 0x8078}, -{0x23a6, 0x421e}, -{0x23a8, 0x8078}, -{0x23aa, 0x4e0f}, -{0x23ac, 0x5f0f}, -{0x23ae, 0x4f9f}, -{0x23b0, 0x0b00}, -{0x23b2, 0x808c}, -{0x23b4, 0x531e}, -{0x23b6, 0x4e82}, -{0x23b8, 0x8078}, -{0x23ba, 0x903e}, -{0x23bc, 0x0016}, -{0x23be, 0x2bf3}, -{0x23c0, 0xb3d2}, -{0x23c2, 0x00ce}, -{0x23c4, 0x2411}, -{0x23c6, 0x4382}, -{0x23c8, 0x8078}, -{0x23ca, 0x421f}, -{0x23cc, 0x8078}, -{0x23ce, 0x903f}, -{0x23d0, 0x0009}, -{0x23d2, 0x2404}, -{0x23d4, 0x5f0f}, -{0x23d6, 0x4f9f}, -{0x23d8, 0x808c}, -{0x23da, 0x0b80}, -{0x23dc, 0x5392}, -{0x23de, 0x8078}, -{0x23e0, 0x90b2}, -{0x23e2, 0x0016}, -{0x23e4, 0x8078}, -{0x23e6, 0x2bf1}, -{0x23e8, 0x9382}, -{0x23ea, 0x8072}, -{0x23ec, 0x2009}, -{0x23ee, 0x0b00}, -{0x23f0, 0x7302}, -{0x23f2, 0x0258}, -{0x23f4, 0x4382}, -{0x23f6, 0x7004}, -{0x23f8, 0x0900}, -{0x23fa, 0x7308}, -{0x23fc, 0x12b0}, -{0x23fe, 0xfb08}, -{0x2400, 0x4305}, -{0x2402, 0x4382}, -{0x2404, 0x808a}, -{0x2406, 0x12b0}, -{0x2408, 0xf8d2}, -{0x240a, 0x0900}, -{0x240c, 0x7328}, -{0x240e, 0x41a2}, -{0x2410, 0x7114}, -{0x2412, 0x421f}, -{0x2414, 0x7316}, -{0x2416, 0xc312}, -{0x2418, 0x100f}, -{0x241a, 0x503f}, -{0x241c, 0xff9c}, -{0x241e, 0x4f82}, -{0x2420, 0x7334}, -{0x2422, 0x0f00}, -{0x2424, 0x7302}, -{0x2426, 0x4392}, -{0x2428, 0x7f0c}, -{0x242a, 0x4392}, -{0x242c, 0x7f10}, -{0x242e, 0x4392}, -{0x2430, 0x770a}, -{0x2432, 0x4392}, -{0x2434, 0x770e}, -{0x2436, 0x9392}, -{0x2438, 0x7114}, -{0x243a, 0x2073}, -{0x243c, 0x0b00}, -{0x243e, 0x7302}, -{0x2440, 0x0258}, -{0x2442, 0x4382}, -{0x2444, 0x7004}, -{0x2446, 0x0800}, -{0x2448, 0x7118}, -{0x244a, 0x403e}, -{0x244c, 0x732a}, -{0x244e, 0x4e2f}, -{0x2450, 0x4f4b}, -{0x2452, 0xf35b}, -{0x2454, 0xd25b}, -{0x2456, 0x8072}, -{0x2458, 0x4e2f}, -{0x245a, 0xf36f}, -{0x245c, 0xdf4b}, -{0x245e, 0x1230}, -{0x2460, 0x0cce}, -{0x2462, 0x1230}, -{0x2464, 0x0cf0}, -{0x2466, 0x1230}, -{0x2468, 0x82c2}, -{0x246a, 0x421c}, -{0x246c, 0x0ca0}, -{0x246e, 0x421d}, -{0x2470, 0x0caa}, -{0x2472, 0x421e}, -{0x2474, 0x0cb4}, -{0x2476, 0x421f}, -{0x2478, 0x0cb2}, -{0x247a, 0x12b0}, -{0x247c, 0xf7ce}, -{0x247e, 0x1230}, -{0x2480, 0x0cd0}, -{0x2482, 0x1230}, -{0x2484, 0x0cf2}, -{0x2486, 0x1230}, -{0x2488, 0x82c4}, -{0x248a, 0x421c}, -{0x248c, 0x0ca2}, -{0x248e, 0x421d}, -{0x2490, 0x0cac}, -{0x2492, 0x421e}, -{0x2494, 0x0cb8}, -{0x2496, 0x421f}, -{0x2498, 0x0cb6}, -{0x249a, 0x12b0}, -{0x249c, 0xf7ce}, -{0x249e, 0x1230}, -{0x24a0, 0x0cd2}, -{0x24a2, 0x1230}, -{0x24a4, 0x0cf4}, -{0x24a6, 0x1230}, -{0x24a8, 0x82c0}, -{0x24aa, 0x421c}, -{0x24ac, 0x0ca4}, -{0x24ae, 0x421d}, -{0x24b0, 0x0cae}, -{0x24b2, 0x421e}, -{0x24b4, 0x0cbc}, -{0x24b6, 0x421f}, -{0x24b8, 0x0cba}, -{0x24ba, 0x12b0}, -{0x24bc, 0xf7ce}, -{0x24be, 0x1230}, -{0x24c0, 0x0cd4}, -{0x24c2, 0x1230}, -{0x24c4, 0x0cf6}, -{0x24c6, 0x1230}, -{0x24c8, 0x8076}, -{0x24ca, 0x421c}, -{0x24cc, 0x0ca6}, -{0x24ce, 0x421d}, -{0x24d0, 0x0cb0}, -{0x24d2, 0x421e}, -{0x24d4, 0x0cc0}, -{0x24d6, 0x421f}, -{0x24d8, 0x0cbe}, -{0x24da, 0x12b0}, -{0x24dc, 0xf7ce}, -{0x24de, 0x425f}, -{0x24e0, 0x0c80}, -{0x24e2, 0xf35f}, -{0x24e4, 0x5031}, -{0x24e6, 0x0018}, -{0x24e8, 0x934f}, -{0x24ea, 0x2008}, -{0x24ec, 0x4382}, -{0x24ee, 0x0cce}, -{0x24f0, 0x4382}, -{0x24f2, 0x0cd0}, -{0x24f4, 0x4382}, -{0x24f6, 0x0cd2}, -{0x24f8, 0x4382}, -{0x24fa, 0x0cd4}, -{0x24fc, 0x425f}, -{0x24fe, 0x807c}, -{0x2500, 0xdb4f}, -{0x2502, 0xf37f}, -{0x2504, 0x934b}, -{0x2506, 0x2001}, -{0x2508, 0x5f0f}, -{0x250a, 0x4fc2}, -{0x250c, 0x807c}, -{0x250e, 0x0900}, -{0x2510, 0x7112}, -{0x2512, 0x415f}, -{0x2514, 0x0004}, -{0x2516, 0x12b0}, -{0x2518, 0xf760}, -{0x251a, 0x0b00}, -{0x251c, 0x7302}, -{0x251e, 0x0034}, -{0x2520, 0x3f8a}, -{0x2522, 0x0b00}, -{0x2524, 0x7302}, -{0x2526, 0x0034}, -{0x2528, 0x4392}, -{0x252a, 0x7004}, -{0x252c, 0x9382}, -{0x252e, 0x7114}, -{0x2530, 0x2016}, -{0x2532, 0x421e}, -{0x2534, 0x7100}, -{0x2536, 0x421f}, -{0x2538, 0x00a2}, -{0x253a, 0x9f0e}, -{0x253c, 0x2805}, -{0x253e, 0x421f}, -{0x2540, 0x7100}, -{0x2542, 0x9f82}, -{0x2544, 0x00a8}, -{0x2546, 0x2c02}, -{0x2548, 0x4382}, -{0x254a, 0x7004}, -{0x254c, 0x415f}, -{0x254e, 0x0004}, -{0x2550, 0x12b0}, -{0x2552, 0xf760}, -{0x2554, 0x930f}, -{0x2556, 0x276f}, -{0x2558, 0x4382}, -{0x255a, 0x8072}, -{0x255c, 0x3f1f}, -{0x255e, 0x421e}, -{0x2560, 0x7100}, -{0x2562, 0x421f}, -{0x2564, 0x00a6}, -{0x2566, 0x9f0e}, -{0x2568, 0x2805}, -{0x256a, 0x421f}, -{0x256c, 0x7100}, -{0x256e, 0x9f82}, -{0x2570, 0x00ac}, -{0x2572, 0x2c02}, -{0x2574, 0x4382}, -{0x2576, 0x7004}, -{0x2578, 0x430b}, -{0x257a, 0x4307}, -{0x257c, 0x4304}, -{0x257e, 0x4309}, -{0x2580, 0x403f}, -{0x2582, 0x7100}, -{0x2584, 0x4f2e}, -{0x2586, 0xf31e}, -{0x2588, 0x4e82}, -{0x258a, 0x804e}, -{0x258c, 0x4f2f}, -{0x258e, 0x4f0e}, -{0x2590, 0x503e}, -{0x2592, 0xffd8}, -{0x2594, 0x4e81}, -{0x2596, 0x0002}, -{0x2598, 0x9382}, -{0x259a, 0x82f4}, -{0x259c, 0x2464}, -{0x259e, 0x4f06}, -{0x25a0, 0x5036}, -{0x25a2, 0xffd6}, -{0x25a4, 0x9382}, -{0x25a6, 0x8058}, -{0x25a8, 0x245b}, -{0x25aa, 0x403f}, -{0x25ac, 0x0012}, -{0x25ae, 0x90b1}, -{0x25b0, 0x0010}, -{0x25b2, 0x0002}, -{0x25b4, 0x2823}, -{0x25b6, 0x450c}, -{0x25b8, 0x4508}, -{0x25ba, 0x5f08}, -{0x25bc, 0x9805}, -{0x25be, 0x2c13}, -{0x25c0, 0x4c0d}, -{0x25c2, 0x5d0d}, -{0x25c4, 0x5d0d}, -{0x25c6, 0x4d0a}, -{0x25c8, 0x503a}, -{0x25ca, 0x80bc}, -{0x25cc, 0x919d}, -{0x25ce, 0x0002}, -{0x25d0, 0x80bc}, -{0x25d2, 0x2436}, -{0x25d4, 0x9382}, -{0x25d6, 0x8058}, -{0x25d8, 0x2403}, -{0x25da, 0x968d}, -{0x25dc, 0x80bc}, -{0x25de, 0x2420}, -{0x25e0, 0x531c}, -{0x25e2, 0x980c}, -{0x25e4, 0x2bed}, -{0x25e6, 0x9292}, -{0x25e8, 0x804e}, -{0x25ea, 0x82f4}, -{0x25ec, 0x2417}, -{0x25ee, 0x5215}, -{0x25f0, 0x808a}, -{0x25f2, 0x5b05}, -{0x25f4, 0x4482}, -{0x25f6, 0x808a}, -{0x25f8, 0x4982}, -{0x25fa, 0x039c}, -{0x25fc, 0x415f}, -{0x25fe, 0x0004}, -{0x2600, 0xc312}, -{0x2602, 0x104f}, -{0x2604, 0xf3d1}, -{0x2606, 0x0004}, -{0x2608, 0xe3f1}, -{0x260a, 0x0004}, -{0x260c, 0x53d1}, -{0x260e, 0x0004}, -{0x2610, 0xf0f1}, -{0x2612, 0xffb8}, -{0x2614, 0x0004}, -{0x2616, 0xefc1}, -{0x2618, 0x0004}, -{0x261a, 0x3f98}, -{0x261c, 0x5705}, -{0x261e, 0x3fea}, -{0x2620, 0x4b0f}, -{0x2622, 0x5f0f}, -{0x2624, 0x4a9f}, -{0x2626, 0x0002}, -{0x2628, 0x0384}, -{0x262a, 0x431f}, -{0x262c, 0x4b0e}, -{0x262e, 0x930e}, -{0x2630, 0x2403}, -{0x2632, 0x5f0f}, -{0x2634, 0x831e}, -{0x2636, 0x23fd}, -{0x2638, 0xdf09}, -{0x263a, 0x5314}, -{0x263c, 0x531b}, -{0x263e, 0x3fd0}, -{0x2640, 0x4b0f}, -{0x2642, 0x5f0f}, -{0x2644, 0x4a9f}, -{0x2646, 0x0002}, -{0x2648, 0x0384}, -{0x264a, 0x431f}, -{0x264c, 0x4b0e}, -{0x264e, 0x930e}, -{0x2650, 0x2403}, -{0x2652, 0x5f0f}, -{0x2654, 0x831e}, -{0x2656, 0x23fd}, -{0x2658, 0xdf09}, -{0x265a, 0x5317}, -{0x265c, 0x531b}, -{0x265e, 0x3fba}, -{0x2660, 0x403f}, -{0x2662, 0x0006}, -{0x2664, 0x3fa4}, -{0x2666, 0x4f06}, -{0x2668, 0x5036}, -{0x266a, 0xffda}, -{0x266c, 0x3f9b}, -{0x266e, 0x40b2}, -{0x2670, 0x000e}, -{0x2672, 0x8050}, -{0x2674, 0x40b2}, -{0x2676, 0x02e6}, -{0x2678, 0x8052}, -{0x267a, 0x40b2}, -{0x267c, 0xf000}, -{0x267e, 0x82c6}, -{0x2680, 0x3e70}, -{0x2682, 0x4e8f}, -{0x2684, 0x0000}, -{0x2686, 0x4030}, -{0x2688, 0xf2bc}, -{0x268a, 0xb3e2}, -{0x268c, 0x00b4}, -{0x268e, 0x2002}, -{0x2690, 0x4030}, -{0x2692, 0xf232}, -{0x2694, 0x4391}, -{0x2696, 0x0000}, -{0x2698, 0x4030}, -{0x269a, 0xf232}, -{0x269c, 0x43d2}, -{0x269e, 0x0180}, -{0x26a0, 0x4392}, -{0x26a2, 0x760e}, -{0x26a4, 0x9382}, -{0x26a6, 0x760c}, -{0x26a8, 0x2002}, -{0x26aa, 0x0c64}, -{0x26ac, 0x3ffb}, -{0x26ae, 0x421f}, -{0x26b0, 0x760a}, -{0x26b2, 0x931f}, -{0x26b4, 0x2012}, -{0x26b6, 0x4292}, -{0x26b8, 0x018a}, -{0x26ba, 0x80b6}, -{0x26bc, 0x4292}, -{0x26be, 0x80b6}, -{0x26c0, 0x7600}, -{0x26c2, 0x12b0}, -{0x26c4, 0xfd6c}, -{0x26c6, 0x421f}, -{0x26c8, 0x80b6}, -{0x26ca, 0x12b0}, -{0x26cc, 0xfd80}, -{0x26ce, 0x4fc2}, -{0x26d0, 0x0188}, -{0x26d2, 0x4292}, -{0x26d4, 0x80b6}, -{0x26d6, 0x80ba}, -{0x26d8, 0x3fe3}, -{0x26da, 0x903f}, -{0x26dc, 0x0201}, -{0x26de, 0x23e0}, -{0x26e0, 0x5392}, -{0x26e2, 0x80b6}, -{0x26e4, 0x421e}, -{0x26e6, 0x80b6}, -{0x26e8, 0x108e}, -{0x26ea, 0xf37e}, -{0x26ec, 0xc312}, -{0x26ee, 0x100e}, -{0x26f0, 0x110e}, -{0x26f2, 0x110e}, -{0x26f4, 0x110e}, -{0x26f6, 0x421f}, -{0x26f8, 0x80ba}, -{0x26fa, 0x108f}, -{0x26fc, 0xf37f}, -{0x26fe, 0xc312}, -{0x2700, 0x100f}, -{0x2702, 0x110f}, -{0x2704, 0x110f}, -{0x2706, 0x110f}, -{0x2708, 0x9f0e}, -{0x270a, 0x27dd}, -{0x270c, 0x0261}, -{0x270e, 0x0000}, -{0x2710, 0x3fd5}, -{0x2712, 0x40b2}, -{0x2714, 0x1807}, -{0x2716, 0x0b82}, -{0x2718, 0x40b2}, -{0x271a, 0x3540}, -{0x271c, 0x0b84}, -{0x271e, 0x40b2}, -{0x2720, 0x3540}, -{0x2722, 0x0b86}, -{0x2724, 0x4382}, -{0x2726, 0x0b88}, -{0x2728, 0x4382}, -{0x272a, 0x0b8a}, -{0x272c, 0x4382}, -{0x272e, 0x0b8c}, -{0x2730, 0x40b2}, -{0x2732, 0x0600}, -{0x2734, 0x0b8e}, -{0x2736, 0x4382}, -{0x2738, 0x0ba6}, -{0x273a, 0x43c2}, -{0x273c, 0x01a0}, -{0x273e, 0x43c2}, -{0x2740, 0x01a1}, -{0x2742, 0x43c2}, -{0x2744, 0x019d}, -{0x2746, 0x40f2}, -{0x2748, 0x000a}, -{0x274a, 0x0f90}, -{0x274c, 0x43c2}, -{0x274e, 0x0f82}, -{0x2750, 0x43c2}, -{0x2752, 0x003d}, -{0x2754, 0x4030}, -{0x2756, 0xf0de}, -{0x2758, 0x5031}, -{0x275a, 0x0006}, -{0x275c, 0x4030}, -{0x275e, 0xfef4}, -{0x2760, 0x4f4e}, -{0x2762, 0x421f}, -{0x2764, 0x7316}, -{0x2766, 0xc312}, -{0x2768, 0x100f}, -{0x276a, 0x503f}, -{0x276c, 0xff9c}, -{0x276e, 0x4f82}, -{0x2770, 0x7334}, -{0x2772, 0x0f00}, -{0x2774, 0x7302}, -{0x2776, 0xb0b2}, -{0x2778, 0x000f}, -{0x277a, 0x7300}, -{0x277c, 0x200e}, -{0x277e, 0x403f}, -{0x2780, 0x0cd8}, -{0x2782, 0x43df}, -{0x2784, 0x0000}, -{0x2786, 0x43cf}, -{0x2788, 0x0000}, -{0x278a, 0x4ec2}, -{0x278c, 0x0c5a}, -{0x278e, 0x4ec2}, -{0x2790, 0x0c5c}, -{0x2792, 0x4ec2}, -{0x2794, 0x0c5e}, -{0x2796, 0x4ec2}, -{0x2798, 0x0c60}, -{0x279a, 0x421f}, -{0x279c, 0x7112}, -{0x279e, 0x93a2}, -{0x27a0, 0x7114}, -{0x27a2, 0x2408}, -{0x27a4, 0x9382}, -{0x27a6, 0x7112}, -{0x27a8, 0x2403}, -{0x27aa, 0x5292}, -{0x27ac, 0x8082}, -{0x27ae, 0x7114}, -{0x27b0, 0x430f}, -{0x27b2, 0x4130}, -{0x27b4, 0xf31f}, -{0x27b6, 0x27f6}, -{0x27b8, 0x4382}, -{0x27ba, 0x7f10}, -{0x27bc, 0x4392}, -{0x27be, 0x7708}, -{0x27c0, 0x4382}, -{0x27c2, 0x770e}, -{0x27c4, 0x40b2}, -{0x27c6, 0x0003}, -{0x27c8, 0x7114}, -{0x27ca, 0x431f}, -{0x27cc, 0x4130}, -{0x27ce, 0x120b}, -{0x27d0, 0x120a}, -{0x27d2, 0x1209}, -{0x27d4, 0x1208}, -{0x27d6, 0x1207}, -{0x27d8, 0x1206}, -{0x27da, 0x1205}, -{0x27dc, 0x1204}, -{0x27de, 0x8321}, -{0x27e0, 0x4039}, -{0x27e2, 0x0014}, -{0x27e4, 0x5109}, -{0x27e6, 0x4c07}, -{0x27e8, 0x4925}, -{0x27ea, 0x4991}, -{0x27ec, 0x0002}, -{0x27ee, 0x0000}, -{0x27f0, 0x4914}, -{0x27f2, 0x0004}, -{0x27f4, 0x4f0b}, -{0x27f6, 0x430a}, -{0x27f8, 0x4e08}, -{0x27fa, 0x4309}, -{0x27fc, 0xda08}, -{0x27fe, 0xdb09}, -{0x2800, 0x5d07}, -{0x2802, 0x432e}, -{0x2804, 0x421f}, -{0x2806, 0x0a86}, -{0x2808, 0x821e}, -{0x280a, 0x8058}, -{0x280c, 0x930e}, -{0x280e, 0x2403}, -{0x2810, 0x5f0f}, -{0x2812, 0x831e}, -{0x2814, 0x23fd}, -{0x2816, 0x8f07}, -{0x2818, 0x425f}, -{0x281a, 0x0ce1}, -{0x281c, 0xf37f}, -{0x281e, 0x421e}, -{0x2820, 0x00ba}, -{0x2822, 0x4f0a}, -{0x2824, 0x4e0c}, -{0x2826, 0x12b0}, -{0x2828, 0xfef8}, -{0x282a, 0x4e0f}, -{0x282c, 0x108f}, -{0x282e, 0x4f46}, -{0x2830, 0xc312}, -{0x2832, 0x1006}, -{0x2834, 0x5808}, -{0x2836, 0x6909}, -{0x2838, 0x5808}, -{0x283a, 0x6909}, -{0x283c, 0x5808}, -{0x283e, 0x6909}, -{0x2840, 0x5808}, -{0x2842, 0x6909}, -{0x2844, 0x5808}, -{0x2846, 0x6909}, -{0x2848, 0x5808}, -{0x284a, 0x6909}, -{0x284c, 0x470e}, -{0x284e, 0x430f}, -{0x2850, 0x480c}, -{0x2852, 0x490d}, -{0x2854, 0x4e0a}, -{0x2856, 0x4f0b}, -{0x2858, 0x12b0}, -{0x285a, 0xff2a}, -{0x285c, 0x5c06}, -{0x285e, 0x464e}, -{0x2860, 0xf07e}, -{0x2862, 0x003f}, -{0x2864, 0xb392}, -{0x2866, 0x732a}, -{0x2868, 0x2016}, -{0x286a, 0xb3a2}, -{0x286c, 0x732a}, -{0x286e, 0x2013}, -{0x2870, 0x9382}, -{0x2872, 0x8072}, -{0x2874, 0x2010}, -{0x2876, 0x93c2}, -{0x2878, 0x807c}, -{0x287a, 0x200d}, -{0x287c, 0x460c}, -{0x287e, 0x430d}, -{0x2880, 0x452e}, -{0x2882, 0x430f}, -{0x2884, 0x5e0c}, -{0x2886, 0x6f0d}, -{0x2888, 0xc312}, -{0x288a, 0x100d}, -{0x288c, 0x100c}, -{0x288e, 0x4c06}, -{0x2890, 0x4c4e}, -{0x2892, 0xf07e}, -{0x2894, 0x003f}, -{0x2896, 0x4685}, -{0x2898, 0x0000}, -{0x289a, 0xb0f2}, -{0x289c, 0x0010}, -{0x289e, 0x0c83}, -{0x28a0, 0x2409}, -{0x28a2, 0x4e4f}, -{0x28a4, 0x5f0f}, -{0x28a6, 0x5f0f}, -{0x28a8, 0x5f0f}, -{0x28aa, 0x5f0f}, -{0x28ac, 0x5f0f}, -{0x28ae, 0x4f84}, -{0x28b0, 0x0000}, -{0x28b2, 0x3c02}, -{0x28b4, 0x4384}, -{0x28b6, 0x0000}, -{0x28b8, 0x412f}, -{0x28ba, 0x468f}, -{0x28bc, 0x0000}, -{0x28be, 0x5321}, -{0x28c0, 0x4134}, -{0x28c2, 0x4135}, -{0x28c4, 0x4136}, -{0x28c6, 0x4137}, -{0x28c8, 0x4138}, -{0x28ca, 0x4139}, -{0x28cc, 0x413a}, -{0x28ce, 0x413b}, -{0x28d0, 0x4130}, -{0x28d2, 0x43a2}, -{0x28d4, 0x805a}, -{0x28d6, 0x40b2}, -{0x28d8, 0x000a}, -{0x28da, 0x805c}, -{0x28dc, 0x40b2}, -{0x28de, 0x0158}, -{0x28e0, 0x805e}, -{0x28e2, 0x40b2}, -{0x28e4, 0x017c}, -{0x28e6, 0x8060}, -{0x28e8, 0x40b2}, -{0x28ea, 0x02c4}, -{0x28ec, 0x8062}, -{0x28ee, 0x40b2}, -{0x28f0, 0x02da}, -{0x28f2, 0x8064}, -{0x28f4, 0x40b2}, -{0x28f6, 0x02e2}, -{0x28f8, 0x8066}, -{0x28fa, 0x40b2}, -{0x28fc, 0x0430}, -{0x28fe, 0x8068}, -{0x2900, 0x40b2}, -{0x2902, 0x0454}, -{0x2904, 0x806a}, -{0x2906, 0x40b2}, -{0x2908, 0x059c}, -{0x290a, 0x806c}, -{0x290c, 0x40b2}, -{0x290e, 0xfffe}, -{0x2910, 0x82ca}, -{0x2912, 0x40b2}, -{0x2914, 0xfff1}, -{0x2916, 0x82cc}, -{0x2918, 0x40b2}, -{0x291a, 0x0021}, -{0x291c, 0x82ce}, -{0x291e, 0x40b2}, -{0x2920, 0xfff1}, -{0x2922, 0x82d0}, -{0x2924, 0x40b2}, -{0x2926, 0x0025}, -{0x2928, 0x82d2}, -{0x292a, 0x40b2}, -{0x292c, 0xfffe}, -{0x292e, 0x82d4}, -{0x2930, 0x40b2}, -{0x2932, 0xfff2}, -{0x2934, 0x82d6}, -{0x2936, 0x40b2}, -{0x2938, 0x0021}, -{0x293a, 0x82d8}, -{0x293c, 0x40b2}, -{0x293e, 0xfff2}, -{0x2940, 0x82da}, -{0x2942, 0x40b2}, -{0x2944, 0x0022}, -{0x2946, 0x82dc}, -{0x2948, 0x40b2}, -{0x294a, 0xfffe}, -{0x294c, 0x82de}, -{0x294e, 0x40b2}, -{0x2950, 0xfff4}, -{0x2952, 0x82e0}, -{0x2954, 0x40b2}, -{0x2956, 0x0021}, -{0x2958, 0x82e2}, -{0x295a, 0x40b2}, -{0x295c, 0xfff4}, -{0x295e, 0x82e4}, -{0x2960, 0x40b2}, -{0x2962, 0x0025}, -{0x2964, 0x82e6}, -{0x2966, 0x40b2}, -{0x2968, 0xfffe}, -{0x296a, 0x82e8}, -{0x296c, 0x40b2}, -{0x296e, 0xfff8}, -{0x2970, 0x82ea}, -{0x2972, 0x40b2}, -{0x2974, 0xfff8}, -{0x2976, 0x82ec}, -{0x2978, 0x40b2}, -{0x297a, 0xfff8}, -{0x297c, 0x82ee}, -{0x297e, 0x40b2}, -{0x2980, 0xfffa}, -{0x2982, 0x82f0}, -{0x2984, 0x42a2}, -{0x2986, 0x807a}, -{0x2988, 0x42b2}, -{0x298a, 0x7706}, -{0x298c, 0x9382}, -{0x298e, 0x8058}, -{0x2990, 0x242f}, -{0x2992, 0x40b2}, -{0x2994, 0x0014}, -{0x2996, 0x7706}, -{0x2998, 0x40b2}, -{0x299a, 0x000a}, -{0x299c, 0x807a}, -{0x299e, 0x9382}, -{0x29a0, 0x82f4}, -{0x29a2, 0x240c}, -{0x29a4, 0x40b2}, -{0x29a6, 0xfff8}, -{0x29a8, 0x82d8}, -{0x29aa, 0x40b2}, -{0x29ac, 0xfffa}, -{0x29ae, 0x82dc}, -{0x29b0, 0x40b2}, -{0x29b2, 0x0021}, -{0x29b4, 0x82ec}, -{0x29b6, 0x40b2}, -{0x29b8, 0x0022}, -{0x29ba, 0x82f0}, -{0x29bc, 0x42a2}, -{0x29be, 0x805a}, -{0x29c0, 0x9382}, -{0x29c2, 0x82f4}, -{0x29c4, 0x240f}, -{0x29c6, 0x421e}, -{0x29c8, 0x807a}, -{0x29ca, 0x4e0f}, -{0x29cc, 0x12b0}, -{0x29ce, 0xfa4a}, -{0x29d0, 0x9382}, -{0x29d2, 0x82f4}, -{0x29d4, 0x2001}, -{0x29d6, 0x4130}, -{0x29d8, 0x430e}, -{0x29da, 0x421f}, -{0x29dc, 0x807a}, -{0x29de, 0x12b0}, -{0x29e0, 0xfa4a}, -{0x29e2, 0x3ff9}, -{0x29e4, 0x430e}, -{0x29e6, 0x421f}, -{0x29e8, 0x807a}, -{0x29ea, 0x12b0}, -{0x29ec, 0xfa4a}, -{0x29ee, 0x3feb}, -{0x29f0, 0x42a2}, -{0x29f2, 0x805a}, -{0x29f4, 0x40b2}, -{0x29f6, 0x0262}, -{0x29f8, 0x805c}, -{0x29fa, 0x40b2}, -{0x29fc, 0x02e0}, -{0x29fe, 0x805e}, -{0x2a00, 0x40b2}, -{0x2a02, 0x0532}, -{0x2a04, 0x8060}, -{0x2a06, 0x40b2}, -{0x2a08, 0xfff1}, -{0x2a0a, 0x82ca}, -{0x2a0c, 0x40b2}, -{0x2a0e, 0x0021}, -{0x2a10, 0x82cc}, -{0x2a12, 0x40b2}, -{0x2a14, 0xfff2}, -{0x2a16, 0x82ce}, -{0x2a18, 0x40b2}, -{0x2a1a, 0x0022}, -{0x2a1c, 0x82d0}, -{0x2a1e, 0x40b2}, -{0x2a20, 0xfff4}, -{0x2a22, 0x82d2}, -{0x2a24, 0x40b2}, -{0x2a26, 0x0021}, -{0x2a28, 0x82d4}, -{0x2a2a, 0x40b2}, -{0x2a2c, 0xfff8}, -{0x2a2e, 0x82d6}, -{0x2a30, 0x40b2}, -{0x2a32, 0xfffa}, -{0x2a34, 0x82d8}, -{0x2a36, 0x9382}, -{0x2a38, 0x82f4}, -{0x2a3a, 0x27c0}, -{0x2a3c, 0x40b2}, -{0x2a3e, 0xfffa}, -{0x2a40, 0x82d0}, -{0x2a42, 0x40b2}, -{0x2a44, 0x0022}, -{0x2a46, 0x82d8}, -{0x2a48, 0x3fb9}, -{0x2a4a, 0x120b}, -{0x2a4c, 0x120a}, -{0x2a4e, 0x4f0c}, -{0x2a50, 0x430d}, -{0x2a52, 0x9f0d}, -{0x2a54, 0x2c56}, -{0x2a56, 0x421a}, -{0x2a58, 0x8058}, -{0x2a5a, 0x421b}, -{0x2a5c, 0x82f4}, -{0x2a5e, 0x930a}, -{0x2a60, 0x244b}, -{0x2a62, 0x931d}, -{0x2a64, 0x243c}, -{0x2a66, 0x903d}, -{0x2a68, 0x0003}, -{0x2a6a, 0x2439}, -{0x2a6c, 0x903d}, -{0x2a6e, 0x0006}, -{0x2a70, 0x2436}, -{0x2a72, 0x923d}, -{0x2a74, 0x2434}, -{0x2a76, 0x922d}, -{0x2a78, 0x242c}, -{0x2a7a, 0x903d}, -{0x2a7c, 0x0009}, -{0x2a7e, 0x2429}, -{0x2a80, 0x930b}, -{0x2a82, 0x2420}, -{0x2a84, 0x903e}, -{0x2a86, 0x0007}, -{0x2a88, 0x2412}, -{0x2a8a, 0x4e0f}, -{0x2a8c, 0x5f0f}, -{0x2a8e, 0x4f92}, -{0x2a90, 0x82ca}, -{0x2a92, 0x7700}, -{0x2a94, 0x4d0f}, -{0x2a96, 0x5f0f}, -{0x2a98, 0x4f92}, -{0x2a9a, 0x805a}, -{0x2a9c, 0x7702}, -{0x2a9e, 0x40b2}, -{0x2aa0, 0x0003}, -{0x2aa2, 0x7704}, -{0x2aa4, 0x531e}, -{0x2aa6, 0x531d}, -{0x2aa8, 0x9c0d}, -{0x2aaa, 0x2bd9}, -{0x2aac, 0x3c2a}, -{0x2aae, 0x4292}, -{0x2ab0, 0x82d8}, -{0x2ab2, 0x7700}, -{0x2ab4, 0x4d0f}, -{0x2ab6, 0x5f0f}, -{0x2ab8, 0x4f92}, -{0x2aba, 0x805a}, -{0x2abc, 0x7702}, -{0x2abe, 0x43a2}, -{0x2ac0, 0x7704}, -{0x2ac2, 0x3ff0}, -{0x2ac4, 0x903e}, -{0x2ac6, 0x0011}, -{0x2ac8, 0x23e0}, -{0x2aca, 0x4292}, -{0x2acc, 0x82ec}, -{0x2ace, 0x7700}, -{0x2ad0, 0x3ff1}, -{0x2ad2, 0x4e0f}, -{0x2ad4, 0x5f0f}, -{0x2ad6, 0x4f92}, -{0x2ad8, 0x82ca}, -{0x2ada, 0x7700}, -{0x2adc, 0x3feb}, -{0x2ade, 0x4e0f}, -{0x2ae0, 0x5f0f}, -{0x2ae2, 0x4f92}, -{0x2ae4, 0x82ca}, -{0x2ae6, 0x7700}, -{0x2ae8, 0x4d0f}, -{0x2aea, 0x5f0f}, -{0x2aec, 0x4f92}, -{0x2aee, 0x805a}, -{0x2af0, 0x7702}, -{0x2af2, 0x4392}, -{0x2af4, 0x7704}, -{0x2af6, 0x3fd6}, -{0x2af8, 0x930d}, -{0x2afa, 0x27f1}, -{0x2afc, 0x932d}, -{0x2afe, 0x23e9}, -{0x2b00, 0x3fee}, -{0x2b02, 0x413a}, -{0x2b04, 0x413b}, -{0x2b06, 0x4130}, -{0x2b08, 0x120b}, -{0x2b0a, 0x120a}, -{0x2b0c, 0x1209}, -{0x2b0e, 0x1208}, -{0x2b10, 0x1207}, -{0x2b12, 0x1206}, -{0x2b14, 0x1205}, -{0x2b16, 0x1204}, -{0x2b18, 0x8321}, -{0x2b1a, 0x43c2}, -{0x2b1c, 0x00b5}, -{0x2b1e, 0x421f}, -{0x2b20, 0x82f4}, -{0x2b22, 0x930f}, -{0x2b24, 0x2403}, -{0x2b26, 0x40f2}, -{0x2b28, 0x0003}, -{0x2b2a, 0x00b5}, -{0x2b2c, 0x40b2}, -{0x2b2e, 0x0005}, -{0x2b30, 0x7534}, -{0x2b32, 0x43b2}, -{0x2b34, 0x7810}, -{0x2b36, 0x43b2}, -{0x2b38, 0x7812}, -{0x2b3a, 0x4382}, -{0x2b3c, 0x752a}, -{0x2b3e, 0x4382}, -{0x2b40, 0x752e}, -{0x2b42, 0x4291}, -{0x2b44, 0x8058}, -{0x2b46, 0x0000}, -{0x2b48, 0x9381}, -{0x2b4a, 0x0000}, -{0x2b4c, 0x24ff}, -{0x2b4e, 0x40b2}, -{0x2b50, 0x016c}, -{0x2b52, 0x780e}, -{0x2b54, 0x40b2}, -{0x2b56, 0x02d8}, -{0x2b58, 0x7810}, -{0x2b5a, 0x40b2}, -{0x2b5c, 0x0444}, -{0x2b5e, 0x7812}, -{0x2b60, 0x43a2}, -{0x2b62, 0x752a}, -{0x2b64, 0x43a2}, -{0x2b66, 0x752e}, -{0x2b68, 0x4292}, -{0x2b6a, 0x00ba}, -{0x2b6c, 0x0b92}, -{0x2b6e, 0x40b2}, -{0x2b70, 0x003c}, -{0x2b72, 0x7814}, -{0x2b74, 0x40b2}, -{0x2b76, 0x0c01}, -{0x2b78, 0x7500}, -{0x2b7a, 0x40b2}, -{0x2b7c, 0x0803}, -{0x2b7e, 0x7502}, -{0x2b80, 0x40b2}, -{0x2b82, 0x0807}, -{0x2b84, 0x7504}, -{0x2b86, 0x40b2}, -{0x2b88, 0x5803}, -{0x2b8a, 0x7506}, -{0x2b8c, 0x40b2}, -{0x2b8e, 0x0801}, -{0x2b90, 0x7508}, -{0x2b92, 0x40b2}, -{0x2b94, 0x0805}, -{0x2b96, 0x750a}, -{0x2b98, 0x40b2}, -{0x2b9a, 0x5801}, -{0x2b9c, 0x750c}, -{0x2b9e, 0x40b2}, -{0x2ba0, 0x0803}, -{0x2ba2, 0x750e}, -{0x2ba4, 0x40b2}, -{0x2ba6, 0x0802}, -{0x2ba8, 0x7510}, -{0x2baa, 0x40b2}, -{0x2bac, 0x0800}, -{0x2bae, 0x7512}, -{0x2bb0, 0x4f0c}, -{0x2bb2, 0x503c}, -{0x2bb4, 0x07f8}, -{0x2bb6, 0x4c82}, -{0x2bb8, 0x7530}, -{0x2bba, 0x503f}, -{0x2bbc, 0x07fa}, -{0x2bbe, 0x4f82}, -{0x2bc0, 0x7532}, -{0x2bc2, 0x425f}, -{0x2bc4, 0x00d2}, -{0x2bc6, 0x4f4e}, -{0x2bc8, 0x430d}, -{0x2bca, 0x421a}, -{0x2bcc, 0x0086}, -{0x2bce, 0x430b}, -{0x2bd0, 0x5d0a}, -{0x2bd2, 0x6e0b}, -{0x2bd4, 0x425f}, -{0x2bd6, 0x00d0}, -{0x2bd8, 0x4f47}, -{0x2bda, 0x4306}, -{0x2bdc, 0x4218}, -{0x2bde, 0x0084}, -{0x2be0, 0x4309}, -{0x2be2, 0x5608}, -{0x2be4, 0x6709}, -{0x2be6, 0x4382}, -{0x2be8, 0x733e}, -{0x2bea, 0x4215}, -{0x2bec, 0x7578}, -{0x2bee, 0x4304}, -{0x2bf0, 0x4216}, -{0x2bf2, 0x7560}, -{0x2bf4, 0x4307}, -{0x2bf6, 0x5406}, -{0x2bf8, 0x6507}, -{0x2bfa, 0x4305}, -{0x2bfc, 0x4a0e}, -{0x2bfe, 0x4b0f}, -{0x2c00, 0x503e}, -{0x2c02, 0xfffa}, -{0x2c04, 0x633f}, -{0x2c06, 0x480c}, -{0x2c08, 0x490d}, -{0x2c0a, 0x8e0c}, -{0x2c0c, 0x7f0d}, -{0x2c0e, 0x2801}, -{0x2c10, 0x4315}, -{0x2c12, 0x4a82}, -{0x2c14, 0x7314}, -{0x2c16, 0x4b82}, -{0x2c18, 0x7336}, -{0x2c1a, 0x93c2}, -{0x2c1c, 0x00bc}, -{0x2c1e, 0x2010}, -{0x2c20, 0xb315}, -{0x2c22, 0x240e}, -{0x2c24, 0x480f}, -{0x2c26, 0x503f}, -{0x2c28, 0x0006}, -{0x2c2a, 0x4f82}, -{0x2c2c, 0x7314}, -{0x2c2e, 0x480e}, -{0x2c30, 0x490f}, -{0x2c32, 0x503e}, -{0x2c34, 0x0006}, -{0x2c36, 0x630f}, -{0x2c38, 0x4f82}, -{0x2c3a, 0x7336}, -{0x2c3c, 0x4e0a}, -{0x2c3e, 0x4f0b}, -{0x2c40, 0x4a0d}, -{0x2c42, 0x4b0e}, -{0x2c44, 0x880d}, -{0x2c46, 0x790e}, -{0x2c48, 0x4d82}, -{0x2c4a, 0x7540}, -{0x2c4c, 0x4e82}, -{0x2c4e, 0x7574}, -{0x2c50, 0x4292}, -{0x2c52, 0x0088}, -{0x2c54, 0x7316}, -{0x2c56, 0x9381}, -{0x2c58, 0x0000}, -{0x2c5a, 0x2403}, -{0x2c5c, 0x4292}, -{0x2c5e, 0x008a}, -{0x2c60, 0x7316}, -{0x2c62, 0x425f}, -{0x2c64, 0x00bc}, -{0x2c66, 0xf37f}, -{0x2c68, 0xf50f}, -{0x2c6a, 0x2405}, -{0x2c6c, 0x40b2}, -{0x2c6e, 0x0006}, -{0x2c70, 0x7540}, -{0x2c72, 0x4382}, -{0x2c74, 0x7574}, -{0x2c76, 0x430c}, -{0x2c78, 0x4e0f}, -{0x2c7a, 0x4d0e}, -{0x2c7c, 0x860e}, -{0x2c7e, 0x770f}, -{0x2c80, 0x2c01}, -{0x2c82, 0x431c}, -{0x2c84, 0x430f}, -{0x2c86, 0x9382}, -{0x2c88, 0x8072}, -{0x2c8a, 0x2001}, -{0x2c8c, 0x431f}, -{0x2c8e, 0xfc0f}, -{0x2c90, 0x4382}, -{0x2c92, 0x7542}, -{0x2c94, 0x40b2}, -{0x2c96, 0x02d8}, -{0x2c98, 0x7544}, -{0x2c9a, 0x43b2}, -{0x2c9c, 0x7546}, -{0x2c9e, 0x43b2}, -{0x2ca0, 0x7548}, -{0x2ca2, 0x40b2}, -{0x2ca4, 0xffd7}, -{0x2ca6, 0x7806}, -{0x2ca8, 0x40b2}, -{0x2caa, 0xffeb}, -{0x2cac, 0x7808}, -{0x2cae, 0x40b2}, -{0x2cb0, 0x003c}, -{0x2cb2, 0x7804}, -{0x2cb4, 0x40b2}, -{0x2cb6, 0x0030}, -{0x2cb8, 0x7802}, -{0x2cba, 0x9381}, -{0x2cbc, 0x0000}, -{0x2cbe, 0x2412}, -{0x2cc0, 0x40b2}, -{0x2cc2, 0x016c}, -{0x2cc4, 0x7544}, -{0x2cc6, 0x40b2}, -{0x2cc8, 0x02d8}, -{0x2cca, 0x7546}, -{0x2ccc, 0x40b2}, -{0x2cce, 0x0444}, -{0x2cd0, 0x7548}, -{0x2cd2, 0x40b2}, -{0x2cd4, 0xffd7}, -{0x2cd6, 0x7808}, -{0x2cd8, 0x40b2}, -{0x2cda, 0xffeb}, -{0x2cdc, 0x780a}, -{0x2cde, 0x40b2}, -{0x2ce0, 0xffeb}, -{0x2ce2, 0x780c}, -{0x2ce4, 0x930f}, -{0x2ce6, 0x240f}, -{0x2ce8, 0x50b2}, -{0x2cea, 0x0042}, -{0x2cec, 0x7542}, -{0x2cee, 0x50b2}, -{0x2cf0, 0x0042}, -{0x2cf2, 0x7544}, -{0x2cf4, 0x9381}, -{0x2cf6, 0x0000}, -{0x2cf8, 0x2406}, -{0x2cfa, 0x50b2}, -{0x2cfc, 0x0042}, -{0x2cfe, 0x7546}, -{0x2d00, 0x50b2}, -{0x2d02, 0x0042}, -{0x2d04, 0x7548}, -{0x2d06, 0x42d2}, -{0x2d08, 0x00c8}, -{0x2d0a, 0x82f6}, -{0x2d0c, 0xb2e2}, -{0x2d0e, 0x01dc}, -{0x2d10, 0x2403}, -{0x2d12, 0x42d2}, -{0x2d14, 0x01dd}, -{0x2d16, 0x82f6}, -{0x2d18, 0xb3e2}, -{0x2d1a, 0x01dc}, -{0x2d1c, 0x2409}, -{0x2d1e, 0x43c2}, -{0x2d20, 0x82f6}, -{0x2d22, 0x421f}, -{0x2d24, 0x0084}, -{0x2d26, 0x9f82}, -{0x2d28, 0x01de}, -{0x2d2a, 0x2c02}, -{0x2d2c, 0x43d2}, -{0x2d2e, 0x82f6}, -{0x2d30, 0x42d2}, -{0x2d32, 0x82f6}, -{0x2d34, 0x00c8}, -{0x2d36, 0xb3d2}, -{0x2d38, 0x01dc}, -{0x2d3a, 0x240c}, -{0x2d3c, 0x434f}, -{0x2d3e, 0x93c2}, -{0x2d40, 0x82f6}, -{0x2d42, 0x2001}, -{0x2d44, 0x435f}, -{0x2d46, 0x4fc2}, -{0x2d48, 0x00c8}, -{0x2d4a, 0x3c04}, -{0x2d4c, 0x40b2}, -{0x2d4e, 0x02d8}, -{0x2d50, 0x780e}, -{0x2d52, 0x3f0a}, -{0x2d54, 0xd392}, -{0x2d56, 0x7102}, -{0x2d58, 0x5321}, -{0x2d5a, 0x4134}, -{0x2d5c, 0x4135}, -{0x2d5e, 0x4136}, -{0x2d60, 0x4137}, -{0x2d62, 0x4138}, -{0x2d64, 0x4139}, -{0x2d66, 0x413a}, -{0x2d68, 0x413b}, -{0x2d6a, 0x4130}, -{0x2d6c, 0x0260}, -{0x2d6e, 0x0000}, -{0x2d70, 0x0c64}, -{0x2d72, 0x0c64}, -{0x2d74, 0x0240}, -{0x2d76, 0x0000}, -{0x2d78, 0x0260}, -{0x2d7a, 0x0000}, -{0x2d7c, 0x0c1e}, -{0x2d7e, 0x4130}, -{0x2d80, 0x4f82}, -{0x2d82, 0x7600}, -{0x2d84, 0x0270}, -{0x2d86, 0x0000}, -{0x2d88, 0x0c1c}, -{0x2d8a, 0x0270}, -{0x2d8c, 0x0001}, -{0x2d8e, 0x421f}, -{0x2d90, 0x7606}, -{0x2d92, 0x4130}, -{0x2d94, 0x120b}, -{0x2d96, 0x120a}, -{0x2d98, 0x4f0a}, -{0x2d9a, 0x4e0b}, -{0x2d9c, 0x4382}, -{0x2d9e, 0x806e}, -{0x2da0, 0x43d2}, -{0x2da2, 0x0180}, -{0x2da4, 0x0260}, -{0x2da6, 0x0000}, -{0x2da8, 0x0c64}, -{0x2daa, 0x0c64}, -{0x2dac, 0x0240}, -{0x2dae, 0x0000}, -{0x2db0, 0x0260}, -{0x2db2, 0x0000}, -{0x2db4, 0x0c1e}, -{0x2db6, 0x0270}, -{0x2db8, 0x0001}, -{0x2dba, 0x4392}, -{0x2dbc, 0x7610}, -{0x2dbe, 0x4f82}, -{0x2dc0, 0x8048}, -{0x2dc2, 0x9382}, -{0x2dc4, 0x82f4}, -{0x2dc6, 0x2490}, -{0x2dc8, 0x421f}, -{0x2dca, 0x00ac}, -{0x2dcc, 0x503f}, -{0x2dce, 0xffd8}, -{0x2dd0, 0x4f82}, -{0x2dd2, 0x8086}, -{0x2dd4, 0x4382}, -{0x2dd6, 0x8078}, -{0x2dd8, 0x9382}, -{0x2dda, 0x8048}, -{0x2ddc, 0x2488}, -{0x2dde, 0x9382}, -{0x2de0, 0x82f4}, -{0x2de2, 0x247e}, -{0x2de4, 0x4b0f}, -{0x2de6, 0x5a0f}, -{0x2de8, 0x821f}, -{0x2dea, 0x8078}, -{0x2dec, 0x503f}, -{0x2dee, 0xfffd}, -{0x2df0, 0x4f82}, -{0x2df2, 0x80b6}, -{0x2df4, 0x12b0}, -{0x2df6, 0xfd80}, -{0x2df8, 0x4f82}, -{0x2dfa, 0x804a}, -{0x2dfc, 0x0c1c}, -{0x2dfe, 0x0270}, -{0x2e00, 0x0001}, -{0x2e02, 0x4292}, -{0x2e04, 0x7606}, -{0x2e06, 0x807e}, -{0x2e08, 0x0c1c}, -{0x2e0a, 0x0270}, -{0x2e0c, 0x0001}, -{0x2e0e, 0x421e}, -{0x2e10, 0x807e}, -{0x2e12, 0x4e0f}, -{0x2e14, 0xf03f}, -{0x2e16, 0x000f}, -{0x2e18, 0x108f}, -{0x2e1a, 0x521f}, -{0x2e1c, 0x804a}, -{0x2e1e, 0x4f82}, -{0x2e20, 0x8088}, -{0x2e22, 0x421d}, -{0x2e24, 0x7606}, -{0x2e26, 0x5d0d}, -{0x2e28, 0x5d0d}, -{0x2e2a, 0x5d0d}, -{0x2e2c, 0x5d0d}, -{0x2e2e, 0x4e0f}, -{0x2e30, 0xc312}, -{0x2e32, 0x100f}, -{0x2e34, 0x110f}, -{0x2e36, 0x110f}, -{0x2e38, 0x110f}, -{0x2e3a, 0x5f0d}, -{0x2e3c, 0x4d82}, -{0x2e3e, 0x8084}, -{0x2e40, 0x421e}, -{0x2e42, 0x82f4}, -{0x2e44, 0x930e}, -{0x2e46, 0x2447}, -{0x2e48, 0x421f}, -{0x2e4a, 0x8086}, -{0x2e4c, 0x8d0f}, -{0x2e4e, 0x4f82}, -{0x2e50, 0x8040}, -{0x2e52, 0x430d}, -{0x2e54, 0x9382}, -{0x2e56, 0x8058}, -{0x2e58, 0x2008}, -{0x2e5a, 0x421f}, -{0x2e5c, 0x8040}, -{0x2e5e, 0xf21f}, -{0x2e60, 0x8080}, -{0x2e62, 0xc312}, -{0x2e64, 0x100f}, -{0x2e66, 0x930f}, -{0x2e68, 0x2001}, -{0x2e6a, 0x431d}, -{0x2e6c, 0x4d82}, -{0x2e6e, 0x8074}, -{0x2e70, 0x930e}, -{0x2e72, 0x242b}, -{0x2e74, 0x421f}, -{0x2e76, 0x8084}, -{0x2e78, 0x930f}, -{0x2e7a, 0x2427}, -{0x2e7c, 0x430e}, -{0x2e7e, 0x9f82}, -{0x2e80, 0x8086}, -{0x2e82, 0x2801}, -{0x2e84, 0x431e}, -{0x2e86, 0x4e82}, -{0x2e88, 0x8046}, -{0x2e8a, 0x930e}, -{0x2e8c, 0x2414}, -{0x2e8e, 0x9382}, -{0x2e90, 0x8074}, -{0x2e92, 0x2411}, -{0x2e94, 0x421e}, -{0x2e96, 0x806e}, -{0x2e98, 0x903e}, -{0x2e9a, 0x0081}, -{0x2e9c, 0x2c0c}, -{0x2e9e, 0x4e0f}, -{0x2ea0, 0x5f0f}, -{0x2ea2, 0x5f0f}, -{0x2ea4, 0x429f}, -{0x2ea6, 0x8084}, -{0x2ea8, 0x80bc}, -{0x2eaa, 0x429f}, -{0x2eac, 0x8088}, -{0x2eae, 0x80be}, -{0x2eb0, 0x531e}, -{0x2eb2, 0x4e82}, -{0x2eb4, 0x806e}, -{0x2eb6, 0x421f}, -{0x2eb8, 0x8078}, -{0x2eba, 0x503f}, -{0x2ebc, 0x0003}, -{0x2ebe, 0x4f82}, -{0x2ec0, 0x8078}, -{0x2ec2, 0x921f}, -{0x2ec4, 0x8048}, -{0x2ec6, 0x2b8b}, -{0x2ec8, 0x3c12}, -{0x2eca, 0x430e}, -{0x2ecc, 0x9292}, -{0x2ece, 0x8086}, -{0x2ed0, 0x8084}, -{0x2ed2, 0x2bd9}, -{0x2ed4, 0x3fd7}, -{0x2ed6, 0x821d}, -{0x2ed8, 0x8086}, -{0x2eda, 0x4d82}, -{0x2edc, 0x8040}, -{0x2ede, 0x3fb9}, -{0x2ee0, 0x4b0f}, -{0x2ee2, 0x521f}, -{0x2ee4, 0x8078}, -{0x2ee6, 0x3f84}, -{0x2ee8, 0x421f}, -{0x2eea, 0x00a6}, -{0x2eec, 0x3f6f}, -{0x2eee, 0x413a}, -{0x2ef0, 0x413b}, -{0x2ef2, 0x4130}, -{0x2ef4, 0xdf02}, -{0x2ef6, 0x3ffe}, -{0x2ef8, 0x430e}, -{0x2efa, 0x930a}, -{0x2efc, 0x2407}, -{0x2efe, 0xc312}, -{0x2f00, 0x100c}, -{0x2f02, 0x2801}, -{0x2f04, 0x5a0e}, -{0x2f06, 0x5a0a}, -{0x2f08, 0x930c}, -{0x2f0a, 0x23f7}, -{0x2f0c, 0x4130}, -{0x2f0e, 0xee0e}, -{0x2f10, 0x403b}, -{0x2f12, 0x0011}, -{0x2f14, 0x3c05}, -{0x2f16, 0x100d}, -{0x2f18, 0x6e0e}, -{0x2f1a, 0x9a0e}, -{0x2f1c, 0x2801}, -{0x2f1e, 0x8a0e}, -{0x2f20, 0x6c0c}, -{0x2f22, 0x6d0d}, -{0x2f24, 0x831b}, -{0x2f26, 0x23f7}, -{0x2f28, 0x4130}, -{0x2f2a, 0xef0f}, -{0x2f2c, 0xee0e}, -{0x2f2e, 0x4039}, -{0x2f30, 0x0021}, -{0x2f32, 0x3c0a}, -{0x2f34, 0x1008}, -{0x2f36, 0x6e0e}, -{0x2f38, 0x6f0f}, -{0x2f3a, 0x9b0f}, -{0x2f3c, 0x2805}, -{0x2f3e, 0x2002}, -{0x2f40, 0x9a0e}, -{0x2f42, 0x2802}, -{0x2f44, 0x8a0e}, -{0x2f46, 0x7b0f}, -{0x2f48, 0x6c0c}, -{0x2f4a, 0x6d0d}, -{0x2f4c, 0x6808}, -{0x2f4e, 0x8319}, -{0x2f50, 0x23f1}, -{0x2f52, 0x4130}, -{0x2f54, 0x0000}, -{0x2ffe, 0xf0cc}, -{0x3000, 0x67f0}, -{0x3002, 0xe7f0}, -{0x3004, 0xc8ff}, -{0x3006, 0x0007}, -{0x3008, 0x8700}, -{0x300a, 0xc1ff}, -{0x300c, 0xfff8}, -{0x300e, 0x0007}, -{0x4000, 0x4500}, -{0x4002, 0x4440}, -{0x4004, 0xf04c}, -{0x4006, 0x0004}, -{0x4008, 0x0440}, -{0x400a, 0xf044}, -{0x400c, 0x4cc1}, -{0x400e, 0x0004}, -// EOFIRM -//-------------------------------------------------------------------- -// end of software code -//-------------------------------------------------------------------- -{0x0a00, 0x0000}, //stream off -{0x0b00, 0x001a}, //sreg00 -{0x0b02, 0x9887}, //sreg01 -{0x0b04, 0xc540}, //sreg02 -{0x0b06, 0xb540}, //sreg03 -{0x0b08, 0xc085}, //sreg04 -{0x0b0a, 0xd651}, //sreg05 -{0x0b0c, 0x0440}, //sreg06 -{0x0b0e, 0xc600}, //sreg07 -{0x0b10, 0x4d28}, //sreg08 -{0x0b12, 0x0000}, //sreg09 -{0x0b14, 0x0000}, //sreg10 -{0x0b16, 0x6e17}, //sreg11 -{0x0b18, 0xf205}, //sreg12 -{0x0b1a, 0x0000}, //sreg13 -{0x0b1c, 0x0000}, //sreg14 -{0x0b1e, 0x0081}, //sreg15 -{0x0b20, 0x0000}, //sreg16 -{0x0b22, 0xcc80}, //sreg17 -{0x0b24, 0x0000}, //sreg18 -{0x0b26, 0x0001}, //sreg19 -{0x0b28, 0x1026}, //sreg20 -{0x0b2a, 0x0000}, //sreg21 -{0x0c00, 0x1190}, //blc_ctrl0 - b4:dpc_en b0:blc_en, blc_ctrl1 - b7:bwi b4:act_ofs b0:tobp_ofs -{0x0c02, 0x0011}, //blc_ctrl2 - b0:median_out_en, blc_ctrl3 - b7:clip b5:dither_debug b4:dither_en b0:channel_blc -{0x0c04, 0x0000}, //blc_ctrl4 - b7:obp bypass -{0x0c06, 0x0200}, //blc_dig_offset -{0x0c10, 0x0040}, //act_rr_offset -{0x0c12, 0x0040}, //act_gr_offset -{0x0c14, 0x0040}, //act_gb_offset -{0x0c16, 0x0040}, //act_bb_offset -{0x0c18, 0x80ff}, //fobp_iir_ctrl0 -{0x0c60, 0x0660}, //ag_weight_bb -{0x0000, 0x0100}, //image orient -{0x0e0a, 0x0000}, //tg_pmem_cen enable -{0x004a, 0x0100}, //tg enable,hdr off -{0x000c, 0x0022}, //bininng off -{0x0008, 0x0b60}, //line length pck -{0x000a, 0x0b60}, //line length pck_prev -{0x0054, 0x0202}, //y dummy size -{0x0012, 0x000e}, //x addr start active -{0x0018, 0x0a31}, //x addr end active -{0x0034, 0x0700}, //y region sel -{0x0022, 0x0008}, //y addr start tobp -{0x0028, 0x0017}, //y addr end tobp -{0x0024, 0x003e}, //y addr start dummy -{0x002a, 0x0043}, //y addr end dummy -{0x0026, 0x0046}, //y addr start active -{0x002c, 0x07d1}, //y addr end active -{0x002e, 0x1111}, //y even/odd inc tobp -{0x0030, 0x1111}, //y even/odd inc dummy -{0x0032, 0x1111}, //y even/odd inc active -{0x001a, 0x1111}, //x even/odd inc dummy0 -{0x001c, 0x1111}, //x even/odd inc dummy1 -{0x001e, 0x1111}, //x even/odd inc active -{0x0006, 0x07c2}, //frame length lines -{0x0a22, 0x0000}, //digial binning mode off -{0x0a12, 0x0a10}, //x output size -{0x0a14, 0x078c}, //y output size -{0x003e, 0x0000}, //tg_ctl_1(0x3E)-crop enable, tg_ctl_2(0x3F)-OTP_Write_Func -{0x0004, 0x07d8}, //coarse integ time -{0x0002, 0x0000}, //fine integ time -{0x0a02, 0x0100}, //fast standby mode -{0x0a04, 0x014a}, //isp_en -{0x0508, 0x0100}, //r_dga_dither -{0x0a1a, 0x0800}, //DG Pedestal Enable -{0x0046, 0x0000}, //grouped para hold -{0x003a, 0x0000}, //analog gain 1x -{0x0036, 0x007f}, //ramp init/rst pofs -{0x0038, 0x7f00}, //ramp sig pofs -{0x004c, 0x7f7f}, //ramp prst/psig pofs -{0x0122, 0x0301}, //d2a_pxl_drv_pwr_hv/lv - rx pcp on -{0x0804, 0x0002}, //r_x_start -{0x004e, 0x0100}, //SREG update for ESD -{0x090c, 0x106c}, //mipi_vblank_delay -{0x090e, 0x0069}, //mipi_hblank_delay -{0x0f02, 0x000f}, //r_pll_cfg1 -//=============================================== -// mipi 2 lane 880Mbp -//=============================================== -{0x0902, 0x4319}, //mipi_tx_op_mode1, mipi_tx_op_mode2 -{0x0914, 0xc10c}, //mipi_exit_seq, tlpx -{0x0916, 0x061d}, //tclk_prepare, tclk_zero -{0x091c, 0x0e09}, //tclk_post, tclk_trail -{0x0918, 0x0307}, //tclk_pre, ths_prepare -{0x091a, 0x0c0c}, //ths_zero, ths_trail -{0x091e, 0x0a00}, //mipi_exit, null -}; - -struct msm_camera_i2c_reg_setting sr552_init = { - sr552_init_reg, sizeof(sr552_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0A02, 0x01, 0x00, 0}, //fast sleep On - {0x0A00, 0x00, 0x00, 100}, // standby on - {0x0F02, 0x00, 0x00, 0}, //PLL disable - {0x011A, 0x01, 0x00, 0}, //CP TRIM_H - {0x011B, 0x09, 0x00, 0}, //IPGM TRIM_H - {0x0D04, 0x01, 0x00, 0}, //Fsync Output Enable - {0x0D00, 0x07, 0x00, 0}, //Fsync Output Drivability - {0x003F, 0x10, 0x00, 0}, //OTP R/W mode - {0x0a00, 0x01, 0x00, 0}, //standby off -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/external/Makefile b/drivers/media/platform/msm/camera_v2/sensor/external/Makefile deleted file mode 100755 index 4af47981fbd5..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/external/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci -ccflags-y += -DEXPORT_SYMTAB -obj-$(CONFIG_OIS) += msm_ois.o diff --git a/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.c b/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.c deleted file mode 100755 index d4811a5e25c3..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.c +++ /dev/null @@ -1,2238 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "[%s::%d] " fmt, __func__, __LINE__ - -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_ois.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - - -DEFINE_MSM_MUTEX(msm_ois_mutex); - -#define OIS_CAL_DATA_INFO_START_ADDR (0x7400) - -#define MAX_RETRY_COUNT (3) - -#undef CDBG -#ifdef CONFIG_MSM_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#undef CDBG_I -#define CONFIG_MSM_CAMERA_DEBUG_INFO -#ifdef CONFIG_MSM_CAMERA_DEBUG_INFO -#define CDBG_I(fmt, args...) pr_info(fmt, ##args) -#else -#define CDBG_I(fmt, args...) do { } while (0) -#endif - - - -static struct i2c_driver msm_ois_i2c_driver; -struct msm_ois_ctrl_t *g_msm_ois_t; -extern struct class *camera_class; /*sys/class/camera*/ - -extern int16_t msm_actuator_move_for_ois_test(void); -extern void msm_actuator_power_for_ois_test(int on); - - -#define GPIO_LEVEL_LOW 0 -#define GPIO_LEVEL_HIGH 1 -#define GPIO_CAM_RESET 36 - -#define SYSFS_OIS_DEBUG_PATH "/sys/class/camera/ois/ois_exif" - -extern void *msm_get_eeprom_data_base(int id, uint32_t *size); - -#if defined(CONFIG_SEC_FACTORY) -int is_factory_mode = 1; -#else -int is_factory_mode = 0; -#endif - -static u8 *msm_eeprom_ois_base(int id) -{ - u32 size = 0; - u8 *ebase = (u8 *)msm_get_eeprom_data_base(id, &size); - if (!ebase) - return NULL; - - if (size < MODULE_OIS_TOTAL_SIZE) { - pr_err("%s eeprom size[%d] expected size[%d]\n", - __func__, size, MODULE_OIS_TOTAL_SIZE); - return NULL; - } - return (ebase + MODULE_OIS_START_ADDR); -} - -/* OIS_A7_START */ - -static int msm_ois_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - return -EINVAL; - } - CDBG("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - - -/* Byte swap short - change big-endian to little-endian */ -uint16_t swap_uint16( uint16_t val ) -{ - return (val << 8) | ((val >> 8) & 0xFF); -} - -uint32_t swap_uint32( uint32_t val ) -{ - val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF ); - return (val << 16) | (val >> 16); -} - -char ois_fw_full[40] = {0,}; -void msm_ois_get_fw(struct msm_ois_ver_t *info, u8 *buf) -{ - if (!buf || !info) - return; - - if (buf[0] == 'A' || buf[0] == 'B') { - info->core_ver = buf[0]; - info->gyro_sensor = buf[1]; - info->driver_ic = buf[2]; - info->year = buf[3]; - info->month = buf[4]; - info->iteration_0 = buf[5]; - info->iteration_1 = buf[6]; - } - - CDBG("%c%c%c%c%c%c%c\n", info->core_ver, info->gyro_sensor, info->driver_ic, - info->year, info->month, info->iteration_0, info->iteration_1); - -} - -void msm_ois_fw_tostrng(struct msm_ois_ver_t *info, u8 *buf) -{ - if (!info || (info->core_ver != 'A' && info->core_ver != 'B')) - sprintf(buf, "NULL"); - else - sprintf(buf, "%c%c%c%c%c%c%c", info->core_ver, info->gyro_sensor, - info->driver_ic, info->year, info->month, info->iteration_0, info->iteration_1); -} - - -void msm_ois_set_offset(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - - if (a_ctrl->fw_info.module_fw) { - /*Default: LOAD SHIFT DATA & CALIBRATION DATA FROM EEPROM */ - a_ctrl->fw_info.shift_offset = MODULE_OIS_SHIFT_DATA_OFFSET; - a_ctrl->fw_info.shift_data_size = MODULE_OIS_SHIFT_DATA_SIZE; - a_ctrl->fw_info.shift_chksum_offset = MODULE_OIS_SHIFT_DATA_CHK_SUM_OFFSET; - - a_ctrl->fw_info.cal_offset = MODULE_OIS_CAL_DATA_OFFSET; - a_ctrl->fw_info.cal_data_size = MODULE_OIS_CAL_DATA_MAP_SIZE; - a_ctrl->fw_info.cal_chksum_offset = MODULE_OIS_CAL_DATA_CHK_SUM_OFFSET; - } else { - /* LOAD SHIFT DATA & CALIBRATION DATA FROM PHONE */ - a_ctrl->fw_info.shift_offset = PHONE_OIS_SHIFT_DATA_OFFSET; - a_ctrl->fw_info.shift_data_size = PHONE_OIS_SHIFT_DATA_SIZE; - a_ctrl->fw_info.shift_chksum_offset = PHONE_OIS_SHIFT_DATA_CHK_SUM_OFFSET; - - a_ctrl->fw_info.cal_offset = PHONE_OIS_CAL_DATA_OFFSET; - a_ctrl->fw_info.cal_data_size = PHONE_OIS_CAL_DATA_MAP_SIZE; - a_ctrl->fw_info.cal_chksum_offset = PHONE_OIS_CAL_DATA_CHK_SUM_OFFSET; - } - - if (mode) { // Load phone FW - a_ctrl->fw_info.fw_offset = PHONE_OIS_FW_OFFSET; - a_ctrl->fw_info.fw_data_size = PHONE_OIS_FW_MAP_SIZE; - a_ctrl->fw_info.fw_chksum_offset = PHONE_OIS_FW_CHK_SUM_OFFSET; - - a_ctrl->fw_info.fa_fw_offset = PHONE_OIS_FW_FACTORY_OFFSET; - a_ctrl->fw_info.fa_fw_data_size = PHONE_OIS_FW_FACTORY_MAP_SIZE; - a_ctrl->fw_info.fa_fw_chksum_offset = PHONE_OIS_FW_FACTORY_CHK_SUM_OFFSET; - - a_ctrl->fw_info.load_fw = a_ctrl->fw_info.phone_fw; - a_ctrl->fw_info.is_phone_fw = 1; - CDBG_I("***** LOADING PHONE FIRMWARE *****\n"); - - } else { // Load Module FW - - a_ctrl->fw_info.fw_offset = MODULE_OIS_FW_OFFSET; - a_ctrl->fw_info.fw_data_size = MODULE_OIS_FW_MAP_SIZE; - a_ctrl->fw_info.fw_chksum_offset = MODULE_OIS_FW_CHK_SUM_OFFSET; - - a_ctrl->fw_info.fa_fw_offset = MODULE_OIS_FW_FACTORY_OFFSET; - a_ctrl->fw_info.fa_fw_data_size = MODULE_OIS_FW_FACTORY_MAP_SIZE; - a_ctrl->fw_info.fa_fw_chksum_offset = MODULE_OIS_FW_FACTORY_CHK_SUM_OFFSET; - - a_ctrl->fw_info.load_fw = a_ctrl->fw_info.module_fw; - CDBG_I("***** LOADING MODULE FIRMWARE *****\n"); - } -} - -int msm_ois_get_fw_revision(struct msm_ois_ver_t *info) -{ - int rev; - rev = (info->year - 64) * 1000; - rev += (info->month - 64) * 100; - rev += (info->iteration_1 - 48) * 10; - rev += (info->iteration_0 - 48); - - return rev; -} - -int msm_ois_cal_revision(char *cal_ver) -{ - int revision = 0; - - if (!cal_ver) - return 0; - - if( cal_ver[0] != 'V' - || cal_ver[1] < '0' || cal_ver[1] > '9' - || cal_ver[2] < '0' || cal_ver[2] > '9' - || cal_ver[3] < '0' || cal_ver[3] > '9' ) { - return 0; - } - - revision = ((cal_ver[1] - '0') * 100) + ((cal_ver[2] - '0') * 10) + (cal_ver[3] - '0'); - - CDBG_I(": %d\n", revision); - - return revision; -} - -void msm_ois_get_load_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - int is_phone_fw = 0; /* default is module firmware */ -/* - 1. If both phone & module firmware does not exist then return - - 2. If force flag set from sysfs or module firmware doesnot exist - but phone firmware exist then load phone firmware - - 3. If Both phone & module firmware exist & no force phone firmware flag set then, - i. If phone & module calibration version do not match then load module firmware - ii. Else if module firmware version greter that phone firmware then - then load module firmware - iii. Other wise load phone firmware -*/ - - if ((!a_ctrl->fw_info.module_fw) && (!a_ctrl->fw_info.phone_fw)) - return; - - if (!a_ctrl->fw_info.module_fw) { - is_phone_fw = 1; - } else if (!a_ctrl->fw_info.phone_fw) { - is_phone_fw = 0; - } else if (a_ctrl->fw_info.force_phone == true || - a_ctrl->fw_info.force_test == true) { - is_phone_fw = 1; - - } else { - int cal_rev_m, cal_rev_p; - cal_rev_m = msm_ois_cal_revision((char *)&a_ctrl->fw_info.module_fw[0x48]); - cal_rev_p = msm_ois_cal_revision((char *)&a_ctrl->fw_info.phone_fw[0x48]); - - CDBG_I("Calibration version: Module[%d] Phone[%d]\n", cal_rev_m, cal_rev_p); - - if (cal_rev_m == cal_rev_p) { - int fw_rev_m, fw_rev_p; - fw_rev_m = msm_ois_get_fw_revision(&a_ctrl->fw_info.module_ver); - fw_rev_p = msm_ois_get_fw_revision(&a_ctrl->fw_info.phone_ver); - - if (fw_rev_m < fw_rev_p) { - is_phone_fw = 1; - } - } - } - - msm_ois_set_offset(a_ctrl, is_phone_fw); -} - -void msm_ois_get_fw_version(struct msm_ois_ctrl_t *a_ctrl) -{ - struct msm_ois_ver_t l_fw_ver; - char P_FW[10] = {0,}, M_FW[10] = {0,}, L_FW[10] = {0,}; - - msm_ois_fw_tostrng(&a_ctrl->fw_info.module_ver, M_FW); - msm_ois_fw_tostrng(&a_ctrl->fw_info.phone_ver, P_FW); - - msm_ois_get_load_fw(a_ctrl); - if (a_ctrl->fw_info.load_fw) - msm_ois_get_fw(&l_fw_ver, &a_ctrl->fw_info.load_fw[0x40]); - - msm_ois_fw_tostrng(&l_fw_ver, L_FW); - - sprintf(ois_fw_full, "%s %s %s", M_FW, P_FW, L_FW); - CDBG_I("ois fw[%s]\n", ois_fw_full); -} - -void msm_ois_get_cal_version(struct msm_ois_ctrl_t *a_ctrl) -{ - u8 *buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return; - } - - memcpy(a_ctrl->fw_info.cal_info.cal_ver, &buf[0x48], 4); -} - -u8 i2c_write_buf[5000] = {0,}; -int msm_ois_i2c_write_multi(struct msm_ois_ctrl_t *a_ctrl, u16 addr, u8 *data, size_t size) -{ - int ret = 0, err = 0; - int retries = I2C_RETRY_COUNT; - ulong i = 0; - - struct i2c_client *client = a_ctrl->i2c_client.client; - uint16_t saddr = client->addr >> 1; - - struct i2c_msg msg = { - .addr = saddr, - .flags = 0, - .len = size + 2, - .buf = i2c_write_buf, - }; - - i2c_write_buf[0] = (addr & 0xFF00) >> 8; - i2c_write_buf[1] = addr & 0xFF; - - for (i = 0; i < size; i++) { - i2c_write_buf[i + 2] = *(data + i); - } - CDBG("OISLOG %s : W(0x%02X%02X, start:%02X, end:%02X)\n", __func__, - i2c_write_buf[0], i2c_write_buf[1], i2c_write_buf[2], i2c_write_buf[i + 1]); - - do { - ret = i2c_transfer(client->adapter, &msg, 1); - if (likely(ret == 1)) - break; - - usleep_range(10000,11000); - err = ret; - } while (--retries > 0); - - /* Retry occured */ - if (unlikely(retries < I2C_RETRY_COUNT)) { - pr_err("i2c_write: error %d, write (%04X, %04X), retry %d\n", - err, addr, *data, I2C_RETRY_COUNT - retries); - } - - if (unlikely(ret != 1)) { - pr_err("I2C does not work\n\n"); - return -EIO; - } - - return 0; -} - -static int msm_ois_i2c_read_multi(struct msm_ois_ctrl_t *a_ctrl, u16 addr, u8 *data, size_t size) -{ - int err; - u8 rxbuf[256], txbuf[2]; - struct i2c_msg msg[2]; - struct i2c_client *client = a_ctrl->i2c_client.client; - uint16_t saddr = client->addr >> 1; - - txbuf[0] = (addr & 0xff00) >> 8; - txbuf[1] = (addr & 0xff); - - msg[0].addr = saddr; - msg[0].flags = 0; - msg[0].len = 2; - msg[0].buf = txbuf; - - msg[1].addr = saddr; - msg[1].flags = I2C_M_RD; - msg[1].len = size; - msg[1].buf = rxbuf; - - err = i2c_transfer(client->adapter, msg, 2); - if (unlikely(err != 2)) { - pr_err("%s: register read fail", __func__); - return -EIO; - } - - memcpy(data, rxbuf, size); - return 0; -} - -u32 msm_ois_read_cal_checksum(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 read_data[4] = {0,}; - u32 checksum = 0; - - ret = msm_ois_i2c_read_multi(a_ctrl, 0xF008, read_data, 4); - if (ret) { - pr_err("i2c read fail\n"); - } - - checksum = (read_data[0] << 24) | (read_data[1] << 16) | (read_data[2] << 8) | (read_data[3]); - - CDBG("%s : R(0x%02X%02X%02X%02X)\n", - __func__, read_data[0], read_data[1], read_data[2], read_data[3]); - - return checksum; -} - -int msm_ois_load_phone_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - - int ret = 0; - long fsize = 0; - u8 *read_buf = NULL; - u8 *temp_buf = NULL; - - static char fw_name[100]; - struct file *fp = NULL; - mm_segment_t old_fs; - long nread; - //uint8_t core_ver = a_ctrl->fw_info.module_ver.core_ver; - uint8_t core_ver = 'B'; - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - if (!a_ctrl) { - pr_err("%s:%d a_ctrl is NULL\n", __func__, __LINE__); - goto p_err; - } - core_ver = a_ctrl->fw_info.module_ver.core_ver; - - if (a_ctrl->fw_info.phone_fw) { - /* reload phone f/w requested. free previous buffer */ - vfree(a_ctrl->fw_info.phone_fw); - a_ctrl->fw_info.phone_fw = NULL; - } - - if (a_ctrl->fw_info.force_test || core_ver == 'A') { - CDBG_I("Phone FW reading from [%s]\n", MSM_OIS_SP_FW_PATH); - snprintf(fw_name, sizeof(fw_name), "%s", MSM_OIS_SP_FW_PATH); - fp = filp_open(fw_name, O_RDONLY, 0); - if (IS_ERR_OR_NULL(fp)) { - pr_err("%s:%d Camera: Failed open phone firmware", __func__, __LINE__); - ret = -EIO; - fp = NULL; - goto p_err; - } - } else { - CDBG_I("Phone FW reading from [%s]\n", MSM_OIS_SE_FW_PATH); - snprintf(fw_name, sizeof(fw_name), "%s", MSM_OIS_SE_FW_PATH); - fp = filp_open(fw_name, O_RDONLY, 0); - if (IS_ERR(fp)) { - pr_err("%s:%d Camera: Failed open phone firmware", __func__, __LINE__); - ret = -EIO; - fp = NULL; - goto p_err; - } - } - - fsize = fp->f_path.dentry->d_inode->i_size; - CDBG_I("start, file path [%s], size %ld Bytes\n", fw_name, fsize); - - if (fsize > MSM_MAX_OIS_SIZE) { - CDBG_I("ERR: OIS FW is very large!\n"); - ret = -EIO; - goto p_err; - } else { - read_buf = vmalloc(fsize); - if (!read_buf) { - CDBG_I("ERR: Mem Allocation\n"); - ret = -EIO; - goto p_err; - } - memset(read_buf, 0x0, fsize); - } - - nread = vfs_read(fp, read_buf, fsize, &fp->f_pos); - if (nread != fsize) { - pr_err("failed to read firmware file, %ld Bytes", nread); - ret = -EIO; - goto p_err; - } - - a_ctrl->fw_info.phone_fw = read_buf; - - if (a_ctrl->fw_info.phone_fw) - msm_ois_get_fw(&a_ctrl->fw_info.phone_ver, &a_ctrl->fw_info.phone_fw[0x40]); - - if (a_ctrl->fw_info.phone_ver.core_ver != 'A' && - a_ctrl->fw_info.phone_ver.core_ver != 'B') { - - pr_err("%s:%d OIS phone firmware core version missmatch expected [A/B] got[%c]\n", - __func__, __LINE__, a_ctrl->fw_info.phone_ver.core_ver); - a_ctrl->fw_info.phone_fw = NULL; - - goto p_err; - } - - CDBG_I("OIS firmware is loaded from Phone binary.\n"); - -p_err: - if (read_buf && a_ctrl->fw_info.phone_fw == NULL) { - vfree(read_buf); - read_buf = NULL; - temp_buf = NULL; - } - if (fp) { - filp_close(fp, current->files); - fp = NULL; - } - set_fs(old_fs); - - return ret; -} - - -void msm_ois_load_module_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - a_ctrl->fw_info.module_fw = msm_eeprom_ois_base(0); - if (a_ctrl->fw_info.module_fw) - msm_ois_get_fw(&a_ctrl->fw_info.module_ver, &a_ctrl->fw_info.module_fw[0x40]); - - if (a_ctrl->fw_info.module_ver.core_ver != 'A' && - a_ctrl->fw_info.module_ver.core_ver != 'B') { - - pr_err("%s:%d OIS module firmware core version missmatch expected [A/B] got[%c]\n", - __func__, __LINE__, a_ctrl->fw_info.phone_ver.core_ver); - a_ctrl->fw_info.module_fw = NULL; - } - - return; -} - -int msm_ois_load_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - if (a_ctrl->fw_info.is_loaded == false) { - msm_ois_load_module_fw(a_ctrl); - msm_ois_load_phone_fw(a_ctrl); - - msm_ois_get_fw_version(a_ctrl); - msm_ois_get_cal_version(a_ctrl); - - a_ctrl->fw_info.is_loaded = true; - } - return ret; -} - - -int msm_ois_download_factory_fw_set(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_set_fw_addr = 0; - uint16_t ois_set_fw_target_addr1; - uint16_t ois_set_fw_offset1 = 0; - uint16_t ois_set_fw_size1 = 0; - - uint16_t ois_set_fw_target_addr2; - uint16_t ois_set_fw_offset2 = 0; - uint16_t ois_set_fw_size2 = 0; - - uint16_t ois_set_fw_target_addr3; - uint16_t ois_set_fw_offset3 = 0; - uint16_t ois_set_fw_size3 = 0; - - u32 checksum_fw = 0; - u32 checksum_module = 0; - - CDBG_I("E"); - /* Access to "OIS FW DL" */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF010, 0x00); - if (ret < 0) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return 0; /* returning success: as withouth OIS camera must work */ - } - ois_set_fw_addr = a_ctrl->fw_info.fa_fw_offset; - CDBG_I("OIS SET FW Loading.\n"); - - ret = msm_ois_verify_sum(&buf[ois_set_fw_addr],\ - a_ctrl->fw_info.fa_fw_data_size, *(int *)(buf + a_ctrl->fw_info.fa_fw_chksum_offset)); - if (ret < 0) { - pr_err("%s: OIS_FW check sum verification failed! checksum[%pK] fw[%pK]\n", __func__, - &buf[a_ctrl->fw_info.fa_fw_chksum_offset], &buf[ois_set_fw_addr]); - return -EINVAL; - } - - ois_set_fw_target_addr1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_TARGET_ADDR_OFFSET])); - ois_set_fw_offset1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_OFFSET_ADDR_OFFSET])); - ois_set_fw_size1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size1 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr1, - &buf[ois_set_fw_addr+ois_set_fw_offset1], ois_set_fw_size1); - - ois_set_fw_target_addr2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_TARGET_ADDR_OFFSET])); - ois_set_fw_offset2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_OFFSET_ADDR_OFFSET])); - ois_set_fw_size2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size2 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr2, - &buf[ois_set_fw_addr+ois_set_fw_offset2], ois_set_fw_size2); - - ois_set_fw_target_addr3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_TARGET_ADDR_OFFSET])); - ois_set_fw_offset3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_OFFSET_ADDR_OFFSET])); - ois_set_fw_size3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size3 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr3, - &buf[ois_set_fw_addr+ois_set_fw_offset3], ois_set_fw_size3); - - checksum_fw = swap_uint32(*((int32_t *)&buf[ois_set_fw_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - if (checksum_fw != checksum_module) { - pr_err("%s: OIS FW check sum mismatch!\n", __func__); - ret = -EINVAL; - } - - CDBG_I("Success X\n"); - - CDBG("OIS SET FW addr = 0x%04X\n", ois_set_fw_addr); - CDBG("OIS SET FW #1 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr1, ois_set_fw_offset1, ois_set_fw_size1); - CDBG("OIS SET FW #2 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr2, ois_set_fw_offset2, ois_set_fw_size2); - CDBG("OIS SET FW #3 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr3, ois_set_fw_offset3, ois_set_fw_size3); - CDBG("OIS SET FW checksum = ( Phone-0x%08X : Module-0x%08X)\n", - checksum_fw, checksum_module); - return ret; -} - - - - -int msm_ois_download_fw_set(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_set_fw_addr = 0; - uint16_t ois_set_fw_target_addr1; - uint16_t ois_set_fw_offset1 = 0; - uint16_t ois_set_fw_size1 = 0; - - uint16_t ois_set_fw_target_addr2; - uint16_t ois_set_fw_offset2 = 0; - uint16_t ois_set_fw_size2 = 0; - - uint16_t ois_set_fw_target_addr3; - uint16_t ois_set_fw_offset3 = 0; - uint16_t ois_set_fw_size3 = 0; - - u32 checksum_fw = 0; - u32 checksum_module = 0; - - /* Access to "OIS FW DL" */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF010, 0x00); - if (ret < 0) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return 0; /* returning success: as withouth OIS camera must work */ - } - ois_set_fw_addr = a_ctrl->fw_info.fw_offset;; - CDBG_I("OIS SET FW Loading...\n"); - - ret = msm_ois_verify_sum(&buf[ois_set_fw_addr],\ - a_ctrl->fw_info.fw_data_size, *(int *)(buf + a_ctrl->fw_info.fw_chksum_offset)); - if (ret < 0) { - pr_err("OIS_FW check sum verification failed! checksum[%pK] fw[%pK]\n", &buf[a_ctrl->fw_info.fw_chksum_offset],\ - &buf[ois_set_fw_addr]); - return -EINVAL; - } - - ois_set_fw_target_addr1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_TARGET_ADDR_OFFSET])); - ois_set_fw_offset1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_OFFSET_ADDR_OFFSET])); - ois_set_fw_size1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size1 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr1, - &buf[ois_set_fw_addr+ois_set_fw_offset1], ois_set_fw_size1); - - ois_set_fw_target_addr2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_TARGET_ADDR_OFFSET])); - ois_set_fw_offset2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_OFFSET_ADDR_OFFSET])); - ois_set_fw_size2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size2 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr2, - &buf[ois_set_fw_addr+ois_set_fw_offset2], ois_set_fw_size2); - - ois_set_fw_target_addr3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_TARGET_ADDR_OFFSET])); - ois_set_fw_offset3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_OFFSET_ADDR_OFFSET])); - ois_set_fw_size3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size3 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr3, - &buf[ois_set_fw_addr+ois_set_fw_offset3], ois_set_fw_size3); - - checksum_fw = swap_uint32(*((int32_t *)&buf[ois_set_fw_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - if (checksum_fw != checksum_module) { - pr_err("OIS FW check sum mismatch!\n"); - ret = -EINVAL; - } - - CDBG_I("Success X\n"); - - CDBG("OIS SET FW addr = 0x%04X\n", ois_set_fw_addr); - CDBG("OIS SET FW #1 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr1, ois_set_fw_offset1, ois_set_fw_size1); - CDBG("OIS SET FW #2 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr2, ois_set_fw_offset2, ois_set_fw_size2); - CDBG("OIS SET FW #3 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr3, ois_set_fw_offset3, ois_set_fw_size3); - CDBG("OIS SET FW checksum = ( Phone-0x%08X : Module-0x%08X)\n", - checksum_fw, checksum_module); - return ret; -} - -int msm_ois_download_cal_data(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_cal_start_addr = a_ctrl->fw_info.cal_offset; - uint16_t ois_cal_target_addr; - uint16_t ois_cal_offset = 0; - uint16_t ois_cal_size = 0; - - u32 checksum_fw = 0; - u32 checksum_cal = 0; - u32 checksum_module = 0; - - buf = a_ctrl->fw_info.module_fw; - if (!buf) { - pr_err("%s Module firmware is NULL! Trying phone firmware..\n", __func__); - buf = a_ctrl->fw_info.phone_fw; - if (!buf) { - pr_err("%s Phone firmware is NULL!\n", __func__); - return 0; /* returning success: as without OIS camera must work */ - } - } - - if (a_ctrl->fw_info.cal_chksum_offset != 0xFFFF) { - ret = msm_ois_verify_sum(&buf[ois_cal_start_addr],\ - a_ctrl->fw_info.cal_data_size, *(int *)(buf + a_ctrl->fw_info.cal_chksum_offset)); - if (ret < 0) { - pr_err("OIS_CAL check sum verification failed! checksum[%pK] fw[%pK]\n", &buf[a_ctrl->fw_info.cal_chksum_offset],\ - &buf[ois_cal_start_addr]); - return -EINVAL; - } - } - - ois_cal_target_addr = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_TRGT_ADDR_OFFSET])); - ois_cal_offset = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_OFFSET_OFFSET])); - ois_cal_size = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_SIZE_OFFSET])); - if (ois_cal_size > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_cal_target_addr, - &buf[ois_cal_start_addr + ois_cal_offset], ois_cal_size); - - - if (mode == 0) - checksum_fw = swap_uint32(*((int32_t *)&buf[a_ctrl->fw_info.fw_offset])); - else - checksum_fw = swap_uint32(*((int32_t *)&buf[a_ctrl->fw_info.fa_fw_offset])); - - checksum_cal = swap_uint32(*((int32_t *)&buf[ois_cal_start_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - /* OIS Download Complete */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF006, 0x00); - if (ret) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - - if (checksum_fw + checksum_cal != checksum_module) { - pr_err("%s:%d OIS CAL check sum mismatch! checksum_fw[%x] + checksum_fw[%x] != module_checksum[%x]\n", - __func__, __LINE__, checksum_fw, checksum_cal, checksum_module); - ret = -EINVAL; - } - - if (ret == 0) - CDBG_I("Success!"); - - CDBG("OIS Cal FW addr = 0x%04X\n", ois_cal_start_addr); - CDBG("OIS Cal target Reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_cal_target_addr, ois_cal_offset, ois_cal_size); - CDBG("OIS Cal FW checksum = ( 0x%08X : 0x%08X)\n", checksum_fw, checksum_module); - - return ret; -} - - -int msm_ois_read_status(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u16 status = 0; - int wait_ready_cnt = 0; - - do { - ret = msm_ois_i2c_byte_read(a_ctrl, 0x6024, &status); - if (ret < 0) { - pr_err("i2c read fail\n"); - } - - if (status != 0) - break; - - usleep_range(5000, 5010); - wait_ready_cnt ++; - } while(wait_ready_cnt < 200); - - if (status) { - CDBG_I("ois status ready(%d), wait(%d ms)\n", status, wait_ready_cnt * 5); - } else { - pr_err("ois status NOT ready(%d), wait(%d ms)\n", status, wait_ready_cnt * 5); - ret = -EINVAL; - } - - return ret; -} - -int msm_ois_fw_update(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - int ret = 0; - int retry_cnt = 0; - - CDBG_I("E\n"); - - /* Select FW (PHONE or EEPROM) */ - //msm_ois_check_fw(core); - - /* Download FW (SET or FACTORY) */ - retry_cnt = 3; - do { - if (mode == 0) - ret = msm_ois_download_fw_set(a_ctrl); - else - ret = msm_ois_download_factory_fw_set(a_ctrl); - if (ret) { - pr_err("%s:%d ois fw write fail, ret(%d)\n", __func__, __LINE__, ret); - goto out; - } - retry_cnt--; - }while( ret && (retry_cnt > 0)); - - /* Dwonload OIS Cal data */ - ret = msm_ois_download_cal_data(a_ctrl, mode); - if (ret) { - pr_err("%s:%d ois caldata write fail\n", __func__, __LINE__); - goto out; - } - - -#if defined(OIS_TEST_WITHOUT_FW) - /* OIS Servo On, OIS Off, Gyro On */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); - - /* OIS Servo On / OIS Off */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - ret |= msm_ois_read_status(a_ctrl); - - /* OIS Mode */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x7B); - ret |= msm_ois_read_status(a_ctrl); - - /* Compensation angle */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0x40); - ret |= msm_ois_read_status(a_ctrl); - - /* OIS On */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); - ret |= msm_ois_read_status(a_ctrl); - - if (ret) { - pr_err("OIS Test fail\n"); - } -#endif -out: - CDBG_I("Status[%s] X\n", ret ? "Failed!":"Success!"); - - return ret; -} - -int msm_ois_set_mode_still(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x7B); /*OIS Mode Still*/ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0x40); /*revision angle*/ - ret |= msm_ois_read_status(a_ctrl); - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); /* Servo Off/ OIS On */ - ret |= msm_ois_read_status(a_ctrl); - - return ret; -} - -int msm_ois_set_mode_recording(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x61); /*OIS Mode Still*/ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0xE0); /*revision angle*/ - ret |= msm_ois_read_status(a_ctrl); - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); /* Servo Off/ OIS On */ - ret |= msm_ois_read_status(a_ctrl); - - return ret; -} - - -static int msm_ois_set_mode_sin_x(struct msm_ois_ctrl_t *a_ctrl) -{ - int rc; - rc = msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x00); // Sin Mode Off - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); // Servo_ON - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6131, 0x01); // Frequency = 1Hz - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6132, 0x30); // AMP = 48 - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x03); // Manual Mode - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x01); // Xì¶• Sin_Mode ë™ìž‘ - - return rc; -} - -static int msm_ois_set_mode_sin_y(struct msm_ois_ctrl_t *a_ctrl) -{ - int rc; - rc = msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x00); // Sin Mode Off - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); // Servo_ON - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6131, 0x01); // Frequency = 1Hz - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6132, 0x30); // AMP = 48 - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x03); // Manual Mode - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x02); // Yì¶• Sin_Mode ë™ìž‘ - - return rc; -} - -/* OIS_A7_END */ - -static int msm_ois_get_fw_status(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - /* OIS Status Read */ - ret = msm_ois_read_status(a_ctrl); - if (ret) { - pr_err("%s:%d OIS Active Failed!\n", __func__, __LINE__); - return -EIO; - } - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* OIS Servo On/ OIS Off */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); /* Gyro On*/ - - ret |= msm_ois_read_status(a_ctrl); - - return 0; -} - - -static int32_t msm_ois_set_mode(struct msm_ois_ctrl_t *a_ctrl, - uint16_t mode) -{ - int rc = 0; - switch(mode) { - case OIS_MODE_ON_STILL: - if (a_ctrl->ois_mode != OIS_MODE_ON_STILL) { - CDBG_I("SET :: OIS_MODE_ON_STILL\n"); - rc = msm_ois_set_mode_still(a_ctrl); - a_ctrl->ois_mode = OIS_MODE_ON_STILL; - } - break; - case OIS_MODE_ON_ZOOM: - CDBG_I("SET :: OIS_MODE_ON_ZOOM\n"); - rc = -EINVAL; - break; - case OIS_MODE_ON_VIDEO: - if (a_ctrl->ois_mode != OIS_MODE_ON_VIDEO) { - CDBG_I("SET :: OIS_MODE_ON_VIDEO\n"); - rc = msm_ois_set_mode_recording(a_ctrl); - a_ctrl->ois_mode = OIS_MODE_ON_VIDEO; - } - break; - case OIS_MODE_SINE_X: - CDBG_I("SET :: OIS_MODE_SINE_X\n"); - rc = msm_ois_set_mode_sin_x(a_ctrl); - break; - - case OIS_MODE_SINE_Y: - CDBG_I("SET :: OIS_MODE_SINE_Y\n"); - rc = msm_ois_set_mode_sin_y(a_ctrl); - break; - - case OIS_MODE_CENTERING: - CDBG_I("SET :: OIS_MODE_CENTERING\n"); - rc = -EINVAL; - break; - default: - rc = msm_ois_set_mode_still(a_ctrl); - break; - } - return rc; -} - -int msm_ois_i2c_byte_read(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t *data) -{ - int rc = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, addr, data, MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) { - pr_err("ois i2c byte read failed addr : 0x%x data : 0x%x ", addr, *data); - return rc; - } - - CDBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return 0; -} - -int msm_ois_i2c_byte_write(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t data) -{ - int rc = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr, data, MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) { - pr_err("ois i2c byte write failed addr : 0x%x data : 0x%x ", addr, data); - return rc; - } - - CDBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, data); - return 0; -} - -uint16_t msm_ois_calcchecksum(unsigned char *data, int size) -{ - int i = 0; - uint16_t result = 0; - - for( i = 0; i < size; i += 2) { - result = result + (0xFFFF & (((*(data + i + 1)) << 8) | (*(data + i)))); - } - return result; -} - -#if 0 -static int32_t msm_ois_vreg_control(struct msm_ois_ctrl_t *a_ctrl, int config) -{ - int rc = 0, i, cnt; - int idx = 0; - struct msm_ois_vreg *vreg_cfg; - - CDBG_I("Enter\n"); - vreg_cfg = &a_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt){ - pr_err("failed\n"); - return 0; - } - CDBG("[num_vreg::%d]", cnt); - - if (cnt >= MSM_OIS_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - if(config) { - idx = i; - } - else { - idx = cnt - (i + 1); - } - - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[idx], - (struct regulator **)&vreg_cfg->data[idx], - config); - } else { - rc = msm_camera_config_single_vreg(&(a_ctrl->i2c_client.client->dev), - &vreg_cfg->cam_vreg[idx], - (struct regulator **)&vreg_cfg->data[idx], - config); - } - - } - return rc; -} -#endif - -static int32_t msm_ois_config(struct msm_ois_ctrl_t *a_ctrl, - void __user *argp) -{ - struct msm_ois_cfg_data *cdata = - (struct msm_ois_cfg_data *)argp; - int32_t rc = 0; - int retries = 2; - - mutex_lock(a_ctrl->ois_mutex); - CDBG_I("%s type [%d] E\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_OIS_SET_MODE: - CDBG("CFG_OIS_SET_MODE value :: %d\n", cdata->set_mode_value); - do{ - rc = msm_ois_set_mode(a_ctrl, cdata->set_mode_value); - if (rc){ - pr_err("set mode failed %d\n", rc); - if (--retries < 0) - break; - } - }while(rc); - break; - case CFG_OIS_READ_MODULE_VER: - CDBG("CFG_OIS_READ_MODULE_VER enter \n"); - //rc = msm_ois_read_module_ver(a_ctrl); - if (rc < 0) - pr_err("read module version failed, skip fw update from phone %d\n", rc); - - if (copy_to_user(cdata->version, &a_ctrl->fw_info.module_ver, sizeof(struct msm_ois_ver_t))) - pr_err("copy to user failed \n"); - break; - - case CFG_OIS_READ_PHONE_VER: - CDBG("CFG_OIS_READ_PHONE_VER enter \n"); - if(isalnum(a_ctrl->fw_info.module_ver.gyro_sensor)) - { - //rc = msm_ois_read_phone_ver(a_ctrl); - if (rc < 0) - pr_err("There is no OIS FW in the system. skip fw update from phone %d\n", rc); - - if (copy_to_user(cdata->version, &a_ctrl->fw_info.phone_ver, sizeof(struct msm_ois_ver_t))) - pr_err("copy to user failed \n"); - } - break; - - case CFG_OIS_READ_CAL_INFO: - CDBG("CFG_OIS_READ_CAL_INFO enter \n"); - if (rc < 0) - pr_err("ois read user data failed %d\n", rc); - - if (copy_to_user(cdata->ois_cal_info, &a_ctrl->fw_info.cal_info, sizeof(struct msm_ois_cal_info_t))) - pr_err("copy to user failed\n"); - break; - - case CFG_OIS_FW_UPDATE: - CDBG("CFG_OIS_FW_UPDATE enter \n"); - a_ctrl->ois_mode = OIS_MODE_OFF; - rc = msm_ois_fw_update(a_ctrl, is_factory_mode); - if (rc < 0) - pr_err("ois fw update failed %d\n", rc); - break; - case CFG_OIS_GET_FW_STATUS: - CDBG("CFG_OIS_GET_FW_STATUS enter \n"); - rc = msm_ois_get_fw_status(a_ctrl); - if (rc) - pr_err("previous fw update failed , force update will be done %d\n", rc); - break; - - case CFG_OIS_POWERDOWN: - //rc = msm_ois_power_down(a_ctrl); - rc = msm_ois_disable_reset(a_ctrl); - if (rc < 0) - pr_err("msm_ois_power_down failed %d\n", rc); - break; - - case CFG_OIS_POWERUP: - rc = msm_ois_power_up(a_ctrl); - if (rc < 0) - pr_err("Failed ois power up%d\n", rc); - break; - - default: - break; - } - mutex_unlock(a_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_get_subdev_id(struct msm_ois_ctrl_t *a_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = a_ctrl->pdev->id; - else - *subdev_id = a_ctrl->subdev_id; - - CDBG_I("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_seq = msm_camera_qup_i2c_write_seq, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_ois_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG_I("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - if (a_ctrl->gpio_conf && a_ctrl->gpio_conf->cam_gpio_req_tbl) { - CDBG("%s:%d request gpio\n", __func__, __LINE__); - rc = msm_camera_request_gpio_table( - a_ctrl->gpio_conf->cam_gpio_req_tbl, - a_ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - } - msm_ois_power_up(a_ctrl); - a_ctrl->is_camera_run = TRUE; - a_ctrl->is_set_debug_info = FALSE; - - a_ctrl->ois_mode = OIS_MODE_OFF; - msm_ois_load_fw(a_ctrl); - - CDBG("Exit\n"); - return rc; -} - -static int msm_ois_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG_I("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->gpio_conf && a_ctrl->gpio_conf->cam_gpio_req_tbl) { - CDBG("%s:%d release gpio\n", __func__, __LINE__); - msm_camera_request_gpio_table( - a_ctrl->gpio_conf->cam_gpio_req_tbl, - a_ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - a_ctrl->is_camera_run = FALSE; - msm_ois_power_down(a_ctrl); - - - if (a_ctrl->fw_info.phone_fw && !(a_ctrl->fw_info.is_phone_fw)) { - vfree(a_ctrl->fw_info.phone_fw); - a_ctrl->fw_info.phone_fw = NULL; - } - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_ois_internal_ops = { - .open = msm_ois_open, - .close = msm_ois_close, -}; - -static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG_I("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_ois_get_subdev_id(a_ctrl, argp); - case VIDIOC_MSM_OIS_IO_CFG: - return msm_ois_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_ois_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_ois_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(a_ctrl->ois_mutex); - if (on) - rc = msm_ois_power_up(a_ctrl); - else - rc = msm_ois_power_down(a_ctrl); - mutex_unlock(a_ctrl->ois_mutex); - CDBG_I("Exit Power[%s] Status[%d]\n", on? "ON" : "OFF", rc); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ois_subdev_core_ops = { - .ioctl = msm_ois_subdev_ioctl, - .s_power = msm_ois_power, -}; - -static struct v4l2_subdev_ops msm_ois_subdev_ops = { - .core = &msm_ois_subdev_core_ops, -}; - -static int msm_ois_power_up(struct msm_ois_ctrl_t *ctrl) -{ - int rc = -1; - CDBG("%s:%d E\n", __func__, __LINE__); - - if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_DOWN) { - - CDBG("[%pK] [%pK]\n", ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - - rc = gpio_request(ctrl->ois_en, "ois_en"); - if (rc) { - pr_err("%s:%d Failed rc[%d]\n", __func__, __LINE__, rc); - gpio_free(ctrl->ois_en); - goto ERR; - } - - rc = gpio_request(ctrl->ois_reset, "ois_reset"); - if (rc) { - pr_err("%s:%d Failed rc[%d]\n", __func__, __LINE__, rc); - gpio_free(ctrl->ois_en); - gpio_free(ctrl->ois_reset); - goto ERR; - } - - gpio_direction_output(ctrl->ois_en, 1); - usleep_range(10000, 10010); /* 10ms sleep*/ - gpio_direction_output(ctrl->ois_reset, 1); - usleep_range(10000, 10010); /* 10ms sleep*/ - CDBG_I("GPIO status En[%d] Reset[%d]\n", gpio_get_value(ctrl->ois_en), gpio_get_value(ctrl->ois_reset)); - - ctrl->ois_state = OIS_POWER_UP; - rc = 0; - } - - CDBG("%s:%d X\n", __func__, __LINE__); - return rc; -ERR: - pr_err("%s:%d Failed!\n", __func__, __LINE__); - return -EINVAL; -} -static int msm_ois_disable_reset(struct msm_ois_ctrl_t *ctrl) -{ - if (gpio_get_value(ctrl->ois_reset) != 0) { - gpio_direction_output(ctrl->ois_reset, 0); - usleep_range(1000, 1010); // delay 1ms - CDBG_I("GPIO status Reset[%d]\n", gpio_get_value(ctrl->ois_reset)); - gpio_free(ctrl->ois_reset); - } - - return 0; -} - -static int msm_ois_power_down(struct msm_ois_ctrl_t *ctrl) -{ - CDBG("%s:%d E\n", __func__, __LINE__); - - if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_UP) { - - CDBG("[%pK] [%pK]\n", ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - - gpio_direction_output(ctrl->ois_en, 0); - - if (gpio_get_value(ctrl->ois_reset) != 0) { - gpio_direction_output(ctrl->ois_reset, 0); - usleep_range(1000, 1010); // delay 1ms - CDBG_I("GPIO status Reset[%d]\n", gpio_get_value(ctrl->ois_reset)); - gpio_free(ctrl->ois_reset); - } - - CDBG_I("GPIO status En[%d]\n", gpio_get_value(ctrl->ois_en)); - gpio_free(ctrl->ois_en); - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - ctrl->ois_state = OIS_POWER_DOWN; - } - - CDBG_I("X\n"); - return 0; -} - -static int msm_ois_pinctrl_init(struct msm_ois_ctrl_t *ctrl, - struct device_node *of_node) -{ - struct msm_pinctrl_info *ois_pctrl = NULL; - ois_pctrl = &ctrl->pinctrl_info; - ois_pctrl->pinctrl = devm_pinctrl_get(ctrl->dev); - if (IS_ERR_OR_NULL(ois_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - - ois_pctrl->gpio_state_active = - pinctrl_lookup_state(ois_pctrl->pinctrl, - OIS_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(ois_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - - ois_pctrl->gpio_state_suspend - = pinctrl_lookup_state(ois_pctrl->pinctrl, - OIS_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(ois_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - - return 0; -} - - - -static int32_t msm_ois_get_gpio_data(struct msm_ois_ctrl_t *ctrl, - struct device_node *of_node) -{ - int rc = 0; - - ctrl->ois_en = of_get_named_gpio(of_node, "ois,ois-en", 0); - if (ctrl->ois_en < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - ctrl->ois_reset = of_get_named_gpio(of_node, "ois,ois-reset", 0); - if (ctrl->ois_reset < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - rc = msm_ois_pinctrl_init(ctrl, of_node); - - if (rc < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - - return 0; -} - -static int32_t msm_ois_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp; - struct msm_ois_ctrl_t *ois_ctrl_t = NULL; - struct msm_ois_vreg *vreg_cfg; - bool check_use_gpios; - - CDBG_I("Enter\n"); - - if (client == NULL) { - pr_err("msm_ois_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - goto probe_failure; - } - - if (!client->dev.of_node) { - ois_ctrl_t = (struct msm_ois_ctrl_t *)(id->driver_data); - } else { - ois_ctrl_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!ois_ctrl_t) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - ois_ctrl_t->dev = &client->dev; - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &ois_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", ois_ctrl_t->subdev_id, rc); - ois_ctrl_t->cam_name = ois_ctrl_t->subdev_id; - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(ois_ctrl_t);//prevent - return rc; - } - check_use_gpios = of_property_read_bool(client->dev.of_node, "unuse-gpios"); - CDBG("%s: check unuse-gpio flag(%d)\n", - __FUNCTION__, check_use_gpios); - if (!check_use_gpios) { - rc = msm_ois_get_gpio_data(ois_ctrl_t, - client->dev.of_node); - } - } - - if (of_find_property(client->dev.of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &ois_ctrl_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data(client->dev.of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(ois_ctrl_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - rc = of_property_read_u32(client->dev.of_node, "ois,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(ois_ctrl_t); - return rc; - } - client->addr = temp; - CDBG("Slave ID[0x%x]\n", client->addr); - - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - ois_ctrl_t->i2c_driver = &msm_ois_i2c_driver; - - CDBG("client = %x\n", (unsigned int) client); - ois_ctrl_t->i2c_client.client = client; - ois_ctrl_t->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - /* Set device type as I2C */ - ois_ctrl_t->ois_device_type = MSM_CAMERA_I2C_DEVICE; - ois_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - ois_ctrl_t->ois_state = OIS_POWER_DOWN; - ois_ctrl_t->is_camera_run = FALSE; - ois_ctrl_t->ois_mode = OIS_MODE_OFF; - ois_ctrl_t->fw_info.is_loaded = false; - - ois_ctrl_t->cam_name = ois_ctrl_t->subdev_id; - CDBG("ois_ctrl_t->cam_name: %d", ois_ctrl_t->cam_name); - /* Assign name for sub device */ - snprintf(ois_ctrl_t->msm_sd.sd.name, sizeof(ois_ctrl_t->msm_sd.sd.name), - "%s", ois_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&ois_ctrl_t->msm_sd.sd, - ois_ctrl_t->i2c_client.client, - ois_ctrl_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&ois_ctrl_t->msm_sd.sd, ois_ctrl_t); - ois_ctrl_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - ois_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&ois_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - ois_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ois_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - ois_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0xB; - msm_sd_register(&ois_ctrl_t->msm_sd); - //g_ois_i2c_client.client = ois_ctrl_t->i2c_client.client; - g_msm_ois_t = ois_ctrl_t; - -// is_factory_mode = 0; - - CDBG("Succeded Exit\n"); - return rc; -probe_failure: - if (ois_ctrl_t) - kfree(ois_ctrl_t); - return rc; -} - -static int32_t msm_ois_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_ois_ctrl_t *msm_ois_t = NULL; - struct msm_ois_vreg *vreg_cfg; - - CDBG_I("Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_ois_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!msm_ois_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - msm_ois_t->subdev_id = pdev->id; - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_ois_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_ois_t->cci_master, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_ois_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_ois_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - msm_ois_t->ois_mutex = &msm_ois_mutex; - msm_ois_t->cam_name = pdev->id; - - /* Set platform device handle */ - msm_ois_t->pdev = pdev; - /* Set device type as platform device */ - msm_ois_t->ois_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_ois_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_ois_t->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - msm_ois_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_ois_t->i2c_client.cci_client) { - kfree(msm_ois_t->vreg_cfg.cam_vreg); - kfree(msm_ois_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - msm_ois_t->is_camera_run= FALSE; - - cci_client = msm_ois_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_ois_t->msm_sd.sd, - msm_ois_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_ois_t->msm_sd.sd, msm_ois_t); - msm_ois_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - msm_ois_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_ois_t->msm_sd.sd.name, - ARRAY_SIZE(msm_ois_t->msm_sd.sd.name), "msm_ois"); - media_entity_init(&msm_ois_t->msm_sd.sd.entity, 0, NULL, 0); - msm_ois_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_ois_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - msm_ois_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0xB; - rc = msm_sd_register(&msm_ois_t->msm_sd); - //g_ois_i2c_client.cci_client = msm_ois_t->i2c_client.cci_client; - g_msm_ois_t = msm_ois_t; - - CDBG("Exit[rc::%d]\n", rc); - return rc; -} - -static const struct i2c_device_id msm_ois_i2c_id[] = { - { "msm_ois", (kernel_ulong_t)NULL }, - { } -}; -static const struct of_device_id msm_ois_dt_match[] = { - {.compatible = "qcom,ois", .data = NULL}, - {} -}; - -static struct i2c_driver msm_ois_i2c_driver = { - .id_table = msm_ois_i2c_id, - .probe = msm_ois_i2c_probe, - .remove = __exit_p(msm_ois_i2c_remove), - .driver = { - .name = "msm_ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -MODULE_DEVICE_TABLE(of, msm_ois_dt_match); - -static struct platform_driver msm_ois_platform_driver = { - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -static bool msm_ois_diff_test(struct msm_ois_ctrl_t *a_ctrl, int *x_diff, int *y_diff) -{ - int ret; - int X_Max, X_Min, Y_Max, Y_Min; - int default_diff = 1100; - u8 m_val[2] = {0,}; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - - if (ret < 0) { - return false; - } - msm_ois_read_status(a_ctrl); - - msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x04); // Calibration Mode - - m_val[0] = 0x03; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x00); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - X_Max = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0xFD; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x00); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - X_Min = (m_val[0] << 8) + m_val[1]; - - - m_val[0] = 0x00; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - - m_val[0] = 0x03; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x01); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - Y_Max = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0xFD; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x01); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - Y_Min = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0x00; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - - msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x00); // Standby Mode - - *x_diff = abs(X_Max - X_Min); - *y_diff = abs(Y_Max - Y_Min); - - - if (*x_diff > default_diff && *y_diff > default_diff) { - return true; - } else { - return false; - } - -} - -static int msm_ois_gyro_selftest(struct msm_ois_ctrl_t *a_ctrl) - { - int ret; - u16 status = 0; - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x04); // Calibration Mode - if (ret < 0) { - return 0; - } - msleep(10); - msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x02); - msleep(10); - msm_ois_i2c_byte_write(a_ctrl, 0x6138, 0x00); - msm_ois_read_status(a_ctrl); - - //msleep(50); - - msm_ois_i2c_byte_read(a_ctrl, 0x6139, &status); - CDBG_I("status[%d]\n", status); - return status == 3 ? 0 : 1; //OK = 3 , NG = 0~2 -} - -static int msm_is_ois_get_offset(struct msm_ois_ctrl_t *a_ctrl, long *raw_data_x, long *raw_data_y) -{ - char *buf = NULL; - uint16_t x_temp = 0, y_temp = 0; - int16_t x_gyro = 0, y_gyro = 0; - u16 cal_offset = a_ctrl->fw_info.cal_offset; - - CDBG("E\n"); - - buf = a_ctrl->fw_info.module_fw; - if (!buf) - return -1; - - if (cal_offset == 0xFFFF) { - pr_err("%s:%d invalid calibration offset!\n", __func__, __LINE__); - return -1; - } - - x_temp = (buf [cal_offset + 0x18] << 8) - + buf [cal_offset + 0x19]; - x_gyro = *((int16_t *)(&x_temp)); - - y_temp = (buf [cal_offset + 0x1A] << 8) - + buf [cal_offset + 0x1B]; - y_gyro = *((int16_t *)(&y_temp)); - - *raw_data_x = x_gyro; - *raw_data_y = y_gyro; - - - CDBG("X\n"); - return 0; -} - -static int msm_ois_gyro_offset_adjustment(struct msm_ois_ctrl_t *a_ctrl, long *gyro_offset_x, long *gyro_offset_y) -{ - int i; - int ret; - int scale_factor; - u16 x_sum = 0, y_sum = 0, sum = 0; - u16 x_gyro = 0, y_gyro = 0; - u8 status[2] = {0}; - u8 avg_cnt = 10; - - CDBG_I("E\n"); - - *gyro_offset_x = 0; - *gyro_offset_y = 0; - - if( msm_ois_cal_revision(a_ctrl->fw_info.cal_info.cal_ver) < 4 ) - scale_factor = OIS_GYRO_SCALE_FACTOR_V003; - else - scale_factor = OIS_GYRO_SCALE_FACTOR_V004; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - msleep(100); - ret |= msm_ois_read_status(a_ctrl); - if (ret) - goto out; - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); /* Gyro On*/ - if (ret) - goto out; - - for(i = 1; i <= avg_cnt; i++) { - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6088, 0x00); - ret |= msm_ois_read_status(a_ctrl); - - msm_ois_i2c_read_multi(a_ctrl, 0x608A, status, 2); - x_gyro = (status[0] << 8) + status[1]; - sum = *((int16_t *)(&x_gyro)); - y_sum = y_sum + sum; - x_sum = x_sum + x_gyro; - - CDBG_I("i[%d] x_offset[%d]\n", i, x_gyro); - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6088, 0x01); - ret |= msm_ois_read_status(a_ctrl); - - msm_ois_i2c_read_multi(a_ctrl, 0x608A, status, 2); - y_gyro = (status[0] << 8) + status[1]; - sum = *((int16_t *)(&y_gyro)); - y_sum = y_sum + sum; - CDBG_I("i[%d] y_offset[%d]\n", i, y_gyro); - } - - x_sum = x_sum * 1000 / avg_cnt; - y_sum = y_sum * 1000 / avg_cnt; - - *gyro_offset_x = x_sum / scale_factor; - *gyro_offset_y = y_sum / scale_factor; - - CDBG_I("X Offset[%ld], Y Offset[%ld]\n", *gyro_offset_x, *gyro_offset_y); - - return 0; -out: - pr_err("%s:%d Failed!\n", __func__, __LINE__); - return -EINVAL; -} - - - -static ssize_t gyro_selftest_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - int result_total = 0; - bool result_offset = true, result_selftest = false; - unsigned char selftest_ret = 0; - long raw_data_x = 0, raw_data_y = 0; - int final_x1, final_x2, final_y1, final_y2; - - msm_ois_gyro_offset_adjustment(g_msm_ois_t, &raw_data_x, &raw_data_y); - msleep(50); - selftest_ret = msm_ois_gyro_selftest(g_msm_ois_t); - - if (selftest_ret == 0x0) - result_selftest = true; - - if (abs(raw_data_x) > 35000 || abs(raw_data_y) > 35000) - result_offset = false; - - if (result_offset && result_selftest) - result_total = 0; - else if (!result_offset && !result_selftest) - result_total = 3; - else if (!result_offset) - result_total = 1; - else if (!result_selftest) - result_total = 2; - - final_x1 = abs(raw_data_x / 1000); - final_y1 = abs(raw_data_y / 1000); - final_x2 = abs(raw_data_x % 1000); - final_y2 = abs(raw_data_y % 1000); - - pr_err("Result : 0 (success), 1 (offset fail), 2 (selftest fail) , 3 (both fail) \n"); - pr_err("Result : %d, result x = %d.%03d, result y = %d.%03d\n", - result_total , final_x1, final_x2, final_y1, final_y2); - - if (raw_data_x < 0 && raw_data_y < 0) - return sprintf(buf, "%d,-%d.%03d,-%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else if (raw_data_x < 0) - return sprintf(buf, "%d,-%d.%03d,%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else if (raw_data_y < 0) - return sprintf(buf, "%d,%d.%03d,-%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else - return sprintf(buf, "%d,%d.%03d,%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); -} - -static ssize_t ois_hall_cal_test_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - int result; - int x_diff = 0, y_diff = 0; - msm_actuator_power_for_ois_test(1); - usleep_range(20000, 20010); - msm_actuator_move_for_ois_test(); - result = msm_ois_diff_test(g_msm_ois_t, &x_diff, &y_diff); - msm_actuator_power_for_ois_test(0); - return sprintf(buf, "%d,%d,%d\n", result == true ? 0 : 1, x_diff, y_diff); -} - - -static ssize_t gyro_rawdata_test_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - long raw_data_x = 0, raw_data_y = 0; - - msm_is_ois_get_offset(g_msm_ois_t, &raw_data_x, &raw_data_y); - - CDBG_I("raw data x = %ld.%03ld, raw data y = %ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - raw_data_y /1000, raw_data_y % 1000); - - if (raw_data_x < 0 && raw_data_y < 0) { - return sprintf(buf, "-%ld.%03ld,-%ld.%03ld\n", abs(raw_data_x /1000), abs(raw_data_x % 1000), - abs(raw_data_y /1000), abs(raw_data_y % 1000)); - } else if (raw_data_x < 0) { - return sprintf(buf, "-%ld.%03ld,%ld.%03ld\n", abs(raw_data_x /1000), abs(raw_data_x % 1000), - raw_data_y /1000, raw_data_y % 1000); - } else if (raw_data_y < 0) { - return sprintf(buf, "%ld.%03ld,-%ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - abs(raw_data_y /1000), abs(raw_data_y % 1000)); - } else { - return sprintf(buf, "%ld.%03ld,%ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - raw_data_y /1000, raw_data_y % 1000); - } -} - -static ssize_t ois_fw_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] OIS_fw_ver : %s\n", ois_fw_full); - return sprintf(buf, "%s", ois_fw_full); -} - -static ssize_t ois_fw_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(ois_fw_full, sizeof(ois_fw_full), "%s", buf); - - return size; -} - - -static ssize_t ois_power_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) -{ - int rc = 0; - bool is_camera_run = g_msm_ois_t->is_camera_run; - - if((g_msm_ois_t->i2c_client.client==NULL)&&(g_msm_ois_t->pdev==NULL)) { - return size; - } - - if(!is_camera_run){ - switch (buf[0]) { - case '0' : - msm_ois_power_down(g_msm_ois_t); - pr_err("ois_power_store : power down \n"); - break; - case '1' : - rc = msm_ois_power_up(g_msm_ois_t); - if (rc == 0) { - msm_ois_fw_update(g_msm_ois_t, 1); - msm_ois_read_status(g_msm_ois_t); - } - pr_err("ois_power_store : power up rc[%d]\n", rc); - break; - default: - break; - } - } - return size; -} - - -static ssize_t sysfs_ois_force_fw_load(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) -{ - if((g_msm_ois_t->i2c_client.client==NULL)&&(g_msm_ois_t->pdev==NULL)) - return size; - - if (g_msm_ois_t->is_camera_run || g_msm_ois_t->ois_state != OIS_POWER_DOWN) - return size; - - switch (buf[0]) { - case '1' : - g_msm_ois_t->fw_info.is_loaded = false; - g_msm_ois_t->fw_info.force_phone = true; - msm_ois_load_fw(g_msm_ois_t); - pr_err("load phone fw force 1\n"); - break; - case '2' : - g_msm_ois_t->fw_info.is_loaded = false; - g_msm_ois_t->fw_info.force_test = true; - msm_ois_load_fw(g_msm_ois_t); - pr_err("load phone fw force 2\n"); - break; - default: - break; - } - return size; -} - - -char ois_debug[40] = "NULL NULL NULL\n"; -static ssize_t ois_exif_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] ois_debug : %s\n", ois_debug); - return snprintf(buf, sizeof(ois_debug), "%s", ois_debug); -} - -static ssize_t ois_exif_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf: %s\n", buf); - snprintf(ois_debug, sizeof(ois_debug), "%s", buf); - - return size; -} - - -static DEVICE_ATTR(selftest, S_IRUGO, gyro_selftest_show, NULL); -static DEVICE_ATTR(ois_diff, S_IRUGO, ois_hall_cal_test_show, NULL); -static DEVICE_ATTR(ois_rawdata, S_IRUGO, gyro_rawdata_test_show, NULL); -static DEVICE_ATTR(ois_power, S_IWUGO, NULL, ois_power_store); -static DEVICE_ATTR(oisfw, S_IRUGO|S_IWUSR|S_IWGRP, ois_fw_full_show, ois_fw_full_store); -static DEVICE_ATTR(ois_exif, S_IRUGO|S_IWUSR|S_IWGRP, ois_exif_show, ois_exif_store); -static DEVICE_ATTR(load_fw, S_IWUGO, NULL, sysfs_ois_force_fw_load); - - -static int __init msm_ois_init_module(void) -{ - int32_t rc = 0; - struct device *cam_ois; - - CDBG_I("Enter\n"); - - if (!IS_ERR(camera_class)) { //for sysfs - cam_ois = device_create(camera_class, NULL, 0, NULL, "ois"); - if (IS_ERR(cam_ois)) { - pr_err("Failed to create device(ois) in camera_class!\n"); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_power) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_power.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_selftest) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_selftest.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_diff) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_diff.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_rawdata) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_rawdata.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_oisfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_oisfw.attr.name); - rc = -ENODEV; - } - if (device_create_file(cam_ois, &dev_attr_ois_exif) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_ois_exif.attr.name); - rc = -ENODEV; - } - - if (device_create_file(cam_ois, &dev_attr_load_fw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_load_fw.attr.name); - rc = -ENODEV; - } - - - } else { - pr_err("Failed to create device(ois) because of no camera class!\n"); - rc = -EINVAL; - } - - rc = platform_driver_probe(&msm_ois_platform_driver, - msm_ois_platform_probe); - if (rc < 0) { - pr_err("%s:%d failed platform driver probe rc %d\n", - __func__, __LINE__, rc); - } else { - CDBG("%s:%d platform_driver_probe rc %d\n", __func__, __LINE__, rc); - } - rc = i2c_add_driver(&msm_ois_i2c_driver); - if (rc < 0) - pr_err("%s:%d failed i2c driver probe rc %d\n", - __func__, __LINE__, rc); - else - CDBG("%s:%d i2c_add_driver rc %d\n", __func__, __LINE__, rc); - - return rc; -} - -module_init(msm_ois_init_module); -MODULE_DESCRIPTION("MSM OIS"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.h b/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.h deleted file mode 100755 index 967cf6f165d3..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/external/msm_ois.h +++ /dev/null @@ -1,225 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_OIS_H -#define MSM_OIS_H - -#include -#include -#include -#include -#include -#include -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_OIS_MAX_VREGS (10) -#define NUM_OIS_VERSION_STR (6) - -enum msm_ois_state_t { - OIS_POWER_UP, - OIS_POWER_DOWN, -}; - - -struct msm_ois_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_OIS_MAX_VREGS]; - int num_vreg; -}; - -struct msm_ois_ver_t { - uint8_t core_ver; - uint8_t gyro_sensor; - uint8_t driver_ic; - uint8_t year; - uint8_t month; - uint8_t iteration_1; - uint8_t iteration_0; -}; - -struct msm_ois_debug_t { - int err_reg; - int status_reg; - char phone_ver[NUM_OIS_VERSION_STR+1]; - char module_ver[NUM_OIS_VERSION_STR+1]; - char cal_ver[NUM_OIS_VERSION_STR+1]; -}; - -enum msm_ois_modes{ - OIS_MODE_OFF = 1, - OIS_MODE_ON = 2, - OIS_MODE_ON_STILL = 3, - OIS_MODE_ON_ZOOM = 4, - OIS_MODE_ON_VIDEO = 5, - OIS_MODE_SINE_X = 6, - OIS_MODE_SINE_Y = 7, - OIS_MODE_CENTERING = 8, - OIS_MODE_MAX, -}; - -typedef struct __msm_ois_fw_info { - bool is_loaded; - bool force_phone; - bool force_test; - u8 *phone_fw; - u8 *module_fw; - u8 *load_fw; - - u16 shift_offset; - u16 shift_data_size; - u16 shift_chksum_offset; - - u16 fw_offset; //Set F/W Offset - u16 fw_data_size; - u16 fw_chksum_offset; - - u16 cal_offset; - u16 cal_data_size; - u16 cal_chksum_offset; - - u16 fa_fw_offset; //Factory F/W Offset - u16 fa_fw_data_size; - u16 fa_fw_chksum_offset; - - - struct msm_ois_ver_t phone_ver; - struct msm_ois_ver_t module_ver; - struct msm_ois_cal_info_t cal_info; - bool is_phone_fw; - char load_fw_name[256]; -} msm_ois_fw_info_t; - -struct msm_ois_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct device *dev; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t ois_device_type; - struct msm_sd_subdev msm_sd; - enum af_camera_name cam_name; - struct mutex *ois_mutex; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *ois_v4l2_subdev_ops; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_ois_state_t ois_state; - enum msm_camera_i2c_data_type i2c_data_type; - enum msm_ois_modes ois_mode; - struct msm_ois_vreg vreg_cfg; - struct msm_camera_gpio_conf *gpio_conf; - msm_ois_fw_info_t fw_info; - bool is_camera_run; - bool is_set_debug_info; - struct msm_ois_debug_t debug_info; - int ois_en; - int ois_reset; - struct msm_pinctrl_info pinctrl_info; - uint8_t pinctrl_status; -}; - - -#define OIS_PINCTRL_STATE_DEFAULT "ois_default" -#define OIS_PINCTRL_STATE_SLEEP "ois_suspend" - -/*SAMSUNG ELECTRONICS FIRMWARE*/ -#define MSM_OIS_SE_FW_PATH "/system/etc/firmware/ois_SE_BU24219.bin" -/*SELF PRODUCTION FIRMWARE*/ -#define MSM_OIS_SP_FW_PATH "/system/etc/firmware/ois_SP_BU24219.bin" - -#define MSM_MAX_OIS_SIZE (64 * 1024) - -#define I2C_RETRY_COUNT 3 - -#define MODULE_OIS_TOTAL_SIZE 0x1800 -#define MODULE_OIS_START_ADDR 0x2000 - -#define MODULE_OIS_HDR_OFFSET 0x0000 -#define MODULE_OIS_HDR_CHK_SUM_OFFSET 0x00FC - -#define MODULE_OIS_CAL_DATA_OFFSET 0x0100 -#define MODULE_OIS_CAL_DATA_CHK_SUM_OFFSET 0x019C -#define MODULE_OIS_CAL_DATA_MAP_SIZE 0x0060 - -#define MODULE_OIS_SHIFT_DATA_OFFSET 0x01A0 -#define MODULE_OIS_SHIFT_DATA_CHK_SUM_OFFSET 0x01FC -#define MODULE_OIS_SHIFT_DATA_SIZE 0x0030 - -#define MODULE_OIS_FW_OFFSET 0x0200 -#define MODULE_OIS_FW_CHK_SUM_OFFSET 0x05FC -#define MODULE_OIS_FW_MAP_SIZE 0x03FC - -#define MODULE_OIS_FW_FACTORY_OFFSET 0x0600 -#define MODULE_OIS_FW_FACTORY_CHK_SUM_OFFSET 0x17FC -#define MODULE_OIS_FW_FACTORY_MAP_SIZE 0x11FC - - -#define PHONE_OIS_TOTAL_SIZE 0x3000 -#define PHONE_OIS_START_ADDR 0x0000 - -#define PHONE_OIS_HDR_OFFSET 0x0000 -#define PHONE_OIS_HDR_CHK_SUM_OFFSET 0xFFFF - -#define PHONE_OIS_CAL_DATA_OFFSET 0x0080 -#define PHONE_OIS_CAL_DATA_CHK_SUM_OFFSET 0xFFFF -#define PHONE_OIS_CAL_DATA_MAP_SIZE 0x0060 - -#define PHONE_OIS_SHIFT_DATA_OFFSET 0xFFFF -#define PHONE_OIS_SHIFT_DATA_CHK_SUM_OFFSET 0xFFFF -#define PHONE_OIS_SHIFT_DATA_SIZE 0xFFFF - -#define PHONE_OIS_FW_OFFSET 0x0100 -#define PHONE_OIS_FW_CHK_SUM_OFFSET 0x04FC -#define PHONE_OIS_FW_MAP_SIZE 0x03FC - -#define PHONE_OIS_FW_FACTORY_OFFSET 0x0500 -#define PHONE_OIS_FW_FACTORY_CHK_SUM_OFFSET 0x16FC -#define PHONE_OIS_FW_FACTORY_MAP_SIZE 0x11FC - - -#define OIS_SET_FW_D1_OFFSET_ADDR_OFFSET 0x04 -#define OIS_SET_FW_D1_SIZE_ADDR_OFFSET 0x06 -#define OIS_SET_FW_D1_TARGET_ADDR_OFFSET 0x08 - -#define OIS_SET_FW_D2_OFFSET_ADDR_OFFSET 0x0A -#define OIS_SET_FW_D2_SIZE_ADDR_OFFSET 0x0C -#define OIS_SET_FW_D2_TARGET_ADDR_OFFSET 0x0E - -#define OIS_SET_FW_D3_OFFSET_ADDR_OFFSET 0x10 -#define OIS_SET_FW_D3_SIZE_ADDR_OFFSET 0x12 -#define OIS_SET_FW_D3_TARGET_ADDR_OFFSET 0x14 - -#define OIS_CAL_DATA_OFFSET_OFFSET 0x04 -#define OIS_CAL_DATA_SIZE_OFFSET 0x06 -#define OIS_CAL_DATA_TRGT_ADDR_OFFSET 0x08 - - -#define OIS_GYRO_SCALE_FACTOR_V003 262 -#define OIS_GYRO_SCALE_FACTOR_V004 131 - - - -void msm_is_ois_offset_test(long *raw_data_x, long *raw_data_y, bool is_need_cal); -u8 msm_is_ois_self_test(void); - -int msm_ois_i2c_byte_read(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t *data); -int msm_ois_i2c_byte_write(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t data); - -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *a_ctrl); -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *a_ctrl); -static int msm_ois_disable_reset(struct msm_ois_ctrl_t *a_ctrl); - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/Makefile b/drivers/media/platform/msm/camera_v2/sensor/flash/Makefile index 6f6c35ba7284..d4d1540f5490 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/Makefile +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/Makefile @@ -1,3 +1,4 @@ +ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci ccflags-y += -Idrivers/media/platform/msm/camera_v2 ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io obj-$(CONFIG_MSMB_CAMERA) += msm_led_flash.o @@ -6,4 +7,5 @@ obj-$(CONFIG_MSMB_CAMERA) += msm_led_i2c_trigger.o obj-$(CONFIG_MSMB_CAMERA) += adp1660.o obj-$(CONFIG_MSMB_CAMERA) += bd7710.o obj-$(CONFIG_MSMB_CAMERA) += msm_led_torch.o +obj-$(CONFIG_MSMB_CAMERA) += msm_flash.o obj-$(CONFIG_MSMB_CAMERA) += lm3642.o diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/adp1660.c b/drivers/media/platform/msm/camera_v2/sensor/flash/adp1660.c index f57843c6ff2a..7e5a7c27827f 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/adp1660.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/adp1660.c @@ -16,13 +16,8 @@ #define FLASH_NAME "qcom,led-flash" -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) static struct msm_led_flash_ctrl_t fctrl; static struct i2c_driver adp1660_i2c_driver; @@ -31,6 +26,7 @@ static struct msm_camera_i2c_reg_array adp1660_init_array[] = { {0x01, 0x03}, {0x02, 0x0F}, {0x09, 0x28}, + {0x03, 0x09}, }; static struct msm_camera_i2c_reg_array adp1660_off_array[] = { @@ -43,7 +39,7 @@ static struct msm_camera_i2c_reg_array adp1660_release_array[] = { static struct msm_camera_i2c_reg_array adp1660_low_array[] = { {0x08, 0x04}, - {0x06, 0x1E}, + {0x06, 0x28}, {0x01, 0xBD}, {0x0f, 0x01}, }; @@ -52,7 +48,7 @@ static struct msm_camera_i2c_reg_array adp1660_high_array[] = { {0x02, 0x4F}, {0x06, 0x3C}, {0x09, 0x3C}, - {0x0f, 0x03}, + {0x0f, 0x01}, {0x01, 0xBB}, }; @@ -122,11 +118,20 @@ static struct platform_driver adp1660_platform_driver = { static int __init msm_flash_adp1660_init_module(void) { int32_t rc = 0; + rc = platform_driver_register(&adp1660_platform_driver); - if (!rc) + if (fctrl.pdev != NULL && rc == 0) { + pr_err("adp1660 platform_driver_register success"); return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&adp1660_i2c_driver); + } else if (rc != 0) { + pr_err("adp1660 platform_driver_register failed"); + return rc; + } else { + rc = i2c_add_driver(&adp1660_i2c_driver); + if (!rc) + pr_err("adp1660 i2c_add_driver success"); + } + return rc; } static void __exit msm_flash_adp1660_exit_module(void) diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/bd7710.c b/drivers/media/platform/msm/camera_v2/sensor/flash/bd7710.c index 4e18537f9bf7..872dc3f970cb 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/bd7710.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/bd7710.c @@ -14,7 +14,7 @@ #include #include "msm_led_flash.h" -#define FLASH_NAME "rohm-flash,bd7710" +#define FLASH_NAME "qcom,led-flash1" /*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG @@ -58,14 +58,14 @@ static void __exit msm_flash_bd7710_i2c_remove(void) } static const struct of_device_id bd7710_trigger_dt_match[] = { - {.compatible = "rohm-flash,bd7710", .data = &fctrl}, + {.compatible = "qcom,led-flash1", .data = &fctrl}, {} }; MODULE_DEVICE_TABLE(of, bd7710_trigger_dt_match); static const struct i2c_device_id flash_i2c_id[] = { - {"rohm-flash,bd7710", (kernel_ulong_t)&fctrl}, + {"qcom,led-flash1", (kernel_ulong_t)&fctrl}, { } }; @@ -109,7 +109,7 @@ static int msm_flash_bd7710_platform_probe(struct platform_device *pdev) static struct platform_driver bd7710_platform_driver = { .probe = msm_flash_bd7710_platform_probe, .driver = { - .name = "rohm-flash,bd7710", + .name = "qcom,led-flash1", .owner = THIS_MODULE, .of_match_table = bd7710_trigger_dt_match, }, diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/lm3642.c b/drivers/media/platform/msm/camera_v2/sensor/flash/lm3642.c index 9a3237050fec..502b95ade636 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/lm3642.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/lm3642.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -12,14 +12,13 @@ */ #include #include -#include #include "msm_camera_io_util.h" #include "msm_led_flash.h" #define FLASH_NAME "ti,lm3642" -#define CONFIG_LM3642_DEBUG -#ifdef CONFIG_LM3642_DEBUG +#define CONFIG_MSMB_CAMERA_DEBUG +#ifdef CONFIG_MSMB_CAMERA_DEBUG #define LM3642_DBG(fmt, args...) pr_err(fmt, ##args) #else #define LM3642_DBG(fmt, args...) @@ -117,7 +116,7 @@ int msm_flash_lm3642_led_init(struct msm_led_flash_ctrl_t *fctrl) if (rc < 0) pr_err("%s:%d failed\n", __func__, __LINE__); } - return rc; + return 0; } int msm_flash_lm3642_led_release(struct msm_led_flash_ctrl_t *fctrl) @@ -126,14 +125,13 @@ int msm_flash_lm3642_led_release(struct msm_led_flash_ctrl_t *fctrl) struct msm_camera_sensor_board_info *flashdata = NULL; struct msm_camera_power_ctrl_t *power_info = NULL; - if (!fctrl) { + LM3642_DBG("%s:%d called\n", __func__, __LINE__); + if (!fctrl || !fctrl->flashdata) { pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); return -EINVAL; } - flashdata = fctrl->flashdata; power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); gpio_set_value_cansleep( power_info->gpio_conf->gpio_num_info-> @@ -155,14 +153,14 @@ int msm_flash_lm3642_led_off(struct msm_led_flash_ctrl_t *fctrl) struct msm_camera_sensor_board_info *flashdata = NULL; struct msm_camera_power_ctrl_t *power_info = NULL; - if (!fctrl) { + LM3642_DBG("%s:%d called\n", __func__, __LINE__); + + if (!fctrl || !fctrl->flashdata) { pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); return -EINVAL; } - flashdata = fctrl->flashdata; power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); if (fctrl->flash_i2c_client && fctrl->reg_setting) { rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c index 736a212f8cea..f529b0826e25 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2009-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -466,12 +466,12 @@ static int32_t msm_flash_init_prepare( flash_data_k.cfg.flash_init_info = &flash_init_info; if (copy_from_user(&flash_init_info, - (void *)(flash_data->cfg.flash_init_info), - sizeof(struct msm_flash_init_info_t))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } + (void *)(flash_data->cfg.flash_init_info), + sizeof(struct msm_flash_init_info_t))) { + pr_err("%s copy_from_user failed %d\n", + __func__, __LINE__); + return -EFAULT; + } return msm_flash_init(flash_ctrl, &flash_data_k); } #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.c index 86058a9ca7b8..9560c5192cb0 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -14,15 +14,11 @@ #define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ #include "msm_led_flash.h" -#include -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) + +static struct v4l2_file_operations msm_led_flash_v4l2_subdev_fops; static long msm_led_flash_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) @@ -43,6 +39,8 @@ static long msm_led_flash_subdev_ioctl(struct v4l2_subdev *sd, return fctrl->func_tbl->flash_get_subdev_id(fctrl, argp); case VIDIOC_MSM_FLASH_LED_DATA_CFG: return fctrl->func_tbl->flash_led_config(fctrl, argp); + case MSM_SD_NOTIFY_FREEZE: + return 0; case MSM_SD_SHUTDOWN: *(int *)argp = MSM_CAMERA_LED_RELEASE; return fctrl->func_tbl->flash_led_config(fctrl, argp); @@ -86,27 +84,14 @@ int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, void *data) fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; fctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashen-gpio", 0); -#else - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led1-gpio", 0); -#endif - if (fctrl->led_irq_gpio1 < 0) { - pr_err("Fail : can't get led1-gpio\n"); - return -EINVAL; - } -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashtorch-gpio", 0); -#else - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led2-gpio", 0); -#endif - if (fctrl->led_irq_gpio2 < 0) { - pr_err("Fail : can't get led2-gpio\n"); - return -EINVAL; - } - msm_sd_register(&fctrl->msm_sd); + msm_led_flash_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_led_flash_v4l2_subdev_fops.compat_ioctl32 = + msm_led_flash_v4l2_subdev_fops.unlocked_ioctl; +#endif + fctrl->msm_sd.sd.devnode->fops = &msm_led_flash_v4l2_subdev_fops; CDBG("probe success\n"); return 0; } @@ -135,6 +120,9 @@ int32_t msm_led_i2c_flash_create_v4lsubdev(void *data) fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; msm_sd_register(&fctrl->msm_sd); + msm_led_flash_v4l2_subdev_fops = v4l2_subdev_fops; + fctrl->msm_sd.sd.devnode->fops = &msm_led_flash_v4l2_subdev_fops; + CDBG("probe success\n"); return 0; } diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.h b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.h index b9ab59e1df27..9edc6b021032 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.h +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_flash.h @@ -49,24 +49,26 @@ struct msm_led_flash_ctrl_t { struct msm_flash_fn_t *func_tbl; struct msm_camera_sensor_board_info *flashdata; struct msm_led_flash_reg_t *reg_setting; + /* Flash */ const char *flash_trigger_name[MAX_LED_TRIGGERS]; struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; uint32_t flash_num_sources; uint32_t flash_op_current[MAX_LED_TRIGGERS]; uint32_t flash_max_current[MAX_LED_TRIGGERS]; - const char *torch_trigger_name; - struct led_trigger *torch_trigger; - uint32_t torch_op_current; - uint32_t torch_max_current; + uint32_t flash_max_duration[MAX_LED_TRIGGERS]; + /* Torch */ + const char *torch_trigger_name[MAX_LED_TRIGGERS]; + struct led_trigger *torch_trigger[MAX_LED_TRIGGERS]; + uint32_t torch_num_sources; + uint32_t torch_op_current[MAX_LED_TRIGGERS]; + uint32_t torch_max_current[MAX_LED_TRIGGERS]; + void *data; - uint32_t num_sources; enum msm_camera_device_type_t flash_device_type; enum cci_i2c_master_t cci_i2c_master; - enum msm_camera_led_config_t led_state; + enum msm_camera_led_config_t led_state; uint32_t subdev_id; struct msm_pinctrl_info pinctrl_info; - int led_irq_gpio1; - int led_irq_gpio2; }; int msm_flash_i2c_probe(struct i2c_client *client, diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_i2c_trigger.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_i2c_trigger.c index f374ce639341..ef9d2d36d471 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_i2c_trigger.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_i2c_trigger.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -13,7 +13,6 @@ #define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ -#include #include #include "msm_led_flash.h" #include "msm_camera_io_util.h" @@ -27,12 +26,9 @@ #define CAM_FLASH_PINCTRL_STATE_DEFAULT "cam_flash_default" /*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) +static void *g_fctrl; int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, void *arg) { @@ -51,6 +47,7 @@ int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, void *data) { int rc = 0; + int i = 0; struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; CDBG("called led_state %d\n", cfg->cfgtype); @@ -63,6 +60,14 @@ int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, case MSM_CAMERA_LED_INIT: if (fctrl->func_tbl->flash_led_init) rc = fctrl->func_tbl->flash_led_init(fctrl); + for (i = 0; i < MAX_LED_TRIGGERS; i++) { + cfg->flash_current[i] = + fctrl->flash_max_current[i]; + cfg->flash_duration[i] = + fctrl->flash_max_duration[i]; + cfg->torch_current[i] = + fctrl->torch_max_current[i]; + } break; case MSM_CAMERA_LED_RELEASE: @@ -77,11 +82,29 @@ int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, break; case MSM_CAMERA_LED_LOW: + for (i = 0; i < fctrl->torch_num_sources; i++) { + if (fctrl->torch_max_current[i] > 0) { + fctrl->torch_op_current[i] = + (cfg->torch_current[i] < fctrl->torch_max_current[i]) ? + cfg->torch_current[i] : fctrl->torch_max_current[i]; + CDBG("torch source%d: op_current %d max_current %d\n", + i, fctrl->torch_op_current[i], fctrl->torch_max_current[i]); + } + } if (fctrl->func_tbl->flash_led_low) rc = fctrl->func_tbl->flash_led_low(fctrl); break; case MSM_CAMERA_LED_HIGH: + for (i = 0; i < fctrl->flash_num_sources; i++) { + if (fctrl->flash_max_current[i] > 0) { + fctrl->flash_op_current[i] = + (cfg->flash_current[i] < fctrl->flash_max_current[i]) ? + cfg->flash_current[i] : fctrl->flash_max_current[i]; + CDBG("flash source%d: op_current %d max_current %d\n", + i, fctrl->flash_op_current[i], fctrl->flash_max_current[i]); + } + } if (fctrl->func_tbl->flash_led_high) rc = fctrl->func_tbl->flash_led_high(fctrl); break; @@ -95,14 +118,15 @@ int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, static int msm_flash_pinctrl_init(struct msm_led_flash_ctrl_t *ctrl) { struct msm_pinctrl_info *flash_pctrl = NULL; + flash_pctrl = &ctrl->pinctrl_info; - if (flash_pctrl->use_pinctrl != true) { - pr_err("%s: %d PINCTRL is not enables in Flash driver node\n", - __func__, __LINE__); - return 0; - } - flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl->pdev->dev); + if (ctrl->pdev != NULL) + flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl->pdev->dev); + else + flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl-> + flash_i2c_client-> + client->dev); if (IS_ERR_OR_NULL(flash_pctrl->pinctrl)) { pr_err("%s:%d Getting pinctrl handle failed\n", __func__, __LINE__); @@ -139,13 +163,9 @@ int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) flashdata = fctrl->flashdata; power_info = &flashdata->power_info; - fctrl->led_state = MSM_CAMERA_LED_RELEASE; + fctrl->led_state = MSM_CAMERA_LED_RELEASE; if (power_info->gpio_conf->cam_gpiomux_conf_tbl != NULL) { pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - power_info->gpio_conf->cam_gpiomux_conf_tbl, - power_info->gpio_conf->cam_gpiomux_conf_tbl_size); } /* CCI Init */ @@ -170,9 +190,11 @@ int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) __func__, __LINE__); rc = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, fctrl->pinctrl_info.gpio_state_active); - if (rc) + if (rc < 0) { + devm_pinctrl_put(fctrl->pinctrl_info.pinctrl); pr_err("%s:%d cannot set pin to active state", __func__, __LINE__); + } } msleep(20); @@ -201,7 +223,7 @@ int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) if (rc < 0) pr_err("%s:%d failed\n", __func__, __LINE__); } - fctrl->led_state = MSM_CAMERA_LED_INIT; + fctrl->led_state = MSM_CAMERA_LED_INIT; return rc; } @@ -211,21 +233,18 @@ int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) struct msm_camera_sensor_board_info *flashdata = NULL; struct msm_camera_power_ctrl_t *power_info = NULL; + CDBG("%s:%d called\n", __func__, __LINE__); if (!fctrl) { pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); return -EINVAL; } - + flashdata = fctrl->flashdata; + power_info = &flashdata->power_info; if (fctrl->led_state != MSM_CAMERA_LED_INIT) { pr_err("%s:%d invalid led state\n", __func__, __LINE__); return -EINVAL; } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - gpio_set_value_cansleep( power_info->gpio_conf->gpio_num_info-> gpio_num[SENSOR_GPIO_FL_EN], @@ -244,9 +263,11 @@ int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) if (fctrl->pinctrl_info.use_pinctrl == true) { ret = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, fctrl->pinctrl_info.gpio_state_suspend); - if (ret) + if (ret < 0) { + devm_pinctrl_put(fctrl->pinctrl_info.pinctrl); pr_err("%s:%d cannot set pin to suspend state", __func__, __LINE__); + } } rc = msm_camera_request_gpio_table( power_info->gpio_conf->cam_gpio_req_tbl, @@ -256,7 +277,7 @@ int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) return rc; } - fctrl->led_state = MSM_CAMERA_LED_RELEASE; + fctrl->led_state = MSM_CAMERA_LED_RELEASE; /* CCI deInit */ if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( @@ -278,10 +299,15 @@ int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl) pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); return -EINVAL; } + + if (fctrl->led_state != MSM_CAMERA_LED_INIT) { + pr_err("%s:%d invalid led state\n", __func__, __LINE__); + return -EINVAL; + } + flashdata = fctrl->flashdata; power_info = &flashdata->power_info; CDBG("%s:%d called\n", __func__, __LINE__); - if (fctrl->flash_i2c_client && fctrl->reg_setting) { rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( fctrl->flash_i2c_client, @@ -304,6 +330,11 @@ int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl) struct msm_camera_power_ctrl_t *power_info = NULL; CDBG("%s:%d called\n", __func__, __LINE__); + if (fctrl->led_state != MSM_CAMERA_LED_INIT) { + pr_err("%s:%d invalid led state\n", __func__, __LINE__); + return -EINVAL; + } + flashdata = fctrl->flashdata; power_info = &flashdata->power_info; gpio_set_value_cansleep( @@ -335,6 +366,11 @@ int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl) struct msm_camera_power_ctrl_t *power_info = NULL; CDBG("%s:%d called\n", __func__, __LINE__); + if (fctrl->led_state != MSM_CAMERA_LED_INIT) { + pr_err("%s:%d invalid led state\n", __func__, __LINE__); + return -EINVAL; + } + flashdata = fctrl->flashdata; power_info = &flashdata->power_info; gpio_set_value_cansleep( @@ -515,6 +551,57 @@ static int32_t msm_led_get_dt_data(struct device_node *of_node, } } + /* Read the max current for an LED if present */ + if (of_get_property(of_node, "qcom,max-current", &count)) { + count /= sizeof(uint32_t); + + if (count > MAX_LED_TRIGGERS) { + pr_err("failed\n"); + rc = -EINVAL; + goto ERROR8; + } + + fctrl->flash_num_sources = count; + fctrl->torch_num_sources = count; + + rc = of_property_read_u32_array(of_node, + "qcom,max-current", + fctrl->flash_max_current, count); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR8; + } + + for (; count < MAX_LED_TRIGGERS; count++) + fctrl->flash_max_current[count] = 0; + + for (count = 0; count < MAX_LED_TRIGGERS; count++) + fctrl->torch_max_current[count] = + fctrl->flash_max_current[count] >> 1; + } + + /* Read the max duration for an LED if present */ + if (of_get_property(of_node, "qcom,max-duration", &count)) { + count /= sizeof(uint32_t); + + if (count > MAX_LED_TRIGGERS) { + pr_err("failed\n"); + rc = -EINVAL; + goto ERROR8; + } + + rc = of_property_read_u32_array(of_node, + "qcom,max-duration", + fctrl->flash_max_duration, count); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR8; + } + + for (; count < MAX_LED_TRIGGERS; count++) + fctrl->flash_max_duration[count] = 0; + } + flashdata->slave_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL); @@ -593,9 +680,27 @@ static int set_led_status(void *data, u64 val) if (val == 0) { pr_debug("set_led_status: val is disable"); rc = msm_flash_led_off(fctrl); + if (rc < 0) { + pr_err("%s led_off failed line %d\n", __func__, __LINE__); + return rc; + } + rc = msm_flash_led_release(fctrl); + if (rc < 0) { + pr_err("%s led_release failed line %d\n", __func__, __LINE__); + return rc; + } } else { pr_debug("set_led_status: val is enable"); + rc = msm_flash_led_init(fctrl); + if (rc < 0) { + pr_err("%s led_init failed line %d\n", __func__, __LINE__); + return rc; + } rc = msm_flash_led_low(fctrl); + if (rc < 0) { + pr_err("%s led_low failed line %d\n", __func__, __LINE__); + return rc; + } } return rc; @@ -605,6 +710,49 @@ DEFINE_SIMPLE_ATTRIBUTE(ledflashdbg_fops, NULL, set_led_status, "%llu\n"); #endif +static void msm_led_i2c_torch_brightness_set(struct led_classdev *led_cdev, + enum led_brightness value) +{ + struct msm_led_flash_ctrl_t *fctrl = NULL; + + if (g_fctrl == NULL) + return; + + fctrl = (struct msm_led_flash_ctrl_t *) g_fctrl; + + if (value > LED_OFF) { + if (fctrl->func_tbl->flash_led_init) + fctrl->func_tbl->flash_led_init(fctrl); + if (fctrl->func_tbl->flash_led_low) + fctrl->func_tbl->flash_led_low(fctrl); + } else { + if (fctrl->func_tbl->flash_led_off) + fctrl->func_tbl->flash_led_off(fctrl); + if (fctrl->func_tbl->flash_led_release) + fctrl->func_tbl->flash_led_release(fctrl); + } +}; + +static struct led_classdev msm_torch_i2c_led = { + .name = "torch-light0", + .brightness_set = msm_led_i2c_torch_brightness_set, + .brightness = LED_OFF, +}; + +static int32_t msm_i2c_torch_create_classdev(struct device *dev , + void *data) +{ + int rc; + msm_led_i2c_torch_brightness_set(&msm_torch_i2c_led, LED_OFF); + rc = led_classdev_register(dev, &msm_torch_i2c_led); + if (rc) { + pr_err("Failed to register led dev. rc = %d\n", rc); + return rc; + } + + return 0; +}; + int msm_flash_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -634,7 +782,9 @@ int msm_flash_i2c_probe(struct i2c_client *client, return rc; } - msm_flash_pinctrl_init(fctrl); + if (fctrl->pinctrl_info.use_pinctrl == true) + msm_flash_pinctrl_init(fctrl); + if (fctrl->flash_i2c_client != NULL) { fctrl->flash_i2c_client->client = client; if (fctrl->flashdata->slave_info->sensor_slave_addr) @@ -659,6 +809,13 @@ int msm_flash_i2c_probe(struct i2c_client *client, if (!dentry) pr_err("Failed to create the debugfs ledflash file"); #endif + /* Assign Global flash control sturcture for local usage */ + g_fctrl = (void *) fctrl; + rc = msm_i2c_torch_create_classdev(&(client->dev), NULL); + if (rc) { + pr_err("%s failed to create classdev %d\n", __func__, __LINE__); + return rc; + } CDBG("%s:%d probe success\n", __func__, __LINE__); return 0; @@ -676,9 +833,8 @@ int msm_flash_probe(struct platform_device *pdev, struct device_node *of_node = pdev->dev.of_node; struct msm_camera_cci_client *cci_client = NULL; - if (!of_node || !fctrl) { - pr_err("%s of_node is NULL or fctrl is NULL, line %d\n",__func__,__LINE__); - rc = -EFAULT; + if (!of_node) { + pr_err("of_node NULL\n"); goto probe_failure; } fctrl->pdev = pdev; @@ -686,11 +842,12 @@ int msm_flash_probe(struct platform_device *pdev, rc = msm_led_get_dt_data(pdev->dev.of_node, fctrl); if (rc < 0) { pr_err("%s failed line %d rc = %d\n", __func__, __LINE__, rc); - rc = -EFAULT; - goto probe_failure; + return rc; } - msm_flash_pinctrl_init(fctrl); + if (fctrl->pinctrl_info.use_pinctrl == true) + msm_flash_pinctrl_init(fctrl); + /* Assign name for sub device */ snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), "%s", fctrl->flashdata->sensor_name); @@ -709,8 +866,7 @@ int msm_flash_probe(struct platform_device *pdev, if (!fctrl->flash_i2c_client->cci_client) { pr_err("%s failed line %d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; + return rc; } cci_client = fctrl->flash_i2c_client->cci_client; @@ -728,19 +884,18 @@ int msm_flash_probe(struct platform_device *pdev, rc = msm_led_flash_create_v4lsubdev(pdev, fctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - goto probe_failure1; + /* Assign Global flash control sturcture for local usage */ + g_fctrl = (void *)fctrl; + rc = msm_i2c_torch_create_classdev(&(pdev->dev), NULL); + if (rc) { + pr_err("%s failed to create classdev %d\n", __func__, __LINE__); + return rc; } CDBG("%s: probe success\n", __func__); return 0; -probe_failure1: - kfree(fctrl->flash_i2c_client->cci_client); - probe_failure: - - pr_err("%s probe failed\n", __func__); + CDBG("%s probe failed\n", __func__); return rc; } diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_torch.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_torch.c index ff6369634541..bd896c2d677a 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_torch.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_torch.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -29,31 +29,53 @@ static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, led_trigger_event(torch_trigger, value); }; -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, +static struct led_classdev msm_torch_led[MAX_LED_TRIGGERS] = { + { + .name = "torch-light0", + .brightness_set = msm_led_torch_brightness_set, + .brightness = LED_OFF, + }, + { + .name = "torch-light1", + .brightness_set = msm_led_torch_brightness_set, + .brightness = LED_OFF, + }, + { + .name = "torch-light2", + .brightness_set = msm_led_torch_brightness_set, + .brightness = LED_OFF, + }, }; int32_t msm_led_torch_create_classdev(struct platform_device *pdev, void *data) { - int rc; + int32_t i, rc = 0; struct msm_led_flash_ctrl_t *fctrl = (struct msm_led_flash_ctrl_t *)data; - if (!fctrl || !fctrl->torch_trigger) { - pr_err("Invalid fctrl or torch trigger\n"); + if (!fctrl) { + pr_err("Invalid fctrl\n"); return -EINVAL; } - torch_trigger = fctrl->torch_trigger; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); + for (i = 0; i < fctrl->torch_num_sources; i++) { + if (fctrl->torch_trigger[i]) { + torch_trigger = fctrl->torch_trigger[i]; + msm_led_torch_brightness_set(&msm_torch_led[i], + LED_OFF); - rc = led_classdev_register(&pdev->dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; + rc = led_classdev_register(&pdev->dev, + &msm_torch_led[i]); + if (rc) { + pr_err("Failed to register %d led dev. rc = %d\n", + i, rc); + return rc; + } + } else { + pr_err("Invalid fctrl->torch_trigger[%d]\n", i); + return -EINVAL; + } } return 0; diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_trigger.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_trigger.c index eea8bbe179fd..ee4e6543bf5a 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_trigger.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_led_trigger.c @@ -14,74 +14,18 @@ #define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ #include -#include -#if defined(CONFIG_FLED_SM5701) -#include -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -#include -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) -#include -#endif -#ifdef CONFIG_FLED_SM5703 -#include -#endif #include "msm_led_flash.h" #define FLASH_NAME "camera-led-flash" -#if defined(CONFIG_FLED_LM3632) -extern void ssflash_led_turn_on(void); -extern void ssflash_led_turn_off(void); -#endif -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -extern int system_rev; - - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) extern int32_t msm_led_torch_create_classdev( struct platform_device *pdev, void *data); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -extern void rt5033_fled_strobe_critial_section_lock(struct rt_fled_info *fled_info); -extern void rt5033_fled_strobe_critial_section_unlock(struct rt_fled_info *fled_info); -extern bool assistive_light; -#endif - -#if defined(CONFIG_FLED_SM5701) -extern bool assistive_light; -#endif - -#ifdef CONFIG_FLED_SM5703_EXT_GPIO -extern bool assistive_light; -extern int32_t sm5703_fled_notification(struct sm_fled_info *info); -static int led_prev_mode = 0; -#if defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_MACH_J3LTE_CHN_CTC) || defined(CONFIG_MACH_J3LTE_CHN_TW)|| defined(CONFIG_MACH_J3LTE_KOR_OPEN) -extern int32_t sm5703_fled_set_preflash(struct sm_fled_info *info); -#endif -#endif static enum flash_type flashtype; static struct msm_led_flash_ctrl_t fctrl; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -static bool lock_state = false; -#endif - -#if defined(CONFIG_LEDS_SM5705) -extern int sm5705_fled_led_off(unsigned char index); -extern int sm5705_fled_torch_on(unsigned char index); -extern int sm5705_fled_flash_on(unsigned char index); -#endif static int32_t msm_led_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, void *arg) @@ -96,500 +40,90 @@ static int32_t msm_led_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, return 0; } -#if defined(CONFIG_LEDS_SM5705) -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - //uint32_t i; - - pr_err("[%s] flash type[%d]E\n", __func__, cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - sm5705_fled_led_off(0); - break; - case MSM_CAMERA_LED_PREFLASH: - case MSM_CAMERA_LED_LOW: - sm5705_fled_torch_on(0); - break; - case MSM_CAMERA_LED_HIGH: - sm5705_fled_flash_on(0); - break; - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - pr_err("soumyadarshi INIT flash do nothing\n"); - sm5705_fled_led_off(0); - break; - default: - break; - } - return rc; -} -#elif defined(CONFIG_FLED_SM5703) && defined(CONFIG_FRONT_FLASH) -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - int flash_id = 0; - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); - - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - - pr_err("[CAM_LED]FLASH ID:%d\n", cfg->torch_current); - switch (cfg->torch_current) { - case 0: - flash_id = BACK_CAMERA_B; - break; - - case 1: - flash_id = FRONT_CAMERA_B; - break; - - case 3: - flash_id = 4; //INIT&RELEASE - break; - - default: - pr_err("[CAM_LED]default is back:%d\n", cfg->torch_current); - flash_id = 0; - break; - } - - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - pr_err("[CAM_LED]LED STATE OFF.\n"); - if(flash_id == FRONT_CAMERA_B){ -#if defined(CONFIG_FLED_KTD2692) && defined(CONFIG_FLED_LM3632) - if(system_rev < 5){ - pr_err("ssflaash led turn on msm_led_trigger\n"); - ssflash_led_turn_off(); - }else{ - ktd2692_flash_on(0); - CDBG("Ktd2692 led turn on msm_led_trigger\n"); - } - break; -#elif !defined(CONFIG_FLED_KTD2692) && defined(CONFIG_FLED_LM3632) - pr_err("ssflaash led turn on msm_led_trigger\n"); - ssflash_led_turn_off(); - break; -#endif -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(0); - break; -#endif - }else if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; - } - - case MSM_CAMERA_LED_LOW: - pr_err("[CAM_LED]LED STATE LOW.\n"); - if (flash_id == FRONT_CAMERA_B) { -#if defined(CONFIG_FLED_KTD2692) && defined(CONFIG_FLED_LM3632) - if(system_rev < 5){ - ssflash_led_turn_on(); - }else{ - ktd2692_flash_on(1); - } - break; -#elif !defined(CONFIG_FLED_KTD2692) && defined(CONFIG_FLED_LM3632) - ssflash_led_turn_on(); - break; -#endif -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(1); - break; -#endif - }else if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; - } - - case MSM_CAMERA_LED_HIGH: - pr_err("[CAM_LED]LED STATE HIGH.\n"); - if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; - } - - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - CDBG("[CAM_LED]LED STATE INIT/RELEASE.\n"); - if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } else if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif - } - else if(flash_id == FRONT_CAMERA_B){ -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(0); -#endif - } - break; - - default: - pr_err("[CAM_LED]LED STATE error!\n"); - rc = -EFAULT; - break; - - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -#else static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, void *data) { int rc = 0; struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; uint32_t i; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - rt_fled_info_t *fled_info = rt_fled_get_info_by_name(NULL); -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); -#endif -#if 0 uint32_t curr_l, max_curr_l; -#endif CDBG("called led_state %d\n", cfg->cfgtype); if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); + pr_err("failed\n"); return -EINVAL; } switch (cfg->cfgtype) { case MSM_CAMERA_LED_OFF: - pr_err("MSM_CAMERA_LED_OFF\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - break; -#if 0 - for (i = 0; i < fctrl->num_sources; i++) + /* Flash off */ + for (i = 0; i < fctrl->flash_num_sources; i++) if (fctrl->flash_trigger[i]) led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) && (defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_MACH_J3LTE_CHN_CTC)|| defined(CONFIG_MACH_J3LTE_CHN_TW)|| defined(CONFIG_MACH_J3LTE_KOR_OPEN)) - case MSM_CAMERA_LED_PREFLASH: - pr_err("MSM_CAMERA_LED_PRELFASH\n"); - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - sm5703_fled_set_preflash(fled_info); - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); + /* Torch off */ + for (i = 0; i < fctrl->torch_num_sources; i++) + if (fctrl->torch_trigger[i]) + led_trigger_event(fctrl->torch_trigger[i], 0); break; -#endif - case MSM_CAMERA_LED_LOW: - pr_err("MSM_CAMERA_LED_LOW\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(MOVIE_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_MOVIE); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; -#if 0 - if (fctrl->torch_trigger) { - max_curr_l = fctrl->torch_max_current; - if (cfg->torch_current > 0 && - cfg->torch_current < max_curr_l) { - curr_l = cfg->torch_current; - } else { - curr_l = fctrl->torch_op_current; - pr_debug("LED current clamped to %d\n", - curr_l); + case MSM_CAMERA_LED_LOW: + for (i = 0; i < fctrl->torch_num_sources; i++) + if (fctrl->torch_trigger[i]) { + max_curr_l = fctrl->torch_max_current[i]; + if (cfg->torch_current[i] >= 0 && + cfg->torch_current[i] < max_curr_l) { + curr_l = cfg->torch_current[i]; + } else { + curr_l = fctrl->torch_op_current[i]; + pr_debug("LED torch %d clamped %d\n", + i, curr_l); + } + led_trigger_event(fctrl->torch_trigger[i], + curr_l); } - led_trigger_event(fctrl->torch_trigger, - curr_l); - } break; -#endif case MSM_CAMERA_LED_HIGH: - pr_err("MSM_CAMERA_LED_HIGH\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - rt5033_fled_strobe_critial_section_lock(fled_info); - lock_state = true; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } + /* Torch off */ + for (i = 0; i < fctrl->torch_num_sources; i++) + if (fctrl->torch_trigger[i]) + led_trigger_event(fctrl->torch_trigger[i], 0); -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(FLASH_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_FLASH); -#else - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; -#if 0 - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - for (i = 0; i < fctrl->num_sources; i++) + for (i = 0; i < fctrl->flash_num_sources; i++) if (fctrl->flash_trigger[i]) { max_curr_l = fctrl->flash_max_current[i]; - if (cfg->flash_current[i] > 0 && + if (cfg->flash_current[i] >= 0 && cfg->flash_current[i] < max_curr_l) { curr_l = cfg->flash_current[i]; } else { curr_l = fctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr_l); + pr_debug("LED flash %d clamped %d\n", + i, curr_l); } led_trigger_event(fctrl->flash_trigger[i], curr_l); } break; -#endif + case MSM_CAMERA_LED_INIT: case MSM_CAMERA_LED_RELEASE: - CDBG("MSM_CAMERA_LED_INIT\n"); -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) - - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - for (i = 0; i < fctrl->num_sources; i++) + /* Flash off */ + for (i = 0; i < fctrl->flash_num_sources; i++) if (fctrl->flash_trigger[i]) led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); + /* Torch off */ + for (i = 0; i < fctrl->torch_num_sources; i++) + if (fctrl->torch_trigger[i]) + led_trigger_event(fctrl->torch_trigger[i], 0); break; + default: - pr_err("LED state error!\n"); rc = -EFAULT; break; } CDBG("flash_set_led_state: return %d\n", rc); return rc; } -#endif static const struct of_device_id msm_led_trigger_dt_match[] = { {.compatible = "qcom,camera-led-flash"}, @@ -622,7 +156,8 @@ static int32_t msm_led_trigger_probe(struct platform_device *pdev) } fctrl.pdev = pdev; - fctrl.num_sources = 0; + fctrl.flash_num_sources = 0; + fctrl.torch_num_sources = 0; rc = of_property_read_u32(of_node, "cell-index", &pdev->id); if (rc < 0) { @@ -638,26 +173,31 @@ static int32_t msm_led_trigger_probe(struct platform_device *pdev) return -EINVAL; } + /* Flash source */ if (of_get_property(of_node, "qcom,flash-source", &count)) { count /= sizeof(uint32_t); - CDBG("count %d\n", count); + CDBG("qcom,flash-source count %d\n", count); if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); + pr_err("invalid count qcom,flash-source %d\n", count); return -EINVAL; } - fctrl.num_sources = count; - for (i = 0; i < count; i++) { + fctrl.flash_num_sources = count; + for (i = 0; i < fctrl.flash_num_sources; i++) { flash_src_node = of_parse_phandle(of_node, "qcom,flash-source", i); if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); + pr_err("flash_src_node %d NULL\n", i); continue; } rc = of_property_read_string(flash_src_node, "linux,default-trigger", &fctrl.flash_trigger_name[i]); - if (rc < 0) { + + rc_1 = of_property_read_string(flash_src_node, + "qcom,default-led-trigger", + &fctrl.flash_trigger_name[i]); + if ((rc < 0) && (rc_1 < 0)) { pr_err("default-trigger: read failed\n"); of_node_put(flash_src_node); continue; @@ -696,59 +236,75 @@ static int32_t msm_led_trigger_probe(struct platform_device *pdev) temp = fctrl.flash_trigger[i]; } - /* Torch source */ - flash_src_node = of_parse_phandle(of_node, "qcom,torch-source", - 0); - if (flash_src_node) { + } + /* Torch source */ + if (of_get_property(of_node, "qcom,torch-source", &count)) { + count /= sizeof(uint32_t); + CDBG("qcom,torch-source count %d\n", count); + if (count > MAX_LED_TRIGGERS) { + pr_err("invalid count qcom,torch-source %d\n", count); + return -EINVAL; + } + fctrl.torch_num_sources = count; + + for (i = 0; i < fctrl.torch_num_sources; i++) { + flash_src_node = of_parse_phandle(of_node, + "qcom,torch-source", i); + if (!flash_src_node) { + pr_err("torch_src_node %d NULL\n", i); + continue; + } + rc = of_property_read_string(flash_src_node, "linux,default-trigger", - &fctrl.torch_trigger_name); - if (rc < 0) { + &fctrl.torch_trigger_name[i]); + + rc_1 = of_property_read_string(flash_src_node, + "qcom,default-led-trigger", + &fctrl.torch_trigger_name[i]); + if ((rc < 0) && (rc_1 < 0)) { pr_err("default-trigger: read failed\n"); - goto torch_failed; + of_node_put(flash_src_node); + continue; } CDBG("default trigger %s\n", - fctrl.torch_trigger_name); + fctrl.torch_trigger_name[i]); if (flashtype == GPIO_FLASH) { /* use fake current */ - fctrl.torch_op_current = LED_HALF; - if (temp) - fctrl.torch_trigger = temp; - else - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); + fctrl.torch_op_current[i] = LED_HALF; } else { rc = of_property_read_u32(flash_src_node, "qcom,current", - &fctrl.torch_op_current); + &fctrl.torch_op_current[i]); rc_1 = of_property_read_u32(flash_src_node, "qcom,max-current", - &fctrl.torch_max_current); - + &fctrl.torch_max_current[i]); if ((rc < 0) || (rc_1 < 0)) { pr_err("current: read failed\n"); - goto torch_failed; + of_node_put(flash_src_node); + continue; } - - CDBG("torch max_current %d\n", - fctrl.torch_op_current); - - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); } -torch_failed: + of_node_put(flash_src_node); + + CDBG("torch max_current[%d] %d\n", + i, fctrl.torch_op_current[i]); + + led_trigger_register_simple(fctrl.torch_trigger_name[i], + &fctrl.torch_trigger[i]); + + if (flashtype == GPIO_FLASH) + if (temp && !fctrl.torch_trigger[i]) + fctrl.torch_trigger[i] = temp; } } rc = msm_led_flash_create_v4lsubdev(pdev, &fctrl); - if (!rc) { + if (!rc) msm_led_torch_create_classdev(pdev, &fctrl); - } return rc; } @@ -768,25 +324,7 @@ static struct msm_flash_fn_t msm_led_trigger_func_tbl = { static struct msm_led_flash_ctrl_t fctrl = { .func_tbl = &msm_led_trigger_func_tbl, }; -#if defined(CONFIG_FLED_SM5703) -int set_led_flash(int mode) -{ - struct msm_camera_led_cfg_t cfg; - int rc = 0; - cfg.cfgtype = mode; - if (led_prev_mode && mode) - return -1; - - rc = msm_led_trigger_config(&fctrl, &mode); - - if (rc == 0) - led_prev_mode = mode; - - return rc; -} -EXPORT_SYMBOL(set_led_flash); -#endif module_init(msm_led_trigger_add_driver); MODULE_DESCRIPTION("LED TRIGGER FLASH"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/gc0339.c b/drivers/media/platform/msm/camera_v2/sensor/gc0339.c deleted file mode 100644 index bada8365fc4c..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/gc0339.c +++ /dev/null @@ -1,704 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" - - -#define GC0339_SENSOR_NAME "gc0339" -DEFINE_MSM_MUTEX(gc0339_mut); - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl; - -static struct msm_sensor_power_setting gc0339_power_setting[] = { - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info gc0339_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_gc0339_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0339_s_ctrl); -} - -static const struct i2c_device_id gc0339_i2c_id[] = { - {GC0339_SENSOR_NAME, (kernel_ulong_t)&gc0339_s_ctrl}, - { } -}; - -static struct i2c_driver gc0339_i2c_driver = { - .id_table = gc0339_i2c_id, - .probe = msm_gc0339_i2c_probe, - .driver = { - .name = GC0339_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0339_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -int32_t gc0339_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - gpio_conf->cam_gpiomux_conf_tbl, - gpio_conf->cam_gpiomux_conf_tbl_size); - } - - rc = msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - for (index = 0; index < power_setting_array->size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= - power_info->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - power_info->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - power_info->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - pr_debug("%s:%d gpio set val %d\n", __func__, __LINE__, - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x10, MSM_CAMERA_I2C_BYTE_DATA); - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) { - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - goto power_up_failed; - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - return rc; -} - -int32_t gc0339_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x01, MSM_CAMERA_I2C_BYTE_DATA); - - for (index = (power_setting_array->size - 1); index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - CDBG("%s exit\n", __func__); - return 0; -} - -int32_t gc0339_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.addr_type == MSM_CAMERA_I2C_WORD_ADDR - || conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA - || !conf_array.size) - break; - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static struct msm_sensor_fn_t gc0339_sensor_fn_t = { - .sensor_power_up = gc0339_power_up, - .sensor_power_down = gc0339_power_down, - .sensor_match_id = gc0339_match_id, - .sensor_config = gc0339_config, -}; - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl = { - .sensor_i2c_client = &gc0339_sensor_i2c_client, - .power_setting_array.power_setting = gc0339_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0339_power_setting), - .msm_sensor_mutex = &gc0339_mut, - .sensor_v4l2_subdev_info = gc0339_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0339_subdev_info), - .func_tbl = &gc0339_sensor_fn_t, -}; - -static const struct of_device_id gc0339_dt_match[] = { - {.compatible = "shinetech,gc0339", .data = &gc0339_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0339_dt_match); - -static struct platform_driver gc0339_platform_driver = { - .driver = { - .name = "shinetech,gc0339", - .owner = THIS_MODULE, - .of_match_table = gc0339_dt_match, - }, -}; - -static int32_t gc0339_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(gc0339_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init gc0339_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&gc0339_platform_driver, - gc0339_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&gc0339_i2c_driver); -} - -static void __exit gc0339_exit_module(void) -{ - if (gc0339_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0339_s_ctrl); - platform_driver_unregister(&gc0339_platform_driver); - } else - i2c_del_driver(&gc0339_i2c_driver); - return; -} - -module_init(gc0339_init_module); -module_exit(gc0339_exit_module); -MODULE_DESCRIPTION("gc0339"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/hi256.c b/drivers/media/platform/msm/camera_v2/sensor/hi256.c deleted file mode 100644 index d19f11344230..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/hi256.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define HI256_SENSOR_NAME "hi256" -#define PLATFORM_DRIVER_NAME "msm_camera_hi256" - -//#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(hi256_mut); -static struct msm_sensor_ctrl_t hi256_s_ctrl; - -static struct msm_sensor_power_setting hi256_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_uxga_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x0a}, - {0x22, 0x00}, - {0x23, 0x0a}, - {0x40, 0x01}, - {0x41, 0x68}, - {0x42, 0x00}, - {0x43, 0x12}, - {0x03, 0x10}, - {0x3f, 0x00}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0xfd}, - {0x03, 0x00}, - {0x10, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x0c}, - {0x31, 0x80}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_start_settings[] = { - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_stop_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, -}; - -static struct msm_camera_i2c_reg_conf hi256_recommend_settings[] = { - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - - {0x08, 0x0f}, - {0x0a, 0x00}, - - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - - {0x03, 0x00}, - {0x10, 0x13}, - {0x11, 0x90}, /* no H/V flip */ - {0x12, 0x00}, - {0x0b, 0xaa}, - {0x0c, 0xaa}, - {0x0d, 0xaa}, - {0x20, 0x00}, - {0x21, 0x06}, - {0x22, 0x00}, - {0x23, 0x05}, - {0x24, 0x04}, - {0x25, 0xb0}, - {0x26, 0x06}, - {0x27, 0x40}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x45, 0x04}, - {0x46, 0x18}, - {0x47, 0xd8}, - {0x80, 0x2e}, - {0x81, 0x7e}, - {0x82, 0x90}, - {0x83, 0x00}, - {0x84, 0x0c}, - {0x85, 0x00}, - {0x90, 0x0c}, - {0x91, 0x0c}, - {0x92, 0x78}, - {0x93, 0x70}, - {0x94, 0xff}, - {0x95, 0xff}, - {0x96, 0xdc}, - {0x97, 0xfe}, - {0x98, 0x38}, - {0xa0, 0x45}, - {0xa2, 0x45}, - {0xa4, 0x45}, - {0xa6, 0x45}, - {0xa8, 0x45}, - {0xaa, 0x45}, - {0xac, 0x45}, - {0xae, 0x45}, - {0x99, 0x43}, - {0x9a, 0x43}, - {0x9b, 0x43}, - {0x9c, 0x43}, - {0x03, 0x02}, - {0x12, 0x03}, - {0x13, 0x03}, - {0x15, 0x00}, - {0x16, 0x00}, - {0x17, 0x8C}, - {0x18, 0x4c}, - {0x19, 0x00}, - {0x1a, 0x39}, - {0x1c, 0x09}, - {0x1d, 0x40}, - {0x1e, 0x30}, - {0x1f, 0x10}, - {0x20, 0x77}, - {0x21, 0x6d}, - {0x22, 0x77}, - {0x23, 0x30}, - {0x24, 0x77}, - {0x27, 0x3c}, - {0x2b, 0x80}, - {0x2e, 0x00}, - {0x2f, 0x00}, - {0x30, 0x05}, - {0x50, 0x20}, - {0x52, 0x01}, - {0x53, 0xc1}, - {0x55, 0x1c}, - {0x56, 0x11}, - {0x58, 0x22}, - {0x59, 0x20}, - {0x5d, 0xa2}, - {0x5e, 0x5a}, - {0x60, 0x87}, - {0x61, 0x99}, - {0x62, 0x88}, - {0x63, 0x97}, - {0x64, 0x88}, - {0x65, 0x97}, - {0x67, 0x0c}, - {0x68, 0x0c}, - {0x69, 0x0c}, - {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}, - {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}, - {0xd4, 0x0c}, - {0xd5, 0x0c}, - {0xd6, 0x78}, - {0xd7, 0x70}, - {0xe0, 0xc4}, - {0xe1, 0xc4}, - {0xe2, 0xc4}, - {0xe3, 0xc4}, - {0xe4, 0x00}, - {0xe8, 0x80}, - {0xe9, 0x40}, - {0xea, 0x7f}, - {0xf0, 0xc1}, - {0xf1, 0xc1}, - {0xf2, 0xc1}, - {0xf3, 0xc1}, - {0xf4, 0xc1}, - {0x03, 0x03}, - {0x10, 0x10}, - {0x03, 0x10}, - {0x10, 0x03}, - {0x12, 0x30}, - {0x13, 0x02}, - {0x20, 0x00}, - {0x30, 0x00}, - {0x31, 0x00}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x30}, - {0x35, 0x00}, - {0x36, 0x00}, - {0x38, 0x00}, - {0x3e, 0x58}, - {0x3f, 0x00}, - {0x40, 0x80}, - {0x41, 0x00}, - {0x48, 0x95}, - {0x60, 0x67}, - {0x61, 0x88}, - {0x62, 0x90}, - {0x63, 0x50}, - {0x64, 0x41}, - {0x66, 0x42}, - {0x67, 0x20}, - {0x6a, 0x71}, - {0x6b, 0x84}, - {0x6c, 0x72}, - {0x6d, 0x83}, - {0x03, 0x11}, - {0x10, 0x7f}, - {0x11, 0x40}, - {0x12, 0x0a}, - {0x13, 0xbb}, - {0x26, 0x31}, - {0x27, 0x34}, - {0x28, 0x0f}, - {0x29, 0x10}, - {0x2b, 0x30}, - {0x2c, 0x32}, - {0x30, 0x70}, - {0x31, 0x10}, - {0x32, 0x58}, - {0x33, 0x09}, - {0x34, 0x06}, - {0x35, 0x03}, - {0x36, 0x70}, - {0x37, 0x18}, - {0x38, 0x58}, - {0x39, 0x09}, - {0x3a, 0x06}, - {0x3b, 0x03}, - {0x3c, 0x80}, - {0x3d, 0x18}, - {0x3e, 0x80}, - {0x3f, 0x0c}, - {0x40, 0x05}, - {0x41, 0x06}, - {0x42, 0x80}, - {0x43, 0x18}, - {0x44, 0x80}, - {0x45, 0x0c}, - {0x46, 0x05}, - {0x47, 0x06}, - {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, 0x18}, - {0x5b, 0x00}, - {0x5c, 0x00}, - {0x60, 0x3f}, - {0x62, 0x60}, - {0x70, 0x06}, - {0x03, 0x12}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x25, 0x00}, - {0x28, 0x00}, - {0x29, 0x00}, - {0x2a, 0x00}, - {0x30, 0x50}, - {0x31, 0x18}, - {0x32, 0x32}, - {0x33, 0x40}, - {0x34, 0x50}, - {0x35, 0x70}, - {0x36, 0xa0}, - {0x40, 0xa0}, - {0x41, 0x40}, - {0x42, 0xa0}, - {0x43, 0x90}, - {0x44, 0x90}, - {0x45, 0x80}, - {0x46, 0xb0}, - {0x47, 0x55}, - {0x48, 0xa0}, - {0x49, 0x90}, - {0x4a, 0x90}, - {0x4b, 0x80}, - {0x4c, 0xb0}, - {0x4d, 0x40}, - {0x4e, 0x90}, - {0x4f, 0x60}, - {0x50, 0xa0}, - {0x51, 0x80}, - {0x52, 0xb0}, - {0x53, 0x40}, - {0x54, 0x90}, - {0x55, 0x60}, - {0x56, 0xa0}, - {0x57, 0x80}, - {0x58, 0x90}, - {0x59, 0x40}, - {0x5a, 0xd0}, - {0x5b, 0xd0}, - {0x5c, 0xe0}, - {0x5d, 0x80}, - {0x5e, 0x88}, - {0x5f, 0x40}, - {0x60, 0xe0}, - {0x61, 0xe0}, - {0x62, 0xe0}, - {0x63, 0x80}, - {0x70, 0x15}, - {0x71, 0x01}, - {0x72, 0x18}, - {0x73, 0x01}, - {0x74, 0x25}, - {0x75, 0x15}, - {0x80, 0x20}, - {0x81, 0x40}, - {0x82, 0x65}, - {0x85, 0x1a}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x90, 0x5d}, - {0xD0, 0x0c}, - {0xD1, 0x80}, - {0xD2, 0x17}, - {0xD3, 0x00}, - {0xD4, 0x00}, - {0xD5, 0x0f}, - {0xD6, 0xff}, - {0xD7, 0xff}, - {0x3b, 0x06}, - {0x3c, 0x06}, - {0xc5, 0x00}, - {0xc6, 0x00}, - {0x03, 0x13}, - {0x10, 0xcb}, - {0x11, 0x7b}, - {0x12, 0x07}, - {0x14, 0x00}, - {0x20, 0x15}, - {0x21, 0x13}, - {0x22, 0x33}, - {0x23, 0x05}, - {0x24, 0x09}, - {0x25, 0x0a}, - {0x26, 0x18}, - {0x27, 0x30}, - {0x29, 0x12}, - {0x2a, 0x50}, - {0x2b, 0x02}, - {0x2c, 0x02}, - {0x25, 0x06}, - {0x2d, 0x0c}, - {0x2e, 0x12}, - {0x2f, 0x12}, - {0x50, 0x10}, - {0x51, 0x14}, - {0x52, 0x12}, - {0x53, 0x0c}, - {0x54, 0x0f}, - {0x55, 0x0c}, - {0x56, 0x10}, - {0x57, 0x13}, - {0x58, 0x12}, - {0x59, 0x0c}, - {0x5a, 0x0f}, - {0x5b, 0x0c}, - {0x5c, 0x25}, - {0x5d, 0x25}, - {0x5e, 0x25}, - {0x5f, 0x25}, - {0x60, 0x25}, - {0x61, 0x25}, - {0x62, 0x25}, - {0x63, 0x25}, - {0x64, 0x25}, - {0x65, 0x25}, - {0x66, 0x25}, - {0x67, 0x25}, - {0x68, 0x07}, - {0x69, 0x07}, - {0x6a, 0x07}, - {0x6b, 0x05}, - {0x6c, 0x05}, - {0x6d, 0x05}, - {0x6e, 0x07}, - {0x6f, 0x07}, - {0x70, 0x07}, - {0x71, 0x05}, - {0x72, 0x05}, - {0x73, 0x05}, - {0x80, 0x01}, - {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}, - {0x03, 0x14}, - {0x10, 0x11}, - {0x14, 0x80}, - {0x15, 0x80}, - {0x16, 0x80}, - {0x17, 0x80}, - {0x18, 0x80}, - {0x19, 0x80}, - {0x20, 0x80}, - {0x21, 0x80}, - {0x22, 0x80}, - {0x23, 0x80}, - {0x24, 0x80}, - {0x30, 0xc8}, - {0x31, 0x2b}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x90}, - {0x40, 0x32}, - {0x50, 0x21}, - {0x60, 0x19}, - {0x70, 0x21}, - {0x03, 0x15}, - {0x10, 0x0f}, - {0x14, 0x46}, - {0x15, 0x36}, - {0x16, 0x26}, - {0x17, 0x2f}, - {0x30, 0x8f}, - {0x31, 0x59}, - {0x32, 0x0a}, - {0x33, 0x15}, - {0x34, 0x5b}, - {0x35, 0x06}, - {0x36, 0x07}, - {0x37, 0x40}, - {0x38, 0x87}, - {0x40, 0x94}, - {0x41, 0x20}, - {0x42, 0x89}, - {0x43, 0x84}, - {0x44, 0x03}, - {0x45, 0x01}, - {0x46, 0x88}, - {0x47, 0x9c}, - {0x48, 0x28}, - {0x50, 0x02}, - {0x51, 0x82}, - {0x52, 0x00}, - {0x53, 0x07}, - {0x54, 0x11}, - {0x55, 0x98}, - {0x56, 0x00}, - {0x57, 0x0b}, - {0x58, 0x8b}, - {0x80, 0x03}, - {0x85, 0x40}, - {0x87, 0x02}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x8a, 0x00}, - {0x03, 0x16}, - {0x10, 0x31}, - {0x18, 0x5e}, - {0x19, 0x5d}, - {0x1a, 0x0e}, - {0x1b, 0x01}, - {0x1c, 0xdc}, - {0x1d, 0xfe}, - {0x30, 0x00}, - {0x31, 0x0a}, - {0x32, 0x1f}, - {0x33, 0x33}, - {0x34, 0x53}, - {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}, - {0x50, 0x00}, - {0x51, 0x08}, - {0x52, 0x1e}, - {0x53, 0x36}, - {0x54, 0x5a}, - {0x55, 0x75}, - {0x56, 0x8d}, - {0x57, 0xa1}, - {0x58, 0xb2}, - {0x59, 0xbe}, - {0x5a, 0xc9}, - {0x5b, 0xd2}, - {0x5c, 0xdb}, - {0x5d, 0xe3}, - {0x5e, 0xeb}, - {0x5f, 0xf0}, - {0x60, 0xf5}, - {0x61, 0xf7}, - {0x62, 0xf8}, - {0x70, 0x00}, - {0x71, 0x08}, - {0x72, 0x17}, - {0x73, 0x2f}, - {0x74, 0x53}, - {0x75, 0x6c}, - {0x76, 0x81}, - {0x77, 0x94}, - {0x78, 0xa4}, - {0x79, 0xb3}, - {0x7a, 0xc0}, - {0x7b, 0xcb}, - {0x7c, 0xd5}, - {0x7d, 0xde}, - {0x7e, 0xe6}, - {0x7f, 0xee}, - {0x80, 0xf4}, - {0x81, 0xfa}, - {0x82, 0xff}, - {0x03, 0x17}, - {0x10, 0xf7}, - {0xC4, 0x66}, - {0xC5, 0x55}, - {0x03, 0x20}, - {0x11, 0x1c}, - {0x18, 0x30}, - {0x1a, 0x08}, - {0x20, 0x05}, - {0x21, 0x30}, - {0x22, 0x10}, - {0x23, 0x00}, - {0x24, 0x00}, - {0x28, 0xe7}, - {0x29, 0x0d}, - {0x2a, 0xf0}, - {0x2b, 0x34}, - {0x30, 0x78}, - {0x2c, 0xc2}, - {0x2d, 0xff}, - {0x2e, 0x33}, - {0x30, 0x78}, - {0x32, 0x03}, - {0x33, 0x2e}, - {0x34, 0x30}, - {0x35, 0xd4}, - {0x36, 0xfe}, - {0x37, 0x32}, - {0x38, 0x04}, - {0x39, 0x22}, - {0x3a, 0xde}, - {0x3b, 0x22}, - {0x3c, 0xde}, - {0x50, 0x45}, - {0x51, 0x88}, - {0x56, 0x03}, - {0x57, 0xf7}, - {0x58, 0x14}, - {0x59, 0x88}, - {0x5a, 0x04}, - {0x60, 0xaa}, - {0x61, 0xaa}, - {0x62, 0xaa}, - {0x63, 0xaa}, - {0x64, 0xaa}, - {0x65, 0xaa}, - {0x66, 0xab}, - {0x67, 0xEa}, - {0x68, 0xab}, - {0x69, 0xEa}, - {0x6a, 0xaa}, - {0x6b, 0xaa}, - {0x6c, 0xaa}, - {0x6d, 0xaa}, - {0x6e, 0xaa}, - {0x6f, 0xaa}, - {0x70, 0x76}, - {0x71, 0x80}, - {0x76, 0x43}, - {0x77, 0x04}, - {0x78, 0x23}, - {0x79, 0x46}, - {0x7a, 0x23}, - {0x7b, 0x22}, - {0x7d, 0x23}, - {0x83, 0x01}, - {0x84, 0x5f}, - {0x85, 0x90}, - {0x86, 0x01}, - {0x87, 0x2c}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x8B, 0x75}, - {0x8C, 0x30}, - {0x8D, 0x61}, - {0x8E, 0x44}, - {0x9c, 0x08}, - {0x9d, 0x34}, - {0x9e, 0x01}, - {0x9f, 0x2c}, - {0xb0, 0x18}, - {0xb1, 0x14}, - {0xb2, 0x80}, - {0xb3, 0x18}, - {0xb4, 0x1a}, - {0xb5, 0x44}, - {0xb6, 0x2f}, - {0xb7, 0x28}, - {0xb8, 0x25}, - {0xb9, 0x22}, - {0xba, 0x21}, - {0xbb, 0x20}, - {0xbc, 0x32}, - {0xbd, 0x30}, - {0xc0, 0x10}, - {0xc1, 0x2b}, - {0xc2, 0x2b}, - {0xc3, 0x2b}, - {0xc4, 0x08}, - {0xc8, 0x40}, - {0xc9, 0x40}, - {0x03, 0x22}, - {0x10, 0xfd}, - {0x11, 0x2e}, - {0x19, 0x01}, - {0x20, 0x10}, - {0x21, 0x80}, - {0x24, 0x01}, - {0x30, 0x80}, - {0x31, 0x80}, - {0x38, 0x11}, - {0x39, 0x34}, - {0x40, 0xfa}, - {0x41, 0x44}, - {0x42, 0x43}, - {0x43, 0xf6}, - {0x44, 0x44}, - {0x45, 0x33}, - {0x46, 0x00}, - {0x50, 0xb2}, - {0x51, 0x81}, - {0x52, 0x98}, - {0x80, 0x38}, - {0x81, 0x20}, - {0x82, 0x38}, - {0x83, 0x5e}, - {0x84, 0x18}, - {0x85, 0x58}, - {0x86, 0x20}, - {0x87, 0x49}, - {0x88, 0x33}, - {0x89, 0x37}, - {0x8a, 0x2a}, - {0x8b, 0x41}, - {0x8c, 0x39}, - {0x8d, 0x34}, - {0x8e, 0x29}, - {0x8f, 0x53}, - {0x90, 0x52}, - {0x91, 0x51}, - {0x92, 0x4e}, - {0x93, 0x46}, - {0x94, 0x3d}, - {0x95, 0x34}, - {0x96, 0x2e}, - {0x97, 0x29}, - {0x98, 0x22}, - {0x99, 0x1c}, - {0x9a, 0x18}, - {0x9b, 0x77}, - {0x9c, 0x77}, - {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}, - {0xb4, 0xea}, - {0xb8, 0xa0}, - {0xb9, 0x00}, - {0x03, 0x48}, - {0x70, 0x03}, - {0x71, 0x30}, - {0x72, 0x81}, - {0x73, 0x10}, - {0x70, 0x85}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x70, 0x95}, - {0x10, 0x1c}, - {0x11, 0x10}, - {0x12, 0x00}, - {0x14, 0x00}, - {0x16, 0x04}, - {0x18, 0x80}, - {0x19, 0x00}, - {0x1a, 0xa0}, - {0x1b, 0x0d}, - {0x1c, 0x01}, - {0x1d, 0x0a}, - {0x1e, 0x07}, - {0x1f, 0x0b}, - {0x23, 0x01}, - {0x24, 0x1e}, - {0x25, 0x00}, - {0x26, 0x00}, - {0x27, 0x08}, - {0x28, 0x00}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x32, 0x13}, - {0x33, 0x0c}, - {0x34, 0x04}, - {0x35, 0x06}, - {0x36, 0x01}, - {0x37, 0x06}, - {0x39, 0x4f}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x0e, 0x03}, - {0x0e, 0x73}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct v4l2_subdev_info hi256_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_svga_settings[] = { - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x10, 0x13}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x04}, - {0x22, 0x00}, - {0x23, 0x07}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x03, 0x10}, - {0x3f, 0x02}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x03, 0x20}, - {0x88, 0x01}, - {0x89, 0x5f}, - {0x8a, 0x90}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, -}; - -static struct msm_camera_i2c_reg_conf hi256_sleep_settings[] = { - - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x02}, - {0x55, 0x10}, - - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_saturation[11][3] = { - { - {0x03, 0x10}, - {0x61, 0x1c}, - {0x62, 0x1c}, - }, - { - {0x03, 0x10}, - {0x61, 0x30}, - {0x62, 0x30}, - }, - { - {0x03, 0x10}, - {0x61, 0x44}, - {0x62, 0x44}, - }, - { - {0x03, 0x10}, - {0x61, 0x58}, - {0x62, 0x58}, - }, - { - {0x03, 0x10}, - {0x61, 0x6c}, - {0x62, 0x6c}, - }, - { - {0x03, 0x10}, - {0x61, 0x80}, - {0x62, 0x80}, - }, - { - {0x03, 0x10}, - {0x61, 0x94}, - {0x62, 0x94}, - }, - { - {0x03, 0x10}, - {0x61, 0xa8}, - {0x62, 0xa8}, - }, - { - {0x03, 0x10}, - {0x61, 0xbc}, - {0x62, 0xbc}, - }, - { - {0x03, 0x10}, - {0x61, 0xd0}, - {0x62, 0xd0}, - }, - { - {0x03, 0x10}, - {0x61, 0xe4}, - {0x62, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_contrast[11][3] = { - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x1c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x30}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x44}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x58}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x6c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x80}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x94}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xa8}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xbc}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xd0}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_sharpness[7][9] = { - { - {0x03, 0x13}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x00}, - {0x91, 0x00}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 0*/ - { - {0x03, 0x13}, - {0x20, 0x04}, - {0x21, 0x03}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x08}, - {0x91, 0x08}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 1*/ - { - {0x03, 0x13}, - {0x20, 0x08}, - {0x21, 0x07}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x32}, - {0x91, 0x32}, - {0x94, 0x04}, - {0x95, 0x0a}, - }, /* SHARPNESS LEVEL 2*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x09}, - {0x24, 0x11}, - {0x90, 0x05}, - {0x91, 0x05}, - {0x94, 0x10}, - {0x95, 0x5a}, - }, /* SHARPNESS LEVEL 3*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xaf}, - {0x91, 0xaf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 4*/ - { - {0x03, 0x13}, - {0x20, 0x20}, - {0x21, 0x20}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xdf}, - {0x91, 0xdf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 5*/ - { - {0x03, 0x13}, - {0x20, 0x25}, - {0x21, 0x25}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xff}, - {0x91, 0xff}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 6*/ -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_iso[7][3] = { - /* auto */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* auto hjt */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* iso 100 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x1B}, - }, - /* iso 200 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x35}, - }, - /* iso 400 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x65}, - }, - /* iso 800 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x95}, - }, - /* iso 1600 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0xd0}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_exposure_compensation[5][2] = { - /* -2 */ - { - {0x03, 0x10}, - {0x40, 0xa4}, - }, - /* -1 */ - { - {0x03, 0x10}, - {0x40, 0x94}, - }, - /* 0 */ - { - {0x03, 0x10}, - {0x40, 0x80}, - }, - /* 1 */ - { - {0x03, 0x10}, - {0x40, 0x14}, - }, - /* 2 */ - { - {0x03, 0x10}, - {0x40, 0x24}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_antibanding[][2] = { - /* OFF */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, - /* 50Hz */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - }, - /* 60Hz */ - { - {0x03, 0x20}, - {0x10, 0x8c}, - }, - /* AUTO */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_normal[] = { - /* normal: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0X30}, - {0x13, 0x0a}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_black_white[] = { - /* B&W: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x02}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_negative[] = { - /* Negative: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x08}, - {0x13, 0x0a}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_old_movie[] = { - /* Sepia(antique): */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x0a}, - {0x44, 0x25}, - {0x45, 0xa6}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_solarize[] = { - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x0b}, - {0x12, 0x00}, - {0x13, 0x00}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_auto[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_portrait[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_landscape[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_night[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x09}, - {0x89, 0x27}, - {0x8a, 0xc0}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_auto[] = { - /* Auto: */ - {0x03, 0x22}, - {0x11, 0x2e}, - {0x83, 0x60}, - {0x84, 0x0a}, - {0x85, 0x60}, - {0x86, 0x15}, - {0x10, 0xfd}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_sunny[] = { - /* Sunny: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x33}, - {0x82, 0x3d}, - {0x83, 0x2e}, - {0x84, 0x24}, - {0x85, 0x43}, - {0x86, 0x3d}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_cloudy[] = { - /* Cloudy: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x49}, - {0x82, 0x24}, - {0x83, 0x50}, - {0x84, 0x45}, - {0x85, 0x24}, - {0x86, 0x1E}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_office[] = { - /* Office: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x20}, - {0x82, 0x58}, - {0x83, 0x27}, - {0x84, 0x22}, - {0x85, 0x58}, - {0x86, 0x52}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_home[] = { - /* Home: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x29}, - {0x82, 0x54}, - {0x83, 0x2e}, - {0x84, 0x23}, - {0x85, 0x58}, - {0x86, 0x4f}, -}; - - -static const struct i2c_device_id hi256_i2c_id[] = { - {HI256_SENSOR_NAME, (kernel_ulong_t)&hi256_s_ctrl}, - { } -}; - -static int32_t msm_hi256_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &hi256_s_ctrl); -} - -static struct i2c_driver hi256_i2c_driver = { - .id_table = hi256_i2c_id, - .probe = msm_hi256_i2c_probe, - .driver = { - .name = HI256_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client hi256_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id hi256_dt_match[] = { - {.compatible = "shinetech,hi256", .data = &hi256_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, hi256_dt_match); - -static struct platform_driver hi256_platform_driver = { - .driver = { - .name = "shinetech,hi256", - .owner = THIS_MODULE, - .of_match_table = hi256_dt_match, - }, -}; - -static void hi256_i2c_write_table(struct msm_sensor_ctrl_t *s_ctrl, - struct msm_camera_i2c_reg_conf *table, - int num) -{ - int i = 0; - int rc = 0; - for (i = 0; i < num; ++i) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - msleep(100); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - } - table++; - } -} - -static int32_t hi256_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - hi256_i2c_write_table(s_ctrl, &hi256_sleep_settings[0], - ARRAY_SIZE(hi256_sleep_settings)); - return msm_sensor_power_down(s_ctrl); -} - -static int32_t hi256_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(hi256_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init hi256_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&hi256_platform_driver, - hi256_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&hi256_i2c_driver); -} - -static void __exit hi256_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (hi256_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&hi256_s_ctrl); - platform_driver_unregister(&hi256_platform_driver); - } else - i2c_del_driver(&hi256_i2c_driver); - return; -} - -static int32_t hi256_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: hi256 read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -static void hi256_set_stauration(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_saturation[value][0], - ARRAY_SIZE(HI256_reg_saturation[value])); -} - -static void hi256_set_contrast(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_contrast[value][0], - ARRAY_SIZE(HI256_reg_contrast[value])); -} - -static void hi256_set_sharpness(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - int val = value / 6; - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_sharpness[val][0], - ARRAY_SIZE(HI256_reg_sharpness[val])); -} - - -static void hi256_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_iso[value][0], - ARRAY_SIZE(HI256_reg_iso[value])); -} - -static void hi256_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - int val = (value + 12) / 6; - pr_debug("%s %d", __func__, val); - hi256_i2c_write_table(s_ctrl, &HI256_reg_exposure_compensation[val][0], - ARRAY_SIZE(HI256_reg_exposure_compensation[val])); -} - -static void hi256_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_EFFECT_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - break; - } - case MSM_CAMERA_EFFECT_MODE_MONO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_black_white[0], - ARRAY_SIZE(HI256_reg_effect_black_white)); - break; - } - case MSM_CAMERA_EFFECT_MODE_NEGATIVE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_negative[0], - ARRAY_SIZE(HI256_reg_effect_negative)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SEPIA: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_old_movie[0], - ARRAY_SIZE(HI256_reg_effect_old_movie)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SOLARIZE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_solarize[0], - ARRAY_SIZE(HI256_reg_effect_solarize)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - } -} - -static void hi256_set_antibanding(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_antibanding[value][0], - ARRAY_SIZE(HI256_reg_antibanding[value])); -} - -static void hi256_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_SCENE_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - break; - } - case MSM_CAMERA_SCENE_MODE_NIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_night[0], - ARRAY_SIZE(HI256_reg_scene_night)); - break; - } - case MSM_CAMERA_SCENE_MODE_LANDSCAPE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_landscape[0], - ARRAY_SIZE(HI256_reg_scene_landscape)); - break; - } - case MSM_CAMERA_SCENE_MODE_PORTRAIT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_portrait[0], - ARRAY_SIZE(HI256_reg_scene_portrait)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - } -} - -static void hi256_set_white_balance_mode(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_WB_MODE_AUTO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - break; - } - case MSM_CAMERA_WB_MODE_INCANDESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_home[0], - ARRAY_SIZE(HI256_reg_wb_home)); - break; - } - case MSM_CAMERA_WB_MODE_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_sunny[0], - ARRAY_SIZE(HI256_reg_wb_sunny)); - break; - } - case MSM_CAMERA_WB_MODE_FLUORESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_office[0], - ARRAY_SIZE(HI256_reg_wb_office)); - break; - } - case MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_cloudy[0], - ARRAY_SIZE(HI256_reg_wb_cloudy)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - } -} - -int32_t hi256_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("init setting"); - hi256_i2c_write_table(s_ctrl, - &hi256_recommend_settings[0], - ARRAY_SIZE(hi256_recommend_settings)); - CDBG("init setting X"); - break; - case CFG_SET_RESOLUTION: { - int val = 0; - if (copy_from_user(&val, - (void *)cdata->cfg.setting, sizeof(int))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (val == 0) - hi256_i2c_write_table(s_ctrl, &hi256_uxga_settings[0], - ARRAY_SIZE(hi256_uxga_settings)); - else if (val == 1) - hi256_i2c_write_table(s_ctrl, &hi256_svga_settings[0], - ARRAY_SIZE(hi256_svga_settings)); - break; - } - case CFG_SET_STOP_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_stop_settings[0], - ARRAY_SIZE(hi256_stop_settings)); - break; - case CFG_SET_START_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_start_settings[0], - ARRAY_SIZE(hi256_start_settings)); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - hi256_set_stauration(s_ctrl, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - hi256_set_contrast(s_ctrl, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - hi256_set_sharpness(s_ctrl, shp_lev); - break; - } - case CFG_SET_ISO: { - int32_t iso_lev; - if (copy_from_user(&iso_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: ISO Value is %d", __func__, iso_lev); - hi256_set_iso(s_ctrl, iso_lev); - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - int32_t ec_lev; - if (copy_from_user(&ec_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Exposure compensation Value is %d", - __func__, ec_lev); - hi256_set_exposure_compensation(s_ctrl, ec_lev); - break; - } - case CFG_SET_EFFECT: { - int32_t effect_mode; - if (copy_from_user(&effect_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Effect mode is %d", __func__, effect_mode); - hi256_set_effect(s_ctrl, effect_mode); - break; - } - case CFG_SET_ANTIBANDING: { - int32_t antibanding_mode; - if (copy_from_user(&antibanding_mode, - (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: anti-banding mode is %d", __func__, - antibanding_mode); - hi256_set_antibanding(s_ctrl, antibanding_mode); - break; - } - case CFG_SET_BESTSHOT_MODE: { - int32_t bs_mode; - if (copy_from_user(&bs_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: best shot mode is %d", __func__, bs_mode); - hi256_set_scene_mode(s_ctrl, bs_mode); - break; - } - case CFG_SET_WHITE_BALANCE: { - int32_t wb_mode; - if (copy_from_user(&wb_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: white balance is %d", __func__, wb_mode); - hi256_set_white_balance_mode(s_ctrl, wb_mode); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t hi256_sensor_func_tbl = { - .sensor_config = hi256_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = hi256_sensor_power_down, - .sensor_match_id = hi256_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t hi256_s_ctrl = { - .sensor_i2c_client = &hi256_sensor_i2c_client, - .power_setting_array.power_setting = hi256_power_setting, - .power_setting_array.size = ARRAY_SIZE(hi256_power_setting), - .msm_sensor_mutex = &hi256_mut, - .sensor_v4l2_subdev_info = hi256_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(hi256_subdev_info), - .func_tbl = &hi256_sensor_func_tbl, -}; - -module_init(hi256_init_module); -module_exit(hi256_exit_module); -MODULE_DESCRIPTION("Hi256 2MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/imx132.c b/drivers/media/platform/msm/camera_v2/sensor/imx132.c deleted file mode 100644 index f9d057ac403c..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/imx132.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX132_SENSOR_NAME "imx132" -DEFINE_MSM_MUTEX(imx132_mut); - -static struct msm_sensor_ctrl_t imx132_s_ctrl; - -static struct msm_sensor_power_setting imx132_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx132_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SRGGB10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx132_i2c_id[] = { - {IMX132_SENSOR_NAME, (kernel_ulong_t)&imx132_s_ctrl}, - { } -}; - -static int32_t msm_imx132_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx132_s_ctrl); -} -static struct i2c_driver imx132_i2c_driver = { - .id_table = imx132_i2c_id, - .probe = msm_imx132_i2c_probe, - .driver = { - .name = IMX132_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx132_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx132_dt_match[] = { - {.compatible = "qcom,imx132", .data = &imx132_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx132_dt_match); - -static struct platform_driver imx132_platform_driver = { - .driver = { - .name = "qcom,imx132", - .owner = THIS_MODULE, - .of_match_table = imx132_dt_match, - }, -}; - -static int32_t imx132_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx132_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx132_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx132_platform_driver, - imx132_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx132_i2c_driver); -} - -static void __exit imx132_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx132_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx132_s_ctrl); - platform_driver_unregister(&imx132_platform_driver); - } else - i2c_del_driver(&imx132_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx132_s_ctrl = { - .sensor_i2c_client = &imx132_sensor_i2c_client, - .power_setting_array.power_setting = imx132_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx132_power_setting), - .msm_sensor_mutex = &imx132_mut, - .sensor_v4l2_subdev_info = imx132_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx132_subdev_info), -}; - -module_init(imx132_init_module); -module_exit(imx132_exit_module); -MODULE_DESCRIPTION("imx132"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/imx134.c b/drivers/media/platform/msm/camera_v2/sensor/imx134.c deleted file mode 100644 index 17a50889a88a..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/imx134.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX134_SENSOR_NAME "imx134" -DEFINE_MSM_MUTEX(imx134_mut); - -static struct msm_sensor_ctrl_t imx134_s_ctrl; - -static struct msm_sensor_power_setting imx134_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx134_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx134_i2c_id[] = { - {IMX134_SENSOR_NAME, (kernel_ulong_t)&imx134_s_ctrl}, - { } -}; - -static int32_t msm_imx134_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx134_s_ctrl); -} - -static struct i2c_driver imx134_i2c_driver = { - .id_table = imx134_i2c_id, - .probe = msm_imx134_i2c_probe, - .driver = { - .name = IMX134_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx134_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx134_dt_match[] = { - {.compatible = "sne,imx134", .data = &imx134_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx134_dt_match); - -static struct platform_driver imx134_platform_driver = { - .driver = { - .name = "sne,imx134", - .owner = THIS_MODULE, - .of_match_table = imx134_dt_match, - }, -}; - -static int32_t imx134_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx134_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx134_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx134_platform_driver, - imx134_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx134_i2c_driver); -} - -static void __exit imx134_exit_module(void) -{ - pr_debug("%s:%d\n", __func__, __LINE__); - if (imx134_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx134_s_ctrl); - platform_driver_unregister(&imx134_platform_driver); - } else { - i2c_del_driver(&imx134_i2c_driver); - } - return; -} - -static struct msm_sensor_ctrl_t imx134_s_ctrl = { - .sensor_i2c_client = &imx134_sensor_i2c_client, - .power_setting_array.power_setting = imx134_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx134_power_setting), - .msm_sensor_mutex = &imx134_mut, - .sensor_v4l2_subdev_info = imx134_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx134_subdev_info), -}; - -module_init(imx134_init_module); -module_exit(imx134_exit_module); -MODULE_DESCRIPTION("imx134"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/imx135.c b/drivers/media/platform/msm/camera_v2/sensor/imx135.c deleted file mode 100644 index c26e4fffbd4f..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/imx135.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX135_SENSOR_NAME "imx135" -DEFINE_MSM_MUTEX(imx135_mut); - -static struct msm_sensor_ctrl_t imx135_s_ctrl; - -static struct msm_sensor_power_setting imx135_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx135_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx135_i2c_id[] = { - {IMX135_SENSOR_NAME, (kernel_ulong_t)&imx135_s_ctrl}, - { } -}; - -static int32_t msm_imx135_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx135_s_ctrl); -} - -static struct i2c_driver imx135_i2c_driver = { - .id_table = imx135_i2c_id, - .probe = msm_imx135_i2c_probe, - .driver = { - .name = IMX135_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx135_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx135_dt_match[] = { - {.compatible = "qcom,imx135", .data = &imx135_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx135_dt_match); - -static struct platform_driver imx135_platform_driver = { - .driver = { - .name = "qcom,imx135", - .owner = THIS_MODULE, - .of_match_table = imx135_dt_match, - }, -}; - -static int32_t imx135_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx135_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx135_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx135_platform_driver, - imx135_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx135_i2c_driver); -} - -static void __exit imx135_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx135_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx135_s_ctrl); - platform_driver_unregister(&imx135_platform_driver); - } else - i2c_del_driver(&imx135_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx135_s_ctrl = { - .sensor_i2c_client = &imx135_sensor_i2c_client, - .power_setting_array.power_setting = imx135_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx135_power_setting), - .msm_sensor_mutex = &imx135_mut, - .sensor_v4l2_subdev_info = imx135_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx135_subdev_info), -}; - -module_init(imx135_init_module); -module_exit(imx135_exit_module); -MODULE_DESCRIPTION("imx135"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/Makefile b/drivers/media/platform/msm/camera_v2/sensor/io/Makefile index 0c7c1915a98e..55f523118764 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/Makefile +++ b/drivers/media/platform/msm/camera_v2/sensor/io/Makefile @@ -1,4 +1,4 @@ ccflags-y += -Idrivers/media/platform/msm/camera_v2/ ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_camera_io_util.o msm_camera_cci_i2c.o msm_camera_qup_i2c.o msm_camera_i2c_mux.o msm_camera_spi.o msm_camera_dt_util.o +obj-$(CONFIG_MSMB_CAMERA) += msm_camera_io_util.o msm_camera_cci_i2c.o msm_camera_qup_i2c.o msm_camera_spi.o msm_camera_dt_util.o diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_cci_i2c.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_cci_i2c.c index fa9906e9e155..448cea0d4cd8 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_cci_i2c.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_cci_i2c.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -15,13 +15,8 @@ #include "msm_cci.h" #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG #define CDBG(fmt, args...) pr_debug(fmt, ##args) #define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif #define I2C_COMPARE_MATCH 0 #define I2C_COMPARE_MISMATCH 1 @@ -76,12 +71,17 @@ int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, || num_byte == 0) return rc; + if (num_byte > I2C_REG_DATA_MAX) { + pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n", + __func__, num_byte, I2C_REG_DATA_MAX); + return rc; + } + buf = kzalloc(num_byte, GFP_KERNEL); if (!buf) { pr_err("%s:%d no memory\n", __func__, __LINE__); return -ENOMEM; } - cci_ctrl.status = 0; //prevent cci_ctrl.cmd = MSM_CCI_I2C_READ; cci_ctrl.cci_info = client->cci_client; cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; @@ -121,28 +121,13 @@ int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, __func__, __LINE__, addr, data_type); reg_conf_tbl.reg_addr = addr; reg_conf_tbl.reg_data = data; + reg_conf_tbl.delay = 0; cci_ctrl.cmd = MSM_CCI_I2C_WRITE; cci_ctrl.cci_info = client->cci_client; cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = ®_conf_tbl; cci_ctrl.cfg.cci_i2c_write_cfg.data_type = data_type; cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; cci_ctrl.cfg.cci_i2c_write_cfg.size = 1; -#if defined(CONFIG_SR200PC20) || defined(CONFIG_SR352) || defined(CONFIG_SR130PC20) - if (addr == 0xff){ - pr_err("delay START = %d\n", (int)data*10); - mdelay(data*10); - return 0; - } -#endif - -#if defined(CONFIG_DB8221A) - if (addr == 0xfe){ - pr_err("delay START = %d\n", (int)data*10); - msleep(data); - return 0; - } -#endif - rc = v4l2_subdev_call(client->cci_client->cci_subdev, core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); if (rc < 0) { @@ -158,92 +143,38 @@ int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, { int32_t rc = -EFAULT; uint8_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl = {0}; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - - reg_conf_tbl = kzalloc(num_byte * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - } - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BYTE_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - kfree(reg_conf_tbl); - reg_conf_tbl = NULL; - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint32_t i = 0; struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; + struct msm_camera_i2c_reg_array reg_conf_tbl[num_byte]; if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) || num_byte == 0) return rc; - reg_conf_tbl = (struct msm_camera_i2c_reg_array *) - kzalloc(num_byte * sizeof(struct msm_camera_i2c_reg_array), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d failed: no memory", __func__, __LINE__); - return -ENOMEM; - } - - CDBG("%s reg addr = 0x%x num bytes: %d\n", + S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", __func__, addr, num_byte); memset(reg_conf_tbl, 0, num_byte * sizeof(struct msm_camera_i2c_reg_array)); reg_conf_tbl[0].reg_addr = addr; + if (num_byte > I2C_SEQ_REG_DATA_MAX) { + pr_err("%s: num_byte=%d clamped to max supported %d\n", + __func__, num_byte, I2C_SEQ_REG_DATA_MAX); + num_byte = I2C_SEQ_REG_DATA_MAX; + } for (i = 0; i < num_byte; i++) { reg_conf_tbl[i].reg_data = data[i]; reg_conf_tbl[i].delay = 0; - CDBG("%s:%d data[%d] %x\n", __func__, __LINE__, i, - reg_conf_tbl[i].reg_data); } - cci_ctrl.status = 0;//prevent - cci_ctrl.cmd = MSM_CCI_I2C_WRITE_BURST; + cci_ctrl.cmd = MSM_CCI_I2C_WRITE; cci_ctrl.cci_info = client->cci_client; cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BURST_DATA; + cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BYTE_DATA; cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; rc = v4l2_subdev_call(client->cci_client->cci_subdev, core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s:%d failed: VIDIOC_MSM_CCI_CFG rc %d\n", __func__, __LINE__, - rc); - } - + CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); rc = cci_ctrl.status; - kfree(reg_conf_tbl); return rc; } @@ -286,44 +217,6 @@ int32_t msm_camera_cci_i2c_write_table( return rc; } -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - //struct msm_camera_i2c_reg_array *reg_array = NULL; - struct msm_camera_i2c_burst_reg_array *reg_array = NULL; - - if (!client || !write_setting) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA - && write_setting->data_type != MSM_CAMERA_I2C_BURST_DATA)) { - pr_err("[CCI]%s:%d failed data_type(%d)\n", __func__, __LINE__, write_setting->data_type); - return rc; - } - - reg_array = - (struct msm_camera_i2c_burst_reg_array *)write_setting->reg_setting; -/* - pr_err("%s:%d size %d addr %x\n", __func__, __LINE__, - reg_array->delay, reg_array->reg_addr); -*/ - rc = msm_camera_cci_i2c_write_burst(client, reg_array->reg_addr, - reg_array->reg_burst_data, reg_array->reg_data_size); - if (rc < 0) { - pr_err("%s:%d failed: msm_camera_cci_i2c_write_seq rc %d\n", - __func__, __LINE__, rc); - } - - return rc; -} - int32_t msm_camera_cci_i2c_write_seq_table( struct msm_camera_i2c_client *client, struct msm_camera_i2c_seq_reg_setting *write_setting) diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c index a22ad60d50b7..bc04253d73e2 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c @@ -10,7 +10,6 @@ * GNU General Public License for more details. */ -#include #include "msm_camera_dt_util.h" #include "msm_camera_io_util.h" #include "msm_camera_i2c_mux.h" @@ -18,13 +17,10 @@ #define CAM_SENSOR_PINCTRL_STATE_SLEEP "cam_suspend" #define CAM_SENSOR_PINCTRL_STATE_DEFAULT "cam_default" -//#define CONFIG_MSM_CAMERA_DT_DEBUG +/*#define CONFIG_MSM_CAMERA_DT_DEBUG*/ + #undef CDBG -#ifdef CONFIG_MSM_CAMERA_DT_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, int num_vreg, struct msm_sensor_power_setting *power_setting, @@ -35,7 +31,7 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, /* Validate input parameters */ if (!cam_vreg || !power_setting) { - pr_err("%s:%d failed: cam_vreg %pK power_setting %pK", __func__, + pr_err("%s:%d failed: cam_vreg %p power_setting %p", __func__, __LINE__, cam_vreg, power_setting); return -EINVAL; } @@ -54,7 +50,7 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, case CAM_VDIG: for (j = 0; j < num_vreg; j++) { if (!strcmp(cam_vreg[j].reg_name, "cam_vdig")) { - CDBG("%s:%d i %d j %d cam_vdig\n", + pr_err("%s:%d i %d j %d cam_vdig\n", __func__, __LINE__, i, j); power_setting[i].seq_val = j; break; @@ -65,7 +61,7 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, case CAM_VIO: for (j = 0; j < num_vreg; j++) { if (!strcmp(cam_vreg[j].reg_name, "cam_vio")) { - CDBG("%s:%d i %d j %d cam_vio\n", + pr_err("%s:%d i %d j %d cam_vio\n", __func__, __LINE__, i, j); power_setting[i].seq_val = j; break; @@ -76,7 +72,7 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, case CAM_VANA: for (j = 0; j < num_vreg; j++) { if (!strcmp(cam_vreg[j].reg_name, "cam_vana")) { - CDBG("%s:%d i %d j %d cam_vana\n", + pr_err("%s:%d i %d j %d cam_vana\n", __func__, __LINE__, i, j); power_setting[i].seq_val = j; break; @@ -87,48 +83,38 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, case CAM_VAF: for (j = 0; j < num_vreg; j++) { if (!strcmp(cam_vreg[j].reg_name, "cam_vaf")) { - CDBG("%s:%d i %d j %d cam_vaf\n", + pr_err("%s:%d i %d j %d cam_vaf\n", __func__, __LINE__, i, j); power_setting[i].seq_val = j; break; } } break; -#if defined(CONFIG_OIS) - case CAM_VMOIS: + + case CAM_V_CUSTOM1: for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vm_ois")) { - pr_info("%s:%d i %d j %d cam_vaf\n", - __FUNCTION__, __LINE__, i, j); + if (!strcmp(cam_vreg[j].reg_name, + "cam_v_custom1")) { + pr_err("%s:%d i %d j %d cam_vcustom1\n", + __func__, __LINE__, i, j); power_setting[i].seq_val = j; - if (power_setting[i].config_val != 0) { - cam_vreg[j].min_voltage = cam_vreg[j].max_voltage = - power_setting[i].config_val; - pr_info("%s:%d af min max voltage %ld\n", __FUNCTION__, - __LINE__, power_setting[i].config_val); - break; - } + break; } } break; - case CAM_VDDOIS: + case CAM_V_CUSTOM2: for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vdd_ois")) { - pr_info("%s:%d i %d j %d cam_vaf\n", - __FUNCTION__, __LINE__, i, j); + if (!strcmp(cam_vreg[j].reg_name, + "cam_v_custom2")) { + pr_err("%s:%d i %d j %d cam_vcustom2\n", + __func__, __LINE__, i, j); power_setting[i].seq_val = j; - if (power_setting[i].config_val != 0) { - cam_vreg[j].min_voltage = cam_vreg[j].max_voltage = - power_setting[i].config_val; - pr_info("%s:%d af min max voltage %ld\n", __FUNCTION__, - __LINE__, power_setting[i].config_val); - break; - } + break; } } break; -#endif + default: pr_err("%s:%d invalid seq_val %d\n", __func__, __LINE__, power_setting[i].seq_val); @@ -153,8 +139,11 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, pr_err("%s:%d failed\n", __func__, __LINE__); return -ENOMEM; } - for (i = 0; i < SUB_MODULE_MAX; i++) + for (i = 0; i < SUB_MODULE_MAX; i++) { sensor_info->subdev_id[i] = -1; + /* Subdev expose additional interface for same sub module*/ + sensor_info->subdev_intf[i] = -1; + } src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); if (!src_node) { @@ -171,7 +160,7 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, of_node_put(src_node); src_node = NULL; } -#if defined(CONFIG_OIS) + src_node = of_parse_phandle(of_node, "qcom,ois-src", 0); if (!src_node) { CDBG("%s:%d src_node NULL\n", __func__, __LINE__); @@ -187,7 +176,7 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, of_node_put(src_node); src_node = NULL; } -#endif + src_node = of_parse_phandle(of_node, "qcom,eeprom-src", 0); if (!src_node) { CDBG("%s:%d eeprom src_node NULL\n", __func__, __LINE__); @@ -212,8 +201,9 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, goto ERROR; } sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - } else + } else { rc = 0; + } src_node = of_parse_phandle(of_node, "qcom,led-flash-src", 0); if (!src_node) { @@ -240,8 +230,9 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, goto ERROR; } sensor_info->subdev_id[SUB_MODULE_STROBE_FLASH] = val; - } else + } else { rc = 0; + } if (of_get_property(of_node, "qcom,csiphy-sd-index", &count)) { count /= sizeof(uint32_t); @@ -491,32 +482,18 @@ int msm_camera_get_dt_power_setting_data(struct device_node *of_node, ps[i].seq_val = SENSOR_GPIO_RESET; else if (!strcmp(seq_name, "sensor_gpio_standby")) ps[i].seq_val = SENSOR_GPIO_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vt_reset")) - ps[i].seq_val = SENSOR_GPIO_VT_RESET; - else if (!strcmp(seq_name, "sensor_gpio_vt_standby")) - ps[i].seq_val = SENSOR_GPIO_VT_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vio")) - ps[i].seq_val = SENSOR_GPIO_VIO; else if (!strcmp(seq_name, "sensor_gpio_vdig")) ps[i].seq_val = SENSOR_GPIO_VDIG; else if (!strcmp(seq_name, "sensor_gpio_vana")) ps[i].seq_val = SENSOR_GPIO_VANA; - else if (!strcmp(seq_name, "qcom,gpio-ext-vana-power")) - ps[i].seq_val = SENSOR_GPIO_EXT_VANA_POWER; - else if (!strcmp(seq_name, "qcom,gpio-ext-camio-en")) - ps[i].seq_val = SENSOR_GPIO_EXT_CAMIO_EN; -#if defined(CONFIG_OIS) - else if (!strcmp(seq_name, "qcom,gpio-ois-enable")) - { - ps[i].seq_val = SENSOR_GPIO_OIS_EN; - pr_err("Sequence Value is ps[%d].seq_val --> %d",i,ps[i].seq_val); - } - else if (!strcmp(seq_name, "qcom,gpio-ois-reset")) - { - ps[i].seq_val = SENSOR_GPIO_OIS_RESET; - pr_err("Sequence Value is ps[%d].seq_val --> %d",i,ps[i].seq_val); - } -#endif + else if (!strcmp(seq_name, "sensor_gpio_vaf")) + ps[i].seq_val = SENSOR_GPIO_VAF; + else if (!strcmp(seq_name, "sensor_gpio_vio")) + ps[i].seq_val = SENSOR_GPIO_VIO; + else if (!strcmp(seq_name, "sensor_gpio_custom1")) + ps[i].seq_val = SENSOR_GPIO_CUSTOM1; + else if (!strcmp(seq_name, "sensor_gpio_custom2")) + ps[i].seq_val = SENSOR_GPIO_CUSTOM2; else rc = -EILSEQ; break; @@ -602,10 +579,7 @@ int msm_camera_get_dt_power_setting_data(struct device_node *of_node, ps, sizeof(*ps) * size); power_info->power_down_setting_size = size; -#if defined(CONFIG_MACH_O7_CHN_OPEN) - if(size == 2) - need_reverse=0; -#endif + if (need_reverse) { int c, end = size - 1; struct msm_sensor_power_setting power_down_setting_t; @@ -618,19 +592,6 @@ int msm_camera_get_dt_power_setting_data(struct device_node *of_node, power_down_setting_t; end--; } -#if defined(CONFIG_MACH_ROSSA_TMO) - for (c = 0; c < size; c ++) { - if(power_info->power_down_setting[c].seq_val == SENSOR_GPIO_VDIG) - { - int i = c + 1; - power_down_setting_t = power_info->power_down_setting[c]; - power_info->power_down_setting[c] = power_info->power_down_setting[i]; - power_info->power_down_setting[i] = power_down_setting_t; - power_info->power_down_setting[c].delay = 0; - break; - } - } -#endif } return rc; ERROR2: @@ -823,6 +784,27 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, return rc; } + rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val); + if (rc != -EINVAL) { + if (rc < 0) { + pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", + __func__, __LINE__, rc); + goto ERROR; + } else if (val >= gpio_array_size) { + pr_err("%s:%d qcom,gpio-vana invalid %d\n", + __func__, __LINE__, val); + rc = -EINVAL; + goto ERROR; + } + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA] = + gpio_array[val]; + gconf->gpio_num_info->valid[SENSOR_GPIO_VANA] = 1; + CDBG("%s qcom,gpio-vana %d\n", __func__, + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA]); + } else { + rc = 0; + } + rc = of_property_read_u32(of_node, "qcom,gpio-vio", &val); if (rc != -EINVAL) { if (rc < 0) { @@ -832,36 +814,37 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, } else if (val >= gpio_array_size) { pr_err("%s:%d qcom,gpio-vio invalid %d\n", __func__, __LINE__, val); - rc = -EINVAL; goto ERROR; } gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO] = gpio_array[val]; gconf->gpio_num_info->valid[SENSOR_GPIO_VIO] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, + CDBG("%s qcom,gpio-vio %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO]); - } else + } else { rc = 0; + } - rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val); + rc = of_property_read_u32(of_node, "qcom,gpio-vaf", &val); if (rc != -EINVAL) { if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", + pr_err("%s:%d read qcom,gpio-vaf failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vana invalid %d\n", + pr_err("%s:%d qcom,gpio-vaf invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA] = + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VAF] = gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VANA] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA]); - } else + gconf->gpio_num_info->valid[SENSOR_GPIO_VAF] = 1; + CDBG("%s qcom,gpio-vaf %d\n", __func__, + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VAF]); + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-vdig", &val); if (rc != -EINVAL) { @@ -880,30 +863,10 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_VDIG] = 1; CDBG("%s qcom,gpio-vdig %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG]); - } else + } else { rc = 0; + } -#if defined(CONFIG_MACH_ROSSA_TMO) || defined(CONFIG_SEC_A8_PROJECT) || defined(CONFIG_SEC_A7X_PROJECT) - rc = of_property_read_u32(of_node, "qcom,gpio-vt-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_RESET] = 1; - CDBG("%s qcom,gpio-vt-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET]); - } else - rc = 0; -#endif rc = of_property_read_u32(of_node, "qcom,gpio-reset", &val); if (rc != -EINVAL) { if (rc < 0) { @@ -921,8 +884,9 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_RESET] = 1; CDBG("%s qcom,gpio-reset %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET]); - } else + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-standby", &val); if (rc != -EINVAL) { @@ -941,93 +905,9 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_STANDBY] = 1; CDBG("%s qcom,gpio-standby %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY]); - } else - rc = 0; - -#if defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT)\ - || defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vana-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_VANA_POWER] = 1; - CDBG("%s qcom,gpio-ext-vana-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vio-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_CAMIO_EN] = 1; - CDBG("%s qcom,gpio-ext-vio-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN]); - } else - rc = 0; - -#endif - - rc = of_property_read_u32(of_node, "qcom,gpio-vt-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_RESET] = 1; - CDBG("%s qcom,gpio-vt-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vt-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_STANDBY] = 1; - CDBG("%s qcom,gpio-vt-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY]); - } else + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-af-pwdm", &val); if (rc != -EINVAL) { @@ -1046,8 +926,9 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_AF_PWDM] = 1; CDBG("%s qcom,gpio-af-pwdm %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM]); - } else + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-flash-en", &val); if (rc != -EINVAL) { @@ -1066,8 +947,9 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_FL_EN] = 1; CDBG("%s qcom,gpio-flash-en %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN]); - } else + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-flash-now", &val); if (rc != -EINVAL) { @@ -1086,8 +968,9 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->valid[SENSOR_GPIO_FL_NOW] = 1; CDBG("%s qcom,gpio-flash-now %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW]); - } else + } else { rc = 0; + } rc = of_property_read_u32(of_node, "qcom,gpio-flash-reset", &val); if (rc != -EINVAL) { @@ -1108,47 +991,49 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET]); } else rc = 0; -#if defined(CONFIG_OIS) - rc = of_property_read_u32(of_node, "qcom,gpio-ois-enable", &val); + + rc = of_property_read_u32(of_node, "qcom,gpio-custom1", &val); if (rc != -EINVAL) { if (rc < 0) { - pr_err("%s:%dread qcom,gpio-ois-enable failed rc %d\n", + pr_err("%s:%d read qcom,gpio-custom1 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-ois-enable invalid %d\n", + pr_err("%s:%d qcom,gpio-custom1 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_EN] = + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1] = gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_OIS_EN] = 1; - pr_err("%s qcom,gpio-ois-enable %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_EN]); - } else + gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM1] = 1; + CDBG("%s qcom,gpio-custom1 %d\n", __func__, + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1]); + } else { rc = 0; + } - rc = of_property_read_u32(of_node, "qcom,gpio-ois-reset", &val); + rc = of_property_read_u32(of_node, "qcom,gpio-custom2", &val); if (rc != -EINVAL) { if (rc < 0) { - pr_err("%s:%dread qcom,gpio-ois-reset failed rc %d\n", + pr_err("%s:%d read qcom,gpio-custom2 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-ois-reset invalid %d\n", + pr_err("%s:%d qcom,gpio-custom2 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_RESET] = + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2] = gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_OIS_RESET] = 1; - pr_err("%s qcom,gpio-ois-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_RESET]); - } else + gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM2] = 1; + CDBG("%s qcom,gpio-custom2 %d\n", __func__, + gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2]); + } else { rc = 0; -#endif + } + return rc; ERROR: @@ -1157,163 +1042,6 @@ ERROR: return rc; } -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf) -{ - int rc = 0, val = 0; - char camera_info[100] = {0, }; - - rc = of_property_read_u32(of_node, "cam,isp", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcpy(camera_info, "ISP="); - switch(val) { - case CAM_INFO_ISP_TYPE_INTERNAL : - strcat(camera_info, "INT;"); - break; - case CAM_INFO_ISP_TYPE_EXTERNAL : - strcat(camera_info, "EXT;"); - break; - case CAM_INFO_ISP_TYPE_SOC : - strcat(camera_info, "SOC;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,cal_memory", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CALMEM="); - switch(val) { - case CAM_INFO_CAL_MEM_TYPE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CAL_MEM_TYPE_FROM : - case CAM_INFO_CAL_MEM_TYPE_EEPROM : - case CAM_INFO_CAL_MEM_TYPE_OTP : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,read_version", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "READVER="); - switch(val) { - case CAM_INFO_READ_VER_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_READ_VER_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,core_voltage", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "COREVOLT="); - switch(val) { - case CAM_INFO_CORE_VOLT_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CORE_VOLT_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,upgrade", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "UPGRADE="); - switch(val) { - case CAM_INFO_FW_UPGRADE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_FW_UPGRADE_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_FW_UPGRADE_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,companion_chip", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CC="); - switch(val) { - case CAM_INFO_COMPANION_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_COMPANION_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,ois", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "OIS="); - switch(val) { - case CAM_INFO_OIS_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_OIS_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; - -ERROR1: - strcpy(camera_info, "ISP=NULL;CALMEM=NULL;READVER=NULL;COREVOLT=NULL;UPGRADE=NULL;FW_CC=NULL;OIS=NULL"); - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; -} -#endif - int msm_camera_get_dt_vreg_data(struct device_node *of_node, struct camera_vreg_t **cam_vreg, int *num_vreg) { @@ -1321,6 +1049,7 @@ int msm_camera_get_dt_vreg_data(struct device_node *of_node, uint32_t count = 0; uint32_t *vreg_array = NULL; struct camera_vreg_t *vreg = NULL; + bool custom_vreg_name = false; count = of_property_count_strings(of_node, "qcom,cam-vreg-name"); CDBG("%s qcom,cam-vreg-name count %d\n", __func__, count); @@ -1347,6 +1076,22 @@ int msm_camera_get_dt_vreg_data(struct device_node *of_node, } } + custom_vreg_name = of_property_read_bool(of_node, + "qcom,cam-custom-vreg-name"); + if (custom_vreg_name) { + for (i = 0; i < count; i++) { + rc = of_property_read_string_index(of_node, + "qcom,cam-custom-vreg-name", i, + &vreg[i].custom_vreg_name); + CDBG("%s sub reg_name[%d] = %s\n", __func__, i, + vreg[i].custom_vreg_name); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR1; + } + } + } + vreg_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); if (!vreg_array) { pr_err("%s failed %d\n", __func__, __LINE__); @@ -1354,16 +1099,24 @@ int msm_camera_get_dt_vreg_data(struct device_node *of_node, goto ERROR1; } + for (i = 0; i < count; i++) + vreg[i].type = VREG_TYPE_DEFAULT; + rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-type", vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].type = vreg_array[i]; - CDBG("%s cam_vreg[%d].type = %d\n", __func__, i, - vreg[i].type); + if (rc != -EINVAL) { + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto ERROR2; + } else { + for (i = 0; i < count; i++) { + vreg[i].type = vreg_array[i]; + CDBG("%s cam_vreg[%d].type = %d\n", __func__, i, + vreg[i].type); + } + } + } else { + rc = 0; } rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-min-voltage", @@ -1471,16 +1224,12 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, CDBG("%s:%d\n", __func__, __LINE__); if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, + pr_err("failed ctrl %p sensor_i2c_client %p\n", ctrl, sensor_i2c_client); return -EINVAL; } if (ctrl->gpio_conf->cam_gpiomux_conf_tbl != NULL) { pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - ctrl->gpio_conf->cam_gpiomux_conf_tbl, - ctrl->gpio_conf->cam_gpiomux_conf_tbl_size); } ret = msm_camera_pinctrl_init(ctrl); if (ret < 0) { @@ -1490,14 +1239,11 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, } else { ctrl->cam_pinctrl_status = 1; } - - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - rc = msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) - no_gpio = rc; - } + rc = msm_camera_request_gpio_table( + ctrl->gpio_conf->cam_gpio_req_tbl, + ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); + if (rc < 0) + no_gpio = rc; if (ctrl->cam_pinctrl_status) { ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, ctrl->pinctrl_info.gpio_state_active); @@ -1553,7 +1299,7 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, gpio_set_value_cansleep( ctrl->gpio_conf->gpio_num_info->gpio_num [power_setting->seq_val], - power_setting->config_val); + (int) power_setting->config_val); break; case SENSOR_VREG: if (power_setting->seq_val >= CAM_VREG_MAX) { @@ -1562,18 +1308,15 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, SENSOR_GPIO_MAX); goto power_up_failed; } -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - power_setting->config_val); -#else - msm_camera_config_single_vreg(ctrl->dev, + if (power_setting->seq_val < ctrl->num_vreg) + msm_camera_config_single_vreg(ctrl->dev, &ctrl->cam_vreg[power_setting->seq_val], (struct regulator **)&power_setting->data[0], 1); -#endif + else + pr_err("ERR:%s: %d usr_idx:%d dts_idx:%d\n", + __func__, __LINE__, + power_setting->seq_val, ctrl->num_vreg); break; case SENSOR_I2C_MUX: if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) @@ -1584,19 +1327,12 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, power_setting->seq_type); break; } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (power_setting->delay) { - usleep_range(power_setting->delay * 100, - (power_setting->delay * 100) + 100); - } -#else if (power_setting->delay > 20) { msleep(power_setting->delay); } else if (power_setting->delay) { usleep_range(power_setting->delay * 1000, (power_setting->delay * 1000) + 1000); } -#endif } if (device_type == MSM_CAMERA_PLATFORM_DEVICE) { @@ -1626,6 +1362,8 @@ power_up_failed: 0); break; case SENSOR_GPIO: + if (!ctrl->gpio_conf->gpio_num_info) + continue; if (!ctrl->gpio_conf->gpio_num_info->valid [power_setting->seq_val]) continue; @@ -1634,19 +1372,15 @@ power_up_failed: [power_setting->seq_val], GPIOF_OUT_INIT_LOW); break; case SENSOR_VREG: -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - 0); -#else - - msm_camera_config_single_vreg(ctrl->dev, + if (power_setting->seq_val < ctrl->num_vreg) + msm_camera_config_single_vreg(ctrl->dev, &ctrl->cam_vreg[power_setting->seq_val], (struct regulator **)&power_setting->data[0], 0); -#endif + else + pr_err("%s:%d:seq_val: %d > num_vreg: %d\n", + __func__, __LINE__, + power_setting->seq_val, ctrl->num_vreg); break; case SENSOR_I2C_MUX: if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) @@ -1657,19 +1391,12 @@ power_up_failed: power_setting->seq_type); break; } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (power_setting->delay) { - usleep_range(power_setting->delay * 100, - (power_setting->delay * 100) + 100); - } -#else if (power_setting->delay > 20) { msleep(power_setting->delay); } else if (power_setting->delay) { usleep_range(power_setting->delay * 1000, (power_setting->delay * 1000) + 1000); } -#endif } if (ctrl->cam_pinctrl_status) { ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, @@ -1680,11 +1407,9 @@ power_up_failed: devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); } ctrl->cam_pinctrl_status = 0; - if (ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } + msm_camera_request_gpio_table( + ctrl->gpio_conf->cam_gpio_req_tbl, + ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); return rc; } @@ -1718,7 +1443,7 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, CDBG("%s:%d\n", __func__, __LINE__); if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, + pr_err("failed ctrl %p sensor_i2c_client %p\n", ctrl, sensor_i2c_client); return -EINVAL; } @@ -1761,7 +1486,7 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, gpio_set_value_cansleep( ctrl->gpio_conf->gpio_num_info->gpio_num [pd->seq_val], - 0); + (int) pd->config_val); break; case SENSOR_VREG: if (pd->seq_val >= CAM_VREG_MAX) { @@ -1774,21 +1499,17 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, ps = msm_camera_get_power_settings(ctrl, pd->seq_type, pd->seq_val); - - if (ps) -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [pd->seq_val].regulator[0], - 0); -#else - msm_camera_config_single_vreg(ctrl->dev, + if (ps) { + if (pd->seq_val < ctrl->num_vreg) + msm_camera_config_single_vreg(ctrl->dev, &ctrl->cam_vreg[pd->seq_val], (struct regulator **)&ps->data[0], 0); -#endif - else + else + pr_err("%s:%d:seq_val:%d > num_vreg: %d\n" + , __func__, __LINE__, + pd->seq_val, ctrl->num_vreg); + } else pr_err("%s error in power up/down seq data\n", __func__); break; @@ -1801,19 +1522,12 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, pd->seq_type); break; } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (pd->delay) { - usleep_range(pd->delay * 100, - (pd->delay * 100) + 100); - } -#else if (pd->delay > 20) { msleep(pd->delay); } else if (pd->delay) { usleep_range(pd->delay * 1000, (pd->delay * 1000) + 1000); } -#endif } if (ctrl->cam_pinctrl_status) { ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, @@ -1824,11 +1538,9 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); } ctrl->cam_pinctrl_status = 0; - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } + msm_camera_request_gpio_table( + ctrl->gpio_conf->cam_gpio_req_tbl, + ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); CDBG("%s exit\n", __func__); return 0; } diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.h b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.h index 2eece61d4633..d86e77e66706 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.h +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.h @@ -46,10 +46,6 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, int msm_camera_get_dt_vreg_data(struct device_node *of_node, struct camera_vreg_t **cam_vreg, int *num_vreg); -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf); -#endif - int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, enum msm_camera_device_type_t device_type, struct msm_camera_i2c_client *sensor_i2c_client); @@ -61,6 +57,5 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, int num_vreg, struct msm_sensor_power_setting *power_setting, uint16_t power_setting_size); -int query_cam_power_status(void); #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c.h b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c.h index 59b6b6629f86..8db373104b4c 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c.h +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -23,6 +23,7 @@ struct msm_camera_i2c_client { struct msm_camera_cci_client *cci_client; struct msm_camera_spi_client *spi_client; enum msm_camera_i2c_reg_addr_type addr_type; + enum msm_camera_qup_i2c_write_batch_size_t batch_size; }; struct msm_camera_i2c_fn_t { @@ -36,8 +37,6 @@ struct msm_camera_i2c_fn_t { uint8_t *, uint32_t); int32_t (*i2c_write_table)(struct msm_camera_i2c_client *, struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_burst_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); int32_t (*i2c_write_seq_table)(struct msm_camera_i2c_client *, struct msm_camera_i2c_seq_reg_setting *); int32_t (*i2c_write_table_w_microdelay) @@ -50,6 +49,13 @@ struct msm_camera_i2c_fn_t { int32_t (*i2c_poll)(struct msm_camera_i2c_client *client, uint32_t addr, uint16_t data, enum msm_camera_i2c_data_type data_type); + int32_t (*i2c_read_burst)(struct msm_camera_i2c_client *client, + uint32_t read_byte, uint8_t *buffer, uint32_t addr, + enum msm_camera_i2c_data_type data_type); + int32_t (*i2c_write_burst)(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting, uint32_t reg_size, + uint32_t buf_len, uint32_t addr, + enum msm_camera_i2c_data_type data_type); }; int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, @@ -70,10 +76,6 @@ int32_t msm_camera_cci_i2c_write_table( struct msm_camera_i2c_client *client, struct msm_camera_i2c_reg_setting *write_setting); -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - int32_t msm_camera_cci_i2c_write_seq_table( struct msm_camera_i2c_client *client, struct msm_camera_i2c_seq_reg_setting *write_setting); diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c_mux.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c_mux.c index cd2af2c2751e..888af7e1eb37 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c_mux.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_i2c_mux.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundatation. All rights reserved. +/* Copyright (c) 2011-2014, The Linux Foundatation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include "msm_camera_i2c_mux.h" /* TODO move this somewhere else */ diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_io_util.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_io_util.c index 00f068411267..ffd1f1e9b443 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_io_util.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_io_util.c @@ -17,46 +17,23 @@ #include #include #include -#include #include #include "msm_camera_io_util.h" #define BUFF_SIZE_128 128 -#define CDBG(fmt, args...) pr_err(fmt, ##args) #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG #define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#ifdef CONFIG_MFD_RT5033_RESET_WA -#ifdef CONFIG_CAM_USE_EXT_VANA_GPIO -#define RT5033_RESET_WA_VREG_NAME ("cam_vdig") -#else -#define RT5033_RESET_WA_VREG_NAME ("cam_vana") -#endif -#endif - -#if defined(CONFIG_MACH_A5_CHN_CTC) || defined(CONFIG_MACH_A5_CHN_OPEN) || defined(CONFIG_MACH_A5_CHN_ZH) || defined(CONFIG_MACH_A5_CHN_ZT) -extern unsigned int system_rev; -#define RESET_REV_CHECK_NUM 10 -#endif - -#if defined(CONFIG_SEC_A7X_PROJECT) -extern unsigned int system_rev; -#endif void msm_camera_io_w(u32 data, void __iomem *addr) { - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); + CDBG("%s: 0x%p %08x\n", __func__, (addr), (data)); writel_relaxed((data), (addr)); } void msm_camera_io_w_mb(u32 data, void __iomem *addr) { - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); + CDBG("%s: 0x%p %08x\n", __func__, (addr), (data)); wmb(); writel_relaxed((data), (addr)); wmb(); @@ -65,7 +42,7 @@ void msm_camera_io_w_mb(u32 data, void __iomem *addr) u32 msm_camera_io_r(void __iomem *addr) { uint32_t data = readl_relaxed(addr); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); + CDBG("%s: 0x%p %08x\n", __func__, (addr), (data)); return data; } @@ -75,7 +52,7 @@ u32 msm_camera_io_r_mb(void __iomem *addr) rmb(); data = readl_relaxed(addr); rmb(); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); + CDBG("%s: 0x%p %08x\n", __func__, (addr), (data)); return data; } @@ -96,12 +73,12 @@ void msm_camera_io_dump(void __iomem *addr, int size) int i; u32 *p = (u32 *) addr; u32 data; - CDBG("%s: %pK %d\n", __func__, addr, size); + CDBG("%s: %p %d\n", __func__, addr, size); line_str[0] = '\0'; p_str = line_str; for (i = 0; i < size/4; i++) { if (i % 4 == 0) { - snprintf(p_str, 12, "0x%pK: ", p); + snprintf(p_str, 12, "0x%p: ", p); p_str += 10; } data = readl_relaxed(p++); @@ -120,7 +97,7 @@ void msm_camera_io_dump(void __iomem *addr, int size) void msm_camera_io_memcpy(void __iomem *dest_addr, void __iomem *src_addr, u32 len) { - CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len); + CDBG("%s: %p %p %d\n", __func__, dest_addr, src_addr, len); msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4); msm_camera_io_dump(dest_addr, len); } @@ -172,8 +149,7 @@ int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, long clk_rate; if (enable) { for (i = 0; i < num_clk; i++) { - CDBG("%s enable %s\n", __func__, - clk_info[i].clk_name); + CDBG("%s enable %s\n", __func__, clk_info[i].clk_name); clk_ptr[i] = clk_get(dev, clk_info[i].clk_name); if (IS_ERR(clk_ptr[i])) { pr_err("%s get failed\n", clk_info[i].clk_name); @@ -181,13 +157,21 @@ int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, goto cam_clk_get_err; } if (clk_info[i].clk_rate > 0) { + clk_rate = clk_round_rate(clk_ptr[i], + clk_info[i].clk_rate); + if (clk_rate < 0) { + pr_err("%s round failed\n", + clk_info[i].clk_name); + goto cam_clk_set_err; + } rc = clk_set_rate(clk_ptr[i], - clk_info[i].clk_rate); + clk_rate); if (rc < 0) { pr_err("%s set failed\n", - clk_info[i].clk_name); + clk_info[i].clk_name); goto cam_clk_set_err; } + } else if (clk_info[i].clk_rate == INIT_RATE) { clk_rate = clk_get_rate(clk_ptr[i]); if (clk_rate == 0) { @@ -296,7 +280,7 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, reg_ptr[j] = NULL; goto vreg_get_fail; } - if (curr_vreg->type == REG_LDO) { + if (regulator_count_voltages(reg_ptr[j]) > 0) { rc = regulator_set_voltage( reg_ptr[j], curr_vreg->min_voltage, @@ -331,7 +315,7 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, j = i; curr_vreg = &cam_vreg[j]; if (reg_ptr[j]) { - if (curr_vreg->type == REG_LDO) { + if (regulator_count_voltages(reg_ptr[j]) > 0) { if (curr_vreg->op_mode >= 0) { regulator_set_optimum_mode( reg_ptr[j], 0); @@ -348,11 +332,11 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, return 0; vreg_unconfig: -if (curr_vreg->type == REG_LDO) +if (regulator_count_voltages(reg_ptr[j]) > 0) regulator_set_optimum_mode(reg_ptr[j], 0); vreg_set_opt_mode_fail: -if (curr_vreg->type == REG_LDO) +if (regulator_count_voltages(reg_ptr[j]) > 0) regulator_set_voltage(reg_ptr[j], 0, curr_vreg->max_voltage); @@ -479,7 +463,7 @@ void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, case S_DEFAULT: break; default: - pr_warning("%s: INVALID CASE\n", __func__); + pr_err("%s: INVALID CASE\n", __func__); } } @@ -509,122 +493,70 @@ int msm_camera_config_single_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config) { int rc = 0; -#ifdef CONFIG_MFD_RT5033_RESET_WA - int rt_rc = 0; -#endif + const char *vreg_name = NULL; - if (config) { - if (!dev || !cam_vreg || !reg_ptr || !(cam_vreg->reg_name)) { - pr_err("%s: get failed NULL parameter\n", __func__); + if (!dev || !cam_vreg || !reg_ptr) { + pr_err("%s: get failed NULL parameter\n", __func__); + goto vreg_get_fail; + } + if (cam_vreg->type == VREG_TYPE_CUSTOM) { + if (cam_vreg->custom_vreg_name == NULL) { + pr_err("%s : can't find sub reg name", + __func__); goto vreg_get_fail; } - CDBG("%s enable %s\n", __func__, cam_vreg->reg_name); - if (!strncmp(cam_vreg->reg_name, "cam_vdig", 8)) { -#if defined(CONFIG_SEC_ROSSA_PROJECT) - *reg_ptr = regulator_get(dev, "CAM_SENSOR_IO_1.8V"); -#else - *reg_ptr = regulator_get(dev, "CAM_SENSOR_CORE_1.2V"); -#endif - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } + vreg_name = cam_vreg->custom_vreg_name; + } else { + if (cam_vreg->reg_name == NULL) { + pr_err("%s : can't find reg name", __func__); + goto vreg_get_fail; } + vreg_name = cam_vreg->reg_name; + } -#if defined(CONFIG_SEC_A8_PROJECT) || defined(CONFIG_SEC_O7_PROJECT) || defined(CONFIG_MACH_J7_USA_SPR) || defined(CONFIG_SEC_ON7N_PROJECT) - else if (!strncmp(cam_vreg->reg_name, "cam_vaf", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#else - else if (!strncmp(cam_vreg->reg_name, "cam_vana", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#endif -#if defined(CONFIG_SEC_A7X_PROJECT) - else if (!strncmp(cam_vreg->reg_name, "cam_vaf", 8) && system_rev == 0) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } + if (config) { + CDBG("%s enable %s\n", __func__, vreg_name); + *reg_ptr = regulator_get(dev, vreg_name); + if (IS_ERR(*reg_ptr)) { + pr_err("%s: %s get failed\n", __func__, vreg_name); + *reg_ptr = NULL; + goto vreg_get_fail; } -#endif - else { - CDBG("Regulator - Entering Else Part\n"); - *reg_ptr = regulator_get(dev, cam_vreg->reg_name); - if (IS_ERR_OR_NULL(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; + if (regulator_count_voltages(*reg_ptr) > 0) { + CDBG("%s: voltage min=%d, max=%d\n", + __func__, cam_vreg->min_voltage, + cam_vreg->max_voltage); + rc = regulator_set_voltage( + *reg_ptr, cam_vreg->min_voltage, + cam_vreg->max_voltage); + if (rc < 0) { + pr_err("%s: %s set voltage failed\n", + __func__, vreg_name); + goto vreg_set_voltage_fail; } - if (cam_vreg->type == REG_LDO) { - CDBG("LDO - Inside REG_LDO\n"); - rc = regulator_set_voltage( - *reg_ptr, cam_vreg->min_voltage, - cam_vreg->max_voltage); + if (cam_vreg->op_mode >= 0) { + rc = regulator_set_optimum_mode(*reg_ptr, + cam_vreg->op_mode); if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (cam_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode(*reg_ptr, - cam_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s: %s set optimum mode failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } + pr_err( + "%s: %s set optimum mode failed\n", + __func__, vreg_name); + goto vreg_set_opt_mode_fail; } } } -#ifdef CONFIG_MFD_RT5033_RESET_WA - if (!strncmp(cam_vreg->reg_name, RT5033_RESET_WA_VREG_NAME, 8)){ - rt_rc = regulator_get_status(*reg_ptr); -#if defined(CONFIG_MACH_A5_CHN_CTC) || defined(CONFIG_MACH_A5_CHN_OPEN) || defined(CONFIG_MACH_A5_CHN_ZH) || defined(CONFIG_MACH_A5_CHN_ZT) - if ((system_rev > RESET_REV_CHECK_NUM && rt_rc==2) || rt_rc==8) -#else - if((rt_rc == 2) || (rt_rc == 8)) -#endif - { - BUG_ON(1); - } else { - pr_err("[RT5033] result : 0x%x\n", rt_rc); - } - } -#endif - CDBG("Going to Enable the Regulator %s,%d\n",cam_vreg->reg_name,__LINE__); rc = regulator_enable(*reg_ptr); - CDBG("After Enabling the Regulator %s - rc=%d\n",cam_vreg->reg_name,rc); if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg->reg_name); + pr_err("%s: %s regulator_enable failed\n", __func__, + vreg_name); goto vreg_unconfig; } } else { - CDBG("Regulator - %s,%d\n",__func__,__LINE__); + CDBG("%s disable %s\n", __func__, vreg_name); if (*reg_ptr) { - CDBG("%s disable %s\n", __func__, cam_vreg->reg_name); + CDBG("%s disable %s\n", __func__, vreg_name); regulator_disable(*reg_ptr); - if (cam_vreg->type == REG_LDO) { + if (regulator_count_voltages(*reg_ptr) > 0) { if (cam_vreg->op_mode >= 0) regulator_set_optimum_mode(*reg_ptr, 0); regulator_set_voltage( @@ -632,17 +564,18 @@ int msm_camera_config_single_vreg(struct device *dev, } regulator_put(*reg_ptr); *reg_ptr = NULL; + } else { + pr_err("%s can't disable %s\n", __func__, vreg_name); } } - CDBG("Before Return - %s,%d\n",__func__,__LINE__); return 0; vreg_unconfig: -if (cam_vreg->type == REG_LDO) +if (regulator_count_voltages(*reg_ptr) > 0) regulator_set_optimum_mode(*reg_ptr, 0); vreg_set_opt_mode_fail: -if (cam_vreg->type == REG_LDO) +if (regulator_count_voltages(*reg_ptr) > 0) regulator_set_voltage(*reg_ptr, 0, cam_vreg->max_voltage); vreg_set_voltage_fail: @@ -659,7 +592,7 @@ int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, int rc = 0, i = 0, err = 0; if (!gpio_tbl || !size) { - pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__, + pr_err("%s:%d invalid gpio_tbl %p / size %d\n", __func__, __LINE__, gpio_tbl, size); return -EINVAL; } diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_qup_i2c.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_qup_i2c.c index 0f46c53858c4..f8e74a9a5cc5 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_qup_i2c.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_qup_i2c.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011, 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -64,7 +64,7 @@ static int32_t msm_camera_qup_i2c_txdata( .flags = 0, .len = length, .buf = txdata, - }, + }, }; rc = i2c_transfer(dev_client->client->adapter, msg, 1); if (rc < 0) @@ -72,12 +72,37 @@ static int32_t msm_camera_qup_i2c_txdata( return rc; } +static int32_t msm_camera_qup_i2c_txdata_batch( + struct msm_camera_i2c_client *dev_client, + unsigned char txdata[dev_client->batch_size][4], + int length) +{ + int32_t rc = 0; + uint16_t saddr = dev_client->client->addr >> 1; + struct i2c_msg msg[dev_client->batch_size]; + int i=0; + int batch_size = dev_client->batch_size; + + for (i=0; i < batch_size; i++) { + msg[i].addr = saddr; + msg[i].flags = 0; + msg[i].len = length; + msg[i].buf = txdata[i]; + } + + rc = i2c_transfer(dev_client->client->adapter, msg, batch_size); + if (rc < 0) + pr_err("msm_camera_qup_i2c_txdata_batch failed 0x%x\n", + saddr); + return rc; +} + int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, uint32_t addr, uint16_t *data, enum msm_camera_i2c_data_type data_type) { int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; + unsigned char *buf = NULL; if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) @@ -85,6 +110,17 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, && data_type != MSM_CAMERA_I2C_WORD_DATA)) return rc; + if (client->addr_type > UINT_MAX - data_type) { + pr_err("%s: integer overflow prevented\n", __func__); + return rc; + } + + buf = kzalloc(client->addr_type+data_type, GFP_KERNEL); + if (!buf) { + pr_err("%s:%d no memory\n", __func__, __LINE__); + return -ENOMEM; + } + if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { buf[0] = addr; } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { @@ -94,6 +130,8 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, rc = msm_camera_qup_i2c_rxdata(client, buf, data_type); if (rc < 0) { S_I2C_DBG("%s fail\n", __func__); + kfree(buf); + buf = NULL; return rc; } @@ -103,6 +141,8 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, *data = buf[0] << 8 | buf[1]; S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); + kfree(buf); + buf = NULL; return rc; } @@ -110,7 +150,7 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, uint32_t addr, uint8_t *data, uint32_t num_byte) { int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; + unsigned char *buf = NULL; int i; if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR @@ -118,6 +158,22 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, || num_byte == 0) return rc; + if (num_byte > I2C_REG_DATA_MAX) { + pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n", + __func__, num_byte, I2C_REG_DATA_MAX); + return rc; + } + if (client->addr_type > UINT_MAX - num_byte) { + pr_err("%s: integer overflow prevented\n", __func__); + return rc; + } + + buf = kzalloc(client->addr_type+num_byte, GFP_KERNEL); + if (!buf) { + pr_err("%s:%d no memory\n", __func__, __LINE__); + return -ENOMEM; + } + if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { buf[0] = addr; } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { @@ -127,6 +183,8 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, rc = msm_camera_qup_i2c_rxdata(client, buf, num_byte); if (rc < 0) { S_I2C_DBG("%s fail\n", __func__); + kfree(buf); + buf = NULL; return rc; } @@ -136,6 +194,8 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); S_I2C_DBG("Data: 0x%x\n", data[i]); } + kfree(buf); + buf = NULL; return rc; } @@ -153,11 +213,11 @@ int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, && data_type != MSM_CAMERA_I2C_WORD_DATA)) return rc; - S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", - __func__, addr, data_type); + S_I2C_DBG("%s reg addr = 0x%x addr_type: 0x%x data type: %d\n", + __func__, addr, client->addr_type, data_type); if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + S_I2C_DBG("%s:%d byte %d: 0x%x\n", __func__,__LINE__, len, buf[len]); len = 1; } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { @@ -187,6 +247,149 @@ int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, return rc; } +int32_t msm_camera_qup_i2c_write_word_addr_byte_data_batch( + struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting) +{ + int32_t rc = -EFAULT; + unsigned char buf[client->batch_size][4]; + uint8_t len = 0; + int i = 0; + int batch_size = client->batch_size; + + for (i=0; i < batch_size; i++) { + S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", + __func__, reg_setting->addr, + MSM_CAMERA_I2C_BYTE_DATA); + + buf[i][0] = reg_setting->reg_addr >> BITS_PER_BYTE; + buf[i][1] = reg_setting->reg_addr; + + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len, buf[i][len]); + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len+1, buf[i][len+1]); + + S_I2C_DBG("Data: 0x%x\n", reg_setting->reg_data); + buf[i][2] = reg_setting->reg_data; + + S_I2C_DBG("Byte %d: 0x%x\n", len +2, buf[i][len+2]); + len = 3; + reg_setting++; + } + rc = msm_camera_qup_i2c_txdata_batch(client, buf, len); + if (rc < 0) + S_I2C_DBG("%s fail\n", __func__); + return rc; +} + +int32_t msm_camera_qup_i2c_write_word_addr_word_data_batch( + struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting) +{ + int32_t rc = -EFAULT; + unsigned char buf[client->batch_size][4]; + uint8_t len = 0; + int i = 0; + int batch_size = client->batch_size; + + for (i=0; i < batch_size; i++) { + S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", + __func__, reg_setting->addr, + MSM_CAMERA_I2C_BYTE_DATA); + + buf[i][0] = reg_setting->reg_addr >> BITS_PER_BYTE; + buf[i][1] = reg_setting->reg_addr; + + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len, buf[i][len]); + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len+1, buf[i][len+1]); + + S_I2C_DBG("Data: 0x%x\n", reg_setting->reg_data); + buf[i][2] = reg_setting->reg_data >> BITS_PER_BYTE; + buf[i][3] = reg_setting->reg_data; + + S_I2C_DBG("Byte %d: 0x%x\n", len+2, buf[len+2]); + S_I2C_DBG("Byte %d: 0x%x\n", len+3, buf[len+3]); + + len = 4; + reg_setting++; + } + rc = msm_camera_qup_i2c_txdata_batch(client, buf, len); + if (rc < 0) + S_I2C_DBG("%s fail\n", __func__); + return rc; +} + +int32_t msm_camera_qup_i2c_write_byte_addr_word_data_batch( + struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting) +{ + int32_t rc = -EFAULT; + unsigned char buf[client->batch_size][4]; + uint8_t len = 0; + int i = 0; + int batch_size = client->batch_size; + + for (i=0; i < batch_size; i++) { + S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", + __func__, reg_setting->addr, + MSM_CAMERA_I2C_BYTE_DATA); + + buf[i][0] = reg_setting->reg_addr; + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len, buf[i][len]); + + S_I2C_DBG("Data: 0x%x\n", reg_setting->reg_data); + buf[i][1] = reg_setting->reg_data >> BITS_PER_BYTE; + buf[i][2] = reg_setting->reg_data; + + S_I2C_DBG("Byte %d: 0x%x\n", len+1, buf[len+1]); + S_I2C_DBG("Byte %d: 0x%x\n", len+2, buf[len+2]); + + len = 3; + reg_setting++; + } + rc = msm_camera_qup_i2c_txdata_batch(client, buf, len); + if (rc < 0) + S_I2C_DBG("%s fail\n", __func__); + return rc; +} + +int32_t msm_camera_qup_i2c_write_byte_addr_byte_data_batch( + struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting) +{ + int32_t rc = -EFAULT; + unsigned char buf[client->batch_size][4]; + uint8_t len = 0; + int i = 0; + int batch_size = client->batch_size; + + for (i=0; i < batch_size; i++) { + S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", + __func__, reg_setting->addr, + MSM_CAMERA_I2C_BYTE_DATA); + + buf[i][0] = reg_setting->reg_addr; + + S_I2C_DBG("%s byte %d: 0x%x\n", __func__, + len, buf[i][len]); + + S_I2C_DBG("Data: 0x%x\n", reg_setting->reg_data); + buf[i][1] = reg_setting->reg_data; + + S_I2C_DBG("Byte %d: 0x%x\n", len +2, buf[i][len+1]); + len = 2; + reg_setting++; + } + rc = msm_camera_qup_i2c_txdata_batch(client, buf, len); + if (rc < 0) + S_I2C_DBG("%s fail\n", __func__); + return rc; +} + int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, uint32_t addr, uint8_t *data, uint32_t num_byte) { @@ -215,6 +418,11 @@ int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, len+1, buf[len+1]); len = 2; } + if (num_byte > I2C_SEQ_REG_DATA_MAX) { + pr_err("%s: num_byte=%d clamped to max supported %d\n", + __func__, num_byte, I2C_SEQ_REG_DATA_MAX); + num_byte = I2C_SEQ_REG_DATA_MAX; + } for (i = 0; i < num_byte; i++) { buf[i+len] = data[i]; S_I2C_DBG("Byte %d: 0x%x\n", i+len, buf[i+len]); @@ -233,6 +441,9 @@ int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, int32_t rc = -EFAULT; struct msm_camera_i2c_reg_array *reg_setting; uint16_t client_addr_type; + int num_batch = 0; + int excess = 0; + int batch_size = 1; if (!client || !write_setting) return rc; @@ -247,16 +458,67 @@ int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, client_addr_type = client->addr_type; client->addr_type = write_setting->addr_type; - for (i = 0; i < write_setting->size; i++) { + if (write_setting->qup_i2c_batch == MSM_CAMERA_I2C_BATCH_ENABLE) + client->batch_size = MSM_CAMERA_I2C_BATCH_SIZE_5; + else + client->batch_size = MSM_CAMERA_I2C_BATCH_SIZE_1; + + batch_size = client->batch_size; + num_batch = write_setting->size / batch_size; + excess = write_setting->size % batch_size; + + if (write_setting->addr_type == MSM_CAMERA_I2C_WORD_ADDR && + write_setting->data_type == MSM_CAMERA_I2C_BYTE_DATA) { + for (i = 0; i < num_batch; i++) { + rc = msm_camera_qup_i2c_write_word_addr_byte_data_batch(client, + reg_setting); + if (rc < 0) + break; + reg_setting += batch_size; + } + + } else if (write_setting->addr_type == MSM_CAMERA_I2C_WORD_ADDR && + write_setting->data_type == MSM_CAMERA_I2C_WORD_DATA) { + for (i = 0; i < num_batch; i++) { + rc = msm_camera_qup_i2c_write_word_addr_word_data_batch(client, + reg_setting); + if (rc < 0) + break; + reg_setting += batch_size; + } + + } else if (write_setting->addr_type == MSM_CAMERA_I2C_BYTE_ADDR && + write_setting->data_type == MSM_CAMERA_I2C_BYTE_DATA) { + for (i = 0; i < num_batch; i++) { + rc = msm_camera_qup_i2c_write_byte_addr_byte_data_batch(client, + reg_setting); + if (rc < 0) + break; + reg_setting += batch_size; + } + + } else if (write_setting->addr_type == MSM_CAMERA_I2C_BYTE_ADDR && + write_setting->data_type == MSM_CAMERA_I2C_WORD_DATA) { + for (i = 0; i < num_batch; i++) { + rc = msm_camera_qup_i2c_write_byte_addr_word_data_batch(client, + reg_setting); + if (rc < 0) + break; + reg_setting += batch_size; + } + + } + + for (i = 0; i < excess; i++) { CDBG("%s addr 0x%x data 0x%x\n", __func__, reg_setting->reg_addr, reg_setting->reg_data); - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, reg_setting->reg_data, write_setting->data_type); if (rc < 0) break; reg_setting++; } + if (write_setting->delay > 20) msleep(write_setting->delay); else if (write_setting->delay) diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.c index 5994572995bc..df52ad097db4 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.c @@ -23,7 +23,7 @@ #endif static int msm_camera_spi_txfr(struct spi_device *spi, char *txbuf, - char *rxbuf, int num_byte) + char *rxbuf, int num_byte) { struct spi_transfer t; struct spi_message m; @@ -38,6 +38,25 @@ static int msm_camera_spi_txfr(struct spi_device *spi, char *txbuf, return spi_sync(spi, &m); } +static int msm_camera_spi_txfr_read(struct spi_device *spi, char *txbuf, + char *rxbuf, int txlen, int rxlen) +{ + struct spi_transfer tx; + struct spi_transfer rx; + struct spi_message m; + memset(&tx, 0, sizeof(tx)); + memset(&rx, 0, sizeof(rx)); + tx.tx_buf = txbuf; + rx.rx_buf = rxbuf; + tx.len = txlen; + rx.len = rxlen; + spi_message_init(&m); + spi_message_add_tail(&tx, &m); + spi_message_add_tail(&rx, &m); + return spi_sync(spi, &m); +} + + /** * msm_camera_set_addr() - helper function to set transfer address * @addr: device address @@ -53,6 +72,8 @@ static void msm_camera_set_addr(uint32_t addr, uint8_t addr_len, char *str) { int i, len; + if (!addr_len) + return; if (addr_len < type) SPIDBG("%s: omitting higher bits in address\n", __func__); @@ -101,8 +122,8 @@ int32_t msm_camera_spi_tx_helper(struct msm_camera_i2c_client *client, uint8_t retries = client->spi_client->retries; if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) + && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) return rc; hlen = msm_camera_spi_get_hlen(inst); @@ -150,6 +171,72 @@ out: return rc; } +int32_t msm_camera_spi_tx_read(struct msm_camera_i2c_client *client, + struct msm_camera_spi_inst *inst, uint32_t addr, uint8_t *data, + uint32_t num_byte, char *tx, char *rx) +{ + int32_t rc = -EINVAL; + struct spi_device *spi = client->spi_client->spi_master; + char *ctx = NULL, *crx = NULL; + uint32_t hlen; + uint8_t retries = client->spi_client->retries; + + if ((client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) + return rc; + + hlen = msm_camera_spi_get_hlen(inst); + if (tx) + ctx = tx; + else + ctx = kzalloc(hlen, GFP_KERNEL); + if (!ctx) + return -ENOMEM; + if (num_byte) { + if (rx) + crx = rx; + else + crx = kzalloc(num_byte, GFP_KERNEL); + if (!crx) { + if (!tx) + kfree(ctx); + return -ENOMEM; + } + } else { + crx = NULL; + } + + ctx[0] = inst->opcode; + if (client->addr_type == MSM_CAMERA_I2C_3B_ADDR) { + msm_camera_set_addr(addr, inst->addr_len, client->addr_type, + ctx + 1); + } else { + ctx[1] = (addr >> BITS_PER_BYTE) & 0xFF; + ctx[2] = (addr & 0xFF); + ctx[3] = 0; + } + SPIDBG("%s: tx(%u): %02x %02x %02x %02x\n", __func__, + hlen, ctx[0], ctx[1], ctx[2], ctx[3]); + while ((rc = msm_camera_spi_txfr_read(spi, ctx, crx, hlen, num_byte)) + && retries) { + retries--; + msleep(client->spi_client->retry_delay); + } + if (rc < 0) { + pr_err("%s: failed %d\n", __func__, rc); + goto out; + } + if (data && num_byte && !rx) + memcpy(data, crx, num_byte); +out: + if (!tx) + kfree(ctx); + if (!rx) + kfree(crx); + return rc; +} + int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, uint32_t addr, uint16_t *data, enum msm_camera_i2c_data_type data_type) @@ -161,11 +248,13 @@ int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, && (data_type != MSM_CAMERA_I2C_WORD_DATA)) return rc; - rc = msm_camera_spi_tx_helper(client, + rc = msm_camera_spi_tx_read(client, &client->spi_client->cmd_tbl.read, addr, &temp[0], data_type, NULL, NULL); - if (rc < 0) + if (rc < 0) { + pr_err("%s: failed %d\n", __func__, rc); return rc; + } if (data_type == MSM_CAMERA_I2C_BYTE_DATA) *data = temp[0]; @@ -214,7 +303,7 @@ int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, } static int32_t msm_camera_spi_read_status_reg( - struct msm_camera_i2c_client *client, uint8_t *status) + struct msm_camera_i2c_client *client, uint8_t *status) { struct msm_camera_spi_inst *rs = &client->spi_client->cmd_tbl.read_status; @@ -226,13 +315,13 @@ static int32_t msm_camera_spi_read_status_reg( } static int32_t msm_camera_spi_device_busy(struct msm_camera_i2c_client *client, - uint8_t *busy) + uint8_t *busy) { int rc; uint8_t st = 0; rc = msm_camera_spi_read_status_reg(client, &st); if (rc < 0) { - SPIDBG("%s: failed to read status reg\n", __func__); + pr_err("%s: failed to read status reg\n", __func__); return rc; } *busy = st & client->spi_client->busy_mask; @@ -240,12 +329,12 @@ static int32_t msm_camera_spi_device_busy(struct msm_camera_i2c_client *client, } static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst) + struct msm_camera_spi_inst *inst) { uint8_t busy; int i, rc; SPIDBG("%s: op 0x%x wait start\n", __func__, inst->opcode); - for (i = 0; i <= inst->delay_count; i++) { + for (i = 0; i < inst->delay_count; i++) { rc = msm_camera_spi_device_busy(client, &busy); if (rc < 0) return rc; @@ -256,7 +345,7 @@ static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, SPIDBG("%s: op 0x%x wait\n", __func__, inst->opcode); } if (i > inst->delay_count) { - SPIDBG("%s: op %x timed out\n", __func__, inst->opcode); + pr_err("%s: op %x timed out\n", __func__, inst->opcode); return -ETIMEDOUT; } SPIDBG("%s: op %x finished\n", __func__, inst->opcode); @@ -264,23 +353,25 @@ static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, } static int32_t msm_camera_spi_write_enable( - struct msm_camera_i2c_client *client) + struct msm_camera_i2c_client *client) { struct msm_camera_spi_inst *we = &client->spi_client->cmd_tbl.write_enable; int rc; + if (0 == we->opcode) + return 0; if (we->addr_len != 0) { pr_err("%s: not implemented yet\n", __func__); return -EINVAL; } rc = msm_camera_spi_tx_helper(client, we, 0, NULL, 0, NULL, NULL); if (rc < 0) - SPIDBG("%s: write enable failed\n", __func__); + pr_err("%s: write enable failed\n", __func__); return rc; } int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size) + uint32_t addr, uint32_t size) { struct msm_camera_spi_inst *se = &client->spi_client->cmd_tbl.erase; int rc = 0; @@ -294,26 +385,27 @@ int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, if (rc < 0) return rc; rc = msm_camera_spi_tx_helper(client, se, cur, NULL, 0, - NULL, NULL); + NULL, NULL); if (rc < 0) { - SPIDBG("%s: erase failed\n", __func__); + pr_err("%s: erase failed\n", __func__); return rc; } rc = msm_camera_spi_wait(client, se); if (rc < 0) { - SPIDBG("%s: erase timedout\n", __func__); + pr_err("%s: erase timedout\n", __func__); return rc; } } return rc; } + /** * msm_camera_spi_page_program() - core function to perform write - * @client: need for obtaining SPI device - * @addr: address to program on device - * @data: data to write - * @len: size of data - * @tx: tx buffer, size >= header + len + * @client: need for obtaining SPI device + * @addr: address to program on device + * @data: data to write + * @len: size of data + * @tx: tx buffer, size >= header + len * * This function performs SPI write, and has no boundary check. Writing range * should not cross page boundary, or data will be corrupted. Transaction is @@ -321,7 +413,7 @@ int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, * used outside msm_camera_spi_write_seq(). */ static int32_t msm_camera_spi_page_program(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint16_t len, uint8_t *tx) + uint32_t addr, uint8_t *data, uint16_t len, uint8_t *tx) { int rc; struct msm_camera_spi_inst *pg = @@ -338,19 +430,20 @@ static int32_t msm_camera_spi_page_program(struct msm_camera_i2c_client *client, msm_camera_set_addr(addr, pg->addr_len, client->addr_type, tx + 1); memcpy(tx + header_len, data, len); SPIDBG("%s: tx(%u): %02x %02x %02x %02x\n", __func__, - len, tx[0], tx[1], tx[2], tx[3]); + len, tx[0], tx[1], tx[2], tx[3]); while ((rc = spi_write(spi, tx, len + header_len)) && retries) { rc = msm_camera_spi_wait(client, pg); msleep(client->spi_client->retry_delay); retries--; } if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); + pr_err("%s: failed %d\n", __func__, rc); return rc; } rc = msm_camera_spi_wait(client, pg); - return rc; + return rc; } + int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, uint32_t addr, uint8_t *data, uint32_t num_byte) { @@ -363,8 +456,8 @@ int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, char *tx, *pdata = data; int rc = -EINVAL; if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) + && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) return rc; /* single page write */ if ((addr % page_size) + num_byte <= page_size) { @@ -373,7 +466,7 @@ int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, if (!tx) goto NOMEM; rc = msm_camera_spi_page_program(client, addr, data, - num_byte, tx); + num_byte, tx); if (rc < 0) goto ERROR; goto OUT; @@ -387,7 +480,7 @@ int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, end = min(page_size, (addr % page_size) + num_byte); cur_len = end - (addr % page_size); rc = msm_camera_spi_page_program(client, addr, pdata, - cur_len, tx); + cur_len, tx); if (rc < 0) goto ERROR; addr += cur_len; @@ -396,11 +489,348 @@ int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, } goto OUT; NOMEM: - SPIDBG("%s: memory allocation failed\n", __func__); + pr_err("%s: memory allocation failed\n", __func__); + return -ENOMEM; +ERROR: + pr_err("%s: error write\n", __func__); +OUT: + kfree(tx); + return rc; +} + +int32_t msm_camera_spi_write(struct msm_camera_i2c_client *client, + uint32_t addr, uint16_t data, enum msm_camera_i2c_data_type data_type) +{ + struct msm_camera_spi_inst *pg = + &client->spi_client->cmd_tbl.page_program; + uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; + uint16_t len = 0; + char buf[data_type]; + char *tx; + int rc = -EINVAL; + if (((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) + || (data_type != MSM_CAMERA_I2C_BYTE_DATA + && data_type != MSM_CAMERA_I2C_WORD_DATA)) + return rc; + S_I2C_DBG("Data: 0x%x\n", data); + len = header_len + (uint8_t)data_type; + tx = kmalloc(len, GFP_KERNEL); + if (!tx) + goto NOMEM; + if (data_type == MSM_CAMERA_I2C_BYTE_DATA) { + buf[0] = data; + SPIDBG("Byte %d: 0x%x\n", len, buf[0]); + } else if (data_type == MSM_CAMERA_I2C_WORD_DATA) { + buf[0] = (data >> BITS_PER_BYTE) & 0x00FF; + buf[1] = (data & 0x00FF); + } + rc = msm_camera_spi_page_program(client, addr, buf, + (uint16_t)data_type, tx); + if (rc < 0) + goto ERROR; + goto OUT; +NOMEM: + pr_err("%s: memory allocation failed\n", __func__); return -ENOMEM; ERROR: - SPIDBG("%s: error write\n", __func__); + pr_err("%s: error write\n", __func__); OUT: kfree(tx); return rc; } +int32_t msm_camera_spi_write_table(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_setting *write_setting) +{ + int i; + int32_t rc = -EFAULT; + struct msm_camera_i2c_reg_array *reg_setting; + uint16_t client_addr_type; + if (!client || !write_setting) + return rc; + if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR + && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA + && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) + return rc; + reg_setting = write_setting->reg_setting; + client_addr_type = client->addr_type; + client->addr_type = write_setting->addr_type; + for (i = 0; i < write_setting->size; i++) { + SPIDBG("%s addr %x data %x\n", __func__, + reg_setting->reg_addr, reg_setting->reg_data); + rc = msm_camera_spi_write(client, reg_setting->reg_addr, + reg_setting->reg_data, write_setting->data_type); + if (rc < 0) + break; + reg_setting++; + } + if (write_setting->delay > 20) + msleep(write_setting->delay); + else if (write_setting->delay) + usleep_range(write_setting->delay * 1000, + (write_setting->delay + * 1000) + 1000); + client->addr_type = client_addr_type; + return rc; +} +uint32_t msm_get_burst_size(struct msm_camera_i2c_reg_array *reg_setting, + uint32_t reg_size, uint32_t index, uint16_t burst_addr) +{ + uint32_t i; + uint32_t cnt = 0; + for (i = index; i < reg_size; i++) { + if (reg_setting[i].reg_addr == burst_addr) + cnt++; + else + break; + } + return cnt; +} + +#ifdef SPI_DYNAMIC_ALLOC +int32_t msm_camera_spi_send_burst(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting, uint32_t reg_size, + struct msm_camera_burst_info *info, + enum msm_camera_i2c_data_type data_type) +{ + uint32_t i, j, k; + int32_t rc = 0; + uint32_t chunk_num, residue; + struct msm_camera_spi_inst *pg = + &client->spi_client->cmd_tbl.page_program; + uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; + uint8_t *ctx, *data; + uint32_t len; + if (info->burst_len == 0 || info->chunk_size == 0) { + pr_err("%s:%d Invalid argument\n", __func__, __LINE__); + return rc; + } + if (info->burst_start + info->burst_len > reg_size) { + pr_err("%s too big burst size, index=%d, size=%d\n", __func__, + info->burst_start, info->burst_len); + return rc; + } + chunk_num = info->burst_len / info->chunk_size; + residue = info->burst_len % info->chunk_size; + SPIDBG("%s header_len=%d, chunk nb=%d, residue=%d\n", + __func__, header_len, chunk_num, residue); + len = info->chunk_size * data_type + header_len; + SPIDBG("buffer allocation size = %d\n", len); + ctx = kmalloc(len, GFP_KERNEL); + if (!ctx) { + pr_err("%s %d memory alloc fail!\n", __func__, __LINE__); + return rc; + } + ctx[0] = pg->opcode; + ctx[1] = (info->burst_addr >> 8) & 0xff; + ctx[2] = info->burst_addr & 0xff; + k = info->burst_start; + for (i = 0; i < chunk_num; i++) { + data = ctx + header_len; + for (j = 0; j < info->chunk_size; j++) { + *data++ = (reg_setting[k+j].reg_data >> 8) & 0xff; + *data++ = reg_setting[k+j].reg_data & 0xff; + } + rc = msm_camera_spi_txfr(client->spi_client->spi_master, + (void *) ctx, NULL, + info->chunk_size * data_type + header_len); + if (rc < 0) { + pr_err("%s %d spi sending error = %d!!\n", + __func__, __LINE__, rc); + goto fail; + } + k += info->chunk_size; + } + SPIDBG("%s burst chunk start=%d, residue=%d\n", + __func__, k, residue); + if (residue) { + data = ctx + header_len; + for (j = 0; j < residue; j++) { + *data++ = (reg_setting[k+j].reg_data >> 8) & 0xff; + *data++ = reg_setting[k+j].reg_data & 0xff; + } + rc = msm_camera_spi_txfr(client->spi_client->spi_master, + (void *)ctx, NULL, + residue*data_type+header_len); + if (rc < 0) { + pr_err("%s %d spi sending error = %d!!\n", __func__, + __LINE__, rc); + goto fail; + } + } +fail: + kfree(ctx); + return rc; +} +#else /* SPI_DYNAMIC_ALLOC */ +int32_t msm_camera_spi_send_burst(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting, uint32_t reg_size, + struct msm_camera_burst_info *info, + enum msm_camera_i2c_data_type data_type) +{ + uint32_t i, j, k; + int32_t rc = 0; + uint32_t chunk_num, residue; + struct msm_camera_spi_inst *pg = + &client->spi_client->cmd_tbl.page_program; + uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; + struct msm_spi_write_burst_packet tx_buf; + if (info->burst_len == 0 || info->burst_len == 0 + || info->chunk_size == 0) { + pr_err("%s %d Invalid argument\n", __func__, __LINE__); + return rc; + } + if (info->burst_start + info->burst_len > reg_size) { + pr_err("%s too big burst size, index=%d, size=%d\n", __func__, + info->burst_start, info->burst_len); + return rc; + } + chunk_num = info->burst_len / info->chunk_size; + residue = info->burst_len % info->chunk_size; + SPIDBG("%s header_len=%d, chunk nb=%d, residue=%d\n", + __func__, header_len, chunk_num, residue); + tx_buf.cmd = pg->opcode; + tx_buf.addr_msb = (info->burst_addr >> 8) & 0xff; + tx_buf.addr_lsb = info->burst_addr & 0xff; + SPIDBG("%s cmd=%d, addr_msb=0x%x, addr_lsb=0x%x\n", __func__, + tx_buf.cmd, tx_buf.addr_msb, tx_buf.addr_lsb); + k = info->burst_start; + for (i = 0; i < chunk_num; i++) { + SPIDBG("%s burst chunk start=%d, chunk_size=%d, chunk_num=%d\n", + __func__, + k, info->chunk_size, i); + for (j = 0; j < info->chunk_size; j++) { + tx_buf.data_arr[j].data_msb = + (reg_setting[k+j].reg_data >> 8) & 0xff; + tx_buf.data_arr[j].data_lsb = + reg_setting[k+j].reg_data & 0xff; + } + rc = msm_camera_spi_txfr(client->spi_client->spi_master, + (void *)&tx_buf, NULL, + info->chunk_size * data_type+header_len); + if (rc < 0) { + pr_err("%s %d spi sending error = %d!!\n", __func__, + __LINE__, rc); + goto fail; + } + k += info->chunk_size; + } + SPIDBG("%s burst chunk start=%d, residue=%d\n", __func__, k, residue); + if (residue) { + for (j = 0; j < residue; j++) { + tx_buf.data_arr[j].data_msb = (reg_setting[k+j].reg_data + >> 8) & 0xff; + tx_buf.data_arr[j].data_lsb = reg_setting[k+j].reg_data + & 0xff; + } + rc = msm_camera_spi_txfr(client->spi_client->spi_master, + (void *)&tx_buf, NULL, + residue * data_type+header_len); + if (rc < 0) { + pr_err("%s %d spi sending error = %d!!\n", __func__, + __LINE__, rc); + goto fail; + } + } +fail: + return rc; +} +#endif /* SPI_DYNAMIC_ALLOC */ + +int32_t msm_camera_spi_write_burst(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting, uint32_t reg_size, + uint32_t buf_len, uint32_t burst_addr, + enum msm_camera_i2c_data_type data_type) +{ + int k = 0; + int32_t rc = -EFAULT; + struct msm_camera_burst_info burst_info; + SPIDBG(" %s: start\n", __func__); + if (buf_len <= 0) { + pr_err("%s Invalid parameter, buf_len = %d\n", + __func__, buf_len); + return rc; + } + if (reg_size <= 0 || reg_setting == NULL) { + pr_err("%s Invalid parameter, array_size = %d\n", + __func__, reg_size); + return rc; + } + + if ((client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + || (data_type != MSM_CAMERA_I2C_WORD_DATA)) + return rc; + + SPIDBG(" %s: buf_len=%d, reg_size=%d\n", __func__, buf_len, reg_size); + while (k < reg_size) { + if (reg_setting[k].reg_addr == burst_addr) { + memset(&burst_info, 0x00, + sizeof(struct msm_camera_burst_info)); + burst_info.burst_addr = burst_addr; + burst_info.burst_start = k; + burst_info.chunk_size = buf_len; + burst_info.burst_len = + msm_get_burst_size(reg_setting, reg_size, k, + burst_addr); + SPIDBG("%s burst start = %d, length = %d\n", __func__, + k, burst_info.burst_len); + rc = msm_camera_spi_send_burst(client, reg_setting, + reg_size, &burst_info, data_type); + if (rc < 0) { + pr_err("[%s::%d][spi_sync Error::%d]\n", + __func__, __LINE__, rc); + return rc; + } + k += burst_info.burst_len; + } else { + SPIDBG("%s word write, start = %d\n", __func__, k); + msm_camera_spi_write(client, reg_setting[k].reg_addr, + reg_setting[k].reg_data, data_type); + k++; + } + } + SPIDBG("%s: end\n", __func__); + return rc; +} + +int32_t msm_camera_spi_read_burst(struct msm_camera_i2c_client *client, + uint32_t read_byte, uint8_t *buffer, uint32_t burst_addr, + enum msm_camera_i2c_data_type data_type) +{ + int32_t rc = -EFAULT; + struct msm_camera_spi_inst *pg = + &client->spi_client->cmd_tbl.read; + uint32_t len = msm_camera_spi_get_hlen(pg); + uint8_t *tx_buf = NULL; + uint8_t *r = buffer; + SPIDBG("%s: start\n", __func__); + + if (buffer == NULL || read_byte == 0 || len == 0) { + pr_err("%s %d Invalid parameters!!\n", __func__, __LINE__); + return rc; + } + + if ((client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) + || (data_type != MSM_CAMERA_I2C_WORD_DATA)) + return rc; + tx_buf = kzalloc(len, GFP_KERNEL); + if (!tx_buf) + return -ENOMEM; + + tx_buf[0] = pg->opcode; + tx_buf[1] = (burst_addr >> 8) & 0xff; + tx_buf[2] = burst_addr & 0xff; + tx_buf[3] = 0; /* dummy */ + rc = msm_camera_spi_txfr_read(client->spi_client->spi_master, + &tx_buf[0], r, len, read_byte); + if (rc < 0) + pr_err("[%s::%d][spi_sync Error::%d]\n", __func__, + __LINE__, rc); + + kfree(tx_buf); + + SPIDBG("%s: end\n", __func__); + return rc; +} diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.h b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.h index 6bd53de31448..4b389fbf3766 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.h +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_spi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,6 +17,9 @@ #include #include "msm_camera_i2c.h" +#define MAX_SPI_SIZE 110 +#define SPI_DYNAMIC_ALLOC + /** * Common SPI communication scheme * tx: [addr][wait][write buffer] @@ -31,6 +34,25 @@ struct msm_camera_spi_inst { uint8_t delay_count; /* total delay count for this inst */ }; +struct msm_spi_write_burst_data { + u8 data_msb; + u8 data_lsb; +}; + +struct msm_spi_write_burst_packet { + u8 cmd; + u8 addr_msb; + u8 addr_lsb; + struct msm_spi_write_burst_data data_arr[MAX_SPI_SIZE]; +}; + +struct msm_camera_burst_info { + uint32_t burst_addr; + uint32_t burst_start; + uint32_t burst_len; + uint32_t chunk_size; +}; + struct msm_camera_spi_inst_tbl { struct msm_camera_spi_inst read; struct msm_camera_spi_inst read_seq; @@ -44,14 +66,10 @@ struct msm_camera_spi_inst_tbl { struct msm_camera_spi_client { struct spi_device *spi_master; struct msm_camera_spi_inst_tbl cmd_tbl; - uint8_t device_id; uint8_t device_id0; uint8_t device_id1; - uint8_t device_id2; - uint8_t mfr_id; uint8_t mfr_id0; uint8_t mfr_id1; - uint8_t mfr_id2; uint8_t retry_delay; /* ms */ uint8_t retries; /* retry times upon failure */ uint8_t busy_mask; /* busy bit in status reg */ @@ -80,6 +98,23 @@ int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, uint32_t addr, uint8_t *data, uint32_t num_byte); + int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size); + uint32_t addr, uint32_t size); + +int32_t msm_camera_spi_write(struct msm_camera_i2c_client *client, + uint32_t addr, uint16_t data, enum msm_camera_i2c_data_type data_type); + +int32_t msm_camera_spi_write_table(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_setting *write_setting); + +int32_t msm_camera_spi_write_burst(struct msm_camera_i2c_client *client, + struct msm_camera_i2c_reg_array *reg_setting, uint32_t reg_size, + uint32_t buf_len, uint32_t addr, + enum msm_camera_i2c_data_type data_type); + +int32_t msm_camera_spi_read_burst(struct msm_camera_i2c_client *client, + uint32_t read_byte, uint8_t *buffer, uint32_t addr, + enum msm_camera_i2c_data_type data_type); + #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c index a84d0ca2bb00..a6dd834da83a 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c +++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -9,85 +9,19 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#include #include "msm_sensor.h" #include "msm_sd.h" #include "camera.h" #include "msm_cci.h" #include "msm_camera_io_util.h" #include "msm_camera_i2c_mux.h" -#include #include #include -#if defined(CONFIG_MUIC_UNIVERSAL_SM5705_AFC) -#define DISABLE_AFC -#endif - -#ifdef DISABLE_AFC -#include -#endif -//#define CONFIG_MSMB_CAMERA_DEBUG #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -struct task_struct *qdaemon_task; -extern unsigned int system_rev; - -#if defined(CONFIG_FLED_LM3632) -extern void ssflash_led_turn_on(void); -extern void ssflash_led_turn_off(void); -#endif -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -int is_cam_powerd_on = 0; - -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) -int32_t msm_sensor_flash_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - - if(system_rev >= 5){ - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - if(s_ctrl->sensordata->slave_info->sensor_id == 0x5e30){ - if(cam_info->value_1 == 3) { - pr_err("%s : KTD Front LED turn on\n", __func__); - ktd2692_flash_on(1); - } else if(cam_info->value_1 == 0) { - pr_err("%s : KTD Front LED turn off\n", __func__); - ktd2692_flash_on(0); - }else{ - pr_err("%s : KTD Invalid LED value\n", __func__); - } - } - return 0; - }else{ - #if defined(CONFIG_FLED_LM3632) - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - if(s_ctrl->sensordata->slave_info->sensor_id == 0x5e30){ - if(cam_info->value_1 == 3) { - pr_err("%s : Front LED turn on\n", __func__); - ssflash_led_turn_on(); - } else if(cam_info->value_1 == 0) { - pr_err("%s : Front LED turn off\n", __func__); - ssflash_led_turn_off(); - }else{ - pr_err("%s : Invalid LED value\n", __func__); - } - } - #endif - return 0; -} -} -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) +static struct v4l2_file_operations msm_sensor_v4l2_subdev_fops; static void msm_sensor_adjust_mclk(struct msm_camera_power_ctrl_t *ctrl) { int idx; @@ -454,6 +388,7 @@ int32_t msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl) kfree(s_ctrl->sensordata->power_info.gpio_conf); kfree(s_ctrl->sensordata->power_info.cam_vreg); kfree(s_ctrl->sensordata->power_info.power_setting); + kfree(s_ctrl->sensordata->power_info.power_down_setting); kfree(s_ctrl->sensordata->csi_lane_params); kfree(s_ctrl->sensordata->sensor_info); kfree(s_ctrl->sensordata->power_info.clk_info); @@ -480,49 +415,24 @@ int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) struct msm_camera_power_ctrl_t *power_info; enum msm_camera_device_type_t sensor_device_type; struct msm_camera_i2c_client *sensor_i2c_client; - int rc = 0; - uint8_t camera_id; if (!s_ctrl) { - pr_err("%s:%d failed: s_ctrl %pK\n", + pr_err("%s:%d failed: s_ctrl %p\n", __func__, __LINE__, s_ctrl); return -EINVAL; } - power_info = &s_ctrl->sensordata->power_info; + power_info = &s_ctrl->sensordata->power_info; sensor_device_type = s_ctrl->sensor_device_type; sensor_i2c_client = s_ctrl->sensor_i2c_client; -#if defined(CONFIG_FLED_KTD2692) - if((s_ctrl->sensordata->slave_info->sensor_id == 0x5e30) || (s_ctrl->sensordata->slave_info->sensor_id == 0x0552)){ - pr_err("%s : Front LED turn off\n", __func__); - if(system_rev >= 5) - ktd2692_flash_on(0); - else - ktd2692_flash_on(0); - } -#endif - - camera_id = s_ctrl->sensordata->sensor_info->position; if (!power_info || !sensor_i2c_client) { - pr_err("%s:%d failed: power_info %pK sensor_i2c_client %pK\n", + pr_err("%s:%d failed: power_info %p sensor_i2c_client %p\n", __func__, __LINE__, power_info, sensor_i2c_client); return -EINVAL; } - -#ifdef DISABLE_AFC - if(0==camera_id) - { - muic_check_afc_state(0); - } -#endif - rc = msm_camera_power_down(power_info, sensor_device_type, + return msm_camera_power_down(power_info, sensor_device_type, sensor_i2c_client); - - if (rc == 0) - is_cam_powerd_on = 0; - - return rc; } int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) @@ -532,11 +442,10 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) struct msm_camera_i2c_client *sensor_i2c_client; struct msm_camera_slave_info *slave_info; const char *sensor_name; - uint8_t camera_id; uint32_t retry = 0; if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", + pr_err("%s:%d failed: %p\n", __func__, __LINE__, s_ctrl); return -EINVAL; } @@ -546,36 +455,16 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) slave_info = s_ctrl->sensordata->slave_info; sensor_name = s_ctrl->sensordata->sensor_name; - camera_id = s_ctrl->sensordata->sensor_info->position; if (!power_info || !sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK %pK\n", + pr_err("%s:%d failed: %p %p %p %p\n", __func__, __LINE__, power_info, sensor_i2c_client, slave_info, sensor_name); return -EINVAL; } - CDBG("set__mclk_23880000: %d", s_ctrl->set_mclk_23880000); if (s_ctrl->set_mclk_23880000) msm_sensor_adjust_mclk(power_info); - qdaemon_task = current; -#ifdef DISABLE_AFC - if(0==camera_id) - { - for (retry = 0; retry < 3; retry++) { - if(muic_check_afc_state(1) == 1) - break; - - pr_err("%s:%d ERROR: AFC disable unsuccessfull retrying after 30ms\n", __func__, __LINE__); - msleep(30); - } - - if (retry == 3) { - pr_err("%s:%d ERROR: AFC disable failed\n", __func__, __LINE__); - return -EINVAL; - } - } -#endif for (retry = 0; retry < 3; retry++) { rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type, @@ -592,19 +481,10 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) break; } } - if (rc == 0) - is_cam_powerd_on = 1; return rc; } - -int query_cam_power_status(void) -{ - return is_cam_powerd_on; -} - - int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) { int rc = 0; @@ -612,12 +492,9 @@ int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) struct msm_camera_i2c_client *sensor_i2c_client; struct msm_camera_slave_info *slave_info; const char *sensor_name; -#if defined(CONFIG_SEC_ROSSA_PROJECT) - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; -#endif if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", + pr_err("%s:%d failed: %p\n", __func__, __LINE__, s_ctrl); return -EINVAL; } @@ -626,52 +503,15 @@ int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) sensor_name = s_ctrl->sensordata->sensor_name; if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", + pr_err("%s:%d failed: %p %p %p\n", __func__, __LINE__, sensor_i2c_client, slave_info, sensor_name); return -EINVAL; } -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (slave_info->sensor_id == 0xb4) - data_type = MSM_CAMERA_I2C_BYTE_DATA; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, data_type); - if (chipid != slave_info->sensor_id) { - if(slave_info->sensor_id== 0x4405) - { - uint16_t original_sid = 0; - chipid = 0; - original_sid = sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x50 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr,&chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - chipid = 0; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x40 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, &chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - // If sensor id not matched finally, restore sensor_id and sid to original values. - pr_err("msm_sensor_match_id chip id doesnot match\n"); - s_ctrl->sensor_i2c_client->cci_client->sid = original_sid; - return 0; - } - } - } - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; - } -#else rc = sensor_i2c_client->i2c_func_tbl->i2c_read( sensor_i2c_client, slave_info->sensor_id_reg_addr, &chipid, MSM_CAMERA_I2C_WORD_DATA); -#endif if (rc < 0) { pr_err("%s: %s: read id failed\n", __func__, sensor_name); return rc; @@ -681,7 +521,7 @@ int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) slave_info->sensor_id); if (chipid != slave_info->sensor_id) { pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; //to pass DFMS with removing REAR cam + return -ENODEV; } return rc; } @@ -717,6 +557,7 @@ static int msm_sensor_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { + int rc = 0; struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); void __user *argp = (void __user *)arg; if (!s_ctrl) { @@ -725,28 +566,50 @@ static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd, } switch (cmd) { case VIDIOC_MSM_SENSOR_CFG: - return s_ctrl->func_tbl->sensor_config(s_ctrl, argp); +#ifdef CONFIG_COMPAT + if (is_compat_task()) + rc = s_ctrl->func_tbl->sensor_config32(s_ctrl, argp); + else +#endif + rc = s_ctrl->func_tbl->sensor_config(s_ctrl, argp); + return rc; case VIDIOC_MSM_SENSOR_GET_AF_STATUS: return msm_sensor_get_af_status(s_ctrl, argp); case VIDIOC_MSM_SENSOR_RELEASE: + case MSM_SD_SHUTDOWN: msm_sensor_stop_stream(s_ctrl); return 0; - case MSM_SD_SHUTDOWN: + case MSM_SD_NOTIFY_FREEZE: return 0; - case VIDIOC_MSM_SENSOR_NATIVE_CMD: - if( s_ctrl->func_tbl->sensor_native_control != NULL ) - return s_ctrl->func_tbl->sensor_native_control(s_ctrl, argp); - else - pr_err("s_ctrl->func_tbl->sensor_native_control is NULL\n"); - default: return -ENOIOCTLCMD; } } -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) +#ifdef CONFIG_COMPAT +static long msm_sensor_subdev_do_ioctl( + struct file *file, unsigned int cmd, void *arg) { - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + switch (cmd) { + case VIDIOC_MSM_SENSOR_CFG32: + cmd = VIDIOC_MSM_SENSOR_CFG; + default: + return msm_sensor_subdev_ioctl(sd, cmd, arg); + } +} + +long msm_sensor_subdev_fops_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) +{ + return video_usercopy(file, cmd, arg, msm_sensor_subdev_do_ioctl); +} + +static int msm_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, + void __user *argp) +{ + struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; int32_t rc = 0; int32_t i = 0; mutex_lock(s_ctrl->msm_sensor_mutex); @@ -754,15 +617,17 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) s_ctrl->sensordata->sensor_name, cdata->cfgtype); switch (cdata->cfgtype) { case CFG_GET_SENSOR_INFO: - pr_err("CFG_GET_SENSOR_INFO\n"); memcpy(cdata->cfg.sensor_info.sensor_name, s_ctrl->sensordata->sensor_name, sizeof(cdata->cfg.sensor_info.sensor_name)); cdata->cfg.sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) + for (i = 0; i < SUB_MODULE_MAX; i++) { cdata->cfg.sensor_info.subdev_id[i] = s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } cdata->cfg.sensor_info.is_mount_angle_valid = s_ctrl->sensordata->sensor_info->is_mount_angle_valid; cdata->cfg.sensor_info.sensor_mount_angle = @@ -771,13 +636,16 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) s_ctrl->sensordata->sensor_info->position; cdata->cfg.sensor_info.modes_supported = s_ctrl->sensordata->sensor_info->modes_supported; - pr_err("%s:%d sensor name %s\n", __func__, __LINE__, + CDBG("%s:%d sensor name %s\n", __func__, __LINE__, cdata->cfg.sensor_info.sensor_name); CDBG("%s:%d session id %d\n", __func__, __LINE__, cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) + for (i = 0; i < SUB_MODULE_MAX; i++) { CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, cdata->cfg.sensor_info.subdev_id[i]); + CDBG("%s:%d subdev_intf[%d] %d\n", __func__, __LINE__, + i, cdata->cfg.sensor_info.subdev_intf[i]); + } CDBG("%s:%d mount angle valid %d value %d\n", __func__, __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, cdata->cfg.sensor_info.sensor_mount_angle); @@ -796,129 +664,340 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) cdata->cfg.sensor_init_params.position, cdata->cfg.sensor_init_params.sensor_mount_angle); break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int s_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { + case CFG_WRITE_I2C_ARRAY: { + struct msm_camera_i2c_reg_setting32 conf_array32; + struct msm_camera_i2c_reg_setting conf_array; + struct msm_camera_i2c_reg_array *reg_setting = NULL; + + if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { + pr_err("%s:%d failed: invalid state %d\n", __func__, + __LINE__, s_ctrl->sensor_state); + rc = -EFAULT; + break; + } + + if (copy_from_user(&conf_array32, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(struct msm_camera_i2c_reg_setting32))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + conf_array.addr_type = conf_array32.addr_type; + conf_array.data_type = conf_array32.data_type; + conf_array.delay = conf_array32.delay; + conf_array.size = conf_array32.size; + conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); + conf_array.qup_i2c_batch = conf_array32.qup_i2c_batch; + + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + reg_setting = kzalloc(conf_array.size * + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); + if (!reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; + break; + } + if (copy_from_user(reg_setting, + (void *)(conf_array.reg_setting), + conf_array.size * + sizeof(struct msm_camera_i2c_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + kfree(reg_setting); + rc = -EFAULT; + break; + } + + conf_array.reg_setting = reg_setting; + + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_table(s_ctrl->sensor_i2c_client, + &conf_array); + kfree(reg_setting); + break; + } + case CFG_SLAVE_READ_I2C: { + struct msm_camera_i2c_read_config read_config; + uint16_t local_data = 0; + uint16_t orig_slave_addr = 0, read_slave_addr = 0; + if (copy_from_user(&read_config, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(struct msm_camera_i2c_read_config))) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { + read_slave_addr = read_config.slave_addr; + CDBG("%s:CFG_SLAVE_READ_I2C:", __func__); + CDBG("%s:slave_addr=0x%x reg_addr=0x%x, data_type=%d\n", + __func__, read_config.slave_addr, + read_config.reg_addr, read_config.data_type); + if (s_ctrl->sensor_i2c_client->cci_client) { + orig_slave_addr = + s_ctrl->sensor_i2c_client->cci_client->sid; s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - p_ctrl = &s_ctrl->sensordata->power_info; - - /* Update power up sequence */ - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; + read_slave_addr >> 1; + } else if (s_ctrl->sensor_i2c_client->client) { + orig_slave_addr = + s_ctrl->sensor_i2c_client->client->addr; + s_ctrl->sensor_i2c_client->client->addr = + read_slave_addr >> 1; + } else { + pr_err("%s: error: no i2c/cci client found.", __func__); + rc = -EFAULT; + break; + } + CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", + __func__, orig_slave_addr, + read_slave_addr >> 1); + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( + s_ctrl->sensor_i2c_client, + read_config.reg_addr, + &local_data, read_config.data_type); + if (rc < 0) { + pr_err("%s:%d: i2c_read failed\n", __func__, __LINE__); + break; + } + if (copy_to_user(&read_config.data, + (void *)&local_data, sizeof(uint16_t))) { + pr_err("%s:%d copy failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + break; + } + case CFG_WRITE_I2C_SEQ_ARRAY: { + struct msm_camera_i2c_seq_reg_setting32 conf_array32; + struct msm_camera_i2c_seq_reg_setting conf_array; + struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; + + if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { + pr_err("%s:%d failed: invalid state %d\n", __func__, + __LINE__, s_ctrl->sensor_state); + rc = -EFAULT; + break; + } + + if (copy_from_user(&conf_array32, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(struct msm_camera_i2c_seq_reg_setting32))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; } - p_ctrl->power_setting_size = size; + conf_array.addr_type = conf_array32.addr_type; + conf_array.delay = conf_array32.delay; + conf_array.size = conf_array32.size; + conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { + if (!conf_array.size || + conf_array.size > I2C_SEQ_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); rc = -EFAULT; break; } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (s_index = 0; s_index < - p_ctrl->power_setting_size; s_index++) { - CDBG("%s i %d power up setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_setting[s_index].seq_type, - p_ctrl->power_setting[s_index].seq_val, - p_ctrl->power_setting[s_index].config_val, - p_ctrl->power_setting[s_index].delay); - } - - /* Update power down sequence */ - if (!sensor_slave_info.power_setting_array.power_down_setting || - 0 == size) { - pr_err("%s: Missing dedicated power down sequence\n", - __func__); + + reg_setting = kzalloc(conf_array.size * + (sizeof(struct msm_camera_i2c_seq_reg_array)), + GFP_KERNEL); + if (!reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; + break; + } + if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, + conf_array.size * + sizeof(struct msm_camera_i2c_seq_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + kfree(reg_setting); + rc = -EFAULT; + break; + } + + conf_array.reg_setting = reg_setting; + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_seq_table(s_ctrl->sensor_i2c_client, + &conf_array); + kfree(reg_setting); + break; + } + + case CFG_POWER_UP: + if (s_ctrl->sensor_state != MSM_SENSOR_POWER_DOWN) { + pr_err("%s:%d failed: invalid state %d\n", __func__, + __LINE__, s_ctrl->sensor_state); + rc = -EFAULT; + break; + } + if (s_ctrl->func_tbl->sensor_power_up) { + if (s_ctrl->sensordata->misc_regulator) + msm_sensor_misc_regulator(s_ctrl, 1); + + rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); + if (rc < 0) { + pr_err("%s:%d failed rc %d\n", __func__, + __LINE__, rc); + break; + } + s_ctrl->sensor_state = MSM_SENSOR_POWER_UP; + CDBG("%s:%d sensor state %d\n", __func__, __LINE__, + s_ctrl->sensor_state); + } else { + rc = -EFAULT; + } + break; + case CFG_POWER_DOWN: + kfree(s_ctrl->stop_setting.reg_setting); + s_ctrl->stop_setting.reg_setting = NULL; + if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { + pr_err("%s:%d failed: invalid state %d\n", __func__, + __LINE__, s_ctrl->sensor_state); + rc = -EFAULT; break; } - size = sensor_slave_info.power_setting_array.size_down; + if (s_ctrl->func_tbl->sensor_power_down) { + if (s_ctrl->sensordata->misc_regulator) + msm_sensor_misc_regulator(s_ctrl, 0); - if (p_ctrl->power_down_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; + rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); + if (rc < 0) { + pr_err("%s:%d failed rc %d\n", __func__, + __LINE__, rc); break; } - kfree(p_ctrl->power_down_setting); - p_ctrl->power_down_setting = tmp; + s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; + CDBG("%s:%d sensor state %d\n", __func__, __LINE__, + s_ctrl->sensor_state); + } else { + rc = -EFAULT; + } + break; + case CFG_SET_STOP_STREAM_SETTING: { + struct msm_camera_i2c_reg_setting32 stop_setting32; + struct msm_camera_i2c_reg_setting *stop_setting = + &s_ctrl->stop_setting; + struct msm_camera_i2c_reg_array *reg_setting = NULL; + if (copy_from_user(&stop_setting32, + (void *)compat_ptr((cdata->cfg.setting)), + sizeof(struct msm_camera_i2c_reg_setting32))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; } - p_ctrl->power_down_setting_size = size; + stop_setting->addr_type = stop_setting32.addr_type; + stop_setting->data_type = stop_setting32.data_type; + stop_setting->delay = stop_setting32.delay; + stop_setting->size = stop_setting32.size; + stop_setting->qup_i2c_batch = stop_setting32.qup_i2c_batch; - rc = copy_from_user(p_ctrl->power_down_setting, (void *) - sensor_slave_info.power_setting_array. - power_down_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { + reg_setting = compat_ptr(stop_setting32.reg_setting); + + if (!stop_setting->size) { pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_down_setting); rc = -EFAULT; break; } - for (s_index = 0; s_index < - p_ctrl->power_down_setting_size; s_index++) { - CDBG("%s i %d power DOWN setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_down_setting[s_index].seq_type, - p_ctrl->power_down_setting[s_index].seq_val, - p_ctrl->power_down_setting[s_index].config_val, - p_ctrl->power_down_setting[s_index].delay); + stop_setting->reg_setting = kzalloc(stop_setting->size * + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); + if (!stop_setting->reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; + break; + } + if (copy_from_user(stop_setting->reg_setting, + (void *)reg_setting, + stop_setting->size * + sizeof(struct msm_camera_i2c_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + kfree(stop_setting->reg_setting); + stop_setting->reg_setting = NULL; + stop_setting->size = 0; + rc = -EFAULT; + break; } + break; + } + default: + rc = -EFAULT; break; } + + mutex_unlock(s_ctrl->msm_sensor_mutex); + + return rc; +} +#endif + +int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) +{ + struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; + int32_t rc = 0; + int32_t i = 0; + mutex_lock(s_ctrl->msm_sensor_mutex); + CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, + s_ctrl->sensordata->sensor_name, cdata->cfgtype); + switch (cdata->cfgtype) { + case CFG_GET_SENSOR_INFO: + memcpy(cdata->cfg.sensor_info.sensor_name, + s_ctrl->sensordata->sensor_name, + sizeof(cdata->cfg.sensor_info.sensor_name)); + cdata->cfg.sensor_info.session_id = + s_ctrl->sensordata->sensor_info->session_id; + for (i = 0; i < SUB_MODULE_MAX; i++) { + cdata->cfg.sensor_info.subdev_id[i] = + s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } + cdata->cfg.sensor_info.is_mount_angle_valid = + s_ctrl->sensordata->sensor_info->is_mount_angle_valid; + cdata->cfg.sensor_info.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + cdata->cfg.sensor_info.position = + s_ctrl->sensordata->sensor_info->position; + cdata->cfg.sensor_info.modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + CDBG("%s:%d sensor name %s\n", __func__, __LINE__, + cdata->cfg.sensor_info.sensor_name); + CDBG("%s:%d session id %d\n", __func__, __LINE__, + cdata->cfg.sensor_info.session_id); + for (i = 0; i < SUB_MODULE_MAX; i++) { + CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, + cdata->cfg.sensor_info.subdev_id[i]); + CDBG("%s:%d subdev_intf[%d] %d\n", __func__, __LINE__, + i, cdata->cfg.sensor_info.subdev_intf[i]); + } + CDBG("%s:%d mount angle valid %d value %d\n", __func__, + __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, + cdata->cfg.sensor_info.sensor_mount_angle); + + break; + case CFG_GET_SENSOR_INIT_PARAMS: + cdata->cfg.sensor_init_params.modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + cdata->cfg.sensor_init_params.position = + s_ctrl->sensordata->sensor_info->position; + cdata->cfg.sensor_init_params.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, + __LINE__, + cdata->cfg.sensor_init_params.modes_supported, + cdata->cfg.sensor_init_params.position, + cdata->cfg.sensor_init_params.sensor_mount_angle); + break; case CFG_WRITE_I2C_ARRAY: { struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_burst_reg_array *burst_reg_setting = NULL; struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint8_t *reg_data = NULL; - uint32_t i = 0, size = 0; - - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { pr_err("%s:%d failed: invalid state %d\n", __func__, @@ -935,129 +1014,33 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) break; } - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } - if (conf_array.data_type == MSM_CAMERA_I2C_BURST_DATA) { - CDBG("%s:%d MSM_CAMERA_I2C_BURST_DATA\n", __func__, __LINE__); - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - burst_reg_setting = (void *)kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_burst_reg_array)), GFP_KERNEL); - if (!burst_reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; + reg_setting = kzalloc(conf_array.size * + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); + if (!reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; break; - } - if (copy_from_user((void *)burst_reg_setting, - (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_burst_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(burst_reg_setting); - rc = -EFAULT; - break; - } - - size = conf_array.size; - conf_array.size = 1; - - for (i = 0; i < size; i++) { - reg_data = kzalloc(burst_reg_setting[i].reg_data_size * - (sizeof(uint8_t)), GFP_KERNEL); - if (!reg_data) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_data, - (void *)burst_reg_setting[i].reg_burst_data, - burst_reg_setting[i].reg_data_size * - (sizeof(uint8_t)))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_data); - continue; - } - - burst_reg_setting[i].reg_burst_data = reg_data; - conf_array.reg_setting = &burst_reg_setting[i]; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_burst_table( - s_ctrl->sensor_i2c_client, &conf_array); - if (rc < 0) { - pr_err("%s:%d failed i2c_write_table rc %d\n", __func__, - __LINE__, rc); - } - kfree(reg_data); - } - - kfree(reg_setting); - }else { - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - - if (conf_array.data_type == MSM_CAMERA_I2C_VARIABLE_LENGTH_DATA) { - struct msm_camera_i2c_reg_array* reg_array = (struct msm_camera_i2c_reg_array*)conf_array.reg_setting; - for (i = 0; i < conf_array.size;i++) { - if (i < 3) { - pr_err("%s:%d ASWOOGI addr : 0x%x, data : 0x%x, type : %d \n", - __func__, __LINE__, reg_array[i].reg_addr, reg_array[i].reg_data, reg_array[i].data_type); - } - -#if defined(CONFIG_SEC_A8_PROJECT) - /* delay */ - if (reg_array[i].reg_addr == 0xFFFF) { - pr_err("[Delay] start\n"); - usleep_range(reg_array[i].reg_data*1000, reg_array[i].reg_data*1000+10); - pr_err("[Delay] exit\n"); - } else { -#endif - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - reg_array[i].reg_addr, - reg_array[i].reg_data, - reg_array[i].data_type); - if (rc < 0) { - pr_err("%s:%d i2c_Write failed \n", - __func__, __LINE__); - } - } -#if defined(CONFIG_SEC_A8_PROJECT) - } -#endif - } else { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - } + } + if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, + conf_array.size * + sizeof(struct msm_camera_i2c_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); kfree(reg_setting); + rc = -EFAULT; + break; } - kfree(burst_reg_setting); - burst_reg_setting = NULL; + conf_array.reg_setting = reg_setting; + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( + s_ctrl->sensor_i2c_client, &conf_array); + kfree(reg_setting); break; } case CFG_SLAVE_READ_I2C: { @@ -1102,7 +1085,7 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) pr_err("%s:%d: i2c_read failed\n", __func__, __LINE__); break; } - if (copy_to_user((void __user *)read_config.data, + if (copy_to_user(&read_config.data, (void *)&local_data, sizeof(uint16_t))) { pr_err("%s:%d copy failed\n", __func__, __LINE__); rc = -EFAULT; @@ -1128,11 +1111,13 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) write_config.slave_addr, write_config.conf_array.size); - if (!write_config.conf_array.size) { + if (!write_config.conf_array.size || + write_config.conf_array.size > I2C_SEQ_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } + reg_setting = kzalloc(write_config.conf_array.size * (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); if (!reg_setting) { @@ -1206,11 +1191,13 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) break; } - if (!conf_array.size) { + if (!conf_array.size || + conf_array.size > I2C_SEQ_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } + reg_setting = kzalloc(conf_array.size * (sizeof(struct msm_camera_i2c_seq_reg_array)), GFP_KERNEL); @@ -1289,66 +1276,6 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) break; case CFG_SET_STOP_STREAM_SETTING: { -#if defined(CONFIG_SEC_A8_PROJECT) - uint16_t lb=0; - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - CDBG("[%s:%d] CFG_SET_STOP_STREAM_SETTING\n", __func__, __LINE__); - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - - pr_err("[%s:%d] write start\n", __func__, __LINE__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - pr_err("[%s:%d] write end\n", __func__, __LINE__); - - pr_err("[%s:%d] read start\n", __func__, __LINE__); - for (i = 0 ; i < 8 ; i++) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x0005, - &lb, MSM_CAMERA_I2C_BYTE_DATA); - if(lb == 0xFF) { - CDBG("[%s:%d] 0x%x\n", __func__, __LINE__, lb); - break; - } else { - CDBG("[%s:%d] 0x%x\n", __func__, __LINE__, lb); - } - } - pr_err("[%s:%d] read end\n", __func__, __LINE__); - - kfree(reg_setting); - break; -#else struct msm_camera_i2c_reg_setting *stop_setting = &s_ctrl->stop_setting; struct msm_camera_i2c_reg_array *reg_setting = NULL; @@ -1386,103 +1313,7 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) break; } break; -#endif - } - - case CFG_SET_SENSOR_OTP_CAL: { - const uint16_t otp_start = 0xa3d, otp_end = 0xa42; - uint16_t otp_cal_data[6], temp_data; - int idx = 0; - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A02, 0x0F, // Set the PAGE15 of OTP set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x01, // Set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (i = otp_start; i <= otp_end; i++) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - i, &otp_cal_data[idx++], - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C read\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_err("%s: 0x%x, 0x%x\n", __func__, i, otp_cal_data[idx - 1]); - if ((i+1)%2) { - temp_data = ((otp_cal_data[idx - 2] << 8) & 0xFF00) | - (otp_cal_data[idx - 1] & 0xFF); - // Valid check : +-50% - if (temp_data > 0x180 || temp_data < 0x80) { - pr_err("%s: range over (0x%x)\n", __func__, temp_data); - rc = -EFAULT; - break; - } - } - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x00, // Disable NVM controller - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (rc >= 0) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020E, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020F, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0210, otp_cal_data[0], // R msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0211, otp_cal_data[1], // R lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0212, otp_cal_data[4], // B msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0213, otp_cal_data[5], // B lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0214, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0215, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - } - break; } - default: rc = -EFAULT; break; @@ -1503,7 +1334,6 @@ int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl) rc = msm_sensor_match_id(s_ctrl); if (rc < 0) pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - rc = 0; return rc; } @@ -1548,6 +1378,9 @@ static struct v4l2_subdev_ops msm_sensor_subdev_ops = { static struct msm_sensor_fn_t msm_sensor_func_tbl = { .sensor_config = msm_sensor_config, +#ifdef CONFIG_COMPAT + .sensor_config32 = msm_sensor_config32, +#endif .sensor_power_up = msm_sensor_power_up, .sensor_power_down = msm_sensor_power_down, .sensor_match_id = msm_sensor_match_id, @@ -1558,7 +1391,6 @@ static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { .i2c_read_seq = msm_camera_cci_i2c_read_seq, .i2c_write = msm_camera_cci_i2c_write, .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_burst_table = msm_camera_cci_i2c_write_burst_table, .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, .i2c_write_table_w_microdelay = msm_camera_cci_i2c_write_table_w_microdelay, @@ -1587,7 +1419,7 @@ int32_t msm_sensor_platform_probe(struct platform_device *pdev, uint32_t session_id; unsigned long mount_pos = 0; s_ctrl->pdev = pdev; - CDBG("%s called data %pK\n", __func__, data); + CDBG("%s called data %p\n", __func__, data); CDBG("%s pdev name %s\n", __func__, pdev->id_entry->name); if (pdev->dev.of_node) { rc = msm_sensor_get_dt_data(pdev->dev.of_node, s_ctrl); @@ -1664,6 +1496,14 @@ int32_t msm_sensor_platform_probe(struct platform_device *pdev, s_ctrl->sensordata->sensor_info->session_id = session_id; s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; msm_sd_register(&s_ctrl->msm_sd); + msm_sensor_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_sensor_v4l2_subdev_fops.compat_ioctl32 = + msm_sensor_subdev_fops_ioctl; +#endif + s_ctrl->msm_sd.sd.devnode->fops = + &msm_sensor_v4l2_subdev_fops; + CDBG("%s:%d\n", __func__, __LINE__); s_ctrl->func_tbl->sensor_power_down(s_ctrl); @@ -1800,13 +1640,13 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) /* Validate input parameters */ if (!s_ctrl) { - pr_err("%s:%d failed: invalid params s_ctrl %pK\n", __func__, + pr_err("%s:%d failed: invalid params s_ctrl %p\n", __func__, __LINE__, s_ctrl); return -EINVAL; } if (!s_ctrl->sensor_i2c_client) { - pr_err("%s:%d failed: invalid params sensor_i2c_client %pK\n", + pr_err("%s:%d failed: invalid params sensor_i2c_client %p\n", __func__, __LINE__, s_ctrl->sensor_i2c_client); return -EINVAL; } @@ -1815,7 +1655,7 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( struct msm_camera_cci_client), GFP_KERNEL); if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s:%d failed: no memory cci_client %pK\n", __func__, + pr_err("%s:%d failed: no memory cci_client %p\n", __func__, __LINE__, s_ctrl->sensor_i2c_client->cci_client); return -ENOMEM; } @@ -1849,7 +1689,7 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) /* Initialize clock info */ clk_info = kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); if (!clk_info) { - pr_err("%s:%d failed no memory clk_info %pK\n", __func__, + pr_err("%s:%d failed no memory clk_info %p\n", __func__, __LINE__, clk_info); rc = -ENOMEM; goto FREE_CCI_CLIENT; diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h index 5ec7c5f9ff99..d9b934fe75ee 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h +++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include "msm_camera_i2c.h" #include "msm_camera_dt_util.h" #include "msm_sd.h" @@ -45,13 +47,14 @@ enum msm_sensor_state_t { struct msm_sensor_fn_t { int (*sensor_config) (struct msm_sensor_ctrl_t *, void __user *); +#ifdef CONFIG_COMPAT + int (*sensor_config32) (struct msm_sensor_ctrl_t *, void __user *); +#endif int (*sensor_power_down) (struct msm_sensor_ctrl_t *); int (*sensor_power_up) (struct msm_sensor_ctrl_t *); int (*sensor_match_id) (struct msm_sensor_ctrl_t *); - int (*sensor_native_control) (struct msm_sensor_ctrl_t *, void __user *); }; - struct msm_sensor_ctrl_t { struct platform_device *pdev; struct mutex *msm_sensor_mutex; @@ -110,8 +113,9 @@ int32_t msm_sensor_get_dt_gpio_set_tbl(struct device_node *of_node, int32_t msm_sensor_init_gpio_pin_tbl(struct device_node *of_node, struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, uint16_t gpio_array_size); -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) -int32_t msm_sensor_flash_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); +#ifdef CONFIG_COMPAT +long msm_sensor_subdev_fops_ioctl(struct file *file, + unsigned int cmd, + unsigned long arg); #endif #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.c b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.c old mode 100644 new mode 100755 index 1ca9d0f4a23e..8f3c6783b56e --- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.c +++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -18,104 +18,17 @@ #include "msm_cci.h" #include "msm_camera_dt_util.h" -#if defined CONFIG_SEC_CAMERA_TUNING -#include -#include -#include -#include -#include -static char *regs_table = NULL; -static int table_size; -#endif -#if defined(CONFIG_SR200PC20) -#include "sr200pc20.h" -#endif -#if defined(CONFIG_S5K4ECGX) -#include "s5k4ecgx.h" -#endif -#if defined(CONFIG_SR352) -#include "sr352.h" -#endif -#if defined(CONFIG_SR130PC20) -#include "sr130pc20.h" -#endif -#if defined(CONFIG_DB8221A) -#include "db8221a.h" -#endif - /* Logging macro */ -//#define MSM_SENSOR_DRIVER_DEBUG #undef CDBG -#ifdef MSM_SENSOR_DRIVER_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else #define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif #define SENSOR_MAX_MOUNTANGLE (360) -#ifdef CONFIG_CAM_DISABLE_LPM_MODE -extern int poweroff_charging; -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -extern char rear_cam_info[100]; //camera_info -extern char front_cam_info[100]; //camera_info -#endif +static struct v4l2_file_operations msm_sensor_v4l2_subdev_fops; /* Static declaration */ static struct msm_sensor_ctrl_t *g_sctrl[MAX_CAMERAS]; -#if defined(CONFIG_SR352) -static struct msm_sensor_fn_t sr352_sensor_func_tbl = { - .sensor_config = sr352_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr352_sensor_native_control, -}; -#endif - -#if defined(CONFIG_SR130PC20) -static struct msm_sensor_fn_t sr130pc20_sensor_func_tbl = { - .sensor_config = sr130pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr130pc20_sensor_native_control, -}; -#endif - -#if defined(CONFIG_SR200PC20) -static struct msm_sensor_fn_t sr200pc20_sensor_func_tbl = { - .sensor_config = sr200pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr200pc20_sensor_native_control, -}; -#endif -#if defined(CONFIG_S5K4ECGX) -static struct msm_sensor_fn_t s5k4ecgx_sensor_func_tbl = { - .sensor_config = s5k4ecgx_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = s5k4ecgx_sensor_match_id, - .sensor_native_control = s5k4ecgx_sensor_native_control, -}; -#endif -#if defined(CONFIG_DB8221A) -static struct msm_sensor_fn_t db8221a_sensor_func_tbl = { - .sensor_config = db8221a_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = db8221a_sensor_native_control, -}; -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); - static int msm_sensor_platform_remove(struct platform_device *pdev) { struct msm_sensor_ctrl_t *s_ctrl; @@ -221,6 +134,14 @@ static int32_t msm_sensor_driver_create_v4l_subdev s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; msm_sd_register(&s_ctrl->msm_sd); + msm_sensor_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_sensor_v4l2_subdev_fops.compat_ioctl32 = + msm_sensor_subdev_fops_ioctl; +#endif + s_ctrl->msm_sd.sd.devnode->fops = + &msm_sensor_v4l2_subdev_fops; + return rc; } @@ -313,10 +234,8 @@ static int32_t msm_sensor_fill_actuator_subdevid_by_name( return -EINVAL; actuator_name_len = strlen(s_ctrl->sensordata->actuator_name); - if (actuator_name_len >= MAX_SENSOR_NAME) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is greater than max len\n"); + if (actuator_name_len >= MAX_SENSOR_NAME) return -EINVAL; - } sensor_info = s_ctrl->sensordata->sensor_info; actuator_subdev_id = &sensor_info->subdev_id[SUB_MODULE_ACTUATOR]; @@ -326,17 +245,15 @@ static int32_t msm_sensor_fill_actuator_subdevid_by_name( */ *actuator_subdev_id = -1; - if (0 == actuator_name_len) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is zero\n"); + if (0 == actuator_name_len) return 0; - } src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); if (!src_node) { - pr_err("%s:%d src_node NULL\n", __func__, __LINE__); + CDBG("%s:%d src_node NULL\n", __func__, __LINE__); } else { rc = of_property_read_u32(src_node, "cell-index", &val); - pr_err("%s qcom,actuator cell index %d, rc %d\n", __func__, + CDBG("%s qcom,actuator cell index %d, rc %d\n", __func__, val, rc); if (rc < 0) { pr_err("%s failed %d\n", __func__, __LINE__); @@ -350,6 +267,53 @@ static int32_t msm_sensor_fill_actuator_subdevid_by_name( return rc; } +static int32_t msm_sensor_fill_ois_subdevid_by_name( + struct msm_sensor_ctrl_t *s_ctrl) +{ + int32_t rc = 0; + struct device_node *src_node = NULL; + uint32_t val = 0, ois_name_len; + int32_t *ois_subdev_id; + struct msm_sensor_info_t *sensor_info; + struct device_node *of_node = s_ctrl->of_node; + + if (!s_ctrl->sensordata->ois_name || !of_node) + return -EINVAL; + + ois_name_len = strlen(s_ctrl->sensordata->ois_name); + if (ois_name_len >= MAX_SENSOR_NAME) + return -EINVAL; + + sensor_info = s_ctrl->sensordata->sensor_info; + ois_subdev_id = &sensor_info->subdev_id[SUB_MODULE_OIS]; + /* + * string for ois name is valid, set sudev id to -1 + * and try to found new id + */ + *ois_subdev_id = -1; + + if (0 == ois_name_len) + return 0; + + src_node = of_parse_phandle(of_node, "qcom,ois-src", 0); + if (!src_node) { + CDBG("%s:%d src_node NULL\n", __func__, __LINE__); + } else { + rc = of_property_read_u32(src_node, "cell-index", &val); + CDBG("%s qcom,ois cell index %d, rc %d\n", __func__, + val, rc); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + return -EINVAL; + } + *ois_subdev_id = val; + of_node_put(src_node); + src_node = NULL; + } + + return rc; +} + static int32_t msm_sensor_fill_slave_info_init_params( struct msm_camera_sensor_slave_info *slave_info, struct msm_sensor_info_t *sensor_info) @@ -402,40 +366,357 @@ static int32_t msm_sensor_validate_slave_info( return 0; } +#ifdef CONFIG_COMPAT +static int32_t msm_sensor_get_pw_settings_compat( + struct msm_sensor_power_setting *ps, + struct msm_sensor_power_setting *us_ps, uint32_t size) +{ + int32_t rc = 0, i = 0; + struct msm_sensor_power_setting32 *ps32 = + kzalloc(sizeof(*ps32) * size, GFP_KERNEL); + + if (!ps32) { + pr_err("failed: no memory ps32"); + return -ENOMEM; + } + if (copy_from_user(ps32, (void *)us_ps, sizeof(*ps32) * size)) { + pr_err("failed: copy_from_user"); + kfree(ps32); + return -EFAULT; + } + for (i = 0; i < size; i++) { + ps[i].config_val = ps32[i].config_val; + ps[i].delay = ps32[i].delay; + ps[i].seq_type = ps32[i].seq_type; + ps[i].seq_val = ps32[i].seq_val; + } + kfree(ps32); + return rc; +} +#endif + +static int32_t msm_sensor_create_pd_settings(void *setting, + struct msm_sensor_power_setting *pd, uint32_t size_down, + struct msm_sensor_power_setting *pu) +{ + int32_t rc = 0; + int c, end; + struct msm_sensor_power_setting pd_tmp; + + pr_err("Generating power_down_setting"); + +#ifdef CONFIG_COMPAT + if (is_compat_task()) { + rc = msm_sensor_get_pw_settings_compat( + pd, pu, size_down); + if (rc < 0) { + pr_err("failed"); + return -EFAULT; + } + } else +#endif + { + if (copy_from_user(pd, (void *)pu, sizeof(*pd) * size_down)) { + pr_err("failed: copy_from_user"); + return -EFAULT; + } + } + /* reverse */ + end = size_down - 1; + for (c = 0; c < size_down/2; c++) { + pd_tmp = pd[c]; + pd[c] = pd[end]; + pd[end] = pd_tmp; + end--; + } + return rc; +} + +static int32_t msm_sensor_get_power_down_settings(void *setting, + struct msm_camera_sensor_slave_info *slave_info, + struct msm_camera_power_ctrl_t *power_info) +{ + int32_t rc = 0; + uint16_t size_down = 0; + uint16_t i = 0; + struct msm_sensor_power_setting *pd = NULL; + + /* DOWN */ + size_down = slave_info->power_setting_array.size_down; + if (!size_down || size_down > MAX_POWER_CONFIG) + size_down = slave_info->power_setting_array.size; + /* Validate size_down */ + if (size_down > MAX_POWER_CONFIG) { + pr_err("failed: invalid size_down %d", size_down); + return -EINVAL; + } + /* Allocate memory for power down setting */ + pd = kzalloc(sizeof(*pd) * size_down, GFP_KERNEL); + if (!pd) { + pr_err("failed: no memory power_setting %p", pd); + return -EFAULT; + } + + if (slave_info->power_setting_array.power_down_setting) { +#ifdef CONFIG_COMPAT + if (is_compat_task()) { + rc = msm_sensor_get_pw_settings_compat( + pd, slave_info->power_setting_array. + power_down_setting, size_down); + if (rc < 0) { + pr_err("failed"); + kfree(pd); + return -EFAULT; + } + } else +#endif + if (copy_from_user(pd, (void *)slave_info->power_setting_array. + power_down_setting, sizeof(*pd) * size_down)) { + pr_err("failed: copy_from_user"); + kfree(pd); + return -EFAULT; + } + } else { + + rc = msm_sensor_create_pd_settings(setting, pd, size_down, + slave_info->power_setting_array.power_setting); + if (rc < 0) { + pr_err("failed"); + kfree(pd); + return -EFAULT; + } + } + + /* Fill power down setting and power down setting size */ + power_info->power_down_setting = pd; + power_info->power_down_setting_size = size_down; + + /* Print power setting */ + for (i = 0; i < size_down; i++) { + CDBG("DOWN seq_type %d seq_val %d config_val %ld delay %d", + pd[i].seq_type, pd[i].seq_val, + pd[i].config_val, pd[i].delay); + } + return rc; +} + +static int32_t msm_sensor_get_power_up_settings(void *setting, + struct msm_camera_sensor_slave_info *slave_info, + struct msm_camera_power_ctrl_t *power_info) +{ + int32_t rc = 0; + uint16_t size = 0; + uint16_t i = 0; + struct msm_sensor_power_setting *pu = NULL; + + size = slave_info->power_setting_array.size; + + /* Validate size */ + if ((size == 0) || (size > MAX_POWER_CONFIG)) { + pr_err("failed: invalid power_setting size_up = %d\n", size); + return -EINVAL; + } + + /* Allocate memory for power up setting */ + pu = kzalloc(sizeof(*pu) * size, GFP_KERNEL); + if (!pu) { + pr_err("failed: no memory power_setting %p", pu); + return -ENOMEM; + } + +#ifdef CONFIG_COMPAT + if (is_compat_task()) { + rc = msm_sensor_get_pw_settings_compat(pu, + slave_info->power_setting_array. + power_setting, size); + if (rc < 0) { + pr_err("failed"); + kfree(pu); + return -EFAULT; + } + } else +#endif + { + if (copy_from_user(pu, + (void *)slave_info->power_setting_array.power_setting, + sizeof(*pu) * size)) { + pr_err("failed: copy_from_user"); + kfree(pu); + return -EFAULT; + } + } + + /* Print power setting */ + for (i = 0; i < size; i++) { + CDBG("UP seq_type %d seq_val %d config_val %ld delay %d", + pu[i].seq_type, pu[i].seq_val, + pu[i].config_val, pu[i].delay); + } + + + /* Fill power up setting and power up setting size */ + power_info->power_setting = pu; + power_info->power_setting_size = size; + + return rc; +} + +static int32_t msm_sensor_get_power_settings(void *setting, + struct msm_camera_sensor_slave_info *slave_info, + struct msm_camera_power_ctrl_t *power_info) +{ + int32_t rc = 0; + + rc = msm_sensor_get_power_up_settings(setting, slave_info, power_info); + if (rc < 0) { + pr_err("failed"); + return -EINVAL; + } + + rc = msm_sensor_get_power_down_settings(setting, slave_info, + power_info); + if (rc < 0) { + pr_err("failed"); + return -EINVAL; + } + return rc; +} + +static void msm_sensor_fill_sensor_info(struct msm_sensor_ctrl_t *s_ctrl, + struct msm_sensor_info_t *sensor_info, char *entity_name) +{ + uint32_t i; + + if (!s_ctrl || !sensor_info) { + pr_err("%s:failed\n", __func__); + return; + } + + strlcpy(sensor_info->sensor_name, s_ctrl->sensordata->sensor_name, + MAX_SENSOR_NAME); + + sensor_info->session_id = s_ctrl->sensordata->sensor_info->session_id; + + s_ctrl->sensordata->sensor_info->subdev_id[SUB_MODULE_SENSOR] = + s_ctrl->sensordata->sensor_info->session_id; + for (i = 0; i < SUB_MODULE_MAX; i++) { + sensor_info->subdev_id[i] = + s_ctrl->sensordata->sensor_info->subdev_id[i]; + sensor_info->subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } + + sensor_info->is_mount_angle_valid = + s_ctrl->sensordata->sensor_info->is_mount_angle_valid; + sensor_info->sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + sensor_info->modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + sensor_info->position = + s_ctrl->sensordata->sensor_info->position; + + strlcpy(entity_name, s_ctrl->msm_sd.sd.entity.name, MAX_SENSOR_NAME); +} + /* static function definition */ -int32_t msm_sensor_driver_probe(void *setting) +int32_t msm_sensor_driver_is_special_support( + struct msm_sensor_ctrl_t *s_ctrl, + char* sensor_name) +{ + int32_t rc = FALSE; + int32_t i = 0; + struct msm_camera_sensor_board_info *sensordata = s_ctrl->sensordata; + for (i = 0; i < sensordata->special_support_size; i++) { + if (!strcmp(sensordata->special_support_sensors[i], + sensor_name)) { + rc = TRUE; + break ; + } + } + return rc; +} + +int32_t msm_sensor_driver_probe(void *setting, + struct msm_sensor_info_t *probed_info, char *entity_name) { int32_t rc = 0; - uint16_t i = 0, size = 0, size_down = 0; struct msm_sensor_ctrl_t *s_ctrl = NULL; struct msm_camera_cci_client *cci_client = NULL; struct msm_camera_sensor_slave_info *slave_info = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_sensor_power_setting *power_down_setting = NULL; struct msm_camera_slave_info *camera_info = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int c, end; - struct msm_sensor_power_setting power_down_setting_t; - unsigned long mount_pos = 0; - int probe_fail = 0; + + unsigned long mount_pos = 0; + uint32_t is_yuv; /* Validate input parameters */ if (!setting) { - pr_err("failed: slave_info %pK", setting); + pr_err("failed: slave_info %p", setting); return -EINVAL; } /* Allocate memory for slave info */ slave_info = kzalloc(sizeof(*slave_info), GFP_KERNEL); if (!slave_info) { - pr_err("failed: no memory slave_info %pK", slave_info); + pr_err("failed: no memory slave_info %p", slave_info); return -ENOMEM; } +#ifdef CONFIG_COMPAT + if (is_compat_task()) { + struct msm_camera_sensor_slave_info32 setting32; + if (copy_from_user((void *)&setting32, setting, + sizeof(setting32))) { + pr_err("failed: copy_from_user"); + rc = -EFAULT; + goto free_slave_info; + } - if (copy_from_user(slave_info, (void *)setting, sizeof(*slave_info))) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_SLAVE_INFO; + strlcpy(slave_info->actuator_name, setting32.actuator_name, + sizeof(slave_info->actuator_name)); + + strlcpy(slave_info->eeprom_name, setting32.eeprom_name, + sizeof(slave_info->eeprom_name)); + + strlcpy(slave_info->sensor_name, setting32.sensor_name, + sizeof(slave_info->sensor_name)); + + strlcpy(slave_info->ois_name, setting32.ois_name, + sizeof(slave_info->ois_name)); + + strlcpy(slave_info->flash_name, setting32.flash_name, + sizeof(slave_info->flash_name)); + + slave_info->addr_type = setting32.addr_type; + slave_info->camera_id = setting32.camera_id; + + slave_info->i2c_freq_mode = setting32.i2c_freq_mode; + slave_info->sensor_id_info = setting32.sensor_id_info; + + slave_info->slave_addr = setting32.slave_addr; + slave_info->power_setting_array.size = + setting32.power_setting_array.size; + slave_info->power_setting_array.size_down = + setting32.power_setting_array.size_down; + slave_info->power_setting_array.size_down = + setting32.power_setting_array.size_down; + slave_info->power_setting_array.power_setting = + compat_ptr(setting32.power_setting_array.power_setting); + slave_info->power_setting_array.power_down_setting = + compat_ptr(setting32. + power_setting_array.power_down_setting); + slave_info->is_init_params_valid = + setting32.is_init_params_valid; + slave_info->sensor_init_params = setting32.sensor_init_params; + slave_info->is_flash_supported = setting32.is_flash_supported; + slave_info->output_format = setting32.output_format; + } else +#endif + { + if (copy_from_user(slave_info, + (void *)setting, sizeof(*slave_info))) { + pr_err("failed: copy_from_user"); + rc = -EFAULT; + goto free_slave_info; + } } /* Print slave info */ @@ -447,7 +728,6 @@ int32_t msm_sensor_driver_probe(void *setting) CDBG("sensor_id 0x%x", slave_info->sensor_id_info.sensor_id); CDBG("size %d", slave_info->power_setting_array.size); CDBG("size down %d", slave_info->power_setting_array.size_down); - CDBG("sensor_name %s", slave_info->sensor_name); if (slave_info->is_init_params_valid) { CDBG("position %d", @@ -461,40 +741,19 @@ int32_t msm_sensor_driver_probe(void *setting) pr_err("failed: invalid camera id %d max %d", slave_info->camera_id, MAX_CAMERAS); rc = -EINVAL; - goto FREE_SLAVE_INFO; + goto free_slave_info; } /* Extract s_ctrl from camera id */ s_ctrl = g_sctrl[slave_info->camera_id]; if (!s_ctrl) { - pr_err("failed: s_ctrl %pK for camera_id %d", s_ctrl, + pr_err("failed: s_ctrl %p for camera_id %d", s_ctrl, slave_info->camera_id); rc = -EINVAL; - goto FREE_SLAVE_INFO; - } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if ( slave_info->camera_id == CAMERA_2 ) { - s_ctrl->func_tbl = &sr130pc20_sensor_func_tbl ; - } else { - s_ctrl->func_tbl = &sr352_sensor_func_tbl ; + goto free_slave_info; } -#endif -#if defined(CONFIG_SR200PC20) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &sr200pc20_sensor_func_tbl ; - } -#endif -#if defined(CONFIG_S5K4ECGX) - if (slave_info->camera_id == CAMERA_0){ - s_ctrl->func_tbl = &s5k4ecgx_sensor_func_tbl; - } -#endif -#if defined(CONFIG_DB8221A) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &db8221a_sensor_func_tbl ; - } -#endif - CDBG("s_ctrl[%d] %pK", slave_info->camera_id, s_ctrl); + + CDBG("s_ctrl[%d] %p", slave_info->camera_id, s_ctrl); if (s_ctrl->is_probe_succeed == 1) { /* @@ -502,102 +761,48 @@ int32_t msm_sensor_driver_probe(void *setting) * and probe already succeeded for that sensor. Ignore this * probe */ - pr_err("slot %d has some other sensor", slave_info->camera_id); - rc = 0; - goto FREE_SLAVE_INFO; - } - - size = slave_info->power_setting_array.size; - /* Allocate memory for power up setting */ - power_setting = kzalloc(sizeof(*power_setting) * size, GFP_KERNEL); - if (!power_setting) { - pr_err("failed: no memory power_setting %pK", power_setting); - rc = -ENOMEM; - goto FREE_SLAVE_INFO; - } - - if (copy_from_user(power_setting, - (void *)slave_info->power_setting_array.power_setting, - sizeof(*power_setting) * size)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_SETTING; - } + if (slave_info->sensor_id_info.sensor_id == + s_ctrl->sensordata->cam_slave_info-> + sensor_id_info.sensor_id) { + pr_err("slot%d: sensor id%d already probed\n", + slave_info->camera_id, + s_ctrl->sensordata->cam_slave_info-> + sensor_id_info.sensor_id); + msm_sensor_fill_sensor_info(s_ctrl, + probed_info, entity_name); + } else + pr_err("slot %d has some other sensor\n", + slave_info->camera_id); - /* Print power setting */ - for (i = 0; i < size; i++) { - CDBG("UP seq_type %d seq_val %d config_val %ld delay %d", - power_setting[i].seq_type, power_setting[i].seq_val, - power_setting[i].config_val, power_setting[i].delay); - } - /*DOWN*/ - size_down = slave_info->power_setting_array.size_down; - if (!size_down) - size_down = size; - /* Allocate memory for power down setting */ - power_down_setting = - kzalloc(sizeof(*power_setting) * size_down, GFP_KERNEL); - if (!power_down_setting) { - pr_err("failed: no memory power_setting %pK", - power_down_setting); - rc = -ENOMEM; - goto FREE_POWER_SETTING; + rc = 0; + goto free_slave_info; } - if (slave_info->power_setting_array.power_down_setting) { - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_down_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - } else { - pr_err("failed: no power_down_setting"); - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - - /*reverce*/ - end = size_down - 1; - for (c = 0; c < size_down/2; c++) { - power_down_setting_t = power_down_setting[c]; - power_down_setting[c] = power_down_setting[end]; - power_down_setting[end] = power_down_setting_t; - end--; + if (s_ctrl->sensordata->special_support_size > 0) { + if (!msm_sensor_driver_is_special_support(s_ctrl, + slave_info->sensor_name)) { + pr_err("%s:%s is not support on this board\n", + __func__, slave_info->sensor_name); + rc = 0; + goto free_slave_info; } - } - /* Print power setting */ - for (i = 0; i < size_down; i++) { - CDBG("DOWN seq_type %d seq_val %d config_val %ld delay %d", - power_down_setting[i].seq_type, - power_down_setting[i].seq_val, - power_down_setting[i].config_val, - power_down_setting[i].delay); + rc = msm_sensor_get_power_settings(setting, slave_info, + &s_ctrl->sensordata->power_info); + if (rc < 0) { + pr_err("failed"); + goto free_slave_info; } + camera_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL); if (!camera_info) { - pr_err("failed: no memory slave_info %pK", camera_info); - goto FREE_POWER_DOWN_SETTING; + pr_err("failed: no memory slave_info %p", camera_info); + goto free_slave_info; } - /* Fill power up setting and power up setting size */ - power_info = &s_ctrl->sensordata->power_info; - power_info->power_setting = power_setting; - power_info->power_setting_size = size; - power_info->power_down_setting = power_down_setting; - power_info->power_down_setting_size = size_down; - s_ctrl->sensordata->slave_info = camera_info; /* Fill sensor slave info */ @@ -608,10 +813,10 @@ int32_t msm_sensor_driver_probe(void *setting) /* Fill CCI master, slave address and CCI default params */ if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: sensor_i2c_client %pK", + pr_err("failed: sensor_i2c_client %p", s_ctrl->sensor_i2c_client); rc = -EINVAL; - goto FREE_CAMERA_INFO; + goto free_camera_info; } /* Fill sensor address type */ s_ctrl->sensor_i2c_client->addr_type = slave_info->addr_type; @@ -621,8 +826,8 @@ int32_t msm_sensor_driver_probe(void *setting) cci_client = s_ctrl->sensor_i2c_client->cci_client; if (!cci_client) { - pr_err("failed: cci_client %pK", cci_client); - goto FREE_CAMERA_INFO; + pr_err("failed: cci_client %p", cci_client); + goto free_camera_info; } cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; cci_client->sid = slave_info->slave_addr >> 1; @@ -632,26 +837,26 @@ int32_t msm_sensor_driver_probe(void *setting) /* Parse and fill vreg params for powerup settings */ rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_setting, - power_info->power_setting_size); + s_ctrl->sensordata->power_info.cam_vreg, + s_ctrl->sensordata->power_info.num_vreg, + s_ctrl->sensordata->power_info.power_setting, + s_ctrl->sensordata->power_info.power_setting_size); if (rc < 0) { pr_err("failed: msm_camera_get_dt_power_setting_data rc %d", rc); - goto FREE_CAMERA_INFO; + goto free_camera_info; } /* Parse and fill vreg params for powerdown settings*/ rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_down_setting, - power_info->power_down_setting_size); + s_ctrl->sensordata->power_info.cam_vreg, + s_ctrl->sensordata->power_info.num_vreg, + s_ctrl->sensordata->power_info.power_down_setting, + s_ctrl->sensordata->power_info.power_down_setting_size); if (rc < 0) { pr_err("failed: msm_camera_fill_vreg_params for PDOWN rc %d", rc); - goto FREE_CAMERA_INFO; + goto free_camera_info; } /* Update sensor, actuator and eeprom name in @@ -659,14 +864,14 @@ int32_t msm_sensor_driver_probe(void *setting) s_ctrl->sensordata->sensor_name = slave_info->sensor_name; s_ctrl->sensordata->eeprom_name = slave_info->eeprom_name; s_ctrl->sensordata->actuator_name = slave_info->actuator_name; - + s_ctrl->sensordata->ois_name = slave_info->ois_name; /* * Update eeporm subdevice Id by input eeprom name */ rc = msm_sensor_fill_eeprom_subdevid_by_name(s_ctrl); if (rc < 0) { pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; + goto free_camera_info; } /* * Update actuator subdevice Id by input actuator name @@ -674,16 +879,20 @@ int32_t msm_sensor_driver_probe(void *setting) rc = msm_sensor_fill_actuator_subdevid_by_name(s_ctrl); if (rc < 0) { pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; + goto free_camera_info; } - msm_sensor_remove_dev_node_for_eeprom(slave_info->camera_id, - s_ctrl->sensordata->sensor_info->subdev_id[SUB_MODULE_EEPROM]); + + rc = msm_sensor_fill_ois_subdevid_by_name(s_ctrl); + if (rc < 0) { + pr_err("%s failed %d\n", __func__, __LINE__); + goto free_camera_info; + } + /* Power up and probe sensor */ rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); if (rc < 0) { pr_err("%s power up failed", slave_info->sensor_name); - probe_fail = rc; -// goto FREE_CAMERA_INFO; + goto free_camera_info; } pr_err("%s probe succeeded", slave_info->sensor_name); @@ -694,6 +903,14 @@ int32_t msm_sensor_driver_probe(void *setting) */ s_ctrl->is_probe_succeed = 1; + /* + * Update the subdevice id of flash-src based on availability in kernel. + */ + if (slave_info->is_flash_supported == 0) { + s_ctrl->sensordata->sensor_info-> + subdev_id[SUB_MODULE_LED_FLASH] = -1; + } + /* * Create /dev/videoX node, comment for now until dummy /dev/videoX * node is created and used by HAL @@ -705,22 +922,7 @@ int32_t msm_sensor_driver_probe(void *setting) rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); if (rc < 0) { pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } - - memcpy(slave_info->subdev_name, s_ctrl->msm_sd.sd.entity.name, - sizeof(slave_info->subdev_name)); - slave_info->is_probe_succeed = 1; - slave_info->sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - slave_info->sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - pr_err("sensor_subdev_id = %d i = %d\n",slave_info->sensor_info.subdev_id[i], i); - } - if (copy_to_user((void __user *)setting, - (void *)slave_info, sizeof(*slave_info))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; + goto camera_power_down; } /* Power down */ @@ -731,38 +933,35 @@ int32_t msm_sensor_driver_probe(void *setting) s_ctrl->sensordata->sensor_info); if (rc < 0) { pr_err("%s Fill slave info failed", slave_info->sensor_name); - goto FREE_CAMERA_INFO; + goto free_camera_info; } rc = msm_sensor_validate_slave_info(s_ctrl->sensordata->sensor_info); if (rc < 0) { pr_err("%s Validate slave info failed", slave_info->sensor_name); - goto FREE_CAMERA_INFO; + goto free_camera_info; } /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); + is_yuv = (slave_info->output_format == MSM_SENSOR_YCBCR) ? 1 : 0; + mount_pos = is_yuv << 25 | + (s_ctrl->sensordata->sensor_info->position << 16) | + ((s_ctrl->sensordata-> + sensor_info->sensor_mount_angle / 90) << 8); + s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; /*Save sensor info*/ s_ctrl->sensordata->cam_slave_info = slave_info; - if(probe_fail) { - rc = probe_fail; - } + msm_sensor_fill_sensor_info(s_ctrl, probed_info, entity_name); return rc; -CAMERA_POWER_DOWN: +camera_power_down: s_ctrl->func_tbl->sensor_power_down(s_ctrl); -FREE_CAMERA_INFO: +free_camera_info: kfree(camera_info); -FREE_POWER_DOWN_SETTING: - kfree(power_down_setting); -FREE_POWER_SETTING: - kfree(power_setting); -FREE_SLAVE_INFO: +free_slave_info: kfree(slave_info); return rc; } @@ -778,7 +977,7 @@ static int32_t msm_sensor_driver_get_gpio_data( /* Validate input paramters */ if (!sensordata || !of_node) { - pr_err("failed: invalid params sensordata %pK of_node %pK", + pr_err("failed: invalid params sensordata %p of_node %p", sensordata, of_node); return -EINVAL; } @@ -836,7 +1035,8 @@ static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) int32_t rc = 0; struct msm_camera_sensor_board_info *sensordata = NULL; struct device_node *of_node = s_ctrl->of_node; - uint32_t cell_id; + uint32_t cell_id; + int32_t i; s_ctrl->sensordata = kzalloc(sizeof(*sensordata), GFP_KERNEL); if (!s_ctrl->sensordata) { @@ -871,6 +1071,34 @@ static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) goto FREE_SENSOR_DATA; } + sensordata->special_support_size = + of_property_count_strings(of_node, "qcom,special-support-sensors"); + + if (sensordata->special_support_size < 0) + sensordata->special_support_size = 0; + + if (sensordata->special_support_size > MAX_SPECIAL_SUPPORT_SIZE) { + pr_err("%s:support_size exceed max support size\n",__func__); + sensordata->special_support_size = MAX_SPECIAL_SUPPORT_SIZE; + } + + if (sensordata->special_support_size) { + for( i = 0; i < sensordata->special_support_size; i++) { + rc = of_property_read_string_index(of_node, + "qcom,special-support-sensors", i, + &(sensordata->special_support_sensors[i])); + if(rc < 0 ) { + /* if read sensor support names failed, + * set support all sensors, break; + */ + sensordata->special_support_size = 0; + break ; + } + CDBG("%s special_support_sensors[%d] = %s\n", __func__, + i, sensordata->special_support_sensors[i]); + } + } + /* Read subdev info */ rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); if (rc < 0) { @@ -938,22 +1166,6 @@ static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) CDBG("%s qcom,mclk-23880000 = %d\n", __func__, s_ctrl->set_mclk_23880000); -#if defined (CONFIG_CAMERA_SYSFS_V2) - /* camera information */ - if (cell_id == 0) { - rc = msm_camera_get_dt_camera_info(of_node, rear_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } else { - rc = msm_camera_get_dt_camera_info(of_node, front_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } -#endif return rc; FREE_VREG_DATA: @@ -977,7 +1189,7 @@ static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) s_ctrl->sensor_i2c_client = kzalloc(sizeof(*s_ctrl->sensor_i2c_client), GFP_KERNEL); if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: no memory sensor_i2c_client %pK", + pr_err("failed: no memory sensor_i2c_client %p", s_ctrl->sensor_i2c_client); return -ENOMEM; } @@ -986,7 +1198,7 @@ static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) s_ctrl->msm_sensor_mutex = kzalloc(sizeof(*s_ctrl->msm_sensor_mutex), GFP_KERNEL); if (!s_ctrl->msm_sensor_mutex) { - pr_err("failed: no memory msm_sensor_mutex %pK", + pr_err("failed: no memory msm_sensor_mutex %p", s_ctrl->msm_sensor_mutex); goto FREE_SENSOR_I2C_CLIENT; } @@ -1015,7 +1227,7 @@ static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) /* Store sensor control structure in static database */ g_sctrl[s_ctrl->id] = s_ctrl; - pr_err("g_sctrl[%d] %pK", s_ctrl->id, g_sctrl[s_ctrl->id]); + pr_err("g_sctrl[%d] %p", s_ctrl->id, g_sctrl[s_ctrl->id]); return rc; @@ -1037,11 +1249,10 @@ static int32_t msm_sensor_driver_platform_probe(struct platform_device *pdev) int32_t rc = 0; struct msm_sensor_ctrl_t *s_ctrl = NULL; - /* Create sensor control structure */ s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); + pr_err("failed: no memory s_ctrl %p", s_ctrl); return -ENOMEM; } @@ -1063,7 +1274,6 @@ static int32_t msm_sensor_driver_platform_probe(struct platform_device *pdev) /* Fill device in power info */ s_ctrl->sensordata->power_info.dev = &pdev->dev; - return rc; FREE_S_CTRL: kfree(s_ctrl); @@ -1087,7 +1297,7 @@ static int32_t msm_sensor_driver_i2c_probe(struct i2c_client *client, /* Create sensor control structure */ s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); + pr_err("failed: no memory s_ctrl %p", s_ctrl); return -ENOMEM; } @@ -1154,14 +1364,6 @@ static int __init msm_sensor_driver_init(void) int32_t rc = 0; CDBG("Enter"); - -#ifdef CONFIG_CAM_DISABLE_LPM_MODE - if(poweroff_charging) { - pr_err("%s : Camera is not probed in LPM mode", __func__); - return 0; - } -#endif - rc = platform_driver_probe(&msm_sensor_platform_driver, msm_sensor_driver_platform_probe); if (!rc) { @@ -1184,132 +1386,6 @@ static void __exit msm_sensor_driver_exit(void) return; } -#if defined CONFIG_SEC_CAMERA_TUNING -int register_table_init(char *filename) { - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return -1; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - return -1; - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - return -1; - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to if part of string compare sr352_regs_table"); - regs_table = dp; - table_size = lsize; - *((regs_table+ table_size) - 1) = '\0'; - return 0; -} - -void register_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (regs_table) { - vfree(regs_table); - regs_table = NULL; - } -} - -int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name) { - char *start, *end, *reg,reg_buf[7], data_buf[7]; - int rc,addr,value; - addr=0; - rc=0; - value=0; - - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - *(reg_buf + 4) = '\0'; - *(data_buf + 4) = '\0'; - } else { - *(reg_buf + 6) = '\0'; - *(data_buf + 6) = '\0'; - } - if(regs_table == NULL) { - pr_err("regs_table is null "); - return -1; - } - pr_err("@@@ %s",name); - start = strstr(regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf, (reg + 7), 4); - } else { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf, (reg + 9), 6); - } - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!"); - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - start = (reg + 14); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } else { - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - } - pr_err("register_read_from_sdcard end!"); - return rc; -} - -#endif - module_init(msm_sensor_driver_init); module_exit(msm_sensor_driver_exit); MODULE_DESCRIPTION("msm_sensor_driver"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.h b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.h index 86df1c8c961d..1ab58245dc40 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.h +++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_driver.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -15,30 +15,7 @@ #include "msm_sensor.h" -int32_t msm_sensor_driver_probe(void *setting); -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); -struct yuv_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int aeawblock; - unsigned int resolution; - unsigned int prev_resolution; -}; - -struct yuv_ctrl { - struct yuv_userset settings; - int op_mode; - int prev_mode; - int streamon; - int vtcall_mode; - int exif_iso; - int exif_shutterspeed; - int fixed_fps_val; -}; - +int32_t msm_sensor_driver_probe(void *setting, + struct msm_sensor_info_t *probed_info, char *entity_name); #endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_init.c b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_init.c index 6dfab2e1ce7b..a612265fc801 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_init.c +++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor_init.c @@ -13,29 +13,17 @@ #define pr_fmt(fmt) "MSM-SENSOR-INIT %s:%d " fmt "\n", __func__, __LINE__ /* Header files */ -#include #include "msm_sensor_init.h" #include "msm_sensor_driver.h" #include "msm_sensor.h" #include "msm_sd.h" /* Logging macro */ -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -struct class *camera_class = NULL; -struct device *cam_dev_back = NULL; -struct device *cam_dev_front = NULL; - -uint16_t rear_vendor_id = 0; +#define CDBG(fmt, args...) pr_debug(fmt, ##args) static struct msm_sensor_init_t *s_init; - +static struct v4l2_file_operations msm_sensor_init_v4l2_subdev_fops; /* Static function declaration */ static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg); @@ -55,16 +43,13 @@ static int msm_sensor_wait_for_probe_done(struct msm_sensor_init_t *s_init) { int rc; int tm = 10000; - if (s_init->module_init_status == 1) { - pr_err("msm_cam_get_module_init_status -2\n"); + CDBG("msm_cam_get_module_init_status -2\n"); return 0; } - rc = wait_event_interruptible_timeout(s_init->state_wait, + rc = wait_event_timeout(s_init->state_wait, (s_init->module_init_status == 1), msecs_to_jiffies(tm)); - if (rc < 0) - pr_err("%s:%d wait failed\n", __func__, __LINE__); - else if (rc == 0) + if (rc == 0) pr_err("%s:%d wait timeout\n", __func__, __LINE__); return rc; @@ -79,7 +64,7 @@ static int32_t msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, /* Validate input parameters */ if (!s_init || !cfg) { - pr_err("failed: s_init %pK cfg %pK", s_init, cfg); + pr_err("failed: s_init %p cfg %p", s_init, cfg); return -EINVAL; } @@ -87,7 +72,9 @@ static int32_t msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, case CFG_SINIT_PROBE: mutex_lock(&s_init->imutex); s_init->module_init_status = 0; - rc = msm_sensor_driver_probe(cfg->cfg.setting); + rc = msm_sensor_driver_probe(cfg->cfg.setting, + &cfg->probed_info, + cfg->entity_name); mutex_unlock(&s_init->imutex); if (rc < 0) pr_err("failed: msm_sensor_driver_probe rc %d", rc); @@ -119,7 +106,7 @@ static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, /* Validate input parameters */ if (!s_init) { - pr_err("failed: s_init %pK", s_init); + pr_err("failed: s_init %p", s_init); return -EINVAL; } @@ -133,420 +120,59 @@ static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, break; } - return rc; -} - - -static ssize_t back_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - -#if defined(CONFIG_IMX219) - char type[] = "SONY_IMX219\n"; -#elif defined(CONFIG_S5K4H5YB) - char type[] = "SLSI_S5K4H5YB\n"; -#elif defined(CONFIG_S5K4H5YC) - char type[] = "SLSI_S5K4H5YC\n"; -#elif defined(CONFIG_S5K3L2XX) - char type[] = "SLSI_S5K3L2XX\n"; -#elif defined(CONFIG_S5K4ECGX) - char type[] = "SLSI_S5K4ECGX\n"; -#elif defined(CONFIG_IMX135) - char type[] = "SONY_IMX135\n"; -#elif defined(CONFIG_SR544) - char type[] = "SILICONFILE_SR544\n"; -#elif defined(CONFIG_S5K3P3SX) - char type[] = "SLSI_S5K3P3SX\n"; -#elif defined(CONFIG_SR352) - char type[] = "SILICONFILE_SR352\n"; -#else - char type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(type), "%s", type); -} - -static ssize_t front_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K6A3YX) - char cam_type[] = "SLSI_S5K6A3YX\n"; -#elif defined(CONFIG_S5K5E3YX) - char cam_type[] = "SLSI_S5K5E3YX\n"; -#elif defined(CONFIG_SR552) - char cam_type[] = "SLSI_SR522\n"; -#elif defined(CONFIG_SR200PC20) - char cam_type[] = "SILICONFILE_SR200PC20\n"; -#elif defined(CONFIG_SR130PC20) - char cam_type[] = "SILICONFILE_SR130PC20\n"; -#elif defined(CONFIG_DB8221A) - char cam_type[] = "DONGBU_DB8221A\n"; -#else - char cam_type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(cam_type), "%s", cam_type); -} - -char cam_fw_ver[25] = "NULL NULL\n"; -static ssize_t back_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K4ECGX) - char cam_fw[] = "S5K4ECGA N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#elif defined(CONFIG_SR352) - char cam_fw[] = "SR352 N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#else - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_ver); - return snprintf(buf, sizeof(cam_fw_ver), "%s", cam_fw_ver); -#endif -} - -static ssize_t back_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_ver, sizeof(cam_fw_ver), "%s", buf); - - return size; -} - -char cam_load_fw[25] = "NULL\n"; -static ssize_t back_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", cam_load_fw); - return snprintf(buf, sizeof(cam_load_fw), "%s", cam_load_fw); -} - -static ssize_t back_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_load_fw, sizeof(cam_load_fw), "%s\n", buf); - return size; -} - -char cam_cal[40] = "NULL NULL NULL\n";//cam map - -static ssize_t back_cal_data_check_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_cal : %s\n", cam_cal); - return snprintf(buf, sizeof(cam_cal), "%s", cam_cal); -} - -static ssize_t back_cal_data_check_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_cal, sizeof(cam_cal), "%s", buf); - return size; -} - -char cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t back_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_full_ver); - return snprintf(buf, sizeof(cam_fw_full_ver), "%s", cam_fw_full_ver); -} - -static ssize_t back_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_full_ver, sizeof(cam_fw_full_ver), "%s", buf); - return size; -} - -static ssize_t rear_camera_isp_core_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char isp_core[] = "0.9000\n"; - return snprintf(buf, sizeof(isp_core), "%s", isp_core); -} -static ssize_t rear_camera_vendorid_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char vendor_id[16] = {0}; - if (rear_vendor_id) - sprintf(vendor_id, "0x0%x\n", rear_vendor_id); - else - strncpy(vendor_id, "NULL\n", sizeof(vendor_id)); - - return snprintf(buf, sizeof(vendor_id), "%s", vendor_id); -} - -char cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_user_ver); - return snprintf(buf, sizeof(cam_fw_user_ver), "%s", cam_fw_user_ver); -} - -static ssize_t back_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_user_ver, sizeof(cam_fw_user_ver), "%s", buf); - - return size; -} - -char cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_factory_ver); - return snprintf(buf, sizeof(cam_fw_factory_ver), "%s", cam_fw_factory_ver); -} - -static ssize_t back_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_factory_ver, sizeof(cam_fw_factory_ver), "%s", buf); - - return size; -} - -char front_cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t front_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", front_cam_fw_user_ver); - return snprintf(buf, sizeof(front_cam_fw_user_ver), "%s", front_cam_fw_user_ver); -} - -static ssize_t front_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_user_ver, sizeof(front_cam_fw_user_ver), "%s", buf); - - return size; -} - -char front_cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t front_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", front_cam_fw_factory_ver); - return snprintf(buf, sizeof(front_cam_fw_factory_ver), "%s", front_cam_fw_factory_ver); -} - -static ssize_t front_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_factory_ver, sizeof(front_cam_fw_factory_ver), "%s", buf); - - return size; -} - - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) - char front_cam_fw_ver[25] = "S5K5E3YX N\n"; -#elif defined(CONFIG_SR552) - char front_cam_fw_ver[25] = "SR552 N\n"; -#elif defined(CONFIG_S5K6A3YX) - char front_cam_fw_ver[25] = "S5K6A3YX N\n"; -#elif defined(CONFIG_SR200PC20) - char front_cam_fw_ver[25] = "SR200PC20M N\n"; -#elif defined(CONFIG_SR130PC20) - char front_cam_fw_ver[25] = "SR130PC20 N\n"; -#elif defined(CONFIG_DB8221A) - char front_cam_fw_ver[25] = "DB8221A N\n"; -#else - char front_cam_fw_ver[25] = "NULL NULL\n"; -#endif -static ssize_t front_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_ver : %s\n", front_cam_fw_ver); - return snprintf(buf, sizeof(front_cam_fw_ver), "%s", front_cam_fw_ver); -} - -static ssize_t front_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_ver, sizeof(front_cam_fw_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_load_fw[25] = "S5K5E3YX\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "S5K5E3YX N N\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#else -char front_cam_load_fw[25] = "NULL\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -char rear_cam_info[100] = "NULL\n"; //camera_info -static ssize_t rear_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", rear_cam_info); - return snprintf(buf, sizeof(rear_cam_info), "%s", rear_cam_info); + return 0; } -static ssize_t rear_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) +#ifdef CONFIG_COMPAT +static long msm_sensor_init_subdev_do_ioctl( + struct file *file, unsigned int cmd, void *arg) { - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(rear_cam_info, sizeof(rear_cam_info), "%s", buf); - - return size; -} + int32_t rc = 0; + struct video_device *vdev = video_devdata(file); + struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); + struct sensor_init_cfg_data32 *u32 = + (struct sensor_init_cfg_data32 *)arg; + struct sensor_init_cfg_data sensor_init_data; -char front_cam_info[100] = "NULL\n"; //camera_info -static ssize_t front_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", front_cam_info); - return snprintf(buf, sizeof(front_cam_info), "%s", front_cam_info); + switch (cmd) { + case VIDIOC_MSM_SENSOR_INIT_CFG32: + memset(&sensor_init_data, 0, sizeof(sensor_init_data)); + sensor_init_data.cfgtype = u32->cfgtype; + sensor_init_data.cfg.setting = compat_ptr(u32->cfg.setting); + cmd = VIDIOC_MSM_SENSOR_INIT_CFG; + rc = msm_sensor_init_subdev_ioctl(sd, cmd, &sensor_init_data); + if (rc < 0) { + pr_err("%s:%d VIDIOC_MSM_SENSOR_INIT_CFG failed", + __func__, __LINE__); + return rc; + } + u32->probed_info = sensor_init_data.probed_info; + strlcpy(u32->entity_name, sensor_init_data.entity_name, + sizeof(sensor_init_data.entity_name)); + return 0; + default: + return msm_sensor_init_subdev_ioctl(sd, cmd, arg); + } } -static ssize_t front_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) +static long msm_sensor_init_subdev_fops_ioctl( + struct file *file, unsigned int cmd, unsigned long arg) { - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(front_cam_info, sizeof(front_cam_info), "%s", buf); - - return size; + return video_usercopy(file, cmd, arg, msm_sensor_init_subdev_do_ioctl); } #endif -static DEVICE_ATTR(rear_camtype, S_IRUGO, back_camera_type_show, NULL); -static DEVICE_ATTR(rear_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_show, back_camera_firmware_store); -static DEVICE_ATTR(rear_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_user_show, back_camera_firmware_user_store); -static DEVICE_ATTR(rear_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_factory_show, back_camera_firmware_factory_store); -static DEVICE_ATTR(rear_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_load_show, back_camera_firmware_load_store); -static DEVICE_ATTR(rear_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - back_camera_firmware_full_show, back_camera_firmware_full_store); -static DEVICE_ATTR(isp_core, S_IRUGO, rear_camera_isp_core_show, NULL); -static DEVICE_ATTR(front_camtype, S_IRUGO, front_camera_type_show, NULL); -static DEVICE_ATTR(front_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_show, front_camera_firmware_store); -static DEVICE_ATTR(front_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_load_show, front_camera_firmware_load_store); - -static DEVICE_ATTR(front_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - front_camera_firmware_full_show, front_camera_firmware_full_store); -static DEVICE_ATTR(front_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_user_show, front_camera_firmware_user_store); -static DEVICE_ATTR(front_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_factory_show, front_camera_firmware_factory_store); - -static DEVICE_ATTR(rear_vendorid, S_IRUGO, rear_camera_vendorid_show, NULL); -static DEVICE_ATTR(rear_afcal, S_IRUGO|S_IWUSR|S_IWGRP, - back_cal_data_check_show, back_cal_data_check_store); -#if defined (CONFIG_CAMERA_SYSFS_V2) -static DEVICE_ATTR(rear_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - rear_camera_info_show, rear_camera_info_store); -static DEVICE_ATTR(front_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_info_show, front_camera_info_store); -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id, int remove) -{ - if(id == CAMERA_0) { - if(remove == -1) { - device_remove_file(cam_dev_back, &dev_attr_rear_camfw_full); - pr_err("[CAM][Rear] EEPROM node removed\n"); - } - } else { - if(remove == -1) { - device_remove_file(cam_dev_front, &dev_attr_front_camfw_full); - pr_err("[CAM][Front] EEPROM node removed\n"); - } - } - return 0; -} static int __init msm_sensor_init_module(void) { - struct msm_sensor_init_t *s_init = NULL; - int rc = 0; - - if (camera_class == NULL){ - camera_class = class_create(THIS_MODULE, "camera"); - if (IS_ERR(camera_class)) - pr_err("failed to create device cam_dev_rear!\n"); - } + int ret = 0; /* Allocate memory for msm_sensor_init control structure */ s_init = kzalloc(sizeof(struct msm_sensor_init_t), GFP_KERNEL); if (!s_init) { - class_destroy(camera_class); - pr_err("failed: no memory s_init %pK", NULL); + pr_err("failed: no memory s_init %p", NULL); return -ENOMEM; } - pr_err("MSM_SENSOR_INIT_MODULE %pK", NULL); + CDBG("MSM_SENSOR_INIT_MODULE %p", NULL); /* Initialize mutex */ mutex_init(&s_init->imutex); @@ -558,150 +184,32 @@ static int __init msm_sensor_init_module(void) v4l2_set_subdevdata(&s_init->msm_sd.sd, s_init); s_init->msm_sd.sd.internal_ops = &msm_sensor_init_internal_ops; s_init->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - rc = media_entity_init(&s_init->msm_sd.sd.entity, 0, NULL, 0); - if (rc < 0) - goto entity_fail; + media_entity_init(&s_init->msm_sd.sd.entity, 0, NULL, 0); s_init->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; s_init->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR_INIT; s_init->msm_sd.sd.entity.name = s_init->msm_sd.sd.name; s_init->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - rc = msm_sd_register(&s_init->msm_sd); - if (rc < 0) - goto msm_sd_register_fail; - - cam_dev_back = device_create(camera_class, NULL, - 1, NULL, "rear"); - if (IS_ERR(cam_dev_back)) { - printk("Failed to create cam_dev_back device!\n"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_afcal) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_afcal.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_isp_core) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_isp_core.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; + ret = msm_sd_register(&s_init->msm_sd); + if (ret) { + CDBG("%s: msm_sd_register error = %d\n", __func__, ret); + goto error; } - if (device_create_file(cam_dev_back, &dev_attr_rear_vendorid) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_vendorid.attr.name); - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_back, &dev_attr_rear_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_caminfo.attr.name); - goto device_create_fail; - } -#endif - - cam_dev_front = device_create(camera_class, NULL, - 2, NULL, "front"); - if (IS_ERR(cam_dev_front)) { - printk("Failed to create cam_dev_front device!"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camfw.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_front, &dev_attr_front_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_caminfo.attr.name); - goto device_create_fail; - } + msm_sensor_init_v4l2_subdev_fops = v4l2_subdev_fops; +#ifdef CONFIG_COMPAT + msm_sensor_init_v4l2_subdev_fops.compat_ioctl32 = + msm_sensor_init_subdev_fops_ioctl; #endif + s_init->msm_sd.sd.devnode->fops = + &msm_sensor_init_v4l2_subdev_fops; init_waitqueue_head(&s_init->state_wait); return 0; -device_create_fail: - msm_sd_unregister(&s_init->msm_sd); -msm_sd_register_fail: - media_entity_cleanup(&s_init->msm_sd.sd.entity); -entity_fail: +error: mutex_destroy(&s_init->imutex); kfree(s_init); - class_destroy(camera_class); - return rc; + return ret; } static void __exit msm_sensor_exit_module(void) diff --git a/drivers/media/platform/msm/camera_v2/sensor/mt9m114.c b/drivers/media/platform/msm/camera_v2/sensor/mt9m114.c index 97feef3d945c..3111af936f0b 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/mt9m114.c +++ b/drivers/media/platform/msm/camera_v2/sensor/mt9m114.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,13 +17,8 @@ #define PLATFORM_DRIVER_NAME "msm_camera_mt9m114" #define mt9m114_obj mt9m114_##obj -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif +#define CDBG(fmt, args...) pr_debug(fmt, ##args) /* Sysctl registers */ #define MT9M114_COMMAND_REGISTER 0x0080 @@ -1145,7 +1140,12 @@ static int32_t mt9m114_platform_probe(struct platform_device *pdev) int32_t rc; const struct of_device_id *match; match = of_match_device(mt9m114_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); + if (match) + rc = msm_sensor_platform_probe(pdev, match->data); + else { + pr_err("%s:%d match is null\n", __func__, __LINE__); + rc = -EINVAL; + } return rc; } @@ -1188,9 +1188,12 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, sizeof(cdata->cfg.sensor_info.sensor_name)); cdata->cfg.sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) + for (i = 0; i < SUB_MODULE_MAX; i++) { cdata->cfg.sensor_info.subdev_id[i] = s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } cdata->cfg.sensor_info.is_mount_angle_valid = s_ctrl->sensordata->sensor_info->is_mount_angle_valid; cdata->cfg.sensor_info.sensor_mount_angle = @@ -1252,72 +1255,6 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, cdata->cfg.sensor_init_params.position, cdata->cfg.sensor_init_params.sensor_mount_angle); break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } case CFG_WRITE_I2C_ARRAY: { struct msm_camera_i2c_reg_setting conf_array; struct msm_camera_i2c_reg_array *reg_setting = NULL; @@ -1330,43 +1267,15 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, break; } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); if (!reg_setting) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -ENOMEM; @@ -1374,7 +1283,7 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, } if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { + sizeof(struct msm_camera_i2c_reg_array))) { pr_err("%s:%d failed\n", __func__, __LINE__); kfree(reg_setting); rc = -EFAULT; @@ -1382,13 +1291,11 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, } conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( + s_ctrl->sensor_i2c_client, &conf_array); kfree(reg_setting); break; } - case CFG_POWER_UP: if (s_ctrl->func_tbl->sensor_power_up) rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); @@ -1477,6 +1384,18 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, pr_debug("%s: Cancelling Auto Focus", __func__); break; } + case CFG_SET_WHITE_BALANCE: + break; + case CFG_SET_EXPOSURE_COMPENSATION: + break; + case CFG_SET_EFFECT: + break; + case CFG_SET_ANTIBANDING: + break; + case CFG_SET_BESTSHOT_MODE: + break; + case CFG_SET_ISO: + break; default: rc = -EFAULT; break; @@ -1487,8 +1406,229 @@ int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, return rc; } +#ifdef CONFIG_COMPAT +int32_t mt9m114_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, + void __user *argp) +{ + struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; + int32_t rc = 0; + int32_t i = 0; + mutex_lock(s_ctrl->msm_sensor_mutex); + CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, + s_ctrl->sensordata->sensor_name, cdata->cfgtype); + switch (cdata->cfgtype) { + case CFG_GET_SENSOR_INFO: + memcpy(cdata->cfg.sensor_info.sensor_name, + s_ctrl->sensordata->sensor_name, + sizeof(cdata->cfg.sensor_info.sensor_name)); + cdata->cfg.sensor_info.session_id = + s_ctrl->sensordata->sensor_info->session_id; + for (i = 0; i < SUB_MODULE_MAX; i++) { + cdata->cfg.sensor_info.subdev_id[i] = + s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } + cdata->cfg.sensor_info.is_mount_angle_valid = + s_ctrl->sensordata->sensor_info->is_mount_angle_valid; + cdata->cfg.sensor_info.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + CDBG("%s:%d sensor name %s\n", __func__, __LINE__, + cdata->cfg.sensor_info.sensor_name); + CDBG("%s:%d session id %d\n", __func__, __LINE__, + cdata->cfg.sensor_info.session_id); + for (i = 0; i < SUB_MODULE_MAX; i++) + CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, + cdata->cfg.sensor_info.subdev_id[i]); + CDBG("%s:%d mount angle valid %d value %d\n", __func__, + __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, + cdata->cfg.sensor_info.sensor_mount_angle); + + break; + case CFG_SET_INIT_SETTING: + /* 1. Write Recommend settings */ + /* 2. Write change settings */ + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, mt9m114_recommend_settings, + ARRAY_SIZE(mt9m114_recommend_settings), + MSM_CAMERA_I2C_WORD_DATA); + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, + mt9m114_config_change_settings, + ARRAY_SIZE(mt9m114_config_change_settings), + MSM_CAMERA_I2C_WORD_DATA); + break; + case CFG_SET_RESOLUTION: + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, mt9m114_720p_settings, + ARRAY_SIZE(mt9m114_720p_settings), + MSM_CAMERA_I2C_WORD_DATA); + break; + case CFG_SET_STOP_STREAM: + break; + case CFG_SET_START_STREAM: + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, + mt9m114_config_change_settings, + ARRAY_SIZE(mt9m114_config_change_settings), + MSM_CAMERA_I2C_WORD_DATA); + break; + case CFG_GET_SENSOR_INIT_PARAMS: + cdata->cfg.sensor_init_params.modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + cdata->cfg.sensor_init_params.position = + s_ctrl->sensordata->sensor_info->position; + cdata->cfg.sensor_init_params.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, + __LINE__, + cdata->cfg.sensor_init_params.modes_supported, + cdata->cfg.sensor_init_params.position, + cdata->cfg.sensor_init_params.sensor_mount_angle); + break; + case CFG_WRITE_I2C_ARRAY: { + struct msm_camera_i2c_reg_setting32 conf_array32; + struct msm_camera_i2c_reg_setting conf_array; + struct msm_camera_i2c_reg_array *reg_setting = NULL; + + if (copy_from_user(&conf_array32, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(struct msm_camera_i2c_reg_setting32))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + conf_array.addr_type = conf_array32.addr_type; + conf_array.data_type = conf_array32.data_type; + conf_array.delay = conf_array32.delay; + conf_array.size = conf_array32.size; + conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); + conf_array.qup_i2c_batch = conf_array32.qup_i2c_batch; + + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + reg_setting = kzalloc(conf_array.size * + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); + if (!reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; + break; + } + if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, + conf_array.size * + sizeof(struct msm_camera_i2c_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + kfree(reg_setting); + rc = -EFAULT; + break; + } + + conf_array.reg_setting = reg_setting; + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( + s_ctrl->sensor_i2c_client, &conf_array); + kfree(reg_setting); + break; + } + case CFG_POWER_UP: + if (s_ctrl->func_tbl->sensor_power_up) + rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); + else + rc = -EFAULT; + break; + + case CFG_POWER_DOWN: + if (s_ctrl->func_tbl->sensor_power_down) + rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); + else + rc = -EFAULT; + break; + + case CFG_SET_SATURATION: { + int32_t sat_lev; + if (copy_from_user(&sat_lev, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(int32_t))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + pr_debug("%s: Saturation Value is %d", __func__, sat_lev); + break; + } + case CFG_SET_CONTRAST: { + int32_t con_lev; + if (copy_from_user(&con_lev, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(int32_t))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + pr_debug("%s: Contrast Value is %d", __func__, con_lev); + break; + } + case CFG_SET_SHARPNESS: { + int32_t shp_lev; + if (copy_from_user(&shp_lev, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(int32_t))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); + break; + } + case CFG_SET_AUTOFOCUS: { + /* TO-DO: set the Auto Focus */ + pr_debug("%s: Setting Auto Focus", __func__); + break; + } + case CFG_CANCEL_AUTOFOCUS: { + /* TO-DO: Cancel the Auto Focus */ + pr_debug("%s: Cancelling Auto Focus", __func__); + break; + } + case CFG_SET_WHITE_BALANCE: + break; + case CFG_SET_EXPOSURE_COMPENSATION: + break; + case CFG_SET_EFFECT: + break; + case CFG_SET_ANTIBANDING: + break; + case CFG_SET_BESTSHOT_MODE: + break; + case CFG_SET_ISO: + break; + default: + pr_err("Invalid cfgtype func %s line %d cfgtype = %d\n", + __func__, __LINE__, (int32_t)cdata->cfgtype); + rc = -EFAULT; + break; + } + + mutex_unlock(s_ctrl->msm_sensor_mutex); + + return rc; +} +#endif + static struct msm_sensor_fn_t mt9m114_sensor_func_tbl = { .sensor_config = mt9m114_sensor_config, +#ifdef CONFIG_COMPAT + .sensor_config32 = mt9m114_sensor_config32, +#endif .sensor_power_up = msm_sensor_power_up, .sensor_power_down = msm_sensor_power_down, .sensor_match_id = msm_sensor_match_id, diff --git a/drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c b/drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c index 2c7d7fb84c7a..f5e859d424d1 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c +++ b/drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 - 2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2015, 2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -297,7 +297,8 @@ static int32_t msm_ois_config(struct msm_ois_ctrl_t *o_ctrl, break; } - if (!conf_array.size) { + if (!conf_array.size || + conf_array.size > I2C_SEQ_REG_DATA_MAX) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; @@ -409,7 +410,7 @@ static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd, struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); void __user *argp = (void __user *)arg; CDBG("Enter\n"); - CDBG("%s:%d o_ctrl %pK argp %pK\n", __func__, __LINE__, o_ctrl, argp); + CDBG("%s:%d o_ctrl %p argp %p\n", __func__, __LINE__, o_ctrl, argp); switch (cmd) { case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: return msm_ois_get_subdev_id(o_ctrl, argp); @@ -497,7 +498,7 @@ static int32_t msm_ois_i2c_probe(struct i2c_client *client, goto probe_failure; } - CDBG("client = 0x%pK\n", client); + CDBG("client = 0x%p\n", client); rc = of_property_read_u32(client->dev.of_node, "cell-index", &ois_ctrl_t->subdev_id); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov12830.c b/drivers/media/platform/msm/camera_v2/sensor/ov12830.c deleted file mode 100644 index fb6d548f1f22..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov12830.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV12830_SENSOR_NAME "ov12830" -DEFINE_MSM_MUTEX(ov12830_mut); - -static struct msm_sensor_ctrl_t ov12830_s_ctrl; - -static struct msm_sensor_power_setting ov12830_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov12830_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov12830_i2c_id[] = { - {OV12830_SENSOR_NAME, - (kernel_ulong_t)&ov12830_s_ctrl}, - { } -}; - -static int msm_ov12830_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov12830_s_ctrl); -} - -static struct i2c_driver ov12830_i2c_driver = { - .id_table = ov12830_i2c_id, - .probe = msm_ov12830_i2c_probe, - .driver = { - .name = OV12830_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov12830_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov12830_dt_match[] = { - {.compatible = "qcom,ov12830", - .data = &ov12830_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov12830_dt_match); - -static struct platform_driver ov12830_platform_driver = { - .driver = { - .name = "qcom,ov12830", - .owner = THIS_MODULE, - .of_match_table = ov12830_dt_match, - }, -}; - -static int32_t ov12830_platform_probe - (struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov12830_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov12830_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov12830_platform_driver, - ov12830_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov12830_i2c_driver); -} - -static void __exit ov12830_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov12830_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov12830_s_ctrl); - platform_driver_unregister - (&ov12830_platform_driver); - } else { - i2c_del_driver(&ov12830_i2c_driver); - } -} - -static struct msm_sensor_ctrl_t ov12830_s_ctrl = { - .sensor_i2c_client = &ov12830_sensor_i2c_client, - .power_setting_array.power_setting = ov12830_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov12830_power_setting), - .msm_sensor_mutex = &ov12830_mut, - .sensor_v4l2_subdev_info = ov12830_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov12830_subdev_info), -}; - -module_init(ov12830_init_module); -module_exit(ov12830_exit_module); -MODULE_DESCRIPTION("ov12830"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov2720.c b/drivers/media/platform/msm/camera_v2/sensor/ov2720.c deleted file mode 100644 index 397564b3ef62..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov2720.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV2720_SENSOR_NAME "ov2720" -DEFINE_MSM_MUTEX(ov2720_mut); - -static struct msm_sensor_ctrl_t ov2720_s_ctrl; - -static struct msm_sensor_power_setting ov2720_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov2720_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov2720_i2c_id[] = { - {OV2720_SENSOR_NAME, (kernel_ulong_t)&ov2720_s_ctrl}, - { } -}; - -static int32_t msm_ov2720_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov2720_s_ctrl); -} - -static struct i2c_driver ov2720_i2c_driver = { - .id_table = ov2720_i2c_id, - .probe = msm_ov2720_i2c_probe, - .driver = { - .name = OV2720_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov2720_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov2720_dt_match[] = { - {.compatible = "qcom,ov2720", .data = &ov2720_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov2720_dt_match); - -static struct platform_driver ov2720_platform_driver = { - .driver = { - .name = "qcom,ov2720", - .owner = THIS_MODULE, - .of_match_table = ov2720_dt_match, - }, -}; - -static int32_t ov2720_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov2720_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov2720_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov2720_platform_driver, - ov2720_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov2720_i2c_driver); -} - -static void __exit ov2720_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov2720_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov2720_s_ctrl); - platform_driver_unregister(&ov2720_platform_driver); - } else - i2c_del_driver(&ov2720_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov2720_s_ctrl = { - .sensor_i2c_client = &ov2720_sensor_i2c_client, - .power_setting_array.power_setting = ov2720_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov2720_power_setting), - .msm_sensor_mutex = &ov2720_mut, - .sensor_v4l2_subdev_info = ov2720_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov2720_subdev_info), -}; - -module_init(ov2720_init_module); -module_exit(ov2720_exit_module); -MODULE_DESCRIPTION("ov2720"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov5645.c b/drivers/media/platform/msm/camera_v2/sensor/ov5645.c index 7b84d8392571..e93361654bf9 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/ov5645.c +++ b/drivers/media/platform/msm/camera_v2/sensor/ov5645.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,14 +17,8 @@ #define PLATFORM_DRIVER_NAME "msm_camera_ov5645" #define ov5645_obj ov5645_##obj -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ #undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - +#define CDBG(fmt, args...) pr_debug(fmt, ##args) DEFINE_MSM_MUTEX(ov5645_mut); static struct msm_sensor_ctrl_t ov5645_s_ctrl; @@ -539,7 +533,12 @@ static int32_t ov5645_platform_probe(struct platform_device *pdev) int32_t rc; const struct of_device_id *match; match = of_match_device(ov5645_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); + if (match) + rc = msm_sensor_platform_probe(pdev, match->data); + else { + pr_err("%s:%d match is null\n", __func__, __LINE__); + rc = -EINVAL; + } return rc; } @@ -590,9 +589,12 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, sizeof(cdata->cfg.sensor_info.sensor_name)); cdata->cfg.sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) + for (i = 0; i < SUB_MODULE_MAX; i++) { cdata->cfg.sensor_info.subdev_id[i] = s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } cdata->cfg.sensor_info.is_mount_angle_valid = s_ctrl->sensordata->sensor_info->is_mount_angle_valid; cdata->cfg.sensor_info.sensor_mount_angle = @@ -674,18 +676,21 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, if (s_ctrl->camera_stream_type != MSM_CAMERA_STREAM_SNAPSHOT) { rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_enable_aec_settings, + s_ctrl->sensor_i2c_client, + ov5645_enable_aec_settings, ARRAY_SIZE(ov5645_enable_aec_settings), MSM_CAMERA_I2C_BYTE_DATA); } else { rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_disable_aec_settings, + s_ctrl->sensor_i2c_client, + ov5645_disable_aec_settings, ARRAY_SIZE(ov5645_disable_aec_settings), MSM_CAMERA_I2C_BYTE_DATA); } if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); + pr_err("%s:%d failed rc = %ld\n", __func__, __LINE__, + rc); rc = -EFAULT; break; } @@ -709,69 +714,6 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, cdata->cfg.sensor_init_params.position, cdata->cfg.sensor_init_params.sensor_mount_angle); break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x sensor addr type %d sensor reg %x\n" - "sensor id %x\n", __func__, - sensor_slave_info.slave_addr, - sensor_slave_info.addr_type, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } case CFG_WRITE_I2C_ARRAY: { struct msm_camera_i2c_reg_setting conf_array; struct msm_camera_i2c_reg_array *reg_setting = NULL; @@ -784,43 +726,16 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, break; } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -EFAULT; break; } reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); if (!reg_setting) { pr_err("%s:%d failed\n", __func__, __LINE__); rc = -ENOMEM; @@ -828,7 +743,7 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, } if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { + sizeof(struct msm_camera_i2c_reg_array))) { pr_err("%s:%d failed\n", __func__, __LINE__); kfree(reg_setting); rc = -EFAULT; @@ -836,13 +751,11 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, } conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( + s_ctrl->sensor_i2c_client, &conf_array); kfree(reg_setting); break; } - case CFG_POWER_UP: if (s_ctrl->func_tbl->sensor_power_up) rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); @@ -889,7 +802,8 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, break; } case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; + enum msm_camera_stream_type_t stream_type = + MSM_CAMERA_STREAM_INVALID; if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, sizeof(enum msm_camera_stream_type_t))) { pr_err("%s:%d failed\n", __func__, __LINE__); @@ -935,8 +849,272 @@ int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, return rc; } +#ifdef CONFIG_COMPAT +int32_t ov5645_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, + void __user *argp) +{ + struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; + long rc = 0; + int32_t i = 0; + mutex_lock(s_ctrl->msm_sensor_mutex); + CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, + s_ctrl->sensordata->sensor_name, cdata->cfgtype); + switch (cdata->cfgtype) { + case CFG_GET_SENSOR_INFO: + memcpy(cdata->cfg.sensor_info.sensor_name, + s_ctrl->sensordata->sensor_name, + sizeof(cdata->cfg.sensor_info.sensor_name)); + cdata->cfg.sensor_info.session_id = + s_ctrl->sensordata->sensor_info->session_id; + for (i = 0; i < SUB_MODULE_MAX; i++) { + cdata->cfg.sensor_info.subdev_id[i] = + s_ctrl->sensordata->sensor_info->subdev_id[i]; + cdata->cfg.sensor_info.subdev_intf[i] = + s_ctrl->sensordata->sensor_info->subdev_intf[i]; + } + cdata->cfg.sensor_info.is_mount_angle_valid = + s_ctrl->sensordata->sensor_info->is_mount_angle_valid; + cdata->cfg.sensor_info.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + cdata->cfg.sensor_info.position = + s_ctrl->sensordata->sensor_info->position; + cdata->cfg.sensor_info.modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + CDBG("%s:%d sensor name %s\n", __func__, __LINE__, + cdata->cfg.sensor_info.sensor_name); + CDBG("%s:%d session id %d\n", __func__, __LINE__, + cdata->cfg.sensor_info.session_id); + for (i = 0; i < SUB_MODULE_MAX; i++) + CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, + cdata->cfg.sensor_info.subdev_id[i]); + CDBG("%s:%d mount angle valid %d value %d\n", __func__, + __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, + cdata->cfg.sensor_info.sensor_mount_angle); + + break; + case CFG_SET_INIT_SETTING: + /* 1. Write Recommend settings */ + /* 2. Write change settings */ + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, ov5645_recommend_settings, + ARRAY_SIZE(ov5645_recommend_settings), + MSM_CAMERA_I2C_BYTE_DATA); + break; + + case CFG_SET_RESOLUTION: { + /*copy from user the desired resoltuion*/ + enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; + if (copy_from_user(&res, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(enum msm_sensor_resolution_t))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + pr_err("%s:%d res =%d\n", __func__, __LINE__, res); + + if (res == MSM_SENSOR_RES_FULL) { + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, ov5645_full_settings, + ARRAY_SIZE(ov5645_full_settings), + MSM_CAMERA_I2C_BYTE_DATA); + pr_err("%s:%d res =%d\n ov5645_full_settings ", + __func__, __LINE__, res); + } else if (res == MSM_SENSOR_RES_QTR) { + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, ov5645_sxga_settings, + ARRAY_SIZE(ov5645_sxga_settings), + MSM_CAMERA_I2C_BYTE_DATA); + pr_err("%s:%d res =%d ov5645_sxga_settings\n", + __func__, __LINE__, res); + } else if (res == MSM_SENSOR_RES_2) { + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, + ov5645_1080P_settings, + ARRAY_SIZE(ov5645_1080P_settings), + MSM_CAMERA_I2C_BYTE_DATA); + pr_err("%s:%d res =%d ov5645_1080P_settings\n", + __func__, __LINE__, res); + } else { + pr_err("%s:%d failed resoultion set\n", __func__, + __LINE__); + rc = -EFAULT; + } + } + break; + case CFG_SET_STOP_STREAM: + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, ov5645_stop_settings, + ARRAY_SIZE(ov5645_stop_settings), + MSM_CAMERA_I2C_BYTE_DATA); + break; + case CFG_SET_START_STREAM: + if (s_ctrl->camera_stream_type != MSM_CAMERA_STREAM_SNAPSHOT) { + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, + ov5645_enable_aec_settings, + ARRAY_SIZE(ov5645_enable_aec_settings), + MSM_CAMERA_I2C_BYTE_DATA); + } else { + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, + ov5645_disable_aec_settings, + ARRAY_SIZE(ov5645_disable_aec_settings), + MSM_CAMERA_I2C_BYTE_DATA); + } + if (rc) { + pr_err("%s:%d failed rc = %ld\n", __func__, __LINE__, + rc); + rc = -EFAULT; + break; + } + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> + i2c_write_conf_tbl( + s_ctrl->sensor_i2c_client, ov5645_start_settings, + ARRAY_SIZE(ov5645_start_settings), + MSM_CAMERA_I2C_BYTE_DATA); + break; + case CFG_GET_SENSOR_INIT_PARAMS: + cdata->cfg.sensor_init_params.modes_supported = + s_ctrl->sensordata->sensor_info->modes_supported; + cdata->cfg.sensor_init_params.position = + s_ctrl->sensordata->sensor_info->position; + cdata->cfg.sensor_init_params.sensor_mount_angle = + s_ctrl->sensordata->sensor_info->sensor_mount_angle; + CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, + __LINE__, + cdata->cfg.sensor_init_params.modes_supported, + cdata->cfg.sensor_init_params.position, + cdata->cfg.sensor_init_params.sensor_mount_angle); + break; + case CFG_WRITE_I2C_ARRAY: { + struct msm_camera_i2c_reg_setting32 conf_array32; + struct msm_camera_i2c_reg_setting conf_array; + struct msm_camera_i2c_reg_array *reg_setting = NULL; + + if (copy_from_user(&conf_array32, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(struct msm_camera_i2c_reg_setting32))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + conf_array.addr_type = conf_array32.addr_type; + conf_array.data_type = conf_array32.data_type; + conf_array.delay = conf_array32.delay; + conf_array.size = conf_array32.size; + conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); + conf_array.qup_i2c_batch = conf_array32.qup_i2c_batch; + + if (!conf_array.size || + conf_array.size > I2C_REG_DATA_MAX) { + + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + + reg_setting = kzalloc(conf_array.size * + (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); + if (!reg_setting) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -ENOMEM; + break; + } + if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, + conf_array.size * + sizeof(struct msm_camera_i2c_reg_array))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + kfree(reg_setting); + rc = -EFAULT; + break; + } + + conf_array.reg_setting = reg_setting; + rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( + s_ctrl->sensor_i2c_client, &conf_array); + kfree(reg_setting); + break; + } + case CFG_POWER_UP: + if (s_ctrl->func_tbl->sensor_power_up) + rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); + else + rc = -EFAULT; + break; + + case CFG_POWER_DOWN: + if (s_ctrl->func_tbl->sensor_power_down) + rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); + else + rc = -EFAULT; + break; + case CFG_SET_STREAM_TYPE: { + enum msm_camera_stream_type_t stream_type = + MSM_CAMERA_STREAM_INVALID; + if (copy_from_user(&stream_type, + (void *)compat_ptr(cdata->cfg.setting), + sizeof(enum msm_camera_stream_type_t))) { + pr_err("%s:%d failed\n", __func__, __LINE__); + rc = -EFAULT; + break; + } + s_ctrl->camera_stream_type = stream_type; + break; + } + case CFG_SET_SATURATION: + break; + case CFG_SET_CONTRAST: + break; + case CFG_SET_SHARPNESS: + break; + case CFG_SET_AUTOFOCUS: + /* TO-DO: set the Auto Focus */ + pr_debug("%s: Setting Auto Focus", __func__); + break; + case CFG_CANCEL_AUTOFOCUS: + /* TO-DO: Cancel the Auto Focus */ + pr_debug("%s: Cancelling Auto Focus", __func__); + break; + case CFG_SET_ISO: + break; + case CFG_SET_EXPOSURE_COMPENSATION: + break; + case CFG_SET_EFFECT: + break; + case CFG_SET_ANTIBANDING: + break; + case CFG_SET_BESTSHOT_MODE: + break; + case CFG_SET_WHITE_BALANCE: + break; + default: + pr_err("Invalid cfgtype func %s line %d cfgtype = %d\n", + __func__, __LINE__, (int32_t)cdata->cfgtype); + rc = -EFAULT; + break; + } + + mutex_unlock(s_ctrl->msm_sensor_mutex); + + return rc; +} +#endif + static struct msm_sensor_fn_t ov5645_sensor_func_tbl = { .sensor_config = ov5645_sensor_config, +#ifdef CONFIG_COMPAT + .sensor_config32 = ov5645_sensor_config32, +#endif .sensor_power_up = msm_sensor_power_up, .sensor_power_down = msm_sensor_power_down, .sensor_match_id = msm_sensor_match_id, diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov5648.c b/drivers/media/platform/msm/camera_v2/sensor/ov5648.c deleted file mode 100644 index 99224684a131..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov5648.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV5648_SENSOR_NAME "ov5648" -DEFINE_MSM_MUTEX(ov5648_mut); - -static struct msm_sensor_ctrl_t ov5648_s_ctrl; - -static struct msm_sensor_power_setting ov5648_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov5648_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov5648_i2c_id[] = { - {OV5648_SENSOR_NAME, - (kernel_ulong_t)&ov5648_s_ctrl}, - { } -}; - -static int32_t msm_ov5648_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5648_s_ctrl); -} - -static struct i2c_driver ov5648_i2c_driver = { - .id_table = ov5648_i2c_id, - .probe = msm_ov5648_i2c_probe, - .driver = { - .name = OV5648_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5648_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov5648_s_ctrl = { - .sensor_i2c_client = &ov5648_sensor_i2c_client, - .power_setting_array.power_setting = ov5648_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov5648_power_setting), - .msm_sensor_mutex = &ov5648_mut, - .sensor_v4l2_subdev_info = ov5648_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov5648_subdev_info), -}; - -static const struct of_device_id ov5648_dt_match[] = { - { - .compatible = "ovti,ov5648", - .data = &ov5648_s_ctrl - }, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5648_dt_match); - -static struct platform_driver ov5648_platform_driver = { - .driver = { - .name = "ovti,ov5648", - .owner = THIS_MODULE, - .of_match_table = ov5648_dt_match, - }, -}; - -static int32_t ov5648_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov5648_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov5648_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov5648_platform_driver, - ov5648_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov5648_i2c_driver); -} - -static void __exit ov5648_exit_module(void) -{ - if (ov5648_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5648_s_ctrl); - platform_driver_unregister(&ov5648_platform_driver); - } else - i2c_del_driver(&ov5648_i2c_driver); - return; -} - -module_init(ov5648_init_module); -module_exit(ov5648_exit_module); -MODULE_DESCRIPTION("ov5648"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov8825.c b/drivers/media/platform/msm/camera_v2/sensor/ov8825.c deleted file mode 100644 index e17c94e85b50..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov8825.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8825_SENSOR_NAME "ov8825" -DEFINE_MSM_MUTEX(ov8825_mut); - -static struct msm_sensor_ctrl_t ov8825_s_ctrl; - -static struct msm_sensor_power_setting ov8825_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8825_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8825_i2c_id[] = { - {OV8825_SENSOR_NAME, (kernel_ulong_t)&ov8825_s_ctrl}, - { } -}; - -static int32_t msm_ov8825_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8825_s_ctrl); -} - -static struct i2c_driver ov8825_i2c_driver = { - .id_table = ov8825_i2c_id, - .probe = msm_ov8825_i2c_probe, - .driver = { - .name = OV8825_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8825_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8825_dt_match[] = { - {.compatible = "qcom,ov8825", .data = &ov8825_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8825_dt_match); - -static struct platform_driver ov8825_platform_driver = { - .driver = { - .name = "qcom,ov8825", - .owner = THIS_MODULE, - .of_match_table = ov8825_dt_match, - }, -}; - -static int32_t ov8825_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8825_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8825_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8825_platform_driver, - ov8825_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8825_i2c_driver); -} - -static void __exit ov8825_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8825_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8825_s_ctrl); - platform_driver_unregister(&ov8825_platform_driver); - } else - i2c_del_driver(&ov8825_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8825_s_ctrl = { - .sensor_i2c_client = &ov8825_sensor_i2c_client, - .power_setting_array.power_setting = ov8825_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8825_power_setting), - .msm_sensor_mutex = &ov8825_mut, - .sensor_v4l2_subdev_info = ov8825_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8825_subdev_info), -}; - -module_init(ov8825_init_module); -module_exit(ov8825_exit_module); -MODULE_DESCRIPTION("ov8825"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov8865.c b/drivers/media/platform/msm/camera_v2/sensor/ov8865.c deleted file mode 100644 index 6d788f592b17..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov8865.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8865_SENSOR_NAME "ov8865" -DEFINE_MSM_MUTEX(ov8865_mut); - -static struct msm_sensor_ctrl_t ov8865_s_ctrl; - -static struct msm_sensor_power_setting ov8865_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8865_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8865_i2c_id[] = { - {OV8865_SENSOR_NAME, (kernel_ulong_t)&ov8865_s_ctrl}, - { } -}; - -static int32_t msm_ov8865_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8865_s_ctrl); -} - -static struct i2c_driver ov8865_i2c_driver = { - .id_table = ov8865_i2c_id, - .probe = msm_ov8865_i2c_probe, - .driver = { - .name = OV8865_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8865_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8865_dt_match[] = { - {.compatible = "ovti,ov8865", .data = &ov8865_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8865_dt_match); - -static struct platform_driver ov8865_platform_driver = { - .driver = { - .name = "ovti,ov8865", - .owner = THIS_MODULE, - .of_match_table = ov8865_dt_match, - }, -}; - -static int32_t ov8865_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8865_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8865_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8865_platform_driver, - ov8865_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8865_i2c_driver); -} - -static void __exit ov8865_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8865_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8865_s_ctrl); - platform_driver_unregister(&ov8865_platform_driver); - } else - i2c_del_driver(&ov8865_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8865_s_ctrl = { - .sensor_i2c_client = &ov8865_sensor_i2c_client, - .power_setting_array.power_setting = ov8865_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8865_power_setting), - .msm_sensor_mutex = &ov8865_mut, - .sensor_v4l2_subdev_info = ov8865_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8865_subdev_info), -}; - -module_init(ov8865_init_module); -module_exit(ov8865_exit_module); -MODULE_DESCRIPTION("ov8865"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/ov9724.c b/drivers/media/platform/msm/camera_v2/sensor/ov9724.c deleted file mode 100644 index 99bf03ab1aa0..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/ov9724.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV9724_SENSOR_NAME "ov9724" -DEFINE_MSM_MUTEX(ov9724_mut); - -static struct msm_sensor_ctrl_t ov9724_s_ctrl; - -static struct msm_sensor_power_setting ov9724_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov9724_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_ov9724_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov9724_s_ctrl); -} - -static const struct i2c_device_id ov9724_i2c_id[] = { - {OV9724_SENSOR_NAME, (kernel_ulong_t)&ov9724_s_ctrl}, - { } -}; - -static struct i2c_driver ov9724_i2c_driver = { - .id_table = ov9724_i2c_id, - .probe = msm_ov9724_i2c_probe, - .driver = { - .name = OV9724_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov9724_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov9724_s_ctrl = { - .sensor_i2c_client = &ov9724_sensor_i2c_client, - .power_setting_array.power_setting = ov9724_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov9724_power_setting), - .msm_sensor_mutex = &ov9724_mut, - .sensor_v4l2_subdev_info = ov9724_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov9724_subdev_info), -}; - -static const struct of_device_id ov9724_dt_match[] = { - {.compatible = "qcom,ov9724", .data = &ov9724_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov9724_dt_match); - -static struct platform_driver ov9724_platform_driver = { - .driver = { - .name = "qcom,ov9724", - .owner = THIS_MODULE, - .of_match_table = ov9724_dt_match, - }, -}; - -static int32_t ov9724_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov9724_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov9724_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov9724_platform_driver, - ov9724_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov9724_i2c_driver); -} - -static void __exit ov9724_exit_module(void) -{ - if (ov9724_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov9724_s_ctrl); - platform_driver_unregister(&ov9724_platform_driver); - } else - i2c_del_driver(&ov9724_i2c_driver); - return; -} - -module_init(ov9724_init_module); -module_exit(ov9724_exit_module); -MODULE_DESCRIPTION("ov9724"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k3l1yx.c b/drivers/media/platform/msm/camera_v2/sensor/s5k3l1yx.c deleted file mode 100644 index 225e81d94cdb..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k3l1yx.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define S5K3L1YX_SENSOR_NAME "s5k3l1yx" -DEFINE_MSM_MUTEX(s5k3l1yx_mut); - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl; - -static struct msm_sensor_power_setting s5k3l1yx_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info s5k3l1yx_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k3l1yx_i2c_id[] = { - {S5K3L1YX_SENSOR_NAME, (kernel_ulong_t)&s5k3l1yx_s_ctrl}, - { } -}; - -static int32_t msm_s5k3l1yx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k3l1yx_s_ctrl); -} - -static struct i2c_driver s5k3l1yx_i2c_driver = { - .id_table = s5k3l1yx_i2c_id, - .probe = msm_s5k3l1yx_i2c_probe, - .driver = { - .name = S5K3L1YX_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k3l1yx_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k3l1yx_dt_match[] = { - {.compatible = "qcom,s5k3l1yx", .data = &s5k3l1yx_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k3l1yx_dt_match); - -static struct platform_driver s5k3l1yx_platform_driver = { - .driver = { - .name = "qcom,s5k3l1yx", - .owner = THIS_MODULE, - .of_match_table = s5k3l1yx_dt_match, - }, -}; - -static int32_t s5k3l1yx_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k3l1yx_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k3l1yx_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k3l1yx_platform_driver, - s5k3l1yx_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k3l1yx_i2c_driver); -} - -static void __exit s5k3l1yx_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k3l1yx_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k3l1yx_s_ctrl); - platform_driver_unregister(&s5k3l1yx_platform_driver); - } else - i2c_del_driver(&s5k3l1yx_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl = { - .sensor_i2c_client = &s5k3l1yx_sensor_i2c_client, - .power_setting_array.power_setting = s5k3l1yx_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k3l1yx_power_setting), - .msm_sensor_mutex = &s5k3l1yx_mut, - .sensor_v4l2_subdev_info = s5k3l1yx_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k3l1yx_subdev_info), -}; - -module_init(s5k3l1yx_init_module); -module_exit(s5k3l1yx_exit_module); -MODULE_DESCRIPTION("s5k3l1yx"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4e1.c b/drivers/media/platform/msm/camera_v2/sensor/s5k4e1.c deleted file mode 100644 index 5c70df2dec56..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4e1.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define s5k4e1_SENSOR_NAME "s5k4e1" -DEFINE_MSM_MUTEX(s5k4e1_mut); - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl; - -static struct msm_sensor_power_setting s5k4e1_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info s5k4e1_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SGRBG10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k4e1_i2c_id[] = { - {s5k4e1_SENSOR_NAME, (kernel_ulong_t)&s5k4e1_s_ctrl}, - { } -}; - -static int32_t msm_s5k4e1_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k4e1_s_ctrl); -} - -static struct i2c_driver s5k4e1_i2c_driver = { - .id_table = s5k4e1_i2c_id, - .probe = msm_s5k4e1_i2c_probe, - .driver = { - .name = s5k4e1_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k4e1_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k4e1_dt_match[] = { - {.compatible = "shinetech,s5k4e1", .data = &s5k4e1_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k4e1_dt_match); - -static struct platform_driver s5k4e1_platform_driver = { - .driver = { - .name = "shinetech,s5k4e1", - .owner = THIS_MODULE, - .of_match_table = s5k4e1_dt_match, - }, -}; - -static int32_t s5k4e1_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k4e1_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k4e1_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k4e1_platform_driver, - s5k4e1_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k4e1_i2c_driver); -} - -static void __exit s5k4e1_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k4e1_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k4e1_s_ctrl); - platform_driver_unregister(&s5k4e1_platform_driver); - } else - i2c_del_driver(&s5k4e1_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl = { - .sensor_i2c_client = &s5k4e1_sensor_i2c_client, - .power_setting_array.power_setting = s5k4e1_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k4e1_power_setting), - .msm_sensor_mutex = &s5k4e1_mut, - .sensor_v4l2_subdev_info = s5k4e1_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k4e1_subdev_info), -}; - -module_init(s5k4e1_init_module); -module_exit(s5k4e1_exit_module); -MODULE_DESCRIPTION("s5k4e1"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx.h b/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx.h deleted file mode 100755 index 116fc428524b..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __S5K4ECGX_H__ -#define __S5K4ECGX_H__ - -#include "msm_sensor.h" - -#undef DEBUG_LEVEL_HIGH -#undef CDBG - -#define DEBUG_LEVEL_HIGH -#ifdef DEBUG_LEVEL_HIGH -#define CDBG(fmt, args...) printk("[S5K4ECGX] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -// 32(0x20) is a calibrated value from sensor vendor for auto flash to turn on when lux <= 40 -#define LOW_LIGHT_LEVEL 0x20 -#define BURST_MODE_BUFFER_MAX_SIZE 128 -#define BURST_REG 0x0F12 - -struct s5k4ecgx_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int resolution; - unsigned int ae_awb_lock; - unsigned int focus_mode; - unsigned int flash_mode; - unsigned int lowLight; - unsigned int is_touchaf; - unsigned int is_preflash; -}; - -struct s5k4ecgx_ctrl { - struct s5k4ecgx_userset settings; - unsigned int op_mode; - unsigned int prev_mode; - unsigned int streamon; - unsigned int exif_iso; - unsigned int exif_shutterspeed ; - unsigned int fixed_fps_val; -}; - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -extern int set_led_flash(int mode); - -#endif //__S5K4ECGX_H__ diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs.h b/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs.h deleted file mode 100755 index 5ab1dcdcdeb3..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs.h +++ /dev/null @@ -1,6083 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0092,},//adlc_enable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA}, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable}, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0006,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x000C,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0402,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0600,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x05E0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0390,}, -{0x0F12, 0x03B0,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039E,}, -{0x0F12, 0x0338,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x02FE,}, -{0x0F12, 0x0352,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x031E,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x02E8,}, -{0x0F12, 0x023A,}, -{0x0F12, 0x02A4,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x0272,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0256,}, -{0x0F12, 0x01F6,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x01E6,}, -{0x0F12, 0x0236,}, -{0x0F12, 0x01CA,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x01AA,}, -{0x0F12, 0x020C,}, -{0x0F12, 0x019E,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x0126,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0264,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x025A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0006,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x3A98,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: 60Hz 5F:50Hz */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, - {0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0200,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0414,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x3718,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2A36,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x2A36,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000}, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232D,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x212B,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1E26,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame}, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //Hsize : 640 1280 1024 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight//Vsize : 480 960 768 -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0920,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0348,},//_ccm_oscar_iSaturation [7:0] AFIT - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0AC0,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x5018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x0414,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x3718,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x2A36,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x2A36,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x232D,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x1D22,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x212B,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x0C0C,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x1E26,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x0A0A,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x0C0F,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x0808,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ -/* FOR HD CAMCORDER */ - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - - -#endif - diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_gte.h b/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_gte.h deleted file mode 100755 index 741c485f22ea..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_gte.h +++ /dev/null @@ -1,6236 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0082,},//Fadlc_disable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0010,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x0020,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0802,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x0024,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x002C,}, -{0x0F12, 0x002E,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0088,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00B8,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00C8,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0580,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x07B0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0370,}, -{0x0F12, 0x03AC,}, -{0x0F12, 0x0314,}, -{0x0F12, 0x03AE,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x0396,}, -{0x0F12, 0x0298,}, -{0x0F12, 0x0368,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x0336,}, -{0x0F12, 0x0254,}, -{0x0F12, 0x0306,}, -{0x0F12, 0x023C,}, -{0x0F12, 0x02DC,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x02BA,}, -{0x0F12, 0x0210,}, -{0x0F12, 0x02A0,}, -{0x0F12, 0x01FC,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x01EE,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x01E0,}, -{0x0F12, 0x025E,}, -{0x0F12, 0x01D8,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x01CC,}, -{0x0F12, 0x0238,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x01F0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x011A,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0218,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0007,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: Auto 5F:Manual */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, -{0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0252,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0420,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0990,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, //default -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x005C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0012,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001A,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0022,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0032,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003F,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0059,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0066,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0350,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset init */ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},//afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0A78,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -//{0x002A, 0x18AC,}, -//{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -//{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -//{0x0F12, 0x07dc,},/*senHal_uMinColsBin */ -//{0x0F12, 0x05c0,},/*senHal_uMinColsNoBin */ - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0250,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x0A1A,}, -{0x0F12, 0x2318,}, - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x040F,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0004,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x2318,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x3141,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x3140,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x2832,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x272C,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x2630,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x1616,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x232B,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x1414,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x1114,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x1212,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -#if 0 -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -#endif -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xF132,}, -{0x0F12, 0x0006,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0000,}, // 110404 AE haunting -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_15[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02B4,}, -{0x0F12, 0x0012,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //029Ah:15fps -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - -/* -* S5E4ECGX sensor has a known issue of non-performance in 60 Hz. -* Make the setting same as 50Hz -*/ -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_60hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_50hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_640_480[]= -{ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //senHal_uMinColsBin -{0x0F12, 0x06C8,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, //REG_0TC_PCFG_usWidth //640 -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usHeight //480 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_720[]={ -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, - -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x07DC,}, /*senHal_uMinColsBin */ -{0x0F12, 0x05C0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, /*REG_TC_GP_PrevReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_GP_PrevReqInputHeight //1536 */ -{0x0F12, 0x0010,}, /*REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2*/ -{0x0F12, 0x00FC,}, /*REG_TC_GP_PrevInputHeightOfs/(1944-1536)/2*/ -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, /*REG_TC_PZOOM_PrevZoomReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_PZOOM_PrevZoomReqInputHeight //1536 */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x02D0,}, /*REG_0TC_PCFG_usHeight //720 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_960[]={ -{0xFCFC, 0xD000,}, - -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, - -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x03C0,}, /*REG_0TC_PCFG_usHeight //960 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_stop_stream[]={ -{0x0028, 0x7000,}, -{0x002A, 0x023E,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /*REG_TC_GP_EnablePreviewChanged */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_j1x.h b/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_j1x.h deleted file mode 100755 index f50eb7088985..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_regs_j1x.h +++ /dev/null @@ -1,6250 +0,0 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { -{0xFCFC, 0xD000,}, -{0x0010, 0x0001,}, //S/W Reset -{0x1030, 0x0000,}, //contint_host_int -{0x0014, 0x0001,}, //sw_load_complete - Release CORE (Arm) from reset state - -{0xFFFF, 0x000A,}, //p10 //Delay 10ms - -{0xFCFC, 0xD000,}, -//================================================================================== -//02.ETC Setting -//================================================================================== - -{0x0028, 0xD000,}, //Driving Current -{0x002A, 0x1082,}, -{0x0F12, 0x0000,}, //cregs_d0_d4_cd10 //D4[9:8], D3[7:6], D2[5:4], D1[3:2], D0[1:0] -{0x002A, 0x1084,}, -{0x0F12, 0x0000,}, //cregs_d5_d9_cd10 //D9[9:8], D8[7:6], D7[5:4], D6[3:2], D5[1:0] -{0x002A, 0x1086,}, -{0x0F12, 0x0000,}, //gpio_cd10 -{0x002A, 0x1088,}, -{0x0F12, 0x0000,}, //cregs_clks_output_cd10 //SDA[11:10], SCL[9:8], PCLK[7:6], VSYNC[3:2], HSYNC[1:0] -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, //pclk_delay_r - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, //config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0082,}, //fadlc_disable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,}, //adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,}, //adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,}, //adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,}, //adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune [2]srx_en, [1]dshut_en, [0]dcds_en -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,}, //aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,}, //aig_1h_time_2 - -//================================================================================= -// 04.Trap and Patch -//================================================================================= -// Start of Patch data - -{0x0028, 0x7000,}, -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, // 70003AF8 -{0x0F12, 0x4B44,}, // 70003AFA -{0x0F12, 0x4944,}, // 70003AFC -{0x0F12, 0x4845,}, // 70003AFE -{0x0F12, 0x2200,}, // 70003B00 -{0x0F12, 0xC008,}, // 70003B02 -{0x0F12, 0x6001,}, // 70003B04 -{0x0F12, 0x4944,}, // 70003B06 -{0x0F12, 0x4844,}, // 70003B08 -{0x0F12, 0x2401,}, // 70003B0A -{0x0F12, 0xF000,}, // 70003B0C -{0x0F12, 0xFCA4,}, // 70003B0E -{0x0F12, 0x4943,}, // 70003B10 -{0x0F12, 0x4844,}, // 70003B12 -{0x0F12, 0x2702,}, // 70003B14 -{0x0F12, 0x0022,}, // 70003B16 -{0x0F12, 0xF000,}, // 70003B18 -{0x0F12, 0xFC9E,}, // 70003B1A -{0x0F12, 0x0260,}, // 70003B1C -{0x0F12, 0x4C42,}, // 70003B1E -{0x0F12, 0x8020,}, // 70003B20 -{0x0F12, 0x2600,}, // 70003B22 -{0x0F12, 0x8066,}, // 70003B24 -{0x0F12, 0x4941,}, // 70003B26 -{0x0F12, 0x4841,}, // 70003B28 -{0x0F12, 0x6041,}, // 70003B2A -{0x0F12, 0x4941,}, // 70003B2C -{0x0F12, 0x4842,}, // 70003B2E -{0x0F12, 0x003A,}, // 70003B30 -{0x0F12, 0x2503,}, // 70003B32 -{0x0F12, 0xF000,}, // 70003B34 -{0x0F12, 0xFC90,}, // 70003B36 -{0x0F12, 0x483D,}, // 70003B38 -{0x0F12, 0x4940,}, // 70003B3A -{0x0F12, 0x30C0,}, // 70003B3C -{0x0F12, 0x63C1,}, // 70003B3E -{0x0F12, 0x4F3B,}, // 70003B40 -{0x0F12, 0x483F,}, // 70003B42 -{0x0F12, 0x3F80,}, // 70003B44 -{0x0F12, 0x6438,}, // 70003B46 -{0x0F12, 0x483E,}, // 70003B48 -{0x0F12, 0x493F,}, // 70003B4A -{0x0F12, 0x6388,}, // 70003B4C -{0x0F12, 0x002A,}, // 70003B4E -{0x0F12, 0x493E,}, // 70003B50 -{0x0F12, 0x483F,}, // 70003B52 -{0x0F12, 0x2504,}, // 70003B54 -{0x0F12, 0xF000,}, // 70003B56 -{0x0F12, 0xFC7F,}, // 70003B58 -{0x0F12, 0x002A,}, // 70003B5A -{0x0F12, 0x493D,}, // 70003B5C -{0x0F12, 0x483E,}, // 70003B5E -{0x0F12, 0x2505,}, // 70003B60 -{0x0F12, 0xF000,}, // 70003B62 -{0x0F12, 0xF8A7,}, // 70003B64 -{0x0F12, 0x483C,}, // 70003B66 -{0x0F12, 0x002A,}, // 70003B68 -{0x0F12, 0x493C,}, // 70003B6A -{0x0F12, 0x2506,}, // 70003B6C -{0x0F12, 0x1D80,}, // 70003B6E -{0x0F12, 0xF000,}, // 70003B70 -{0x0F12, 0xF8A0,}, // 70003B72 -{0x0F12, 0x4838,}, // 70003B74 -{0x0F12, 0x002A,}, // 70003B76 -{0x0F12, 0x4939,}, // 70003B78 -{0x0F12, 0x2507,}, // 70003B7A -{0x0F12, 0x300C,}, // 70003B7C -{0x0F12, 0xF000,}, // 70003B7E -{0x0F12, 0xF899,}, // 70003B80 -{0x0F12, 0x4835,}, // 70003B82 -{0x0F12, 0x002A,}, // 70003B84 -{0x0F12, 0x4937,}, // 70003B86 -{0x0F12, 0x2508,}, // 70003B88 -{0x0F12, 0x3010,}, // 70003B8A -{0x0F12, 0xF000,}, // 70003B8C -{0x0F12, 0xF892,}, // 70003B8E -{0x0F12, 0x002A,}, // 70003B90 -{0x0F12, 0x4935,}, // 70003B92 -{0x0F12, 0x4835,}, // 70003B94 -{0x0F12, 0x2509,}, // 70003B96 -{0x0F12, 0xF000,}, // 70003B98 -{0x0F12, 0xFC5E,}, // 70003B9A -{0x0F12, 0x002A,}, // 70003B9C -{0x0F12, 0x4934,}, // 70003B9E -{0x0F12, 0x4834,}, // 70003BA0 -{0x0F12, 0x250A,}, // 70003BA2 -{0x0F12, 0xF000,}, // 70003BA4 -{0x0F12, 0xFC58,}, // 70003BA6 -{0x0F12, 0x002A,}, // 70003BA8 -{0x0F12, 0x4933,}, // 70003BAA -{0x0F12, 0x4833,}, // 70003BAC -{0x0F12, 0x250B,}, // 70003BAE -{0x0F12, 0xF000,}, // 70003BB0 -{0x0F12, 0xFC52,}, // 70003BB2 -{0x0F12, 0x002A,}, // 70003BB4 -{0x0F12, 0x4932,}, // 70003BB6 -{0x0F12, 0x4832,}, // 70003BB8 -{0x0F12, 0x250C,}, // 70003BBA -{0x0F12, 0xF000,}, // 70003BBC -{0x0F12, 0xFC4C,}, // 70003BBE -{0x0F12, 0x002A,}, // 70003BC0 -{0x0F12, 0x4931,}, // 70003BC2 -{0x0F12, 0x4831,}, // 70003BC4 -{0x0F12, 0x250D,}, // 70003BC6 -{0x0F12, 0xF000,}, // 70003BC8 -{0x0F12, 0xFC46,}, // 70003BCA -{0x0F12, 0x002A,}, // 70003BCC -{0x0F12, 0x4930,}, // 70003BCE -{0x0F12, 0x4830,}, // 70003BD0 -{0x0F12, 0x250E,}, // 70003BD2 -{0x0F12, 0xF000,}, // 70003BD4 -{0x0F12, 0xFC40,}, // 70003BD6 -{0x0F12, 0x002A,}, // 70003BD8 -{0x0F12, 0x492F,}, // 70003BDA -{0x0F12, 0x482F,}, // 70003BDC -{0x0F12, 0x250F,}, // 70003BDE -{0x0F12, 0xF000,}, // 70003BE0 -{0x0F12, 0xFC3A,}, // 70003BE2 -{0x0F12, 0x8626,}, // 70003BE4 -{0x0F12, 0x20FF,}, // 70003BE6 -{0x0F12, 0x1C40,}, // 70003BE8 -{0x0F12, 0x8660,}, // 70003BEA -{0x0F12, 0x482C,}, // 70003BEC -{0x0F12, 0x64F8,}, // 70003BEE -{0x0F12, 0x492C,}, // 70003BF0 -{0x0F12, 0x482D,}, // 70003BF2 -{0x0F12, 0x2410,}, // 70003BF4 -{0x0F12, 0x002A,}, // 70003BF6 -{0x0F12, 0xF000,}, // 70003BF8 -{0x0F12, 0xFC2E,}, // 70003BFA -{0x0F12, 0x492B,}, // 70003BFC -{0x0F12, 0x482C,}, // 70003BFE -{0x0F12, 0x0022,}, // 70003C00 -{0x0F12, 0xF000,}, // 70003C02 -{0x0F12, 0xFC29,}, // 70003C04 -{0x0F12, 0xBCF8,}, // 70003C06 -{0x0F12, 0xBC08,}, // 70003C08 -{0x0F12, 0x4718,}, // 70003C0A -{0x0F12, 0x019C,}, // 70003C0C -{0x0F12, 0x4EC2,}, // 70003C0E -{0x0F12, 0x73FF,}, // 70003C10 -{0x0F12, 0x0000,}, // 70003C12 -{0x0F12, 0x1F90,}, // 70003C14 -{0x0F12, 0x7000,}, // 70003C16 -{0x0F12, 0x3CCD,}, // 70003C18 -{0x0F12, 0x7000,}, // 70003C1A -{0x0F12, 0xE38B,}, // 70003C1C -{0x0F12, 0x0000,}, // 70003C1E -{0x0F12, 0x3D05,}, // 70003C20 -{0x0F12, 0x7000,}, // 70003C22 -{0x0F12, 0xC3B1,}, // 70003C24 -{0x0F12, 0x0000,}, // 70003C26 -{0x0F12, 0x4780,}, // 70003C28 -{0x0F12, 0x7000,}, // 70003C2A -{0x0F12, 0x3D63,}, // 70003C2C -{0x0F12, 0x7000,}, // 70003C2E -{0x0F12, 0x0080,}, // 70003C30 -{0x0F12, 0x7000,}, // 70003C32 -{0x0F12, 0x3D9F,}, // 70003C34 -{0x0F12, 0x7000,}, // 70003C36 -{0x0F12, 0xB49D,}, // 70003C38 -{0x0F12, 0x0000,}, // 70003C3A -{0x0F12, 0x3E4B,}, // 70003C3C -{0x0F12, 0x7000,}, // 70003C3E -{0x0F12, 0x3DFF,}, // 70003C40 -{0x0F12, 0x7000,}, // 70003C42 -{0x0F12, 0xFFFF,}, // 70003C44 -{0x0F12, 0x00FF,}, // 70003C46 -{0x0F12, 0x17E0,}, // 70003C48 -{0x0F12, 0x7000,}, // 70003C4A -{0x0F12, 0x3FC7,}, // 70003C4C -{0x0F12, 0x7000,}, // 70003C4E -{0x0F12, 0x053D,}, // 70003C50 -{0x0F12, 0x0000,}, // 70003C52 -{0x0F12, 0x0000,}, // 70003C54 -{0x0F12, 0x0A89,}, // 70003C56 -{0x0F12, 0x6CD2,}, // 70003C58 -{0x0F12, 0x0000,}, // 70003C5A -{0x0F12, 0x02C9,}, // 70003C5C -{0x0F12, 0x0000,}, // 70003C5E -{0x0F12, 0x0000,}, // 70003C60 -{0x0F12, 0x0A9A,}, // 70003C62 -{0x0F12, 0x0000,}, // 70003C64 -{0x0F12, 0x02D2,}, // 70003C66 -{0x0F12, 0x4015,}, // 70003C68 -{0x0F12, 0x7000,}, // 70003C6A -{0x0F12, 0x9E65,}, // 70003C6C -{0x0F12, 0x0000,}, // 70003C6E -{0x0F12, 0x4089,}, // 70003C70 -{0x0F12, 0x7000,}, // 70003C72 -{0x0F12, 0x7C49,}, // 70003C74 -{0x0F12, 0x0000,}, // 70003C76 -{0x0F12, 0x40FD,}, // 70003C78 -{0x0F12, 0x7000,}, // 70003C7A -{0x0F12, 0x7C63,}, // 70003C7C -{0x0F12, 0x0000,}, // 70003C7E -{0x0F12, 0x4119,}, // 70003C80 -{0x0F12, 0x7000,}, // 70003C82 -{0x0F12, 0x8F01,}, // 70003C84 -{0x0F12, 0x0000,}, // 70003C86 -{0x0F12, 0x41BB,}, // 70003C88 -{0x0F12, 0x7000,}, // 70003C8A -{0x0F12, 0x7F3F,}, // 70003C8C -{0x0F12, 0x0000,}, // 70003C8E -{0x0F12, 0x4249,}, // 70003C90 -{0x0F12, 0x7000,}, // 70003C92 -{0x0F12, 0x98C5,}, // 70003C94 -{0x0F12, 0x0000,}, // 70003C96 -{0x0F12, 0x43B5,}, // 70003C98 -{0x0F12, 0x7000,}, // 70003C9A -{0x0F12, 0x6099,}, // 70003C9C -{0x0F12, 0x0000,}, // 70003C9E -{0x0F12, 0x430F,}, // 70003CA0 -{0x0F12, 0x7000,}, // 70003CA2 -{0x0F12, 0x4365,}, // 70003CA4 -{0x0F12, 0x7000,}, // 70003CA6 -{0x0F12, 0xA70B,}, // 70003CA8 -{0x0F12, 0x0000,}, // 70003CAA -{0x0F12, 0x4387,}, // 70003CAC -{0x0F12, 0x7000,}, // 70003CAE -{0x0F12, 0x400D,}, // 70003CB0 -{0x0F12, 0x0000,}, // 70003CB2 -{0x0F12, 0xB570,}, // 70003CB4 -{0x0F12, 0x000C,}, // 70003CB6 -{0x0F12, 0x0015,}, // 70003CB8 -{0x0F12, 0x0029,}, // 70003CBA -{0x0F12, 0xF000,}, // 70003CBC -{0x0F12, 0xFBD4,}, // 70003CBE -{0x0F12, 0x49F8,}, // 70003CC0 -{0x0F12, 0x00A8,}, // 70003CC2 -{0x0F12, 0x500C,}, // 70003CC4 -{0x0F12, 0xBC70,}, // 70003CC6 -{0x0F12, 0xBC08,}, // 70003CC8 -{0x0F12, 0x4718,}, // 70003CCA -{0x0F12, 0x6808,}, // 70003CCC -{0x0F12, 0x0400,}, // 70003CCE -{0x0F12, 0x0C00,}, // 70003CD0 -{0x0F12, 0x6849,}, // 70003CD2 -{0x0F12, 0x0409,}, // 70003CD4 -{0x0F12, 0x0C09,}, // 70003CD6 -{0x0F12, 0x4AF3,}, // 70003CD8 -{0x0F12, 0x8992,}, // 70003CDA -{0x0F12, 0x2A00,}, // 70003CDC -{0x0F12, 0xD00D,}, // 70003CDE -{0x0F12, 0x2300,}, // 70003CE0 -{0x0F12, 0x1A89,}, // 70003CE2 -{0x0F12, 0xD400,}, // 70003CE4 -{0x0F12, 0x000B,}, // 70003CE6 -{0x0F12, 0x0419,}, // 70003CE8 -{0x0F12, 0x0C09,}, // 70003CEA -{0x0F12, 0x23FF,}, // 70003CEC -{0x0F12, 0x33C1,}, // 70003CEE -{0x0F12, 0x1810,}, // 70003CF0 -{0x0F12, 0x4298,}, // 70003CF2 -{0x0F12, 0xD800,}, // 70003CF4 -{0x0F12, 0x0003,}, // 70003CF6 -{0x0F12, 0x0418,}, // 70003CF8 -{0x0F12, 0x0C00,}, // 70003CFA -{0x0F12, 0x4AEB,}, // 70003CFC -{0x0F12, 0x8150,}, // 70003CFE -{0x0F12, 0x8191,}, // 70003D00 -{0x0F12, 0x4770,}, // 70003D02 -{0x0F12, 0xB5F3,}, // 70003D04 -{0x0F12, 0x0004,}, // 70003D06 -{0x0F12, 0xB081,}, // 70003D08 -{0x0F12, 0x9802,}, // 70003D0A -{0x0F12, 0x6800,}, // 70003D0C -{0x0F12, 0x0600,}, // 70003D0E -{0x0F12, 0x0E00,}, // 70003D10 -{0x0F12, 0x2201,}, // 70003D12 -{0x0F12, 0x0015,}, // 70003D14 -{0x0F12, 0x0021,}, // 70003D16 -{0x0F12, 0x3910,}, // 70003D18 -{0x0F12, 0x408A,}, // 70003D1A -{0x0F12, 0x40A5,}, // 70003D1C -{0x0F12, 0x4FE4,}, // 70003D1E -{0x0F12, 0x0016,}, // 70003D20 -{0x0F12, 0x2C10,}, // 70003D22 -{0x0F12, 0xDA03,}, // 70003D24 -{0x0F12, 0x8839,}, // 70003D26 -{0x0F12, 0x43A9,}, // 70003D28 -{0x0F12, 0x8039,}, // 70003D2A -{0x0F12, 0xE002,}, // 70003D2C -{0x0F12, 0x8879,}, // 70003D2E -{0x0F12, 0x43B1,}, // 70003D30 -{0x0F12, 0x8079,}, // 70003D32 -{0x0F12, 0xF000,}, // 70003D34 -{0x0F12, 0xFBA0,}, // 70003D36 -{0x0F12, 0x2C10,}, // 70003D38 -{0x0F12, 0xDA03,}, // 70003D3A -{0x0F12, 0x8839,}, // 70003D3C -{0x0F12, 0x4329,}, // 70003D3E -{0x0F12, 0x8039,}, // 70003D40 -{0x0F12, 0xE002,}, // 70003D42 -{0x0F12, 0x8879,}, // 70003D44 -{0x0F12, 0x4331,}, // 70003D46 -{0x0F12, 0x8079,}, // 70003D48 -{0x0F12, 0x49DA,}, // 70003D4A -{0x0F12, 0x8809,}, // 70003D4C -{0x0F12, 0x2900,}, // 70003D4E -{0x0F12, 0xD102,}, // 70003D50 -{0x0F12, 0xF000,}, // 70003D52 -{0x0F12, 0xFB99,}, // 70003D54 -{0x0F12, 0x2000,}, // 70003D56 -{0x0F12, 0x9902,}, // 70003D58 -{0x0F12, 0x6008,}, // 70003D5A -{0x0F12, 0xBCFE,}, // 70003D5C -{0x0F12, 0xBC08,}, // 70003D5E -{0x0F12, 0x4718,}, // 70003D60 -{0x0F12, 0xB538,}, // 70003D62 -{0x0F12, 0x9C04,}, // 70003D64 -{0x0F12, 0x0015,}, // 70003D66 -{0x0F12, 0x002A,}, // 70003D68 -{0x0F12, 0x9400,}, // 70003D6A -{0x0F12, 0xF000,}, // 70003D6C -{0x0F12, 0xFB94,}, // 70003D6E -{0x0F12, 0x4AD1,}, // 70003D70 -{0x0F12, 0x8811,}, // 70003D72 -{0x0F12, 0x2900,}, // 70003D74 -{0x0F12, 0xD00F,}, // 70003D76 -{0x0F12, 0x8820,}, // 70003D78 -{0x0F12, 0x4281,}, // 70003D7A -{0x0F12, 0xD20C,}, // 70003D7C -{0x0F12, 0x8861,}, // 70003D7E -{0x0F12, 0x8853,}, // 70003D80 -{0x0F12, 0x4299,}, // 70003D82 -{0x0F12, 0xD200,}, // 70003D84 -{0x0F12, 0x1E40,}, // 70003D86 -{0x0F12, 0x0400,}, // 70003D88 -{0x0F12, 0x0C00,}, // 70003D8A -{0x0F12, 0x8020,}, // 70003D8C -{0x0F12, 0x8851,}, // 70003D8E -{0x0F12, 0x8061,}, // 70003D90 -{0x0F12, 0x4368,}, // 70003D92 -{0x0F12, 0x1840,}, // 70003D94 -{0x0F12, 0x6060,}, // 70003D96 -{0x0F12, 0xBC38,}, // 70003D98 -{0x0F12, 0xBC08,}, // 70003D9A -{0x0F12, 0x4718,}, // 70003D9C -{0x0F12, 0xB5F8,}, // 70003D9E -{0x0F12, 0x0004,}, // 70003DA0 -{0x0F12, 0x6808,}, // 70003DA2 -{0x0F12, 0x0400,}, // 70003DA4 -{0x0F12, 0x0C00,}, // 70003DA6 -{0x0F12, 0x2201,}, // 70003DA8 -{0x0F12, 0x0015,}, // 70003DAA -{0x0F12, 0x0021,}, // 70003DAC -{0x0F12, 0x3910,}, // 70003DAE -{0x0F12, 0x408A,}, // 70003DB0 -{0x0F12, 0x40A5,}, // 70003DB2 -{0x0F12, 0x4FBE,}, // 70003DB4 -{0x0F12, 0x0016,}, // 70003DB6 -{0x0F12, 0x2C10,}, // 70003DB8 -{0x0F12, 0xDA03,}, // 70003DBA -{0x0F12, 0x8839,}, // 70003DBC -{0x0F12, 0x43A9,}, // 70003DBE -{0x0F12, 0x8039,}, // 70003DC0 -{0x0F12, 0xE002,}, // 70003DC2 -{0x0F12, 0x8879,}, // 70003DC4 -{0x0F12, 0x43B1,}, // 70003DC6 -{0x0F12, 0x8079,}, // 70003DC8 -{0x0F12, 0xF000,}, // 70003DCA -{0x0F12, 0xFB6D,}, // 70003DCC -{0x0F12, 0x2C10,}, // 70003DCE -{0x0F12, 0xDA03,}, // 70003DD0 -{0x0F12, 0x8838,}, // 70003DD2 -{0x0F12, 0x4328,}, // 70003DD4 -{0x0F12, 0x8038,}, // 70003DD6 -{0x0F12, 0xE002,}, // 70003DD8 -{0x0F12, 0x8878,}, // 70003DDA -{0x0F12, 0x4330,}, // 70003DDC -{0x0F12, 0x8078,}, // 70003DDE -{0x0F12, 0x48B6,}, // 70003DE0 -{0x0F12, 0x8800,}, // 70003DE2 -{0x0F12, 0x0400,}, // 70003DE4 -{0x0F12, 0xD507,}, // 70003DE6 -{0x0F12, 0x4BB5,}, // 70003DE8 -{0x0F12, 0x7819,}, // 70003DEA -{0x0F12, 0x4AB5,}, // 70003DEC -{0x0F12, 0x7810,}, // 70003DEE -{0x0F12, 0x7018,}, // 70003DF0 -{0x0F12, 0x7011,}, // 70003DF2 -{0x0F12, 0x49B4,}, // 70003DF4 -{0x0F12, 0x8188,}, // 70003DF6 -{0x0F12, 0xBCF8,}, // 70003DF8 -{0x0F12, 0xBC08,}, // 70003DFA -{0x0F12, 0x4718,}, // 70003DFC -{0x0F12, 0xB538,}, // 70003DFE -{0x0F12, 0x48B2,}, // 70003E00 -{0x0F12, 0x4669,}, // 70003E02 -{0x0F12, 0xF000,}, // 70003E04 -{0x0F12, 0xFB58,}, // 70003E06 -{0x0F12, 0x48B1,}, // 70003E08 -{0x0F12, 0x49B0,}, // 70003E0A -{0x0F12, 0x69C2,}, // 70003E0C -{0x0F12, 0x2400,}, // 70003E0E -{0x0F12, 0x31A8,}, // 70003E10 -{0x0F12, 0x2A00,}, // 70003E12 -{0x0F12, 0xD008,}, // 70003E14 -{0x0F12, 0x61C4,}, // 70003E16 -{0x0F12, 0x684A,}, // 70003E18 -{0x0F12, 0x6242,}, // 70003E1A -{0x0F12, 0x6282,}, // 70003E1C -{0x0F12, 0x466B,}, // 70003E1E -{0x0F12, 0x881A,}, // 70003E20 -{0x0F12, 0x6302,}, // 70003E22 -{0x0F12, 0x885A,}, // 70003E24 -{0x0F12, 0x6342,}, // 70003E26 -{0x0F12, 0x6A02,}, // 70003E28 -{0x0F12, 0x2A00,}, // 70003E2A -{0x0F12, 0xD00A,}, // 70003E2C -{0x0F12, 0x6204,}, // 70003E2E -{0x0F12, 0x6849,}, // 70003E30 -{0x0F12, 0x6281,}, // 70003E32 -{0x0F12, 0x466B,}, // 70003E34 -{0x0F12, 0x8819,}, // 70003E36 -{0x0F12, 0x6301,}, // 70003E38 -{0x0F12, 0x8859,}, // 70003E3A -{0x0F12, 0x6341,}, // 70003E3C -{0x0F12, 0x49A5,}, // 70003E3E -{0x0F12, 0x88C9,}, // 70003E40 -{0x0F12, 0x63C1,}, // 70003E42 -{0x0F12, 0xF000,}, // 70003E44 -{0x0F12, 0xFB40,}, // 70003E46 -{0x0F12, 0xE7A6,}, // 70003E48 -{0x0F12, 0xB5F0,}, // 70003E4A -{0x0F12, 0xB08B,}, // 70003E4C -{0x0F12, 0x20FF,}, // 70003E4E -{0x0F12, 0x1C40,}, // 70003E50 -{0x0F12, 0x49A1,}, // 70003E52 -{0x0F12, 0x89CC,}, // 70003E54 -{0x0F12, 0x4E9E,}, // 70003E56 -{0x0F12, 0x6AB1,}, // 70003E58 -{0x0F12, 0x4284,}, // 70003E5A -{0x0F12, 0xD101,}, // 70003E5C -{0x0F12, 0x489F,}, // 70003E5E -{0x0F12, 0x6081,}, // 70003E60 -{0x0F12, 0x6A70,}, // 70003E62 -{0x0F12, 0x0200,}, // 70003E64 -{0x0F12, 0xF000,}, // 70003E66 -{0x0F12, 0xFB37,}, // 70003E68 -{0x0F12, 0x0400,}, // 70003E6A -{0x0F12, 0x0C00,}, // 70003E6C -{0x0F12, 0x4A96,}, // 70003E6E -{0x0F12, 0x8A11,}, // 70003E70 -{0x0F12, 0x9109,}, // 70003E72 -{0x0F12, 0x2101,}, // 70003E74 -{0x0F12, 0x0349,}, // 70003E76 -{0x0F12, 0x4288,}, // 70003E78 -{0x0F12, 0xD200,}, // 70003E7A -{0x0F12, 0x0001,}, // 70003E7C -{0x0F12, 0x4A92,}, // 70003E7E -{0x0F12, 0x8211,}, // 70003E80 -{0x0F12, 0x4D97,}, // 70003E82 -{0x0F12, 0x8829,}, // 70003E84 -{0x0F12, 0x9108,}, // 70003E86 -{0x0F12, 0x4A8B,}, // 70003E88 -{0x0F12, 0x2303,}, // 70003E8A -{0x0F12, 0x3222,}, // 70003E8C -{0x0F12, 0x1F91,}, // 70003E8E -{0x0F12, 0xF000,}, // 70003E90 -{0x0F12, 0xFB28,}, // 70003E92 -{0x0F12, 0x8028,}, // 70003E94 -{0x0F12, 0x488E,}, // 70003E96 -{0x0F12, 0x4987,}, // 70003E98 -{0x0F12, 0x6BC2,}, // 70003E9A -{0x0F12, 0x6AC0,}, // 70003E9C -{0x0F12, 0x4282,}, // 70003E9E -{0x0F12, 0xD201,}, // 70003EA0 -{0x0F12, 0x8CC8,}, // 70003EA2 -{0x0F12, 0x8028,}, // 70003EA4 -{0x0F12, 0x88E8,}, // 70003EA6 -{0x0F12, 0x9007,}, // 70003EA8 -{0x0F12, 0x2240,}, // 70003EAA -{0x0F12, 0x4310,}, // 70003EAC -{0x0F12, 0x80E8,}, // 70003EAE -{0x0F12, 0x2000,}, // 70003EB0 -{0x0F12, 0x0041,}, // 70003EB2 -{0x0F12, 0x194B,}, // 70003EB4 -{0x0F12, 0x001E,}, // 70003EB6 -{0x0F12, 0x3680,}, // 70003EB8 -{0x0F12, 0x8BB2,}, // 70003EBA -{0x0F12, 0xAF04,}, // 70003EBC -{0x0F12, 0x527A,}, // 70003EBE -{0x0F12, 0x4A7D,}, // 70003EC0 -{0x0F12, 0x188A,}, // 70003EC2 -{0x0F12, 0x8897,}, // 70003EC4 -{0x0F12, 0x83B7,}, // 70003EC6 -{0x0F12, 0x33A0,}, // 70003EC8 -{0x0F12, 0x891F,}, // 70003ECA -{0x0F12, 0xAE01,}, // 70003ECC -{0x0F12, 0x5277,}, // 70003ECE -{0x0F12, 0x8A11,}, // 70003ED0 -{0x0F12, 0x8119,}, // 70003ED2 -{0x0F12, 0x1C40,}, // 70003ED4 -{0x0F12, 0x0400,}, // 70003ED6 -{0x0F12, 0x0C00,}, // 70003ED8 -{0x0F12, 0x2806,}, // 70003EDA -{0x0F12, 0xD3E9,}, // 70003EDC -{0x0F12, 0xF000,}, // 70003EDE -{0x0F12, 0xFB09,}, // 70003EE0 -{0x0F12, 0xF000,}, // 70003EE2 -{0x0F12, 0xFB0F,}, // 70003EE4 -{0x0F12, 0x4F79,}, // 70003EE6 -{0x0F12, 0x37A8,}, // 70003EE8 -{0x0F12, 0x2800,}, // 70003EEA -{0x0F12, 0xD10A,}, // 70003EEC -{0x0F12, 0x1FE0,}, // 70003EEE -{0x0F12, 0x38FD,}, // 70003EF0 -{0x0F12, 0xD001,}, // 70003EF2 -{0x0F12, 0x1CC0,}, // 70003EF4 -{0x0F12, 0xD105,}, // 70003EF6 -{0x0F12, 0x4874,}, // 70003EF8 -{0x0F12, 0x8829,}, // 70003EFA -{0x0F12, 0x3818,}, // 70003EFC -{0x0F12, 0x6840,}, // 70003EFE -{0x0F12, 0x4348,}, // 70003F00 -{0x0F12, 0x6078,}, // 70003F02 -{0x0F12, 0x4972,}, // 70003F04 -{0x0F12, 0x6878,}, // 70003F06 -{0x0F12, 0x6B89,}, // 70003F08 -{0x0F12, 0x4288,}, // 70003F0A -{0x0F12, 0xD300,}, // 70003F0C -{0x0F12, 0x0008,}, // 70003F0E -{0x0F12, 0x6078,}, // 70003F10 -{0x0F12, 0x2000,}, // 70003F12 -{0x0F12, 0x0041,}, // 70003F14 -{0x0F12, 0xAA04,}, // 70003F16 -{0x0F12, 0x5A53,}, // 70003F18 -{0x0F12, 0x194A,}, // 70003F1A -{0x0F12, 0x269C,}, // 70003F1C -{0x0F12, 0x52B3,}, // 70003F1E -{0x0F12, 0xAB01,}, // 70003F20 -{0x0F12, 0x5A59,}, // 70003F22 -{0x0F12, 0x32A0,}, // 70003F24 -{0x0F12, 0x8111,}, // 70003F26 -{0x0F12, 0x1C40,}, // 70003F28 -{0x0F12, 0x0400,}, // 70003F2A -{0x0F12, 0x0C00,}, // 70003F2C -{0x0F12, 0x2806,}, // 70003F2E -{0x0F12, 0xD3F0,}, // 70003F30 -{0x0F12, 0x4965,}, // 70003F32 -{0x0F12, 0x9809,}, // 70003F34 -{0x0F12, 0x8208,}, // 70003F36 -{0x0F12, 0x9808,}, // 70003F38 -{0x0F12, 0x8028,}, // 70003F3A -{0x0F12, 0x9807,}, // 70003F3C -{0x0F12, 0x80E8,}, // 70003F3E -{0x0F12, 0x1FE0,}, // 70003F40 -{0x0F12, 0x38FD,}, // 70003F42 -{0x0F12, 0xD13B,}, // 70003F44 -{0x0F12, 0x4D64,}, // 70003F46 -{0x0F12, 0x89E8,}, // 70003F48 -{0x0F12, 0x1FC1,}, // 70003F4A -{0x0F12, 0x39FF,}, // 70003F4C -{0x0F12, 0xD136,}, // 70003F4E -{0x0F12, 0x4C5F,}, // 70003F50 -{0x0F12, 0x8AE0,}, // 70003F52 -{0x0F12, 0xF000,}, // 70003F54 -{0x0F12, 0xFADE,}, // 70003F56 -{0x0F12, 0x0006,}, // 70003F58 -{0x0F12, 0x8B20,}, // 70003F5A -{0x0F12, 0xF000,}, // 70003F5C -{0x0F12, 0xFAE2,}, // 70003F5E -{0x0F12, 0x9000,}, // 70003F60 -{0x0F12, 0x6AA1,}, // 70003F62 -{0x0F12, 0x6878,}, // 70003F64 -{0x0F12, 0x1809,}, // 70003F66 -{0x0F12, 0x0200,}, // 70003F68 -{0x0F12, 0xF000,}, // 70003F6A -{0x0F12, 0xFAB5,}, // 70003F6C -{0x0F12, 0x0400,}, // 70003F6E -{0x0F12, 0x0C00,}, // 70003F70 -{0x0F12, 0x0022,}, // 70003F72 -{0x0F12, 0x3246,}, // 70003F74 -{0x0F12, 0x0011,}, // 70003F76 -{0x0F12, 0x310A,}, // 70003F78 -{0x0F12, 0x2305,}, // 70003F7A -{0x0F12, 0xF000,}, // 70003F7C -{0x0F12, 0xFAB2,}, // 70003F7E -{0x0F12, 0x66E8,}, // 70003F80 -{0x0F12, 0x6B23,}, // 70003F82 -{0x0F12, 0x0002,}, // 70003F84 -{0x0F12, 0x0031,}, // 70003F86 -{0x0F12, 0x0018,}, // 70003F88 -{0x0F12, 0xF000,}, // 70003F8A -{0x0F12, 0xFAD3,}, // 70003F8C -{0x0F12, 0x466B,}, // 70003F8E -{0x0F12, 0x8518,}, // 70003F90 -{0x0F12, 0x6EEA,}, // 70003F92 -{0x0F12, 0x6B60,}, // 70003F94 -{0x0F12, 0x9900,}, // 70003F96 -{0x0F12, 0xF000,}, // 70003F98 -{0x0F12, 0xFACC,}, // 70003F9A -{0x0F12, 0x466B,}, // 70003F9C -{0x0F12, 0x8558,}, // 70003F9E -{0x0F12, 0x0029,}, // 70003FA0 -{0x0F12, 0x980A,}, // 70003FA2 -{0x0F12, 0x3170,}, // 70003FA4 -{0x0F12, 0xF000,}, // 70003FA6 -{0x0F12, 0xFACD,}, // 70003FA8 -{0x0F12, 0x0028,}, // 70003FAA -{0x0F12, 0x3060,}, // 70003FAC -{0x0F12, 0x8A02,}, // 70003FAE -{0x0F12, 0x4946,}, // 70003FB0 -{0x0F12, 0x3128,}, // 70003FB2 -{0x0F12, 0x808A,}, // 70003FB4 -{0x0F12, 0x8A42,}, // 70003FB6 -{0x0F12, 0x80CA,}, // 70003FB8 -{0x0F12, 0x8A80,}, // 70003FBA -{0x0F12, 0x8108,}, // 70003FBC -{0x0F12, 0xB00B,}, // 70003FBE -{0x0F12, 0xBCF0,}, // 70003FC0 -{0x0F12, 0xBC08,}, // 70003FC2 -{0x0F12, 0x4718,}, // 70003FC4 -{0x0F12, 0xB570,}, // 70003FC6 -{0x0F12, 0x2400,}, // 70003FC8 -{0x0F12, 0x4D46,}, // 70003FCA -{0x0F12, 0x4846,}, // 70003FCC -{0x0F12, 0x8881,}, // 70003FCE -{0x0F12, 0x4846,}, // 70003FD0 -{0x0F12, 0x8041,}, // 70003FD2 -{0x0F12, 0x2101,}, // 70003FD4 -{0x0F12, 0x8001,}, // 70003FD6 -{0x0F12, 0xF000,}, // 70003FD8 -{0x0F12, 0xFABC,}, // 70003FDA -{0x0F12, 0x4842,}, // 70003FDC -{0x0F12, 0x3820,}, // 70003FDE -{0x0F12, 0x8BC0,}, // 70003FE0 -{0x0F12, 0xF000,}, // 70003FE2 -{0x0F12, 0xFABF,}, // 70003FE4 -{0x0F12, 0x4B42,}, // 70003FE6 -{0x0F12, 0x220D,}, // 70003FE8 -{0x0F12, 0x0712,}, // 70003FEA -{0x0F12, 0x18A8,}, // 70003FEC -{0x0F12, 0x8806,}, // 70003FEE -{0x0F12, 0x00E1,}, // 70003FF0 -{0x0F12, 0x18C9,}, // 70003FF2 -{0x0F12, 0x81CE,}, // 70003FF4 -{0x0F12, 0x8846,}, // 70003FF6 -{0x0F12, 0x818E,}, // 70003FF8 -{0x0F12, 0x8886,}, // 70003FFA -{0x0F12, 0x824E,}, // 70003FFC -{0x0F12, 0x88C0,}, // 70003FFE -{0x0F12, 0x8208,}, // 70004000 -{0x0F12, 0x3508,}, // 70004002 -{0x0F12, 0x042D,}, // 70004004 -{0x0F12, 0x0C2D,}, // 70004006 -{0x0F12, 0x1C64,}, // 70004008 -{0x0F12, 0x0424,}, // 7000400A -{0x0F12, 0x0C24,}, // 7000400C -{0x0F12, 0x2C07,}, // 7000400E -{0x0F12, 0xD3EC,}, // 70004010 -{0x0F12, 0xE658,}, // 70004012 -{0x0F12, 0xB510,}, // 70004014 -{0x0F12, 0x4834,}, // 70004016 -{0x0F12, 0x4C34,}, // 70004018 -{0x0F12, 0x88C0,}, // 7000401A -{0x0F12, 0x8060,}, // 7000401C -{0x0F12, 0x2001,}, // 7000401E -{0x0F12, 0x8020,}, // 70004020 -{0x0F12, 0x4831,}, // 70004022 -{0x0F12, 0x3820,}, // 70004024 -{0x0F12, 0x8BC0,}, // 70004026 -{0x0F12, 0xF000,}, // 70004028 -{0x0F12, 0xFA9C,}, // 7000402A -{0x0F12, 0x88E0,}, // 7000402C -{0x0F12, 0x4A31,}, // 7000402E -{0x0F12, 0x2800,}, // 70004030 -{0x0F12, 0xD003,}, // 70004032 -{0x0F12, 0x4930,}, // 70004034 -{0x0F12, 0x8849,}, // 70004036 -{0x0F12, 0x2900,}, // 70004038 -{0x0F12, 0xD009,}, // 7000403A -{0x0F12, 0x2001,}, // 7000403C -{0x0F12, 0x03C0,}, // 7000403E -{0x0F12, 0x8050,}, // 70004040 -{0x0F12, 0x80D0,}, // 70004042 -{0x0F12, 0x2000,}, // 70004044 -{0x0F12, 0x8090,}, // 70004046 -{0x0F12, 0x8110,}, // 70004048 -{0x0F12, 0xBC10,}, // 7000404A -{0x0F12, 0xBC08,}, // 7000404C -{0x0F12, 0x4718,}, // 7000404E -{0x0F12, 0x8050,}, // 70004050 -{0x0F12, 0x8920,}, // 70004052 -{0x0F12, 0x80D0,}, // 70004054 -{0x0F12, 0x8960,}, // 70004056 -{0x0F12, 0x0400,}, // 70004058 -{0x0F12, 0x1400,}, // 7000405A -{0x0F12, 0x8090,}, // 7000405C -{0x0F12, 0x89A1,}, // 7000405E -{0x0F12, 0x0409,}, // 70004060 -{0x0F12, 0x1409,}, // 70004062 -{0x0F12, 0x8111,}, // 70004064 -{0x0F12, 0x89E3,}, // 70004066 -{0x0F12, 0x8A24,}, // 70004068 -{0x0F12, 0x2B00,}, // 7000406A -{0x0F12, 0xD104,}, // 7000406C -{0x0F12, 0x17C3,}, // 7000406E -{0x0F12, 0x0F5B,}, // 70004070 -{0x0F12, 0x1818,}, // 70004072 -{0x0F12, 0x10C0,}, // 70004074 -{0x0F12, 0x8090,}, // 70004076 -{0x0F12, 0x2C00,}, // 70004078 -{0x0F12, 0xD1E6,}, // 7000407A -{0x0F12, 0x17C8,}, // 7000407C -{0x0F12, 0x0F40,}, // 7000407E -{0x0F12, 0x1840,}, // 70004080 -{0x0F12, 0x10C0,}, // 70004082 -{0x0F12, 0x8110,}, // 70004084 -{0x0F12, 0xE7E0,}, // 70004086 -{0x0F12, 0xB510,}, // 70004088 -{0x0F12, 0x000C,}, // 7000408A -{0x0F12, 0x4919,}, // 7000408C -{0x0F12, 0x2204,}, // 7000408E -{0x0F12, 0x6820,}, // 70004090 -{0x0F12, 0x5E8A,}, // 70004092 -{0x0F12, 0x0140,}, // 70004094 -{0x0F12, 0x1A80,}, // 70004096 -{0x0F12, 0x0280,}, // 70004098 -{0x0F12, 0x8849,}, // 7000409A -{0x0F12, 0xF000,}, // 7000409C -{0x0F12, 0xFA6A,}, // 7000409E -{0x0F12, 0x6020,}, // 700040A0 -{0x0F12, 0xE7D2,}, // 700040A2 -{0x0F12, 0x38D4,}, // 700040A4 -{0x0F12, 0x7000,}, // 700040A6 -{0x0F12, 0x17D0,}, // 700040A8 -{0x0F12, 0x7000,}, // 700040AA -{0x0F12, 0x5000,}, // 700040AC -{0x0F12, 0xD000,}, // 700040AE -{0x0F12, 0x1100,}, // 700040B0 -{0x0F12, 0xD000,}, // 700040B2 -{0x0F12, 0x171A,}, // 700040B4 -{0x0F12, 0x7000,}, // 700040B6 -{0x0F12, 0x4780,}, // 700040B8 -{0x0F12, 0x7000,}, // 700040BA -{0x0F12, 0x2FCA,}, // 700040BC -{0x0F12, 0x7000,}, // 700040BE -{0x0F12, 0x2FC5,}, // 700040C0 -{0x0F12, 0x7000,}, // 700040C2 -{0x0F12, 0x2FC6,}, // 700040C4 -{0x0F12, 0x7000,}, // 700040C6 -{0x0F12, 0x2ED8,}, // 700040C8 -{0x0F12, 0x7000,}, // 700040CA -{0x0F12, 0x2BD0,}, // 700040CC -{0x0F12, 0x7000,}, // 700040CE -{0x0F12, 0x17E0,}, // 700040D0 -{0x0F12, 0x7000,}, // 700040D2 -{0x0F12, 0x2DE8,}, // 700040D4 -{0x0F12, 0x7000,}, // 700040D6 -{0x0F12, 0x37E0,}, // 700040D8 -{0x0F12, 0x7000,}, // 700040DA -{0x0F12, 0x210C,}, // 700040DC -{0x0F12, 0x7000,}, // 700040DE -{0x0F12, 0x1484,}, // 700040E0 -{0x0F12, 0x7000,}, // 700040E2 -{0x0F12, 0xA006,}, // 700040E4 -{0x0F12, 0x0000,}, // 700040E6 -{0x0F12, 0x0724,}, // 700040E8 -{0x0F12, 0x7000,}, // 700040EA -{0x0F12, 0xA000,}, // 700040EC -{0x0F12, 0xD000,}, // 700040EE -{0x0F12, 0x2270,}, // 700040F0 -{0x0F12, 0x7000,}, // 700040F2 -{0x0F12, 0x2558,}, // 700040F4 -{0x0F12, 0x7000,}, // 700040F6 -{0x0F12, 0x146C,}, // 700040F8 -{0x0F12, 0x7000,}, // 700040FA -{0x0F12, 0xB510,}, // 700040FC -{0x0F12, 0x000C,}, // 700040FE -{0x0F12, 0x49C7,}, // 70004100 -{0x0F12, 0x2208,}, // 70004102 -{0x0F12, 0x6820,}, // 70004104 -{0x0F12, 0x5E8A,}, // 70004106 -{0x0F12, 0x0140,}, // 70004108 -{0x0F12, 0x1A80,}, // 7000410A -{0x0F12, 0x0280,}, // 7000410C -{0x0F12, 0x88C9,}, // 7000410E -{0x0F12, 0xF000,}, // 70004110 -{0x0F12, 0xFA30,}, // 70004112 -{0x0F12, 0x6020,}, // 70004114 -{0x0F12, 0xE798,}, // 70004116 -{0x0F12, 0xB5FE,}, // 70004118 -{0x0F12, 0x000C,}, // 7000411A -{0x0F12, 0x6825,}, // 7000411C -{0x0F12, 0x6866,}, // 7000411E -{0x0F12, 0x68A0,}, // 70004120 -{0x0F12, 0x9001,}, // 70004122 -{0x0F12, 0x68E7,}, // 70004124 -{0x0F12, 0x1BA8,}, // 70004126 -{0x0F12, 0x42B5,}, // 70004128 -{0x0F12, 0xDA00,}, // 7000412A -{0x0F12, 0x1B70,}, // 7000412C -{0x0F12, 0x9000,}, // 7000412E -{0x0F12, 0x49BB,}, // 70004130 -{0x0F12, 0x48BC,}, // 70004132 -{0x0F12, 0x884A,}, // 70004134 -{0x0F12, 0x8843,}, // 70004136 -{0x0F12, 0x435A,}, // 70004138 -{0x0F12, 0x2304,}, // 7000413A -{0x0F12, 0x5ECB,}, // 7000413C -{0x0F12, 0x0A92,}, // 7000413E -{0x0F12, 0x18D2,}, // 70004140 -{0x0F12, 0x02D2,}, // 70004142 -{0x0F12, 0x0C12,}, // 70004144 -{0x0F12, 0x88CB,}, // 70004146 -{0x0F12, 0x8880,}, // 70004148 -{0x0F12, 0x4343,}, // 7000414A -{0x0F12, 0x0A98,}, // 7000414C -{0x0F12, 0x2308,}, // 7000414E -{0x0F12, 0x5ECB,}, // 70004150 -{0x0F12, 0x18C0,}, // 70004152 -{0x0F12, 0x02C0,}, // 70004154 -{0x0F12, 0x0C00,}, // 70004156 -{0x0F12, 0x0411,}, // 70004158 -{0x0F12, 0x0400,}, // 7000415A -{0x0F12, 0x1409,}, // 7000415C -{0x0F12, 0x1400,}, // 7000415E -{0x0F12, 0x1A08,}, // 70004160 -{0x0F12, 0x49B0,}, // 70004162 -{0x0F12, 0x39E0,}, // 70004164 -{0x0F12, 0x6148,}, // 70004166 -{0x0F12, 0x9801,}, // 70004168 -{0x0F12, 0x3040,}, // 7000416A -{0x0F12, 0x7880,}, // 7000416C -{0x0F12, 0x2800,}, // 7000416E -{0x0F12, 0xD103,}, // 70004170 -{0x0F12, 0x9801,}, // 70004172 -{0x0F12, 0x0029,}, // 70004174 -{0x0F12, 0xF000,}, // 70004176 -{0x0F12, 0xFA03,}, // 70004178 -{0x0F12, 0x8839,}, // 7000417A -{0x0F12, 0x9800,}, // 7000417C -{0x0F12, 0x4281,}, // 7000417E -{0x0F12, 0xD814,}, // 70004180 -{0x0F12, 0x8879,}, // 70004182 -{0x0F12, 0x9800,}, // 70004184 -{0x0F12, 0x4281,}, // 70004186 -{0x0F12, 0xD20C,}, // 70004188 -{0x0F12, 0x9801,}, // 7000418A -{0x0F12, 0x0029,}, // 7000418C -{0x0F12, 0xF000,}, // 7000418E -{0x0F12, 0xF9FF,}, // 70004190 -{0x0F12, 0x9801,}, // 70004192 -{0x0F12, 0x0029,}, // 70004194 -{0x0F12, 0xF000,}, // 70004196 -{0x0F12, 0xF9FB,}, // 70004198 -{0x0F12, 0x9801,}, // 7000419A -{0x0F12, 0x0029,}, // 7000419C -{0x0F12, 0xF000,}, // 7000419E -{0x0F12, 0xF9F7,}, // 700041A0 -{0x0F12, 0xE003,}, // 700041A2 -{0x0F12, 0x9801,}, // 700041A4 -{0x0F12, 0x0029,}, // 700041A6 -{0x0F12, 0xF000,}, // 700041A8 -{0x0F12, 0xF9F2,}, // 700041AA -{0x0F12, 0x9801,}, // 700041AC -{0x0F12, 0x0032,}, // 700041AE -{0x0F12, 0x0039,}, // 700041B0 -{0x0F12, 0xF000,}, // 700041B2 -{0x0F12, 0xF9F5,}, // 700041B4 -{0x0F12, 0x6020,}, // 700041B6 -{0x0F12, 0xE5D0,}, // 700041B8 -{0x0F12, 0xB57C,}, // 700041BA -{0x0F12, 0x489A,}, // 700041BC -{0x0F12, 0xA901,}, // 700041BE -{0x0F12, 0x0004,}, // 700041C0 -{0x0F12, 0xF000,}, // 700041C2 -{0x0F12, 0xF979,}, // 700041C4 -{0x0F12, 0x466B,}, // 700041C6 -{0x0F12, 0x88D9,}, // 700041C8 -{0x0F12, 0x8898,}, // 700041CA -{0x0F12, 0x4B95,}, // 700041CC -{0x0F12, 0x3346,}, // 700041CE -{0x0F12, 0x1E9A,}, // 700041D0 -{0x0F12, 0xF000,}, // 700041D2 -{0x0F12, 0xF9ED,}, // 700041D4 -{0x0F12, 0x4894,}, // 700041D6 -{0x0F12, 0x4992,}, // 700041D8 -{0x0F12, 0x3812,}, // 700041DA -{0x0F12, 0x3140,}, // 700041DC -{0x0F12, 0x8A42,}, // 700041DE -{0x0F12, 0x888B,}, // 700041E0 -{0x0F12, 0x18D2,}, // 700041E2 -{0x0F12, 0x8242,}, // 700041E4 -{0x0F12, 0x8AC2,}, // 700041E6 -{0x0F12, 0x88C9,}, // 700041E8 -{0x0F12, 0x1851,}, // 700041EA -{0x0F12, 0x82C1,}, // 700041EC -{0x0F12, 0x0020,}, // 700041EE -{0x0F12, 0x4669,}, // 700041F0 -{0x0F12, 0xF000,}, // 700041F2 -{0x0F12, 0xF961,}, // 700041F4 -{0x0F12, 0x488D,}, // 700041F6 -{0x0F12, 0x214D,}, // 700041F8 -{0x0F12, 0x8301,}, // 700041FA -{0x0F12, 0x2196,}, // 700041FC -{0x0F12, 0x8381,}, // 700041FE -{0x0F12, 0x211D,}, // 70004200 -{0x0F12, 0x3020,}, // 70004202 -{0x0F12, 0x8001,}, // 70004204 -{0x0F12, 0xF000,}, // 70004206 -{0x0F12, 0xF9DB,}, // 70004208 -{0x0F12, 0xF000,}, // 7000420A -{0x0F12, 0xF9E1,}, // 7000420C -{0x0F12, 0x4888,}, // 7000420E -{0x0F12, 0x4C88,}, // 70004210 -{0x0F12, 0x6E00,}, // 70004212 -{0x0F12, 0x60E0,}, // 70004214 -{0x0F12, 0x466B,}, // 70004216 -{0x0F12, 0x8818,}, // 70004218 -{0x0F12, 0x8859,}, // 7000421A -{0x0F12, 0x0025,}, // 7000421C -{0x0F12, 0x1A40,}, // 7000421E -{0x0F12, 0x3540,}, // 70004220 -{0x0F12, 0x61A8,}, // 70004222 -{0x0F12, 0x487F,}, // 70004224 -{0x0F12, 0x9900,}, // 70004226 -{0x0F12, 0x3060,}, // 70004228 -{0x0F12, 0xF000,}, // 7000422A -{0x0F12, 0xF9D9,}, // 7000422C -{0x0F12, 0x466B,}, // 7000422E -{0x0F12, 0x8819,}, // 70004230 -{0x0F12, 0x1DE0,}, // 70004232 -{0x0F12, 0x30F9,}, // 70004234 -{0x0F12, 0x8741,}, // 70004236 -{0x0F12, 0x8859,}, // 70004238 -{0x0F12, 0x8781,}, // 7000423A -{0x0F12, 0x2000,}, // 7000423C -{0x0F12, 0x71A0,}, // 7000423E -{0x0F12, 0x74A8,}, // 70004240 -{0x0F12, 0xBC7C,}, // 70004242 -{0x0F12, 0xBC08,}, // 70004244 -{0x0F12, 0x4718,}, // 70004246 -{0x0F12, 0xB5F8,}, // 70004248 -{0x0F12, 0x0005,}, // 7000424A -{0x0F12, 0x6808,}, // 7000424C -{0x0F12, 0x0400,}, // 7000424E -{0x0F12, 0x0C00,}, // 70004250 -{0x0F12, 0x684A,}, // 70004252 -{0x0F12, 0x0412,}, // 70004254 -{0x0F12, 0x0C12,}, // 70004256 -{0x0F12, 0x688E,}, // 70004258 -{0x0F12, 0x68CC,}, // 7000425A -{0x0F12, 0x4970,}, // 7000425C -{0x0F12, 0x884B,}, // 7000425E -{0x0F12, 0x4343,}, // 70004260 -{0x0F12, 0x0A98,}, // 70004262 -{0x0F12, 0x2304,}, // 70004264 -{0x0F12, 0x5ECB,}, // 70004266 -{0x0F12, 0x18C0,}, // 70004268 -{0x0F12, 0x02C0,}, // 7000426A -{0x0F12, 0x0C00,}, // 7000426C -{0x0F12, 0x88CB,}, // 7000426E -{0x0F12, 0x4353,}, // 70004270 -{0x0F12, 0x0A9A,}, // 70004272 -{0x0F12, 0x2308,}, // 70004274 -{0x0F12, 0x5ECB,}, // 70004276 -{0x0F12, 0x18D1,}, // 70004278 -{0x0F12, 0x02C9,}, // 7000427A -{0x0F12, 0x0C09,}, // 7000427C -{0x0F12, 0x2701,}, // 7000427E -{0x0F12, 0x003A,}, // 70004280 -{0x0F12, 0x40AA,}, // 70004282 -{0x0F12, 0x9200,}, // 70004284 -{0x0F12, 0x002A,}, // 70004286 -{0x0F12, 0x3A10,}, // 70004288 -{0x0F12, 0x4097,}, // 7000428A -{0x0F12, 0x2D10,}, // 7000428C -{0x0F12, 0xDA06,}, // 7000428E -{0x0F12, 0x4A69,}, // 70004290 -{0x0F12, 0x9B00,}, // 70004292 -{0x0F12, 0x8812,}, // 70004294 -{0x0F12, 0x439A,}, // 70004296 -{0x0F12, 0x4B67,}, // 70004298 -{0x0F12, 0x801A,}, // 7000429A -{0x0F12, 0xE003,}, // 7000429C -{0x0F12, 0x4B66,}, // 7000429E -{0x0F12, 0x885A,}, // 700042A0 -{0x0F12, 0x43BA,}, // 700042A2 -{0x0F12, 0x805A,}, // 700042A4 -{0x0F12, 0x0023,}, // 700042A6 -{0x0F12, 0x0032,}, // 700042A8 -{0x0F12, 0xF000,}, // 700042AA -{0x0F12, 0xF981,}, // 700042AC -{0x0F12, 0x2D10,}, // 700042AE -{0x0F12, 0xDA05,}, // 700042B0 -{0x0F12, 0x4961,}, // 700042B2 -{0x0F12, 0x9A00,}, // 700042B4 -{0x0F12, 0x8808,}, // 700042B6 -{0x0F12, 0x4310,}, // 700042B8 -{0x0F12, 0x8008,}, // 700042BA -{0x0F12, 0xE003,}, // 700042BC -{0x0F12, 0x485E,}, // 700042BE -{0x0F12, 0x8841,}, // 700042C0 -{0x0F12, 0x4339,}, // 700042C2 -{0x0F12, 0x8041,}, // 700042C4 -{0x0F12, 0x4D5B,}, // 700042C6 -{0x0F12, 0x2000,}, // 700042C8 -{0x0F12, 0x3580,}, // 700042CA -{0x0F12, 0x88AA,}, // 700042CC -{0x0F12, 0x5E30,}, // 700042CE -{0x0F12, 0x2100,}, // 700042D0 -{0x0F12, 0xF000,}, // 700042D2 -{0x0F12, 0xF98D,}, // 700042D4 -{0x0F12, 0x8030,}, // 700042D6 -{0x0F12, 0x2000,}, // 700042D8 -{0x0F12, 0x88AA,}, // 700042DA -{0x0F12, 0x5E20,}, // 700042DC -{0x0F12, 0x2100,}, // 700042DE -{0x0F12, 0xF000,}, // 700042E0 -{0x0F12, 0xF986,}, // 700042E2 -{0x0F12, 0x8020,}, // 700042E4 -{0x0F12, 0xE587,}, // 700042E6 -{0x0F12, 0xB510,}, // 700042E8 -{0x0F12, 0xF000,}, // 700042EA -{0x0F12, 0xF989,}, // 700042EC -{0x0F12, 0x4A53,}, // 700042EE -{0x0F12, 0x8D50,}, // 700042F0 -{0x0F12, 0x2800,}, // 700042F2 -{0x0F12, 0xD007,}, // 700042F4 -{0x0F12, 0x494E,}, // 700042F6 -{0x0F12, 0x31C0,}, // 700042F8 -{0x0F12, 0x684B,}, // 700042FA -{0x0F12, 0x4950,}, // 700042FC -{0x0F12, 0x4283,}, // 700042FE -{0x0F12, 0xD202,}, // 70004300 -{0x0F12, 0x8D90,}, // 70004302 -{0x0F12, 0x81C8,}, // 70004304 -{0x0F12, 0xE6A0,}, // 70004306 -{0x0F12, 0x8DD0,}, // 70004308 -{0x0F12, 0x81C8,}, // 7000430A -{0x0F12, 0xE69D,}, // 7000430C -{0x0F12, 0xB5F8,}, // 7000430E -{0x0F12, 0xF000,}, // 70004310 -{0x0F12, 0xF97E,}, // 70004312 -{0x0F12, 0x4D49,}, // 70004314 -{0x0F12, 0x8E28,}, // 70004316 -{0x0F12, 0x2800,}, // 70004318 -{0x0F12, 0xD01F,}, // 7000431A -{0x0F12, 0x4E49,}, // 7000431C -{0x0F12, 0x4844,}, // 7000431E -{0x0F12, 0x68B4,}, // 70004320 -{0x0F12, 0x6800,}, // 70004322 -{0x0F12, 0x4284,}, // 70004324 -{0x0F12, 0xD903,}, // 70004326 -{0x0F12, 0x1A21,}, // 70004328 -{0x0F12, 0x0849,}, // 7000432A -{0x0F12, 0x1847,}, // 7000432C -{0x0F12, 0xE006,}, // 7000432E -{0x0F12, 0x4284,}, // 70004330 -{0x0F12, 0xD203,}, // 70004332 -{0x0F12, 0x1B01,}, // 70004334 -{0x0F12, 0x0849,}, // 70004336 -{0x0F12, 0x1A47,}, // 70004338 -{0x0F12, 0xE000,}, // 7000433A -{0x0F12, 0x0027,}, // 7000433C -{0x0F12, 0x0020,}, // 7000433E -{0x0F12, 0x493B,}, // 70004340 -{0x0F12, 0x3120,}, // 70004342 -{0x0F12, 0x7A0C,}, // 70004344 -{0x0F12, 0x2C00,}, // 70004346 -{0x0F12, 0xD004,}, // 70004348 -{0x0F12, 0x0200,}, // 7000434A -{0x0F12, 0x0039,}, // 7000434C -{0x0F12, 0xF000,}, // 7000434E -{0x0F12, 0xF8C3,}, // 70004350 -{0x0F12, 0x8668,}, // 70004352 -{0x0F12, 0x2C00,}, // 70004354 -{0x0F12, 0xD000,}, // 70004356 -{0x0F12, 0x60B7,}, // 70004358 -{0x0F12, 0xE54D,}, // 7000435A -{0x0F12, 0x20FF,}, // 7000435C -{0x0F12, 0x1C40,}, // 7000435E -{0x0F12, 0x8668,}, // 70004360 -{0x0F12, 0xE549,}, // 70004362 -{0x0F12, 0xB510,}, // 70004364 -{0x0F12, 0x000C,}, // 70004366 -{0x0F12, 0x6820,}, // 70004368 -{0x0F12, 0x0400,}, // 7000436A -{0x0F12, 0x0C00,}, // 7000436C -{0x0F12, 0x4933,}, // 7000436E -{0x0F12, 0x8E0A,}, // 70004370 -{0x0F12, 0x2A00,}, // 70004372 -{0x0F12, 0xD003,}, // 70004374 -{0x0F12, 0x8E49,}, // 70004376 -{0x0F12, 0x0200,}, // 70004378 -{0x0F12, 0xF000,}, // 7000437A -{0x0F12, 0xF8AD,}, // 7000437C -{0x0F12, 0x6020,}, // 7000437E -{0x0F12, 0x0400,}, // 70004380 -{0x0F12, 0x0C00,}, // 70004382 -{0x0F12, 0xE661,}, // 70004384 -{0x0F12, 0xB570,}, // 70004386 -{0x0F12, 0x680C,}, // 70004388 -{0x0F12, 0x4D2F,}, // 7000438A -{0x0F12, 0x0020,}, // 7000438C -{0x0F12, 0x6F29,}, // 7000438E -{0x0F12, 0xF000,}, // 70004390 -{0x0F12, 0xF946,}, // 70004392 -{0x0F12, 0x6F69,}, // 70004394 -{0x0F12, 0x1D20,}, // 70004396 -{0x0F12, 0xF000,}, // 70004398 -{0x0F12, 0xF942,}, // 7000439A -{0x0F12, 0x4827,}, // 7000439C -{0x0F12, 0x8E00,}, // 7000439E -{0x0F12, 0x2800,}, // 700043A0 -{0x0F12, 0xD006,}, // 700043A2 -{0x0F12, 0x4922,}, // 700043A4 -{0x0F12, 0x2214,}, // 700043A6 -{0x0F12, 0x3168,}, // 700043A8 -{0x0F12, 0x0008,}, // 700043AA -{0x0F12, 0x383C,}, // 700043AC -{0x0F12, 0xF000,}, // 700043AE -{0x0F12, 0xF93F,}, // 700043B0 -{0x0F12, 0xE488,}, // 700043B2 -{0x0F12, 0xB5F8,}, // 700043B4 -{0x0F12, 0x0004,}, // 700043B6 -{0x0F12, 0x4D24,}, // 700043B8 -{0x0F12, 0x8B68,}, // 700043BA -{0x0F12, 0x2800,}, // 700043BC -{0x0F12, 0xD012,}, // 700043BE -{0x0F12, 0x4823,}, // 700043C0 -{0x0F12, 0x8A00,}, // 700043C2 -{0x0F12, 0x06C0,}, // 700043C4 -{0x0F12, 0xD50E,}, // 700043C6 -{0x0F12, 0x4822,}, // 700043C8 -{0x0F12, 0x7800,}, // 700043CA -{0x0F12, 0x2800,}, // 700043CC -{0x0F12, 0xD00A,}, // 700043CE -{0x0F12, 0x481D,}, // 700043D0 -{0x0F12, 0x6FC1,}, // 700043D2 -{0x0F12, 0x2000,}, // 700043D4 -{0x0F12, 0xF000,}, // 700043D6 -{0x0F12, 0xF923,}, // 700043D8 -{0x0F12, 0x8B28,}, // 700043DA -{0x0F12, 0x2201,}, // 700043DC -{0x0F12, 0x2180,}, // 700043DE -{0x0F12, 0xF000,}, // 700043E0 -{0x0F12, 0xF92C,}, // 700043E2 -{0x0F12, 0x8328,}, // 700043E4 -{0x0F12, 0x2101,}, // 700043E6 -{0x0F12, 0x000D,}, // 700043E8 -{0x0F12, 0x0020,}, // 700043EA -{0x0F12, 0x3810,}, // 700043EC -{0x0F12, 0x4081,}, // 700043EE -{0x0F12, 0x40A5,}, // 700043F0 -{0x0F12, 0x4F11,}, // 700043F2 -{0x0F12, 0x000E,}, // 700043F4 -{0x0F12, 0x2C10,}, // 700043F6 -{0x0F12, 0xDA03,}, // 700043F8 -{0x0F12, 0x8838,}, // 700043FA -{0x0F12, 0x43A8,}, // 700043FC -{0x0F12, 0x8038,}, // 700043FE -{0x0F12, 0xE002,}, // 70004400 -{0x0F12, 0x8878,}, // 70004402 -{0x0F12, 0x43B0,}, // 70004404 -{0x0F12, 0x8078,}, // 70004406 -{0x0F12, 0xF000,}, // 70004408 -{0x0F12, 0xF920,}, // 7000440A -{0x0F12, 0x2C10,}, // 7000440C -{0x0F12, 0xDA03,}, // 7000440E -{0x0F12, 0x8838,}, // 70004410 -{0x0F12, 0x4328,}, // 70004412 -{0x0F12, 0x8038,}, // 70004414 -{0x0F12, 0xE4EF,}, // 70004416 -{0x0F12, 0x8878,}, // 70004418 -{0x0F12, 0x4330,}, // 7000441A -{0x0F12, 0x8078,}, // 7000441C -{0x0F12, 0xE4EB,}, // 7000441E -{0x0F12, 0x2558,}, // 70004420 -{0x0F12, 0x7000,}, // 70004422 -{0x0F12, 0x2AB8,}, // 70004424 -{0x0F12, 0x7000,}, // 70004426 -{0x0F12, 0x145E,}, // 70004428 -{0x0F12, 0x7000,}, // 7000442A -{0x0F12, 0x2698,}, // 7000442C -{0x0F12, 0x7000,}, // 7000442E -{0x0F12, 0x2BB8,}, // 70004430 -{0x0F12, 0x7000,}, // 70004432 -{0x0F12, 0x2998,}, // 70004434 -{0x0F12, 0x7000,}, // 70004436 -{0x0F12, 0x1100,}, // 70004438 -{0x0F12, 0xD000,}, // 7000443A -{0x0F12, 0x4780,}, // 7000443C -{0x0F12, 0x7000,}, // 7000443E -{0x0F12, 0xE200,}, // 70004440 -{0x0F12, 0xD000,}, // 70004442 -{0x0F12, 0x210C,}, // 70004444 -{0x0F12, 0x7000,}, // 70004446 -{0x0F12, 0x0000,}, // 70004448 -{0x0F12, 0x7000,}, // 7000444A -{0x0F12, 0x308C,}, // 7000444C -{0x0F12, 0x7000,}, // 7000444E -{0x0F12, 0xB040,}, // 70004450 -{0x0F12, 0xD000,}, // 70004452 -{0x0F12, 0x3858,}, // 70004454 -{0x0F12, 0x7000,}, // 70004456 -{0x0F12, 0x4778,}, // 70004458 -{0x0F12, 0x46C0,}, // 7000445A -{0x0F12, 0xC000,}, // 7000445C -{0x0F12, 0xE59F,}, // 7000445E -{0x0F12, 0xFF1C,}, // 70004460 -{0x0F12, 0xE12F,}, // 70004462 -{0x0F12, 0x1789,}, // 70004464 -{0x0F12, 0x0001,}, // 70004466 -{0x0F12, 0x4778,}, // 70004468 -{0x0F12, 0x46C0,}, // 7000446A -{0x0F12, 0xC000,}, // 7000446C -{0x0F12, 0xE59F,}, // 7000446E -{0x0F12, 0xFF1C,}, // 70004470 -{0x0F12, 0xE12F,}, // 70004472 -{0x0F12, 0x16F1,}, // 70004474 -{0x0F12, 0x0001,}, // 70004476 -{0x0F12, 0x4778,}, // 70004478 -{0x0F12, 0x46C0,}, // 7000447A -{0x0F12, 0xC000,}, // 7000447C -{0x0F12, 0xE59F,}, // 7000447E -{0x0F12, 0xFF1C,}, // 70004480 -{0x0F12, 0xE12F,}, // 70004482 -{0x0F12, 0xC3B1,}, // 70004484 -{0x0F12, 0x0000,}, // 70004486 -{0x0F12, 0x4778,}, // 70004488 -{0x0F12, 0x46C0,}, // 7000448A -{0x0F12, 0xC000,}, // 7000448C -{0x0F12, 0xE59F,}, // 7000448E -{0x0F12, 0xFF1C,}, // 70004490 -{0x0F12, 0xE12F,}, // 70004492 -{0x0F12, 0xC36D,}, // 70004494 -{0x0F12, 0x0000,}, // 70004496 -{0x0F12, 0x4778,}, // 70004498 -{0x0F12, 0x46C0,}, // 7000449A -{0x0F12, 0xC000,}, // 7000449C -{0x0F12, 0xE59F,}, // 7000449E -{0x0F12, 0xFF1C,}, // 700044A0 -{0x0F12, 0xE12F,}, // 700044A2 -{0x0F12, 0xF6D7,}, // 700044A4 -{0x0F12, 0x0000,}, // 700044A6 -{0x0F12, 0x4778,}, // 700044A8 -{0x0F12, 0x46C0,}, // 700044AA -{0x0F12, 0xC000,}, // 700044AC -{0x0F12, 0xE59F,}, // 700044AE -{0x0F12, 0xFF1C,}, // 700044B0 -{0x0F12, 0xE12F,}, // 700044B2 -{0x0F12, 0xB49D,}, // 700044B4 -{0x0F12, 0x0000,}, // 700044B6 -{0x0F12, 0x4778,}, // 700044B8 -{0x0F12, 0x46C0,}, // 700044BA -{0x0F12, 0xC000,}, // 700044BC -{0x0F12, 0xE59F,}, // 700044BE -{0x0F12, 0xFF1C,}, // 700044C0 -{0x0F12, 0xE12F,}, // 700044C2 -{0x0F12, 0x7EDF,}, // 700044C4 -{0x0F12, 0x0000,}, // 700044C6 -{0x0F12, 0x4778,}, // 700044C8 -{0x0F12, 0x46C0,}, // 700044CA -{0x0F12, 0xC000,}, // 700044CC -{0x0F12, 0xE59F,}, // 700044CE -{0x0F12, 0xFF1C,}, // 700044D0 -{0x0F12, 0xE12F,}, // 700044D2 -{0x0F12, 0x448D,}, // 700044D4 -{0x0F12, 0x0000,}, // 700044D6 -{0x0F12, 0x4778,}, // 700044D8 -{0x0F12, 0x46C0,}, // 700044DA -{0x0F12, 0xF004,}, // 700044DC -{0x0F12, 0xE51F,}, // 700044DE -{0x0F12, 0x29EC,}, // 700044E0 -{0x0F12, 0x0001,}, // 700044E2 -{0x0F12, 0x4778,}, // 700044E4 -{0x0F12, 0x46C0,}, // 700044E6 -{0x0F12, 0xC000,}, // 700044E8 -{0x0F12, 0xE59F,}, // 700044EA -{0x0F12, 0xFF1C,}, // 700044EC -{0x0F12, 0xE12F,}, // 700044EE -{0x0F12, 0x2EF1,}, // 700044F0 -{0x0F12, 0x0000,}, // 700044F2 -{0x0F12, 0x4778,}, // 700044F4 -{0x0F12, 0x46C0,}, // 700044F6 -{0x0F12, 0xC000,}, // 700044F8 -{0x0F12, 0xE59F,}, // 700044FA -{0x0F12, 0xFF1C,}, // 700044FC -{0x0F12, 0xE12F,}, // 700044FE -{0x0F12, 0xEE03,}, // 70004500 -{0x0F12, 0x0000,}, // 70004502 -{0x0F12, 0x4778,}, // 70004504 -{0x0F12, 0x46C0,}, // 70004506 -{0x0F12, 0xC000,}, // 70004508 -{0x0F12, 0xE59F,}, // 7000450A -{0x0F12, 0xFF1C,}, // 7000450C -{0x0F12, 0xE12F,}, // 7000450E -{0x0F12, 0xA58B,}, // 70004510 -{0x0F12, 0x0000,}, // 70004512 -{0x0F12, 0x4778,}, // 70004514 -{0x0F12, 0x46C0,}, // 70004516 -{0x0F12, 0xC000,}, // 70004518 -{0x0F12, 0xE59F,}, // 7000451A -{0x0F12, 0xFF1C,}, // 7000451C -{0x0F12, 0xE12F,}, // 7000451E -{0x0F12, 0x7C49,}, // 70004520 -{0x0F12, 0x0000,}, // 70004522 -{0x0F12, 0x4778,}, // 70004524 -{0x0F12, 0x46C0,}, // 70004526 -{0x0F12, 0xC000,}, // 70004528 -{0x0F12, 0xE59F,}, // 7000452A -{0x0F12, 0xFF1C,}, // 7000452C -{0x0F12, 0xE12F,}, // 7000452E -{0x0F12, 0x7C63,}, // 70004530 -{0x0F12, 0x0000,}, // 70004532 -{0x0F12, 0x4778,}, // 70004534 -{0x0F12, 0x46C0,}, // 70004536 -{0x0F12, 0xC000,}, // 70004538 -{0x0F12, 0xE59F,}, // 7000453A -{0x0F12, 0xFF1C,}, // 7000453C -{0x0F12, 0xE12F,}, // 7000453E -{0x0F12, 0x2DB7,}, // 70004540 -{0x0F12, 0x0000,}, // 70004542 -{0x0F12, 0x4778,}, // 70004544 -{0x0F12, 0x46C0,}, // 70004546 -{0x0F12, 0xC000,}, // 70004548 -{0x0F12, 0xE59F,}, // 7000454A -{0x0F12, 0xFF1C,}, // 7000454C -{0x0F12, 0xE12F,}, // 7000454E -{0x0F12, 0xEB3D,}, // 70004550 -{0x0F12, 0x0000,}, // 70004552 -{0x0F12, 0x4778,}, // 70004554 -{0x0F12, 0x46C0,}, // 70004556 -{0x0F12, 0xC000,}, // 70004558 -{0x0F12, 0xE59F,}, // 7000455A -{0x0F12, 0xFF1C,}, // 7000455C -{0x0F12, 0xE12F,}, // 7000455E -{0x0F12, 0xF061,}, // 70004560 -{0x0F12, 0x0000,}, // 70004562 -{0x0F12, 0x4778,}, // 70004564 -{0x0F12, 0x46C0,}, // 70004566 -{0x0F12, 0xC000,}, // 70004568 -{0x0F12, 0xE59F,}, // 7000456A -{0x0F12, 0xFF1C,}, // 7000456C -{0x0F12, 0xE12F,}, // 7000456E -{0x0F12, 0xF0EF,}, // 70004570 -{0x0F12, 0x0000,}, // 70004572 -{0x0F12, 0x4778,}, // 70004574 -{0x0F12, 0x46C0,}, // 70004576 -{0x0F12, 0xF004,}, // 70004578 -{0x0F12, 0xE51F,}, // 7000457A -{0x0F12, 0x2824,}, // 7000457C -{0x0F12, 0x0001,}, // 7000457E -{0x0F12, 0x4778,}, // 70004580 -{0x0F12, 0x46C0,}, // 70004582 -{0x0F12, 0xC000,}, // 70004584 -{0x0F12, 0xE59F,}, // 70004586 -{0x0F12, 0xFF1C,}, // 70004588 -{0x0F12, 0xE12F,}, // 7000458A -{0x0F12, 0x8EDD,}, // 7000458C -{0x0F12, 0x0000,}, // 7000458E -{0x0F12, 0x4778,}, // 70004590 -{0x0F12, 0x46C0,}, // 70004592 -{0x0F12, 0xC000,}, // 70004594 -{0x0F12, 0xE59F,}, // 70004596 -{0x0F12, 0xFF1C,}, // 70004598 -{0x0F12, 0xE12F,}, // 7000459A -{0x0F12, 0x8DCB,}, // 7000459C -{0x0F12, 0x0000,}, // 7000459E -{0x0F12, 0x4778,}, // 700045A0 -{0x0F12, 0x46C0,}, // 700045A2 -{0x0F12, 0xC000,}, // 700045A4 -{0x0F12, 0xE59F,}, // 700045A6 -{0x0F12, 0xFF1C,}, // 700045A8 -{0x0F12, 0xE12F,}, // 700045AA -{0x0F12, 0x8E17,}, // 700045AC -{0x0F12, 0x0000,}, // 700045AE -{0x0F12, 0x4778,}, // 700045B0 -{0x0F12, 0x46C0,}, // 700045B2 -{0x0F12, 0xC000,}, // 700045B4 -{0x0F12, 0xE59F,}, // 700045B6 -{0x0F12, 0xFF1C,}, // 700045B8 -{0x0F12, 0xE12F,}, // 700045BA -{0x0F12, 0x98C5,}, // 700045BC -{0x0F12, 0x0000,}, // 700045BE -{0x0F12, 0x4778,}, // 700045C0 -{0x0F12, 0x46C0,}, // 700045C2 -{0x0F12, 0xC000,}, // 700045C4 -{0x0F12, 0xE59F,}, // 700045C6 -{0x0F12, 0xFF1C,}, // 700045C8 -{0x0F12, 0xE12F,}, // 700045CA -{0x0F12, 0x7C7D,}, // 700045CC -{0x0F12, 0x0000,}, // 700045CE -{0x0F12, 0x4778,}, // 700045D0 -{0x0F12, 0x46C0,}, // 700045D2 -{0x0F12, 0xC000,}, // 700045D4 -{0x0F12, 0xE59F,}, // 700045D6 -{0x0F12, 0xFF1C,}, // 700045D8 -{0x0F12, 0xE12F,}, // 700045DA -{0x0F12, 0x7E31,}, // 700045DC -{0x0F12, 0x0000,}, // 700045DE -{0x0F12, 0x4778,}, // 700045E0 -{0x0F12, 0x46C0,}, // 700045E2 -{0x0F12, 0xC000,}, // 700045E4 -{0x0F12, 0xE59F,}, // 700045E6 -{0x0F12, 0xFF1C,}, // 700045E8 -{0x0F12, 0xE12F,}, // 700045EA -{0x0F12, 0x7EAB,}, // 700045EC -{0x0F12, 0x0000,}, // 700045EE -{0x0F12, 0x4778,}, // 700045F0 -{0x0F12, 0x46C0,}, // 700045F2 -{0x0F12, 0xC000,}, // 700045F4 -{0x0F12, 0xE59F,}, // 700045F6 -{0x0F12, 0xFF1C,}, // 700045F8 -{0x0F12, 0xE12F,}, // 700045FA -{0x0F12, 0x7501,}, // 700045FC -{0x0F12, 0x0000,}, // 700045FE -{0x0F12, 0x4778,}, // 70004600 -{0x0F12, 0x46C0,}, // 70004602 -{0x0F12, 0xC000,}, // 70004604 -{0x0F12, 0xE59F,}, // 70004606 -{0x0F12, 0xFF1C,}, // 70004608 -{0x0F12, 0xE12F,}, // 7000460A -{0x0F12, 0xF63F,}, // 7000460C -{0x0F12, 0x0000,}, // 7000460E -{0x0F12, 0x4778,}, // 70004610 -{0x0F12, 0x46C0,}, // 70004612 -{0x0F12, 0xC000,}, // 70004614 -{0x0F12, 0xE59F,}, // 70004616 -{0x0F12, 0xFF1C,}, // 70004618 -{0x0F12, 0xE12F,}, // 7000461A -{0x0F12, 0x3D0B,}, // 7000461C -{0x0F12, 0x0000,}, // 7000461E -{0x0F12, 0x4778,}, // 70004620 -{0x0F12, 0x46C0,}, // 70004622 -{0x0F12, 0xC000,}, // 70004624 -{0x0F12, 0xE59F,}, // 70004626 -{0x0F12, 0xFF1C,}, // 70004628 -{0x0F12, 0xE12F,}, // 7000462A -{0x0F12, 0x29BF,}, // 7000462C -{0x0F12, 0x0001,}, // 7000462E -{0x0F12, 0x4778,}, // 70004630 -{0x0F12, 0x46C0,}, // 70004632 -{0x0F12, 0xF004,}, // 70004634 -{0x0F12, 0xE51F,}, // 70004636 -{0x0F12, 0x26D8,}, // 70004638 -{0x0F12, 0x0001,}, // 7000463A -{0x0F12, 0x4778,}, // 7000463C -{0x0F12, 0x46C0,}, // 7000463E -{0x0F12, 0xC000,}, // 70004640 -{0x0F12, 0xE59F,}, // 70004642 -{0x0F12, 0xFF1C,}, // 70004644 -{0x0F12, 0xE12F,}, // 70004646 -{0x0F12, 0x306B,}, // 70004648 -{0x0F12, 0x0000,}, // 7000464A -{0x0F12, 0x4778,}, // 7000464C -{0x0F12, 0x46C0,}, // 7000464E -{0x0F12, 0xC000,}, // 70004650 -{0x0F12, 0xE59F,}, // 70004652 -{0x0F12, 0xFF1C,}, // 70004654 -{0x0F12, 0xE12F,}, // 70004656 -{0x0F12, 0x6099,}, // 70004658 -{0x0F12, 0x0000,}, // 7000465A -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0x0B64) -// Addr : 3AF8 , Size : 2914(B62h) - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//================================================================================== -// 05.OTP Control -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0722,}, -{0x0F12, 0x0100,}, //skl_OTP_usWaitTime This register should be positioned in fornt of D0001000 -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, //skl_bUseOTPfunc This is OTP on/off function -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, //ash_bUseOTPData -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, //awbb_otp_disable -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, //ash_bUseGasAlphaOTP - -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 06.Gas_Anti Shading -//================================================================================== -//=================================================================== -// GAS Alpha setting -//=================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, - -// Refer Mon_AWB_RotGain -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B - -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B - -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B - -{0x0F12, 0x3F80,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B - -{0x0F12, 0x4080,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B - -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B - -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -//Outdoor GAS Alpha -{0x0F12, 0x4600,}, -{0x0F12, 0x4000,}, -{0x0F12, 0x4000,}, -{0x0F12, 0x4000,}, - -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - - // For Capture -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2 PLA 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable [1] HPLA enable - -{0x002A, 0x1B00,}, //Green Noise -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //0A20//senHal_uMinColsBin -{0x0F12, 0x06C8,}, //0AB0//senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,},//setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x000A,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x0012,}, //setot_usFullXBayerOffset// - -//================================================================================== -// 08.AF Setting -//================================================================================== - -//AF interface setting -{0x0028, 0x7000,}, -{0x002A, 0x01FC,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio, for Flash control -{0x002A, 0x01FE,}, -{0x0F12, 0x0003,}, //REG_TC_IPRM_CM_Init_AfModeType, VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1, AF Enable GPIO 6 -{0x002A, 0x020C,}, -{0x0F12, 0x2F0C,}, //REG_TC_IPRM_CM_Init_Mi2cBit -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz, IIC Speed - -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated - -//2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0802,}, - -//Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, - -//Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, //af_pos_usHomePos -{0x0F12, 0xD000,}, //af_pos_usLowConfPos - -//AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, //af_search_usConfCheckOrder_1_ -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, //af_search_usConfThr_4_ -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, //af_search_usConfThr_10_ -{0x0F12, 0x0320,}, //af_search_usConfThr_11_ -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, //af_stat_usMinStatVal -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, //af_scene_usSceneLowNormBrThr -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, //af_stat_usBpfThresh -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, //af_search_usCapturePolicy -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, //af_pos_usCaptureFixedPos - -//AF Lens Position Table Settings -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, -{0x0F12, 0x0024,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x002C,}, -{0x0F12, 0x002E,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0088,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00B8,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00C8,}, - -//VCM AF driver with PWM/I2C -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, //afd_usParam[0] I2C power down command -{0x0F12, 0x0006,}, //afd_usParam[1] Position Right Shift -{0x0F12, 0x3FF0,}, //afd_usParam[2] I2C Data Mask -{0x0F12, 0x03E8,}, //afd_usParam[3] PWM Period -{0x0F12, 0x0000,}, //afd_usParam[4] PWM Divider -{0x0F12, 0x0008,}, //afd_usParam[5] SlowMotion Delay 4. reduce lens collision noise.delay2 when threshold upper lens moving when moving distance 9 delay 80h 25.6ms delay SEHF_SHIN -{0x0F12, 0x0001,}, //afd_usParam[6] SlowMotion Threshold 10->1 SEHF_CHECK_IT -{0x0F12, 0x0004,}, //afd_usParam[7] Signal Shaping -{0x0F12, 0x0080,}, //afd_usParam[8] Signal Shaping level -{0x0F12, 0x00C0,}, //afd_usParam[9] Signal Shaping level -{0x0F12, 0x00E0,}, //afd_usParam[10] Signal Shaping level -{0x0F12, 0x0000,}, //afd_usParam[11] Signal Shaping level - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, //REG_TC_AF_AfCmd - -//================================================================================== -// 09.AWB-BASIC setting -//================================================================================== - -//AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0580,}, -{0x0F12, 0x0428,}, -{0x0F12, 0x07B0,}, - -//AWB Init -//White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,}, //awbb_IntcR -{0x0F12, 0x0121,}, //awbb_IntcB - -//Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x036E,}, -{0x0F12, 0x03AC,}, -{0x0F12, 0x0324,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x02EA,}, -{0x0F12, 0x0386,}, -{0x0F12, 0x02B0,}, -{0x0F12, 0x0358,}, -{0x0F12, 0x0284,}, -{0x0F12, 0x0326,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x02F4,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x0236,}, -{0x0F12, 0x02B2,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x0298,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x026E,}, -{0x0F12, 0x01DE,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x01BA,}, -{0x0F12, 0x0242,}, -{0x0F12, 0x01A4,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x01F0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, //awbb_IndoorGrZones_m_GridStep -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, //awbb_IndoorGrZones_ZInfo_m_GridSz -{0x0F12, 0x000F,}, -{0x002A, 0x1074,}, //awbb_IndoorGrZones_m_Boffs -{0x0F12, 0x011A,}, - -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0284,}, -{0x0F12, 0x023C,}, -{0x0F12, 0x0290,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0290,}, -{0x0F12, 0x021A,}, -{0x0F12, 0x0286,}, -{0x0F12, 0x021A,}, -{0x0F12, 0x0278,}, -{0x0F12, 0x021C,}, -{0x0F12, 0x0264,}, -{0x0F12, 0x0230,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0004,}, //awbb_OutdoorGrZones_m_GridStep -{0x002A, 0x10AC,}, -{0x0F12, 0x0007,}, //awbb_OutdoorGrZones_ZInfo_m_GridSz -{0x002A, 0x10B0,}, -{0x0F12, 0x0216,}, //awbb_OutdoorGrZones_m_Boffs - -//LowBR Zone -{0x002A, 0x10B4,}, -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, //awbb_LowBrGrZones_m_GridStep -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, //awbb_LowBrGrZones_ZInfo_m_GridSz -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, //awbb_LowBrGrZones_m_Boffs - -//LowTemp Zone -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, //awbb_CrclLowT_R_c -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, //awbb_CrclLowT_B_c -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, //awbb_CrclLowT_Rad_c - -//AWB Convergence Speed -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, //awbb_MvEq_RBthresh -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0DAC,}, //Outdoor TH : about 2500lux -{0x0F12, 0x0DAC,}, //Outdoor TH : about 2500lux -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, //awbb_YThreshLow_Low -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, //Mon_AWB_ByPassMode - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, //awbb_GridEnable - -//Grid -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, // awbb_GridConst_1 -{0x0F12, 0x0347,}, // awbb_GridConst_1_1_ -{0x0F12, 0x03C2,}, // awbb_GridConst_1_2_ -{0x0F12, 0x1060,}, // awbb_GridConst_2 -{0x0F12, 0x1000,}, // awbb_GridConst_2_1_ -{0x0F12, 0x1150,}, // awbb_GridConst_2_2_ -{0x0F12, 0x11E5,}, // awbb_GridConst_2_3_ -{0x0F12, 0x120A,}, // awbb_GridConst_2_4_ -{0x0F12, 0x1296,}, // awbb_GridConst_2_5_ -{0x0F12, 0x00AB,}, // awbb_GridCoeff_R_1 -{0x0F12, 0x00BF,}, // awbb_GridCoeff_B_1 -{0x0F12, 0x00D2,}, // awbb_GridCoeff_R_2 -{0x0F12, 0x0093,}, // awbb_GridCoeff_B_2 - -//Indoor Grid Offset -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, - -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, - -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, - -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFE70,}, -{0x0F12, 0xFE70,}, - -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFE70,}, -{0x0F12, 0xFE70,}, - -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFE70,}, -{0x0F12, 0xFE70,}, - -//Outdoor Grid Offset -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, //awbb_RGainOff -{0x0F12, 0xFFE0,}, //awbb_BGainOff -{0x0F12, 0x0000,}, //awbb_GGainOff - -//================================================================================== -// 10.Clock Setting -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs //26022 -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) -{0x002A, 0x021A,}, -{0x0F12, 0x3A98,}, //3A98//4F1A//3A98//REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x2FDA,}, //280A//REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x30D4,}, //36B0//REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //4F1A//REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x2FDA,}, //280A//REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x30D4,}, //36B0//REG_TC_IPRM_MaxOutRate4KHz_1 - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, //AFC_D_ConvAccelerPower - -// Auto Flicker (50Mhz start) -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, //AFC_Default BIT[0] 1:60Hz 0:50Hz -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, //REG_TC_DBG 7F: 60Hz 5F:50Hz -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,}, ///AFC_SmallP_MaxFrames default :0x0003 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, //AFC_NewS_XSumDiff default :0x05DC 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, //AFC_D_MaxHitsCnt default :0x0004 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, //AFC_NewS_XBatchVarLimit default :0x01C2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, //AFC_D_AbsEnergyThresh default :0x000C 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, //AFC_D_B_Coef default :0x0600 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, //AFC_D_RelEnergyThresh default :0x0008 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene -{0x002A, 0x148A,}, -{0x0F12, 0x000F,}, //ae_StatMode - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - -//AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, //lt_uLimitHigh -{0x0F12, 0x00EF,}, //lt_uLimitLow - -//AE Concept -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, //lt_ExpGain_uSubsamplingmode -{0x0F12, 0x0001,}, //lt_ExpGain_uNonSubsampling -{0x0F12, 0x0800,}, //lt_ExpGain_ExpCurveGainMaxStr -{0x0F12, 0x0100,}, //lt_ExpGain_ExpCurveGainMaxStr_0__uMaxDigGain - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - -//Exposure -{0x002A, 0x0638,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control -{0x002A, 0x06B8,}, -{0x0F12, 0x802C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //capture flash on - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //one frame AE - -{0x002A, 0x17F6,}, -{0x0F12, 0x0260,}, //0266, //023C, //AWB R point -{0x0F12, 0x0210,}, //021A, //0248, //AWB B point - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,}, // Fls AE tune start - -{0x0F12, 0x0100,}, // fls_afl_FlsAFIn Rin -{0x0F12, 0x0120,}, -{0x0F12, 0x0180,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0A00,}, -{0x0F12, 0x1000,}, - -{0x0F12, 0x0100,}, // fls_afl_FlsAFOut Rout -{0x0F12, 0x00A0,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0045,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1884,}, - -{0x0F12, 0x0100,}, // fls_afl_FlsNBOut flash NB default -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0100,}, // fls_afl_FlashWP_Weight flash NB default -{0x0F12, 0x00C0,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x000A,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0030,}, // fls_afl_FlashWP_Weight flash NB default -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0060,}, -{0x002A, 0x4784,}, - -{0x0F12, 0x00A0,}, // TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,}, // TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, -{0x002A, 0x479C,}, -{0x0F12, 0x0120,}, //Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x003C,}, //Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x0026,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, //SARR_AwbCcmCord[0] -{0x0F12, 0x0100,}, //SARR_AwbCcmCord[1] -{0x0F12, 0x0125,}, //SARR_AwbCcmCord[2] -{0x0F12, 0x015F,}, //SARR_AwbCcmCord[3] -{0x0F12, 0x017C,}, //SARR_AwbCcmCord[4] -{0x0F12, 0x0194,}, //SARR_AwbCcmCord[5] -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, //TVAR_wbt_pBaseCcms -{0x0F12, 0x7000,}, -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, //TVAR_wbt_pOutdoorCcm -{0x0F12, 0x7000,}, - -//Horizon -{0x002A, 0x4800,}, -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -//INCA A -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[18] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -//Warm White -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -//Cool White -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -//D50 -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -//D65 -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//================================================================================== -// 16.GAMMA -//================================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[0][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[0][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[0][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[0][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[0][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[0][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[0][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[0][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[0][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[0][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[0][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[0][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[0][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[0][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[0][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[0][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[0][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[0][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[0][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[0][19] - -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[1][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[1][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[1][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[1][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[1][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[1][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[1][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[1][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[1][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[1][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[1][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[1][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[1][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[1][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[1][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[1][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[1][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[1][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[1][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[1][19] - -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[2][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[2][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[2][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[2][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[2][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[2][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[2][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[2][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[2][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[2][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[2][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[2][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[2][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[2][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[2][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[2][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[2][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[2][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[2][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[2][19] - -//RGB Outdoor Gamma -{0x0F12, 0x0007,}, //saRR_usDualGammaLutRGBOutdoor[0][0] -{0x0F12, 0x0012,}, //saRR_usDualGammaLutRGBOutdoor[0][1] -{0x0F12, 0x0020,}, //saRR_usDualGammaLutRGBOutdoor[0][2] -{0x0F12, 0x0038,}, //saRR_usDualGammaLutRGBOutdoor[0][3] -{0x0F12, 0x0071,}, //saRR_usDualGammaLutRGBOutdoor[0][4] -{0x0F12, 0x00DA,}, //saRR_usDualGammaLutRGBOutdoor[0][5] -{0x0F12, 0x0137,}, //saRR_usDualGammaLutRGBOutdoor[0][6] -{0x0F12, 0x0161,}, //saRR_usDualGammaLutRGBOutdoor[0][7] -{0x0F12, 0x0187,}, //saRR_usDualGammaLutRGBOutdoor[0][8] -{0x0F12, 0x01C3,}, //saRR_usDualGammaLutRGBOutdoor[0][9] -{0x0F12, 0x01FE,}, //saRR_usDualGammaLutRGBOutdoor[0][10] -{0x0F12, 0x021B,}, //saRR_usDualGammaLutRGBOutdoor[0][11] -{0x0F12, 0x0245,}, //saRR_usDualGammaLutRGBOutdoor[0][12] -{0x0F12, 0x028C,}, //saRR_usDualGammaLutRGBOutdoor[0][13] -{0x0F12, 0x02CB,}, //saRR_usDualGammaLutRGBOutdoor[0][14] -{0x0F12, 0x0325,}, //saRR_usDualGammaLutRGBOutdoor[0][15] -{0x0F12, 0x0365,}, //saRR_usDualGammaLutRGBOutdoor[0][16] -{0x0F12, 0x039A,}, //saRR_usDualGammaLutRGBOutdoor[0][17] -{0x0F12, 0x03C7,}, //saRR_usDualGammaLutRGBOutdoor[0][18] -{0x0F12, 0x03F4,}, //saRR_usDualGammaLutRGBOutdoor[0][19] - -{0x0F12, 0x0005,}, //saRR_usDualGammaLutRGBOutdoor[1][0] -{0x0F12, 0x0010,}, //saRR_usDualGammaLutRGBOutdoor[1][1] -{0x0F12, 0x001E,}, //saRR_usDualGammaLutRGBOutdoor[1][2] -{0x0F12, 0x0036,}, //saRR_usDualGammaLutRGBOutdoor[1][3] -{0x0F12, 0x006F,}, //saRR_usDualGammaLutRGBOutdoor[1][4] -{0x0F12, 0x00D8,}, //saRR_usDualGammaLutRGBOutdoor[1][5] -{0x0F12, 0x0135,}, //saRR_usDualGammaLutRGBOutdoor[1][6] -{0x0F12, 0x015F,}, //saRR_usDualGammaLutRGBOutdoor[1][7] -{0x0F12, 0x0185,}, //saRR_usDualGammaLutRGBOutdoor[1][8] -{0x0F12, 0x01C1,}, //saRR_usDualGammaLutRGBOutdoor[1][9] -{0x0F12, 0x01F3,}, //saRR_usDualGammaLutRGBOutdoor[1][10] -{0x0F12, 0x0220,}, //saRR_usDualGammaLutRGBOutdoor[1][11] -{0x0F12, 0x024A,}, //saRR_usDualGammaLutRGBOutdoor[1][12] -{0x0F12, 0x0291,}, //saRR_usDualGammaLutRGBOutdoor[1][13] -{0x0F12, 0x02D0,}, //saRR_usDualGammaLutRGBOutdoor[1][14] -{0x0F12, 0x032A,}, //saRR_usDualGammaLutRGBOutdoor[1][15] -{0x0F12, 0x036A,}, //saRR_usDualGammaLutRGBOutdoor[1][16] -{0x0F12, 0x039F,}, //saRR_usDualGammaLutRGBOutdoor[1][17] -{0x0F12, 0x03CC,}, //saRR_usDualGammaLutRGBOutdoor[1][18] -{0x0F12, 0x03F9,}, //saRR_usDualGammaLutRGBOutdoor[1][19] - -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBOutdoor[2][0] -{0x0F12, 0x000E,}, //saRR_usDualGammaLutRGBOutdoor[2][1] -{0x0F12, 0x001C,}, //saRR_usDualGammaLutRGBOutdoor[2][2] -{0x0F12, 0x0034,}, //saRR_usDualGammaLutRGBOutdoor[2][3] -{0x0F12, 0x006D,}, //saRR_usDualGammaLutRGBOutdoor[2][4] -{0x0F12, 0x00D6,}, //saRR_usDualGammaLutRGBOutdoor[2][5] -{0x0F12, 0x0133,}, //saRR_usDualGammaLutRGBOutdoor[2][6] -{0x0F12, 0x015D,}, //saRR_usDualGammaLutRGBOutdoor[2][7] -{0x0F12, 0x0183,}, //saRR_usDualGammaLutRGBOutdoor[2][8] -{0x0F12, 0x01BF,}, //saRR_usDualGammaLutRGBOutdoor[2][9] -{0x0F12, 0x01F5,}, //saRR_usDualGammaLutRGBOutdoor[2][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBOutdoor[2][11] -{0x0F12, 0x024C,}, //saRR_usDualGammaLutRGBOutdoor[2][12] -{0x0F12, 0x0293,}, //saRR_usDualGammaLutRGBOutdoor[2][13] -{0x0F12, 0x02D2,}, //saRR_usDualGammaLutRGBOutdoor[2][14] -{0x0F12, 0x032C,}, //saRR_usDualGammaLutRGBOutdoor[2][15] -{0x0F12, 0x036C,}, //saRR_usDualGammaLutRGBOutdoor[2][16] -{0x0F12, 0x03A1,}, //saRR_usDualGammaLutRGBOutdoor[2][17] -{0x0F12, 0x03CE,}, //saRR_usDualGammaLutRGBOutdoor[2][18] -{0x0F12, 0x03FB,}, //saRR_usDualGammaLutRGBOutdoor[2][19] - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, -{0x0F12, 0x0050,}, //afit_uNoiseIndInDoor -{0x0F12, 0x00B0,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0196,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0245,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0300,}, //afit_uNoiseIndInDoor - -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, //afit_usGamutTh -{0x0F12, 0x0005,}, //afit_usNeargrayOffset -{0x0F12, 0x0000,}, //afit_bUseSenBpr -{0x0F12, 0x01CC,}, //afit_usBprThr_0_ -{0x0F12, 0x01CC,}, //afit_usBprThr_1_ -{0x0F12, 0x01CC,}, //afit_usBprThr_2_ -{0x0F12, 0x01CC,}, //afit_usBprThr_3_ -{0x0F12, 0x01CC,}, //afit_usBprThr_4_ -{0x0F12, 0x0180,}, //afit_NIContrastAFITValue -{0x0F12, 0x0196,}, //afit_NIContrastTh - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, // on/off AFIT by NB option -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2818,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000A46 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] - -{0x0F12, 0x23CE,}, //70000D1A AFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C AFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E AFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 AFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 AFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 AFITB_yuviirnr_bWideY - -//================================================================================== -// 18.JPEG Thumnail Setting -//================================================================================== - -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - -{0x0F12, 0x0001,}, //0000//REG_TC_THUMB_Thumb_bActive -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format - -{0x002A, 0x17DC,}, -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, - -{0x002A, 0x147C,}, //Brightness min/Max -{0x0F12, 0x0170,}, //bp_uMaxBrightnessFactor -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, //bp_uMinBrightnessFactor - -//================================================================================== -// 19.Input Size Setting -//================================================================================== -//Input Size -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_PrevReqInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_PrevReqInputHeight -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_PrevInputWidthOfs -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_PrevInputHeightOfs -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_CapReqInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_CapReqInputHeight -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_CapInputWidthOfs -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_CapInputHeightOfs - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_PZOOM_ZoomInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_PZOOM_ZoomInputHeight -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_PZOOM_ZoomInputWidthOfs -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_PZOOM_ZoomInputHeightOfs -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_CZOOM_ZoomInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_CZOOM_ZoomInputHeight -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_CZOOM_ZoomInputWidthOfs -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_CZOOM_ZoomInputHeightOfs - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInCap - -//=================================================================== -// 20.Preview & Capture Configration Setting -//=================================================================== -//Preview config[0] 800x480 10~30fps -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //Hsize : 640 1280 1024 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight//Vsize : 480 960 768 -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format 05 : yuv 07: raw 09 : jpeg -{0x0F12, 0x3A98,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x2FDA,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask soc raw : c2 raw 52 -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 -{0x002A, 0x02D0,}, -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uCaptureMirror - -//Capture Config[0] 2576x1932 7.5~15fps -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x3A98,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x2FDA,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//================================================================================== -// 21.Select Cofigration Display -//================================================================================== -//PREVIEW -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged - -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - -//=================================================================================== -// 22. ESD Check -//=================================================================================== -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, //ESD Check -{0x0F12, 0xAAAA,}, -{0x002A, 0x147C,}, -{0x0F12, 0x0170,}, -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, - -//=================================================================================== -// 23. Brightness min/Max -//=================================================================================== -{0x002A, 0x147C,}, -{0x0F12, 0x0170,}, //bp_uMaxBrightnessFactor -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, //bp_uMinBrightnessFactor - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash ? Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block ? (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, //S/W Program -{0x0F12, 0x077F,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0100,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x0670,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x0420,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0430,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0990,}, - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, //afit_bUseNB_Afit -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x2C64,}, -{0x0F12, 0x0001,}, //Auto Flicker Enable - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, //REG_SF_USER_IsoType -{0x0F12, 0x0000,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0100,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x01BA,}, //01A0 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x0F12, 0x0114,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x04A2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0584,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x08D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0374,}, //0340 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x0F12, 0x0214,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x0BD2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0C84,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x06F4,}, //0710 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x005C,}, //TVAR_ae_BrAve 1101 0060->005C -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0012,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001A,}, //TVAR_ae_BrAve -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0022,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0032,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003F,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004C,}, //TVAR_ae_BrAve 1101 0060->005C -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0059,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0066,}, //TVAR_ae_BrAve -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -// Sharpness 0 -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower - -// Saturation 0 -{0x002A, 0x0234,}, -{0x0F12, 0x0000,}, //REG_TC_UserSaturation -{0x002A, 0x06B8,}, -{0x0F12, 0x802C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x002A, 0x0AD4,}, -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3F80,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4080,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -//AE Concept -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //029Ah:15fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, //afit_bUseNB_Afit - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, //REG_TC_DBG_AutoAlgEnBits - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, //REG_SF_USER_IsoType -{0x0F12, 0x0000,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, //lt_bUseSecISODgain - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, //af_search_usSingleAfFlags - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, //af_pos_usTableLastInd -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,}, //lt_uMaxLei -{0x0F12, 0x00FF,}, //lt_usMinExp -{0x002A, 0x098C,}, -{0x0F12, 0xFFF0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0A78,}, //_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7 -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //09C4h:4fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //1388h:2fps -{0x0F12, 0x1388,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //1388h:2fps - -{0x002A, 0x1648,}, //af_search_usSingleAfFlags -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,}, //af_pos_usTableLastInd -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, //ae_WeightTbl_16 -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,}, //lt_uLimitHigh -{0x0F12, 0x00D0,}, //lt_uLimitLow -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,}, //REG_SF_USER_IsoType -{0x0F12, 0x0200,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0377,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, //lt_bUseSecISODgain -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0045,}, //TVAR_ae_BrAve -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x00D0,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,}, //lt_bUseSecISODgain -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, //lt_uLimitHigh -{0x0F12, 0x00D4,}, //lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,}, //0423_0682,//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //2710h:1fps -{0x0F12, 0x2710,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //2710h:1fps -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0100,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, //lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,}, //_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, - -// METERING -{0x002A, 0x1492,}, // Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x3218,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000A46 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0250,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInCap - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,}, //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,}, //[15:8]fadlc_filter_co_b, [7:0]fadlc_filter_co_a -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //0A20//senHal_uMinColsBin -{0x0F12, 0x06C8,}, //0AB0//senHal_uMinColsNoBin - -// SLOW AE -{0x002A, 0x1568,}, -{0x0F12, 0x0010,}, //ae_GainIn_0_ -{0x0F12, 0x0020,}, //ae_GainIn_1_ -{0x0F12, 0x0040,}, //ae_GainIn_2_ -{0x0F12, 0x0080,}, //ae_GainIn_3_ -{0x0F12, 0x0100,}, //ae_GainIn_4_ FIX -{0x0F12, 0x0200,}, //ae_GainIn_5_ -{0x0F12, 0x0400,}, //ae_GainIn_6_ -{0x0F12, 0x0800,}, //ae_GainIn_7_ -{0x0F12, 0x2000,}, //ae_GainIn_8_ -{0x0F12, 0x0010,}, //ae_GainOut_0_ -{0x0F12, 0x0020,}, //ae_GainOut_1_ -{0x0F12, 0x0040,}, //ae_GainOut_2_ -{0x0F12, 0x0080,}, //ae_GainOut_3_ -{0x0F12, 0x0100,}, //ae_GainOut_4_ FIX -{0x0F12, 0x0200,}, //ae_GainOut_5_ -{0x0F12, 0x0400,}, //ae_GainOut_6_ -{0x0F12, 0x0800,}, //ae_GainOut_7_ -{0x0F12, 0x2000,}, //ae_GainOut_8_ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, //lt_uLimitHigh -{0x0F12, 0x00EF,}, //lt_uLimitLow - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,}, //lt_uInitPostToleranceCnt - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,}, //lt_uSlowFilterCoef - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,}, //TNP_Regs_BUse1FrameAE (0: off, 1: on) - -// SLOW AWB -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, //0258 awbb_GainsMaxMove - -//AWB Convergence Speed -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, // on/off AFIT by NB option -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2818,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000A46 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,}, //lt_ExpGain_ExpCurveGainMaxStr -// FOR HD CAMCORDER -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInCa - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //1280 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight //960 -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, - -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, - -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, - -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, - -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0017,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1700,}, // 16 start number of table 00 End number of table -{0x002A, 0x15DA,}, -{0x0F12, 0x1700,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, // fls_FlashWP_0_Pre_Flash_Start -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, //fls_afl_FlashWP_Weight_0_Pre_Flash_end -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, //fls_afl_FlashMode:Flash alg start -{0x0F12, 0x0001,}, -{0x002A, 0x180C,}, //fls_afl_FlashWP_Weight_4:flash br avg -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, //fls_afl_FlashMode Flash alg end -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, //fls_afl_FlashMode Flash alg end -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, //fls_afl_FlashMode Flash alg end -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, //usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x0266,}, // -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, // -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, // -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, // -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xF132,}, -{0x0F12, 0x0006,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0000,}, //110404 AE haunting -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, //usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 // 014Ah:30fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_15[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02B4,}, -{0x0F12, 0x0012,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //029Ah:15fps -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - -/* -* S5E4ECGX sensor has a known issue of non-performance in 60 Hz. -* Make the setting same as 50Hz -*/ -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_60hz_auto[] = -{ - { 0x002A, 0x0F30, }, - { 0x0F12, 0x0001, }, ///*AFC_D_ConvAccelerPower */ - { 0x002A, 0x0F2A, }, - { 0x0F12, 0x0000, }, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_50hz_auto[] = -{ - { 0x002A, 0x0F30, }, - { 0x0F12, 0x0001, }, ///*AFC_D_ConvAccelerPower */ - { 0x002A, 0x0F2A, }, - { 0x0F12, 0x0000, }, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, //Delay 100ms -{0x002C, 0xD000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_640_480[]= -{ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //senHal_uMinColsBin -{0x0F12, 0x06C8,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //REG_TC_GP_PrevReqInputWidth //2576 -{0x0F12, 0x078C,}, //REG_TC_GP_PrevReqInputHeight //1932 -{0x0F12, 0x0008,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2576)/2 -{0x0F12, 0x0006,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1932)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2576 -{0x0F12, 0x078C,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1932 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, //REG_0TC_PCFG_usWidth //640 -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usHeight //480 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_720[]={ -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, - -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x07DC,}, //senHal_uMinColsBin -{0x0F12, 0x05C0,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //REG_TC_GP_PrevReqInputWidth //2576 -{0x0F12, 0x05A0,}, //REG_TC_GP_PrevReqInputHeight //1440 -{0x0F12, 0x0008,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2576)/2 -{0x0F12, 0x00FC,}, //REG_TC_GP_PrevInputHeightOfs/(1944-1440)/2 -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2576 -{0x0F12, 0x05A0,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1440 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //1280 -{0x0F12, 0x02D0,}, //REG_0TC_PCFG_usHeight //720 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_960[]={ -{0xFCFC, 0xD000,}, - -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, - -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin - -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //0A20//senHal_uMinColsBin -{0x0F12, 0x06C8,}, //0AB0//senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //REG_TC_GP_PrevReqInputWidth //2576 -{0x0F12, 0x078C,}, //REG_TC_GP_PrevReqInputHeight //1932 -{0x0F12, 0x0008,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2576)/2 -{0x0F12, 0x0006,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1932)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2576 -{0x0F12, 0x078C,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1932 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //1280 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight //960 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_stop_stream[]={ -{0x0028, 0x7000,}, -{0x002A, 0x023E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -{0xFFFF, 0x000A,}, //Delay 10ms -}; - -#endif - diff --git a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_yuv.c b/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_yuv.c deleted file mode 100755 index 87e1f294dabc..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/s5k4ecgx_yuv.c +++ /dev/null @@ -1,1587 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -//#define NO_BURST // Enable no burst mode for Tunning - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#define NO_BURST // Enable no burst mode for Tunning -#endif - -#include "s5k4ecgx.h" - -#if defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "s5k4ecgx_regs_gte.h" -#elif defined(CONFIG_SEC_J1X_PROJECT) -#include "s5k4ecgx_regs_j1x.h" -#else -#include "s5k4ecgx_regs.h" -#endif - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifdef CONFIG_LOAD_FILE -#define S5K4ECGX_WRITE_LIST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#elif defined(NO_BURST) - -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) S5K4ECGX_WRITE_LIST(A) -#else -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_sensor_burst_write(s_ctrl, A, ARRAY_SIZE(A)); \ -CDBG("REGSEQ *** BURST %s", #A) -#endif - -#define S5K4ECGX_WRITE_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) - -#define S5K4ECGX_READ_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *s5k4ecgx_regs_table; -static int s5k4ecgx_regs_table_size; -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void s5k4ecgx_regs_table_init(char *filename); -void s5k4ecgx_regs_table_exit(void); -#endif - -static struct s5k4ecgx_ctrl s5k4ecgx_ctrl; - -#if 1 -extern uint16_t rear_vendor_id; -#endif - -#if !defined(CONFIG_SEC_J1X_PROJECT) -#define set_led_flash(x) do{}while(0) -#endif - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - const char *sensor_name = NULL; - struct msm_camera_slave_info *slave_info = NULL; - struct msm_camera_i2c_client *sensor_i2c_client = NULL; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; - - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - - - printk("%s:%d sensor[%s] sid = 0x%X sensorid = 0x%X DATA TYPE = %d\n E", - __func__, __LINE__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_vendor_id_read_prep); - - rear_vendor_id = 0; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, 0xA006 /*slave_info->sensor_id_reg_addr*/, - &chipid, data_type); - - if (chipid) - rear_vendor_id = (chipid & 0xFF00); - else - goto out; - - chipid = 0; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, 0xA007 /*slave_info->sensor_id_reg_addr*/, - &chipid, data_type); - - if (chipid) - rear_vendor_id |= ((chipid & 0xFF00) >> 8); - - if (rear_vendor_id != slave_info->sensor_id) { - pr_err("%s:%d sensor_id doesnot match Read[0x%4x] Expected[0x%4x]\n", - __func__, __LINE__, rear_vendor_id, slave_info->sensor_id); - } - - return 0; -out: - pr_err("%s:%d sensor_id read error.\n", __func__, __LINE__); - rear_vendor_id = 0xFFFF; - return 0; -} - -#if 1 -int32_t s5k4ecgx_sensor_burst_write(struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size) -{ - int i; - int idx = 0; - int burst_flag = 0; - int err = -EINVAL; - uint16_t subaddr; - uint16_t value; - static uint8_t burst_data[BURST_MODE_BUFFER_MAX_SIZE * 2] = {0}; - - // burst write related variables - struct msm_camera_i2c_burst_reg_array burst_reg_setting = { 0 ,}; - struct msm_camera_i2c_reg_setting conf_array = { - .reg_setting = (void * ) &burst_reg_setting, - .size = 1, - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, - .data_type = MSM_CAMERA_I2C_BURST_DATA, - }; - - CDBG("E"); - - // read the register settings array - for (i = 0; i < size; ++i) { - if (idx >= BURST_MODE_BUFFER_MAX_SIZE) { - burst_flag = 0; - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx * 2; - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", __func__, __LINE__); - goto on_error; - } - } - - // the register address - subaddr = reg_settings[i].reg_addr; - - // the register value - value = reg_settings[i].reg_data; - - if (burst_flag == 0) { - if ( (subaddr == BURST_REG) && \ - (reg_settings[i+1].reg_addr == BURST_REG)) { - //burst mode start - burst_flag = 1; - burst_reg_setting.reg_addr = subaddr; - /* MSB has to go 1st for I2C write */ - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - continue; - } - - // write the register setting - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client, subaddr, \ - value, MSM_CAMERA_I2C_WORD_DATA); - - } else if (burst_flag == 1) { - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - if ((subaddr == BURST_REG) && (i + 1 >= size || \ - (reg_settings[i+1].reg_addr != BURST_REG))) { - // burst mode end. - burst_flag = 0; - - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx * 2; - - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", \ - __func__, __LINE__); - goto on_error; - } - } - } - } - -on_error: - if (unlikely(err < 0)) { - pr_err("[%s:%d] register set failed\n", __func__, __LINE__); - } - CDBG("X"); - return err; -} -#endif - -int32_t s5k4ecgx_set_ae_awb(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - if (mode) { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 0) { - CDBG("AWB_AE_LOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_lock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 1; - } - } else { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 1) { - CDBG("AWB_AE_UNLOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_unlock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 0; - } - } - - return 0; -} - - -int32_t s5k4ecgx_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - - -void s5k4ecgx_set_exposure_camcorder(struct msm_sensor_ctrl_t *s_ctrl,unsigned int mode) -{ - - CDBG("CAMSET CAMCORDER -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - break; - } - -} - -int32_t s5k4ecgx_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- effect is %d", mode); - - switch (mode) { - case CAMERA_EFFECT_OFF: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Normal); - break; - - case CAMERA_EFFECT_MONO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Mono); - break; - - case CAMERA_EFFECT_NEGATIVE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Negative); - break; - - case CAMERA_EFFECT_SEPIA: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Sepia); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- scene is %d", mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Default); - - switch (mode) { - case CAMERA_SCENE_AUTO: - break; - - case CAMERA_SCENE_LANDSCAPE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Landscape); - break; - - case CAMERA_SCENE_DAWN: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Duskdawn); - break; - - case CAMERA_SCENE_BEACH: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Beach_Snow); - break; - - case CAMERA_SCENE_SUNSET: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sunset); - break; - - case CAMERA_SCENE_NIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Nightshot); - break; - - case CAMERA_SCENE_PORTRAIT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Portrait); - break; - - case CAMERA_SCENE_AGAINST_LIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Backlight); - break; - - case CAMERA_SCENE_SPORT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sports); - break; - - case CAMERA_SCENE_FALL: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fall_Color); - break; - - case CAMERA_SCENE_TEXT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Text); - /*S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_1); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_2); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_3); - msleep(100);*/ - break; - - case CAMERA_SCENE_CANDLE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Candle_Light); - break; - - case CAMERA_SCENE_FIRE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fireworks); - break; - - case CAMERA_SCENE_PARTY: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Party_Indoor); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - uint16_t value = 0; - CDBG("CAMSET -- WB is %d", mode); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x04E6); - S5K4ECGX_READ_ADDR(0x0F12, &value); - - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, 0x04E6); - - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - - value |= (0x1 << 3); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Auto); - break; - - case CAMERA_WHITE_BALANCE_INCANDESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Tungsten); - break; - - case CAMERA_WHITE_BALANCE_FLUORESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Fluorescent); - break; - - case CAMERA_WHITE_BALANCE_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Sunny); - break; - - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- metering is %d", mode); - - switch (mode) { - case CAMERA_CENTER_WEIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Center); - break; - - case CAMERA_AVERAGE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Matrix); - break; - - case CAMERA_SPOT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Spot); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- iso is %d", mode); - - switch (mode) { - case CAMERA_ISO_MODE_AUTO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_Auto); - break; - case CAMERA_ISO_MODE_50: - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_50); - break; - case CAMERA_ISO_MODE_100: - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_100); - break; - case CAMERA_ISO_MODE_200: - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_200); - break; - case CAMERA_ISO_MODE_400: - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_400); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_get_light_level(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short cur_lux = 0; - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C18); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR( 0x0F12,&msb); - cur_lux = (msb << 16) | lsb; - return cur_lux; -} - -int32_t s5k4ecgx_get_flash_status(void) -{ - int flash_status = 0; - if ( ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) && (s5k4ecgx_ctrl.settings.lowLight) ) - || (s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_ON)){ - flash_status = 1; - } - CDBG("flash_status = %d", flash_status); - return flash_status; -} - -void s5k4ecgx_check_ae_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short ae_stable = 0; - int ae_count = 0; - - while (ae_count++ < 7) { - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C74); - S5K4ECGX_READ_ADDR(0x0F12, &ae_stable); - if (ae_stable == 0x01) { - CDBG("ae_stabel count[%d]\n", ae_count); - break; - } - msleep(30); - } - if (ae_count > 7) { - CDBG("AE NOT STABLE"); - } -} - -int32_t s5k4ecgx_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- focus mode is %d", mode); - - switch (mode) { - case CAMERA_AF_OCR: - case CAMERA_AF_MACRO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_macro_af); - break; - case CAMERA_AF_AUTO: - default: - CDBG("default mode is auto\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_normal_af); - } - return rc; -} - -int32_t s5k4ecgx_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos) -{ - int32_t rc = SENSOR_AF_CANCEL; - CDBG("CAMSET -- set_af_status %d, init_pos =%d", status, initial_pos); - if (status == SENSOR_AF_START) { - unsigned int cur_lux = 0; - CDBG("S5K4ECGX_AF_START"); - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("AF light level = %d", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 1; - } else { - CDBG("NORMAL LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - s5k4ecgx_ctrl.settings.is_preflash = 1; - CDBG("Turn on the pre-flash\n"); - set_led_flash(MSM_CAMERA_LED_LOW); - rc = SENSOR_AF_PRE_FLASH_ON; - } else { - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - } - - } else if ( (status == SENSOR_AF_PRE_FLASH_OFF) ) { - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - else { - if (s5k4ecgx_ctrl.settings.is_touchaf == 1) { - CDBG("Check & unlock AE/AWB in Autofocus Finish\n"); -#if defined(CONFIG_SEC_J1X_PROJECT) - /* This is end. Reset Touch AF */ - s5k4ecgx_ctrl.settings.is_touchaf = 0; - - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 1) -#endif - { - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - } - } - - rc = SENSOR_AF_PRE_FLASH_OFF; - } else if (status == SENSOR_AF_PRE_FLASH_AE_STABLE && - s5k4ecgx_ctrl.settings.is_preflash == 1) { - - s5k4ecgx_check_ae_stable(s_ctrl); - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - - } else { - - CDBG("S5K4ECGX_AF_ABORT\n"); - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - rc = SENSOR_AF_CANCEL; - } - - return rc; -} - -int32_t s5k4ecgx_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, int is_search_status) -{ - unsigned short af_status = 0; - CDBG("is_search_status %d", is_search_status); - switch (is_search_status) { - case 0: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2EEE); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("1st AF status : %x\n", af_status); - break; - case 1: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2207); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("2nd AF status : %d", af_status); - break; - default: - CDBG("unexpected mode is coming from HAL"); - break; - } - CDBG("return_af_status = %d", af_status); - return af_status; -} - -int32_t s5k4ecgx_touchaf_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, - unsigned int addr, unsigned int value) -{ - S5K4ECGX_WRITE_ADDR(0xFCFC, 0xD000); - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, addr); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - return 0; -} - -int32_t s5k4ecgx_set_touchaf_pos(struct msm_sensor_ctrl_t *s_ctrl, - struct ioctl_native_cmd *info) -{ - static unsigned short inWindowWidth = 288; - static unsigned short inWindowHeight = 216; - static unsigned short outWindowWidth = 640; - static unsigned short outWindowHeight = 400; - int x = info->value_1; - int y = info->value_2; - - unsigned short previewWidth = info->address; - unsigned short previewHeight = info->value_3; - - CDBG("s5k4ecgx_set_touchaf_pos (%d, %d) previewRes(%ux%u)",x, y, previewWidth, previewHeight); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x02A0); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowHeight); - CDBG("[i2c read] inWindowWidth = %d, inWindowHeight = %d\n", inWindowWidth, inWindowHeight); - - inWindowWidth = inWindowWidth * previewWidth / 1024; - inWindowHeight = inWindowHeight * previewHeight / 1024; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x0298); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowHeight); - CDBG("[i2c read] outWindowWidth = %d, outWindowHeight = %d\n", outWindowWidth, outWindowHeight); - - - outWindowWidth = outWindowWidth * previewWidth / 1024; - outWindowHeight = outWindowHeight * previewHeight / 1024; - - if (x < inWindowWidth/2) - x = inWindowWidth/2+1; - else if (x > previewWidth - inWindowWidth/2) - x = previewWidth - inWindowWidth/2 -1; - if (y < inWindowHeight/2) - y = inWindowHeight/2+1; - else if (y > previewHeight - inWindowHeight/2) - y = previewHeight - inWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029C, (x - inWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029E, (y - inWindowHeight/2) * 1024 / previewHeight); - - if (x < outWindowWidth/2) - x = outWindowWidth/2+1; - else if (x > previewWidth - outWindowWidth/2) - x = previewWidth - outWindowWidth/2 -1; - if (y < outWindowHeight/2) - y = outWindowHeight/2+1; - else if (y > previewHeight - outWindowHeight/2) - y = previewHeight - outWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0294, (x - outWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0296, (y - outWindowHeight/2) * 1024 / previewHeight); - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x02A4, 0x0001); - - return 0; -} - -int32_t s5k4ecgx_wait_preview_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured == 0x0100 && try <= 50); - - - if (is_captured == 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - - CDBG("try[%d] is_captured(0x%x)\n", try, is_captured); - - return 0; -} - -int32_t s5k4ecgx_wait_capture_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured != 0x0100 && try <= 50); - - - if (is_captured != 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - CDBG("try[%d]\n", try); - - return 0; -} - -int32_t s5k4ecgx_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short analog_gain; - unsigned short digital_gain; - unsigned int iso_value; - unsigned int temp; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC0); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR(0x0F12, &msb); - - temp = ((msb << 16) + lsb); - if ( temp != 0) - s5k4ecgx_ctrl.exif_shutterspeed = 400000 / temp; - else - s5k4ecgx_ctrl.exif_shutterspeed = 0; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC4); - S5K4ECGX_READ_ADDR(0x0F12, &analog_gain); - S5K4ECGX_READ_ADDR(0x0F12, &digital_gain); - - iso_value =(unsigned int) ( analog_gain * digital_gain ) / 256 / 2; - if (iso_value < 0xD0) - s5k4ecgx_ctrl.exif_iso = 50; - else if(iso_value < 0x1A0) - s5k4ecgx_ctrl.exif_iso = 100; - else if(iso_value < 0x374) - s5k4ecgx_ctrl.exif_iso = 200; - else - s5k4ecgx_ctrl.exif_iso = 400; - - CDBG("shutter_speed = %d, ISO = %d, iso_value = 0x%x", - s5k4ecgx_ctrl.exif_shutterspeed, s5k4ecgx_ctrl.exif_iso, iso_value); - return 0; -} - - -int32_t s5k4ecgx_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = s5k4ecgx_ctrl.exif_iso; - exif_info->value_3 = s5k4ecgx_ctrl.exif_shutterspeed; - return 0; -} - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO \n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_init("/data/s5k4ecgx_regs.h"); - pr_err("/data/s5k4ecgx_yuv.h inside CFG_SET_INIT_SETTING\n"); -#endif - rc = S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_init_regs); - break; - case CFG_SET_RESOLUTION: - s5k4ecgx_ctrl.settings.resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d\n " , s5k4ecgx_ctrl.settings.resolution); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - if (s5k4ecgx_get_flash_status()) { - // Allow actuator and pre-flash to settle down - msleep(500); - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else if ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) - && (!s5k4ecgx_ctrl.settings.lowLight)) { - unsigned short cur_lux; - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("light level = %d\n", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX\n"); - s5k4ecgx_ctrl.settings.lowLight = 1; - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_snapshot_regs); - s5k4ecgx_wait_capture_stable(s_ctrl); - s5k4ecgx_set_exif(s_ctrl); - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_CAPTURE){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - } - s5k4ecgx_wait_preview_stable(s_ctrl); - } - - break; - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM\n"); - if(s5k4ecgx_get_flash_status() ){ - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - } - - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.settings.is_preflash == 1) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - if(s5k4ecgx_ctrl.settings.scenemode == CAMERA_SCENE_AUTO){ - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - } - - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_1280_960); - msleep(50); - S5K4ECGX_WRITE_LIST(s5k4ecgx_stop_stream); - } - - break; - case CFG_SET_START_STREAM: - CDBG("CFG_SET_START_STREAM"); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - set_led_flash(MSM_CAMERA_LED_LOW); - msleep(380); - s5k4ecgx_check_ae_stable(s_ctrl); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_30); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder); - s5k4ecgx_set_exposure_camcorder(s_ctrl,s5k4ecgx_ctrl.settings.exposure); - - if (s5k4ecgx_ctrl.settings.resolution == MSM_SENSOR_RES_5) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_640_480); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_1280_720); - } - - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - CDBG("prev_mode = %d\n", s5k4ecgx_ctrl.prev_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if ((s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_RECORDING)) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_auto); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder_disable); - s5k4ecgx_set_exposure_compensation(s_ctrl, - s5k4ecgx_ctrl.settings.exposure); - } - - if (s5k4ecgx_ctrl.streamon == 0) { - s5k4ecgx_set_exposure_compensation(s_ctrl, - s5k4ecgx_ctrl.settings.exposure); - - s5k4ecgx_set_white_balance(s_ctrl, - s5k4ecgx_ctrl.settings.wb); - - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - - if(cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_anti_banding_50hz_auto); - } else if(cdata->flicker_type == MSM_CAM_FLICKER_60HZ) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_anti_banding_60hz_auto); - } - - } - - switch (s5k4ecgx_ctrl.fixed_fps_val) - { - case 15000: - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_15); - break; - case 30000: - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_30); - break; - default: - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_auto); - } - - s5k4ecgx_ctrl.streamon = 1; - } - - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - CDBG("CFG_SET_SLAVE_INFO \n"); - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - CDBG("CFG_SET_SLAVE_INFO EXIT \n"); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP \n"); - s5k4ecgx_ctrl.streamon = 0; - s5k4ecgx_ctrl.op_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.prev_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - s5k4ecgx_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - s5k4ecgx_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - s5k4ecgx_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - s5k4ecgx_ctrl.settings.effect = CAMERA_EFFECT_OFF; - s5k4ecgx_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - s5k4ecgx_ctrl.settings.flash_mode = CAMERA_FLASH_OFF; - s5k4ecgx_ctrl.settings.lowLight = 0; - s5k4ecgx_ctrl.settings.is_touchaf = 0; - s5k4ecgx_ctrl.settings.is_preflash = 0; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN \n"); - - - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_focus_mode_auto); - - /* Actuator softlanding */ - if (s5k4ecgx_ctrl.settings.focus_mode == CAMERA_AF_MACRO) - { - /* 250ms sleep is not sufficient for AF to settle */ - msleep(400); - } - else - { - msleep(100); - } - - /* Required for 3rd Party Tourch Light Mode */ - set_led_flash(MSM_CAMERA_LED_OFF); - - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; - -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING \n"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - - - - -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - /*pr_err("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3);*/ - switch (cam_info->mode) { - case EXT_CAM_EV: - s5k4ecgx_ctrl.settings.exposure = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_exposure_compensation(s_ctrl, s5k4ecgx_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - s5k4ecgx_ctrl.settings.wb = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_white_balance(s_ctrl, s5k4ecgx_ctrl.settings.wb); - break; - case EXT_CAM_METERING: - s5k4ecgx_ctrl.settings.metering = (cam_info->value_1); - s5k4ecgx_set_metering(s_ctrl, s5k4ecgx_ctrl.settings.metering); - break; - case EXT_CAM_ISO: - s5k4ecgx_ctrl.settings.iso = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - break; - case EXT_CAM_EFFECT: - s5k4ecgx_ctrl.settings.effect = (cam_info->value_1); - s5k4ecgx_set_effect(s_ctrl, s5k4ecgx_ctrl.settings.effect); - break; - case EXT_CAM_SCENE_MODE: - s5k4ecgx_ctrl.settings.scenemode = (cam_info->value_1); - s5k4ecgx_set_scene_mode(s_ctrl, s5k4ecgx_ctrl.settings.scenemode); -#if !defined(CONFIG_SEC_J1X_PROJECT) - // During Camera Init time two times below setting are Executting - /* setting scene mode is resetting EV,ISO & WB - so re-applying it again */ - s5k4ecgx_set_exposure_compensation(s_ctrl, s5k4ecgx_ctrl.settings.exposure); - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - s5k4ecgx_set_white_balance(s_ctrl, s5k4ecgx_ctrl.settings.wb); -#endif - - break; - case EXT_CAM_SENSOR_MODE: - s5k4ecgx_ctrl.prev_mode = s5k4ecgx_ctrl.op_mode; - s5k4ecgx_ctrl.op_mode = (cam_info->value_1); - CDBG("EXT_CAM_SENSOR_MODE = %d", s5k4ecgx_ctrl.op_mode); - break; - case EXT_CAM_FOCUS: - s5k4ecgx_ctrl.settings.focus_mode = (cam_info->value_1); - /*CDBG("EXT_CAM_FOCUS focus mode = %d\n ", s5k4ecgx_ctrl.settings.focus_mode);*/ - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - break; - case EXT_CAM_SET_AF_STATUS: - /*CDBG("EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2);*/ - cam_info->value_1 = s5k4ecgx_set_af_status(s_ctrl, cam_info->value_1, - cam_info->value_2); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_SET_TOUCHAF_POS: - /*CDBG("EXT_CAM_SET_TOUCHAF_POS: %d : %d", cam_info->value_1, cam_info->value_2);*/ - if(cam_info->value_1 !=0 && cam_info->value_2 != 0) { - s5k4ecgx_set_touchaf_pos(s_ctrl, cam_info); - s5k4ecgx_ctrl.settings.is_touchaf = 1; - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_reset_touchaf); - s5k4ecgx_ctrl.settings.is_touchaf = 0; - } - break; - case EXT_CAM_GET_AF_STATUS: - /*CDBG("EXT_CAM_GET_AF_STATUS: %d\n", cam_info->value_1);*/ - cam_info->value_1 = s5k4ecgx_get_af_status(s_ctrl, cam_info->value_1); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_FLASH_MODE: - /*CDBG("EXT_CAM_FLASH_MODE = %d\n", (cam_info->value_1));*/ - s5k4ecgx_ctrl.settings.flash_mode = (cam_info->value_1); - if((cam_info->value_1) == CAMERA_FLASH_TORCH) { - set_led_flash(MSM_CAMERA_LED_LOW); - } else { - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_SET_FLASH: - CDBG("EXT_CAM_SET_FLASH = %d\n", (cam_info->value_1)); - if( cam_info->value_1 && s5k4ecgx_get_flash_status() ){ - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_EXIF: - s5k4ecgx_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB = %d\n", (cam_info->value_1)); - if (!s5k4ecgx_ctrl.settings.flash_mode) - s5k4ecgx_set_ae_awb(s_ctrl, cam_info->value_1); - break; - - case EXT_CAM_CONTRAST: - CDBG("EXT_CAM_CONTRAST isn't supported \n"); - break; - case EXT_CAM_FPS_RANGE: - if (cam_info->value_1 > 0) - s5k4ecgx_ctrl.fixed_fps_val = cam_info->value_1; - else - s5k4ecgx_ctrl.fixed_fps_val = 0; - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_LOAD_FILE -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[7], data_buf1[7]; - *(reg_buf + 6) = '\0'; - *(data_buf1 + 6) = '\0'; - printk("PHANI.....Inside Modified Tuning s5k4ecgx_regs_from_sd_tunning\n"); - if (settings != NULL){ - pr_err("s5k4ecgx_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(s5k4ecgx_regs_table == NULL) { - pr_err("s5k4ecgx_regs_table is null "); - return -1; - } - pr_err("@@@ %s \n",name); - start = strstr(s5k4ecgx_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf1, (reg + 9), 6); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error in reg_buf .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error in data_buf1 .Please Align contents of the Header file!!"); - if (reg) - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - pr_err("delay = %d\n", (int)value); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - pr_err("s5k4ecgx_regs_from_sd_tunning end!"); - return rc; -} -void s5k4ecgx_regs_table_exit(void) -{ - printk("%s %d", __func__, __LINE__); - if (s5k4ecgx_regs_table) { - vfree(s5k4ecgx_regs_table); - s5k4ecgx_regs_table = NULL; - } -} -void s5k4ecgx_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - filp_close(filp, current->files); - set_fs(fs); - pr_err("coming to if part of string compare s5k4ecgx_regs_table"); - s5k4ecgx_regs_table = dp; - s5k4ecgx_regs_table_size = lsize; - *((s5k4ecgx_regs_table + s5k4ecgx_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sp1628.c b/drivers/media/platform/msm/camera_v2/sensor/sp1628.c deleted file mode 100644 index 6cd06582fb36..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sp1628.c +++ /dev/null @@ -1,992 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -#define CONFIG_MSMB_CAMERA_DEBUG - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define SP1628_SENSOR_NAME "sp1628" -DEFINE_MSM_MUTEX(sp1628_mut); - -static struct msm_sensor_ctrl_t sp1628_s_ctrl; - -static struct msm_sensor_power_setting sp1628_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 5, - }, -}; - -static struct msm_camera_i2c_reg_conf sp1628_start_settings[] = { - {0x92, 0x81}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_stop_settings[] = { - {0x92, 0x01}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_recommend_settings[] = { - {0xfd, 0x00,}, - {0x91, 0x00,}, - {0x92, 0x81,}, - {0x98, 0x2a,}, - {0x96, 0xd0,}, /* c0*/ - {0x97, 0x02,}, /* 03*/ - {0x2f, 0x20,}, /* 24M*3=72M*/ - {0x0b, 0x48,}, /* analog*/ - {0x30, 0x80,}, /* 00*/ - {0x0c, 0x66,}, /* analog*/ - {0x0d, 0x12,}, - {0x13, 0x0f,}, /* 10*/ - {0x14, 0x00,}, - {0x12, 0x00,}, - {0x6b, 0x10,}, /* 11*/ - {0x6c, 0x00,}, - {0x6d, 0x00,}, - {0x6e, 0x00,}, - {0x6f, 0x10,}, /* 11*/ - {0x73, 0x11,}, /* 12*/ - {0x7a, 0x10,}, /* 11*/ - {0x15, 0x17,}, /* 18*/ - {0x71, 0x18,}, /* 19*/ - {0x76, 0x18,}, /* 19*/ - {0x29, 0x08,}, - {0x18, 0x01,}, - {0x19, 0x10,}, - {0x1a, 0xc3,}, /* c1*/ - {0x1b, 0x6f,}, - {0x1d, 0x11,}, /* 01*/ - {0x1e, 0x00,}, /* 1e*/ - {0x1f, 0x80,}, - {0x20, 0x7f,}, - {0x22, 0x3c,}, /* 1b*/ - {0x25, 0xff,}, - {0x2b, 0x88,}, - {0x2c, 0x85,}, - {0x2d, 0x00,}, - {0x2e, 0x80,}, - {0x27, 0x38,}, - {0x28, 0x03,}, - {0x70, 0x1a,}, - {0x72, 0x18,}, /* 1a*/ - {0x74, 0x18,}, - {0x75, 0x18,}, - {0x77, 0x16,}, /* 18*/ - {0x7f, 0x19,}, - {0x31, 0x11,}, /* 720P, no mirror/flip */ - {0xfd, 0x01,}, - {0x5d, 0x11,}, /* position*/ - {0x5f, 0x00,}, - {0x36, 0x08,}, - {0x2f, 0xff,}, - {0xfb, 0x25,}, /* blacklevl*/ - {0x48, 0x00,}, /* dp*/ - {0x49, 0x99,}, - {0xf2, 0x0A,}, - {0xfd, 0x02,}, /* AE*/ - {0x52, 0x34,}, - {0x53, 0x02,}, - {0x54, 0x0c,}, - {0x55, 0x08,}, - {0x86, 0x0c,}, - {0x87, 0x10,}, - {0x8b, 0x10,}, - - /* 12-30 50Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x05,}, - {0x04, 0x64,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x02,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xe6,}, - {0xf8, 0xc1,}, - {0x02, 0x08,}, - {0x03, 0x01,}, - {0x06, 0xe6,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x30,}, - {0xbf, 0x07,}, - {0xd0, 0x30,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x30,}, - {0xfd, 0x00,}, - - /* 12-30 60Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x04,}, - {0x04, 0x80,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x01,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xc0,}, - {0xf8, 0xc1,}, - {0x02, 0x0a,}, - {0x03, 0x01,}, - {0x06, 0xc0,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x80,}, - {0xbf, 0x07,}, - {0xd0, 0x80,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x80,}, - {0xfd, 0x00,}, - - {0xfd, 0x01,}, /* fix status*/ - {0x5a, 0x38,}, /* DP_gain*/ - {0xfd, 0x02,}, - {0xba, 0x30,}, /* mean_dummy_low*/ - {0xbb, 0x50,}, /* mean_low_dummy*/ - {0xbc, 0xc0,}, /* rpc_heq_low*/ - {0xbd, 0xa0,}, /* rpc_heq_dummy*/ - {0xb8, 0x80,}, /* mean_nr_dummy*/ - {0xb9, 0x90,}, /* mean_dummy_nr*/ - {0xfd, 0x01,}, /* rpc*/ - {0xe0, 0x54,}, - {0xe1, 0x40,}, - {0xe2, 0x38,}, - {0xe3, 0x34,}, - {0xe4, 0x34,}, - {0xe5, 0x30,}, - {0xe6, 0x30,}, - {0xe7, 0x2e,}, - {0xe8, 0x2e,}, - {0xe9, 0x2e,}, - {0xea, 0x2c,}, - {0xf3, 0x2c,}, - {0xf4, 0x2c,}, - {0xfd, 0x01,}, /* min gain*/ - {0x04, 0xc0,}, /* rpc_max_indr*/ - {0x05, 0x2c,}, /* rpc_min_indr*/ - {0x0a, 0xc0,}, /* rpc_max_outdr*/ - {0x0b, 0x2c,}, /* rpc_min_outdr*/ - {0xfd, 0x01,}, /* ae target*/ - {0xeb, 0x78,}, - {0xec, 0x78,}, - {0xed, 0x05,}, - {0xee, 0x0a,}, - {0xfd, 0x01,}, /* lsc*/ - {0x26, 0x30,}, - {0x27, 0xdc,}, - {0x28, 0x05,}, - {0x29, 0x08,}, - {0x2a, 0x00,}, - {0x2b, 0x03,}, - {0x2c, 0x00,}, - {0x2d, 0x2f,}, - {0xfd, 0x01,}, /* RGainf*/ - {0xa1, 0x37,}, /* left*/ - {0xa2, 0x26,}, /* right*/ - {0xa3, 0x32,}, /* up*/ - {0xa4, 0x2b,}, /* down*/ - {0xad, 0x0f,}, /* lu*/ - {0xae, 0x0a,}, /* ru*/ - {0xaf, 0x0a,}, /* ld*/ - {0xb0, 0x0a,}, /* rd*/ - {0x18, 0x2f,}, /* left*/ - {0x19, 0x30,}, /* right*/ - {0x1a, 0x32,}, /* up*/ - {0x1b, 0x30,}, /* down*/ - {0xbf, 0xa5,}, /* lu*/ - {0xc0, 0x12,}, /* ru*/ - {0xc1, 0x08,}, /* ld*/ - {0xfa, 0x00,}, /* rd*/ - {0xa5, 0x35,}, /* GGain*/ - {0xa6, 0x24,}, - {0xa7, 0x2e,}, - {0xa8, 0x25,}, - {0xb1, 0x00,}, - {0xb2, 0x04,}, - {0xb3, 0x00,}, - {0xb4, 0x00,}, - {0x1c, 0x24,}, - {0x1d, 0x23,}, - {0x1e, 0x2c,}, - {0xb9, 0x25,}, - {0x21, 0xa0,}, - {0x22, 0x13,}, - {0x23, 0x1c,}, - {0x24, 0x0d,}, - {0xa9, 0x2f,}, /* BGain*/ - {0xaa, 0x24,}, - {0xab, 0x2d,}, - {0xac, 0x24,}, - {0xb5, 0x00,}, - {0xb6, 0x00,}, - {0xb7, 0x00,}, - {0xb8, 0x00,}, - {0xba, 0x22,}, - {0xbc, 0x24,}, - {0xbd, 0x31,}, - {0xbe, 0x24,}, - {0x25, 0xa0,}, - {0x45, 0x08,}, - {0x46, 0x12,}, - {0x47, 0x09,}, - {0xfd, 0x01,}, /* awb*/ - {0x32, 0x15,}, - {0xfd, 0x02,}, - {0x26, 0xc9,}, - {0x27, 0x8b,}, - {0x1b, 0x80,}, - {0x1a, 0x80,}, - {0x18, 0x27,}, - {0x19, 0x26,}, - {0x2a, 0x01,}, - {0x2b, 0x10,}, - {0x28, 0xf8,}, - {0x29, 0x08,}, - - /* d65*/ - {0x66, 0x35,}, - {0x67, 0x60,}, - {0x68, 0xb0,}, - {0x69, 0xe0,}, - {0x6a, 0xa5,}, - - /* indoor*/ - {0x7c, 0x38,}, - {0x7d, 0x58,}, - {0x7e, 0xdb,}, - {0x7f, 0x13,}, - {0x80, 0xa6,}, - - /* cwftl84*/ - {0x70, 0x18,}, /* 2f*/ - {0x71, 0x4a,}, - {0x72, 0x08,}, - {0x73, 0x32,}, /* 24*/ - {0x74, 0xaa,}, - - /* tl84--F*/ - {0x6b, 0x02,}, /* 18*/ - {0x6c, 0x2a,}, /* 34*/ - {0x6d, 0x1e,}, /* 17*/ - {0x6e, 0x49,}, /* 32*/ - {0x6f, 0xaa,}, - - /* f--H*/ - {0x61, 0xea,}, /* 02*/ - {0x62, 0xf8,}, /* 2a*/ - {0x63, 0x4f,}, /* 1e*/ - {0x64, 0x5f,}, /* 49*/ - {0x65, 0x5a,}, /* aa*/ - - {0x75, 0x80,}, - {0x76, 0x09,}, - {0x77, 0x02,}, - {0x24, 0x25,}, - {0x0e, 0x16,}, - {0x3b, 0x09,}, - {0xfd, 0x02,}, /* sharp*/ - {0xde, 0x0f,}, - {0xd2, 0x0c,}, /* control black-white edge; 0 - bolder, f - thinner*/ - {0xd3, 0x0a,}, - {0xd4, 0x08,}, - {0xd5, 0x08,}, - {0xd7, 0x10,}, /* outline judgement*/ - {0xd8, 0x1d,}, - {0xd9, 0x32,}, - {0xda, 0x48,}, - {0xdb, 0x08,}, - {0xe8, 0x38,}, /* outline strength*/ - {0xe9, 0x38,}, - {0xea, 0x38,}, /* 30*/ - {0xeb, 0x38,}, /* 2*/ - {0xec, 0x60,}, - {0xed, 0x40,}, - {0xee, 0x38,}, /* 30*/ - {0xef, 0x38,}, /* 20*/ - {0xf3, 0x00,}, /* sharpness level of flat area*/ - {0xf4, 0x00,}, - {0xf5, 0x00,}, - {0xf6, 0x00,}, - {0xfd, 0x02,}, /* skin sharpen*/ - {0xdc, 0x04,}, /* skin de-sharpen*/ - {0x05, 0x6f,}, - {0x09, 0x10,}, - {0xfd, 0x01,}, /* dns*/ - {0x64, 0x22,}, /* 0 - max, 8 - min*/ - {0x65, 0x22,}, - {0x86, 0x20,}, /* threshold, 0 - min*/ - {0x87, 0x20,}, - {0x88, 0x20,}, - {0x89, 0x20,}, - {0x6d, 0x0f,}, - {0x6e, 0x0f,}, - {0x6f, 0x10,}, - {0x70, 0x10,}, - {0x71, 0x0d,}, - {0x72, 0x23,}, - {0x73, 0x23,}, /* 28*/ - {0x74, 0x23,}, /* 2a*/ - {0x75, 0x46,}, /* [7:4] strength of flat area, - [3:0]strength of un-flat area; - 0-max, 8-min*/ - {0x76, 0x36,}, - {0x77, 0x36,}, /* 25*/ - {0x78, 0x36,}, /* 12*/ - {0x81, 0x1d,}, /* 2x*/ - {0x82, 0x2b,}, /* 4x*/ - {0x83, 0x2b,}, /* 50; 8x*/ - {0x84, 0x2b,}, /* 80; 16x*/ - {0x85, 0x0a,}, /* 12/8reg0x81*/ - {0xfd, 0x01,}, /* gamma*/ - {0x8b, 0x00,}, /* 00; 00; 00;*/ - {0x8c, 0x0d,}, /* 02; 0b; 0b;*/ - {0x8d, 0x1f,}, /* 0a; 19; 17;*/ - {0x8e, 0x2d,}, /* 13; 2a; 27;*/ - {0x8f, 0x3a,}, /* 1d; 37; 35;*/ - {0x90, 0x4b,}, /* 30; 4b; 51;*/ - {0x91, 0x59,}, /* 40; 5e; 64;*/ - {0x92, 0x64,}, /* 4e; 6c; 74;*/ - {0x93, 0x70,}, /* 5a; 78; 80;*/ - {0x94, 0x83,}, /* 71; 92; 92;*/ - {0x95, 0x92,}, /* 85; a6; a2;*/ - {0x96, 0xa1,}, /* 96; b5; af;*/ - {0x97, 0xae,}, /* a6; bf; bb;*/ - {0x98, 0xba,}, /* b3; ca; c6;*/ - {0x99, 0xc4,}, /* c0; d2; d0;*/ - {0x9a, 0xcf,}, /* cb; d9; d9;*/ - {0x9b, 0xdb,}, /* d5; e1; e0;*/ - {0x9c, 0xe5,}, /* df; e8; e8;*/ - {0x9d, 0xec,}, /* e9; ee; ee;*/ - {0x9e, 0xf3,}, /* f2; f4; f4;*/ - {0x9f, 0xfa,}, /* fa; fa; fa;*/ - {0xa0, 0xff,}, /* ff; ff; ff;*/ - {0xfd, 0x02,}, /* CCM*/ - {0x15, 0xc8,}, /* b>th ab*/ - {0x16, 0x95,}, /* rdev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init sp1628_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&sp1628_platform_driver, - sp1628_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&sp1628_i2c_driver); -} - -static void __exit sp1628_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sp1628_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&sp1628_s_ctrl); - platform_driver_unregister(&sp1628_platform_driver); - } else - i2c_del_driver(&sp1628_i2c_driver); - return; -} - -int32_t sp1628_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* Write Recommend settings */ - pr_err("%s, sensor write init setting!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_recommend_settings, - ARRAY_SIZE(sp1628_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_RESOLUTION: - break; - case CFG_SET_STOP_STREAM: - pr_err("%s, sensor stop stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_stop_settings, - ARRAY_SIZE(sp1628_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - pr_err("%s, sensor start stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_start_settings, - ARRAY_SIZE(sp1628_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *)sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - - break; - } - case CFG_SET_CONTRAST: { - - break; - } - case CFG_SET_SHARPNESS: { - - break; - } - case CFG_SET_ISO: { - - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - - break; - } - case CFG_SET_EFFECT: { - - break; - } - case CFG_SET_ANTIBANDING: { - - break; - } - case CFG_SET_BESTSHOT_MODE: { - - break; - } - case CFG_SET_WHITE_BALANCE: { - - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int32_t sp1628_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - CDBG("%s, E. calling i2c_read:, i2c_addr:%d, id_reg_addr:%d", - __func__, - s_ctrl->sensordata->slave_info->sensor_slave_addr, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr); - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0x02, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x16:\n", __func__, chipid); - if (chipid != 0x16) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0xa0, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x28:\n", __func__, chipid); - if (chipid != 0x28) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - return rc; -} - - -static struct msm_sensor_fn_t sp1628_sensor_func_tbl = { - .sensor_config = sp1628_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sp1628_match_id, -}; - -static struct msm_sensor_ctrl_t sp1628_s_ctrl = { - .sensor_i2c_client = &sp1628_sensor_i2c_client, - .power_setting_array.power_setting = sp1628_power_setting, - .power_setting_array.size = ARRAY_SIZE(sp1628_power_setting), - .msm_sensor_mutex = &sp1628_mut, - .sensor_v4l2_subdev_info = sp1628_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(sp1628_subdev_info), - .func_tbl = &sp1628_sensor_func_tbl, -}; - -module_init(sp1628_init_module); -module_exit(sp1628_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20.h b/drivers/media/platform/msm/camera_v2/sensor/sr130pc20.h deleted file mode 100644 index 4085ab82d220..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - #ifndef __SR130PC20_H__ -#define __SR130PC20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef SR130PC20_DEBUG -#undef CDBG - -#define SR130PC20_DEBUG -#ifdef SR130PC20_DEBUG -#define CDBG(fmt, args...) printk("[SR130PC20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -void sr130pc20_set_default_settings(void); -int sr130pc20_sensor_match_id(struct msm_camera_i2c_client *sensor_i2c_client, - struct msm_camera_slave_info *slave_info, - const char *sensor_name); -#endif //__SR130PC20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv.c b/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv.c deleted file mode 100644 index 9951d35249da..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv.c +++ /dev/null @@ -1,706 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#endif - -#include "sr130pc20.h" - -#ifdef CONFIG_MACH_MILLETVEWIFI_EUR_OPEN -#define REG_SET_FILE "sr130pc20_yuv.h" -#else -#define REG_SET_FILE "sr130pc20_yuv_matisse.h" -#endif - -#include REG_SET_FILE - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifdef CONFIG_LOAD_FILE -#define SR130PC20_WRITE_LIST(A) \ - sr130pc20_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR130PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ ****** %s", #A) -#endif - -static struct yuv_ctrl sr130pc20_ctrl; -//static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr130pc20_regs_table; -static int sr130pc20_regs_table_size; -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr130pc20_regs_table_init(char *filename); -void sr130pc20_regs_table_exit(void); -#endif - -int32_t sr130pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M4); - break; - case CAMERA_EV_M3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M3); - break; - case CAMERA_EV_M2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M2); - break; - case CAMERA_EV_M1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_default); - break; - case CAMERA_EV_P1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P1); - break; - case CAMERA_EV_P2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P2); - break; - case CAMERA_EV_P3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P3); - break; - case CAMERA_EV_P4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P4); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_tungsten); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_sunny); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr130pc20_ctrl.vtcall_mode == 1) { - SR130PC20_WRITE_LIST(sr130pc20_VT_Init_Reg); - CDBG("VT Init Settings"); - }else { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - CDBG("Init settings"); - } - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - CDBG("Stop Stream Settings"); - } - return 0; -} - -int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - rc = SR130PC20_WRITE_LIST(sr130pc20_Snapshot); - break; - default: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview \n", __func__, __LINE__); - rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_50hz); - } - else { - pr_err("%s : %d 60Hz Preview \n", __func__, __LINE__); - rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_60hz); - } - } - return rc; -} - -int32_t sr130pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_none); - break; - case CAMERA_EFFECT_MONO: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr130pc20_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr130pc20_ctrl.exif_iso; - exif_info->value_3 = sr130pc20_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr130pc20_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - uint16_t gain_value = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x80, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x81, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x82, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr130pc20_ctrl.exif_shutterspeed = 26000000 / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xb0, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - gain_value =((read_value4 * 1000) / 32) + 500; - if (gain_value < 1250) - sr130pc20_ctrl.exif_iso= 50; - else if (gain_value < 1750) - sr130pc20_ctrl.exif_iso = 100; - else if (gain_value < 2500) - sr130pc20_ctrl.exif_iso = 200; - else if (gain_value < 3750) - sr130pc20_ctrl.exif_iso = 400; - else if (gain_value < 5500) - sr130pc20_ctrl.exif_iso = 800; - else - sr130pc20_ctrl.exif_iso = 1600; - - CDBG("sr130pc20_set_exif: ISO = %d shutter speed = %d",sr130pc20_ctrl.exif_iso,sr130pc20_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - CDBG("sensor name %s", - cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING"); - sr130pc20_ctrl.vtcall_mode = 0; -#ifdef CONFIG_LOAD_FILE /* this call should be always called first */ - sr130pc20_regs_table_init("/data/sr130pc20_yuv.h"); - pr_err("/data/sr352_yuv.h inside CFG_SET_INIT_SETTING"); -#endif - break; - case CFG_SET_RESOLUTION: - sr130pc20_set_Init_reg(s_ctrl); - resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , resolution); - break; - case CFG_SET_STOP_STREAM: - CDBG(" CFG_SET_STOP_STREAM"); - if(sr130pc20_ctrl.streamon == 1){ - rc = SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - sr130pc20_ctrl.streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); - switch(sr130pc20_ctrl.op_mode) { - case CAMERA_MODE_CAPTURE: - CDBG("CAMERA_MODE_CAPTURE"); - sr130pc20_set_resolution(s_ctrl , resolution, cdata->flicker_type); - sr130pc20_set_exif(s_ctrl); - break; - case CAMERA_MODE_RECORDING: - CDBG("CAMERA_MODE_RECORDING"); - SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode); - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - break; - case CAMERA_MODE_PREVIEW: - default: - CDBG("CAMERA_MODE_PREVIEW"); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_RECORDING) { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - } - if(sr130pc20_ctrl.prev_mode != CAMERA_MODE_CAPTURE) { - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - } - sr130pc20_set_resolution(s_ctrl , resolution, cdata->flicker_type); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - msleep(200); - } - break; - } - sr130pc20_ctrl.streamon = 1; - CDBG("CFG_SET_START_STREAM : sr130pc20_start_stream rc = %d", rc); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("i %d power setting %d %d %ld %d", - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAYn"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP"); - sr130pc20_ctrl.streamon = 0; - sr130pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr130pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - if (s_ctrl->func_tbl->sensor_power_up) { - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN"); - if (s_ctrl->func_tbl->sensor_power_down) { - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_LOAD_FILE - sr130pc20_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - - -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3); - switch (cam_info->mode) { - case EXT_CAM_EV: - sr130pc20_ctrl.settings.exposure = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_exposure_compensation(s_ctrl, sr130pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr130pc20_ctrl.settings.wb = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_white_balance(s_ctrl, sr130pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr130pc20_ctrl.settings.effect = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_effect(s_ctrl, sr130pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr130pc20_ctrl.prev_mode = sr130pc20_ctrl.op_mode; - sr130pc20_ctrl.op_mode = cam_info->value_1; - pr_err("EXT_CAM_SENSOR_MODE = %d", sr130pc20_ctrl.op_mode); - break; - case EXT_CAM_EXIF: - sr130pc20_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_VT_MODE: - CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1); - sr130pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -void sr130pc20_set_default_settings(void) -{ - sr130pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr130pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr130pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr130pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr130pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr130pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; -} - -#ifdef CONFIG_LOAD_FILE -void sr130pc20_regs_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sr130pc20_regs_table) { - vfree(sr130pc20_regs_table); - sr130pc20_regs_table = NULL; - } -} - -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - - if (settings != NULL){ - pr_err("sr130pc20_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(sr130pc20_regs_table == NULL) { - pr_err("sr130pc20_regs_table is null "); - return -1; - } - start = strstr(sr130pc20_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error"); - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error"); - if (reg) - start = (reg + 14); - if (addr == 0xff){ - msleep(value * 10); - pr_err("delay = %d\n", (int)value*10); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr130pc20_regs_from_sd_tunning end!"); - return rc; -} - -void sr130pc20_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to else part of string compare sr130pc20_regs_table"); - sr130pc20_regs_table = dp; - sr130pc20_regs_table_size = lsize; - *((sr130pc20_regs_table + sr130pc20_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv_matisse.h b/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv_matisse.h deleted file mode 100644 index 51c29c61307b..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr130pc20_yuv_matisse.h +++ /dev/null @@ -1,3070 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -static struct msm_camera_i2c_reg_conf sr130pc20_Snapshot[] = { -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll off*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x00,}, -{0x03, 0x02,}, -{0x2f, 0xaa,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, -{0x03, 0x13,}, -{0x10, 0xc5,}, -{0x80, 0xc1,},/*Sharpness 2D On[0xc1] Off[0xc0]*/ -{0x03, 0x18,}, -{0x14, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,},/*pll on*/ -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0d,}, /* 0c:90ns , 0b:110ns */ -{0x1e, 0x0f,}, -{0x1f, 0x0a,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x0a,}, -{0x31, 0x00,}, -{0x32, 0x0d,}, -{0x33, 0x0b,}, -{0x34, 0x02,}, -{0x35, 0x04,}, -{0x36, 0x01,}, -{0x37, 0x09,}, -{0x03, 0x00,}, -{0x01, 0x00,},/*sleep off*/ -{0xff, 0x03,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Init_Reg[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,}, /*Don't touch*/ -{0x09, 0x37,}, /*Don't touch*/ -{0x0a, 0x33,}, /*Don't touch*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x90,}, /*xy flip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 150*/ -{0x43, 0x96,}, -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x0c,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0c,}, /*BLC_TIME_TH_OFF*/ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,}, /*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,}, /*Don't touch*/ -{0x1F, 0x10,}, /*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, -{0xd4, 0x0c,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0c,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x48, 0x80,}, -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x4f,}, /*out color sat en[7] | auto color decrement en[1] / | manual color sat en[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0xff,}, /*auto decresment on AG th*/ -{0x64, 0xc0,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x13,}, /*Outdoor saturation B/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, /*dark2[7] | ratio[6:4] | dark3[3] | dark3 maxfilter ratio[2:0] */ -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1 L lum 0x08->20*/ -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, /*indoor L lum 0x18 3e*/ -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123 :: must be 0x07*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -{0x72, 0x10,}, -{0x73, 0x0a,}, -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 0x40->23 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M*/ -{0x18, 0x30,}, /*added option 1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, -{0x60, 0x12,}, -{0x5e, 0x0a,}, -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x60,}, /*R min's set 4e*/ -{0x41, 0x44,}, /*Gr*/ -{0x42, 0x3e,}, /*B*/ -{0x43, 0x44,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x37,}, -{0x34, 0x5c,}, -{0x35, 0x7d,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x03,}, -{0x71, 0x11,}, -{0x72, 0x1f,}, -{0x73, 0x37,}, -{0x74, 0x52,}, -{0x75, 0x6c,}, -{0x76, 0x85,}, -{0x77, 0x9a,}, -{0x78, 0xad,}, -{0x79, 0xbd,}, -{0x7a, 0xcb,}, -{0x7b, 0xd6,}, -{0x7c, 0xe0,}, -{0x7d, 0xe8,}, -{0x7e, 0xef,}, -{0x7f, 0xf4,}, -{0x80, 0xf8,}, -{0x81, 0xfb,}, -{0x82, 0xfe,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,},/*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xff,}, /*fe*/ -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x19,}, -{0x57, 0x81,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x23,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, /*EXPMin 8125.00 fps*/ -{0x87, 0x90,}, -{0x88, 0x06,}, /*EXP Max(120Hz) 8.00 fps */ -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0xa5, 0x05,}, /*EXP Max(100Hz) 8.33 fps */ -{0xa6, 0xee,}, -{0xa7, 0xc0,}, -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0x90,}, -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, -{0x9c, 0x09,}, /*EXP Limit 1354.17 fps */ -{0x9d, 0x60,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x52,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x45,}, -{0x88, 0x3a,}, -{0x89, 0x32,}, -{0x8a, 0x2c,}, -{0x8b, 0x42,}, -{0x8c, 0x3d,}, -{0x8d, 0x30,}, -{0x8e, 0x2c,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xb1,}, /* a2: b-2, R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x05,}, - -}; - -#if 1 - -static struct msm_camera_i2c_reg_conf sr130pc20_VT_Init_Reg[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,}, /*Don't touch*/ -{0x09, 0x37,}, /*Don't touch*/ -{0x0a, 0x33,}, /*Don't touch*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x94,}, /*xyflip*/ -{0x12, 0x00,}, /*Sync type default:0x00*/ -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank 280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x0a,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0a,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,}, /*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,}, /*Don't touch*/ -{0x1F, 0x10,}, /*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, /*DCDC*/ -{0xd4, 0x0a,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0a,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x41, 0x38,}, -{0x48, 0x80,}, /*Contrast (Y = constrast * (Y - 128) + 128)*//*86 */ -{0x50, 0xf0,}, -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x03,}, /*outcolorsaten[7]|autocolordecrementen[1]/|manualcolorsaten[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0xff,}, /*auto decresment on AG th*/ -{0x64, 0xff,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x00,}, /*OutdoorsaturationB/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, /*dark2[7] | dark2 maxfilter ratio[6:4] | dark3[3] | dark3 maxfilter ratio[2:0] */ -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1 L lum 0x08->20*/ -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, /*indoor L lum 0x18 3e*/ -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123:: must be 0x07 fix setting use!*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0e,}, -{0x21, 0x0e,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -{0x72, 0x10,}, -{0x73, 0x0a,}, -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 0x40->23 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M*/ -{0x18, 0x30,}, /*added option 1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, /* mid nega ,11*/ -{0x60, 0x12,}, /* mid pos ,0*/ -{0x5e, 0x0a,}, /* low nega */ -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x56,}, /*Rmin'sset4e*/ -{0x41, 0x3a,}, /*Gr*/ -{0x42, 0x37,}, /*B*/ -{0x43, 0x3a,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x35,}, -{0x34, 0x5a,}, -{0x35, 0x7c,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x00,}, -{0x71, 0x07,}, -{0x72, 0x1a,}, -{0x73, 0x35,}, -{0x74, 0x5a,}, -{0x75, 0x7c,}, -{0x76, 0x96,}, -{0x77, 0xa9,}, -{0x78, 0xb7,}, -{0x79, 0xc6,}, -{0x7a, 0xd2,}, -{0x7b, 0xdc,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, /* 0x6435, edge th1 H*/ -{0x65, 0x00,}, /*edge th1 L*/ -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,}, /*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x1a,}, -{0x57, 0x80,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x40,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x91,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x2b,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, //EXPMin 8125.00 fps -{0x87, 0x90,}, -{0x88, 0x02,}, //EXP Max(120Hz) 17.14 fps -{0x89, 0xf7,}, -{0x8a, 0x60,}, -{0xa5, 0x02,}, //EXP Max(100Hz) 16.67 fps -{0xa6, 0xf7,}, -{0xa7, 0x60,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0x90,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x91, 0x03,}, //EXP Fix 15.00 fps -{0x92, 0x4e,}, -{0x93, 0x18,}, -{0x9c, 0x0a,}, /*EXP Limit 1160.71 fps */ -{0x9d, 0xf0,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x54,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x46,}, -{0x88, 0x36,}, -{0x89, 0x3a,}, -{0x8a, 0x2f,}, -{0x8b, 0x3d,}, -{0x8c, 0x37,}, -{0x8d, 0x35,}, -{0x8e, 0x32,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xa1,}, /* a2: b-2,R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x28,}, /*400ms Delay*/ - -}; - -#endif - - -static struct msm_camera_i2c_reg_conf sr130pc20_camcorder_mode[] = { -/*0 Page*/ -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,},/*Don't touch*/ -{0x09, 0x37,},/*Don't touch*/ -{0x0a, 0x33,},/*Don't touch*/ -/*PLL Setting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x94,}, /*xy flip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -/*--------------- BLC*/ -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -/*Dark BLC*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -/*Normal BLC*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -/*Out BLC*/ -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -/*2 Page*/ -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,},/*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,},/*Don't touch*/ -{0x1F, 0x10,},/*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, -/*DCDC */ -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x41, 0x0a,}, -{0x48, 0x80,}, /*Contrast (Y = constrast * (Y - 128) + 128)/86 */ -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x07,}, /*out color sat en[7] | auto color decrement en[1] | manual color sat en[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0x80,}, /*auto decresment on AG th*/ -{0x64, 0xff,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x13,}, /*Outdoor saturation B/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -/* Hi 163 */ -/* PAGE 10 START*/ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -/*DPC_CTRL*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -/*C-filter(Out2&Out1)*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -/*C-filter(Indoor&Dark3)*/ -{0x72, 0x10,}, -{0x73, 0x0a,}, -/*C-filter(Dark2&Dark1)*/ -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -/*DPC-Dark1,2,3*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -/*Blue Det..*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 {0x40, 0x->2}3 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,},/*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,},/*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,},/*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -/*interpolated with average*/ -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M */ -{0x18, 0x30,}, /*added option 1.3M */ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -/*1D Edge*/ -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -/*Indoor Edge*/ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, /* mid nega */ -{0x60, 0x12,}, /* mid pos */ -{0x5e, 0x0a,}, /* low nega */ -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ - /* 2DY*/ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -/* PAGE 14 START*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x60,}, /*R min's set 4e*/ -{0x41, 0x44,}, /*Gr*/ -{0x42, 0x3e,}, /*B*/ -{0x43, 0x44,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -/*CMC*/ -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x37,}, -{0x34, 0x5c,}, -{0x35, 0x7d,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x07,}, -{0x71, 0x1a,}, -{0x72, 0x2d,}, -{0x73, 0x46,}, -{0x74, 0x6a,}, -{0x75, 0x86,}, -{0x76, 0x9c,}, -{0x77, 0xad,}, -{0x78, 0xbc,}, -{0x79, 0xc9,}, -{0x7a, 0xd4,}, -{0x7b, 0xde,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -/* PAGE 20 START*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,},/*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x19,}, -{0x57, 0x81,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x23,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, /*EXPMin 8125.00 fps*/ -{0x87, 0x90,}, -{0x88, 0x01,}, /*EXP Max(120Hz) 30.00 fps */ -{0x89, 0xfa,}, -{0x8a, 0x40,}, -{0xa5, 0x01,}, /*EXP Max(100Hz) 25.00 fps */ -{0xa6, 0xfa,}, -{0xa7, 0x40,}, -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0x90,}, -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, -{0x91, 0x01,}, /*EXP Fix 25.00 fps*/ -{0x92, 0xfb,}, -{0x93, 0xd0,}, -{0x9c, 0x09,}, /*EXP Limit 1354.17 fps */ -{0x9d, 0x60,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -/* PAGE 20 END*/ -/*AE_Weight*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -/* PAGE 22 START*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe3,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x53,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x46,}, -{0x88, 0x36,}, -{0x89, 0x3a,}, -{0x8a, 0x2f,}, -{0x8b, 0x3d,}, -{0x8c, 0x37,}, -{0x8d, 0x35,}, -{0x8e, 0x32,}, -{0x8f, 0x5d,}, -{0x90, 0x5a,}, -{0x91, 0x56,}, -{0x92, 0x50,}, -{0x93, 0x48,}, -{0x94, 0x3f,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xb1,}, /* a2: b-2, R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -/* PAGE 22 END*/ -/* PAGE 48 (MiPi 1600x1200)*/ -{0x03, 0x00,}, -/* PLL Setting */ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, /*400ms Delay*/ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Preview_50hz[] = { - -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll Off*/ -{0x03, 0x20,}, -{0x10, 0x1c,},/*AE off (0x0c:60Hz 0x1c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x11,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x17,}, -{0xd5, 0x0f,}, -{0xd7, 0xff,}, -{0x03, 0x13,}, -{0x10, 0xc4,}, -{0x80, 0xc0,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x10, 0x9c,}, /*AE ON (0x8c:60Hz 0x9c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, /*AWB ON*/ -{0x03, 0x00,}, /*Page 0 PLL on*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, - -}; - - -static struct msm_camera_i2c_reg_conf sr130pc20_Preview_60hz[] = { - -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll Off*/ -{0x03, 0x20,}, -{0x10, 0x0c,},/*AE off (0x0c:60Hz 0x1c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x11,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x17,}, -{0xd5, 0x0f,}, -{0xd7, 0xff,}, -{0x03, 0x13,}, -{0x10, 0xc4,}, -{0x80, 0xc0,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x10, 0x8c,}, /*AE ON (0x8c:60Hz 0x9c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, /*AWB ON*/ -{0x03, 0x00,}, /*Page 0 PLL on*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, - -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_none[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x13, 0x02,}, -{0x40, 0x80,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_gray[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_sepia[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x70,}, /*Cb constant */ -{0x45, 0x98,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_negative[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*0x03 default */ -{0x12, 0x38,}, /*0x30 default */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -/* WhiteBalance Mode */ -static struct msm_camera_i2c_reg_conf sr130pc20_wb_auto[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x52,}, -{0x86, 0x20,}, -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_sunny[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x38,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x35,}, /*b gain */ -{0x83, 0x3b,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x38,}, /*b gain max */ -{0x86, 0x31,}, /*b gain min */ -{0x10, 0xeb,}, - -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_cloudy[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x50,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x28,}, /*b gain */ -{0x83, 0x52,}, /*r gain max */ -{0x84, 0x4c,}, /*r gain min */ -{0x85, 0x2c,}, /*b gain max */ -{0x86, 0x22,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_fluorescent[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x37,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x48,}, /*b gain */ -{0x83, 0x39,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x4a,}, /*b gain max */ -{0x86, 0x45,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_tungsten[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x21,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x4f,}, /*b gain */ -{0x83, 0x27,}, /*r gain max */ -{0x84, 0x1b,}, /*r gain min */ -{0x85, 0x59,}, /*b gain max */ -{0x86, 0x50,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xB0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xA0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0x90,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x10,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20.h b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20.h deleted file mode 100755 index 7a22c0b1b4ec..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __sr200pc20_H__ -#define __sr200pc20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef sr200pc20_DEBUG -#undef CDBG -#define sr200pc20_DEBUG -#ifdef sr200pc20_DEBUG -#define CDBG(fmt, args...) printk("[sr200pc20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.c b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.c deleted file mode 100755 index 3a5a696dbf61..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.c +++ /dev/null @@ -1,810 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "sr200pc20.h" -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#include "sr200pc20_yuv_coreprime.h" -#elif defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "sr200pc20_yuv_gte.h" -#elif defined(CONFIG_SEC_J1X_PROJECT) -#include "sr200pc20_yuv_j1x.h" -#else -#include "sr200pc20_yuv.h" -#endif -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define SR200PC20_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define SR200PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl sr200pc20_ctrl; -static exif_data_t sr200pc20_exif; -#if defined(CONFIG_SEC_ROSSA_PROJECT) -bool init_setting_write = FALSE; -#endif - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -static int prev_mode = 0; -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_coreprime.h" -#elif defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_gte.h" -#else -#define FILENAME "/data/sr200pc20_yuv.h" -#endif -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif -static int32_t streamon = 0; -static int32_t recording = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -static int sr200pc20_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 read_value3 = 0; - int OPCLK = 26000000; - int rc = 0; - - /* Exposure Time */ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x80,&read_value1,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x81,&read_value2,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x82,&read_value3,MSM_CAMERA_I2C_BYTE_DATA); - if(read_value1 == 0 && read_value2 == 0 && read_value3 == 0) - { - pr_err("%s::%d read_value1=%d read_value2=%d read_value3=%d " - ,__func__,__LINE__,read_value1,read_value2,read_value3); - rc = -EFAULT; - } - else - { - sr200pc20_exif.shutterspeed = OPCLK / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - CDBG("Exposure time = %d", sr200pc20_exif.shutterspeed); - } - return rc; -} - -static int sr200pc20_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value4 = 0; - unsigned short gain_value; - - /* ISO*/ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0xb0,&read_value4,MSM_CAMERA_I2C_BYTE_DATA); - - gain_value = (read_value4 / 32) * 1000 +500; - if (gain_value < 1140) - sr200pc20_exif.iso = 50; - else if (gain_value < 2140) - sr200pc20_exif.iso = 100; - else if (gain_value < 2640) - sr200pc20_exif.iso = 200; - else if (gain_value < 7520) - sr200pc20_exif.iso = 400; - else - sr200pc20_exif.iso = 800; - - CDBG("ISO = %d", sr200pc20_exif.iso); - - return 0; -} - -void sr200pc20_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - CDBG("E"); - - /*Exif data*/ - sr200pc20_exif_shutter_speed(s_ctrl); - sr200pc20_exif_iso(s_ctrl); - CDBG("exp_time : %d -- iso_value : %d",sr200pc20_exif.shutterspeed, sr200pc20_exif.iso); - return; -} - -int32_t sr200pc20_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr200pc20_exif.iso; - exif_info->value_3 = sr200pc20_exif.shutterspeed; - return 0; -} - -int32_t sr200pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M4); - break; - case CAMERA_EV_M3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M3); - break; - case CAMERA_EV_M2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M2); - break; - case CAMERA_EV_M1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - SR200PC20_WRITE_LIST(sr200pc20_brightness_default); - break; - case CAMERA_EV_P1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P1); - break; - case CAMERA_EV_P2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P2); - break; - case CAMERA_EV_P3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P3); - break; - case CAMERA_EV_P4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P4); - break; - default: - CDBG("Setting %d is invalid", mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - SR200PC20_WRITE_LIST(sr200pc20_WB_Auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - SR200PC20_WRITE_LIST(sr200pc20_Capture); - sr200pc20_get_exif(s_ctrl); - break; - default: -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (init_setting_write) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_60hz); - } - init_setting_write = FALSE; - }else { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#elif defined(CONFIG_SEC_J1X_PROJECT) - if (mode == MSM_SENSOR_RES_QTR) { - - switch (sr200pc20_ctrl.fixed_fps_val) - { - case 24000: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_50hz); - } - else { - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_60hz); - } - break; - - default: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } - else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } - } -#else - if (mode == MSM_SENSOR_RES_QTR) { - switch (sr200pc20_ctrl.fixed_fps_val) - { - case 24000: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_800x600_24fps_Camcoder_50hz); - } - else { - SR200PC20_WRITE_LIST(sr200pc20_800x600_24fps_Camcoder_60hz); - } - break; - - default: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_60hz); - } - } - } -#endif -#if 0 - else if (mode == MSM_SENSOR_RES_2) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#endif - //rc = msm_sensor_driver_WRT_LIST(s_ctrl,sr200pc20_800x600_Preview); - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc=0; - } - return rc; -} - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -int32_t sr200pc20_set_vt_resolution(struct msm_sensor_ctrl_t *s_ctrl, int resolution, int flicker_type, int vtmode) -{ - int32_t rc = 0; - if(resolution==MSM_SENSOR_RES_FULL) { - SR200PC20_WRITE_LIST(sr200pc20_Capture); // capture in factory VT Camera - sr200pc20_get_exif(s_ctrl); - return rc; - } - - if (vtmode==1) { - pr_err("%s : %d sr200pc20_VT_Init_Reg : 3G(Fixed 7fps)\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - else if (vtmode==2) - { - pr_err("%s : %d sr200pc20_15fps_60Hz : 4G(Fixed 15fps)\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_15fps_60Hz); - } - else - { - pr_err("%s : %d sr200pc20_Init_Reg\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - return rc; -} -#endif - -int32_t sr200pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - if(prev_mode == CAMERA_EFFECT_BEAUTY && mode==CAMERA_EFFECT_OFF) { - SR200PC20_WRITE_LIST(sr200pc20_beauty_off); - prev_mode = CAMERA_EFFECT_OFF; - return rc; - } - prev_mode = mode; -#endif - switch (mode) { - case CAMERA_EFFECT_OFF: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Normal); - break; - case CAMERA_EFFECT_MONO: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Gray); - break; - case CAMERA_EFFECT_NEGATIVE: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Negative); - break; - case CAMERA_EFFECT_SEPIA: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Sepia); - break; -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - case CAMERA_EFFECT_BEAUTY: - SR200PC20_WRITE_LIST(sr200pc20_beauty_on); - break; -#endif - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - sr200pc20_ctrl.vtcall_mode = 0; - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr200pc20_Init_Reg \n"); -#if defined(CONFIG_SEC_ROSSA_PROJECT) - init_setting_write = TRUE; -#endif - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("/data/sr200pc20_yuv.h inside CFG_SET_INIT_SETTING"); - } -#endif - break; - case CFG_SET_RESOLUTION: - resolution = *((int32_t *)cdata->cfg.setting); -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - if(sr200pc20_ctrl.vtcall_mode) { - sr200pc20_set_vt_resolution(s_ctrl , resolution , cdata->flicker_type, sr200pc20_ctrl.vtcall_mode); - break; - } -#else - if (sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr200pc20_ctrl.vtcall_mode) { - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_50Hz); - } else { - pr_err("%s : %d 60Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - }else { -#if 0 - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } -#endif - CDBG("Init settings"); - } - } -#endif - CDBG("CFG_SET_RESOLUTION *** res = %d" , resolution); - if( sr200pc20_ctrl.op_mode == CAMERA_MODE_RECORDING ) { - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_50hz); - } else { - pr_err("%s : %d 60Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_60hz); - } -#if 0 - CDBG("CFG_SET_RESOLUTION recording START recording =1 *** res = %d" , resolution); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - -#endif - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - recording = 1; - }else{ - if(recording == 1){ - CDBG("CFG_SET_RESOLUTION recording STOP recording =1 *** res = %d" , resolution); - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - recording = 0; - }else if( sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT ){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } else{ - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - SR200PC20_WRITE_LIST(sr200pc20_stop_stream); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); -#if 0 - if( sr200pc20_ctrl.op_mode != CAMERA_MODE_CAPTURE){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - } -#endif - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - streamon = 0; - sr200pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr200pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr200pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr200pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr200pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr200pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_exit(); - } -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - /* CDBG("cam_info values = %d : %d : %d : %d : %d", cam_info->mode, cam_info->address,\ - cam_info->value_1, cam_info->value_2 , cam_info->value_3); */ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr200pc20_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_exposure_compensation(s_ctrl, sr200pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr200pc20_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_white_balance(s_ctrl, sr200pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr200pc20_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_effect(s_ctrl, sr200pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr200pc20_ctrl.prev_mode = sr200pc20_ctrl.op_mode; - sr200pc20_ctrl.op_mode = cam_info->value_1; - /*CDBG("EXT_CAM_SENSOR_MODE = %d", sr200pc20_ctrl.op_mode);*/ - break; - case EXT_CAM_EXIF: - sr200pc20_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - /*CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1);*/ - sr200pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - - case EXT_CAM_FPS_RANGE: - if (cam_info->value_1 > 0) - sr200pc20_ctrl.fixed_fps_val = cam_info->value_1; - else - sr200pc20_ctrl.fixed_fps_val = 0; - break; - - default: - rc = 0; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.h b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.h deleted file mode 100755 index e14f101053df..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv.h +++ /dev/null @@ -1,13076 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[] = { -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 68 */ -{0x43, 0x44,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x08,}, /* BLC_TIME_TH_ON */ -{0x91, 0x08,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x08,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xEa,}, -{0x68, 0xab,}, -{0x69, 0xEa,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x7a,}, -{0x71, 0x80,}, - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, -{0x79, 0x49,}, -{0x7a, 0x23,}, -{0x7b, 0x22,}, -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 30.00 fps */ -{0x84, 0x86,}, -{0x85, 0xa0,}, - -{0x86, 0x01,}, /* EXPMin 5950.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x02,}, /* EXP Max 17.14 fps */ -{0x89, 0xab,}, -{0x8a, 0x98,}, - -{0x8B, 0x75,}, /* EXP100 */ -{0x8C, 0x30,}, - -{0x8D, 0x61,}, /* EXP120 */ -{0x8E, 0xa8,}, - -{0x91, 0x03,}, /* EXP Fix 15.00 fps */ -{0x92, 0x0d,}, -{0x93, 0x40,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x19,}, /* EXP Limit 457.69 fps */ -{0x9d, 0x64,}, - -{0x9e, 0x01,}, /* EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c-> 3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler 0ff */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x68,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0x39,}, /* Threshold Dyoffset f0 - > e0 */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 7.14 fps -{0x89, 0xf1,}, -{0x8a, 0x58,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800 x 600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, /* BLC_TIME_TH_ON */ -{0x91, 0x11,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x11,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0x39,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x07,}, //EXP Max 7.06 fps -{0x89, 0x00,}, -{0x8a, 0xf8,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x10,}, -{0x1e, 0x08,}, -{0x1f, 0x05,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial tart */ -/* PAGE 0 SART */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 2011092904 -> {0x02, 0x */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 2011092914 -> {0x0a, 0x */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, 0x c}ontinuous -> {0x00, 0x n}ot Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, - -{0x03, 0x11,}, -/* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_coreprime.h b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_coreprime.h deleted file mode 100755 index bfc3f06bd8cf..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_coreprime.h +++ /dev/null @@ -1,13371 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: SM-G3608W(Rossa_CMCC_OPEN) */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 640x480 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_60hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x94,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { - -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0e,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x05,}, /*EXP Max 8.57 fps */ -{0x89, 0xc9,}, -{0x8a, 0x1a,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xe5,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x03,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ -{0x03, 0x22,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, -{0x83, 0x3c,}, -{0x84, 0x3a,}, -{0x85, 0x36,}, -{0x86, 0x34,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x49,}, -{0x81, 0x20,}, -{0x82, 0x2a,}, -{0x83, 0x4a,}, -{0x84, 0x48,}, -{0x85, 0x2b,}, -{0x86, 0x29,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, -{0x83, 0x3e,}, -{0x84, 0x38,}, -{0x85, 0x4d,}, -{0x86, 0x44,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x20,}, -{0x81, 0x20,}, -{0x82, 0x58,}, -{0x83, 0x23,}, -{0x84, 0x1f,}, -{0x85, 0x58,}, -{0x86, 0x52,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { - - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, /*EXP Normal 30.00 fps */ -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 30.00 fps */ -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if 0 -static const u16 sr200pc20_15fps[] = { - -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 360 */ -{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, 0x06,}, /* BLC_TIME_TH_ON */ -{0x91, 0x06,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x06,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x06,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 18 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 5950.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x02,}, /*EXP Max 16.67 fps */ -{0x89, 0xf9,}, -{0x8a, 0xb8,} - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x03,}, /*EXP Fix 15.01 fps*/ -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c-> 3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ - -}; - -static const u16 sr200pc20_20fps[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x05,}, /* BLC_TIME_TH_ON */ -{0x91, 0x05,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x05,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x05,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,} - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x03,}, /*EXP Fix 20.01 fps*/ -{0x92, 0x19,}, -{0x93, 0x20,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,},/*+10*/ -{0x62, 0x86,},/*+10*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness +1*/ -{0x03, 0x13,}, -{0x12, 0x02,}, -{0x25, 0x02,}, -{0x20, 0x1a,}, -{0x21, 0x1a,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/* AE Matrix(Average)*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_party[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,}, -{0x62, 0x86,}, -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xe4,}, /* adaptive off*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - - /*ISO_200*/ -{0xb0, 0x37,}, -{0xb1, 0x37,}, -{0xb2, 0x40,}, -{0xb3, 0x37,}, -{0xb4, 0x37,}, -{0xb5, 0x40,}, -{0xb6, 0x3e,}, -{0xb7, 0x3c,}, -{0xb8, 0x3a,}, -{0xb9, 0x39,}, -{0xba, 0x38,}, -{0xbb, 0x37,}, -{0xbc, 0x37,}, -{0xbd, 0x37,}, - -{0xc0, 0x10,}, -{0xc1, 0x37,}, -{0xc2, 0x37,}, -{0xc3, 0x37,}, -{0xc4, 0x0b,}, - -{0xff, 0x05,}, -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_dawn[] = { -/*WB FLUORESCENT*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, /* 3a */ - -{0x83, 0x3e,}, /* */ -{0x84, 0x38,}, /* */ -{0x85, 0x4d,}, /* */ -{0x86, 0x44,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +2, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x9a,},/*+20*/ -{0x62, 0x96,},/*+20*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /* Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon1*/ -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon2*/ -{0x83, 0x10,}, /*EXP 3.03 fps*/ -{0x84, 0x5d,}, -{0x85, 0x74,}, - -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Flash OFF _Spot*/ -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x72,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -static const u16 sr200pc20m_metering_spot[] = { -{0x03, 0x20,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -}; - -static const u16 sr200pc20m_metering_center[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_gte.h b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_gte.h deleted file mode 100755 index 69cc3b3638a4..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_gte.h +++ /dev/null @@ -1,13048 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[] = { -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{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, 0x08,}, //BLC_TIME_TH_ON -{0x91, 0x08,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, //DCDC_TIME_TH_ON -{0xd5, 0x08,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x02,}, //EXP Max 17.14 fps -{0x89, 0xe2,}, -{0x8a, 0x48,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x91, 0x03,}, //EXP Fix 15.01 fps -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2x */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.33 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 404 -{0x41, 0x94,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, //BLC_TIME_TH_ON -{0x91, 0x11,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, //DCDC_TIME_TH_ON -{0xd5, 0x11,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, //EXPMin 6360.08 fps -{0x87, 0xff,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xc0,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0xcb,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x73,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 530.01 fps -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ -{0x14, 0x00,}, - - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x04,}, /* 0x03->0x04 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x03,}, /* BLC_TIME_TH_ON */ -{0x91, 0x03,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x03,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x03,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -{0x03, 0x11,}, -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x09,}, -{0x34, 0x06,}, -{0x35, 0x03,}, -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, -{0x03, 0x13,}, -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_j1x.h b/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_j1x.h deleted file mode 100644 index 58f543393376..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr200pc20_yuv_j1x.h +++ /dev/null @@ -1,11289 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.:GTA_S/L*/ -/* SENSOR :SILICONFILE SR200PC20M */ -/* DSP:MSM 8916 */ -/* MCLK :26.00 Mhz*/ -/* PCLK :48.00 Mhz*/ -/* Preview:640x480*/ -/* DATE :2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 148 -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.33 fps -{0x89, 0xf3,}, -{0x8a, 0x70,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -//{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[]= { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x08,}, /* BLC_TIME_TH_ON */ -{0x91, 0x08,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x08,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3e R 150306 58->56 // -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a // -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, - {0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01}, //EXP Normal 30.00 fps -{0x84, 0xa4}, -{0x85, 0x00}, -{0x86, 0x01}, //EXPMin 6770.83 fps -{0x87, 0xe0}, -{0x88, 0x02}, //EXP Max 17.14 fps -{0x89, 0xdf}, -{0x8a, 0x00}, -{0x8B, 0x7e}, //EXP100 -{0x8C, 0x90}, -{0x8D, 0x69}, //EXP120 -{0x8E, 0x00}, -{0x91, 0x03}, //EXP Fix 15.01 fps -{0x92, 0x4d}, -{0x93, 0xa0}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, //EXP Limit 520.83 fps -{0x9d, 0x80,}, - -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x02,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 126 -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -//{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - - -{0x03, 0x48,}, - - -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - - -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -//{0xff, 0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - - -{0x03, 0x48,}, - - -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - - -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -/*{0xff, 0xff,}, */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 126 -{0x43, 0x7e,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x98,}, -{0x4f, 0xa0,}, -{0x50, 0x98,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x04,}, -{0x2c, 0x04,}, -{0x25, 0x0a,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x0e,}, //10 -{0x51, 0x10,}, //14 -{0x52, 0x0f,}, //12 -{0x53, 0x0b,}, //0c -{0x54, 0x0d,}, //0f -{0x55, 0x0b,}, //0c - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x91, 0x06,}, //EXP Fix 8.00 fps -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -//{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 148 -{0x43, 0x94,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x98,}, -{0x4f, 0xa0,}, -{0x50, 0x98,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x04,}, -{0x2c, 0x04,}, -{0x25, 0x0a,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x0e,}, //10 -{0x51, 0x10,}, //14 -{0x52, 0x0f,}, //12 -{0x53, 0x0b,}, //0c -{0x54, 0x0d,}, //0f -{0x55, 0x0b,}, //0c - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.33 fps -{0x89, 0xf3,}, -{0x8a, 0x70,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x91, 0x06,}, //EXP Fix 8.00 fps -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -//{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[]= { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[]= { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[]= { -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 *//* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 *//* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ -{0x14, 0x00,}, - - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x04,}, /* 0x03->0x04 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 148 -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.33 fps -{0x89, 0xf3,}, -{0x8a, 0x70,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 126 -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0xdb,}, -{0x85, 0x50,}, -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, -{0x88, 0x02,}, //EXP Max 25.00 fps -{0x89, 0x79,}, -{0x8a, 0xc0,}, -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,},/* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -//{0xff, 0x14,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[]= { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,},/* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -//{0xff, 0x14,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, - -{0x03, 0x11,}, -/* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[]= { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr352.h b/drivers/media/platform/msm/camera_v2/sensor/sr352.h deleted file mode 100644 index 87c6fff88cd7..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr352.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - #ifndef __SR352_H__ -#define __SR352_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef SR352_DEBUG -#undef CDBG - -#define SR352_DEBUG -#ifdef SR352_DEBUG -#define CDBG(fmt, args...) printk("[SR352] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -void sr352_set_default_settings(void); -int sr352_sensor_match_id(struct msm_camera_i2c_client *sensor_i2c_client, - struct msm_camera_slave_info *slave_info, - const char *sensor_name); -#endif //__sr352_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv.c b/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv.c deleted file mode 100644 index 2ba99c600c24..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv.c +++ /dev/null @@ -1,2300 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#define NO_BURST // Enable no burst mode for Tunning -#endif - -//#define NO_BURST // Enable no burst mode for Tunning - -//#define FLASH_DEBUG -#ifdef FLASH_DEBUG -#define CDBG_FL(_fmt, args...) printk(_fmt, ##args) -#else -#define CDBG_FL(_fmt, args...) -#endif - -#include "sr352.h" -/* *********************** Settings file selection *********************** */ -#ifdef CONFIG_MACH_MILLETVEWIFI_EUR_OPEN -#define REG_SET_FILE "sr352_yuv.h" -#else -#define REG_SET_FILE "sr352_yuv_matisse.h" -#endif - -#include REG_SET_FILE -/* *********************** End Selection *********************** */ - -#if 0 -#define ANTIBANDING_60HZ 1 -//dummy declaration for 50HZ -//for successful compilation -#define sr352_50hz_setting sr352_60hz_setting -#define sr352_HD_50hz_setting sr352_HD_60hz_setting -#define sr352_AEAWB_Lock_50Hz sr352_AEAWB_Lock_60Hz -#define sr352_AEAWB_Unlock_50Hz sr352_AEAWB_Unlock_60Hz -#elif defined(CONFIG_MACH_MILLETWIFI_OPEN) -extern int back_camera_antibanding_get(void); /*add anti-banding code */ -#define ANTIBANDING_60HZ (back_camera_antibanding_get() == 60) -#else -#define ANTIBANDING_60HZ 0 -//dummy declaration for 60HZ -//for successful compilation -#define sr352_60hz_setting sr352_50hz_setting -#define sr352_HD_60hz_setting sr352_HD_50hz_setting -#define sr352_AEAWB_Lock_60Hz sr352_AEAWB_Lock_50Hz -#define sr352_AEAWB_Unlock_60Hz sr352_AEAWB_Unlock_50Hz -#endif - - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifndef NO_BURST -#define BURST_MODE_BUFFER_MAX_SIZE 255 -#define BURST_REG 0x0e -#define DELAY_REG 0xff -uint8_t burst_reg_data[BURST_MODE_BUFFER_MAX_SIZE]; -static int32_t sr352_sensor_burst_write (struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size); -#endif - -#ifdef CONFIG_LOAD_FILE -#define SR352_WRITE_LIST(A) \ - sr352_regs_from_sd_tunning(A,s_ctrl,#A); -#define SR352_WRITE_LIST_BURST(A) \ - sr352_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR352_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ ****** %s", #A) -#define SR352_WRITE_LIST_BURST(A) \ - sr352_sensor_burst_write(s_ctrl,A,ARRAY_SIZE(A)); CDBG("REGSEQ ****** BURST %s", #A) -#endif - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr352_regs_table; -static int sr352_regs_table_size; -int sr352_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr352_regs_table_init(char *filename); -void sr352_regs_table_exit(void); -#endif - -static struct yuv_ctrl sr352_ctrl; -extern uint16_t rear_vendor_id; - -static int32_t cur_scene_mode_chg = 0; -extern unsigned int system_rev; -unsigned int settings_type = 0; - -#if defined (AF_FLASH_SUPPORT) -int flash_mode; -int flash_status; -int is_preflash; -int is_touchaf; -int focus_mode; -int need_main_flash; -int is_af_run; -FLASH_t Flash; -static int8_t cur_scene_mode = 0; - -int set_led_flash(int); -void sr352_get_sensor_ev_data(struct msm_sensor_ctrl_t *s_ctrl, uint16_t PreFlashEnable); -void sr352_get_ev_data_flash_Off_func1(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_get_ev_data_preflash_func2(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_set_ev_data_mainFlash_func3(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_return_ev_data_func4(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_actuator_softlanding(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl); -static int sr352_is_required_flash(struct msm_sensor_ctrl_t *s_ctrl, int flash_mode); -void sr352_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode); -void sr352_recording_landing(struct msm_sensor_ctrl_t *s_ctrl); -#endif - - -void sr352_check_hw_revision(void); - -void sr352_check_hw_revision() -{ - settings_type = 1; -} - -int32_t sr352_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR352_WRITE_LIST(sr352_brightness_M4); - break; - case CAMERA_EV_M3: - rc = SR352_WRITE_LIST(sr352_brightness_M3); - break; - case CAMERA_EV_M2: - rc = SR352_WRITE_LIST(sr352_brightness_M2); - break; - case CAMERA_EV_M1: - rc = SR352_WRITE_LIST(sr352_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - rc = SR352_WRITE_LIST(sr352_brightness_default); - break; - case CAMERA_EV_P1: - rc = SR352_WRITE_LIST(sr352_brightness_P1); - break; - case CAMERA_EV_P2: - rc = SR352_WRITE_LIST(sr352_brightness_P2); - break; - case CAMERA_EV_P3: - rc = SR352_WRITE_LIST(sr352_brightness_P3); - break; - case CAMERA_EV_P4: - rc = SR352_WRITE_LIST(sr352_brightness_P4); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_effect_none_01); - } - else { - rc = SR352_WRITE_LIST(sr352_effect_none); - } - break; - case CAMERA_EFFECT_MONO: - rc = SR352_WRITE_LIST(sr352_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - rc = SR352_WRITE_LIST(sr352_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - rc = SR352_WRITE_LIST(sr352_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("Scene mode E = %d", mode); - if(cur_scene_mode_chg == 0) { - CDBG("Scene mode Not Set = %d", mode); - return rc; - } - - if(sr352_ctrl.prev_mode == CAMERA_MODE_INIT - && mode == CAMERA_SCENE_AUTO) { - CDBG("Scene mode X Not Set = %d", mode); - cur_scene_mode_chg = 0; - return rc; - } - -#if defined (AF_FLASH_SUPPORT) - cur_scene_mode = mode; -#endif - - switch (mode) { - case CAMERA_SCENE_AUTO: - rc = SR352_WRITE_LIST(sr352_Scene_Off); - break; - case CAMERA_SCENE_LANDSCAPE: - rc = SR352_WRITE_LIST(sr352_scene_Landscape); - break; - case CAMERA_SCENE_SPORT: - rc = SR352_WRITE_LIST(sr352_scene_Sports); - break; - case CAMERA_SCENE_PARTY: - rc = SR352_WRITE_LIST(sr352_scene_Party); - break; - case CAMERA_SCENE_BEACH: - rc = SR352_WRITE_LIST(sr352_scene_Beach); - break; - case CAMERA_SCENE_SUNSET: - rc = SR352_WRITE_LIST(sr352_scene_Sunset); - break; - case CAMERA_SCENE_DAWN: - rc = SR352_WRITE_LIST(sr352_scene_Dawn); - break; - case CAMERA_SCENE_FALL: - rc = SR352_WRITE_LIST(sr352_scene_Fall); - break; - case CAMERA_SCENE_CANDLE: - rc = SR352_WRITE_LIST(sr352_scene_Candle); - break; - case CAMERA_SCENE_FIRE: - rc = SR352_WRITE_LIST(sr352_scene_Firework); - break; - case CAMERA_SCENE_AGAINST_LIGHT: - rc = SR352_WRITE_LIST(sr352_scene_Backlight); - break; - case CAMERA_SCENE_NIGHT: - rc = SR352_WRITE_LIST(sr352_scene_Nightshot); - break; - - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - cur_scene_mode_chg = 0; - CDBG("Scene mode X = %d", mode); - return rc; -} - - -int32_t sr352_set_ae_awb_lock(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - - if(ANTIBANDING_60HZ) { - if(mode) { - rc = SR352_WRITE_LIST(sr352_AEAWB_Lock_60Hz); - } else { - rc = SR352_WRITE_LIST(sr352_AEAWB_Unlock_60Hz); - } - } else { - if(mode) { - rc = SR352_WRITE_LIST(sr352_AEAWB_Lock_50Hz); - } else { - rc = SR352_WRITE_LIST(sr352_AEAWB_Unlock_50Hz); - } - } - return rc; -} - -int32_t sr352_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR352_WRITE_LIST(sr352_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR352_WRITE_LIST(sr352_wb_incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR352_WRITE_LIST(sr352_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR352_WRITE_LIST(sr352_wb_sunny); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR352_WRITE_LIST(sr352_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_AVERAGE: - rc = SR352_WRITE_LIST(sr352_metering_matrix); - break; - case CAMERA_CENTER_WEIGHT: - rc = SR352_WRITE_LIST(sr352_metering_center); - break; - case CAMERA_SPOT: - rc = SR352_WRITE_LIST(sr352_metering_spot); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - if(settings_type == 1) { -#if defined (AF_FLASH_SUPPORT) - if (cur_scene_mode == CAMERA_SCENE_NIGHT) { - SR352_WRITE_LIST(sr352_Night_Capture_2048_1536_01); - } else { - SR352_WRITE_LIST(sr352_Capture_2048_1536_01); - } -#else - SR352_WRITE_LIST(sr352_Capture_2048_1536_01); -#endif - } - else { - SR352_WRITE_LIST(sr352_Capture_2048_1536); - } - break; - case MSM_SENSOR_RES_QTR: - case MSM_SENSOR_RES_7: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_1024x768_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_1024x768); - } - break; - case MSM_SENSOR_RES_2: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_1024x576_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_1024x576); - } - break; - case MSM_SENSOR_RES_3: - if(settings_type == 1) { - rc = SR352_WRITE_LIST_BURST(sr352_recording_50Hz_HD_01); - } - else { - rc = SR352_WRITE_LIST_BURST(sr352_recording_50Hz_HD); - } - if(flicker_type == MSM_CAM_FLICKER_50HZ) { - rc = SR352_WRITE_LIST(sr352_HD_50hz_setting); - } else { - rc = SR352_WRITE_LIST(sr352_HD_60hz_setting); - } -#if defined (AF_FLASH_SUPPORT) - SR352_WRITE_LIST(sr352_HD_AF_Init_Reg); -#endif - break; - case MSM_SENSOR_RES_4: - rc = SR352_WRITE_LIST(sr352_preview_800_480); - break; - case MSM_SENSOR_RES_5: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_640x480_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_640x480); - } - break; - case MSM_SENSOR_RES_6: - rc = SR352_WRITE_LIST(sr352_preview_320_240); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -void sr352_init_camera(struct msm_sensor_ctrl_t *s_ctrl, int flicker_type) -{ - int32_t rc = 0; - if(settings_type == 1) { - rc = SR352_WRITE_LIST_BURST(sr352_Init_Reg_01); - } else { - rc = SR352_WRITE_LIST_BURST(sr352_Init_Reg); - } - if(rc < 0) { - pr_err("%s:%d error writing initsettings failed\n", __func__, __LINE__); - } -#if defined (AF_FLASH_SUPPORT) - SR352_WRITE_LIST(sr352_AF_Init_Reg); -#endif - if(flicker_type == MSM_CAM_FLICKER_50HZ) { - rc = SR352_WRITE_LIST(sr352_50hz_setting); - } else { - rc = SR352_WRITE_LIST(sr352_60hz_setting); - } - if(rc <0) { - pr_err("%s:%d error writing 50hz failed\n", __func__, __LINE__); - } -} - -int32_t sr352_get_exif(struct ioctl_native_cmd * exif_info) -{ -#if defined (AF_FLASH_SUPPORT) - exif_info->value_1 = flash_status; -#else - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. -#endif - exif_info->value_2 = sr352_ctrl.exif_iso; - exif_info->value_3 = sr352_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr352_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value0 = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa0, - &read_value0, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa1, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa2, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa3, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr352_ctrl.exif_shutterspeed = 27323100 / ((read_value0 << 24) - + (read_value1 << 16) + (read_value2 << 8) + read_value3); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x50, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - - if (read_value4 < 0x26) - sr352_ctrl.exif_iso= 50; - else if (read_value4 < 0x5C) - sr352_ctrl.exif_iso = 100; - else if (read_value4 < 0x83) - sr352_ctrl.exif_iso = 200; - else - sr352_ctrl.exif_iso = 400; - - pr_debug("sr352_set_exif: ISO = %d shutter speed = %d", - sr352_ctrl.exif_iso,sr352_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING"); -#ifdef CONFIG_LOAD_FILE /* this call should be always called first */ - sr352_regs_table_init("/data/"REG_SET_FILE); - pr_err("/data/"REG_SET_FILE" inside CFG_SET_INIT_SETTING"); -#endif - sr352_init_camera(s_ctrl, cdata->flicker_type); - -#if !defined (AF_FLASH_SUPPORT) - //Stop stream and start in START_STREAM - CDBG("Stop stream after Init"); - SR352_WRITE_LIST(sr352_stop_stream); -#endif - break; - case CFG_SET_RESOLUTION: - if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3) { - - sr352_init_camera(s_ctrl, cdata->flicker_type); - //Stop stream and start in START_STREAM - SR352_WRITE_LIST(sr352_stop_stream); - CDBG("CFG CFG_SET_RESOLUTION - HD Recording mode off"); - cur_scene_mode_chg = 1; - } - else if(sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.resolution != MSM_SENSOR_RES_3) { -#if defined (AF_FLASH_SUPPORT) - sr352_recording_landing(s_ctrl); -#endif - - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_modeOff_01); - } - else { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_modeOff); - } - - rc = SR352_WRITE_LIST(sr352_stop_stream); - CDBG("CFG CFG_SET_RESOLUTION - Non - HD Recording mode off"); - } - sr352_ctrl.settings.prev_resolution = sr352_ctrl.settings.resolution; - sr352_ctrl.settings.resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , sr352_ctrl.settings.resolution); - if (sr352_ctrl.streamon == 0) { - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_PREVIEW: - { - sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); -#if !defined(AF_FLASH_SUPPORT) - if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.prev_resolution == MSM_SENSOR_RES_3) { - - sr352_set_ae_awb_lock(s_ctrl, 0); - msleep(100); - } - - if (sr352_ctrl.prev_mode == CAMERA_MODE_INIT) { - msleep(100); - } -#endif - } - break; - case CAMERA_MODE_CAPTURE: - { -#if defined (AF_FLASH_SUPPORT) - if (!is_af_run) - sr352_ae_stable_without_af(s_ctrl); - if (need_main_flash) { - SR352_WRITE_LIST(sr352_stop_stream); - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable4_1); - sr352_set_ev_data_mainFlash_func3(s_ctrl); - set_led_flash(MSM_CAMERA_LED_HIGH); - SR352_WRITE_LIST(sr352_StartMainFlash_FlashRegTable5); - flash_status = MSM_CAMERA_LED_HIGH; - } -#endif - sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); - } - break; - case CAMERA_MODE_RECORDING: - { -#if defined (AF_FLASH_SUPPORT) - if(sr352_ctrl.prev_mode != CAMERA_MODE_RECORDING || - sr352_ctrl.settings.resolution != MSM_SENSOR_RES_3) { - sr352_recording_landing(s_ctrl); - } -#endif - if ( sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3 ) { - CDBG("CFG writing *** sr352_recording_50Hz_HD"); - sr352_set_resolution( s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); - } else { - CDBG("CFG writing *** sr352_recording_50Hz_30fps"); - sr352_set_resolution( s_ctrl , MSM_SENSOR_RES_5, cdata->flicker_type); - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_30fps_01); - } - else { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_30fps); - } - //msleep(100); - } - } - break; - } - } - break; - case CFG_SET_STOP_STREAM: - if(sr352_ctrl.streamon == 1) { - CDBG(" CFG_SET_STOP_STREAM writing stop stream registers: sr352_stop_stream"); - sr352_ctrl.streamon = 0; - } -#if defined (AF_FLASH_SUPPORT) - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_CAPTURE: - if (need_main_flash) { - if (flash_status == MSM_CAMERA_LED_HIGH) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6); - sr352_return_ev_data_func4(s_ctrl); - SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7); - need_main_flash = 0; - } - } - is_af_run = 0; - break; - case CAMERA_MODE_RECORDING: - if (flash_status == MSM_CAMERA_LED_LOW) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - } - break; - } -#endif - break; - case CFG_SET_START_STREAM: - { - CDBG(" CFG_SET_START_STREAM writing start stream registers: sr352_start_stream start"); - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_PREVIEW: - { - CDBG(" CFG_SET_START_STREAM: Preview"); - if(sr352_ctrl.prev_mode != CAMERA_MODE_CAPTURE) { - sr352_set_scene_mode(s_ctrl, sr352_ctrl.settings.scenemode); - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - sr352_set_effect(s_ctrl , sr352_ctrl.settings.effect); - sr352_set_white_balance(s_ctrl , sr352_ctrl.settings.wb); - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering ); -#if defined (AF_FLASH_SUPPORT) - sr352_set_af_mode(s_ctrl, focus_mode); -#endif - } - } - break; - case CAMERA_MODE_CAPTURE: - { - CDBG("CFG_SET_START_STREAM: Capture"); - sr352_set_exif(s_ctrl); - } - break; - case CAMERA_MODE_RECORDING: - { - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - sr352_set_effect(s_ctrl , sr352_ctrl.settings.effect); - sr352_set_white_balance(s_ctrl , sr352_ctrl.settings.wb); - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering ); -#if defined (AF_FLASH_SUPPORT) - sr352_set_af_mode(s_ctrl, focus_mode); -#endif - } - break; - } - sr352_ctrl.streamon = 1; - } - break; - case CFG_SET_SLAVE_INFO: - { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - CDBG("CFG_SET_SLAVE_INFO"); - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("i %d power setting %d %d %ld %d", slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - CDBG("CFG_SET_SLAVE_INFO EXIT"); - break; - } - case CFG_WRITE_I2C_ARRAY: - { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - case CFG_WRITE_I2C_SEQ_ARRAY: - { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - case CFG_POWER_UP: - { - CDBG(" CFG_POWER_UP"); - sr352_ctrl.streamon = 0; - sr352_ctrl.op_mode = CAMERA_MODE_INIT; - sr352_ctrl.prev_mode = CAMERA_MODE_INIT; - sr352_ctrl.settings.prev_resolution = MSM_SENSOR_RES_FULL; - sr352_ctrl.settings.resolution = MSM_SENSOR_RES_FULL; -#if defined (AF_FLASH_SUPPORT) - flash_mode = 0; - flash_status = 0; - is_preflash = 0; - is_touchaf = 0; - focus_mode = 0; - need_main_flash = 0; - is_af_run = 0; - cur_scene_mode = 0; -#endif - sr352_check_hw_revision(); - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - } - break; - case CFG_POWER_DOWN: - { - CDBG("CFG_POWER_DOWN"); - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); -#if defined (AF_FLASH_SUPPORT) - if (flash_status) - set_led_flash(MSM_CAMERA_LED_OFF); - sr352_actuator_softlanding(s_ctrl); -#endif - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_LOAD_FILE - sr352_regs_table_exit(); -#endif - } - break; - case CFG_SET_STOP_STREAM_SETTING: - { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - } - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - - -#if defined (AF_FLASH_SUPPORT) -void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - is_preflash = sr352_is_required_flash(s_ctrl, flash_mode); - if (is_preflash) { - memset(&Flash, 0, sizeof(Flash)); - SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1); - sr352_get_ev_data_flash_Off_func1(s_ctrl); - SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2); - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - need_main_flash = 1; - msleep(600); /* AE become stable here */ - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3); - sr352_get_ev_data_preflash_func2(s_ctrl); - SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4); - msleep(50); - set_led_flash(MSM_CAMERA_LED_OFF); - msleep(300); - } -} - -void sr352_start_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - focus_reg &= 0xF7; - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_READ_ADDR(0x11, &focus_reg); - focus_reg |= 0x01; - SR352_WRITE_ADDR(0x11, focus_reg); - CDBG("SR352 %s focus_reg[0x%2x]\n", __func__, focus_reg); - -} - -void sr352_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - uint16_t focus_reg = 0; - uint16_t manual_af = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - SR352_READ_ADDR(0x14, &manual_af); - - switch(mode) - { - case CAMERA_AF_OCR: - case CAMERA_AF_MACRO: - focus_reg |= 0x40; /* set Macro Scan Mode */ - - SR352_READ_ADDR(0x11, &focus_reg); - - manual_af |= 0x10; /* set Macro Lens Position start */ - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_WRITE_ADDR(0x14, manual_af); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7C, 0x02); - SR352_WRITE_ADDR(0x7D, 0xB0); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &manual_af); - manual_af &= 0xEF; - SR352_WRITE_ADDR(0x14, manual_af); /* set Macro Lens Position End */ - break; - case CAMERA_AF_AUTO: - default: - focus_reg &= 0xBF; /* set Normal Scan Mode */ - - SR352_READ_ADDR(0x11, &focus_reg); - - manual_af |= 0x10; /* set Normal Lens Position start */ - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_WRITE_ADDR(0x14, manual_af); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7C, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &manual_af); - manual_af &= 0xEF; - SR352_WRITE_ADDR(0x14, manual_af); /* set Normal Lens Position End */ - break; - } - - CDBG("SR352 %s focus_reg[0x%2x]\n", __func__, focus_reg); -} - -void sr352_set_touch_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - - switch(mode) - { - case 0: - /* Center focus */ - focus_reg &= ~(0x02); /* clear 1st bit */ - break; - case 1: - /* Touch Focus */ - focus_reg |= 0x02; /* set 1st bit */ - break; - default: - /* Center focus */ - focus_reg &= ~(0x02); /* clear 1st bit */ - break; - } - - CDBG("DAFF %s focus_reg[0x%2x]\n", __func__, focus_reg); - SR352_WRITE_ADDR(0x11, focus_reg); -} - -void sr352_set_touchaf_pos(struct msm_sensor_ctrl_t *s_ctrl, int x, int y) -{ - uint16_t touch_x = x - XAXIS_START; - uint16_t touch_y = y - YAXIS_START; - uint16_t lcd_x = LCD_X; - uint16_t lcd_y = LCD_Y; - - if (x - XAXIS_START < 0 || y - YAXIS_START < 0) { - pr_err("%s Error position x_axis[%d] y_axis[%d]\n", - __func__, x - XAXIS_START, y - YAXIS_START); - return; - } - if(sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3) - { - uint32_t posX, posY; - - posX = ((x * 100) * 92)/10000; - posY = y; - if(posX < 200) - posX = 200; - else if(posX > 1112) - posX = 1112; - if(posY < 200) - posY = 200; - else if(posY > 538) - posY = 538; - - SR352_WRITE_ADDR(0x03, 0xD0); - - SR352_WRITE_ADDR(0xFA, (posY >> 8)); - SR352_WRITE_ADDR(0xFB, (posY & 0xFF)); - SR352_WRITE_ADDR(0xFC, (posX >> 8)); - SR352_WRITE_ADDR(0xFD, (posX & 0xFF)); - } - else - { - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_WRITE_ADDR(0x15, 0xCA); - SR352_WRITE_ADDR(0x03, 0xD1); - - SR352_WRITE_ADDR(0x10, (lcd_y >> 8)); - SR352_WRITE_ADDR(0x11, (lcd_y & 0xFF)); - SR352_WRITE_ADDR(0x12, (lcd_x >> 8)); - SR352_WRITE_ADDR(0x13, (lcd_x & 0xFF)); - - SR352_WRITE_ADDR(0x03, 0xD0); - - SR352_WRITE_ADDR(0xFA, (touch_y >> 8)); - SR352_WRITE_ADDR(0xFB, (touch_y & 0xFF)); - SR352_WRITE_ADDR(0xFC, (touch_x >> 8)); - SR352_WRITE_ADDR(0xFD, (touch_x & 0xFF)); - } - return; -} - - -int sr352_is_required_flash(struct msm_sensor_ctrl_t *s_ctrl, int flash_mode) -{ - int rc = 0; - uint16_t bpga = 0, bpgath = 0, flashctl = 0; - - if (sr352_ctrl.op_mode == CAMERA_MODE_RECORDING) - return 0; - - switch(flash_mode) { - //case CAMERA_FLASH_TORCH: - case CAMERA_FLASH_ON: - rc = 1; - break; - case CAMERA_FLASH_AUTO: - SR352_WRITE_ADDR(0x03, ((FLASH_PGARO>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_PGARO & 0xFF), &bpga); - - SR352_WRITE_ADDR(0x03, ((FLASH_PGATH>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_PGATH & 0xFF), &bpgath); - - if (bpga >= bpgath) - rc = 1; - else - rc = 0; - break; - default: - rc = 0; - } - - SR352_WRITE_ADDR(0x03, ((FLASH_CTL1>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_CTL1 & 0xFF), &flashctl); - if (flashctl & 0x80) - rc = 0; - - CDBG("FLASHDBG mode[%2x] bpga[%2x] bpgath[%2x] flashctl[%2x] isFlash[%2x]\n", - flash_mode, bpga, bpgath, flashctl, rc); - - return rc; -} - -void sr352_get_sensor_ev_data(struct msm_sensor_ctrl_t *s_ctrl, uint16_t PreFlashEnable) -{ - - //PreFlashEnable = 0: Pre flash off timing - //PreFlashEnable = 1: Pre flash on timing - - uint16_t temp; - uint16_t wRgain, wGgain, wBgain; - uint16_t Pga, Dg, Yavg, Ytgt, Step; - uint16_t wTmp1, wTmp2, wTmp3, wTmp4, wTmp5, wTmp6; - uint32_t dwTmp1, dwTmp2, dwTmp3, dwTmp4, dwExptime, dwEv; - - SR352_WRITE_ADDR(0x03, 0x20); - SR352_READ_ADDR(0xA4, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA5, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA6, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA7, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xAB, &Pga); - SR352_READ_ADDR(0xAE, &Dg); - - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0x7B, &Yavg);//Y Mean - SR352_READ_ADDR(0x7C, &Ytgt);//Y Target - SR352_READ_ADDR(0x99, &Step);//BandStep - - dwExptime = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //Org Exptime - dwEv = (uint32_t)((dwExptime * (((uint32_t)Pga*100)/32)*1)/100); - CDBG_FL("%d FLDBG func0 dwEv[%u]\n", __LINE__, dwEv); - - SR352_WRITE_ADDR(0x03, 0x16); - SR352_READ_ADDR(0xC0, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC1, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC2, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC3, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC4, &temp); - wTmp5 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC5, &temp); - wTmp6 = (uint16_t)temp; - temp=0; - wRgain = (wTmp1<<8) + wTmp2; - wBgain = (wTmp3<<8) + wTmp4; - wGgain = (wTmp5<<8) + wTmp6; - - if(PreFlashEnable) { - Flash.dwPreFlashEv = dwEv; //Org Ev - Flash.dwPreExptime = dwExptime; //Org Exptime - Flash.bPrePga = Pga; - Flash.bPreDg = Dg; - Flash.bPreFlashY = Yavg; //Y Mean - Flash.bPreFlashTgt = Ytgt; //Y Target - Flash.wPreFlashRgain= wRgain; - Flash.wPreFlashGgain= wGgain; - Flash.wPreFlashBgain= wBgain; - } else { - Flash.dwOrgEv = dwEv; //Org Ev - Flash.dwOrgExptime = dwExptime; //Org Exptime - Flash.bOrgPga = Pga; - Flash.bOrgDg = Dg; - Flash.bOrgY = Yavg; //Y Mean - Flash.bOrgTgt = Ytgt; //Y Target - Flash.wOrgRgain = wRgain; - Flash.wOrgGgain = wGgain; - Flash.wOrgBgain = wBgain; - } -} - -void sr352_get_ev_data_flash_Off_func1(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t temp; - uint16_t wTmp1, wTmp2, wTmp3, wTmp4, wTmp5, wTmp6; - uint32_t dwTmp1, dwTmp2, dwTmp3, dwTmp4; - - SR352_WRITE_ADDR(0x03, ((FLASH_PRE_FLASHRATE>>8)&0xFF)); - SR352_READ_ADDR(FLASH_PRE_FLASHRATE &0xFF, &(Flash.bPFlashRate ));//PreFlash:20% - SR352_READ_ADDR(FLASH_MAIN_FLASHRATE&0xFF, &(Flash.bMFlashRate));//MainFlash:80% - - /////////////////////////////////////////////////////////////////////////////////////// - //For AE - /////////////////////////////////////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x20); - SR352_READ_ADDR(0x51, &(Flash.bAgMax)); - SR352_READ_ADDR(0x52, &(Flash.bAgMin)); - SR352_READ_ADDR(0x71, &(Flash.bDgMax)); - SR352_READ_ADDR(0x72, &(Flash.bDgMin)); - SR352_READ_ADDR(0x24, &temp); - dwTmp1 = temp; - temp = 0; - - SR352_READ_ADDR(0x25, &temp); - dwTmp2 = temp; - temp = 0; - - SR352_READ_ADDR(0x26, &temp); - dwTmp3 = temp; - temp = 0; - - SR352_READ_ADDR(0x27, &temp); - dwTmp4 = temp; - temp = 0; - - Flash.dwExpMax = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; - - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0x38, &(Flash.bDgRatio)); - SR352_READ_ADDR(0x72, &(Flash.bDgCtl)); - SR352_READ_ADDR(0x73, &(Flash.bAntiFlag)); - SR352_READ_ADDR(0x76, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x77, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x78, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x79, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x39, &temp); - wTmp1 = temp; - temp = 0; - SR352_READ_ADDR(0x3A, &temp); - wTmp2 = temp; - temp = 0; - Flash.dwExpBand = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //ExpBand - Flash.wOneLine = (wTmp1<<8) + wTmp2; //OneLine - - if (Flash.bDgRatio == 0) { - pr_err("%s:%d ERROR: bDgRatio is Zero Here\n", __func__, __LINE__); - return; - } - - Flash.fAgMin = ((uint32_t)Flash.bAgMin * 100)/32; - Flash.fDgMin = ((uint32_t)Flash.bDgMin * 100)/Flash.bDgRatio; - Flash.fAgMax = ((uint32_t)Flash.bAgMax * 100)/32; - Flash.fDgMax = ((uint32_t)Flash.bDgMax * 100)/Flash.bDgRatio; - - Flash.dwExpMin = (uint32_t)Flash.wOneLine*4; - Flash.dwEvMin = (uint32_t)((Flash.dwExpMin * (Flash.fAgMin * 1)/100)); - - //Get Ev data before Pre Flash time - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0xA7, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA8, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA9, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xAA, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - Flash.dwOrgEvRO = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //Sensor EV - /////////////////////////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////////////////////////// - //For AWB - /////////////////////////////////////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_READ_ADDR(0x66, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x67, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x68, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x69, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x6E, &temp); - dwTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x6F, &temp); - dwTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x70, &temp); - dwTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x71, &temp); - dwTmp4 = (uint16_t)temp; - temp=0; - Flash.wRgainMin = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wRgainMax = (uint16_t)((wTmp3 <<8) + wTmp4); - Flash.wBgainMin = (uint16_t)((dwTmp1<<8) + dwTmp2); - Flash.wBgainMax = (uint16_t)((dwTmp3<<8) + dwTmp4); - - SR352_WRITE_ADDR(0x03, ((FLASH_AWB_YDIFF>>8)&0xFF)); - SR352_READ_ADDR(FLASH_AWB_YDIFF&0xFF, &(Flash.bYdiffTh ));//YDiffTh - SR352_READ_ADDR((FLASH_AWB_TGTRGAIN&0xFF) , &temp ); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTRGAIN&0xFF)+1, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTGGAIN&0xFF) , &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTGGAIN&0xFF)+1, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTBGAIN&0xFF) , &temp); - wTmp5 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTBGAIN&0xFF)+1, &temp); - wTmp6 = (uint16_t)temp; - temp=0; - Flash.wTgtRgain = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wTgtGgain = (uint16_t)((wTmp3 <<8) + wTmp4); - Flash.wTgtBgain = (uint16_t)((wTmp5 <<8) + wTmp6); - - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_READ_ADDR(0x5C, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5D, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5E, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5F, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - Flash.wOrgRgTgt = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wOrgBgTgt = (uint16_t)((wTmp3 <<8) + wTmp4); - ///////////////////////////////////////////////////////////////////////////////////////// - //For test code - //Flash.bYdiffTh = 10; - //Flash.wTgtRgain = 0x5C0; - //Flash.wTgtGgain = 0x400; - //Flash.wTgtBgain = 0x680; - - sr352_get_sensor_ev_data(s_ctrl,0); - CDBG_FL("FLDBG1[func:%s] dwOrgEv[0x%x] dwOrgExptime[0x%x] bOrgPga[0x%x] bOrgDg[0x%x] bOrgY[0x%x] bOrgTgt[0x%x] dwOrgEvRO[0x%x]\n", - __func__, Flash.dwOrgEv, Flash.dwOrgExptime, Flash.bOrgPga, Flash.bOrgDg, Flash.bOrgY, Flash.bOrgTgt, Flash.dwOrgEvRO); -} - -void sr352_get_ev_data_preflash_func2(struct msm_sensor_ctrl_t *s_ctrl) -{ - SR352_WRITE_ADDR(0x03,((FLASH_CTL1>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CTL1&0xFF, &(Flash.bFlashCtl1)); - - //--------------------------------------------// - //Get Ev data after end of Pre Flash time - sr352_get_sensor_ev_data(s_ctrl, 1); - //--------------------------------------------// - //Checking Ev data variation - if ((Flash.dwOrgEv >= Flash.dwPreFlashEv) && !(Flash.bFlashCtl1 & 0x80)) { - - if (!Flash.bOrgY || !Flash.dwPreFlashEv || !Flash.bPFlashRate) { - pr_err("%s:%d ERROR: bOrgY[%d] dwPreFlashEv[%d] bPFlashRate[%d] Divide By ZERO\n", - __func__, __LINE__, Flash.bOrgY, Flash.dwPreFlashEv, Flash.bPFlashRate); - return; - } - Flash.fPreFlash_Ymean = (uint32_t)(((uint32_t)((Flash.dwOrgEv*100) / Flash.dwPreFlashEv) *\ - ((uint32_t)((uint32_t)Flash.bPreFlashY*1000) / (uint32_t)Flash.bOrgY) * Flash.bOrgY)/10000); - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_Ymen[%u] = ([%u]/[%u])*([%u]/[%u])*[%u]\n", __LINE__, - Flash.fPreFlash_Ymean, Flash.dwOrgEv, Flash.dwPreFlashEv, Flash.bPreFlashY, Flash.bOrgY, Flash.bOrgY); - - Flash.fPreFlash_Yinc = (uint32_t)((Flash.fPreFlash_Ymean * 100)/ Flash.bOrgY); - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_Yinc[%u] = [%u]/[%u]\n", __LINE__, - Flash.fPreFlash_Yinc, Flash.fPreFlash_Ymean, Flash.bOrgY); - Flash.fMainFlash_Rate = (((uint32_t)Flash.bMFlashRate * 1000)/(uint32_t)Flash.bPFlashRate)/1000; - if (Flash.fPreFlash_Ymean >= ((uint32_t)Flash.bOrgY*10)) { - Flash.fPreFlash_YDiff = (Flash.fPreFlash_Ymean - ((uint32_t)Flash.bOrgY*10)); - Flash.fMainFlash_Ymean = ((Flash.fPreFlash_YDiff * Flash.fMainFlash_Rate) + Flash.fPreFlash_Ymean)/10; - } else { - Flash.fPreFlash_YDiff = (((uint32_t)Flash.bOrgY*10) - Flash.fPreFlash_Ymean); - Flash.fMainFlash_Ymean = (Flash.fPreFlash_Ymean - (Flash.fPreFlash_YDiff * Flash.fMainFlash_Rate))/10; - } - - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_YDiff[%u] = [%u] - [%u]\n", __LINE__, - Flash.fPreFlash_YDiff, Flash.fPreFlash_Ymean, Flash.bOrgY); - - if (Flash.bFlashCtl1 & 0x10) { - CDBG_FL("%d func2 FLDBG2 NEVER HERE\n", __LINE__); - - SR352_WRITE_ADDR(0x03,((FLASH_CALCRATIOTH>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CALCRATIOTH&0xFF, &(Flash.bFlashCalcRatioTh)); - SR352_READ_ADDR(FLASH_CALCRATIOMAX&0xFF, &(Flash.bFlashCalcRatioMax)); - - if (!Flash.bFlashCalcRatioTh) { - pr_err("%s:%d ERROR bFlashCalcRatioTh[%d] Divide By Zero!\n", - __func__, __LINE__, Flash.bFlashCalcRatioTh); - return; - } - - if( Flash.fPreFlash_Yinc < 1000) { - //Flash.fFlashCalcRatio = ((((Flash.fPreFlash_Yinc-1)*100) / Flash.bFlashCalcRatioTh)/1000); - - Flash.fFlashCalcRatio = ((((1000-Flash.fPreFlash_Yinc)*100) / Flash.bFlashCalcRatioTh)/1000); - } else { - Flash.fFlashCalcRatio = (((((int)Flash.fPreFlash_Yinc-1000)*100) / Flash.bFlashCalcRatioTh)/1000); - } - - if(Flash.bFlashCalcRatioMax < Flash.fFlashCalcRatio) - Flash.fFlashCalcRatio = Flash.bFlashCalcRatioMax; - - if( Flash.fPreFlash_Yinc < 1000) { - //Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * (((100-Flash.fFlashCalcRatio) * 1000)/100))/1000; - Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * ((100000+Flash.fFlashCalcRatio)/100000)); - } else { - Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * ((100000-Flash.fFlashCalcRatio)/100000)); - } - } - - CDBG_FL("%d func2 FLDBG2 Flash.bPreFlashTgt[%u] >= Flash.fMainFlash_Ymean[%u]\n", __LINE__, - Flash.bPreFlashTgt, Flash.fMainFlash_Ymean); - if (Flash.bPreFlashTgt >= Flash.fMainFlash_Ymean) { - Flash.fYcalRate = 100; - CDBG_FL("%d func2 FLDBG2 Flash.fYcalRate[%u]\n", __LINE__, 1); - } else { - if (!Flash.bPreFlashTgt) { - pr_err("%s:%d ERROR: bPreFlashTgt[%d] Divide By Zero\n", - __func__, __LINE__, Flash.bPreFlashTgt); - return; - } - Flash.fYcalRate = ((Flash.fMainFlash_Ymean * 100)/ Flash.bPreFlashTgt); - CDBG_FL("%d func2 FLDBG2 Flash.fYcalRate[%u] = [%u]/[%u]\n", __LINE__, - Flash.fYcalRate, Flash.fMainFlash_Ymean, Flash.bPreFlashTgt); - } - - if (!Flash.fYcalRate) { - pr_err("%s:%d ERROR: fYcalRate[%d] Divide By Zero\n", - __func__, __LINE__, Flash.fYcalRate); - return; - } - - Flash.dwMainFlashEv = ((Flash.dwOrgEv*100) / Flash.fYcalRate); - CDBG_FL("%d func2 FLDBG2 Flash.dwMainFlashEv[%u] = [%u]/[%u]\n", __LINE__, - Flash.dwMainFlashEv, Flash.dwOrgEv, Flash.fYcalRate); - - CDBG_FL("%d func2 FLDBG2 dwMainFlashEv[%u] < dwEvMin[%u]\n", __LINE__, - Flash.dwMainFlashEv, Flash.dwEvMin); - if (Flash.dwMainFlashEv < Flash.dwEvMin) { - Flash.dwMainFlashEv = Flash.dwEvMin; - } - - CDBG_FL("%d func2 FLDBG2 case1[0x%0x], case2[0x%0x]\n", __LINE__, - ((uint32_t)(Flash.dwMainFlashEv/(Flash.wOneLine * Flash.fAgMin * Flash.fDgMin))) * Flash.wOneLine, - ((uint32_t)(Flash.dwMainFlashEv/(Flash.dwExpBand * Flash.fAgMin * Flash.fDgMin))) * Flash.dwExpBand); - - //Checking whether Indoor or outdoor condition. --> //Exptime step calc - if (((Flash.bAntiFlag & ~0x02)&&(Flash.dwMainFlashEv < (Flash.dwExpBand)))\ - || ((Flash.bAntiFlag & 0x02)&&(Flash.dwMainFlashEv < (Flash.dwExpBand*2)))) { - - //Outdoor condition - if (!Flash.wOneLine || !Flash.fAgMin) { - pr_err("%s:%d ERROR: wOneLine[%d], fAgMin[%d] Divide By Zero\n", - __func__, __LINE__, Flash.wOneLine, Flash.fAgMin); - return; - } - - Flash.dwMainFlashBandStep = (uint32_t)(((Flash.dwMainFlashEv*10)/((Flash.wOneLine * Flash.fAgMin * 1)/100))/10); - Flash.dwMainFlashExp = Flash.dwMainFlashBandStep * Flash.wOneLine; - CDBG_FL("%d func2 FLDBG2 Outdoor [%u]\n", __LINE__, Flash.dwMainFlashExp); - } else { - - //Indoor condition - if (!Flash.dwExpBand|| !Flash.fAgMin) { - pr_err("%s:%d ERROR: dwExpBand[%d], fAgMin[%d] Divide By Zero\n", - __func__, __LINE__, Flash.dwExpBand, Flash.fAgMin); - return; - } - Flash.dwMainFlashBandStep = (uint32_t)(((Flash.dwMainFlashEv*10)/(Flash.dwExpBand * (Flash.fAgMin * 1/100)))/10); - Flash.dwMainFlashExp = (Flash.dwMainFlashBandStep * Flash.dwExpBand); - CDBG_FL("%d func2 FLDBG2 Indoor[%u]\n", __LINE__, Flash.dwMainFlashExp); - } - - //Check EV limit - if(Flash.dwMainFlashExp < Flash.dwExpMin) { Flash.dwMainFlashExp = Flash.dwExpMin; } - else if(Flash.dwMainFlashExp > Flash.dwExpMax) { Flash.dwMainFlashExp = Flash.dwExpMax; } - - //Calc PGA - if (!Flash.dwMainFlashExp) { - pr_err("%s:%d ERROR: dwMainFlashExp[%d] Divide By Zero\n", - __func__, __LINE__, Flash.dwMainFlashExp); - return; - } - Flash.fMainFlashAg = ((Flash.dwMainFlashEv*10)/(Flash.dwMainFlashExp *1))*100/10; - if(Flash.fMainFlashAg < Flash.fAgMin){ Flash.fMainFlashAg = Flash.fAgMin; } - else if(Flash.fMainFlashAg > Flash.fAgMax){ Flash.fMainFlashAg = Flash.fAgMax; } - - Flash.bMainFlashAg = (uint8_t)((Flash.fMainFlashAg * 32)/100); - - //Calc DG - if(Flash.bDgCtl & 0x01) { - //DGain On - Flash.fMainFlashDg = ((Flash.dwMainFlashEv*10) / (Flash.dwMainFlashExp * Flash.fMainFlashAg/100))/10*100; - if(Flash.fMainFlashDg < Flash.fDgMin){ Flash.fMainFlashDg = Flash.fDgMin; } - else if(Flash.fMainFlashDg > Flash.fDgMax){ Flash.fMainFlashDg = Flash.fDgMax; } - Flash.bMainFlashDg = (uint8_t)((Flash.fMainFlashDg * Flash.bDgRatio)/100); - } else { - Flash.bMainFlashDg = Flash.bDgRatio; - } - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // AWB cal - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(Flash.fPreFlash_Yinc < 1000) { - Flash.fPreFlash_Yinc = 1000; - } - - Flash.fYdiffRatio = ((((int)Flash.fPreFlash_Yinc-1000)/((uint32_t)Flash.bYdiffTh))*100)/1000; - - if(Flash.fYdiffRatio > 100){ Flash.fYdiffRatio = 100; } - else if(Flash.fYdiffRatio < 0){ Flash.fYdiffRatio = 0; } - - Flash.wMainFlashRgain = (uint16_t)(((((((int)Flash.wTgtRgain-Flash.wPreFlashRgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashRgain )); - Flash.wMainFlashGgain = (uint16_t)(((((((int)Flash.wTgtGgain-Flash.wPreFlashGgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashGgain )); - Flash.wMainFlashBgain = (uint16_t)(((((((int)Flash.wTgtBgain-Flash.wPreFlashBgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashBgain )); - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - Flash.bState = 0x01; - } else { - Flash.bState = 0x00; - } - - CDBG_FL("FLDBG1[func:%s] dwPreFlashEv[0x%x] dwPreExptime[0x%x] bPrePga[0x%x] bPreDg[0x%x] bPreFlashY[0x%x] bPreFlashTgt[0x%x]" - " dwMainFlashEv[0x%x] dwMainFlashExp[0x%x] bMainFlashAg[0x%x] bMainFlashDg[0x%x]\n", - __func__, Flash.dwPreFlashEv, Flash.dwPreExptime, Flash.bPrePga, Flash.bPreDg, Flash.bPreFlashY, Flash.bPreFlashTgt, - Flash.dwMainFlashEv, Flash.dwMainFlashExp, Flash.bMainFlashAg, Flash.bMainFlashDg); -} - -void sr352_set_ev_data_mainFlash_func3(struct msm_sensor_ctrl_t *s_ctrl) -{ - //WriteEvDataForMainFlash - if(Flash.bState) { - - SR352_WRITE_ADDR(0x03,((FLASH_CTL1>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CTL1&0xFF, &(Flash.bFlashCtl1)); - - if(!(Flash.bFlashCtl1 & 0x40)) { - - ////////////////////////////////////////////////////// - //AE Register Update[ ExpTime, Gain ] - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0x44, (Flash.dwMainFlashExp>>24)&0xFF);//ExpTime - SR352_WRITE_ADDR(0x45, (Flash.dwMainFlashExp>>16)&0xFF); - SR352_WRITE_ADDR(0x46, (Flash.dwMainFlashExp>> 8)&0xFF); - SR352_WRITE_ADDR(0x47, (Flash.dwMainFlashExp )&0xFF); - SR352_WRITE_ADDR(0x40, Flash.bMainFlashAg);//Gain - SR352_WRITE_ADDR(0x41, Flash.bMainFlashDg); - //Update New ExpTime & Gain - SR352_WRITE_ADDR(0x03, 0x20); - SR352_WRITE_ADDR(0x20, (Flash.dwMainFlashExp>>24)&0xFF); - SR352_WRITE_ADDR(0x21, (Flash.dwMainFlashExp>>16)&0xFF); - SR352_WRITE_ADDR(0x22, (Flash.dwMainFlashExp>> 8)&0xFF); - SR352_WRITE_ADDR(0x23, (Flash.dwMainFlashExp )&0xFF); - SR352_WRITE_ADDR(0x50, Flash.bMainFlashAg); - SR352_WRITE_ADDR(0x70, Flash.bMainFlashDg); - //Update flag - SR352_WRITE_ADDR(0x03, 0xc7); - SR352_WRITE_ADDR(0x76, 0x00); - SR352_WRITE_ADDR(0x77, 0x00); - SR352_WRITE_ADDR(0x78, 0x00); - SR352_WRITE_ADDR(0x79, 0x00); - } - - if(!(Flash.bFlashCtl1 & 0x20)) { - ////////////////////////////////////////////////////// - //AWB Register Update - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x16); - SR352_WRITE_ADDR(0xA2, (Flash.wMainFlashRgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA3, (Flash.wMainFlashRgain )&0xFF); - SR352_WRITE_ADDR(0xA4, (Flash.wMainFlashBgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA5, (Flash.wMainFlashBgain )&0xFF); - SR352_WRITE_ADDR(0xA6, (Flash.wMainFlashGgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA7, (Flash.wMainFlashGgain )&0xFF); - } - - if(Flash.bFlashCtl1 & 0x08) { - - SR352_WRITE_ADDR(0x03, 0x00); - SR352_WRITE_ADDR(0x60, (Flash.bFlashCtl1&0x07)); - } - } -} - -void sr352_return_ev_data_func4(struct msm_sensor_ctrl_t *s_ctrl) -{ - - uint16_t i, bTmp1, bTmp2; - - if(Flash.bState) { - ////////////////////////////////////////////////////// - //AE Register Update[ ExpTime, Gain ] - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x20); - SR352_WRITE_ADDR(0x20, (Flash.dwOrgExptime>>24)&0xFF); //HW ExpTime - SR352_WRITE_ADDR(0x21, (Flash.dwOrgExptime>>16)&0xFF); - SR352_WRITE_ADDR(0x22, (Flash.dwOrgExptime>> 8)&0xFF); - SR352_WRITE_ADDR(0x23, (Flash.dwOrgExptime )&0xFF); - SR352_WRITE_ADDR(0x50, Flash.bOrgPga); //HW pga - SR352_WRITE_ADDR(0x70, Flash.bOrgDg); - //Update EV - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0xA7, (Flash.dwOrgEvRO>>24)&0xFF); //EV - SR352_WRITE_ADDR(0xA8, (Flash.dwOrgEvRO>>16)&0xFF); - SR352_WRITE_ADDR(0xA9, (Flash.dwOrgEvRO>> 8)&0xFF); - SR352_WRITE_ADDR(0xAA, (Flash.dwOrgEvRO )&0xFF); - //Update Exp - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0x44, (Flash.dwOrgExptime>>24)&0xFF); //SW ExpTime - SR352_WRITE_ADDR(0x45, (Flash.dwOrgExptime>>16)&0xFF); - SR352_WRITE_ADDR(0x46, (Flash.dwOrgExptime>> 8)&0xFF); - SR352_WRITE_ADDR(0x47, (Flash.dwOrgExptime )&0xFF); - SR352_WRITE_ADDR(0x40, Flash.bOrgPga); //SW pga - SR352_WRITE_ADDR(0x41, Flash.bOrgDg); - SR352_WRITE_ADDR(0x7b, Flash.bOrgY); - ////////////////////////////////////////////////////// - //AWB Register Update - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x16); - SR352_WRITE_ADDR(0xA2, (Flash.wOrgRgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA3, (Flash.wOrgRgain )&0xFF); - SR352_WRITE_ADDR(0xA4, (Flash.wOrgBgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA5, (Flash.wOrgBgain )&0xFF); - SR352_WRITE_ADDR(0xA6, (Flash.wOrgGgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA7, (Flash.wOrgGgain )&0xFF); - //AWB state reset - SR352_WRITE_ADDR(0x03, 0xCA); - SR352_WRITE_ADDR(0xA1, 0x00); - SR352_WRITE_ADDR(0xA3, 0x00); - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_WRITE_ADDR(0x74, 0x00); - //AWB Tgt initial - SR352_WRITE_ADDR(0x03, 0x26); - SR352_READ_ADDR(0xAA, &bTmp1); - SR352_READ_ADDR(0xAB, &bTmp2); - SR352_WRITE_ADDR(0xAA, 0x0B); - SR352_WRITE_ADDR(0xAB, 0xE7); -#if 0 - Flash.wOrgRgTgt = 0x800; - Flash.wOrgBgTgt = 0x800; -#endif - SR352_WRITE_ADDR(0x03, 0xCD); - for(i=0; i<15; i++) { - SR352_WRITE_ADDR((0x10+(i*2) ), ((Flash.wOrgRgTgt>>8)&0xFF)); - SR352_WRITE_ADDR((0x10+(i*2)+1), ((Flash.wOrgRgTgt )&0xFF)); - SR352_WRITE_ADDR(((0x2E)+(i*2) ), ((Flash.wOrgBgTgt>>8)&0xFF)); - SR352_WRITE_ADDR(((0x2E)+(i*2)+1), ((Flash.wOrgBgTgt )&0xFF)); - } - - SR352_WRITE_ADDR(0x03, 0x26); - SR352_WRITE_ADDR(0xAA, bTmp1); - SR352_WRITE_ADDR(0xAB, bTmp2); - - Flash.bState = 0x00; - } -} - -void sr352_recording_landing(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t Recording_Pos = 0; - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &Recording_Pos); - Recording_Pos |= 0x10; - SR352_WRITE_ADDR(0x14, Recording_Pos); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7c, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, & Recording_Pos); - Recording_Pos &= ~(0x10); -} -void sr352_actuator_softlanding(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t landing_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &landing_reg); - landing_reg |= 0x10; - SR352_WRITE_ADDR(0x14, landing_reg); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7c, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &landing_reg); - landing_reg &= ~(0x10); - SR352_WRITE_ADDR(0x14, landing_reg); -} - -void sr352_cancel_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - - focus_reg |= 0x08; /* set 3rd bit */ - - CDBG("DAFF %s focus_reg[0x%2x]\n", __func__, focus_reg); - SR352_WRITE_ADDR(0x11, focus_reg); -} - -int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos) -{ - int rc = -EINVAL; - - switch(status) { - case SENSOR_AF_START: - CDBG("SENSOR_AF_START\n"); - is_af_run = 1; - is_preflash = sr352_is_required_flash(s_ctrl, flash_mode); - - if (is_preflash) { - memset(&Flash, 0, sizeof(Flash)); - SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1); - sr352_get_ev_data_flash_Off_func1(s_ctrl); - SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2); - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - rc = SENSOR_AF_PRE_FLASH_ON; - need_main_flash = 1; - } else { - sr352_start_af(s_ctrl); - need_main_flash = 0; - rc = SENSOR_AF_START; - } - break; - case SENSOR_AF_PRE_FLASH_OFF: - CDBG("SENSOR_AF_PRE_FLASH_OFF\n"); - if (is_preflash) { - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3); - sr352_get_ev_data_preflash_func2(s_ctrl); - SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4); - if (!is_touchaf) - msleep(100); - - set_led_flash(MSM_CAMERA_LED_OFF); - if (is_touchaf) { - is_touchaf = 0; - } - flash_status = MSM_CAMERA_LED_OFF; - is_preflash = 0; - } - rc = SENSOR_AF_PRE_FLASH_OFF; - break; - case SENSOR_AF_PRE_FLASH_AE_STABLE: - CDBG("SENSOR_AF_PRE_FLASH_AE_STABLE\n"); - if (is_preflash) { - - sr352_start_af(s_ctrl); - } - rc = SENSOR_AF_START; - break; - case SENSOR_AF_CANCEL: - CDBG("SENSOR_AF_CANCEL\n"); - sr352_cancel_af(s_ctrl); - is_af_run = 0; - break; - default: - pr_err("%s:%d Invalid argument\n", __func__, __LINE__); - } - - return rc; -} -int32_t sr352_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, int is_search_status) -{ - unsigned short af_status = 0; - CDBG("is_search_status %d\n", is_search_status); - switch (is_search_status) { - case 0: - SR352_WRITE_ADDR(0x03, 0xD2); - SR352_READ_ADDR(0x11, &af_status); - CDBG("1st AF status before : %x\n", af_status); - if (af_status & 0x04) - af_status = 2; // AF completed. - else - af_status = 1; //still 1st search running. - CDBG("1st AF status after: %x\n", af_status); - break; - case 1: - SR352_WRITE_ADDR(0x03, 0xD2); - SR352_READ_ADDR(0x11, &af_status); - if (af_status & 0x02) - af_status = 0; //success - else if (af_status & 0x01) - af_status = 1; //failure - else - af_status = -1; // AF status unknown. - CDBG("2nd AF status : %d\n", af_status); - break; - default: - pr_err("%s:%d unexpected mode is coming from HAL\n", __func__, __LINE__); - } - CDBG("return_af_status = %d\n", af_status); - return af_status; -} -#endif - -int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - /*CDBG("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3);*/ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr352_ctrl.settings.exposure = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr352_ctrl.settings.wb = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_white_balance(s_ctrl, sr352_ctrl.settings.wb); - break; - case EXT_CAM_METERING: - sr352_ctrl.settings.metering = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering); - break; - case EXT_CAM_EFFECT: - sr352_ctrl.settings.effect = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_effect(s_ctrl, sr352_ctrl.settings.effect); - break; - case EXT_CAM_SCENE_MODE: - sr352_ctrl.settings.scenemode = (cam_info->value_1); - cur_scene_mode_chg = 1; - if(sr352_ctrl.streamon == 1) - sr352_set_scene_mode(s_ctrl, sr352_ctrl.settings.scenemode); - break; - case EXT_CAM_SENSOR_MODE: - sr352_ctrl.prev_mode = sr352_ctrl.op_mode; - sr352_ctrl.op_mode = (cam_info->value_1); - pr_info("EXT_CAM_SENSOR_MODE = %d", sr352_ctrl.op_mode); - break; - case EXT_CAM_EXIF: - sr352_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB lock[%d]\n", cam_info->value_1); - sr352_ctrl.settings.aeawblock = cam_info->value_1; -#if defined (AF_FLASH_SUPPORT) - if(!flash_mode){ - CDBG("EXT_CAM_SET_AE_AWB, !flash_mode"); - sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock); - } -#else - sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock); -#endif - break; -#if defined (AF_FLASH_SUPPORT) - case EXT_CAM_FOCUS: - CDBG("DAFF EXT_CAM_FOCUS focus mode[%d]\n", cam_info->value_1); - focus_mode = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_af_mode(s_ctrl, focus_mode); - break; - case EXT_CAM_SET_AF_STATUS: - CDBG("DAFF EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2); - - cam_info->value_1 = sr352_set_af_status(s_ctrl, cam_info->value_1, - cam_info->value_2); - - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_TOUCHAF_POS: - CDBG("DAFF EXT_CAM_SET_TOUCHAF_POS: %d : %d", cam_info->value_1, cam_info->value_2); - - if(cam_info->value_1 !=0 && cam_info->value_2 != 0) { - sr352_set_touchaf_pos(s_ctrl, cam_info->value_1, cam_info->value_2); - is_touchaf = 1; - } else { - is_touchaf = 0; - } - - sr352_set_touch_mode(s_ctrl, is_touchaf); - - break; - case EXT_CAM_GET_AF_STATUS: - CDBG("DAFF EXT_CAM_GET_AF_STATUS: %d\n", cam_info->value_1); - - cam_info->value_1 = sr352_get_af_status(s_ctrl, cam_info->value_1); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_FLASH_MODE: - CDBG("DAFF EXT_CAM_FLASH_MODE = %d\n", (cam_info->value_1)); - flash_mode = cam_info->value_1; - if((flash_mode) == CAMERA_FLASH_TORCH) { - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - } else { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - } - break; - case EXT_CAM_SET_FLASH: - CDBG("DAFF EXT_CAM_SET_FLASH = %d\n", (cam_info->value_1)); - if (flash_mode != CAMERA_FLASH_TORCH) { - if (need_main_flash) { - if (flash_status == MSM_CAMERA_LED_HIGH) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6); - sr352_return_ev_data_func4(s_ctrl); - SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7); - need_main_flash = 0; - } else { - flash_status = cam_info->value_1; - set_led_flash(flash_status); - } - } - } - break; -#endif - default: - rc = 0; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -void sr352_set_default_settings(void) -{ - sr352_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr352_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr352_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr352_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr352_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr352_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - sr352_ctrl.settings.aeawblock = 0; -} - -#ifndef NO_BURST -int32_t sr352_sensor_burst_write(struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size) -{ - int i; - int err; - int idx = 0; - int seq_idx = 0; - int burst_flag = 0; - int seq_flag = 0; - unsigned char subaddr; - unsigned char value; - static uint8_t burst_data[BURST_MODE_BUFFER_MAX_SIZE] = {0}; - - struct msm_camera_i2c_burst_reg_array burst_reg_setting = { 0 ,}; - struct msm_camera_i2c_reg_setting conf_array = { - .reg_setting = (void * ) &burst_reg_setting, - .size = 1, - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BURST_DATA, - }; - - struct msm_camera_i2c_seq_reg_array *seq_reg_setting = NULL; - struct msm_camera_i2c_seq_reg_setting seq_conf_array = { - .reg_setting = NULL, - .size = 0, - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .delay = 0, - }; -#if 0 - seq_reg_setting = kzalloc((size/I2C_SEQ_REG_DATA_MAX + 1) *\ - (sizeof(struct msm_camera_i2c_seq_reg_array)), GFP_KERNEL); // allocate maximum possible -#endif - - seq_reg_setting = kzalloc(4 * (sizeof(struct msm_camera_i2c_seq_reg_array)), GFP_KERNEL); // enough to fit sr352 seq. data - if (!seq_reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - err = -ENOMEM; - goto on_error; - } - seq_conf_array.reg_setting = seq_reg_setting; - - for (i = 0; i < size; i++) { - - subaddr = reg_settings[i].reg_addr; - value = reg_settings[i].reg_data; - - if (burst_flag == 0 && seq_flag == 0) { - if (subaddr == BURST_REG && value != 0x00) { - - - idx = 0; - seq_idx = 0; - if (reg_settings[i+1].reg_addr == reg_settings[i+2].reg_addr) { - burst_flag = 1; - } else { - seq_flag = 1; - } - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - } else if (burst_flag == 1) { - - if (subaddr == BURST_REG && value == 0x00) { - - burst_flag = 0; - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx; - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", \ - __func__, __LINE__); - goto on_error; - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - - - - } else { - if (idx == 0) - burst_reg_setting.reg_addr = subaddr; - - burst_data[idx] = value; - idx++; - } - - } else if (seq_flag == 1) { - if (subaddr == BURST_REG && value == 0x00) { - seq_flag = 0; - idx = 0; - seq_conf_array.size = seq_idx; - seq_idx = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->\ - i2c_write_seq_table(s_ctrl->sensor_i2c_client, &seq_conf_array); - if (err < 0) { - pr_err("[%s:%d]Sequential write fail!\n", __func__, __LINE__); - goto on_error; - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - - - } else { - if (idx % I2C_SEQ_REG_DATA_MAX == 0) { - seq_reg_setting[seq_idx].reg_addr = subaddr; - seq_reg_setting[seq_idx].reg_data_size = 0; - seq_idx ++; - if (seq_idx >=4) { - pr_err("[%s:%d]error: More memory needed!!\n", __func__, __LINE__); - goto on_error; - } - } - - seq_reg_setting[seq_idx - 1].\ - reg_data[seq_reg_setting[seq_idx - 1].reg_data_size++] = value; - - idx++; - } - } - } // End of for loop - -on_error: - if (seq_reg_setting) - kfree(seq_reg_setting); - - return 0; -} -#endif - -#ifdef CONFIG_LOAD_FILE -int sr352_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - - if (settings != NULL) { - pr_err("sr352_regs_from_sd_tunning start address %x start data %x\n", - settings->reg_addr,settings->reg_data); - } - - if (sr352_regs_table == NULL) { - pr_err("sr352_regs_table is null\n"); - return -1; - } - pr_err("@@@ %s\n",name); - start = strstr(sr352_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!\n") ; - - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!\n"); - - if (reg) - start = (reg + 14); - - if (addr == 0xff){ - pr_err("delay = %dms STARTn", (int)value*10); - msleep(value * 10); - pr_err("delay END\n"); - - } - else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr352_regs_from_sd_tunning end!\n"); - return rc; -} - -void sr352_regs_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sr352_regs_table) { - vfree(sr352_regs_table); - sr352_regs_table = NULL; - } - -} - - -void sr352_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - - filp = filp_open(filename, O_RDONLY, 0); - - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - /*close the file*/ - filp_close(filp, current->files); - - /*restore the previous address space*/ - set_fs(fs); - - pr_err("coming to if part of string compare sr352_regs_table"); - sr352_regs_table = dp; - sr352_regs_table_size = lsize; - *((sr352_regs_table + sr352_regs_table_size) - 1) = '\0'; - - return; -} - -#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv_matisse.h b/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv_matisse.h deleted file mode 100644 index 5455f524c8e1..000000000000 --- a/drivers/media/platform/msm/camera_v2/sensor/sr352_yuv_matisse.h +++ /dev/null @@ -1,36748 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - //Vendor File -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - /* Sysctl registers */ -#define SR352_COMMAND_REGISTER 0x0080 -#define SR352_COMMAND_REGISTER_APPLY_PATCH (1 << 0) -#define SR352_COMMAND_REGISTER_SET_STATE (1 << 1) -#define SR352_COMMAND_REGISTER_REFRESH (1 << 2) -#define SR352_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) -#define SR352_COMMAND_REGISTER_OK (1 << 15) - -static struct msm_camera_i2c_reg_conf sr352_Init_Reg[] = { - -/////////////////////////////////////////////////////////////////////////////// -// Sensor Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x24,}, //mode_pll1 26mhz / (4+1) = 5.2mhz -{0x08, 0x54,}, //mode_pll2 isp clk = 109.2Mhz; -{0x09, 0x85,}, //mode_pll3 // MIPI 4x div 1/2 // isp clk div = 1/4 //Preview -{0x07, 0xA4,}, -{0x07, 0xA4,}, -{0x07, 0xA4,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, // mode_pll4 for mipi mode -{0x0A, 0xe0,}, // mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, // SSD sram clock inv on -{0x33, 0x45,}, // bit[6]:C-NR DC - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 108mhz -{0x40, 0x3B,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x3B,}, // otp cfg 3 -{0x43, 0x3B,}, // otp cfg 4 -{0x44, 0x3B,}, // otp cfg 5 -{0x45, 0x2B,}, // otp cfg 6 -{0x46, 0x71,}, // otp cfg 7 -{0x47, 0x0B,}, // otp cfg 8 -{0x48, 0x03,}, // otp cfg 9 -{0x49, 0x6A,}, // otp cfg 10 -{0x4A, 0x3B,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, // delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// TAP for capture function -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, - -{0x16, 0x00,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) -{0x18, 0x01,}, // use tap memory - -{0x40, 0x02,}, // set auto increment mode -{0x44, 0x00,}, // select rom -{0x45, 0x00,}, // set high address -{0x46, 0x00,}, // set low address - -// tap code download - start -// (caution : data length must be even) -{0x42, 0x90,}, -{0x42, 0x81,}, -{0x42, 0xf0,}, -{0x42, 0xe0,}, -{0x42, 0x54,}, -{0x42, 0x07,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x40,}, -{0x42, 0x1e,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xb4,}, -{0x42, 0x01,}, -{0x42, 0x07,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x10,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0x13,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x0c,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xe4,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x21,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x55,}, -{0x42, 0x90,}, -{0x42, 0x90,}, -{0x42, 0xb4,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe5,}, -{0x42, 0x4e,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x4a,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x88,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8b,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8e,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8f,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x04,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x66,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x67,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x68,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x69,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6b,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x0a,}, -// tap code download - end - -{0x44, 0x01,}, // select ram - -{0x16, 0xf8,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x41,}, //binning + prev1 -{0x11, 0x83,}, //Fixed mode off //XY Flip -{0x12, 0x00,}, -{0x13, 0x28,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1d, 0x05,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set -{0x24, 0x06,}, // height = 1536 -{0x25, 0x00,}, -{0x26, 0x08,}, // width = 2048 -{0x27, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x08,}, // 1Line = 2200 : 054(HBLANK) + 2146(Active Pixel) -{0x4d, 0x98,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, //Vsync H -{0x53, 0x14,}, //Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x00,}, // bayer y start -{0x81, 0x00,}, -{0x82, 0x06,}, // bayer height -{0x83, 0x24,}, -{0x84, 0x00,}, //pixel_col_start -{0x85, 0x00,}, -{0x86, 0x08,}, //pixel_width -{0x87, 0x24,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ?? for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, // 20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, -{0xa0, 0x02,}, -{0xa1, 0xa8,}, -{0xa2, 0x04,}, -{0xa3, 0x79,}, -{0xa4, 0x04,}, -{0xa5, 0xdc,}, -{0xa6, 0x08,}, -{0xa7, 0x66,}, -{0xa8, 0x02,}, -{0xa9, 0x7b,}, -{0xaa, 0x03,}, -{0xab, 0x4f,}, -{0xac, 0x03,}, -{0xad, 0xa0,}, -{0xae, 0x05,}, -{0xaf, 0x43,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1c, 0x02,}, -{0x1d, 0x88,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, -{0x42, 0x00,}, -{0x43, 0xb0,}, -{0x46, 0x01,}, -{0x47, 0x00,}, -{0x4a, 0x00,}, -{0x4b, 0xae,}, -{0x4e, 0x00,}, -{0x4f, 0xae,}, -{0x52, 0x00,}, -{0x53, 0xaa,}, -{0x56, 0x00,}, -{0x57, 0xaa,}, -{0x5A, 0x00,}, -{0x5b, 0xaa,}, -{0x6A, 0x00,}, -{0x6B, 0xf8,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x90,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x8b,}, -{0x7A, 0x06,}, -{0x7B, 0x95,}, -{0x7C, 0x06,}, -{0x7D, 0x8b,}, -{0x7E, 0x06,}, -{0x7F, 0x95,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x8b,}, -{0x86, 0x06,}, -{0x87, 0x95,}, -{0x88, 0x06,}, -{0x89, 0x8b,}, -{0x8A, 0x06,}, -{0x8B, 0x95,}, -{0x92, 0x06,}, // sx -{0x93, 0x81,}, -{0x96, 0x06,}, -{0x97, 0x81,}, -{0x98, 0x06,}, // sxb -{0x99, 0x81,}, -{0x9c, 0x06,}, -{0x9d, 0x81,}, - -{0xb6, 0x01,}, // --------------> s_hb_cnt_hold = 500 -{0xb7, 0xf4,}, -{0xc0, 0x00,}, // i_addr_mux_prev -{0xc1, 0xb4,}, -{0xc2, 0x00,}, -{0xc3, 0xf4,}, -{0xc4, 0x00,}, -{0xc5, 0xb4,}, -{0xc6, 0x00,}, -{0xc7, 0xf4,}, -{0xc8, 0x00,}, // i_addr_cut_prev -{0xc9, 0xb8,}, -{0xca, 0x00,}, -{0xcb, 0xf0,}, -{0xcc, 0x00,}, -{0xcd, 0xb8,}, -{0xce, 0x00,}, -{0xcf, 0xf0,}, -{0xd0, 0x00,}, // Rx_exp_prev -{0xd1, 0xba,}, -{0xd2, 0x00,}, -{0xd3, 0xee,}, -{0xd4, 0x00,}, -{0xd5, 0xba,}, -{0xd6, 0x00,}, -{0xd7, 0xee,}, -{0xd8, 0x00,}, // Tx_exp_prev -{0xd9, 0xbc,}, -{0xdA, 0x00,}, -{0xdB, 0xec,}, -{0xdC, 0x00,}, -{0xdD, 0xbc,}, -{0xdE, 0x00,}, -{0xdF, 0xec,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ??? MCU? reset ??. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x00,}, //gap y off, gap x off - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x10,}, //YOFS ENB -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x00,}, //16_235 range scale down off -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,},//D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0x7a,}, //pga_dark1_hi //Enter Dark1 -{0xf3, 0x72,}, //pga_dark_lo //Escape Dark1 -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0x90,},//C-mask near STD TH -{0x88, 0x70,},//C-mask middle STD TH -{0x89, 0x50,},//C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,},//Yc2d_ee_color_gain1 -{0x78, 0x20,},//Yc2d_ee_color_gain2 -{0x79, 0x20,},//Yc2d_ee_color_gain3 -{0x7a, 0x20,},//Yc2d_ee_color_gain4 -{0x7b, 0x20,},//Yc2d_ee_color_gain5 -{0x7c, 0x20,},//Yc2d_ee_color_gain6 -{0x7d, 0x20,},//Yc2d_ee_color_gain7 -{0x7e, 0x20,},//Yc2d_ee_color_gain8 - -{0xc0, 0x00,},//Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,},//Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,},//Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,},//Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,},//Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xd0, 0x01,},//Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8d, 0x20,},//RGB-Color_Gain1 -{0x8e, 0x20,},//RGB-Color_Gain2 -{0x8f, 0x20,},//RGB-Color_Gain3 -{0x90, 0x20,},//RGB-Color_Gain4 -{0x91, 0x20,},//RGB-Color_Gain5 -{0xcb, 0x34,},//20130604 Cyan th - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0x20,}, - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x08,}, -{0x38, 0x98,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x80, 0x3a,}, //Y Target -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x7C,}, //Flicker Line 100 -{0x15, 0x67,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x16, 0x50,}, //SSD B gain int gain 1.5 - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -////54.646200mhz = 0x0341D5B8 -{0x03, 0xC0,}, -{0x14, 0x03,}, -{0x15, 0x41,}, -{0x16, 0xD5,}, -{0x17, 0xB8,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9e, 0x00,},//1 Line -{0x9f, 0x00,}, -{0xa0, 0x00,}, -{0xa1, 0x00,}, -{0xa2, 0x00,}, -{0xa3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x7c, 0xe0,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x34,}, -{0x18, 0x55,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x04,}, -{0x22, 0x30,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,},//Low In Th -{0x56, 0x52,},//Low Out Th -{0x57, 0x60,},//High Out Th -{0x58, 0x70,},//High In Th - -{0x62, 0xd8,},//Out weight //ca->d8 -{0x63, 0xa6,},//Indoor weight -{0x64, 0x88,},//Dark weight -{0x65, 0xe8,},//Low weight -{0x66, 0xa6,},//High weight - -{0x31, 0x01,},//Color ratio reset -{0x30, 0x98,},//Color ratio on -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x23,}, // DYOFS_Ratio -{0x1c, 0x04,}, // DYOFS_Limit - -{0x1d, 0x00,},//EV Th OutEnd -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,},//EV Th OutStr def : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x0b,}, -{0x27, 0x71,}, -{0x28, 0xb0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x0d,}, -{0x2b, 0xbb,}, -{0x2c, 0xa0,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x12,}, -{0x2f, 0x76,}, -{0x30, 0x90,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x1e,}, -{0x33, 0x84,}, -{0x34, 0x80,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,}, // LSC_EvTh_OutEnd_4 -{0x3a, 0x00,}, // LSC_EvTh_OutEnd_3 -{0x3b, 0x13,}, // LSC_EvTh_OutEnd_2 -{0x3c, 0x88,}, // LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,}, // LSC_EvTh_OutStr_4 -{0x3e, 0x00,}, // LSC_EvTh_OutStr_3 -{0x3f, 0x30,}, // LSC_EvTh_OutStr_2 -{0x40, 0xd4,}, // LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,}, // LSC_EvTh_Dark1Str_4 -{0x42, 0x05,}, // LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,}, // LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,}, // LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,}, // LSC_EvTh_Dark1End_4 -{0x46, 0x0b,}, // LSC_EvTh_Dark1End_3 -{0x47, 0x71,}, // LSC_EvTh_Dark1End_2 -{0x48, 0xb0,}, // LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,}, // LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,}, // LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,}, // LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,}, // LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,}, // LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,}, // LSC_EvTh_Dark2End_3 -{0x4f, 0x84,}, // LSC_EvTh_Dark2End_2 -{0x50, 0x80,}, // LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},// LSC Ctmp LTEnd Out -{0x52, 0x64,},// LSC Ctmp LTStr Out -{0x53, 0x78,},// LSC Ctmp HTStr Out -{0x54, 0x86,},// LSC Ctmp HTEnd Out - -{0x55, 0x4a,},// LSC Ctmp LTEnd In h46->h4a 13.5.29 multi gain modify -{0x56, 0x56,},// LSC Ctmp LTStr In h56->h56 -{0x57, 0x6e,},// LSC Ctmp HTStr In h6e->h6e -{0x58, 0x78,},// LSC Ctmp HTEnd In h76->h78 - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,},// UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,},// UniScn_BPstdMinTh -{0x6c, 0x3a,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x34,},// Y_target_Outdoor -{0x7e, 0x34,},// Y_target_Indoor -{0x7f, 0x34,},// Y_target_Dark1 -{0x80, 0x34,},// Y_target_Dark2 -{0x81, 0x39,},// Y_target_LowTemp -{0x82, 0x2f,},// Y_target_HighTemp - -{0x83, 0x98,}, // Cb_Outdoor -{0x84, 0x95,},// Cb _Sat_Indoor -{0x85, 0xa0,},// Cb _Sat_Dark1 -{0x86, 0x8a,},// Cb _Sat_Dark2 -{0x87, 0x88,},// Cb _Sat_LowTemp -{0x88, 0x92,},// Cb _Sat_HighTemp - -{0x89, 0x88,},// Cr _Sat_Outdoor -{0x8a, 0x90,},// Cr _Sat_Indoor -{0x8b, 0xa0,},// Cr _Sat_Dark1 -{0x8c, 0x84,},// Cr _Sat_Dark2 -{0x8d, 0x75,},// Cr _Sat_LowTemp -{0x8e, 0x92,},// Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x82,}, // BLC_ofs_r_Dark1 -{0x98, 0x82,}, // BLC_ofs_b_Dark1 -{0x99, 0x82,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x82,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x82,}, // BLC_ofs_r_Dark2 -{0x9c, 0x82,}, // BLC_ofs_b_Dark2 -{0x9d, 0x82,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x82,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x50,}, //CMC_Out_00 -{0xdd, 0x1d,}, //CMC_Out_01 -{0xde, 0x0d,}, //CMC_Out_02 -{0xdf, 0x0e,}, //CMC_Out_03 -{0xe0, 0x50,}, //CMC_Out_04 -{0xe1, 0x02,}, //CMC_Out_05 -{0xe2, 0x05,}, //CMC_Out_06 -{0xe3, 0x15,}, //CMC_Out_07 -{0xe4, 0x5a,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,},//CMCSIGN_In_Mid -{0x17, 0x53,},//CMC_In_Mid_00 -{0x18, 0x16,},//CMC_In_Mid_01 -{0x19, 0x03,},//CMC_In_Mid_02 -{0x1a, 0x10,},//CMC_In_Mid_03 -{0x1b, 0x53,},//CMC_In_Mid_04 -{0x1c, 0x03,},//CMC_In_Mid_05 -{0x1d, 0x04,},//CMC_In_Mid_06 -{0x1e, 0x1d,},//CMC_In_Mid_07 -{0x1f, 0x61,},//CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,},//CMCSIGN_Dark1 -{0x40, 0x53,},//CMC_Dark1_00 -{0x41, 0x1c,},//CMC_Dark1_01 -{0x42, 0x09,},//CMC_Dark1_02 -{0x43, 0x0e,},//CMC_Dark1_03 -{0x44, 0x53,},//CMC_Dark1_04 -{0x45, 0x05,},//CMC_Dark1_05 -{0x46, 0x03,},//CMC_Dark1_06 -{0x47, 0x23,},//CMC_Dark1_07 -{0x48, 0x66,},//CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,},//CMCSIGN_Dark2 -{0x69, 0x53,},//CMC_Dark2_00 -{0x6a, 0x1c,},//CMC_Dark2_01 -{0x6b, 0x09,},//CMC_Dark2_02 -{0x6c, 0x0e,},//CMC_Dark2_03 -{0x6d, 0x53,},//CMC_Dark2_04 -{0x6e, 0x05,},//CMC_Dark2_05 -{0x6f, 0x03,},//CMC_Dark2_06 -{0x70, 0x23,},//CMC_Dark2_07 -{0x71, 0x66,},//CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x15,},// CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x18,},// CMC_Dark2_LumGain2_R -{0x7b, 0x1e,},// CMC_Dark2_LumGain3_R -{0x7c, 0x1f,},// CMC_Dark2_LumGain4_R -{0x7d, 0x20,},// CMC_Dark2_LumGain5_R -{0x7e, 0x20,},// CMC_Dark2_LumGain6_R -{0x7f, 0x20,},// CMC_Dark2_LumGain7_R -{0x80, 0x20,},// CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x15,},// CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x18,},// CMC_Dark2_LumGain2_G -{0x83, 0x1e,},// CMC_Dark2_LumGain3_G -{0x84, 0x1f,},// CMC_Dark2_LumGain4_G -{0x85, 0x20,},// CMC_Dark2_LumGain5_G -{0x86, 0x20,},// CMC_Dark2_LumGain6_G -{0x87, 0x20,},// CMC_Dark2_LumGain7_G -{0x88, 0x20,},// CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x15,},// CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x18,},// CMC_Dark2_LumGain2_B -{0x8b, 0x1e,},// CMC_Dark2_LumGain3_B -{0x8c, 0x1f,},// CMC_Dark2_LumGain4_B -{0x8d, 0x20,},// CMC_Dark2_LumGain5_B -{0x8e, 0x20,},// CMC_Dark2_LumGain6_B -{0x8f, 0x20,},// CMC_Dark2_LumGain7_B -{0x90, 0x20,},// CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, // GMA_OUT -{0xe4, 0x03,}, -{0xe5, 0x08,}, -{0xe6, 0x0f,}, -{0xe7, 0x15,}, -{0xe8, 0x20,}, -{0xe9, 0x2d,}, -{0xea, 0x3b,}, -{0xeb, 0x47,}, -{0xec, 0x53,}, -{0xed, 0x5c,}, -{0xee, 0x65,}, -{0xef, 0x6d,}, -{0xf0, 0x75,}, -{0xf1, 0x7c,}, -{0xf2, 0x82,}, -{0xf3, 0x88,}, -{0xf4, 0x8d,}, -{0xf5, 0x91,}, -{0xf6, 0x96,}, -{0xf7, 0x9a,}, -{0xf8, 0xa1,}, -{0xf9, 0xa9,}, -{0xfa, 0xb0,}, -{0xfb, 0xbe,}, -{0xfc, 0xc8,}, -{0xfd, 0xd2,}, - -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, // Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xdb,}, -{0x11, 0xe3,}, -{0x12, 0xea,}, -{0x13, 0xf0,}, -{0x14, 0xf5,}, -{0x15, 0xfb,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x03,}, -{0x19, 0x08,}, -{0x1a, 0x0f,}, -{0x1b, 0x15,}, -{0x1c, 0x20,}, -{0x1d, 0x2d,}, -{0x1e, 0x3b,}, -{0x1f, 0x47,}, -{0x20, 0x53,}, -{0x21, 0x5c,}, -{0x22, 0x65,}, -{0x23, 0x6d,}, -{0x24, 0x75,}, -{0x25, 0x7c,}, -{0x26, 0x82,}, -{0x27, 0x88,}, -{0x28, 0x8d,}, -{0x29, 0x91,}, -{0x2a, 0x96,}, -{0x2b, 0x9a,}, -{0x2c, 0xa1,}, -{0x2d, 0xa9,}, -{0x2e, 0xb0,}, -{0x2f, 0xbe,}, -{0x30, 0xc8,}, -{0x31, 0xd2,}, -{0x32, 0xdb,}, -{0x33, 0xe3,}, -{0x34, 0xea,}, -{0x35, 0xf0,}, -{0x36, 0xf5,}, -{0x37, 0xfb,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, // GMA_D1 -{0x3a, 0x06,}, -{0x3b, 0x0e,}, -{0x3c, 0x17,}, -{0x3d, 0x1f,}, -{0x3e, 0x2c,}, -{0x3f, 0x3c,}, -{0x40, 0x4c,}, -{0x41, 0x57,}, -{0x42, 0x61,}, -{0x43, 0x6b,}, -{0x44, 0x76,}, -{0x45, 0x7e,}, -{0x46, 0x85,}, -{0x47, 0x8c,}, -{0x48, 0x92,}, -{0x49, 0x98,}, -{0x4a, 0x9c,}, -{0x4b, 0xa2,}, -{0x4c, 0xa6,}, -{0x4d, 0xab,}, -{0x4e, 0xb4,}, -{0x4f, 0xbc,}, -{0x50, 0xc2,}, -{0x51, 0xcb,}, -{0x52, 0xd3,}, -{0x53, 0xdb,}, -{0x54, 0xe1,}, -{0x55, 0xe7,}, -{0x56, 0xed,}, -{0x57, 0xf3,}, -{0x58, 0xf8,}, -{0x59, 0xfc,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x08,}, -{0x5d, 0x12,}, -{0x5e, 0x1b,}, -{0x5f, 0x24,}, -{0x60, 0x32,}, -{0x61, 0x3f,}, -{0x62, 0x4c,}, -{0x63, 0x57,}, -{0x64, 0x61,}, -{0x65, 0x6c,}, -{0x66, 0x79,}, -{0x67, 0x82,}, -{0x68, 0x8c,}, -{0x69, 0x94,}, -{0x6a, 0x99,}, -{0x6b, 0x9f,}, -{0x6c, 0xa4,}, -{0x6d, 0xaa,}, -{0x6e, 0xaf,}, -{0x6f, 0xb4,}, -{0x70, 0xba,}, -{0x71, 0xc0,}, -{0x72, 0xc5,}, -{0x73, 0xcd,}, -{0x74, 0xd5,}, -{0x75, 0xdc,}, -{0x76, 0xe1,}, -{0x77, 0xe7,}, -{0x78, 0xed,}, -{0x79, 0xf3,}, -{0x7a, 0xf8,}, -{0x7b, 0xfc,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x18,}, //Outdoor_delta3 -{0x82, 0xb3,}, //Outdoor_center3 -{0x83, 0x1b,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x8c,}, //Outdoor_hue_angle2 -{0x91, 0x0e,}, //Outdoor_hue_angle3 -{0x92, 0x05,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,},// MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 Skin -{0xb7, 0x3f,},// MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,},// MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,},// MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,},// MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,},// MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,},// MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,},// MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,},// MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 bright green1 -{0xbf, 0x3f,},// MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,},// MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,},// MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 dark Green2 -{0xc7, 0x3f,},// MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,},// MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,},// MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,},// MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,},// MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,},// MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,},// MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x16,}, //Outdoor_allgain_y0 -{0xe7, 0x16,}, //Outdoor_allgain_y1 -{0xe8, 0x16,}, //Outdoor_allgain_y2 -{0xe9, 0x16,}, //Outdoor_allgain_y3 -{0xea, 0x16,}, //Outdoor_allgain_y4 -{0xeb, 0x15,}, //Outdoor_allgain_y5 -{0xec, 0x19,}, //Outdoor_allgain_y6 -{0xed, 0x19,}, //Outdoor_allgain_y7 -{0xee, 0x18,}, //Outdoor_allgain_y8 -{0xef, 0x17,}, //Outdoor_allgain_y9 -{0xf0, 0x14,}, //Outdoor_allgain_y10 -{0xf1, 0x14,}, //Outdoor_allgain_y11 - -// Indoor MCMC -{0xf2, 0x10,},//Indoor_delta1 -{0xf3, 0x1e,},//Indoor_center1 -{0xf4, 0x0b,},//Indoor_delta2 -{0xf5, 0x6f,},//Indoor_center2 -{0xf6, 0x1b,},//Indoor_delta3 light green -{0xf7, 0xc2,},//Indoor_center3 light green -{0xf8, 0x17,},//Indoor_delta4 -{0xf9, 0xfb,},//Indoor_center4 -{0xfa, 0x91,},//Indoor_delta5 -{0xfb, 0x2b,},//Indoor_center5 -{0xfc, 0x92,},//Indoor_delta6 -{0xfd, 0x4f,},//Indoor_center6 -{0x0e, 0x00,},// burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x00,}, //Indoor_hue_angle2 -{0x18, 0x1e,}, //Indoor_hue_angle3 -{0x19, 0x0a,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,},// MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,},// MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,},// MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,},// MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,},// MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,},// MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,},// MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x12,},// MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x12,},// MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,},// MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,},// MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,},//Dark1_allgain_y1 -{0xe3, 0x10,},//Dark1_allgain_y2 -{0xe4, 0x10,},//Dark1_allgain_y3 -{0xe5, 0x11,},//Dark1_allgain_y4 -{0xe6, 0x10,},//Dark1_allgain_y5 -{0xe7, 0x13,},//Dark1_allgain_y6 -{0xe8, 0x12,},//Dark1_allgain_y7 -{0xe9, 0x12,},//Dark1_allgain_y8 -{0xea, 0x12,},//Dark1_allgain_y9 -{0xeb, 0x11,},//Dark1_allgain_y10 -{0xec, 0x10,},//Dark1_allgain_y11 -{0xed, 0x0f,},//Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,},// MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,},// MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,},// MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,},// MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,},// MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,},// MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,},// MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x05,},// MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,},// MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,},// MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,},// MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,},// MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,},// MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,},// MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,},// MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,},// MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,},// MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,},// MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,},// MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,},// MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,},//Hi-Temp_allgain_y0 -{0x66, 0x0d,},//Hi-Temp_allgain_y1 -{0x67, 0x0e,},//Hi-Temp_allgain_y2 -{0x68, 0x0e,},//Hi-Temp_allgain_y3 -{0x69, 0x0f,},//Hi-Temp_allgain_y4 -{0x6a, 0x10,},//Hi-Temp_allgain_y5 -{0x6b, 0x12,},//Hi-Temp_allgain_y6 -{0x6c, 0x14,},//Hi-Temp_allgain_y7 -{0x6d, 0x13,},//Hi-Temp_allgain_y8 -{0x6e, 0x12,},//Hi-Temp_allgain_y9 -{0x6f, 0x0e,},//Hi-Temp_allgain_y10 -{0x70, 0x11,},//Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // function block on -{0x10, 0x8F,}, // Adaptive on - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x36,},//Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x38,},//Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3c,},//Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x18,},//Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x32,},//Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x31,},//Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x23,},//Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1b,},//Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,},//Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,},//Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,},//Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,},//Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x26,},//Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x25,},//Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x21,},//Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,},//Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,}, //Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,}, //Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,}, //Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,}, //Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,}, //Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,}, //Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,}, //Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,}, //Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,},//Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x33,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x38,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x33,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,}, //Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,},//Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x33,},//Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x3a,},//Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,},//Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x3a,},//Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x22,},//Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x30,},//Outdoor 1212 -{0x24, 0x33,}, -{0x25, 0x30,},//Outdoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x21,},//Outdoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Outdoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Outdoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Outdoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Outdoor 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Outdoor 1278 -{0x34, 0x79,}, -{0x35, 0x09,},//Outdoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Outdoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Outdoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x50,},//Outdoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x10,},//Outdoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Outdoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Outdoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Outdoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Outdoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Outdoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Outdoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Outdoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Outdoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Outdoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Outdoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Outdoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Outdoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Outdoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Outdoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Outdoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Outdoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Outdoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Outdoor 12ae -{0x62, 0xaf,}, -{0x63, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Outdoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Outdoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Outdoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Outdoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x91,},//Outdoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0xa4,},//Outdoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3c,},//Outdoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Outdoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Outdoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Outdoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Outdoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Outdoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Outdoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Outdoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Outdoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Outdoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Outdoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Outdoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Outdoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Outdoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Outdoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Outdoor 12de -{0x90, 0xe0,}, -{0x91, 0x49,},//Outdoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Outdoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Outdoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x20,},//Outdoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x20,},//Outdoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x20,},//Outdoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x20,},//Outdoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x20,},//Outdoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x20,},//Outdoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x20,},//Outdoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x20,},//Outdoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Outdoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1e,},//Outdoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1d,},//Outdoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x20,},//Outdoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Outdoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Outdoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Outdoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Outdoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x3f,},//Outdoor 1330 -{0xba, 0x31,}, -{0xbb, 0x3f,},//Outdoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x3f,},//Outdoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x3f,},//Outdoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x3f,},//Outdoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x33,},//Outdoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x2f,},//Outdoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x2e,},//Outdoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Outdoor 1338 -{0xca, 0x40,}, -{0xcb, 0x1e,},//Outdoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x22,},//Outdoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Outdoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Outdoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Outdoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Outdoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x36,},//Outdoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Outdoor 1347 -{0xda, 0x48,}, -{0xdb, 0x20,},//Outdoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Outdoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Outdoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Outdoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x20,},//Outdoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Outdoor 1383 -{0xe6, 0x84,}, -{0xe7, 0x08,},//Outdoor 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfd,},//Outdoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0xa7,},//Outdoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Outdoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Outdoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Outdoor 1410 -{0xfc, 0x11,}, -{0xfd, 0xd8,},//Outdoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Outdoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Outdoor 1413 -{0x14, 0x14,}, -{0x15, 0x0f,},//Outdoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Outdoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x1c,},//Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Outdoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Outdoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Outdoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Outdoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1d,},//Outdoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x2c,},//Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x2a,},//Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x28,},//Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x1e,},//Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x16,},//Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x16,},//Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x28,},//Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x26,},//Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x23,},//Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x19,},//Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x16,},//Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x15,},//Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x17,},//Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x19,},//Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x24,},//Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x24,},//Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1a,},//Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x10,},//Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x18,},//Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x18,},//Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x1a,},//Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x18,},//Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x15,},//Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x18,},//Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x22,},//Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x23,},//Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x24,},//Outdoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x24,},//Outdoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x28,},//Outdoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2f,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x27,},//Outdoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x28,},//Outdoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2d,},//Outdoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2f,},//Outdoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x34,},//Outdoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x2d,},//Outdoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x26,},//Outdoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x24,},//Outdoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Outdoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Outdoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Outdoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Outdoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Outdoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Outdoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Outdoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Outdoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Outdoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Outdoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Outdoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x3f,},//Outdoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Outdoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Outdoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Outdoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x3f,},//Outdoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x3f,},//Outdoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x3f,},//Outdoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x3c,},//Outdoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x38,},//Outdoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x35,},//Outdoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Outdoor 1A20 add -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Outdoor 1A2f add -{0xb4, 0x32,}, -{0xb5, 0x87,},//Outdoor 1A32 add -{0xb6, 0x34,}, -{0xb7, 0xd2,},//Outdoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x1c,},//Outdoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x06,},//Outdoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Outdoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Outdoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x2e,},//Outdoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Outdoor 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x01,},//Outdoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x0c,},//Outdoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x01,},//Outdoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x07,},//Outdoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x01,},//Outdoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x0c,},//Outdoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x01,},//Outdoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x07,},//Outdoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2b,},//Outdoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x0b,},//Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0c,},//Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x0c,},//Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x11,},//Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x17,},//Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x17,},//Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x17,},//Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x17,},//Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x16,},//Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x13,},//Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x11,},//Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x0f,},//Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x0f,},//Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x10,},//Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x17,},//Outdoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xd0, 0x27,}, -{0xd1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x19,},//Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x17,},//Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x16,},//Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x16,},//Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x10,},//Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x16,},//Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x15,},//Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x13,},//Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x29,},//Outdoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x29,},//Outdoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x29,},//Outdoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x28,},//Outdoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x28,},//Outdoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x3f,},//Outdoor 1Aa7 add -{0x4c, 0xa8,}, -{0x4d, 0x3f,},//Outdoor 1Aa8 add -{0x4e, 0xa9,}, -{0x4f, 0x3f,},//Outdoor 1Aa9 add -{0x50, 0xaa,}, -{0x51, 0x3f,},//Outdoor 1Aaa add -{0x52, 0xab,}, -{0x53, 0x3f,},//Outdoor 1Aab add -{0x54, 0xaf,}, -{0x55, 0x3f,},//Outdoor 1Aaf add -{0x56, 0xb0,}, -{0x57, 0x3f,},//Outdoor 1Ab0 add -{0x58, 0xb1,}, -{0x59, 0x3f,},//Outdoor 1Ab1 add -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Outdoor 1Ab2 add -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Outdoor 1Ab3 add -{0x5e, 0xca,}, -{0x5f, 0x00,},//Outdoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Outdoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Outdoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0f,},//Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x00,},//Outdoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x00,},//Outdoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x00,},//Outdoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Outdoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Outdoor 1075 -{0x72, 0x76,}, -{0x73, 0x40,},//Outdoor 1076 -{0x74, 0x77,}, -{0x75, 0x40,},//Outdoor 1077 -{0x76, 0x78,}, -{0x77, 0x00,},//Outdoor 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Outdoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Outdoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Outdoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Outdoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Outdoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Outdoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Outdoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x30,},//Outdoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Outdoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Outdoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Outdoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Outdoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x02,},//Outdoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x00,},//Outdoor 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x07,}, //Indoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 //Pre flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 //Pre flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Indoor 113c //Pre flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x56,},//Indoor 113d //Pre flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,},//Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,},//Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Indoor 1140 //Pre flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x1c,},//Indoor 1141 //Pre flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,},//Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,},//Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x10,},//Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,},//Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x15,},//Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x13,},//Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x10,},//Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x10,},//Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x12,},//Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,},//Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,},//Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x17,},//Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x16,},//Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x13,},//Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x13,},//Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x15,},//Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,},//Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,},//Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,},//Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x14,},//Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x12,},//Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x11,},//Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,},//Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,},//Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,},//Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,},//Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,},//Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,},//Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x18,},//Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x13,},//Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x16,},//Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,},//Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,},//Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x26,},//Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x28,},//Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,},//Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,},//Indoor 11d1 //Bayer Flat R1 Lum H -{0xde, 0xd2,}, -{0xdf, 0x40,},//Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,},//Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,},//Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x20,},//Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x18,},//Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,},//Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x08,},//Indoor 11e0 //Bayer Flat R3 LumL -{0xf6, 0xe1,}, -{0xf7, 0x15,},//Indoor 11e1 //Bayer Flat R3 LumH -{0xf8, 0xe2,}, -{0xf9, 0x3c,},//Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,},//Indoor 11e3 //Bayer Flat R4 LumH -{0xfc, 0xe4,}, -{0xfd, 0x01,},//Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,},// burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x11,},//Indoor 11e5 //Bayer Flat R3 StdH -{0x12, 0xe6,}, -{0x13, 0x01,},//Indoor 11e6 //Bayer Flat R4 StdL -{0x14, 0xe7,}, -{0x15, 0x40,},//Indoor 11e7 //Bayer Flat R4 StdH -{0x16, 0xe8,}, -{0x17, 0x01,},//Indoor 11e8 //Bayer Flat R3 DyL -{0x18, 0xe9,}, -{0x19, 0x0a,},//Indoor 11e9 //Bayer Flat R3 DyH -{0x1a, 0xea,}, -{0x1b, 0x01,},//Indoor 11ea //Bayer Flat R4 DyL -{0x1c, 0xeb,}, -{0x1d, 0x25,},//Indoor 11eb //Bayer Flat R4 DyH -{0x1e, 0xef,}, -{0x1f, 0x6a,},//Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x08,},//Indoor 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Indoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Indoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Indoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Indoor 1270 // Bayer Sharpness ENB add -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Indoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Indoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x26,},//Indoor 1277 //20130412 -{0x32, 0x78,}, -{0x33, 0x2f,},//Indoor 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Indoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Indoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Indoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x60,},//Indoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Indoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Indoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Indoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Indoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Indoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Indoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Indoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Indoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Indoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Indoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Indoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Indoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Indoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Indoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Indoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Indoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Indoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Indoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Indoor 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Indoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Indoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Indoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Indoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Indoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Indoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Indoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Indoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Indoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Indoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Indoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Indoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Indoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Indoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Indoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Indoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Indoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Indoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Indoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Indoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Indoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Indoor 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Indoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Indoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Indoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Indoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Indoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Indoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Indoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Indoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Indoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Indoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Indoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Indoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Indoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Indoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Indoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Indoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Indoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Indoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Indoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Indoor 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Indoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Indoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Indoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Indoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Indoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Indoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Indoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Indoor 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Indoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Indoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Indoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Indoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Indoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Indoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Indoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Indoor 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Indoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Indoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Indoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Indoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Indoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Indoor 1383 //add 20121210 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Indoor 1384 //add 20121210 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Indoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Indoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Indoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Indoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Indoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Indoor 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Indoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Indoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Indoor 1413 -{0x14, 0x14,}, -{0x15, 0x10,},//Indoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Indoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Indoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Indoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Indoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Indoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Indoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1c,},//Indoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x20,},//Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x1f,},//Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x1c,},//Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x11,},//Indoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x10,},//Indoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x10,},//Indoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x11,},//Indoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x10,},//Indoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x1a,},//Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x15,},//Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x14,},//Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x13,},//Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x14,},//Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x15,},//Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x22,},//Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x22,},//Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1f,},//Indoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x1a,},//Indoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x18,},//Indoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x1a,},//Indoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x1d,},//Indoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x19,},//Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x16,},//Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x15,},//Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x14,},//Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x14,},//Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x13,},//Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x2b,},//Indoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x2c,},//Indoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x2e,},//Indoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2f,},//Indoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Indoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2e,},//Indoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Indoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x30,},//Indoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x17,},//Indoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x1d,},//Indoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x24,},//Indoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x26,},//Indoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x24,},//Indoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x23,},//Indoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1d,},//Indoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x17,},//Indoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Indoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Indoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Indoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Indoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Indoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Indoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Indoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Indoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Indoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Indoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Indoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x50,},//Indoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Indoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Indoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Indoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Indoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Indoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Indoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Indoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Indoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Indoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Indoor 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Indoor 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Indoor 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Indoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Indoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Indoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Indoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Indoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x1d,},//Indoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Indoor 1A3a //RGB Flat R2_Lum H -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Indoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Indoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Indoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Indoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Indoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Indoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Indoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Indoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Indoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x12,},//Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x12,},//Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x11,},//Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x10,},//Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x10,},//Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x10,},//Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x10,},//Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x10,},//Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x15,},//Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x10,},//Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x10,},//Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x10,},//Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x10,},//Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x10,},//Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x10,},//Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x13,},//Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x14,},//Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Indoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x13,},//Indoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x14,},//Indoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x15,},//Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x15,},//Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x11,},//Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x11,},//Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x11,},//Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x22,},//Indoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x23,},//Indoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x24,},//Indoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x25,},//Indoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x26,},//Indoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x28,},//Indoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x2b,},//Indoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x2d,},//Indoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x22,},//Indoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x23,},//Indoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x26,},//Indoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x26,},//Indoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x26,},//Indoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x26,},//Indoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x26,},//Indoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x26,},//Indoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x34,},//Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Indoor 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Indoor 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Indoor 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Indoor 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Indoor 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Indoor 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Indoor 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Indoor 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Indoor 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Indoor 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Indoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Indoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Indoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Indoor 1070 Trans Func. 130618 Indoor transFuc Low 1.0->0.84 -{0x68, 0x71,}, -{0x69, 0x06,},//Indoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x85,},//Indoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x0a,},//Indoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Indoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Indoor 1075 -{0x72, 0x76,}, -{0x73, 0x36,},//Indoor 1076 -{0x74, 0x77,}, -{0x75, 0x47,},//Indoor 1077 -{0x76, 0x78,}, -{0x77, 0xae,},//Indoor 1078 -{0x78, 0x79,}, -{0x79, 0x50,},//Indoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Indoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x50,},//Indoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Indoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Indoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Indoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Indoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x2a,},//Indoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Indoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Indoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Indoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Indoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x03,},//Indoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Indoor 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Dark1 113c //Pre Flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x53,},//Dark1 113d //Pre Flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark1 1140 //Pre Flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark1 1141 //Pre Flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark1 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark1 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark1 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark1 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark1 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark1 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark1 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark1 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark1 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark1 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark1 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark1 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark1 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark1 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark1 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark1 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark1 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark1 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark1 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark1 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark1 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark1 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark1 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark1 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark1 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark1 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark1 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark1 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark1 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark1 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark1 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark1 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark1 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark1 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark1 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark1 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark1 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark1 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark1 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark1 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark1 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark1 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark1 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark1 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark1 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark1 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark1 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark1 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark1 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark1 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark1 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark1 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark1 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark1 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark1 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark1 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark1 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark1 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark1 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark1 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark1 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark1 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark1 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark1 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark1 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark1 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark1 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark1 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark1 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark1 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark1 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark1 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark1 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark1 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark1 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark1 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark1 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark1 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark1 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark1 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark1 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark1 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark1 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark1 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark1 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark1 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark1 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark1 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark1 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark1 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark1 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark1 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark1 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark1 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark1 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark1 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark1 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark1 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark1 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark1 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark1 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark1 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark1 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark1 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark1 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark1 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark1 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark1 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark1 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark1 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark1 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark1 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark1 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark1 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark1 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark1 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark1 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark1 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark1 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark1 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark1 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark1 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark1 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark1 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark1 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark1 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark1 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark1 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark1 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark1 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark1 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark1 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark1 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark1 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark1 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark1 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark1 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark1 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark1 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark1 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark1 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark1 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark1 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark1 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark1 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark1 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark1 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark1 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark1 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark1 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark1 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark1 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark1 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark1 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark1 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark1 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark1 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark1 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark1 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark1 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark1 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark1 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark1 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark1 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark1 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark1 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark1 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark1 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark1 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark1 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark1 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark1 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark1 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark1 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark1 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark1 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark1 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark1 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark1 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark1 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark1 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark1 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark1 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark1 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark1 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark1 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark1 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark1 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark1 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark1 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark1 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark1 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark1 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark1 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark1 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark1 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark1 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark1 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark1 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark1 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark1 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark1 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark1 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark1 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark1 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark1 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark1 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark1 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark1 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark1 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark1 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark1 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x0a,},//Dark1 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark1 1072 -{0x6c, 0x73,}, -{0x6d, 0xcc,},//Dark1 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark1 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark1 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark1 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark1 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark1 1078 -{0x78, 0x79,}, -{0x79, 0x49,},//Dark1 1079 -{0x7a, 0x7a,}, -{0x7b, 0x99,},//Dark1 107a -{0x7c, 0x7b,}, -{0x7d, 0x49,},//Dark1 107b -{0x7e, 0x7c,}, -{0x7f, 0x99,},//Dark1 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark1 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark1 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark1 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark1 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark1 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark1 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark1 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark1 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x04,},//Dark1 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark1 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark2 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark2 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x53,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,},//Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark2 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark2 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark2 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark2 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark2 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark2 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark2 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,},//Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark2 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark2 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark2 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark2 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark2 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark2 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark2 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark2 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark2 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark2 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark2 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark2 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark2 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark2 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark2 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark2 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark2 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark2 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark2 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark2 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark2 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark2 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark2 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark2 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark2 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark2 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark2 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark2 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark2 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark2 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark2 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark2 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark2 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark2 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark2 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark2 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark2 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark2 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark2 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark2 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark2 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark2 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark2 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark2 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark2 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark2 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark2 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark2 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark2 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark2 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark2 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark2 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark2 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark2 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark2 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark2 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark2 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark2 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark2 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark2 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark2 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark2 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark2 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark2 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark2 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark2 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark2 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark2 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark2 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark2 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark2 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark2 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark2 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark2 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark2 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark2 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark2 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark2 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark2 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark2 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark2 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark2 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark2 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark2 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark2 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark2 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark2 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark2 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark2 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark2 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark2 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark2 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark2 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark2 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark2 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark2 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark2 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark2 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark2 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark2 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark2 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark2 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark2 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark2 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark2 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark2 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark2 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark2 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark2 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark2 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark2 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark2 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark2 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark2 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark2 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark2 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark2 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark2 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark2 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark2 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark2 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark2 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark2 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark2 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark2 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark2 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark2 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark2 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark2 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark2 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark2 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark2 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark2 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark2 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark2 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark2 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark2 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark2 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark2 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark2 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark2 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark2 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark2 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark2 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark2 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark2 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark2 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark2 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark2 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark2 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark2 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark2 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark2 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark2 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark2 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark2 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark2 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark2 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark2 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark2 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark2 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark2 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark2 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark2 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark2 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark2 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark2 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark2 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark2 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark2 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark2 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark2 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark2 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark2 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark2 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark2 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark2 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark2 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark2 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark2 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark2 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark2 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark2 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark2 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark2 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark2 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark2 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark2 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark2 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark2 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark2 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark2 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark2 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark2 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark2 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark2 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark2 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark2 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark2 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark2 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark2 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark2 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark2 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark2 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark2 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark2 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark2 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark2 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark2 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark2 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark2 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark2 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x06,},//Dark2 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark2 1072 -{0x6c, 0x73,}, -{0x6d, 0x99,},//Dark2 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark2 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark2 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark2 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark2 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark2 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Dark2 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Dark2 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Dark2 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Dark2 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark2 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark2 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark2 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark2 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark2 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark2 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark2 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark2 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x05,},//Dark2 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark2 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 54MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0f,}, // tlpx_time_l_dn -{0x1e, 0x08,}, // hs_zero_time -{0x1f, 0x0a,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x0f,}, // clk_zero_time -{0x33, 0x0b,}, // clk_post_time -{0x34, 0x03,}, // clk_prepare_time -{0x35, 0x04,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x06,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 -}; - -static struct msm_camera_i2c_reg_conf sr352_Init_Reg_01[] = { - -/////////////////////////////////////////////////////////////////////////////// -// Sensor Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x24,}, //mode_pll1 26mhz / (4+1) = 5.2mhz -{0x08, 0x54,}, //mode_pll2 isp clk = 109.2Mhz; -{0x09, 0x85,}, //mode_pll3 // MIPI 4x div 1/2 // isp clk div = 1/4 //Preview -{0x07, 0xA4,}, -{0x07, 0xA4,}, -{0x07, 0xA4,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, // mode_pll4 for mipi mode -{0x0A, 0xe0,}, // mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, // SSD sram clock inv on -{0x33, 0x45,}, // bit[6]:C-NR DC ?? ?? - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 108mhz -{0x40, 0x3B,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x3B,}, // otp cfg 3 -{0x43, 0x3B,}, // otp cfg 4 -{0x44, 0x3B,}, // otp cfg 5 -{0x45, 0x2B,}, // otp cfg 6 -{0x46, 0x71,}, // otp cfg 7 -{0x47, 0x0B,}, // otp cfg 8 -{0x48, 0x03,}, // otp cfg 9 -{0x49, 0x6A,}, // otp cfg 10 -{0x4A, 0x3B,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, // delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// TAP for capture function -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, - -{0x16, 0x00,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) -{0x18, 0x01,}, // use tap memory - -{0x40, 0x02,}, // set auto increment mode -{0x44, 0x00,}, // select rom -{0x45, 0x00,}, // set high address -{0x46, 0x00,}, // set low address - -// tap code download - start -// (caution : data length must be even) -{0x42, 0x90,}, -{0x42, 0x81,}, -{0x42, 0xf0,}, -{0x42, 0xe0,}, -{0x42, 0x54,}, -{0x42, 0x07,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x40,}, -{0x42, 0x1e,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xb4,}, -{0x42, 0x01,}, -{0x42, 0x07,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x10,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0x13,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x0c,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xe4,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x21,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x55,}, -{0x42, 0x90,}, -{0x42, 0x90,}, - -{0x42, 0xb4,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe5,}, -{0x42, 0x4e,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x4a,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x88,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8b,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, - -{0x42, 0x00,}, -{0x42, 0x8c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8e,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8f,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x04,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x66,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x67,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x68,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x69,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6b,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x0a,}, -// tap code download - end - -{0x44, 0x01,}, // select ram - -{0x16, 0xf8,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x41,}, //binning + prev1 -{0x11, 0x80,}, //Fixed mode off -{0x12, 0x00,}, -{0x13, 0x28,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1d, 0x05,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set -{0x24, 0x06,}, // height = 1536 -{0x25, 0x00,}, -{0x26, 0x08,}, // width = 2048 -{0x27, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x08,}, // 1Line = 2200 : 054(HBLANK) + 2146(Active Pixel) -{0x4d, 0x98,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, //Vsync H -{0x53, 0x14,}, //Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x00,}, // bayer y start -{0x81, 0x00,}, -{0x82, 0x06,}, // bayer height -{0x83, 0x24,}, -{0x84, 0x00,}, //pixel_col_start -{0x85, 0x00,}, -{0x86, 0x08,}, //pixel_width -{0x87, 0x24,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ?? for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, // 20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, -{0xa0, 0x02,}, -{0xa1, 0xa8,}, -{0xa2, 0x04,}, -{0xa3, 0x79,}, -{0xa4, 0x04,}, -{0xa5, 0xdc,}, -{0xa6, 0x08,}, -{0xa7, 0x66,}, -{0xa8, 0x02,}, -{0xa9, 0x7b,}, -{0xaa, 0x03,}, -{0xab, 0x4f,}, -{0xac, 0x03,}, -{0xad, 0xa0,}, -{0xae, 0x05,}, -{0xaf, 0x43,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1c, 0x02,}, -{0x1d, 0x88,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, -{0x42, 0x00,}, -{0x43, 0xb0,}, -{0x46, 0x01,}, -{0x47, 0x00,}, -{0x4a, 0x00,}, -{0x4b, 0xae,}, -{0x4e, 0x00,}, -{0x4f, 0xae,}, -{0x52, 0x00,}, -{0x53, 0xaa,}, -{0x56, 0x00,}, -{0x57, 0xaa,}, -{0x5A, 0x00,}, -{0x5b, 0xaa,}, -{0x6A, 0x00,}, -{0x6B, 0xf8,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x90,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x8b,}, -{0x7A, 0x06,}, -{0x7B, 0x95,}, -{0x7C, 0x06,}, -{0x7D, 0x8b,}, -{0x7E, 0x06,}, -{0x7F, 0x95,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x8b,}, -{0x86, 0x06,}, -{0x87, 0x95,}, -{0x88, 0x06,}, -{0x89, 0x8b,}, -{0x8A, 0x06,}, -{0x8B, 0x95,}, -{0x92, 0x06,}, // sx -{0x93, 0x81,}, -{0x96, 0x06,}, -{0x97, 0x81,}, -{0x98, 0x06,}, // sxb -{0x99, 0x81,}, -{0x9c, 0x06,}, -{0x9d, 0x81,}, - -{0xb6, 0x01,}, // --------------> s_hb_cnt_hold = 500 -{0xb7, 0xf4,}, -{0xc0, 0x00,}, // i_addr_mux_prev -{0xc1, 0xb4,}, -{0xc2, 0x00,}, -{0xc3, 0xf4,}, -{0xc4, 0x00,}, -{0xc5, 0xb4,}, -{0xc6, 0x00,}, -{0xc7, 0xf4,}, -{0xc8, 0x00,}, // i_addr_cut_prev -{0xc9, 0xb8,}, -{0xca, 0x00,}, -{0xcb, 0xf0,}, -{0xcc, 0x00,}, -{0xcd, 0xb8,}, -{0xce, 0x00,}, -{0xcf, 0xf0,}, -{0xd0, 0x00,}, // Rx_exp_prev -{0xd1, 0xba,}, -{0xd2, 0x00,}, -{0xd3, 0xee,}, -{0xd4, 0x00,}, -{0xd5, 0xba,}, -{0xd6, 0x00,}, -{0xd7, 0xee,}, -{0xd8, 0x00,}, // Tx_exp_prev -{0xd9, 0xbc,}, -{0xdA, 0x00,}, -{0xdB, 0xec,}, -{0xdC, 0x00,}, -{0xdD, 0xbc,}, -{0xdE, 0x00,}, -{0xdF, 0xec,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ??? MCU? reset ??. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x11,}, //Preview1 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x00,}, //gap y off, gap x off - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x10,}, //YOFS ENB -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x00,}, //16_235 range scale down off -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,},//D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0x7a,}, //pga_dark1_hi //Enter Dark1 -{0xf3, 0x72,}, //pga_dark_lo //Escape Dark1 -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0x90,},//C-mask near STD TH -{0x88, 0x70,},//C-mask middle STD TH -{0x89, 0x50,},//C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,},//Yc2d_ee_color_gain1 -{0x78, 0x20,},//Yc2d_ee_color_gain2 -{0x79, 0x20,},//Yc2d_ee_color_gain3 -{0x7a, 0x20,},//Yc2d_ee_color_gain4 -{0x7b, 0x20,},//Yc2d_ee_color_gain5 -{0x7c, 0x20,},//Yc2d_ee_color_gain6 -{0x7d, 0x20,},//Yc2d_ee_color_gain7 -{0x7e, 0x20,},//Yc2d_ee_color_gain8 - -{0xc0, 0x00,},//Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,},//Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,},//Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,},//Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,},//Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xd0, 0x01,},//Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8d, 0x20,},//RGB-Color_Gain1 -{0x8e, 0x20,},//RGB-Color_Gain2 -{0x8f, 0x20,},//RGB-Color_Gain3 -{0x90, 0x20,},//RGB-Color_Gain4 -{0x91, 0x20,},//RGB-Color_Gain5 -{0xcb, 0x34,},//20130604 Cyan th - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0x20,}, - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x08,}, -{0x38, 0x98,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x80, 0x3a,}, //Y Target -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x7C,}, //Flicker Line 100 -{0x15, 0x67,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x16, 0x50,}, //SSD B gain int gain 1.5 - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -////54.646200mhz = 0x0341D5B8 -{0x03, 0xC0,}, -{0x14, 0x03,}, -{0x15, 0x41,}, -{0x16, 0xD5,}, -{0x17, 0xB8,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9e, 0x00,},//1 Line -{0x9f, 0x00,}, -{0xa0, 0x00,}, -{0xa1, 0x00,}, -{0xa2, 0x00,}, -{0xa3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x7c, 0xe0,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x34,}, -{0x18, 0x55,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x04,}, -{0x22, 0x30,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 - -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,},//Low In Th -{0x56, 0x52,},//Low Out Th -{0x57, 0x60,},//High Out Th -{0x58, 0x70,},//High In Th - -{0x62, 0xd8,},//Out weight //ca->d8 -{0x63, 0xa6,},//Indoor weight -{0x64, 0x88,},//Dark weight -{0x65, 0xe8,},//Low weight -{0x66, 0xa6,},//High weight - -{0x31, 0x01,},//Color ratio reset -{0x30, 0x98,},//Color ratio on -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x23,}, // DYOFS_Ratio -{0x1c, 0x04,}, // DYOFS_Limit - -{0x1d, 0x00,},//EV Th OutEnd -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,},//EV Th OutStr def : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x0b,}, -{0x27, 0x71,}, -{0x28, 0xb0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x0d,}, -{0x2b, 0xbb,}, -{0x2c, 0xa0,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x12,}, -{0x2f, 0x76,}, -{0x30, 0x90,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x1e,}, -{0x33, 0x84,}, -{0x34, 0x80,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,}, // LSC_EvTh_OutEnd_4 -{0x3a, 0x00,}, // LSC_EvTh_OutEnd_3 -{0x3b, 0x13,}, // LSC_EvTh_OutEnd_2 -{0x3c, 0x88,}, // LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,}, // LSC_EvTh_OutStr_4 -{0x3e, 0x00,}, // LSC_EvTh_OutStr_3 -{0x3f, 0x30,}, // LSC_EvTh_OutStr_2 -{0x40, 0xd4,}, // LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,}, // LSC_EvTh_Dark1Str_4 -{0x42, 0x05,}, // LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,}, // LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,}, // LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,}, // LSC_EvTh_Dark1End_4 -{0x46, 0x0b,}, // LSC_EvTh_Dark1End_3 -{0x47, 0x71,}, // LSC_EvTh_Dark1End_2 -{0x48, 0xb0,}, // LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,}, // LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,}, // LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,}, // LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,}, // LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,}, // LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,}, // LSC_EvTh_Dark2End_3 -{0x4f, 0x84,}, // LSC_EvTh_Dark2End_2 -{0x50, 0x80,}, // LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},// LSC Ctmp LTEnd Out -{0x52, 0x64,},// LSC Ctmp LTStr Out -{0x53, 0x78,},// LSC Ctmp HTStr Out -{0x54, 0x86,},// LSC Ctmp HTEnd Out - -{0x55, 0x4a,},// LSC Ctmp LTEnd In h46->h4a 13.5.29 multi gain modify -{0x56, 0x56,},// LSC Ctmp LTStr In h56->h56 -{0x57, 0x6e,},// LSC Ctmp HTStr In h6e->h6e -{0x58, 0x78,},// LSC Ctmp HTEnd In h76->h78 - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,},// UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,},// UniScn_BPstdMinTh -{0x6c, 0x3a,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x34,},// Y_target_Outdoor -{0x7e, 0x34,},// Y_target_Indoor -{0x7f, 0x34,},// Y_target_Dark1 -{0x80, 0x34,},// Y_target_Dark2 -{0x81, 0x39,},// Y_target_LowTemp -{0x82, 0x2f,},// Y_target_HighTemp - -{0x83, 0x98,}, // Cb_Outdoor -{0x84, 0x95,},// Cb _Sat_Indoor -{0x85, 0xa0,},// Cb _Sat_Dark1 -{0x86, 0x8a,},// Cb _Sat_Dark2 -{0x87, 0x88,},// Cb _Sat_LowTemp -{0x88, 0x92,},// Cb _Sat_HighTemp - -{0x89, 0x88,},// Cr _Sat_Outdoor -{0x8a, 0x90,},// Cr _Sat_Indoor -{0x8b, 0xa0,},// Cr _Sat_Dark1 -{0x8c, 0x84,},// Cr _Sat_Dark2 -{0x8d, 0x75,},// Cr _Sat_LowTemp -{0x8e, 0x92,},// Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x82,}, // BLC_ofs_r_Dark1 -{0x98, 0x82,}, // BLC_ofs_b_Dark1 -{0x99, 0x82,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x82,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x82,}, // BLC_ofs_r_Dark2 -{0x9c, 0x82,}, // BLC_ofs_b_Dark2 -{0x9d, 0x82,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x82,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x50,}, //CMC_Out_00 -{0xdd, 0x1d,}, //CMC_Out_01 -{0xde, 0x0d,}, //CMC_Out_02 -{0xdf, 0x0e,}, //CMC_Out_03 -{0xe0, 0x50,}, //CMC_Out_04 -{0xe1, 0x02,}, //CMC_Out_05 -{0xe2, 0x05,}, //CMC_Out_06 -{0xe3, 0x15,}, //CMC_Out_07 -{0xe4, 0x5a,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,},//CMCSIGN_In_Mid -{0x17, 0x53,},//CMC_In_Mid_00 -{0x18, 0x16,},//CMC_In_Mid_01 -{0x19, 0x03,},//CMC_In_Mid_02 -{0x1a, 0x10,},//CMC_In_Mid_03 -{0x1b, 0x53,},//CMC_In_Mid_04 -{0x1c, 0x03,},//CMC_In_Mid_05 -{0x1d, 0x04,},//CMC_In_Mid_06 -{0x1e, 0x1d,},//CMC_In_Mid_07 -{0x1f, 0x61,},//CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,},//CMCSIGN_Dark1 -{0x40, 0x53,},//CMC_Dark1_00 -{0x41, 0x1c,},//CMC_Dark1_01 -{0x42, 0x09,},//CMC_Dark1_02 -{0x43, 0x0e,},//CMC_Dark1_03 -{0x44, 0x53,},//CMC_Dark1_04 -{0x45, 0x05,},//CMC_Dark1_05 -{0x46, 0x03,},//CMC_Dark1_06 -{0x47, 0x23,},//CMC_Dark1_07 -{0x48, 0x66,},//CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,},//CMCSIGN_Dark2 -{0x69, 0x53,},//CMC_Dark2_00 -{0x6a, 0x1c,},//CMC_Dark2_01 -{0x6b, 0x09,},//CMC_Dark2_02 -{0x6c, 0x0e,},//CMC_Dark2_03 -{0x6d, 0x53,},//CMC_Dark2_04 -{0x6e, 0x05,},//CMC_Dark2_05 -{0x6f, 0x03,},//CMC_Dark2_06 -{0x70, 0x23,},//CMC_Dark2_07 -{0x71, 0x66,},//CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x15,},// CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x18,},// CMC_Dark2_LumGain2_R -{0x7b, 0x1e,},// CMC_Dark2_LumGain3_R -{0x7c, 0x1f,},// CMC_Dark2_LumGain4_R -{0x7d, 0x20,},// CMC_Dark2_LumGain5_R -{0x7e, 0x20,},// CMC_Dark2_LumGain6_R -{0x7f, 0x20,},// CMC_Dark2_LumGain7_R -{0x80, 0x20,},// CMC_Dark2_LumGain8_R 20 = x1 - -{0x81, 0x15,},// CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x18,},// CMC_Dark2_LumGain2_G -{0x83, 0x1e,},// CMC_Dark2_LumGain3_G -{0x84, 0x1f,},// CMC_Dark2_LumGain4_G -{0x85, 0x20,},// CMC_Dark2_LumGain5_G -{0x86, 0x20,},// CMC_Dark2_LumGain6_G -{0x87, 0x20,},// CMC_Dark2_LumGain7_G -{0x88, 0x20,},// CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x15,},// CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x18,},// CMC_Dark2_LumGain2_B -{0x8b, 0x1e,},// CMC_Dark2_LumGain3_B -{0x8c, 0x1f,},// CMC_Dark2_LumGain4_B -{0x8d, 0x20,},// CMC_Dark2_LumGain5_B -{0x8e, 0x20,},// CMC_Dark2_LumGain6_B -{0x8f, 0x20,},// CMC_Dark2_LumGain7_B -{0x90, 0x20,},// CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, // GMA_OUT -{0xe4, 0x03,}, -{0xe5, 0x08,}, -{0xe6, 0x0f,}, -{0xe7, 0x15,}, -{0xe8, 0x20,}, -{0xe9, 0x2d,}, -{0xea, 0x3b,}, -{0xeb, 0x47,}, -{0xec, 0x53,}, -{0xed, 0x5c,}, -{0xee, 0x65,}, -{0xef, 0x6d,}, -{0xf0, 0x75,}, -{0xf1, 0x7c,}, -{0xf2, 0x82,}, -{0xf3, 0x88,}, -{0xf4, 0x8d,}, -{0xf5, 0x91,}, -{0xf6, 0x96,}, -{0xf7, 0x9a,}, -{0xf8, 0xa1,}, -{0xf9, 0xa9,}, -{0xfa, 0xb0,}, -{0xfb, 0xbe,}, -{0xfc, 0xc8,}, -{0xfd, 0xd2,}, - -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, // Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xdb,}, -{0x11, 0xe3,}, -{0x12, 0xea,}, -{0x13, 0xf0,}, -{0x14, 0xf5,}, -{0x15, 0xfb,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x03,}, -{0x19, 0x08,}, -{0x1a, 0x0f,}, -{0x1b, 0x15,}, -{0x1c, 0x20,}, -{0x1d, 0x2d,}, -{0x1e, 0x3b,}, -{0x1f, 0x47,}, -{0x20, 0x53,}, -{0x21, 0x5c,}, -{0x22, 0x65,}, -{0x23, 0x6d,}, -{0x24, 0x75,}, -{0x25, 0x7c,}, -{0x26, 0x82,}, -{0x27, 0x88,}, -{0x28, 0x8d,}, -{0x29, 0x91,}, -{0x2a, 0x96,}, -{0x2b, 0x9a,}, -{0x2c, 0xa1,}, -{0x2d, 0xa9,}, -{0x2e, 0xb0,}, -{0x2f, 0xbe,}, -{0x30, 0xc8,}, -{0x31, 0xd2,}, -{0x32, 0xdb,}, -{0x33, 0xe3,}, -{0x34, 0xea,}, -{0x35, 0xf0,}, -{0x36, 0xf5,}, -{0x37, 0xfb,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, // GMA_D1 -{0x3a, 0x06,}, -{0x3b, 0x0e,}, -{0x3c, 0x17,}, -{0x3d, 0x1f,}, -{0x3e, 0x2c,}, -{0x3f, 0x3c,}, -{0x40, 0x4c,}, -{0x41, 0x57,}, -{0x42, 0x61,}, -{0x43, 0x6b,}, -{0x44, 0x76,}, -{0x45, 0x7e,}, -{0x46, 0x85,}, -{0x47, 0x8c,}, -{0x48, 0x92,}, -{0x49, 0x98,}, -{0x4a, 0x9c,}, -{0x4b, 0xa2,}, -{0x4c, 0xa6,}, -{0x4d, 0xab,}, -{0x4e, 0xb4,}, -{0x4f, 0xbc,}, -{0x50, 0xc2,}, -{0x51, 0xcb,}, -{0x52, 0xd3,}, -{0x53, 0xdb,}, -{0x54, 0xe1,}, -{0x55, 0xe7,}, -{0x56, 0xed,}, -{0x57, 0xf3,}, -{0x58, 0xf8,}, -{0x59, 0xfc,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x08,}, -{0x5d, 0x12,}, -{0x5e, 0x1b,}, -{0x5f, 0x24,}, -{0x60, 0x32,}, -{0x61, 0x3f,}, -{0x62, 0x4c,}, -{0x63, 0x57,}, -{0x64, 0x61,}, -{0x65, 0x6c,}, -{0x66, 0x79,}, -{0x67, 0x82,}, -{0x68, 0x8c,}, -{0x69, 0x94,}, -{0x6a, 0x99,}, -{0x6b, 0x9f,}, -{0x6c, 0xa4,}, -{0x6d, 0xaa,}, -{0x6e, 0xaf,}, -{0x6f, 0xb4,}, -{0x70, 0xba,}, -{0x71, 0xc0,}, -{0x72, 0xc5,}, -{0x73, 0xcd,}, -{0x74, 0xd5,}, -{0x75, 0xdc,}, -{0x76, 0xe1,}, -{0x77, 0xe7,}, -{0x78, 0xed,}, -{0x79, 0xf3,}, -{0x7a, 0xf8,}, -{0x7b, 0xfc,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x18,}, //Outdoor_delta3 -{0x82, 0xb3,}, //Outdoor_center3 -{0x83, 0x1b,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x8c,}, //Outdoor_hue_angle2 -{0x91, 0x0e,}, //Outdoor_hue_angle3 -{0x92, 0x05,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,},// MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 Skin -{0xb7, 0x3f,},// MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,},// MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,},// MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,},// MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,},// MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,},// MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,},// MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,},// MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 bright green1 -{0xbf, 0x3f,},// MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,},// MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,},// MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 dark Green2 -{0xc7, 0x3f,},// MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,},// MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,},// MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,},// MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,},// MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,},// MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,},// MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x16,}, //Outdoor_allgain_y0 -{0xe7, 0x16,}, //Outdoor_allgain_y1 -{0xe8, 0x16,}, //Outdoor_allgain_y2 -{0xe9, 0x16,}, //Outdoor_allgain_y3 -{0xea, 0x16,}, //Outdoor_allgain_y4 -{0xeb, 0x15,}, //Outdoor_allgain_y5 -{0xec, 0x19,}, //Outdoor_allgain_y6 -{0xed, 0x19,}, //Outdoor_allgain_y7 -{0xee, 0x18,}, //Outdoor_allgain_y8 -{0xef, 0x17,}, //Outdoor_allgain_y9 -{0xf0, 0x14,}, //Outdoor_allgain_y10 -{0xf1, 0x14,}, //Outdoor_allgain_y11 - -// Indoor MCMC -{0xf2, 0x10,},//Indoor_delta1 -{0xf3, 0x1e,},//Indoor_center1 -{0xf4, 0x0b,},//Indoor_delta2 -{0xf5, 0x6f,},//Indoor_center2 -{0xf6, 0x1b,},//Indoor_delta3 light green -{0xf7, 0xc2,},//Indoor_center3 light green -{0xf8, 0x17,},//Indoor_delta4 -{0xf9, 0xfb,},//Indoor_center4 -{0xfa, 0x91,},//Indoor_delta5 -{0xfb, 0x2b,},//Indoor_center5 -{0xfc, 0x92,},//Indoor_delta6 -{0xfd, 0x4f,},//Indoor_center6 -{0x0e, 0x00,},// burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x00,}, //Indoor_hue_angle2 -{0x18, 0x1e,}, //Indoor_hue_angle3 -{0x19, 0x0a,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,},// MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,},// MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,},// MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,},// MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,},// MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,},// MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,},// MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x12,},// MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x12,},// MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,},// MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,},// MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,},//Dark1_allgain_y1 -{0xe3, 0x10,},//Dark1_allgain_y2 -{0xe4, 0x10,},//Dark1_allgain_y3 -{0xe5, 0x11,},//Dark1_allgain_y4 -{0xe6, 0x10,},//Dark1_allgain_y5 -{0xe7, 0x13,},//Dark1_allgain_y6 -{0xe8, 0x12,},//Dark1_allgain_y7 -{0xe9, 0x12,},//Dark1_allgain_y8 -{0xea, 0x12,},//Dark1_allgain_y9 -{0xeb, 0x11,},//Dark1_allgain_y10 -{0xec, 0x10,},//Dark1_allgain_y11 -{0xed, 0x0f,},//Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,},// MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,},// MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,},// MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,},// MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,},// MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,},// MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,},// MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x05,},// MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,},// MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,},// MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,},// MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,},// MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,},// MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,},// MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,},// MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,},// MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,},// MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,},// MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,},// MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,},// MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,},//Hi-Temp_allgain_y0 -{0x66, 0x0d,},//Hi-Temp_allgain_y1 -{0x67, 0x0e,},//Hi-Temp_allgain_y2 -{0x68, 0x0e,},//Hi-Temp_allgain_y3 -{0x69, 0x0f,},//Hi-Temp_allgain_y4 -{0x6a, 0x10,},//Hi-Temp_allgain_y5 -{0x6b, 0x12,},//Hi-Temp_allgain_y6 -{0x6c, 0x14,},//Hi-Temp_allgain_y7 -{0x6d, 0x13,},//Hi-Temp_allgain_y8 -{0x6e, 0x12,},//Hi-Temp_allgain_y9 -{0x6f, 0x0e,},//Hi-Temp_allgain_y10 -{0x70, 0x11,},//Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // function block on -{0x10, 0x8F,}, // Adaptive on - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x36,},//Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x38,},//Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3c,},//Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x18,},//Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x32,},//Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x31,},//Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x23,},//Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1b,},//Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,},//Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,},//Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,},//Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,},//Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x26,},//Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x25,},//Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x21,},//Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,},//Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,}, //Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,}, //Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,}, //Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,}, //Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,}, //Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,}, //Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,}, //Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,}, //Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,},//Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x33,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x38,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x33,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,}, //Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,},//Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x33,},//Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x3a,},//Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,},//Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x3a,},//Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x22,},//Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x30,},//Outdoor 1212 -{0x24, 0x33,}, -{0x25, 0x30,},//Outdoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x21,},//Outdoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Outdoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Outdoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Outdoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Outdoor 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Outdoor 1278 -{0x34, 0x79,}, -{0x35, 0x09,},//Outdoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Outdoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Outdoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x50,},//Outdoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x10,},//Outdoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Outdoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Outdoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Outdoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Outdoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Outdoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Outdoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Outdoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Outdoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Outdoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Outdoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Outdoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Outdoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Outdoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Outdoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Outdoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Outdoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Outdoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Outdoor 12ae -{0x62, 0xaf,}, -{0x63, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Outdoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Outdoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Outdoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Outdoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x91,},//Outdoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0xa4,},//Outdoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3c,},//Outdoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Outdoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Outdoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Outdoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Outdoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Outdoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Outdoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Outdoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Outdoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Outdoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Outdoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Outdoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Outdoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Outdoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Outdoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Outdoor 12de -{0x90, 0xe0,}, -{0x91, 0x49,},//Outdoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Outdoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Outdoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x20,},//Outdoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x20,},//Outdoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x20,},//Outdoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x20,},//Outdoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x20,},//Outdoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x20,},//Outdoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x20,},//Outdoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x20,},//Outdoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Outdoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1e,},//Outdoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1d,},//Outdoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x20,},//Outdoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Outdoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Outdoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Outdoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Outdoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x3f,},//Outdoor 1330 -{0xba, 0x31,}, -{0xbb, 0x3f,},//Outdoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x3f,},//Outdoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x3f,},//Outdoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x3f,},//Outdoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x33,},//Outdoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x2f,},//Outdoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x2e,},//Outdoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Outdoor 1338 -{0xca, 0x40,}, -{0xcb, 0x1e,},//Outdoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x22,},//Outdoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Outdoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Outdoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Outdoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Outdoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x36,},//Outdoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Outdoor 1347 -{0xda, 0x48,}, -{0xdb, 0x20,},//Outdoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Outdoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Outdoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Outdoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x20,},//Outdoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Outdoor 1383 -{0xe6, 0x84,}, -{0xe7, 0x08,},//Outdoor 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfd,},//Outdoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0xa7,},//Outdoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Outdoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Outdoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Outdoor 1410 -{0xfc, 0x11,}, -{0xfd, 0xd8,},//Outdoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Outdoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Outdoor 1413 -{0x14, 0x14,}, -{0x15, 0x0f,},//Outdoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Outdoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x1c,},//Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Outdoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Outdoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Outdoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Outdoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1d,},//Outdoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x2c,},//Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x2a,},//Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x28,},//Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x1e,},//Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x16,},//Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x16,},//Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x28,},//Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x26,},//Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x23,},//Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x19,},//Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x16,},//Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x15,},//Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x17,},//Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x19,},//Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x24,},//Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x24,},//Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1a,},//Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x10,},//Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x18,},//Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x18,},//Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x1a,},//Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x18,},//Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x15,},//Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x18,},//Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x22,},//Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x23,},//Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x24,},//Outdoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x24,},//Outdoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x28,},//Outdoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2f,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x27,},//Outdoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x28,},//Outdoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2d,},//Outdoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2f,},//Outdoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x34,},//Outdoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x2d,},//Outdoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x26,},//Outdoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x24,},//Outdoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Outdoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Outdoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Outdoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Outdoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Outdoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Outdoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Outdoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Outdoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Outdoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Outdoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Outdoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x3f,},//Outdoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Outdoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Outdoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Outdoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x3f,},//Outdoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x3f,},//Outdoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x3f,},//Outdoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x3c,},//Outdoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x38,},//Outdoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x35,},//Outdoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Outdoor 1A20 add -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Outdoor 1A2f add -{0xb4, 0x32,}, -{0xb5, 0x87,},//Outdoor 1A32 add -{0xb6, 0x34,}, -{0xb7, 0xd2,},//Outdoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x1c,},//Outdoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x06,},//Outdoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Outdoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Outdoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x2e,},//Outdoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Outdoor 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x01,},//Outdoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x0c,},//Outdoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x01,},//Outdoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x07,},//Outdoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x01,},//Outdoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x0c,},//Outdoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x01,},//Outdoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x07,},//Outdoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2b,},//Outdoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x0b,},//Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0c,},//Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x0c,},//Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x11,},//Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x17,},//Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x17,},//Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x17,},//Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x17,},//Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x16,},//Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x13,},//Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x11,},//Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x0f,},//Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x0f,},//Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x10,},//Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x17,},//Outdoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xd0, 0x27,}, -{0xd1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x19,},//Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x17,},//Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x16,},//Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x16,},//Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x10,},//Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x16,},//Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x15,},//Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x13,},//Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x29,},//Outdoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x29,},//Outdoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x29,},//Outdoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x28,},//Outdoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x28,},//Outdoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x3f,},//Outdoor 1Aa7 add -{0x4c, 0xa8,}, -{0x4d, 0x3f,},//Outdoor 1Aa8 add -{0x4e, 0xa9,}, -{0x4f, 0x3f,},//Outdoor 1Aa9 add -{0x50, 0xaa,}, -{0x51, 0x3f,},//Outdoor 1Aaa add -{0x52, 0xab,}, -{0x53, 0x3f,},//Outdoor 1Aab add -{0x54, 0xaf,}, -{0x55, 0x3f,},//Outdoor 1Aaf add -{0x56, 0xb0,}, -{0x57, 0x3f,},//Outdoor 1Ab0 add -{0x58, 0xb1,}, -{0x59, 0x3f,},//Outdoor 1Ab1 add -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Outdoor 1Ab2 add -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Outdoor 1Ab3 add -{0x5e, 0xca,}, -{0x5f, 0x00,},//Outdoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Outdoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Outdoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0f,},//Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x00,},//Outdoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x00,},//Outdoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x00,},//Outdoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Outdoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Outdoor 1075 -{0x72, 0x76,}, -{0x73, 0x40,},//Outdoor 1076 -{0x74, 0x77,}, -{0x75, 0x40,},//Outdoor 1077 -{0x76, 0x78,}, -{0x77, 0x00,},//Outdoor 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Outdoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Outdoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Outdoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Outdoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Outdoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Outdoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Outdoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x30,},//Outdoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Outdoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Outdoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Outdoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Outdoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x02,},//Outdoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x00,},//Outdoor 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x07,}, //Indoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 //Pre flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 //Pre flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Indoor 113c //Pre flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x56,},//Indoor 113d //Pre flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,},//Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,},//Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Indoor 1140 //Pre flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x1c,},//Indoor 1141 //Pre flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,},//Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,},//Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x10,},//Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,},//Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x15,},//Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x13,},//Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x10,},//Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x10,},//Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x12,},//Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,},//Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,},//Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x17,},//Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x16,},//Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x13,},//Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x13,},//Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x15,},//Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,},//Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,},//Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,},//Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x14,},//Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x12,},//Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x11,},//Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,},//Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,},//Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,},//Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,},//Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,},//Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,},//Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x18,},//Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x13,},//Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x16,},//Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,},//Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,},//Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x26,},//Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x28,},//Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,},//Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,},//Indoor 11d1 //Bayer Flat R1 Lum H -{0xde, 0xd2,}, -{0xdf, 0x40,},//Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,},//Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,},//Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x20,},//Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x18,},//Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,},//Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x08,},//Indoor 11e0 //Bayer Flat R3 LumL -{0xf6, 0xe1,}, -{0xf7, 0x15,},//Indoor 11e1 //Bayer Flat R3 LumH -{0xf8, 0xe2,}, -{0xf9, 0x3c,},//Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,},//Indoor 11e3 //Bayer Flat R4 LumH -{0xfc, 0xe4,}, -{0xfd, 0x01,},//Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,},// burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x11,},//Indoor 11e5 //Bayer Flat R3 StdH -{0x12, 0xe6,}, -{0x13, 0x01,},//Indoor 11e6 //Bayer Flat R4 StdL -{0x14, 0xe7,}, -{0x15, 0x40,},//Indoor 11e7 //Bayer Flat R4 StdH -{0x16, 0xe8,}, -{0x17, 0x01,},//Indoor 11e8 //Bayer Flat R3 DyL -{0x18, 0xe9,}, -{0x19, 0x0a,},//Indoor 11e9 //Bayer Flat R3 DyH -{0x1a, 0xea,}, -{0x1b, 0x01,},//Indoor 11ea //Bayer Flat R4 DyL -{0x1c, 0xeb,}, -{0x1d, 0x25,},//Indoor 11eb //Bayer Flat R4 DyH -{0x1e, 0xef,}, -{0x1f, 0x6a,},//Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x08,},//Indoor 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Indoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Indoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Indoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Indoor 1270 // Bayer Sharpness ENB add -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Indoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Indoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x26,},//Indoor 1277 //20130412 -{0x32, 0x78,}, -{0x33, 0x2f,},//Indoor 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Indoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Indoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Indoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x60,},//Indoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Indoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Indoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Indoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Indoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Indoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Indoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Indoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Indoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Indoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Indoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Indoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Indoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Indoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Indoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Indoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Indoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Indoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Indoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Indoor 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Indoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Indoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Indoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Indoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Indoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Indoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Indoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Indoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Indoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Indoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Indoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Indoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Indoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Indoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Indoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Indoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Indoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Indoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Indoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Indoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Indoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Indoor 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Indoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Indoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Indoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Indoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Indoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Indoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Indoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Indoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Indoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Indoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Indoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Indoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Indoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Indoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Indoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Indoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Indoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Indoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Indoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Indoor 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Indoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Indoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Indoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Indoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Indoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Indoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Indoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Indoor 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Indoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Indoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Indoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Indoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Indoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Indoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Indoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Indoor 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Indoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Indoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Indoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Indoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Indoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Indoor 1383 //add 20121210 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Indoor 1384 //add 20121210 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Indoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Indoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Indoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Indoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Indoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Indoor 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Indoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Indoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Indoor 1413 -{0x14, 0x14,}, -{0x15, 0x10,},//Indoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Indoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Indoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Indoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Indoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Indoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Indoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1c,},//Indoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x20,},//Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x1f,},//Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x1c,},//Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x11,},//Indoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x10,},//Indoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x10,},//Indoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x11,},//Indoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x10,},//Indoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x1a,},//Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x15,},//Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x14,},//Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x13,},//Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x14,},//Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x15,},//Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x22,},//Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x22,},//Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1f,},//Indoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x1a,},//Indoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x18,},//Indoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x1a,},//Indoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x1d,},//Indoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x19,},//Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x16,},//Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x15,},//Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x14,},//Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x14,},//Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x13,},//Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x2b,},//Indoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x2c,},//Indoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x2e,},//Indoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2f,},//Indoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Indoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2e,},//Indoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Indoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x30,},//Indoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x17,},//Indoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x1d,},//Indoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x24,},//Indoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x26,},//Indoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x24,},//Indoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x23,},//Indoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1d,},//Indoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x17,},//Indoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Indoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Indoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Indoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Indoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Indoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Indoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Indoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Indoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Indoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Indoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Indoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x50,},//Indoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Indoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Indoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Indoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Indoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Indoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Indoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Indoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Indoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Indoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Indoor 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Indoor 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Indoor 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Indoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Indoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Indoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Indoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Indoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x1d,},//Indoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Indoor 1A3a //RGB Flat R2_Lum H -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Indoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Indoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Indoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Indoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Indoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Indoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Indoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Indoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Indoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x12,},//Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x12,},//Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x11,},//Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x10,},//Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x10,},//Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x10,},//Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x10,},//Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x10,},//Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x15,},//Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x10,},//Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x10,},//Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x10,},//Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x10,},//Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x10,},//Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x10,},//Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x13,},//Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x14,},//Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Indoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x13,},//Indoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x14,},//Indoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x15,},//Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x15,},//Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x11,},//Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x11,},//Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x11,},//Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x22,},//Indoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x23,},//Indoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x24,},//Indoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x25,},//Indoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x26,},//Indoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x28,},//Indoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x2b,},//Indoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x2d,},//Indoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x22,},//Indoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x23,},//Indoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x26,},//Indoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x26,},//Indoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x26,},//Indoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x26,},//Indoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x26,},//Indoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x26,},//Indoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x34,},//Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Indoor 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Indoor 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Indoor 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Indoor 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Indoor 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Indoor 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Indoor 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Indoor 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Indoor 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Indoor 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Indoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Indoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Indoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Indoor 1070 Trans Func. 130618 Indoor transFuc Low 1.0->0.84 -{0x68, 0x71,}, -{0x69, 0x06,},//Indoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x85,},//Indoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x0a,},//Indoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Indoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Indoor 1075 -{0x72, 0x76,}, -{0x73, 0x36,},//Indoor 1076 -{0x74, 0x77,}, -{0x75, 0x47,},//Indoor 1077 -{0x76, 0x78,}, -{0x77, 0xae,},//Indoor 1078 -{0x78, 0x79,}, -{0x79, 0x50,},//Indoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Indoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x50,},//Indoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Indoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Indoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Indoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Indoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x2a,},//Indoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Indoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Indoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Indoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Indoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x03,},//Indoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Indoor 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Dark1 113c //Pre Flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x53,},//Dark1 113d //Pre Flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark1 1140 //Pre Flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark1 1141 //Pre Flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark1 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark1 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark1 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark1 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark1 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark1 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark1 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark1 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark1 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark1 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark1 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark1 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark1 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark1 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark1 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark1 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark1 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark1 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark1 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark1 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark1 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark1 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark1 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark1 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark1 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark1 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark1 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark1 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark1 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark1 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark1 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark1 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark1 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark1 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark1 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark1 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark1 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark1 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark1 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark1 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark1 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark1 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark1 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark1 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark1 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark1 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark1 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark1 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark1 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark1 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark1 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark1 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark1 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark1 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark1 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark1 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark1 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark1 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark1 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark1 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark1 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark1 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark1 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark1 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark1 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark1 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark1 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark1 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark1 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark1 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark1 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark1 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark1 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark1 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark1 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark1 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark1 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark1 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark1 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark1 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark1 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark1 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark1 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark1 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark1 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark1 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark1 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark1 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark1 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark1 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark1 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark1 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark1 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark1 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark1 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark1 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark1 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark1 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark1 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark1 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark1 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark1 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark1 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark1 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark1 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark1 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark1 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark1 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark1 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark1 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark1 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark1 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark1 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark1 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark1 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark1 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark1 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark1 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark1 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark1 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark1 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark1 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark1 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark1 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark1 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark1 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark1 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark1 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark1 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark1 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark1 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark1 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark1 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark1 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark1 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark1 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark1 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark1 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark1 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark1 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark1 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark1 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark1 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark1 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark1 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark1 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark1 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark1 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark1 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark1 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark1 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark1 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark1 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark1 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark1 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark1 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark1 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark1 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark1 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark1 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark1 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark1 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark1 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark1 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark1 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark1 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark1 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark1 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark1 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark1 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark1 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark1 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark1 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark1 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark1 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark1 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark1 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark1 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark1 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark1 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark1 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark1 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark1 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark1 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark1 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark1 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark1 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark1 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark1 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark1 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark1 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark1 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark1 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark1 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark1 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark1 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark1 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark1 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark1 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark1 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark1 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark1 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark1 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark1 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark1 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark1 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark1 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark1 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark1 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark1 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark1 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark1 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x0a,},//Dark1 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark1 1072 -{0x6c, 0x73,}, -{0x6d, 0xcc,},//Dark1 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark1 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark1 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark1 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark1 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark1 1078 -{0x78, 0x79,}, -{0x79, 0x49,},//Dark1 1079 -{0x7a, 0x7a,}, -{0x7b, 0x99,},//Dark1 107a -{0x7c, 0x7b,}, -{0x7d, 0x49,},//Dark1 107b -{0x7e, 0x7c,}, -{0x7f, 0x99,},//Dark1 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark1 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark1 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark1 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark1 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark1 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark1 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark1 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark1 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x04,},//Dark1 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark1 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark2 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark2 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x53,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,},//Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark2 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark2 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark2 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark2 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark2 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark2 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark2 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,},//Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark2 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark2 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark2 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark2 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark2 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark2 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark2 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark2 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark2 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark2 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark2 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark2 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark2 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark2 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark2 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark2 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark2 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark2 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark2 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark2 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark2 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark2 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark2 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark2 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark2 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark2 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark2 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark2 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark2 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark2 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark2 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark2 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark2 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark2 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark2 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark2 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark2 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark2 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark2 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark2 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark2 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark2 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark2 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark2 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark2 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark2 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark2 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark2 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark2 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark2 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark2 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark2 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark2 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark2 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark2 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark2 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark2 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark2 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark2 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark2 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark2 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark2 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark2 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark2 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark2 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark2 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark2 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark2 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark2 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark2 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark2 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark2 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark2 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark2 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark2 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark2 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark2 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark2 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark2 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark2 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark2 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark2 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark2 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark2 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark2 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark2 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark2 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark2 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark2 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark2 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark2 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark2 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark2 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark2 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark2 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark2 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark2 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark2 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark2 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark2 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark2 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark2 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark2 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark2 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark2 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark2 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark2 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark2 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark2 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark2 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark2 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark2 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark2 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark2 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark2 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark2 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark2 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark2 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark2 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark2 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark2 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark2 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark2 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark2 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark2 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark2 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark2 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark2 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark2 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark2 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark2 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark2 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark2 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark2 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark2 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark2 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark2 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark2 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark2 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark2 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark2 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark2 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark2 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark2 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark2 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark2 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark2 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark2 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark2 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark2 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark2 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark2 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark2 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark2 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark2 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark2 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark2 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark2 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark2 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark2 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark2 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark2 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark2 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark2 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark2 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark2 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark2 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark2 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark2 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark2 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark2 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark2 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark2 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark2 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark2 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark2 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark2 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark2 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark2 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark2 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark2 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark2 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark2 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark2 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark2 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark2 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark2 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark2 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark2 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark2 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark2 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark2 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark2 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark2 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark2 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark2 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark2 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark2 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark2 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark2 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark2 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark2 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark2 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark2 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark2 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark2 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark2 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark2 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark2 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark2 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark2 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark2 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x06,},//Dark2 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark2 1072 -{0x6c, 0x73,}, -{0x6d, 0x99,},//Dark2 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark2 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark2 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark2 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark2 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark2 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Dark2 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Dark2 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Dark2 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Dark2 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark2 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark2 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark2 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark2 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark2 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark2 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark2 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark2 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x05,},//Dark2 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark2 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 54MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0f,}, // tlpx_time_l_dn -{0x1e, 0x08,}, // hs_zero_time -{0x1f, 0x0a,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x0f,}, // clk_zero_time -{0x33, 0x0b,}, // clk_post_time -{0x34, 0x03,}, // clk_prepare_time -{0x35, 0x04,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x06,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x768[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set //XY flip - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x768 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x768_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x768 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x576[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x576 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x04,}, //width -{0xa3, 0x00,}, -{0xa4, 0x02,}, //height -{0xa5, 0x40,}, -{0xa6, 0x00,}, //fw scaler col start -{0xa7, 0x00,}, //fw scaler row start - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x576_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x576 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x04,}, //width -{0xa3, 0x00,}, -{0xa4, 0x02,}, //height -{0xa5, 0x40,}, -{0xa6, 0x00,}, //fw scaler col start -{0xa7, 0x00,}, //fw scaler row start - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_640x480[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 640_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x02,}, //width -{0xa3, 0x80,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x05,}, // l_pkt_wc_h // Pre = 640 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_640x480_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 640_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x02,}, //width -{0xa3, 0x80,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x05,}, // l_pkt_wc_h // Pre = 640 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Capture_2048_1536[] ={ -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set -{0xff, 0x0c,}, // 120ms - -/////////////////////////////////////////// -// D9 Page(Capture function) -/////////////////////////////////////////// -{0x03, 0xd9,}, -{0x1c, 0x04,}, // Capture Pll Div (CAP_OPCLK_DIV / 2.0) -/////////////////////////////////////////// -// 00 Page - -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x00,}, // full -{0x17, 0x01,}, // ISP Divider2 1/2 -{0x20, 0x00,}, -{0x21, 0x0a,}, //XY Flip -{0x22, 0x00,}, -{0x23, 0x14,}, //XY Flip - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Full XY flip 1219 -{0x12, 0x82,}, //Full XY flip 1219 - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Hi -{0x03, 0x12,}, -{0x70, 0xbF,}, //Bit[0]=Hi - -//------------------------------------------------// -//TAP Capture Setting -//------------------------------------------------// -{0x03, 0xc0,}, -{0x98, 0x00,}, -{0x99, 0x10,}, -{0x9a, 0x72,}, -{0x9b, 0xf0,}, // exp_band_100 * 2 -{0x9c, 0x00,}, -{0x9d, 0x0d,}, -{0x9e, 0xb2,}, -{0x9f, 0x40,}, // exp_band_120 * 2 - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x00,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x29,}, // Capture On - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x92,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call -//------------------------------------------------// - -/////////////////////////////////////////// -// Scaler Off -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 -{0x30, 0x10,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Capture_2048_1536_01[] ={ -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set -{0xff, 0x0c,}, // 120ms - -/////////////////////////////////////////// -// D9 Page(Capture function) -/////////////////////////////////////////// -{0x03, 0xd9,}, -{0x1c, 0x04,}, // Capture Pll Div (CAP_OPCLK_DIV / 2.0) -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x00,}, // full -{0x17, 0x01,}, // ISP Divider2 1/2 -{0x20, 0x00,}, -{0x21, 0x08,}, // row start set -{0x22, 0x00,}, -{0x23, 0x01,}, // col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Full & HD(crop) 0410 -{0x12, 0x00,}, //Full & HD(crop) 0410 - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Hi -{0x03, 0x12,}, -{0x70, 0xbF,}, //Bit[0]=Hi - -//------------------------------------------------// -//TAP Capture Setting -//------------------------------------------------// -{0x03, 0xc0,}, -{0x98, 0x00,}, -{0x99, 0x10,}, -{0x9a, 0x72,}, -{0x9b, 0xf0,}, // exp_band_100 * 2 -{0x9c, 0x00,}, -{0x9d, 0x0d,}, -{0x9e, 0xb2,}, -{0x9f, 0x40,}, // exp_band_120 * 2 - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x00,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x29,}, // Capture On - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x92,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call -//------------------------------------------------// - -/////////////////////////////////////////// -// Scaler Off -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 -{0x30, 0x10,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, -}; - -#if 0 -static struct msm_camera_i2c_reg_conf sr352_preview_176_144[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 176_144 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x63,}, //sawtooth on 320_240 176_144 pre filter //Bit[5] on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x00,}, -{0xa3, 0xb0,}, -{0xa4, 0x00,}, -{0xa5, 0x90,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x01,}, // l_pkt_wc_h // Pre = 176 * 2 (YUV) -{0x31, 0x60,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; -#endif - -static struct msm_camera_i2c_reg_conf sr352_preview_320_240[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 320_240 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x43,}, //sawtooth on 320_240 176_144 pre filter - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x01,}, //width -{0xa3, 0x40,}, -{0xa4, 0x00,}, //height -{0xa5, 0xf0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x02,}, // l_pkt_wc_h // Pre = 320 * 2 (YUV) -{0x31, 0x80,}, // l_pkt_wc_l -//------------------------------------// - - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_preview_800_480[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 800_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x03,}, //width -{0xa3, 0x20,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x06,}, // l_pkt_wc_h // Pre = 800 * 2 (YUV) -{0x31, 0x40,}, // l_pkt_wc_l -//------------------------------------// - - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - -/*===========================================*/ -/*CAMERA_RECORDING WITH 30fps */ -/*============================================*/ - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_HD[] = { - -/////////////////////////////////////////////////////////////////////////////// -// HD Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x25,}, //mode_pll1 26mhz / (5+1) = 4.33mhz -{0x08, 0x50,}, //mode_pll2 isp clk = 86.6Mhz; -{0x09, 0x81,}, //mode_pll3 // MIPI 4x div 1/1 // isp clk div = 1/4 -{0x07, 0xA5,}, -{0x07, 0xA5,}, -{0x07, 0xA5,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, //mode_pll4 for mipi mode -{0x0A, 0xe0,}, //mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, //SSD sram clock inv on -{0x33, 0x45,}, //bit[6]:C-NR DC °ü·Ã ¼³Á¤ - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 86mhz -{0x40, 0x2f,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x2f,}, // otp cfg 3 -{0x43, 0x2f,}, // otp cfg 4 -{0x44, 0x2f,}, // otp cfg 5 -{0x45, 0x22,}, // otp cfg 6 -{0x46, 0x5a,}, // otp cfg 7 -{0x47, 0x09,}, // otp cfg 8 -{0x48, 0x02,}, // otp cfg 9 -{0x49, 0xb8,}, // otp cfg 10 -{0x4A, 0x2f,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x00,}, // Full size -{0x11, 0x83,}, // Fixed mode off -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1D, 0x0D,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x08,}, // preview col start set -{0x24, 0x02,}, -{0x25, 0xd0,}, // height 720 -{0x26, 0x05,}, -{0x27, 0x00,}, // width 1280 - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x07,}, // one_line = 1850 -{0x4d, 0x3a,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, // Vsync H -{0x53, 0x14,}, // Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x01,}, // pixel_row_start for 720p crop mode -{0x81, 0x9e,}, // pwin_row_start = 414 -{0x82, 0x02,}, // pwin_row_height = 738 -{0x83, 0xe2,}, -{0x84, 0x01,}, // pwin_col_start = 384 -{0x85, 0x80,}, -{0x86, 0x05,}, // pwin_col_width = 1312 -{0x87, 0x20,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ´©Àû for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, //20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, - -{0xa0, 0x01,}, -{0xa1, 0x7c,}, -{0xa2, 0x03,}, -{0xa3, 0x4d,}, -{0xa4, 0x03,}, -{0xa5, 0xb0,}, -{0xa6, 0x06,}, -{0xa7, 0xf2,}, -{0xa8, 0x01,}, -{0xa9, 0x4f,}, -{0xaa, 0x02,}, -{0xab, 0x23,}, -{0xac, 0x02,}, -{0xad, 0x74,}, -{0xae, 0x04,}, -{0xaf, 0x17,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, - -{0x42, 0x00,}, -{0x43, 0x46,}, -{0x46, 0x00,}, -{0x47, 0x74,}, -{0x4a, 0x00,}, -{0x4b, 0x44,}, -{0x4e, 0x00,}, -{0x4f, 0x44,}, - -{0x52, 0x00,}, -{0x53, 0x20,}, -{0x56, 0x00,}, -{0x57, 0x20,}, -{0x5A, 0x00,}, -{0x5b, 0x20,}, -{0x6A, 0x00,}, -{0x6B, 0x6f,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x40,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x3b,}, -{0x7A, 0x06,}, -{0x7B, 0x45,}, -{0x7C, 0x06,}, -{0x7D, 0x3b,}, -{0x7E, 0x06,}, -{0x7F, 0x45,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x3b,}, -{0x86, 0x06,}, -{0x87, 0x45,}, -{0x88, 0x06,}, -{0x89, 0x3b,}, -{0x8A, 0x06,}, -{0x8B, 0x45,}, -{0x92, 0x06,}, // sx -{0x93, 0x31,}, -{0x96, 0x06,}, -{0x97, 0x31,}, -{0x98, 0x06,}, // sxb -{0x99, 0x31,}, -{0x9c, 0x06,}, -{0x9d, 0x31,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x38,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ÀÌÈÄ¿¡ MCU¸¦ reset ½ÃÅ´. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x06,}, //gap y enb, gap x enb for 720p - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -{0x30, 0x8a,}, //gap x for 720p -{0x31, 0x68,}, //gap y for 720p -{0x36, 0x6c,}, //lsc_win_x for 720p -{0x37, 0x64,}, //lsc_win_y for 720p - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x00,}, //Y OFS Disable -{0x17, 0x00,}, //20121127 CSP option -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x04,}, //16_235 range scale down on -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,}, //D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0xff,}, //pga_dark1_hi -{0xf3, 0xfc,}, //pga_dark_lo -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0xff,}, //C-mask near STD TH -{0x88, 0xff,}, //C-mask middle STD TH -{0x89, 0xff,}, //C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,}, //Yc2d_ee_color_gain1 -{0x78, 0x20,}, //Yc2d_ee_color_gain2 -{0x79, 0x20,}, //Yc2d_ee_color_gain3 -{0x7a, 0x1c,}, //Yc2d_ee_color_gain4 -{0x7b, 0x1b,}, //Yc2d_ee_color_gain5 -{0x7c, 0x1a,}, //Yc2d_ee_color_gain6 -{0x7d, 0x19,}, //Yc2d_ee_color_gain7 -{0x7e, 0x18,}, //Yc2d_ee_color_gain8 - -{0xc0, 0x00,}, //Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,}, //Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,}, //Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,}, //Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,}, //Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xD0, 0x01,}, //Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8D, 0x20,}, //RGB-Color_Gain1 -{0x8E, 0x20,}, //RGB-Color_Gain2 -{0x8F, 0x20,}, //RGB-Color_Gain3 -{0x90, 0x20,}, //RGB-Color_Gain4 -{0x91, 0x20,}, //RGB-Color_Gain5 - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0xe0,}, //Dgain off 20 //Dgain enb_2x e0 - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x07,}, -{0x38, 0x3a,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x71, 0x70,}, //DG MAX //D gain 1x = 80 = x 1 // D gain 2x = 40 = x 1 -{0x72, 0x40,}, //DG MIN - -{0x80, 0x3a,}, //Y Target - -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x75,}, //Flicker Line 100 -{0x15, 0x61,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x15, 0x02,}, //720p mode on -{0x16, 0x50,}, //SSD B gain int gain 1.5x -{0x73, 0x0C,}, //start x in 720p -{0x74, 0x08,}, //start y in 720p -{0x75, 0x64,}, //width in 720p -{0x76, 0x4A,}, //height in 720p - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -//43.3366Mhz = 0x02954398 -{0x03, 0xC0,}, -{0x14, 0x02,}, -{0x15, 0x95,}, -{0x16, 0x43,}, -{0x17, 0x98,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x11,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, - -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,}, //Low In Th -{0x56, 0x52,}, //Low Out Th -{0x57, 0x60,}, //High Out Th -{0x58, 0x70,}, //High In Th - -{0x62, 0xd8,}, //Out weight //ca->d8 -{0x63, 0xa6,}, //Indoor weight -{0x64, 0x88,}, //Dark weight -{0x65, 0xe8,}, //Low weight -{0x66, 0xa6,}, //High weight - -{0x31, 0x01,}, //Color ratio reset -{0x30, 0x98,}, //Color ratio on - -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x32,}, // DYOFS_Ratio -{0x1c, 0x00,}, // DYOFS_Limit //10 - -{0x1d, 0x00,}, //EV Th OutEnd : 120fps AG 1x DG 1x -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,}, //EV Th OutStr : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x03,}, -{0x27, 0x70,}, -{0x28, 0xf0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x05,}, -{0x2b, 0x57,}, -{0x2c, 0x30,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x06,}, -{0x2f, 0x1a,}, -{0x30, 0x80,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x08,}, -{0x33, 0x86,}, -{0x34, 0xb6,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,},// LSC_EvTh_OutEnd_4 -{0x3a, 0x00,},// LSC_EvTh_OutEnd_3 -{0x3b, 0x13,},// LSC_EvTh_OutEnd_2 -{0x3c, 0x88,},// LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,},// LSC_EvTh_OutStr_4 -{0x3e, 0x00,},// LSC_EvTh_OutStr_3 -{0x3f, 0x30,},// LSC_EvTh_OutStr_2 -{0x40, 0xd4,},// LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,},// LSC_EvTh_Dark1Str_4 -{0x42, 0x05,},// LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,},// LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,},// LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,},// LSC_EvTh_Dark1End_4 -{0x46, 0x0b,},// LSC_EvTh_Dark1End_3 -{0x47, 0x71,},// LSC_EvTh_Dark1End_2 -{0x48, 0xb0,},// LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,},// LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,},// LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,},// LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,},// LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,},// LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,},// LSC_EvTh_Dark2End_3 -{0x4f, 0x84,},// LSC_EvTh_Dark2End_2 -{0x50, 0x80,},// LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},//LSC Ctmp LTEnd Out -{0x52, 0x64,}, //LSC Ctmp LTStr Out -{0x53, 0x78,},//LSC Ctmp HTStr Out -{0x54, 0x86,},//LSC Ctmp HTEnd Out - -{0x55, 0x46,}, //LSC Ctmp LTEnd In -{0x56, 0x56,}, //LSC Ctmp LTStr In -{0x57, 0x6e,}, //LSC Ctmp HTStr In -{0x58, 0x76,}, //LSC Ctmp HTEnd In - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,}, // UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,}, // UniScn_BPstdMinTh -{0x6c, 0x34,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x36,}, // Y_target_Outdoor -{0x7e, 0x3c,}, // Y_target_Indoor -{0x7f, 0x3c,}, // Y_target_Dark1 -{0x80, 0x3c,}, // Y_target_Dark2 -{0x81, 0x3c,}, // Y_target_LowTemp -{0x82, 0x3c,}, // Y_target_HighTemp - -{0x83, 0x80,}, // Cb_Outdoor -{0x84, 0x95,}, // Cb _Sat_Indoor -{0x85, 0xa0,}, // Cb _Sat_Dark1 -{0x86, 0x84,}, // Cb _Sat_Dark2 -{0x87, 0x88,}, // Cb _Sat_LowTemp -{0x88, 0x92,}, // Cb _Sat_HighTemp - -{0x89, 0x80,}, // Cr _Sat_Outdoor -{0x8a, 0x90,}, // Cr _Sat_Indoor -{0x8b, 0xa0,}, // Cr _Sat_Dark1 -{0x8c, 0x80,}, // Cr _Sat_Dark2 -{0x8d, 0x75,}, // Cr _Sat_LowTemp -{0x8e, 0x92,}, // Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x84,}, // BLC_ofs_r_Dark1 -{0x98, 0x84,}, // BLC_ofs_b_Dark1 -{0x99, 0x85,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x85,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x84,}, // BLC_ofs_r_Dark2 -{0x9c, 0x84,}, // BLC_ofs_b_Dark2 -{0x9d, 0x85,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x85,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x55,}, //CMC_Out_00 -{0xdd, 0x1c,}, //CMC_Out_01 -{0xde, 0x07,}, //CMC_Out_02 -{0xdf, 0x0a,}, //CMC_Out_03 -{0xe0, 0x51,}, //CMC_Out_04 -{0xe1, 0x07,}, //CMC_Out_05 -{0xe2, 0x01,}, //CMC_Out_06 -{0xe3, 0x14,}, //CMC_Out_07 -{0xe4, 0x55,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,}, //CMCSIGN_In_Mid -{0x17, 0x53,}, //CMC_In_Mid_00 -{0x18, 0x16,}, //CMC_In_Mid_01 -{0x19, 0x03,}, //CMC_In_Mid_02 -{0x1a, 0x10,}, //CMC_In_Mid_03 -{0x1b, 0x53,}, //CMC_In_Mid_04 -{0x1c, 0x03,}, //CMC_In_Mid_05 -{0x1d, 0x04,}, //CMC_In_Mid_06 -{0x1e, 0x1d,}, //CMC_In_Mid_07 -{0x1f, 0x61,}, //CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,}, //CMCSIGN_Dark1 -{0x40, 0x53,}, //CMC_Dark1_00 -{0x41, 0x1c,}, //CMC_Dark1_01 -{0x42, 0x09,}, //CMC_Dark1_02 -{0x43, 0x0e,}, //CMC_Dark1_03 -{0x44, 0x53,}, //CMC_Dark1_04 -{0x45, 0x05,}, //CMC_Dark1_05 -{0x46, 0x03,}, //CMC_Dark1_06 -{0x47, 0x23,}, //CMC_Dark1_07 -{0x48, 0x66,}, //CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,}, //CMCSIGN_Dark2 -{0x69, 0x53,}, //CMC_Dark2_00 -{0x6a, 0x1c,}, //CMC_Dark2_01 -{0x6b, 0x09,}, //CMC_Dark2_02 -{0x6c, 0x0e,}, //CMC_Dark2_03 -{0x6d, 0x53,}, //CMC_Dark2_04 -{0x6e, 0x05,}, //CMC_Dark2_05 -{0x6f, 0x03,}, //CMC_Dark2_06 -{0x70, 0x23,}, //CMC_Dark2_07 -{0x71, 0x66,}, //CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x08,}, // CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x12,}, // CMC_Dark2_LumGain2_R -{0x7b, 0x18,}, // CMC_Dark2_LumGain3_R -{0x7c, 0x1c,}, // CMC_Dark2_LumGain4_R -{0x7d, 0x1e,}, // CMC_Dark2_LumGain5_R -{0x7e, 0x20,}, // CMC_Dark2_LumGain6_R -{0x7f, 0x20,}, // CMC_Dark2_LumGain7_R -{0x80, 0x20,}, // CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x08,}, // CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x12,}, // CMC_Dark2_LumGain2_G -{0x83, 0x18,}, // CMC_Dark2_LumGain3_G -{0x84, 0x1c,}, // CMC_Dark2_LumGain4_G -{0x85, 0x1e,}, // CMC_Dark2_LumGain5_G -{0x86, 0x20,}, // CMC_Dark2_LumGain6_G -{0x87, 0x20,}, // CMC_Dark2_LumGain7_G -{0x88, 0x20,}, // CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x08,}, // CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x12,}, // CMC_Dark2_LumGain2_B -{0x8b, 0x18,}, // CMC_Dark2_LumGain3_B -{0x8c, 0x1c,}, // CMC_Dark2_LumGain4_B -{0x8d, 0x1e,}, // CMC_Dark2_LumGain5_B -{0x8e, 0x20,}, // CMC_Dark2_LumGain6_B -{0x8f, 0x20,}, // CMC_Dark2_LumGain7_B -{0x90, 0x20,}, // CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, //GMA_OUT -{0xe4, 0x00,}, -{0xe5, 0x03,}, -{0xe6, 0x0b,}, -{0xe7, 0x15,}, -{0xe8, 0x21,}, -{0xe9, 0x2f,}, -{0xea, 0x3c,}, -{0xeb, 0x49,}, -{0xec, 0x54,}, -{0xed, 0x5e,}, -{0xee, 0x68,}, -{0xef, 0x72,}, -{0xf0, 0x79,}, -{0xf1, 0x7f,}, -{0xf2, 0x84,}, -{0xf3, 0x8a,}, -{0xf4, 0x8e,}, -{0xf5, 0x94,}, -{0xf6, 0x98,}, -{0xf7, 0x9d,}, -{0xf8, 0xa7,}, -{0xf9, 0xb2,}, -{0xfa, 0xbb,}, -{0xfb, 0xcb,}, -{0xfc, 0xda,}, -{0xfd, 0xe9,}, -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, //Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xf7,}, -{0x11, 0xff,}, -{0x12, 0xff,}, -{0x13, 0xff,}, -{0x14, 0xff,}, -{0x15, 0xff,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x05,}, -{0x19, 0x09,}, -{0x1a, 0x11,}, -{0x1b, 0x19,}, -{0x1c, 0x26,}, -{0x1d, 0x33,}, -{0x1e, 0x3f,}, -{0x1f, 0x4a,}, -{0x20, 0x55,}, -{0x21, 0x5e,}, -{0x22, 0x67,}, -{0x23, 0x6f,}, -{0x24, 0x77,}, -{0x25, 0x7e,}, -{0x26, 0x84,}, -{0x27, 0x8b,}, -{0x28, 0x91,}, -{0x29, 0x96,}, -{0x2a, 0x9b,}, -{0x2b, 0xa0,}, -{0x2c, 0xa8,}, -{0x2d, 0xb2,}, -{0x2e, 0xbc,}, -{0x2f, 0xcd,}, -{0x30, 0xdd,}, -{0x31, 0xec,}, -{0x32, 0xf9,}, -{0x33, 0xff,}, -{0x34, 0xff,}, -{0x35, 0xff,}, -{0x36, 0xff,}, -{0x37, 0xff,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, //GMA_D1 -{0x3a, 0x04,}, -{0x3b, 0x08,}, -{0x3c, 0x0f,}, -{0x3d, 0x1b,}, -{0x3e, 0x2e,}, -{0x3f, 0x3e,}, -{0x40, 0x4e,}, -{0x41, 0x5b,}, -{0x42, 0x65,}, -{0x43, 0x71,}, -{0x44, 0x7b,}, -{0x45, 0x85,}, -{0x46, 0x8d,}, -{0x47, 0x95,}, -{0x48, 0x9b,}, -{0x49, 0xa3,}, -{0x4a, 0xa9,}, -{0x4b, 0xb0,}, -{0x4c, 0xb6,}, -{0x4d, 0xbb,}, -{0x4e, 0xc5,}, -{0x4f, 0xcf,}, -{0x50, 0xd7,}, -{0x51, 0xe7,}, -{0x52, 0xf3,}, -{0x53, 0xfa,}, -{0x54, 0xff,}, -{0x55, 0xff,}, -{0x56, 0xff,}, -{0x57, 0xff,}, -{0x58, 0xff,}, -{0x59, 0xff,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x04,}, -{0x5d, 0x08,}, -{0x5e, 0x0f,}, -{0x5f, 0x1b,}, -{0x60, 0x2e,}, -{0x61, 0x3e,}, -{0x62, 0x4e,}, -{0x63, 0x5b,}, -{0x64, 0x65,}, -{0x65, 0x71,}, -{0x66, 0x7b,}, -{0x67, 0x85,}, -{0x68, 0x8d,}, -{0x69, 0x95,}, -{0x6a, 0x9b,}, -{0x6b, 0xa3,}, -{0x6c, 0xa9,}, -{0x6d, 0xb0,}, -{0x6e, 0xb6,}, -{0x6f, 0xbb,}, -{0x70, 0xc5,}, -{0x71, 0xcf,}, -{0x72, 0xd7,}, -{0x73, 0xe7,}, -{0x74, 0xf3,}, -{0x75, 0xfa,}, -{0x76, 0xff,}, -{0x77, 0xff,}, -{0x78, 0xff,}, -{0x79, 0xff,}, -{0x7a, 0xff,}, -{0x7b, 0xff,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x17,}, //Outdoor_delta3 -{0x82, 0xbd,}, //Outdoor_center3 -{0x83, 0x17,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 - -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x89,}, //Outdoor_hue_angle2 -{0x91, 0x10,}, //Outdoor_hue_angle3 -{0x92, 0x14,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,}, // MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 red -{0xb7, 0x3f,}, // MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,}, // MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,}, // MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,}, // MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,}, // MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,}, // MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,}, // MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,}, // MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 yellow -{0xbf, 0x3f,}, // MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,}, // MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,}, // MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 Green -{0xc7, 0x3f,}, // MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,}, // MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,}, // MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,}, // MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,}, // MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,}, // MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,}, // MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x14,}, //Outdoor_allgain_y1 -{0xe7, 0x14,}, //Outdoor_allgain_y2 -{0xe8, 0x13,}, //Outdoor_allgain_y3 -{0xe9, 0x12,}, //Outdoor_allgain_y4 -{0xea, 0x12,}, //Outdoor_allgain_y5 -{0xeb, 0x14,}, //Outdoor_allgain_y6 -{0xec, 0x16,}, //Outdoor_allgain_y7 -{0xed, 0x18,}, //Outdoor_allgain_y8 -{0xee, 0x1a,}, //Outdoor_allgain_y9 -{0xef, 0x17,}, //Outdoor_allgain_y10 -{0xf0, 0x14,}, //Outdoor_allgain_y11 -{0xf1, 0x13,}, //Outdoor_allgain_y12 - -// Indoor MCMC -{0xf2, 0x10,}, //Indoor_delta1 -{0xf3, 0x1e,}, //Indoor_center1 -{0xf4, 0x0b,}, //Indoor_delta2 -{0xf5, 0x6f,}, //Indoor_center2 -{0xf6, 0x10,}, //Indoor_delta3 -{0xf7, 0x9c,}, // Indoor_center3 -{0xf8, 0x07,}, // Indoor_delta4 -{0xf9, 0xb8,}, // Indoor_center4 -{0xfa, 0x90,}, //Indoor_delta5 -{0xfb, 0x2d,}, //Indoor_center5 -{0xfc, 0x92,}, //Indoor_delta6 -{0xfd, 0x4f,}, //Indoor_center6 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x8a,}, //Indoor_hue_angle2 -{0x18, 0x00,}, //Indoor_hue_angle3 -{0x19, 0x00,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,}, // MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,}, // MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,}, // MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,}, // MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,}, // MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,}, // MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,}, // MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x10,}, // MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x10,}, // MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,}, // MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,}, // MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,}, //Dark1_allgain_y1 -{0xe3, 0x10,}, //Dark1_allgain_y2 -{0xe4, 0x10,}, //Dark1_allgain_y3 -{0xe5, 0x11,}, //Dark1_allgain_y4 -{0xe6, 0x10,}, //Dark1_allgain_y5 -{0xe7, 0x13,}, //Dark1_allgain_y6 -{0xe8, 0x12,}, //Dark1_allgain_y7 -{0xe9, 0x12,}, //Dark1_allgain_y8 -{0xea, 0x12,}, //Dark1_allgain_y9 -{0xeb, 0x11,}, //Dark1_allgain_y10 -{0xec, 0x10,}, //Dark1_allgain_y11 -{0xed, 0x0f,}, //Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, // MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,}, // MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,}, // MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,}, // MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,}, // MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,}, // MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,}, // MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x86,}, // MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,}, // MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,}, // MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,}, // MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,}, // MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,}, // MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,}, // MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,}, // MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,}, // MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,}, // MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,}, // MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,}, // MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,}, // MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,}, //Hi-Temp_allgain_y0 -{0x66, 0x0d,}, //Hi-Temp_allgain_y1 -{0x67, 0x0e,}, //Hi-Temp_allgain_y2 -{0x68, 0x0e,}, //Hi-Temp_allgain_y3 -{0x69, 0x10,}, //Hi-Temp_allgain_y4 -{0x6a, 0x10,}, //Hi-Temp_allgain_y5 -{0x6b, 0x13,}, //Hi-Temp_allgain_y6 -{0x6c, 0x12,}, //Hi-Temp_allgain_y7 -{0x6d, 0x13,}, //Hi-Temp_allgain_y8 -{0x6e, 0x12,}, //Hi-Temp_allgain_y9 -{0x6f, 0x0e,}, //Hi-Temp_allgain_y10 -{0x70, 0x11,}, //Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // Adaptive LSC on -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off for HD - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x23,}, //Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x2c,}, //Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,}, //Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,}, //Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3e,}, //Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3c,}, //Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3a,}, //Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x1c,}, //Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x2b,}, //Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x2a,}, //Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1a,}, //Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,}, //Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,}, //Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,}, //Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,}, //Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1e,}, //Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1e,}, //Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1f,}, //Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,}, //Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,},//Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,},//Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,},//Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,},//Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,},//Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,},//Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,},//Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,},//Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x30,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x30,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x30,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,},//Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x55,}, //Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x36,}, //Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x35,}, //Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Outdoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x1a,}, //Outdoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Outdoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x36,}, //Outdoor 1277 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Outdoor 1278 -{0x2e, 0x79,}, -{0x2f, 0x09,}, //Outdoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Outdoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Outdoor 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Outdoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Outdoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Outdoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Outdoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Outdoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Outdoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Outdoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Outdoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Outdoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Outdoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Outdoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Outdoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Outdoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Outdoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Outdoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Outdoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Outdoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Outdoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Outdoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x7f,}, //Outdoor 12ae -{0x5c, 0xaf,}, -{0x5d, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Outdoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Outdoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Outdoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Outdoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Outdoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Outdoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Outdoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Outdoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Outdoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Outdoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Outdoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Outdoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Outdoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Outdoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x30,},//Outdoor 12d7 //CI LPF NR offset -{0x7c, 0xd8,}, -{0x7d, 0x33,},//Outdoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x35,},//Outdoor 12d9 -{0x80, 0xda,}, -{0x81, 0x35,},//Outdoor 12da -{0x82, 0xdb,}, -{0x83, 0x34,},//Outdoor 12db -{0x84, 0xdc,}, -{0x85, 0x30,},//Outdoor 12dc -{0x86, 0xdd,}, -{0x87, 0x2a,},//Outdoor 12dd -{0x88, 0xde,}, -{0x89, 0x26,},//Outdoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x49,}, //Outdoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Outdoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Outdoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x20,}, //Outdoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x20,}, //Outdoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x20,}, //Outdoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x20,}, //Outdoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x20,}, //Outdoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x20,}, //Outdoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x20,}, //Outdoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x20,}, //Outdoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Outdoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1e,}, //Outdoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1d,}, //Outdoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x20,}, //Outdoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Outdoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Outdoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Outdoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Outdoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x3f,}, //Outdoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x3f,}, //Outdoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x3f,}, //Outdoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x3f,}, //Outdoor 1333 -{0xba, 0x34,}, -{0xbb, 0x3f,}, //Outdoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x33,}, //Outdoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x2f,}, //Outdoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x2e,}, //Outdoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Outdoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x1e,}, //Outdoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x22,}, //Outdoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Outdoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Outdoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Outdoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Outdoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x36,}, //Outdoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Outdoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x20,}, //Outdoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Outdoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Outdoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Outdoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x20,}, //Outdoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Outdoor 1383 -{0xe0, 0x84,}, -{0xe1, 0x08,}, //Outdoor 1384 -{0xe2, 0xb7,}, -{0xe3, 0xfd,}, //Outdoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xa7,}, //Outdoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Outdoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Outdoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Outdoor 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Outdoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Outdoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Outdoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x0f,}, //Outdoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Outdoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x1c,}, //Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Outdoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Outdoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Outdoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Outdoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1d,}, //Outdoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x26,}, //Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x24,}, //Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x23,}, //Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x1a,}, //Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x14,}, //Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x16,}, //Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x16,}, //Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x22,}, //Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x21,}, //Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x20,}, //Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x1a,}, //Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x19,}, //Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x15,}, //Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x18,}, //Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x1b,}, //Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x24,}, //Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x24,}, //Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x1a,}, //Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x14,}, //Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x10,}, //Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x18,}, //Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x18,}, //Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x1b,}, //Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x19,}, //Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x19,}, //Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x1e,}, //Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x25,}, //Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x25,}, //Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x24,}, //Outdoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x24,}, //Outdoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x28,}, //Outdoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x30,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x31,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x30,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x27,}, //Outdoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x28,}, //Outdoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x2d,}, //Outdoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x2d,},//Outdoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x2e,},//Outdoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x2b,},//Outdoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x28,},//Outdoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x25,},//Outdoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Outdoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Outdoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Outdoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Outdoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Outdoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Outdoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Outdoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Outdoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Outdoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Outdoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Outdoor 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Outdoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Outdoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Outdoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Outdoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x3f,}, //Outdoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x3f,}, //Outdoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x3f,}, //Outdoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x3c,}, //Outdoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x38,}, //Outdoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x35,}, //Outdoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Outdoor 1A20 add -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Outdoor 1A2f add -{0xae, 0x32,}, -{0xaf, 0x87,}, //Outdoor 1A32 add -{0xb0, 0x34,}, -{0xb1, 0xd2,}, //Outdoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1c,}, //Outdoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x06,},//Outdoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Outdoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Outdoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Outdoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Outdoor 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Outdoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Outdoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Outdoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Outdoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Outdoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Outdoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Outdoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Outdoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Outdoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x0e,}, //Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x0e,}, //Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x0e,}, //Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x13,}, //Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x17,}, //Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x17,}, //Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x17,}, //Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x17,}, //Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x14,}, //Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x11,}, //Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x10,}, //Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x12,}, //Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x12,}, //Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x12,}, //Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x12,}, //Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x0f,}, //Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x0f,}, //Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x10,}, //Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x17,}, //Outdoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x19,}, //Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x17,}, //Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x16,}, //Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xD0, 0x27,}, -{0xD1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x16,}, //Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x10,}, //Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x16,}, //Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x15,}, //Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x12,}, //Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x13,}, //Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x13,}, //Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x13,}, //Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x29,}, //Outdoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x29,}, //Outdoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x29,}, //Outdoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x28,}, //Outdoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x28,}, //Outdoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Outdoor 1Aa7 add -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Outdoor 1Aa8 add -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Outdoor 1Aa9 add -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Outdoor 1Aaa add -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Outdoor 1Aab add -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Outdoor 1Aaf add -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Outdoor 1Ab0 add -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Outdoor 1Ab1 add -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Outdoor 1Ab2 add -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Outdoor 1Ab3 add -{0x58, 0xca,}, -{0x59, 0x00,}, //Outdoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Outdoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Outdoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0f,}, //Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x00,}, //Outdoor 1071 -{0x64, 0x72,}, -{0x65, 0x00,}, //Outdoor 1072 -{0x66, 0x73,}, -{0x67, 0x00,}, //Outdoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Outdoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Outdoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,},//Outdoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x40,},//Outdoor 1077 -{0x70, 0x78,}, -{0x71, 0x00,},//Outdoor 1078 -{0x72, 0x79,}, -{0x73, 0x40,},//Outdoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,},//Outdoor 107a -{0x76, 0x7b,}, -{0x77, 0x40,},//Outdoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,},//Outdoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Outdoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Outdoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Outdoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x30,}, //Outdoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Outdoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Outdoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Outdoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Outdoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x02,}, //Outdoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Outdoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x7f,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Indoor 1137 //Pre Flat rate -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Indoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x20,}, //Indoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Indoor 1140 -{0x34, 0x41,}, -{0x35, 0x1e,}, //Indoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x38,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x33,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x31,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x30,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x16,}, //Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x16,}, //Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x15,}, //Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x15,}, //Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x11,}, //Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,}, //Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,}, //Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x11,}, //Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x11,}, //Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x11,}, //Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x15,}, //Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x16,}, //Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,}, //Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,}, //Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,}, //Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x15,}, //Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x15,}, //Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x13,}, //Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x13,}, //Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,}, //Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,}, //Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,}, //Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x16,}, //Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x17,}, //Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x17,}, //Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,}, //Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,}, //Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x25,}, //Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x24,}, //Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,}, //Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x65,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x18,}, //Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Indoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x02,}, //Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x1c,}, //Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x0e,}, //Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,}, //Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Indoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Indoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Indoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,}, // burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x2a,}, //Indoor 11e5 //Bayer Flat R4 StdH -{0x12, 0xe6,}, -{0x13, 0x00,}, //Indoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Indoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Indoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Indoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Indoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Indoor 11eb -{0x1e, 0xef,}, -{0x1f, 0xac,}, //Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Indoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Indoor 1270 // Bayer Sharpness ENB add -{0x26, 0x71,}, -{0x27, 0x1a,}, //Indoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Indoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x26,}, //Indoor 1277 //20130412 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Indoor 1278 -{0x2e, 0x79,}, -{0x2f, 0xff,}, //Indoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Indoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Indoor 127b -{0x34, 0x7c,}, -{0x35, 0x64,}, //Indoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x20,}, //Indoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Indoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Indoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Indoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Indoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Indoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Indoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Indoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Indoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Indoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Indoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Indoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Indoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Indoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Indoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Indoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Indoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Indoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x5f,}, //Indoor 12ae //Bayer Flat off -{0x5c, 0xaf,}, -{0x5d, 0x80,}, //Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Indoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Indoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Indoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Indoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Indoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Indoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Indoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Indoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Indoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Indoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Indoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Indoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Indoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Indoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x38,}, //Indoor 12d7 -{0x7c, 0xd8,}, -{0x7d, 0x30,}, //Indoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2a,}, //Indoor 12d9 -{0x80, 0xda,}, -{0x81, 0x2a,}, //Indoor 12da -{0x82, 0xdb,}, -{0x83, 0x24,}, //Indoor 12db -{0x84, 0xdc,}, -{0x85, 0x20,}, //Indoor 12dc -{0x86, 0xdd,}, -{0x87, 0x1a,}, //Indoor 12dd -{0x88, 0xde,}, -{0x89, 0x16,}, //Indoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Indoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Indoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Indoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Indoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Indoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Indoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Indoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Indoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Indoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Indoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Indoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Indoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Indoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Indoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Indoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Indoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Indoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Indoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Indoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Indoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Indoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Indoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Indoor 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Indoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x20,}, //Indoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Indoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Indoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Indoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x18,}, //Indoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x36,}, //Indoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Indoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Indoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Indoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Indoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x45,}, //Indoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Indoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x65,}, //Indoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Indoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Indoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Indoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x30,}, //Indoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Indoor 1383 //add 20121210 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Indoor 1384 //add 20121210 -{0xe2, 0xb7,}, -{0xe3, 0xfa,}, //Indoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0x77,}, //Indoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Indoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Indoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Indoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Indoor 1410 -{0xf6, 0x11,}, -{0xf7, 0x98,}, //Indoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Indoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Indoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x17,}, //Indoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Indoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Indoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Indoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Indoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Indoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Indoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x20,}, //Indoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x22,}, //Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x21,}, //Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x1c,}, //Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x15,}, //Indoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x11,}, //Indoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x10,}, //Indoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x11,}, //Indoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Indoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x1a,}, //Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x15,}, //Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x14,}, //Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x13,}, //Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x12,}, //Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x12,}, //Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x14,}, //Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x15,}, //Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x22,}, //Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x21,}, //Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x20,}, //Indoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x1d,}, //Indoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x1d,}, //Indoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x1d,}, //Indoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x1d,}, //Indoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x19,}, //Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x16,}, //Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x15,}, //Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x14,}, //Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x13,}, //Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x12,}, //Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x2a,}, //Indoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x2b,}, //Indoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x2c,}, //Indoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2d,}, //Indoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x2d,}, //Indoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x2b,}, //Indoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x2d,}, //Indoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x2e,}, //Indoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x1c,}, //Indoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x20,}, //Indoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x26,}, //Indoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x26,}, //Indoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x22,}, //Indoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x22,}, //Indoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x1c,}, //Indoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x18,}, //Indoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Indoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Indoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Indoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Indoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Indoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Indoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Indoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Indoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Indoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Indoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Indoor 14c9 -{0x94, 0xca,}, -{0x95, 0x27,}, //Indoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Indoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Indoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Indoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x2a,}, //Indoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x27,}, //Indoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x23,}, //Indoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x23,}, //Indoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x23,}, //Indoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x23,}, //Indoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Indoor 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Indoor 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x87,}, //Indoor 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xd0,}, //Indoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x11,}, //Indoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x00,}, //Indoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Indoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Indoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x1d,}, //Indoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Indoor 1A3a //RGB Flat R2_Lum H -{0xbe, 0x3b,}, -{0xbf, 0x00,}, //Indoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x4c,}, //Indoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x00,}, //Indoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x13,}, //Indoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x00,}, //Indoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x2a,}, //Indoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x00,}, //Indoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x17,}, //Indoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2c,}, //Indoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x12,}, //Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x12,}, //Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x11,}, //Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x10,}, //Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x10,}, //Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x10,}, //Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x10,}, //Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x13,}, //Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x13,}, //Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x12,}, //Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x10,}, //Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x10,}, //Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x10,}, //Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x10,}, //Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x12,}, //Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x12,}, //Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x13,}, //Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x14,}, //Indoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x14,}, //Indoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x14,}, //Indoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x15,}, //Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x15,}, //Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x12,}, //Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x12,}, //Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x12,}, //Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x13,}, //Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x14,}, //Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x14,}, //Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x22,}, //Indoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x23,}, //Indoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x24,}, //Indoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x25,}, //Indoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x26,}, //Indoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x27,}, //Indoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x29,}, //Indoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x2b,}, //Indoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Indoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x23,}, //Indoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x26,}, //Indoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x26,}, //Indoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x26,}, //Indoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x26,}, //Indoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x26,}, //Indoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x26,}, //Indoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x34,}, //Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Indoor 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Indoor 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Indoor 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Indoor 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Indoor 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Indoor 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Indoor 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Indoor 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Indoor 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Indoor 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Indoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Indoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Indoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Indoor 1070 Trans Func. 130108 Indoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x01,}, //Indoor 1071 -{0x64, 0x72,}, -{0x65, 0x89,}, //Indoor 1072 -{0x66, 0x73,}, -{0x67, 0xd4,}, //Indoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Indoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Indoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,}, //Indoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x47,}, //Indoor 1077 -{0x70, 0x78,}, -{0x71, 0xae,}, //Indoor 1078 -{0x72, 0x79,}, -{0x73, 0x50,}, //Indoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Indoor 107a -{0x76, 0x7b,}, -{0x77, 0x50,}, //Indoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Indoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x05,}, //Indoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Indoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x2f,}, //Indoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x2a,}, //Indoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Indoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Indoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Indoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Indoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x03,}, //Indoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Indoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark1 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark1 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark1 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark1 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark1 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark1 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark1 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark1 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark1 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark1 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark1 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark1 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark1 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark1 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark1 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark1 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark1 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark1 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark1 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark1 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark1 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark1 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark1 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark1 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark1 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark1 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark1 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark1 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark1 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark1 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark1 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark1 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark1 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark1 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark1 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark1 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark1 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark1 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark1 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark1 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark1 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark1 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark1 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark1 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark1 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark1 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark1 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark1 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark1 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark1 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark1 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark1 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark1 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark1 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark1 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark1 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark1 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark1 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark1 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark1 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark1 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark1 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark1 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark1 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark1 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark1 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark1 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark1 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark1 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark1 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark1 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark1 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark1 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark1 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark1 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark1 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark1 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark1 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark1 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark1 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark1 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark1 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark1 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark1 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark1 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark1 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark1 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark1 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark1 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark1 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark1 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark1 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark1 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark1 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark1 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark1 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark1 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark1 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark1 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark1 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark1 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark1 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark1 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark1 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark1 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark1 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark1 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark1 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark1 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark1 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark1 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark1 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark1 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark1 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark1 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark1 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark1 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark1 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark1 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark1 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark1 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark1 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark1 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark1 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark1 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark1 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x13,}, //Dark1 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x13,}, //Dark1 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x14,}, //Dark1 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x16,}, //Dark1 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x16,}, //Dark1 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x15,}, //Dark1 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x13,}, //Dark1 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark1 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark1 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark1 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark1 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark1 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark1 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark1 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark1 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark1 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark1 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark1 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark1 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark1 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark1 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark1 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark1 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark1 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark1 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark1 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark1 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark1 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark1 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark1 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark1 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark1 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark1 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark1 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark1 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark1 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark1 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark1 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark1 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark1 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark1 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark1 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark1 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark1 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark1 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark1 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark1 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark1 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark1 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark1 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark1 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark1 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark1 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark1 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark1 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark1 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark1 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark1 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark1 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark1 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark1 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark1 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark1 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark1 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark1 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark1 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark1 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark1 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark1 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark1 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark1 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark1 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark1 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark1 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark1 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark1 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark1 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark1 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark1 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark1 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark1 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark1 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark1 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark1 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark1 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark1 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark1 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark1 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark1 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark1 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark1 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark1 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark1 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark1 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark1 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark1 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark1 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark1 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark1 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark1 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark1 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark1 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark1 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark1 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark1 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark1 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark1 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x04,}, //Dark1 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark1 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark2 1137 //Pre Flat rate B[4:1] //04 -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark2 1139 -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark2 1149 -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark2 114a -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark2 114b -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark2 114c -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark2 114d -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark2 114e -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark2 114f -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark2 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark2 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark2 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark2 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark2 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark2 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark2 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark2 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark2 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark2 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark2 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark2 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark2 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark2 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark2 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark2 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark2 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark2 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark2 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark2 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark2 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark2 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark2 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark2 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark2 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark2 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark2 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark2 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark2 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark2 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark2 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark2 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark2 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark2 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark2 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark2 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark2 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark2 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark2 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark2 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark2 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark2 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark2 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark2 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark2 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark2 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark2 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark2 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark2 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark2 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark2 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark2 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark2 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark2 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark2 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark2 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark2 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark2 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark2 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark2 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark2 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark2 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark2 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark2 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark2 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark2 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark2 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark2 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark2 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark2 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark2 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark2 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark2 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark2 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark2 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark2 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark2 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark2 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark2 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark2 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark2 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark2 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark2 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark2 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark2 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark2 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark2 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark2 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark2 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark2 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark2 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark2 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark2 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark2 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark2 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark2 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark2 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark2 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark2 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark2 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark2 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark2 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark2 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark2 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark2 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark2 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark2 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark2 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark2 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark2 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark2 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark2 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark2 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark2 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark2 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark2 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark2 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark2 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark2 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark2 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark2 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark2 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x23,}, //Dark2 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x26,}, //Dark2 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x24,}, //Dark2 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x13,}, //Dark2 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x1a,}, //Dark2 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x12,}, //Dark2 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x12,}, //Dark2 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark2 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark2 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark2 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark2 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark2 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark2 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark2 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark2 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark2 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark2 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark2 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark2 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark2 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark2 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark2 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark2 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark2 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark2 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark2 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark2 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark2 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark2 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark2 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark2 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark2 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark2 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark2 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark2 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark2 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark2 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark2 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark2 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark2 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark2 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark2 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark2 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark2 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark2 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark2 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark2 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark2 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark2 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark2 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark2 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark2 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark2 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark2 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark2 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark2 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark2 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark2 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark2 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark2 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark2 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark2 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark2 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark2 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark2 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark2 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark2 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark2 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark2 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark2 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark2 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark2 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark2 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark2 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark2 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark2 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark2 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark2 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark2 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark2 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark2 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark2 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark2 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark2 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark2 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark2 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark2 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark2 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark2 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark2 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark2 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark2 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark2 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark2 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark2 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark2 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark2 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark2 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark2 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark2 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark2 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark2 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark2 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark2 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark2 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark2 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark2 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x05,}, //Dark2 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark2 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 86MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0d,}, // tlpx_time_l_dn -{0x1e, 0x0c,}, // hs_zero_time -{0x1f, 0x0c,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x0a,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x1c,}, // clk_zero_time -{0x33, 0x0e,}, // clk_post_time -{0x34, 0x05,}, // clk_prepare_time -{0x35, 0x08,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x08,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 - -/////////////////////////////////////////////////////////////////////////////// -// sleep off -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0x03, 0xc0,}, -{0x7F, 0x80,}, // DMA on -{0x7E, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// end of HD set -/////////////////////////////////////////////////////////////////////////////// -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_HD_01[] = { - -/////////////////////////////////////////////////////////////////////////////// -// HD Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x25,}, //mode_pll1 26mhz / (5+1) = 4.33mhz -{0x08, 0x50,}, //mode_pll2 isp clk = 86.6Mhz; -{0x09, 0x81,}, //mode_pll3 // MIPI 4x div 1/1 // isp clk div = 1/4 -{0x07, 0xA5,}, -{0x07, 0xA5,}, -{0x07, 0xA5,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, //mode_pll4 for mipi mode -{0x0A, 0xe0,}, //mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, //SSD sram clock inv on -{0x33, 0x45,}, //bit[6]:C-NR DC °ü·Ã ¼³Á¤ - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 86mhz -{0x40, 0x2f,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x2f,}, // otp cfg 3 -{0x43, 0x2f,}, // otp cfg 4 -{0x44, 0x2f,}, // otp cfg 5 -{0x45, 0x22,}, // otp cfg 6 -{0x46, 0x5a,}, // otp cfg 7 -{0x47, 0x09,}, // otp cfg 8 -{0x48, 0x02,}, // otp cfg 9 -{0x49, 0xb8,}, // otp cfg 10 -{0x4A, 0x2f,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x00,}, // Full size -{0x11, 0x80,}, // Fixed mode off -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1D, 0x0D,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x08,}, // preview col start set -{0x24, 0x02,}, -{0x25, 0xd0,}, // height 720 -{0x26, 0x05,}, -{0x27, 0x00,}, // width 1280 - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x07,}, // one_line = 1850 -{0x4d, 0x3a,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, // Vsync H -{0x53, 0x14,}, // Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x01,}, // pixel_row_start for 720p crop mode -{0x81, 0x9e,}, // pwin_row_start = 414 -{0x82, 0x02,}, // pwin_row_height = 738 -{0x83, 0xe2,}, -{0x84, 0x01,}, // pwin_col_start = 384 -{0x85, 0x80,}, -{0x86, 0x05,}, // pwin_col_width = 1312 -{0x87, 0x20,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ´©Àû for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, //20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, - -{0xa0, 0x01,}, -{0xa1, 0x7c,}, -{0xa2, 0x03,}, -{0xa3, 0x4d,}, -{0xa4, 0x03,}, -{0xa5, 0xb0,}, -{0xa6, 0x06,}, -{0xa7, 0xf2,}, -{0xa8, 0x01,}, -{0xa9, 0x4f,}, -{0xaa, 0x02,}, -{0xab, 0x23,}, -{0xac, 0x02,}, -{0xad, 0x74,}, -{0xae, 0x04,}, -{0xaf, 0x17,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, - -{0x42, 0x00,}, -{0x43, 0x46,}, -{0x46, 0x00,}, -{0x47, 0x74,}, -{0x4a, 0x00,}, -{0x4b, 0x44,}, -{0x4e, 0x00,}, -{0x4f, 0x44,}, - -{0x52, 0x00,}, -{0x53, 0x20,}, -{0x56, 0x00,}, -{0x57, 0x20,}, -{0x5A, 0x00,}, -{0x5b, 0x20,}, -{0x6A, 0x00,}, -{0x6B, 0x6f,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x40,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x3b,}, -{0x7A, 0x06,}, -{0x7B, 0x45,}, -{0x7C, 0x06,}, -{0x7D, 0x3b,}, -{0x7E, 0x06,}, -{0x7F, 0x45,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x3b,}, -{0x86, 0x06,}, -{0x87, 0x45,}, -{0x88, 0x06,}, -{0x89, 0x3b,}, -{0x8A, 0x06,}, -{0x8B, 0x45,}, -{0x92, 0x06,}, // sx -{0x93, 0x31,}, -{0x96, 0x06,}, -{0x97, 0x31,}, -{0x98, 0x06,}, // sxb -{0x99, 0x31,}, -{0x9c, 0x06,}, -{0x9d, 0x31,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x38,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ÀÌÈÄ¿¡ MCU¸¦ reset ½ÃÅ´. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x11,}, //HD 0415 -{0x12, 0x00,}, //HD 0415 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x06,}, //gap y enb, gap x enb for 720p - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -{0x30, 0x8a,}, //gap x for 720p -{0x31, 0x68,}, //gap y for 720p -{0x36, 0x6c,}, //lsc_win_x for 720p -{0x37, 0x64,}, //lsc_win_y for 720p - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x00,}, //Y OFS Disable -{0x17, 0x00,}, //20121127 CSP option -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x04,}, //16_235 range scale down on -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,}, //D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0xff,}, //pga_dark1_hi -{0xf3, 0xfc,}, //pga_dark_lo -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0xff,}, //C-mask near STD TH -{0x88, 0xff,}, //C-mask middle STD TH -{0x89, 0xff,}, //C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,}, //Yc2d_ee_color_gain1 -{0x78, 0x20,}, //Yc2d_ee_color_gain2 -{0x79, 0x20,}, //Yc2d_ee_color_gain3 -{0x7a, 0x1c,}, //Yc2d_ee_color_gain4 -{0x7b, 0x1b,}, //Yc2d_ee_color_gain5 -{0x7c, 0x1a,}, //Yc2d_ee_color_gain6 -{0x7d, 0x19,}, //Yc2d_ee_color_gain7 -{0x7e, 0x18,}, //Yc2d_ee_color_gain8 - -{0xc0, 0x00,}, //Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,}, //Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,}, //Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,}, //Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,}, //Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xD0, 0x01,}, //Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8D, 0x20,}, //RGB-Color_Gain1 -{0x8E, 0x20,}, //RGB-Color_Gain2 -{0x8F, 0x20,}, //RGB-Color_Gain3 -{0x90, 0x20,}, //RGB-Color_Gain4 -{0x91, 0x20,}, //RGB-Color_Gain5 - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0xe0,}, //Dgain off 20 //Dgain enb_2x e0 - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x07,}, -{0x38, 0x3a,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x71, 0x70,}, //DG MAX //D gain 1x = 80 = x 1 // D gain 2x = 40 = x 1 -{0x72, 0x40,}, //DG MIN - -{0x80, 0x3a,}, //Y Target - -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x75,}, //Flicker Line 100 -{0x15, 0x61,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x15, 0x02,}, //720p mode on -{0x16, 0x50,}, //SSD B gain int gain 1.5x -{0x73, 0x0C,}, //start x in 720p -{0x74, 0x08,}, //start y in 720p -{0x75, 0x64,}, //width in 720p -{0x76, 0x4A,}, //height in 720p - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -//43.3366Mhz = 0x02954398 -{0x03, 0xC0,}, -{0x14, 0x02,}, -{0x15, 0x95,}, -{0x16, 0x43,}, -{0x17, 0x98,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x11,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, - -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,}, //Low In Th -{0x56, 0x52,}, //Low Out Th -{0x57, 0x60,}, //High Out Th -{0x58, 0x70,}, //High In Th - -{0x62, 0xd8,}, //Out weight //ca->d8 -{0x63, 0xa6,}, //Indoor weight -{0x64, 0x88,}, //Dark weight -{0x65, 0xe8,}, //Low weight -{0x66, 0xa6,}, //High weight - -{0x31, 0x01,}, //Color ratio reset -{0x30, 0x98,}, //Color ratio on - -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x32,}, // DYOFS_Ratio -{0x1c, 0x00,}, // DYOFS_Limit //10 - -{0x1d, 0x00,}, //EV Th OutEnd : 120fps AG 1x DG 1x -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,}, //EV Th OutStr : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x03,}, -{0x27, 0x70,}, -{0x28, 0xf0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x05,}, -{0x2b, 0x57,}, -{0x2c, 0x30,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x06,}, -{0x2f, 0x1a,}, -{0x30, 0x80,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x08,}, -{0x33, 0x86,}, -{0x34, 0xb6,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,},// LSC_EvTh_OutEnd_4 -{0x3a, 0x00,},// LSC_EvTh_OutEnd_3 -{0x3b, 0x13,},// LSC_EvTh_OutEnd_2 -{0x3c, 0x88,},// LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,},// LSC_EvTh_OutStr_4 -{0x3e, 0x00,},// LSC_EvTh_OutStr_3 -{0x3f, 0x30,},// LSC_EvTh_OutStr_2 -{0x40, 0xd4,},// LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,},// LSC_EvTh_Dark1Str_4 -{0x42, 0x05,},// LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,},// LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,},// LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,},// LSC_EvTh_Dark1End_4 -{0x46, 0x0b,},// LSC_EvTh_Dark1End_3 -{0x47, 0x71,},// LSC_EvTh_Dark1End_2 -{0x48, 0xb0,},// LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,},// LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,},// LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,},// LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,},// LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,},// LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,},// LSC_EvTh_Dark2End_3 -{0x4f, 0x84,},// LSC_EvTh_Dark2End_2 -{0x50, 0x80,},// LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},//LSC Ctmp LTEnd Out -{0x52, 0x64,}, //LSC Ctmp LTStr Out -{0x53, 0x78,},//LSC Ctmp HTStr Out -{0x54, 0x86,},//LSC Ctmp HTEnd Out - -{0x55, 0x46,}, //LSC Ctmp LTEnd In -{0x56, 0x56,}, //LSC Ctmp LTStr In -{0x57, 0x6e,}, //LSC Ctmp HTStr In -{0x58, 0x76,}, //LSC Ctmp HTEnd In - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,}, // UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,}, // UniScn_BPstdMinTh -{0x6c, 0x34,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x36,}, // Y_target_Outdoor -{0x7e, 0x3c,}, // Y_target_Indoor -{0x7f, 0x3c,}, // Y_target_Dark1 -{0x80, 0x3c,}, // Y_target_Dark2 -{0x81, 0x3c,}, // Y_target_LowTemp -{0x82, 0x3c,}, // Y_target_HighTemp - -{0x83, 0x80,}, // Cb_Outdoor -{0x84, 0x95,}, // Cb _Sat_Indoor -{0x85, 0xa0,}, // Cb _Sat_Dark1 -{0x86, 0x84,}, // Cb _Sat_Dark2 -{0x87, 0x88,}, // Cb _Sat_LowTemp -{0x88, 0x92,}, // Cb _Sat_HighTemp - -{0x89, 0x80,}, // Cr _Sat_Outdoor -{0x8a, 0x90,}, // Cr _Sat_Indoor -{0x8b, 0xa0,}, // Cr _Sat_Dark1 -{0x8c, 0x80,}, // Cr _Sat_Dark2 -{0x8d, 0x75,}, // Cr _Sat_LowTemp -{0x8e, 0x92,}, // Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x84,}, // BLC_ofs_r_Dark1 -{0x98, 0x84,}, // BLC_ofs_b_Dark1 -{0x99, 0x85,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x85,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x84,}, // BLC_ofs_r_Dark2 -{0x9c, 0x84,}, // BLC_ofs_b_Dark2 -{0x9d, 0x85,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x85,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x55,}, //CMC_Out_00 -{0xdd, 0x1c,}, //CMC_Out_01 -{0xde, 0x07,}, //CMC_Out_02 -{0xdf, 0x0a,}, //CMC_Out_03 -{0xe0, 0x51,}, //CMC_Out_04 -{0xe1, 0x07,}, //CMC_Out_05 -{0xe2, 0x01,}, //CMC_Out_06 -{0xe3, 0x14,}, //CMC_Out_07 -{0xe4, 0x55,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,}, //CMCSIGN_In_Mid -{0x17, 0x53,}, //CMC_In_Mid_00 -{0x18, 0x16,}, //CMC_In_Mid_01 -{0x19, 0x03,}, //CMC_In_Mid_02 -{0x1a, 0x10,}, //CMC_In_Mid_03 -{0x1b, 0x53,}, //CMC_In_Mid_04 -{0x1c, 0x03,}, //CMC_In_Mid_05 -{0x1d, 0x04,}, //CMC_In_Mid_06 -{0x1e, 0x1d,}, //CMC_In_Mid_07 -{0x1f, 0x61,}, //CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,}, //CMCSIGN_Dark1 -{0x40, 0x53,}, //CMC_Dark1_00 -{0x41, 0x1c,}, //CMC_Dark1_01 -{0x42, 0x09,}, //CMC_Dark1_02 -{0x43, 0x0e,}, //CMC_Dark1_03 -{0x44, 0x53,}, //CMC_Dark1_04 -{0x45, 0x05,}, //CMC_Dark1_05 -{0x46, 0x03,}, //CMC_Dark1_06 -{0x47, 0x23,}, //CMC_Dark1_07 -{0x48, 0x66,}, //CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,}, //CMCSIGN_Dark2 -{0x69, 0x53,}, //CMC_Dark2_00 -{0x6a, 0x1c,}, //CMC_Dark2_01 -{0x6b, 0x09,}, //CMC_Dark2_02 -{0x6c, 0x0e,}, //CMC_Dark2_03 -{0x6d, 0x53,}, //CMC_Dark2_04 -{0x6e, 0x05,}, //CMC_Dark2_05 -{0x6f, 0x03,}, //CMC_Dark2_06 -{0x70, 0x23,}, //CMC_Dark2_07 -{0x71, 0x66,}, //CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x08,}, // CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x12,}, // CMC_Dark2_LumGain2_R -{0x7b, 0x18,}, // CMC_Dark2_LumGain3_R -{0x7c, 0x1c,}, // CMC_Dark2_LumGain4_R -{0x7d, 0x1e,}, // CMC_Dark2_LumGain5_R -{0x7e, 0x20,}, // CMC_Dark2_LumGain6_R -{0x7f, 0x20,}, // CMC_Dark2_LumGain7_R -{0x80, 0x20,}, // CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x08,}, // CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x12,}, // CMC_Dark2_LumGain2_G -{0x83, 0x18,}, // CMC_Dark2_LumGain3_G -{0x84, 0x1c,}, // CMC_Dark2_LumGain4_G -{0x85, 0x1e,}, // CMC_Dark2_LumGain5_G -{0x86, 0x20,}, // CMC_Dark2_LumGain6_G -{0x87, 0x20,}, // CMC_Dark2_LumGain7_G -{0x88, 0x20,}, // CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x08,}, // CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x12,}, // CMC_Dark2_LumGain2_B -{0x8b, 0x18,}, // CMC_Dark2_LumGain3_B -{0x8c, 0x1c,}, // CMC_Dark2_LumGain4_B -{0x8d, 0x1e,}, // CMC_Dark2_LumGain5_B -{0x8e, 0x20,}, // CMC_Dark2_LumGain6_B -{0x8f, 0x20,}, // CMC_Dark2_LumGain7_B -{0x90, 0x20,}, // CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, //GMA_OUT -{0xe4, 0x00,}, -{0xe5, 0x03,}, -{0xe6, 0x0b,}, -{0xe7, 0x15,}, -{0xe8, 0x21,}, -{0xe9, 0x2f,}, -{0xea, 0x3c,}, -{0xeb, 0x49,}, -{0xec, 0x54,}, -{0xed, 0x5e,}, -{0xee, 0x68,}, -{0xef, 0x72,}, -{0xf0, 0x79,}, -{0xf1, 0x7f,}, -{0xf2, 0x84,}, -{0xf3, 0x8a,}, -{0xf4, 0x8e,}, -{0xf5, 0x94,}, -{0xf6, 0x98,}, -{0xf7, 0x9d,}, -{0xf8, 0xa7,}, -{0xf9, 0xb2,}, -{0xfa, 0xbb,}, -{0xfb, 0xcb,}, -{0xfc, 0xda,}, -{0xfd, 0xe9,}, -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, //Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xf7,}, -{0x11, 0xff,}, -{0x12, 0xff,}, -{0x13, 0xff,}, -{0x14, 0xff,}, -{0x15, 0xff,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x05,}, -{0x19, 0x09,}, -{0x1a, 0x11,}, -{0x1b, 0x19,}, -{0x1c, 0x26,}, -{0x1d, 0x33,}, -{0x1e, 0x3f,}, -{0x1f, 0x4a,}, -{0x20, 0x55,}, -{0x21, 0x5e,}, -{0x22, 0x67,}, -{0x23, 0x6f,}, -{0x24, 0x77,}, -{0x25, 0x7e,}, -{0x26, 0x84,}, -{0x27, 0x8b,}, -{0x28, 0x91,}, -{0x29, 0x96,}, -{0x2a, 0x9b,}, -{0x2b, 0xa0,}, -{0x2c, 0xa8,}, -{0x2d, 0xb2,}, -{0x2e, 0xbc,}, -{0x2f, 0xcd,}, -{0x30, 0xdd,}, -{0x31, 0xec,}, -{0x32, 0xf9,}, -{0x33, 0xff,}, -{0x34, 0xff,}, -{0x35, 0xff,}, -{0x36, 0xff,}, -{0x37, 0xff,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, //GMA_D1 -{0x3a, 0x04,}, -{0x3b, 0x08,}, -{0x3c, 0x0f,}, -{0x3d, 0x1b,}, -{0x3e, 0x2e,}, -{0x3f, 0x3e,}, -{0x40, 0x4e,}, -{0x41, 0x5b,}, -{0x42, 0x65,}, -{0x43, 0x71,}, -{0x44, 0x7b,}, -{0x45, 0x85,}, -{0x46, 0x8d,}, -{0x47, 0x95,}, -{0x48, 0x9b,}, -{0x49, 0xa3,}, -{0x4a, 0xa9,}, -{0x4b, 0xb0,}, -{0x4c, 0xb6,}, -{0x4d, 0xbb,}, -{0x4e, 0xc5,}, -{0x4f, 0xcf,}, -{0x50, 0xd7,}, -{0x51, 0xe7,}, -{0x52, 0xf3,}, -{0x53, 0xfa,}, -{0x54, 0xff,}, -{0x55, 0xff,}, -{0x56, 0xff,}, -{0x57, 0xff,}, -{0x58, 0xff,}, -{0x59, 0xff,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x04,}, -{0x5d, 0x08,}, -{0x5e, 0x0f,}, -{0x5f, 0x1b,}, -{0x60, 0x2e,}, -{0x61, 0x3e,}, -{0x62, 0x4e,}, -{0x63, 0x5b,}, -{0x64, 0x65,}, -{0x65, 0x71,}, -{0x66, 0x7b,}, -{0x67, 0x85,}, -{0x68, 0x8d,}, -{0x69, 0x95,}, -{0x6a, 0x9b,}, -{0x6b, 0xa3,}, -{0x6c, 0xa9,}, -{0x6d, 0xb0,}, -{0x6e, 0xb6,}, -{0x6f, 0xbb,}, -{0x70, 0xc5,}, -{0x71, 0xcf,}, -{0x72, 0xd7,}, -{0x73, 0xe7,}, -{0x74, 0xf3,}, -{0x75, 0xfa,}, -{0x76, 0xff,}, -{0x77, 0xff,}, -{0x78, 0xff,}, -{0x79, 0xff,}, -{0x7a, 0xff,}, -{0x7b, 0xff,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x17,}, //Outdoor_delta3 -{0x82, 0xbd,}, //Outdoor_center3 -{0x83, 0x17,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 - -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x89,}, //Outdoor_hue_angle2 -{0x91, 0x10,}, //Outdoor_hue_angle3 -{0x92, 0x14,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,}, // MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 red -{0xb7, 0x3f,}, // MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,}, // MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,}, // MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,}, // MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,}, // MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,}, // MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,}, // MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,}, // MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 yellow -{0xbf, 0x3f,}, // MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,}, // MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,}, // MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 Green -{0xc7, 0x3f,}, // MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,}, // MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,}, // MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,}, // MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,}, // MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,}, // MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,}, // MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x14,}, //Outdoor_allgain_y1 -{0xe7, 0x14,}, //Outdoor_allgain_y2 -{0xe8, 0x13,}, //Outdoor_allgain_y3 -{0xe9, 0x12,}, //Outdoor_allgain_y4 -{0xea, 0x12,}, //Outdoor_allgain_y5 -{0xeb, 0x14,}, //Outdoor_allgain_y6 -{0xec, 0x16,}, //Outdoor_allgain_y7 -{0xed, 0x18,}, //Outdoor_allgain_y8 -{0xee, 0x1a,}, //Outdoor_allgain_y9 -{0xef, 0x17,}, //Outdoor_allgain_y10 -{0xf0, 0x14,}, //Outdoor_allgain_y11 -{0xf1, 0x13,}, //Outdoor_allgain_y12 - -// Indoor MCMC -{0xf2, 0x10,}, //Indoor_delta1 -{0xf3, 0x1e,}, //Indoor_center1 -{0xf4, 0x0b,}, //Indoor_delta2 -{0xf5, 0x6f,}, //Indoor_center2 -{0xf6, 0x10,}, //Indoor_delta3 -{0xf7, 0x9c,}, // Indoor_center3 -{0xf8, 0x07,}, // Indoor_delta4 -{0xf9, 0xb8,}, // Indoor_center4 -{0xfa, 0x90,}, //Indoor_delta5 -{0xfb, 0x2d,}, //Indoor_center5 -{0xfc, 0x92,}, //Indoor_delta6 -{0xfd, 0x4f,}, //Indoor_center6 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x8a,}, //Indoor_hue_angle2 -{0x18, 0x00,}, //Indoor_hue_angle3 -{0x19, 0x00,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,}, // MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,}, // MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,}, // MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,}, // MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,}, // MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,}, // MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,}, // MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x10,}, // MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x10,}, // MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,}, // MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,}, // MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,}, //Dark1_allgain_y1 -{0xe3, 0x10,}, //Dark1_allgain_y2 -{0xe4, 0x10,}, //Dark1_allgain_y3 -{0xe5, 0x11,}, //Dark1_allgain_y4 -{0xe6, 0x10,}, //Dark1_allgain_y5 -{0xe7, 0x13,}, //Dark1_allgain_y6 -{0xe8, 0x12,}, //Dark1_allgain_y7 -{0xe9, 0x12,}, //Dark1_allgain_y8 -{0xea, 0x12,}, //Dark1_allgain_y9 -{0xeb, 0x11,}, //Dark1_allgain_y10 -{0xec, 0x10,}, //Dark1_allgain_y11 -{0xed, 0x0f,}, //Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, // MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,}, // MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,}, // MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,}, // MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,}, // MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,}, // MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,}, // MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x86,}, // MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,}, // MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,}, // MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,}, // MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,}, // MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,}, // MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,}, // MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,}, // MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,}, // MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,}, // MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,}, // MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,}, // MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,}, // MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,}, //Hi-Temp_allgain_y0 -{0x66, 0x0d,}, //Hi-Temp_allgain_y1 -{0x67, 0x0e,}, //Hi-Temp_allgain_y2 -{0x68, 0x0e,}, //Hi-Temp_allgain_y3 -{0x69, 0x10,}, //Hi-Temp_allgain_y4 -{0x6a, 0x10,}, //Hi-Temp_allgain_y5 -{0x6b, 0x13,}, //Hi-Temp_allgain_y6 -{0x6c, 0x12,}, //Hi-Temp_allgain_y7 -{0x6d, 0x13,}, //Hi-Temp_allgain_y8 -{0x6e, 0x12,}, //Hi-Temp_allgain_y9 -{0x6f, 0x0e,}, //Hi-Temp_allgain_y10 -{0x70, 0x11,}, //Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // Adaptive LSC on -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off for HD - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x23,}, //Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x2c,}, //Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,}, //Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,}, //Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3e,}, //Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3c,}, //Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3a,}, //Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x1c,}, //Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x2b,}, //Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x2a,}, //Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1a,}, //Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,}, //Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,}, //Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,}, //Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,}, //Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1e,}, //Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1e,}, //Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1f,}, //Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,}, //Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,},//Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,},//Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,},//Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,},//Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,},//Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,},//Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,},//Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,},//Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x30,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x30,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x30,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,},//Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x55,}, //Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x36,}, //Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x35,}, //Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Outdoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x1a,}, //Outdoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Outdoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x36,}, //Outdoor 1277 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Outdoor 1278 -{0x2e, 0x79,}, -{0x2f, 0x09,}, //Outdoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Outdoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Outdoor 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Outdoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Outdoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Outdoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Outdoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Outdoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Outdoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Outdoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Outdoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Outdoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Outdoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Outdoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Outdoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Outdoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Outdoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Outdoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Outdoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Outdoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Outdoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Outdoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x7f,}, //Outdoor 12ae -{0x5c, 0xaf,}, -{0x5d, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Outdoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Outdoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Outdoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Outdoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Outdoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Outdoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Outdoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Outdoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Outdoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Outdoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Outdoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Outdoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Outdoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Outdoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x30,},//Outdoor 12d7 //CI LPF NR offset -{0x7c, 0xd8,}, -{0x7d, 0x33,},//Outdoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x35,},//Outdoor 12d9 -{0x80, 0xda,}, -{0x81, 0x35,},//Outdoor 12da -{0x82, 0xdb,}, -{0x83, 0x34,},//Outdoor 12db -{0x84, 0xdc,}, -{0x85, 0x30,},//Outdoor 12dc -{0x86, 0xdd,}, -{0x87, 0x2a,},//Outdoor 12dd -{0x88, 0xde,}, -{0x89, 0x26,},//Outdoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x49,}, //Outdoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Outdoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Outdoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x20,}, //Outdoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x20,}, //Outdoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x20,}, //Outdoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x20,}, //Outdoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x20,}, //Outdoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x20,}, //Outdoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x20,}, //Outdoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x20,}, //Outdoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Outdoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1e,}, //Outdoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1d,}, //Outdoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x20,}, //Outdoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Outdoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Outdoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Outdoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Outdoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x3f,}, //Outdoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x3f,}, //Outdoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x3f,}, //Outdoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x3f,}, //Outdoor 1333 -{0xba, 0x34,}, -{0xbb, 0x3f,}, //Outdoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x33,}, //Outdoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x2f,}, //Outdoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x2e,}, //Outdoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Outdoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x1e,}, //Outdoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x22,}, //Outdoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Outdoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Outdoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Outdoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Outdoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x36,}, //Outdoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Outdoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x20,}, //Outdoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Outdoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Outdoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Outdoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x20,}, //Outdoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Outdoor 1383 -{0xe0, 0x84,}, -{0xe1, 0x08,}, //Outdoor 1384 -{0xe2, 0xb7,}, -{0xe3, 0xfd,}, //Outdoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xa7,}, //Outdoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Outdoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Outdoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Outdoor 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Outdoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Outdoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Outdoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x0f,}, //Outdoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Outdoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x1c,}, //Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Outdoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Outdoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Outdoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Outdoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1d,}, //Outdoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x26,}, //Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x24,}, //Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x23,}, //Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x1a,}, //Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x14,}, //Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x16,}, //Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x16,}, //Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x22,}, //Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x21,}, //Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x20,}, //Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x1a,}, //Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x19,}, //Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x15,}, //Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x18,}, //Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x1b,}, //Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x24,}, //Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x24,}, //Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x1a,}, //Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x14,}, //Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x10,}, //Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x18,}, //Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x18,}, //Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x1b,}, //Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x19,}, //Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x19,}, //Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x1e,}, //Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x25,}, //Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x25,}, //Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x24,}, //Outdoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x24,}, //Outdoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x28,}, //Outdoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x30,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x31,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x30,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x27,}, //Outdoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x28,}, //Outdoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x2d,}, //Outdoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x2d,},//Outdoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x2e,},//Outdoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x2b,},//Outdoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x28,},//Outdoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x25,},//Outdoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Outdoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Outdoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Outdoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Outdoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Outdoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Outdoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Outdoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Outdoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Outdoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Outdoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Outdoor 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Outdoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Outdoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Outdoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Outdoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x3f,}, //Outdoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x3f,}, //Outdoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x3f,}, //Outdoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x3c,}, //Outdoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x38,}, //Outdoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x35,}, //Outdoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Outdoor 1A20 add -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Outdoor 1A2f add -{0xae, 0x32,}, -{0xaf, 0x87,}, //Outdoor 1A32 add -{0xb0, 0x34,}, -{0xb1, 0xd2,}, //Outdoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1c,}, //Outdoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x06,},//Outdoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Outdoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Outdoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Outdoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Outdoor 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Outdoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Outdoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Outdoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Outdoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Outdoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Outdoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Outdoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Outdoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Outdoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x0e,}, //Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x0e,}, //Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x0e,}, //Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x13,}, //Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x17,}, //Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x17,}, //Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x17,}, //Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x17,}, //Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x14,}, //Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x11,}, //Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x10,}, //Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x12,}, //Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x12,}, //Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x12,}, //Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x12,}, //Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x0f,}, //Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x0f,}, //Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x10,}, //Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x17,}, //Outdoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x19,}, //Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x17,}, //Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x16,}, //Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xD0, 0x27,}, -{0xD1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x16,}, //Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x10,}, //Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x16,}, //Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x15,}, //Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x12,}, //Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x13,}, //Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x13,}, //Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x13,}, //Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x29,}, //Outdoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x29,}, //Outdoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x29,}, //Outdoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x28,}, //Outdoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x28,}, //Outdoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Outdoor 1Aa7 add -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Outdoor 1Aa8 add -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Outdoor 1Aa9 add -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Outdoor 1Aaa add -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Outdoor 1Aab add -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Outdoor 1Aaf add -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Outdoor 1Ab0 add -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Outdoor 1Ab1 add -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Outdoor 1Ab2 add -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Outdoor 1Ab3 add -{0x58, 0xca,}, -{0x59, 0x00,}, //Outdoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Outdoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Outdoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0f,}, //Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x00,}, //Outdoor 1071 -{0x64, 0x72,}, -{0x65, 0x00,}, //Outdoor 1072 -{0x66, 0x73,}, -{0x67, 0x00,}, //Outdoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Outdoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Outdoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,},//Outdoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x40,},//Outdoor 1077 -{0x70, 0x78,}, -{0x71, 0x00,},//Outdoor 1078 -{0x72, 0x79,}, -{0x73, 0x40,},//Outdoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,},//Outdoor 107a -{0x76, 0x7b,}, -{0x77, 0x40,},//Outdoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,},//Outdoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Outdoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Outdoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Outdoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x30,}, //Outdoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Outdoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Outdoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Outdoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Outdoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x02,}, //Outdoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Outdoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x7f,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Indoor 1137 //Pre Flat rate -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Indoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x20,}, //Indoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Indoor 1140 -{0x34, 0x41,}, -{0x35, 0x1e,}, //Indoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x38,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x33,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x31,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x30,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x16,}, //Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x16,}, //Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x15,}, //Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x15,}, //Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x11,}, //Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,}, //Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,}, //Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x11,}, //Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x11,}, //Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x11,}, //Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x15,}, //Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x16,}, //Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,}, //Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,}, //Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,}, //Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x15,}, //Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x15,}, //Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x13,}, //Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x13,}, //Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,}, //Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,}, //Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,}, //Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x16,}, //Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x17,}, //Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x17,}, //Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,}, //Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,}, //Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x25,}, //Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x24,}, //Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,}, //Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x65,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x18,}, //Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Indoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x02,}, //Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x1c,}, //Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x0e,}, //Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,}, //Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Indoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Indoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Indoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,}, // burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x2a,}, //Indoor 11e5 //Bayer Flat R4 StdH -{0x12, 0xe6,}, -{0x13, 0x00,}, //Indoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Indoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Indoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Indoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Indoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Indoor 11eb -{0x1e, 0xef,}, -{0x1f, 0xac,}, //Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Indoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Indoor 1270 // Bayer Sharpness ENB add -{0x26, 0x71,}, -{0x27, 0x1a,}, //Indoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Indoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x26,}, //Indoor 1277 //20130412 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Indoor 1278 -{0x2e, 0x79,}, -{0x2f, 0xff,}, //Indoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Indoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Indoor 127b -{0x34, 0x7c,}, -{0x35, 0x64,}, //Indoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x20,}, //Indoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Indoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Indoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Indoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Indoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Indoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Indoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Indoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Indoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Indoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Indoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Indoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Indoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Indoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Indoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Indoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Indoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Indoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x5f,}, //Indoor 12ae //Bayer Flat off -{0x5c, 0xaf,}, -{0x5d, 0x80,}, //Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Indoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Indoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Indoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Indoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Indoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Indoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Indoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Indoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Indoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Indoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Indoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Indoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Indoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Indoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x38,}, //Indoor 12d7 -{0x7c, 0xd8,}, -{0x7d, 0x30,}, //Indoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2a,}, //Indoor 12d9 -{0x80, 0xda,}, -{0x81, 0x2a,}, //Indoor 12da -{0x82, 0xdb,}, -{0x83, 0x24,}, //Indoor 12db -{0x84, 0xdc,}, -{0x85, 0x20,}, //Indoor 12dc -{0x86, 0xdd,}, -{0x87, 0x1a,}, //Indoor 12dd -{0x88, 0xde,}, -{0x89, 0x16,}, //Indoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Indoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Indoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Indoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Indoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Indoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Indoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Indoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Indoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Indoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Indoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Indoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Indoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Indoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Indoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Indoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Indoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Indoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Indoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Indoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Indoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Indoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Indoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Indoor 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Indoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x20,}, //Indoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Indoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Indoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Indoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x18,}, //Indoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x36,}, //Indoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Indoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Indoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Indoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Indoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x45,}, //Indoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Indoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x65,}, //Indoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Indoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Indoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Indoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x30,}, //Indoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Indoor 1383 //add 20121210 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Indoor 1384 //add 20121210 -{0xe2, 0xb7,}, -{0xe3, 0xfa,}, //Indoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0x77,}, //Indoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Indoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Indoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Indoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Indoor 1410 -{0xf6, 0x11,}, -{0xf7, 0x98,}, //Indoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Indoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Indoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x17,}, //Indoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Indoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Indoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Indoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Indoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Indoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Indoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x20,}, //Indoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x22,}, //Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x21,}, //Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x1c,}, //Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x15,}, //Indoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x11,}, //Indoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x10,}, //Indoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x11,}, //Indoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Indoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x1a,}, //Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x15,}, //Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x14,}, //Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x13,}, //Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x12,}, //Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x12,}, //Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x14,}, //Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x15,}, //Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x22,}, //Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x21,}, //Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x20,}, //Indoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x1d,}, //Indoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x1d,}, //Indoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x1d,}, //Indoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x1d,}, //Indoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x19,}, //Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x16,}, //Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x15,}, //Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x14,}, //Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x13,}, //Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x12,}, //Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x2a,}, //Indoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x2b,}, //Indoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x2c,}, //Indoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2d,}, //Indoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x2d,}, //Indoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x2b,}, //Indoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x2d,}, //Indoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x2e,}, //Indoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x1c,}, //Indoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x20,}, //Indoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x26,}, //Indoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x26,}, //Indoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x22,}, //Indoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x22,}, //Indoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x1c,}, //Indoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x18,}, //Indoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Indoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Indoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Indoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Indoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Indoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Indoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Indoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Indoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Indoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Indoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Indoor 14c9 -{0x94, 0xca,}, -{0x95, 0x27,}, //Indoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Indoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Indoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Indoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x2a,}, //Indoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x27,}, //Indoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x23,}, //Indoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x23,}, //Indoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x23,}, //Indoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x23,}, //Indoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Indoor 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Indoor 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x87,}, //Indoor 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xd0,}, //Indoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x11,}, //Indoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x00,}, //Indoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Indoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Indoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x1d,}, //Indoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Indoor 1A3a //RGB Flat R2_Lum H -{0xbe, 0x3b,}, -{0xbf, 0x00,}, //Indoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x4c,}, //Indoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x00,}, //Indoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x13,}, //Indoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x00,}, //Indoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x2a,}, //Indoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x00,}, //Indoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x17,}, //Indoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2c,}, //Indoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x12,}, //Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x12,}, //Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x11,}, //Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x10,}, //Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x10,}, //Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x10,}, //Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x10,}, //Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x13,}, //Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x13,}, //Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x12,}, //Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x10,}, //Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x10,}, //Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x10,}, //Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x10,}, //Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x12,}, //Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x12,}, //Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x13,}, //Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x14,}, //Indoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x14,}, //Indoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x14,}, //Indoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x15,}, //Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x15,}, //Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x12,}, //Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x12,}, //Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x12,}, //Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x13,}, //Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x14,}, //Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x14,}, //Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x22,}, //Indoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x23,}, //Indoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x24,}, //Indoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x25,}, //Indoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x26,}, //Indoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x27,}, //Indoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x29,}, //Indoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x2b,}, //Indoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Indoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x23,}, //Indoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x26,}, //Indoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x26,}, //Indoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x26,}, //Indoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x26,}, //Indoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x26,}, //Indoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x26,}, //Indoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x34,}, //Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Indoor 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Indoor 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Indoor 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Indoor 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Indoor 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Indoor 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Indoor 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Indoor 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Indoor 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Indoor 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Indoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Indoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Indoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Indoor 1070 Trans Func. 130108 Indoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x01,}, //Indoor 1071 -{0x64, 0x72,}, -{0x65, 0x89,}, //Indoor 1072 -{0x66, 0x73,}, -{0x67, 0xd4,}, //Indoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Indoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Indoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,}, //Indoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x47,}, //Indoor 1077 -{0x70, 0x78,}, -{0x71, 0xae,}, //Indoor 1078 -{0x72, 0x79,}, -{0x73, 0x50,}, //Indoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Indoor 107a -{0x76, 0x7b,}, -{0x77, 0x50,}, //Indoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Indoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x05,}, //Indoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Indoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x2f,}, //Indoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x2a,}, //Indoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Indoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Indoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Indoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Indoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x03,}, //Indoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Indoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark1 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark1 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark1 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark1 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark1 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark1 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark1 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark1 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark1 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark1 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark1 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark1 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark1 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark1 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark1 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark1 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark1 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark1 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark1 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark1 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark1 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark1 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark1 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark1 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark1 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark1 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark1 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark1 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark1 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark1 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark1 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark1 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark1 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark1 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark1 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark1 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark1 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark1 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark1 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark1 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark1 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark1 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark1 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark1 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark1 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark1 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark1 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark1 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark1 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark1 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark1 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark1 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark1 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark1 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark1 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark1 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark1 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark1 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark1 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark1 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark1 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark1 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark1 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark1 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark1 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark1 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark1 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark1 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark1 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark1 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark1 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark1 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark1 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark1 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark1 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark1 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark1 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark1 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark1 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark1 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark1 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark1 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark1 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark1 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark1 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark1 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark1 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark1 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark1 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark1 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark1 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark1 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark1 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark1 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark1 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark1 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark1 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark1 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark1 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark1 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark1 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark1 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark1 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark1 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark1 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark1 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark1 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark1 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark1 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark1 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark1 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark1 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark1 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark1 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark1 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark1 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark1 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark1 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark1 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark1 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark1 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark1 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark1 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark1 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark1 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark1 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x13,}, //Dark1 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x13,}, //Dark1 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x14,}, //Dark1 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x16,}, //Dark1 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x16,}, //Dark1 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x15,}, //Dark1 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x13,}, //Dark1 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark1 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark1 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark1 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark1 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark1 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark1 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark1 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark1 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark1 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark1 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark1 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark1 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark1 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark1 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark1 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark1 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark1 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark1 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark1 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark1 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark1 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark1 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark1 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark1 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark1 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark1 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark1 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark1 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark1 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark1 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark1 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark1 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark1 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark1 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark1 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark1 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark1 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark1 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark1 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark1 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark1 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark1 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark1 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark1 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark1 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark1 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark1 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark1 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark1 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark1 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark1 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark1 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark1 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark1 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark1 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark1 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark1 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark1 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark1 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark1 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark1 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark1 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark1 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark1 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark1 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark1 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark1 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark1 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark1 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark1 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark1 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark1 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark1 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark1 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark1 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark1 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark1 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark1 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark1 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark1 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark1 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark1 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark1 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark1 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark1 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark1 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark1 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark1 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark1 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark1 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark1 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark1 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark1 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark1 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark1 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark1 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark1 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark1 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark1 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark1 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x04,}, //Dark1 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark1 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark2 1137 //Pre Flat rate B[4:1] //04 -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark2 1139 -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark2 1149 -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark2 114a -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark2 114b -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark2 114c -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark2 114d -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark2 114e -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark2 114f -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark2 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark2 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark2 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark2 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark2 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark2 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark2 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark2 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark2 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark2 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark2 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark2 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark2 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark2 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark2 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark2 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark2 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark2 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark2 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark2 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark2 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark2 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark2 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark2 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark2 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark2 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark2 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark2 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark2 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark2 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark2 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark2 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark2 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark2 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark2 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark2 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark2 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark2 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark2 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark2 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark2 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark2 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark2 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark2 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark2 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark2 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark2 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark2 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark2 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark2 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark2 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark2 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark2 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark2 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark2 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark2 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark2 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark2 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark2 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark2 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark2 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark2 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark2 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark2 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark2 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark2 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark2 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark2 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark2 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark2 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark2 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark2 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark2 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark2 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark2 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark2 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark2 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark2 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark2 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark2 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark2 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark2 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark2 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark2 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark2 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark2 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark2 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark2 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark2 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark2 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark2 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark2 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark2 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark2 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark2 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark2 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark2 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark2 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark2 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark2 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark2 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark2 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark2 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark2 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark2 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark2 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark2 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark2 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark2 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark2 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark2 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark2 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark2 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark2 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark2 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark2 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark2 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark2 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark2 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark2 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark2 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark2 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x23,}, //Dark2 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x26,}, //Dark2 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x24,}, //Dark2 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x13,}, //Dark2 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x1a,}, //Dark2 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x12,}, //Dark2 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x12,}, //Dark2 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark2 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark2 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark2 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark2 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark2 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark2 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark2 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark2 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark2 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark2 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark2 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark2 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark2 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark2 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark2 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark2 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark2 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark2 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark2 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark2 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark2 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark2 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark2 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark2 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark2 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark2 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark2 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark2 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark2 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark2 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark2 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark2 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark2 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark2 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark2 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark2 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark2 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark2 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark2 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark2 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark2 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark2 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark2 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark2 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark2 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark2 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark2 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark2 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark2 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark2 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark2 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark2 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark2 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark2 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark2 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark2 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark2 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark2 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark2 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark2 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark2 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark2 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark2 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark2 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark2 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark2 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark2 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark2 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark2 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark2 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark2 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark2 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark2 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark2 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark2 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark2 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark2 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark2 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark2 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark2 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark2 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark2 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark2 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark2 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark2 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark2 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark2 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark2 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark2 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark2 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark2 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark2 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark2 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark2 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark2 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark2 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark2 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark2 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark2 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark2 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x05,}, //Dark2 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark2 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 86MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0d,}, // tlpx_time_l_dn -{0x1e, 0x0c,}, // hs_zero_time -{0x1f, 0x0c,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x0a,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x1c,}, // clk_zero_time -{0x33, 0x0e,}, // clk_post_time -{0x34, 0x05,}, // clk_prepare_time -{0x35, 0x08,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x08,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 - -/////////////////////////////////////////////////////////////////////////////// -// sleep off -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0x03, 0xc0,}, -{0x7F, 0x80,}, // DMA on -{0x7E, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// end of HD set -/////////////////////////////////////////////////////////////////////////////// -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_30fps[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -{0x03, 0x16,}, // dark color -{0x10, 0x3f,}, - -//--------------------------------------------------------------------------// -//Fixed mode setting -//--------------------------------------------------------------------------// -/////////////////////////////////////////// -// 20 Page(Fuzzy) -/////////////////////////////////////////// -{0x03, 0x20,}, -{0x3C, 0x00,}, //Fix 30fps @ OPCLK 54.6MHz(1Line = 2200) -{0x3D, 0x1B,}, -{0x3E, 0xc3,}, -{0x3F, 0x08,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0x80,}, //Patch Weight Off B[6] -{0x21, 0x20,}, -{0x22, 0x20,}, -{0x23, 0x20,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x8f,}, -{0x17, 0x22,}, //AWB Speed -{0x18, 0x44,}, -{0x22, 0x20,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x87,}, //Fixed Mode On //XY Flip - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_30fps_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -{0x03, 0x16,}, // dark color -{0x10, 0x3f,}, - -//--------------------------------------------------------------------------// -//Fixed mode setting -//--------------------------------------------------------------------------// -/////////////////////////////////////////// -// 20 Page(Fuzzy) -/////////////////////////////////////////// -{0x03, 0x20,}, -{0x3C, 0x00,}, //Fix 30fps @ OPCLK 54.6MHz(1Line = 2200) -{0x3D, 0x1B,}, -{0x3E, 0xc3,}, -{0x3F, 0x08,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0x80,}, //Patch Weight Off B[6] -{0x21, 0x20,}, -{0x22, 0x20,}, -{0x23, 0x20,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x8f,}, -{0x17, 0x22,}, //AWB Speed -{0x18, 0x44,}, -{0x22, 0x20,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x84,}, //Fixed Mode On - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_modeOff[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -//--------------------------------------------------------------------------// -//Variable mode setting -//--------------------------------------------------------------------------// -{0x03, 0x16,}, -{0x10, 0x7f,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0xc0,}, //Patch Weight On B[6] -{0x21, 0x49,}, -{0x22, 0x53,}, -{0x23, 0x78,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x9f,}, -{0x17, 0x34,}, //AWB Speed -{0x18, 0x55,}, -{0x22, 0x30,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8F,}, // Adaptive on - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x83,}, //Fixed Mode Off //xy flip - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, //sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_modeOff_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -//--------------------------------------------------------------------------// -//Variable mode setting -//--------------------------------------------------------------------------// -{0x03, 0x16,}, -{0x10, 0x7f,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0xc0,}, //Patch Weight On B[6] -{0x21, 0x49,}, -{0x22, 0x53,}, -{0x23, 0x78,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x9f,}, -{0x17, 0x34,}, //AWB Speed -{0x18, 0x55,}, -{0x22, 0x30,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8F,}, // Adaptive on - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x80,}, //Fixed Mode Off - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, //sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -/*================================= - *CAMERA_BRIGHTNESS_1 (1/9) M4 * - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_M4[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x40,}, -{0x5e, 0xf0,}, -}; - -/*================================= - *CAMERA_BRIGHTNESS_2 (2/9) M3 * - ==================================*/ - -static struct msm_camera_i2c_reg_conf sr352_brightness_M3[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x54,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_3 (3/9) M2 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_M2[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x67,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_4 (4/9) M1 - ==================================*/ - -static struct msm_camera_i2c_reg_conf sr352_brightness_M1[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x7b,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_5 (5/9) Default - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_default[] = -{ -{0x03, 0x10,}, -{0x14, 0x02,}, -{0x5d, 0x80,}, -{0x5e, 0x00,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_6 (6/9) P1 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P1[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x86,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_7 (7/9) P2 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P2[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x99,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_8 (8/9) P3 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P3[] = -{ - -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0xae,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_9 (9/9) P4 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P4[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0xc0,}, -{0x5e, 0x70,}, -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_none[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x10,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; -static struct msm_camera_i2c_reg_conf sr352_effect_none_01[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x10,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; -static struct msm_camera_i2c_reg_conf sr352_effect_gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf3,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf8,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf3,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x60,}, -{0x45, 0xa3,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_auto[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0xe0,}, //Adaptive e0, manual 20 -{0x15, 0xc4,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_cloudy[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_fluorescent[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x00,}, -{0x97, 0x05,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x08,}, //B Min -{0x9e, 0x80,}, -{0x9f, 0x08,}, //B Max -{0xa0, 0xa0,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_incandescent[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x04,}, //R Min -{0x96, 0x00,}, -{0x97, 0x04,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x70,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0xb0,}, -{0x9d, 0x0a,}, //B Min -{0x9e, 0xc0,}, -{0x9f, 0x0b,}, //B Max -{0xa0, 0x00,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_sunny[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x80,}, -{0x97, 0x05,}, //R Max -{0x98, 0xa0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x06,}, //B Min -{0x9e, 0x60,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x80,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -/*===========================================*/ -/*CAMERA_SCENE_off */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_Scene_Off[] = -{ - //Scene Off (FPS Auto/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8f,}, //EV option on -{0x11, 0xfe,}, //Function On - -{0x03, 0x10,}, -{0x12, 0x10,}, //Y Ofs On - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Band100 Max 8fps -{0x37, 0x08,}, //Band120 Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, //cb offset -{0x7c, 0x00,}, //cr offset - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x03,}, //d gain on - - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Landscape */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Landscape[] = -{ - //Scene Landscape (FPS Auto/ISO Auto/Maxtrix/Br0/AWB Auto/Sat1/Sharp+1) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness +1 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0xcc,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0xcc,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0xcc,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0xcc,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Party */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Party[] = -{ - /*Party/Indoor (FPS Auto/ISO 200/Center/Br0/AWB Auto/Sat1/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0x82,}, //pga_max_total -{0x52, 0x5c,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x5c,}, // Band1 Gain 30fps -{0x22, 0x5c,}, // Band2 Gain 15fps -{0x23, 0x5c,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_sunset */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Sunset[] = -{ - //Scene Sunset (FPS Auto/ISO Auto/Center/Br0/AWB cloudy/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cloudy -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Dawn */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Dawn[] = -{ - //Scene sunrise Dawn (FPS Auto/ISO Auto/Center/Br0/AWB CWF/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cwf -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x00,}, -{0x97, 0x05,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x08,}, //B Min -{0x9e, 0x80,}, -{0x9f, 0x08,}, //B Max -{0xa0, 0xa0,}, - - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Fall */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Fall[] = -{ - //Scene Fall (FPS Auto/ISO Auto/Center/Br0/AWB Auto/Sat2/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x40,}, -{0x7c, 0x40,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - - -/*===========================================*/ -/*CAMERA_SCENE_Nightshot */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Nightshot[] = -{ - - //Scene Night (FPS Night/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8f,}, //EV option on -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x10,}, //Y Ofs On - -{0x03, 0x20,}, -{0x12, 0x60,}, //AE Digital gain On - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0xba,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x04,}, //Max 4fps -{0x37, 0x04,}, //Max 4fps - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //Capture Set -{0x03, 0xD9,}, -{0x8C, 0x60,}, //DG On -{0x25, 0xFF,}, //Deshutter AG Max -{0x26, 0x20,}, //Deshutter AG Min -{0x27, 0xba,}, //Deshutter DG Max -{0x28, 0x80,}, //Deshutter DG Min -{0x29, 0x02,}, //Deshutter Max 2Fps -{0x10, 0x06,}, //Deshutter On - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Backlight */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Backlight[] = -{ - //Scene Against (FPS Auto/ISO Auto/Spot/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - - //SSD_Spot -{0x03, 0xc6,},//1 Line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, -{0xA4, 0x00,},//2 Line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, -{0xAA, 0x00,},//3 Line -{0xAB, 0x01,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x10,}, -{0xAF, 0x00,}, -{0xB0, 0x00,},//4 Line -{0xB1, 0x01,}, -{0xB2, 0xff,}, -{0xB3, 0xff,}, -{0xB4, 0x10,}, -{0xB5, 0x00,}, -{0xB6, 0x00,},//5 Line -{0xB7, 0x01,}, -{0xB8, 0xff,}, -{0xB9, 0xff,}, -{0xBA, 0x10,}, -{0xBB, 0x00,}, -{0xBC, 0x00,},//6 Line -{0xBD, 0x01,}, -{0xBE, 0xff,}, -{0xBF, 0xff,}, -{0xC0, 0x10,}, -{0xC1, 0x00,}, -{0xC2, 0x00,},//7 Line -{0xC3, 0x01,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x10,}, -{0xC7, 0x00,}, -{0xC8, 0x00,},//8 Line -{0xC9, 0x00,}, -{0xCA, 0x00,}, -{0xCB, 0x00,}, -{0xCC, 0x00,}, -{0xCD, 0x00,}, -{0xCE, 0x00,},//9 Line -{0xCF, 0x00,}, -{0xD0, 0x00,}, -{0xD1, 0x00,}, -{0xD2, 0x00,}, -{0xD3, 0x00,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off -}; - -/*===========================================*/ -/*CAMERA_SCENE_Candle */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Candle[] = -{ - //Scene candle (FPS Auto/ISO Auto/Center/Br0/AWB cloudy/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cloudy -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, - - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Beach */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Beach[] = -{ - //Beach(FPS Auto/ISO 50/Center/Br1/AWB Auto/Sat1/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0xfe,}, //Y target On - - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0x20,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x10,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x20,}, // Band1 Gain 30fps -{0x22, 0x20,}, // Band2 Gain 15fps -{0x23, 0x20,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Sports */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Sports[] = -{ - /*Sports (FPS Sports/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x48,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Firework */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Firework[] = -{ - /*Firework (FPS Fire/ISO 50/Center/Br0/AWB Auto/Sat0/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x04,}, //Max 4fps -{0x37, 0x04,}, //Max 4fps - -//Capture Set -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x25, 0x20,}, //Deshutter AG Max -{0x26, 0x20,}, //Deshutter AG Min -{0x27, 0x80,}, //Deshutter DG Max -{0x28, 0x80,}, //Deshutter DG Min -{0x29, 0x01,}, //Deshutter Max 1Fps -{0x10, 0x06,}, //Deshutter On - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*=========================================================*/ -/*METERING() */ -/*=========================================================*/ -static struct msm_camera_i2c_reg_conf sr352_metering_matrix[] = { - - //Matrix weight set________________ -{0x03, 0xc6,}, //1 line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xA4, 0x00,}, //2 line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, - -{0xAA, 0x11,}, //3 line -{0xAB, 0x11,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x11,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,}, //4 line -{0xB1, 0x11,}, -{0xB2, 0x11,}, -{0xB3, 0x11,}, -{0xB4, 0x11,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,}, //5 line -{0xB7, 0x11,}, -{0xB8, 0x11,}, -{0xB9, 0x11,}, -{0xBA, 0x11,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,}, //6 line -{0xBD, 0x11,}, -{0xBE, 0x11,}, -{0xBF, 0x11,}, -{0xC0, 0x11,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,}, //7 line -{0xC3, 0x11,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x11,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,}, //8 line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,}, //9 line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_metering_center[] = { - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_metering_spot[] = { - - - //Spot weight set________________ -{0x03, 0xc6,}, //1 line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xA4, 0x00,}, //2 line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, - -{0xAA, 0x00,}, //3 line -{0xAB, 0x01,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x10,}, -{0xAF, 0x00,}, - -{0xB0, 0x00,}, //4 line -{0xB1, 0x01,}, -{0xB2, 0xff,}, -{0xB3, 0xff,}, -{0xB4, 0x10,}, -{0xB5, 0x00,}, - -{0xB6, 0x00,}, //5 line -{0xB7, 0x01,}, -{0xB8, 0xff,}, -{0xB9, 0xff,}, -{0xBA, 0x10,}, -{0xBB, 0x00,}, - -{0xBC, 0x00,}, //6 line -{0xBD, 0x01,}, -{0xBE, 0xff,}, -{0xBF, 0xff,}, -{0xC0, 0x10,}, -{0xC1, 0x00,}, - -{0xC2, 0x00,}, //7 line -{0xC3, 0x01,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x10,}, -{0xC7, 0x00,}, - -{0xC8, 0x00,}, //8 line -{0xC9, 0x00,}, -{0xCA, 0x00,}, -{0xCB, 0x00,}, -{0xCC, 0x00,}, -{0xCD, 0x00,}, - -{0xCE, 0x00,}, //9 line -{0xCF, 0x00,}, -{0xD0, 0x00,}, -{0xD1, 0x00,}, -{0xD2, 0x00,}, -{0xD3, 0x00,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_stop_stream[] = { -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep of frame sync type | Mipi frame - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf sr352_50hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps -{0x21, 0x06,}, -{0x22, 0xea,}, -{0x23, 0x50,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x70,}, //AE Off (Band Off) 50hz 70, 60hz 50 -{0x12, 0x30,}, // Fast speed -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x1e, 0x03,}, // Band1 Step -{0x1f, 0x06,}, // Band2 Step -{0x20, 0x08,}, // Band3 Step - -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,},// Band3 Gain 12fps - -{0x36, 0x08,}, // Max 8fps -{0x37, 0x08,}, // Max 8fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x82,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 54.6 -{0x45, 0x06,}, -{0x46, 0xea,}, -{0x47, 0x50,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps float -{0xa8, 0xdd,}, -{0xa9, 0x4a,}, -{0xaa, 0x00,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -{0x03, 0xc7,}, -{0x10, 0xf0,}, //AE On 50hz f0, 60hz d0 - -}; - -static struct msm_camera_i2c_reg_conf sr352_HD_50hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps // HD 86.6MHz -{0x21, 0x05,}, -{0x22, 0x81,}, -{0x23, 0x2e,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x30,}, // AE Off (Band Off) 50hz 30, 60hz 10 -{0x12, 0x03,}, // Slow AE -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x36, 0x18,}, // Max 24fps -{0x37, 0x18,}, // Max 24fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x82,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 3700 -{0x4D, 0x00,}, -{0x4E, 0x0e,}, -{0x4F, 0x74,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 43.3 -{0x45, 0x05,}, -{0x46, 0x81,}, -{0x47, 0x2e,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps flaot -{0xa8, 0xb0,}, -{0xa9, 0x25,}, -{0xaa, 0xc0,}, - -{0x03, 0x20,}, //HW ExpMin = 3700 -{0x28, 0x00,}, -{0x29, 0x0e,}, -{0x2A, 0x74,}, - -{0x03, 0xc7,}, -{0x10, 0xb0,}, //AE On (Band Off) 50hz b0, 60hz 90 - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Lock_50Hz[] = { -{0x03, 0xc7,}, -{0x10, 0x70,}, //AE Off 50hz 70, 60hz 50 -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Unlock_50Hz[] = { -{0x03, 0xc7,}, -{0x10, 0xf0,}, //AE On 50hz f0, 60hz d0 -{0x03, 0xc8,}, -{0x10, 0xd2,}, //AWB On -{0xff, 0x0a,}, //delay 100ms -}; - -#if defined(CONFIG_MACH_MATISSE3G_OPEN) || defined(CONFIG_MACH_MATISSEWIFI_OPEN) -static struct msm_camera_i2c_reg_conf sr352_60hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xad,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps -{0x21, 0x06,}, -{0x22, 0xea,}, -{0x23, 0x50,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x50,}, //AE Off (Band Off) 50hz 70, 60hz 50 -{0x12, 0x30,}, // Fast speed -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x1e, 0x03,}, // Band1 Step -{0x1f, 0x06,}, // Band2 Step -{0x20, 0x08,}, // Band3 Step - -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,},// Band3 Gain 12fps - -{0x36, 0x08,}, // Max 8fps -{0x37, 0x08,}, // Max 8fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x02,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 54.6 -{0x45, 0x06,}, -{0x46, 0xea,}, -{0x47, 0x50,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps float -{0xa8, 0xdd,}, -{0xa9, 0x4a,}, -{0xaa, 0x00,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -{0x03, 0xc7,}, -{0x10, 0xd0,}, //AE On 50hz f0, 60hz d0 - -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Lock_60Hz[] = { -{0x03, 0xc7,}, -{0x10, 0x50,}, //AE Off 50hz 70, 60hz 50 -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Unlock_60Hz[] = { -{0x03, 0xc7,}, -{0x10, 0xd0,}, //AE On 50hz f0, 60hz d0 -{0x03, 0xc8,}, -{0x10, 0xd2,}, //AWB On -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_HD_60hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps // HD 86.6MHz -{0x21, 0x05,}, -{0x22, 0x81,}, -{0x23, 0x2e,}, - - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x30,}, // AE Off (Band Off) 50hz 30, 60hz 10 -{0x12, 0x03,}, // Slow AE -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x36, 0x18,}, // Max 24fps -{0x37, 0x18,}, // Max 24fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x02,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 3700 -{0x4D, 0x00,}, -{0x4E, 0x0e,}, -{0x4F, 0x74,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 43.3 -{0x45, 0x05,}, -{0x46, 0x81,}, -{0x47, 0x2e,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps flaot -{0xa8, 0xb0,}, -{0xa9, 0x25,}, -{0xaa, 0xc0,}, - - -{0x03, 0x20,}, //HW ExpMin = 3700 -{0x28, 0x00,}, -{0x29, 0x0e,}, -{0x2A, 0x74,}, - -{0x03, 0xc7,}, -{0x10, 0x90,}, //AE On (Band Off) 50hz b0, 60hz 90 - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/Kconfig b/drivers/media/platform/msm/camera_v2_fortuna/Kconfig deleted file mode 100644 index 99028d58e763..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/Kconfig +++ /dev/null @@ -1,388 +0,0 @@ -config MSM_CAMERA_SENSOR - bool "Qualcomm MSM camera sensor support" - depends on MSMB_CAMERA - ---help--- - This flag enables support for Camera Sensor. - The sensor driver is capable of providing real time - data for camera support. The driver support V4L2 - subdev APIs. - -config MSM_CPP - bool "Qualcomm MSM Camera Post Processing Engine support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Post-processing Engine - The Post processing engine is capable of scaling - and cropping image. The driver support V4L2 subdev - APIs. - -config MSM_CCI - bool "Qualcomm MSM Camera Control Interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Control Interface driver only - for those platforms that have hardware support. This driver - is responsible for handling I2C read and write on the I2C - bus. It is also responsible for synchronization with - GPIO and data frames. - -config MSM_CSI20_HEADER - bool "Qualcomm MSM CSI 2.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8960, - 8930 and 8064 platforms. - -config MSM_CSI22_HEADER - bool "Qualcomm MSM CSI 2.2 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.2 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8610 - platform. - -config MSM_CSI30_HEADER - bool "Qualcomm MSM CSI 3.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - 8064 platforms. - -config MSM_CSI31_HEADER - bool "Qualcomm MSM CSI 3.1 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - APQ8084 platform. - -config MSM_CSIPHY - bool "Qualcomm MSM Camera Serial Interface Physical receiver support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface - Physical receiver. It deserializes packets and - supports detection of packet start and stop - signalling. - -config MSM_CSID - bool "Qualcomm MSM Camera Serial Interface decoder support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface decoder. - It supports lane merging and decoding of packets - based on cid which is mapped to a virtual channel - and datatype. - -config MSM_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_FRONT_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_OTP - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data - -config MSM_ISPIF - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of CSID can be routed to of of pixel or raw - data interface in VFE. - -config MSM_ISPIF_V1 - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of MSM_CSI22_HEADER can be routed to of pixel - or raw data interface in VFE. - -config IMX134 - bool "Sensor IMX134 (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - Sony 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - HFR @60fps and @120fps, - Video HDR support. - -config IMX132 - bool "Sensor IMX132 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - Sony 2 MP Bayer Sensor with auto focus, uses - 2 mipi lanes, preview config = 1920 x 1080 at 30 fps, - snapshot config = 1920 x 1080 at 30 fps, - Video HDR support. - -config IMX219 - bool "Sensor IMX219 (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - Sony 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps. - -config OV9724 - bool "Sensor OV9724 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config HI256 - bool "Hynix hi256 (YUV 2MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV5648 - bool "Sensor OV5648 (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 5 MP Bayer Sensor, only use 1 mipi lane, - preview set to 1296*972 at 30 fps, - snapshot set to 2592*1944 at 12 fps, - This sensor driver does not support auto focus. - -config MT9M114 - bool "Sensor MT9M114 (YUV 1.26MP)" - depends on MSMB_CAMERA - ---help--- - MT9M114 is Aptina YUV sensor. It supports 1.26 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. -config OV5645 - bool "Sensor OV5645 (YUV 5.0MP)" - depends on MSMB_CAMERA - ---help--- - OV5645 is Omnivision YUV sensor. It supports 5.0 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. - -config SR200PC20 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 2.0MP sensor, - Front sensor. -config SR030PC50 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile VGA sensor, - Front sensor. - -config SR544 - bool "Sensor for back camera" - depends on MSMB_CAMERA - default n - ---help--- - 5MP sensor - Rear sensor - -config SP1628 - bool "Sensor SP1628 (YUV 720P)" - depends on MSMB_CAMERA - ---help--- - SP1628 is SuperPix YUV sensor. It supports 720P preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like mono. - -config GC0339 - bool "Sensor GC0339 (BAYER .3M)" - depends on MSMB_CAMERA - ---help--- - gc0339 is a Galaxycore .3 MP Bayer Sensor. - It supports 1 or 2 mipi lanes. - Preview and snapshot resolution shall be 640*480 at 30 fps, - It does not support auto focus. - -config GC0310 - bool "Sensor GC0310 (YUV .3M)" - depends on MSMB_CAMERA - ---help--- - 0310 is a Galaxycore .3 MP YUV Sensor. - It supports 1 mipi lane. - Preview and snapshot resolution shall be 640*480 at 30 fps, - It does not support auto focus. - -config OV8825 - bool "OmniVision OV8825 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV8865 - bool "OmniVision OV8865 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 30 fps. - Max fps is 30fps at 3264 * 2448, 60fps at 1632 * 1224 - -config s5k4e1 - bool "Sensor s5k4e1 (BAYER 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP Bayer Sensor. It uses 2 mipi lanes, - supports 720P preview at 30 fps - and QSXGA snapshot at 15 fps. - This sensor driver does not support auto focus. - -config S5K8B1YX - bool "Sensor S5K8B1YX (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - LSI 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config S5K6A3YX - bool "Sensor S5K6A3YX (BAYER 1.9M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 2 MP Bayer Sensor, supports 2 mipi lanes, - -config S5K4H5YB - bool "Sensor S5K4H5YB (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - -config S5K3L2XX - bool "Sensor S5K3L2XX (BAYER 13M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 13MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K3P3SX - bool "Sensor S5K3P3SX (BAYER 16M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 16MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K5E3YX - bool "Sensor S5K5E3YX (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config S5K4ECGX - bool "Sensor s5k4ecgx (SOC 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP SOC Sensor. It uses 2 mipi lanes, - Support auto focus, and flash - -config OV12830 - bool "OmniVision OV12830 (BAYER 12MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 12.8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 2112 * 1500 at 30 fps, - snapshot config = 4224 * 3000 at 15 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config MSM_V4L2_VIDEO_OVERLAY_DEVICE - tristate "Qualcomm MSM V4l2 video overlay device" - ---help--- - Enables support for the MSM V4L2 video - overlay driver. This allows video rendering - apps to render overlaid video using Video4Linux2 - APIs, by using /dev/videoX device - -config MSMB_JPEG - tristate "Qualcomm MSM Jpeg Encoder Engine support" - depends on MSMB_CAMERA && (ARCH_MSM8974 || ARCH_MSM8226 || ARCH_APQ8084 || ARCH_MSM8916 || ARCH_MSM) - ---help--- - Enable support for Jpeg Encoder/Decoder - Engine for 8974. - This module serves as the common driver - for the JPEG 1.0 encoder and decoder. - -config MSM_GEMINI - tristate "Qualcomm MSM Gemini JPEG engine support" - depends on MSMB_CAMERA && (ARCH_MSM7X30 || ARCH_MSM8X60 || ARCH_MSM8960) - ---help--- - Enables support for the Gemini JPEG encoder engine for 8x60. - -config SEC_CAMERA_TUNING - bool "Generic Tuning Concept" - ---help--- - Enable support for Tuning in eng Binary - -config CAM_USE_EXT_VANA_GPIO - bool "Samsung EXT_VANA_GPIO" - depends on MSMB_CAMERA - ---help--- - Board use external LDO controlled by GPIO. -config SR130PC20 - bool "Sensor s5k4e1 (SOC 1.3MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 1.3 MP SOC Sensor. It uses 1 mipi lanes, - Does not support auto focus, and flash - -config DB8221A - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Dongbu HiTek 2.0MP sensor, - Front sensor. - -config CAM_DUAL_POWER_SEQ - bool "Dual power up sequence enable" - depends on MSMB_CAMERA - ---help--- - This flag will allow us to write dual power up sequence. diff --git a/drivers/media/platform/msm/camera_v2_fortuna/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/Makefile deleted file mode 100644 index 3b90bf03e9f9..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/codecs -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/isps -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/pproc -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/jpeg_10 - -obj-$(CONFIG_MSMB_CAMERA) += msm.o -obj-$(CONFIG_MSMB_CAMERA) += cam_dummy.o -obj-$(CONFIG_MSMB_CAMERA) += camera/ -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2/ -obj-$(CONFIG_MSMB_CAMERA) += sensor/ -obj-$(CONFIG_MSMB_CAMERA) += pproc/ -obj-$(CONFIG_MSMB_CAMERA) += isp/ -obj-$(CONFIG_MSMB_CAMERA) += ispif/ -obj-$(CONFIG_MSMB_JPEG) += jpeg_10/ -obj-$(CONFIG_MSMB_CAMERA) += msm_buf_mgr/ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/cam_dummy.c b/drivers/media/platform/msm/camera_v2_fortuna/cam_dummy.c deleted file mode 100644 index 7c2a73a20f0b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/cam_dummy.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" - -static struct v4l2_device *msm_v4l2_dev; -/* static struct msm_cam_dummy_queue cam_dummy_queue; */ - -#if defined CONFIG_SEC_CAMERA_TUNING -int rear_tune; -int front_tune; -#endif - -static int msm_open_cam_dummy(struct file *fp) -{ - int rc; - - pr_err("%s: E\n", __func__); - rc = msm_cam_get_module_init_status(); - pr_err("%s: X %d\n", __func__, rc); - return rc; -} - -#if !defined CONFIG_SEC_CAMERA_TUNING -static long msm_ioctl_cam_dummy(struct file *fp, unsigned int cmd, - unsigned long arg) -{ - return 0; -} -#endif -static int msm_close_cam_dummy(struct file *f) -{ - return 0; -} - -static struct v4l2_file_operations msm_fops_config = { - .owner = THIS_MODULE, - .open = msm_open_cam_dummy, - .release = msm_close_cam_dummy, -#if defined CONFIG_SEC_CAMERA_TUNING - .ioctl = video_ioctl2, -#else - .unlocked_ioctl = msm_ioctl_cam_dummy, -#endif -}; - -static const struct of_device_id cam_dummy_dt_match[] = { - {.compatible = "qcom,cam_dummy",}, - {} -}; - -MODULE_DEVICE_TABLE(of, cam_dummy_dt_match); - -static struct platform_driver cam_dummy_platform_driver = { - .driver = { - .name = "qcom,cam_dummy", - .owner = THIS_MODULE, - .of_match_table = cam_dummy_dt_match, - }, -}; - -#if defined CONFIG_SEC_CAMERA_TUNING -static int msm_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - pr_err("%s TUNING CTRL : ctrl->value %d",__func__,ctrl->value); - if(ctrl->id >= V4L2_CID_PRIVATE_BASE) - { - switch (ctrl->value){ - case NORMAL_MODE : - rear_tune = 0; - front_tune = 0; - pr_err("%s TUNING CTRL : Setting Normal Binary",__func__); - break; - case REAR_TUNING : - rear_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear Tuning Binary",__func__); - break; - case FRONT_TUNING : - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Front Tuning Binary",__func__); - break; - case REAR_FRONT_TUNING : - rear_tune = 1; - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear and Front Tuning Binary",__func__); - break; - } - } - return rc; -} - -static const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = { - .vidioc_s_ctrl = msm_v4l2_s_ctrl, -}; -#endif - -static int32_t cam_dummy_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - struct msm_video_device *pvdev; - - /* init_waitqueue_head(&cam_dummy_queue.state_wait);*/ - pr_err("%s:%d\n", __func__, __LINE__); - match = of_match_device(cam_dummy_dt_match, &pdev->dev); - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CAMERA_DUMMY_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-camdummy", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops_config; -#if defined CONFIG_SEC_CAMERA_TUNING - pvdev->vdev->ioctl_ops = &msm_v4l2_ioctl_ops; -#endif - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static int __init cam_dummy_init_module(void) -{ - int32_t rc = 0; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&cam_dummy_platform_driver, - cam_dummy_platform_probe); - pr_err("%s:%d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static void __exit cam_dummy_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - platform_driver_unregister(&cam_dummy_platform_driver); - return; -} - -module_init(cam_dummy_init_module); -module_exit(cam_dummy_exit_module); -MODULE_DESCRIPTION("cam_dummy"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/camera/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/camera/Makefile deleted file mode 100644 index 3b44618d6c06..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/camera/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += camera.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.c b/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.c deleted file mode 100644 index 94ce2c736b18..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.c +++ /dev/null @@ -1,813 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "camera.h" -#include "msm.h" -#include "msm_vb2.h" - -#define fh_to_private(__fh) \ - container_of(__fh, struct camera_v4l2_private, fh) - -struct camera_v4l2_private { - struct v4l2_fh fh; - unsigned int stream_id; - unsigned int is_vb2_valid; /*0 if no vb2 buffers on stream, else 1*/ - struct vb2_queue vb2_q; -}; - -static void camera_pack_event(struct file *filep, int evt_id, - int command, int value, struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - /* always MSM_CAMERA_V4L2_EVENT_TYPE */ - event->type = MSM_CAMERA_V4L2_EVENT_TYPE; - event->id = evt_id; - event_data->command = command; - event_data->session_id = pvdev->vdev->num; - event_data->stream_id = sp->stream_id; - event_data->arg_value = value; -} - -static int camera_check_event_status(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - if (event_data->status > MSM_CAMERA_ERR_EVT_BASE) { - pr_err("%s : event_data status out of bounds\n", - __func__); - pr_err("%s : Line %d event_data->status 0X%x\n", - __func__, __LINE__, event_data->status); - return -EFAULT; - } - - return 0; -} - -static int camera_v4l2_querycap(struct file *filep, void *fh, - struct v4l2_capability *cap) -{ - int rc; - struct v4l2_event event; - - /* can use cap->driver to make differentiation */ - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_QUERY_CAP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - - return rc; -} - -static int camera_v4l2_s_crop(struct file *filep, void *fh, - const struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_crop(struct file *filep, void *fh, - struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_queryctrl(struct file *filep, void *fh, - struct v4l2_queryctrl *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->type == V4L2_CTRL_TYPE_MENU) { - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - ctrl->id, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, ctrl->id, -1, - &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data; - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, ctrl->id, - ctrl->value, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - event_data = (struct msm_v4l2_event_data *)event.u.data; - ctrl->value = event_data->ret_value; - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_reqbufs(struct file *filep, void *fh, - struct v4l2_requestbuffers *req) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock); - ret = vb2_reqbufs(&sp->vb2_q, req); - mutex_unlock(&session->lock); - return ret; -} - -static int camera_v4l2_querybuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - return 0; -} - -static int camera_v4l2_qbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock); - ret = vb2_qbuf(&sp->vb2_q, pb); - mutex_unlock(&session->lock); - return ret; -} - -static int camera_v4l2_dqbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock); - ret = vb2_dqbuf(&sp->vb2_q, pb, filep->f_flags & O_NONBLOCK); - mutex_unlock(&session->lock); - return ret; -} - -static int camera_v4l2_streamon(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = vb2_streamon(&sp->vb2_q, buf_type); - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_ON, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - return rc; -} - -static int camera_v4l2_streamoff(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_OFF, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - vb2_streamoff(&sp->vb2_q, buf_type); - return rc; -} - -static int camera_v4l2_g_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = -EINVAL; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - struct v4l2_event event; - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = 0; - int i = 0; - struct v4l2_event event; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_v4l2_format_data *user_fmt; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - if (WARN_ON(!sp->vb2_q.drv_priv)) - return -ENOMEM; - - memcpy(sp->vb2_q.drv_priv, pfmt->fmt.raw_data, - sizeof(struct msm_v4l2_format_data)); - user_fmt = (struct msm_v4l2_format_data *)sp->vb2_q.drv_priv; - - pr_debug("%s: num planes :%c\n", __func__, - user_fmt->num_planes); - /*num_planes need to bound checked, otherwise for loop - can execute forever */ - if (WARN_ON(user_fmt->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - for (i = 0; i < user_fmt->num_planes; i++) - pr_debug("%s: plane size[%d]\n", __func__, - user_fmt->plane_sizes[i]); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - if (rc < 0) - return rc; - - sp->is_vb2_valid = 1; - } - - return rc; - -} - -static int camera_v4l2_try_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - return 0; -} - - -static int camera_v4l2_g_parm(struct file *filep, void *fh, - struct v4l2_streamparm *a) -{ - /* TODO */ - return 0; -} - -static int camera_v4l2_s_parm(struct file *filep, void *fh, - struct v4l2_streamparm *parm) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_NEW_STREAM, -1, &event); - - rc = msm_create_stream(event_data->session_id, - event_data->stream_id, &sp->vb2_q); - if (rc < 0) - return rc; - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - goto error; - - rc = camera_check_event_status(&event); - if (rc < 0) - goto error; - - /* use stream_id as stream index */ - parm->parm.capture.extendedmode = sp->stream_id; - - return rc; - -error: - msm_delete_stream(event_data->session_id, - event_data->stream_id); - return rc; -} - -static int camera_v4l2_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_subscribe(&sp->fh, sub, 5, NULL); - - return rc; -} - -static int camera_v4l2_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_unsubscribe(&sp->fh, sub); - - return rc; -} - -static const struct v4l2_ioctl_ops camera_v4l2_ioctl_ops = { - .vidioc_querycap = camera_v4l2_querycap, - .vidioc_s_crop = camera_v4l2_s_crop, - .vidioc_g_crop = camera_v4l2_g_crop, - .vidioc_queryctrl = camera_v4l2_queryctrl, - .vidioc_g_ctrl = camera_v4l2_g_ctrl, - .vidioc_s_ctrl = camera_v4l2_s_ctrl, - .vidioc_reqbufs = camera_v4l2_reqbufs, - .vidioc_querybuf = camera_v4l2_querybuf, - .vidioc_qbuf = camera_v4l2_qbuf, - .vidioc_dqbuf = camera_v4l2_dqbuf, - .vidioc_streamon = camera_v4l2_streamon, - .vidioc_streamoff = camera_v4l2_streamoff, - .vidioc_g_fmt_vid_cap_mplane = camera_v4l2_g_fmt_vid_cap_mplane, - .vidioc_s_fmt_vid_cap_mplane = camera_v4l2_s_fmt_vid_cap_mplane, - .vidioc_try_fmt_vid_cap_mplane = camera_v4l2_try_fmt_vid_cap_mplane, - - /* Stream type-dependent parameter ioctls */ - .vidioc_g_parm = camera_v4l2_g_parm, - .vidioc_s_parm = camera_v4l2_s_parm, - - /* event subscribe/unsubscribe */ - .vidioc_subscribe_event = camera_v4l2_subscribe_event, - .vidioc_unsubscribe_event = camera_v4l2_unsubscribe_event, -}; - -static int camera_v4l2_fh_open(struct file *filep) -{ - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp; - unsigned int stream_id; - - sp = kzalloc(sizeof(*sp), GFP_KERNEL); - if (!sp) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - filep->private_data = &sp->fh; - - /* stream_id = open id */ - stream_id = atomic_read(&pvdev->opened); - sp->stream_id = find_first_zero_bit( - &stream_id, MSM_CAMERA_STREAM_CNT_BITS); - pr_debug("%s: Found stream_id=%d\n", __func__, sp->stream_id); - - v4l2_fh_init(&sp->fh, pvdev->vdev); - v4l2_fh_add(&sp->fh); - - return 0; -} - -static int camera_v4l2_fh_release(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - if (sp) { - v4l2_fh_del(&sp->fh); - v4l2_fh_exit(&sp->fh); - } - - kzfree(sp); - return 0; -} - -static int camera_v4l2_vb2_q_init(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - struct vb2_queue *q = &sp->vb2_q; - - memset(q, 0, sizeof(struct vb2_queue)); - - /* free up this buffer when stream is done */ - q->drv_priv = - kzalloc(sizeof(struct msm_v4l2_format_data), GFP_KERNEL); - if (!q->drv_priv) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - q->mem_ops = msm_vb2_get_q_mem_ops(); - q->ops = msm_vb2_get_q_ops(); - - /* default queue type */ - q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - q->io_modes = VB2_USERPTR; - q->io_flags = 0; - q->buf_struct_size = sizeof(struct msm_vb2_buffer); - q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - return vb2_queue_init(q); -} - -static void camera_v4l2_vb2_q_release(struct file *filep) -{ - struct camera_v4l2_private *sp = filep->private_data; - - kzfree(sp->vb2_q.drv_priv); - vb2_queue_release(&sp->vb2_q); -} - -static int camera_v4l2_open(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int opn_idx, idx; - BUG_ON(!pvdev); - - rc = camera_v4l2_fh_open(filep); - if (rc < 0) { - pr_err("%s : camera_v4l2_fh_open failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto fh_open_fail; - } - - opn_idx = atomic_read(&pvdev->opened); - idx = opn_idx; - /* every stream has a vb2 queue */ - rc = camera_v4l2_vb2_q_init(filep); - if (rc < 0) { - pr_err("%s : vb2 queue init fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto vb2_q_fail; - } - - if (!atomic_read(&pvdev->opened)) { - pm_stay_awake(&pvdev->vdev->dev); - -#ifndef CONFIG_ARCH_MSM8939 - /* Disable power collapse latency */ - msm_pm_qos_update_request(CAMERA_DISABLE_PC_LATENCY); -#endif - - /* create a new session when first opened */ - rc = msm_create_session(pvdev->vdev->num, pvdev->vdev); - if (rc < 0) { - pr_err("%s : session creation failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed\n", - __func__); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto command_ack_q_fail; - } - - camera_pack_event(filep, MSM_CAMERA_NEW_SESSION, 0, -1, &event); - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) { - pr_err("%s : posting of NEW_SESSION event failed\n", - __func__); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto post_fail; - } - - rc = camera_check_event_status(&event); - if (rc < 0) { - pr_err("%s : checking event status fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto post_fail; - } - } else { - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - } - pr_debug("%s: Open stream_id=%d\n", __func__, - find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - idx |= (1 << find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - atomic_cmpxchg(&pvdev->opened, opn_idx, idx); - return rc; - -post_fail: - msm_delete_command_ack_q(pvdev->vdev->num, 0); -command_ack_q_fail: - msm_destroy_session(pvdev->vdev->num); -session_fail: - pm_relax(&pvdev->vdev->dev); - camera_v4l2_vb2_q_release(filep); -vb2_q_fail: - camera_v4l2_fh_release(filep); -fh_open_fail: - return rc; -} - -static unsigned int camera_v4l2_poll(struct file *filep, - struct poll_table_struct *wait) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - if (sp->is_vb2_valid == 1) - rc = vb2_poll(&sp->vb2_q, filep, wait); - - poll_wait(filep, &sp->fh.wait, wait); - if (v4l2_event_pending(&sp->fh)) - rc |= POLLPRI; - - return rc; -} - -static int camera_v4l2_close(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - unsigned int opn_idx, mask; - BUG_ON(!pvdev); - - opn_idx = atomic_read(&pvdev->opened); - pr_debug("%s: close stream_id=%d\n", __func__, sp->stream_id); - mask = (1 << sp->stream_id); - opn_idx &= ~mask; - atomic_set(&pvdev->opened, opn_idx); - - if (atomic_read(&pvdev->opened) == 0) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - - camera_pack_event(filep, MSM_CAMERA_DEL_SESSION, 0, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, 0); - - /* This should take care of both normal close - * and application crashes */ - msm_destroy_session(pvdev->vdev->num); - -#ifndef CONFIG_ARCH_MSM8939 - /* Enable power collapse latency */ - msm_pm_qos_update_request(CAMERA_ENABLE_PC_LATENCY); -#endif - - pm_relax(&pvdev->vdev->dev); - } else { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, - sp->stream_id); - - msm_delete_stream(pvdev->vdev->num, sp->stream_id); - } - - camera_v4l2_vb2_q_release(filep); - camera_v4l2_fh_release(filep); - - return rc; -} - -#ifdef CONFIG_COMPAT -long camera_v4l2_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return -ENOIOCTLCMD; -} -#endif -static struct v4l2_file_operations camera_v4l2_fops = { - .owner = THIS_MODULE, - .open = camera_v4l2_open, - .poll = camera_v4l2_poll, - .release = camera_v4l2_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = camera_v4l2_compat_ioctl, -#endif -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session) -{ - struct msm_video_device *pvdev; - struct v4l2_device *v4l2_dev; - int rc = 0; - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto init_end; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - - v4l2_dev = kzalloc(sizeof(struct v4l2_device), GFP_KERNEL); - if (WARN_ON(!v4l2_dev)) { - rc = -ENOMEM; - goto v4l2_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(v4l2_dev->mdev->model, MSM_CAMERA_NAME, - sizeof(v4l2_dev->mdev->model)); - - v4l2_dev->mdev->dev = dev; - - rc = media_device_register(v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - rc = media_entity_init(&pvdev->vdev->entity, 0, NULL, 0); - if (WARN_ON(rc < 0)) - goto entity_fail; - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - v4l2_dev->notify = NULL; - pvdev->vdev->v4l2_dev = v4l2_dev; - - rc = v4l2_device_register(dev, pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-sensor", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &camera_v4l2_fops; - pvdev->vdev->ioctl_ops = &camera_v4l2_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto video_register_fail; -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - *session = pvdev->vdev->num; - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - device_init_wakeup(&pvdev->vdev->dev, 1); - goto init_end; - -video_register_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(v4l2_dev->mdev); -media_fail: - kzfree(v4l2_dev->mdev); -mdev_fail: -#endif - kzfree(v4l2_dev); -v4l2_fail: - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -init_end: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.h b/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.h deleted file mode 100644 index ac860a4f87d6..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/camera/camera.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _CAMERA_H -#define _CAMERA_H - -enum stream_state { - START_STREAM = 0, - STOP_STREAM, -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session); - -#endif /*_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/fd/Makefile deleted file mode 100644 index 757c84e8e08a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) -ccflags-y += -Idrivers/media/video/msm - -obj-$(CONFIG_MSM_FD) += msm_fd_dev.o msm_fd_hw.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.c b/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.c deleted file mode 100644 index 148901d46330..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.c +++ /dev/null @@ -1,1386 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_fd_dev.h" -#include "msm_fd_hw.h" -#include "msm_fd_regs.h" - -#define MSM_FD_DRV_NAME "msm_fd" - -#define MSM_FD_WORD_SIZE_BYTES 4 - -/* Face detection thresholds definitions */ -#define MSM_FD_DEF_THRESHOLD 5 -#define MSM_FD_MAX_THRESHOLD_VALUE 9 - -/* Face angle lookup table */ -#define MSM_FD_DEF_ANGLE_IDX 2 -static int msm_fd_angle[] = {45, 135, 359}; - -/* Face direction lookup table */ -#define MSM_FD_DEF_DIR_IDX 0 -static int msm_fd_dir[] = {0, 90, 270, 180}; - -/* Minimum face size lookup table */ -#define MSM_FD_DEF_MIN_SIZE_IDX 0 -static int msm_fd_min_size[] = {20, 25, 32, 40}; - -/* Face detection size lookup table */ -static struct msm_fd_size fd_size[] = { - { - .width = 320, - .height = 240, - .reg_val = MSM_FD_IMAGE_SIZE_QVGA, - .work_size = (13120 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 427, - .height = 240, - .reg_val = MSM_FD_IMAGE_SIZE_WQVGA, - .work_size = (17744 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 640, - .height = 480, - .reg_val = MSM_FD_IMAGE_SIZE_VGA, - .work_size = (52624 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 854, - .height = 480, - .reg_val = MSM_FD_IMAGE_SIZE_WVGA, - .work_size = (70560 * MSM_FD_WORD_SIZE_BYTES), - }, -}; - -/* - * msm_fd_ctx_from_fh - Get fd context from v4l2 fh. - * @fh: Pointer to v4l2 fh. - */ -static inline struct fd_ctx *msm_fd_ctx_from_fh(struct v4l2_fh *fh) -{ - return container_of(fh, struct fd_ctx, fh); -} - -/* - * msm_fd_get_format_index - Get format index from v4l2 format. - * @f: Pointer to v4l2 format struct. - */ -static int msm_fd_get_format_index(struct v4l2_format *f) -{ - int index; - - for (index = 0; index < ARRAY_SIZE(fd_size); index++) { - if (f->fmt.pix.width <= fd_size[index].width && - f->fmt.pix.height <= fd_size[index].height) - return index; - } - return index - 1; -} - -/* - * msm_fd_get_idx_from_value - Get array index from value. - * @value: Value for which index is needed. - * @array: Array in which index is searched for. - * @array_size: Array size. - */ -static int msm_fd_get_idx_from_value(int value, int *array, int array_size) -{ - int index; - int i; - - index = 0; - for (i = 1; i < array_size; i++) { - if (value == array[i]) { - index = i; - break; - } - if (abs(value - array[i]) < abs(value - array[index])) - index = i; - } - return index; -} - -/* - * msm_fd_fill_format_from_index - Fill v4l2 format struct from size index. - * @f: Pointer of v4l2 struct which will be filled. - * @index: Size index (Format will be filled based on this index). - */ -static int msm_fd_fill_format_from_index(struct v4l2_format *f, int index) -{ - f->fmt.pix.width = fd_size[index].width; - f->fmt.pix.height = fd_size[index].height; - f->fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; - if (f->fmt.pix.bytesperline < f->fmt.pix.width) - f->fmt.pix.bytesperline = f->fmt.pix.width; - - f->fmt.pix.bytesperline = ALIGN(f->fmt.pix.bytesperline, 16); - f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * f->fmt.pix.height; - f->fmt.pix.field = V4L2_FIELD_NONE; - - return 0; -} - -/* - * msm_fd_fill_format_from_ctx - Fill v4l2 format struct from fd context. - * @f: Pointer of v4l2 struct which will be filled. - * @c: Pointer to fd context. - */ -static int msm_fd_fill_format_from_ctx(struct v4l2_format *f, struct fd_ctx *c) -{ - if (NULL == c->format.size) - return -EINVAL; - - f->fmt.pix.width = c->format.size->width; - f->fmt.pix.height = c->format.size->height; - f->fmt.pix.pixelformat = c->format.pixelformat; - f->fmt.pix.bytesperline = c->format.bytesperline; - f->fmt.pix.sizeimage = c->format.sizeimage; - f->fmt.pix.field = V4L2_FIELD_NONE; - - return 0; -} - -/* - * msm_fd_queue_setup - vb2_ops queue_setup callback. - * @q: Pointer to vb2 queue struct. - * @fmt: Pointer to v4l2 format struct (NULL is valid argument). - * @num_buffers: Pointer of number of buffers requested. - * @num_planes: Pointer to number of planes requested. - * @sizes: Array containing sizes of planes. - * @alloc_ctxs: Array of allocated contexts for each plane. - */ -static int msm_fd_queue_setup(struct vb2_queue *q, - const struct v4l2_format *fmt, - unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - - *num_planes = 1; - - if (NULL == fmt) - sizes[0] = ctx->format.sizeimage; - else - sizes[0] = fmt->fmt.pix.sizeimage; - - alloc_ctxs[0] = &ctx->mem_pool; - - return 0; -} - -/* - * msm_fd_buf_init - vb2_ops buf_init callback. - * @vb: Pointer to vb2 buffer struct. - */ -int msm_fd_buf_init(struct vb2_buffer *vb) -{ - struct msm_fd_buffer *fd_buffer = - (struct msm_fd_buffer *)vb; - - INIT_LIST_HEAD(&fd_buffer->list); - atomic_set(&fd_buffer->active, 0); - - return 0; -} - -/* - * msm_fd_buf_queue - vb2_ops buf_queue callback. - * @vb: Pointer to vb2 buffer struct. - */ -static void msm_fd_buf_queue(struct vb2_buffer *vb) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue); - struct msm_fd_buffer *fd_buffer = - (struct msm_fd_buffer *)vb; - - fd_buffer->format = ctx->format; - fd_buffer->settings = ctx->settings; - fd_buffer->work_addr = ctx->work_buf.addr; - msm_fd_hw_add_buffer(ctx->fd_device, fd_buffer); - - if (vb->vb2_queue->streaming) - msm_fd_hw_schedule_and_start(ctx->fd_device); - - return; -} - -/* - * msm_fd_start_streaming - vb2_ops start_streaming callback. - * @q: Pointer to vb2 queue struct. - * @count: Number of buffer queued before stream on call. - */ -static int msm_fd_start_streaming(struct vb2_queue *q, unsigned int count) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - int ret; - - if (!ctx->work_buf.handle) { - dev_err(ctx->fd_device->dev, "Missing working buffer\n"); - return -EINVAL; - } - - ret = msm_fd_hw_get(ctx->fd_device, ctx->settings.speed); - if (ret < 0) { - dev_err(ctx->fd_device->dev, "Can not acquire fd hw\n"); - goto out; - } - - ret = msm_fd_hw_schedule_and_start(ctx->fd_device); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Can not start fd hw\n"); - -out: - return ret; -} - -/* - * msm_fd_stop_streaming - vb2_ops stop_streaming callback. - * @q: Pointer to vb2 queue struct. - */ -static int msm_fd_stop_streaming(struct vb2_queue *q) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - - msm_fd_hw_remove_buffers_from_queue(ctx->fd_device, q); - msm_fd_hw_put(ctx->fd_device); - - return 0; -} - -/* Videobuf2 queue callbacks. */ -static struct vb2_ops msm_fd_vb2_q_ops = { - .queue_setup = msm_fd_queue_setup, - .buf_init = msm_fd_buf_init, - .buf_queue = msm_fd_buf_queue, - .start_streaming = msm_fd_start_streaming, - .stop_streaming = msm_fd_stop_streaming, -}; - -/* - * msm_fd_get_userptr - Map and get buffer handler for user pointer buffer. - * @alloc_ctx: Contexts allocated in buf_setup. - * @vaddr: Virtual addr passed from userpsace (in our case ion fd) - * @size: Size of the buffer - * @write: True if buffer will be used for writing the data. - */ -static void *msm_fd_get_userptr(void *alloc_ctx, - unsigned long vaddr, unsigned long size, int write) -{ - struct msm_fd_mem_pool *pool = alloc_ctx; - struct msm_fd_buf_handle *buf; - int ret; - - buf = kzalloc(sizeof(*buf), GFP_KERNEL); - if (!buf) - return ERR_PTR(-ENOMEM); - - ret = msm_fd_hw_map_buffer(pool, vaddr, buf); - if (ret < 0 || buf->size < size) - goto error; - - return buf; -error: - kzfree(buf); - return ERR_PTR(-ENOMEM); -} - -/* - * msm_fd_put_userptr - Unmap and free buffer handler. - * @buf_priv: Buffer handler allocated get_userptr callback. - */ -static void msm_fd_put_userptr(void *buf_priv) -{ - if (IS_ERR_OR_NULL(buf_priv)) - return; - - msm_fd_hw_unmap_buffer(buf_priv); - - kzfree(buf_priv); -} - -/* Videobuf2 memory callbacks. */ -static struct vb2_mem_ops msm_fd_vb2_mem_ops = { - .get_userptr = msm_fd_get_userptr, - .put_userptr = msm_fd_put_userptr, -}; - -/* - * msm_fd_open - Fd device open method. - * @file: Pointer to file struct. - */ -static int msm_fd_open(struct file *file) -{ - struct msm_fd_device *device = video_drvdata(file); - struct video_device *video = video_devdata(file); - struct fd_ctx *ctx; - int ret; - - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; - - ctx->fd_device = device; - - /* Initialize work buffer handler */ - ctx->work_buf.pool = NULL; - ctx->work_buf.fd = -1; - - /* Set ctx defaults */ - ctx->settings.speed = ctx->fd_device->clk_rates_num; - ctx->settings.angle_index = MSM_FD_DEF_ANGLE_IDX; - ctx->settings.direction_index = MSM_FD_DEF_DIR_IDX; - ctx->settings.min_size_index = MSM_FD_DEF_MIN_SIZE_IDX; - ctx->settings.threshold = MSM_FD_DEF_THRESHOLD; - - atomic_set(&ctx->subscribed_for_event, 0); - - v4l2_fh_init(&ctx->fh, video); - - file->private_data = &ctx->fh; - v4l2_fh_add(&ctx->fh); - - ctx->vb2_q.drv_priv = ctx; - ctx->vb2_q.mem_ops = &msm_fd_vb2_mem_ops; - ctx->vb2_q.ops = &msm_fd_vb2_q_ops; - ctx->vb2_q.buf_struct_size = sizeof(struct msm_fd_buffer); - ctx->vb2_q.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; - ctx->vb2_q.io_modes = VB2_USERPTR; - ctx->vb2_q.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY; - ret = vb2_queue_init(&ctx->vb2_q); - if (ret < 0) { - dev_err(device->dev, "Error queue init\n"); - goto error_vb2_queue_init; - } - - ctx->mem_pool.client = msm_ion_client_create(MSM_FD_DRV_NAME); - if (IS_ERR_OR_NULL(ctx->mem_pool.client)) { - dev_err(device->dev, "Error ion client create\n"); - goto error_ion_client_create; - } - ctx->mem_pool.fd_device = ctx->fd_device; - ctx->mem_pool.domain_num = ctx->fd_device->iommu_domain_num; - - ctx->stats = vmalloc(sizeof(*ctx->stats) * MSM_FD_MAX_RESULT_BUFS); - if (!ctx->stats) { - dev_err(device->dev, "No memory for face statistics\n"); - ret = -ENOMEM; - goto error_stats_vmalloc; - } - - return 0; - -error_stats_vmalloc: - ion_client_destroy(ctx->mem_pool.client); -error_ion_client_create: - vb2_queue_release(&ctx->vb2_q); -error_vb2_queue_init: - v4l2_fh_del(&ctx->fh); - v4l2_fh_exit(&ctx->fh); - kfree(ctx); - return ret; -} - -/* - * msm_fd_release - Fd device release method. - * @file: Pointer to file struct. - */ -static int msm_fd_release(struct file *file) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(file->private_data); - - vb2_queue_release(&ctx->vb2_q); - - vfree(ctx->stats); - - if (ctx->work_buf.handle) - msm_fd_hw_unmap_buffer(&ctx->work_buf); - - ion_client_destroy(ctx->mem_pool.client); - - v4l2_fh_del(&ctx->fh); - v4l2_fh_exit(&ctx->fh); - - kfree(ctx); - - return 0; -} - -/* - * msm_fd_poll - Fd device pool method. - * @file: Pointer to file struct. - * @wait: Pointer to pool table struct. - */ -static unsigned int msm_fd_poll(struct file *file, - struct poll_table_struct *wait) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(file->private_data); - unsigned int ret; - - ret = vb2_poll(&ctx->vb2_q, file, wait); - - if (atomic_read(&ctx->subscribed_for_event)) { - poll_wait(file, &ctx->fh.wait, wait); - if (v4l2_event_pending(&ctx->fh)) - ret |= POLLPRI; - } - - return ret; -} - -/* - * msm_fd_private_ioctl - V4l2 private ioctl handler. - * @file: Pointer to file struct. - * @fd: V4l2 device file handle. - * @valid_prio: Priority ioctl valid flag. - * @cmd: Ioctl command. - * @arg: Ioctl argument. - */ -static long msm_fd_private_ioctl(struct file *file, void *fh, - bool valid_prio, unsigned int cmd, void *arg) -{ - struct msm_fd_result *req_result = arg; - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - struct msm_fd_stats *stats; - int stats_idx; - int ret; - int i; - - switch (cmd) { - case VIDIOC_MSM_FD_GET_RESULT: - if (req_result->frame_id == 0) { - dev_err(ctx->fd_device->dev, "Invalid frame id\n"); - return -EINVAL; - } - - stats_idx = req_result->frame_id % MSM_FD_MAX_RESULT_BUFS; - stats = &ctx->stats[stats_idx]; - if (req_result->frame_id != atomic_read(&stats->frame_id)) { - dev_err(ctx->fd_device->dev, "Stats not available\n"); - return -EINVAL; - } - - if (req_result->face_cnt > stats->face_cnt) - req_result->face_cnt = stats->face_cnt; - - for (i = 0; i < req_result->face_cnt; i++) { - ret = copy_to_user((void __user *) - &req_result->face_data[i], - &stats->face_data[i], - sizeof(struct msm_fd_face_data)); - if (ret) { - dev_err(ctx->fd_device->dev, "Copy to user\n"); - return -EFAULT; - } - } - - if (req_result->frame_id != atomic_read(&stats->frame_id)) { - dev_err(ctx->fd_device->dev, "Erroneous buffer\n"); - return -EINVAL; - } - break; - default: - dev_err(ctx->fd_device->dev, "Wrong ioctl type %x\n", cmd); - ret = -ENOTTY; - break; - } - - return ret; -} - -#ifdef CONFIG_COMPAT -/* - * msm_fd_compat_ioctl32 - Compat ioctl handler function. - * @file: Pointer to file struct. - * @cmd: Ioctl command. - * @arg: Ioctl argument. - */ -static long msm_fd_compat_ioctl32(struct file *file, - unsigned int cmd, unsigned long arg) -{ - long ret; - - switch (cmd) { - case VIDIOC_MSM_FD_GET_RESULT32: - { - struct msm_fd_result32 result32; - struct msm_fd_result result; - - if (copy_from_user(&result32, (void __user *)arg, - sizeof(result32))) - return -EFAULT; - - result.frame_id = result32.frame_id; - result.face_cnt = result32.face_cnt; - result.face_data = compat_ptr(result32.face_data); - - ret = msm_fd_private_ioctl(file, file->private_data, - 0, VIDIOC_MSM_FD_GET_RESULT, (void *)&result); - - result32.frame_id = result.frame_id; - result32.face_cnt = result.face_cnt; - - if (copy_to_user((void __user *)arg, &result32, - sizeof(result32))) - return -EFAULT; - - break; - } - default: - ret = -ENOIOCTLCMD; - break; - - } - - return ret; -} -#endif - -/* Fd device file operations callbacks */ -static const struct v4l2_file_operations fd_fops = { - .owner = THIS_MODULE, - .open = msm_fd_open, - .release = msm_fd_release, - .poll = msm_fd_poll, - .unlocked_ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = msm_fd_compat_ioctl32, -#endif -}; - -/* - * msm_fd_querycap - V4l2 ioctl query capability handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @cap: Pointer to v4l2_capability struct need to be filled. - */ -static int msm_fd_querycap(struct file *file, - void *fh, struct v4l2_capability *cap) -{ - cap->bus_info[0] = 0; - strlcpy(cap->driver, MSM_FD_DRV_NAME, sizeof(cap->driver)); - strlcpy(cap->card, MSM_FD_DRV_NAME, sizeof(cap->card)); - cap->capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT; - - return 0; -} - -/* - * msm_fd_enum_fmt_vid_out - V4l2 ioctl enumerate format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_fmtdesc struct need to be filled. - */ -static int msm_fd_enum_fmt_vid_out(struct file *file, - void *fh, struct v4l2_fmtdesc *f) -{ - if (f->index > 0) - return -EINVAL; - - f->pixelformat = V4L2_PIX_FMT_GREY; - strlcpy(f->description, "8 Greyscale", - sizeof(f->description)); - - return 0; -} - -/* - * msm_fd_g_fmt - V4l2 ioctl get format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct need to be filled. - */ -static int msm_fd_g_fmt(struct file *file, void *fh, struct v4l2_format *f) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return msm_fd_fill_format_from_ctx(f, ctx); -} - -/* - * msm_fd_try_fmt_vid_out - V4l2 ioctl try format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct. - */ -static int msm_fd_try_fmt_vid_out(struct file *file, - void *fh, struct v4l2_format *f) -{ - int index; - - index = msm_fd_get_format_index(f); - - return msm_fd_fill_format_from_index(f, index); -} - -/* - * msm_fd_s_fmt_vid_out - V4l2 ioctl set format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct. - */ -static int msm_fd_s_fmt_vid_out(struct file *file, - void *fh, struct v4l2_format *f) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int index; - - index = msm_fd_get_format_index(f); - - msm_fd_fill_format_from_index(f, index); - - ctx->format.size = &fd_size[index]; - ctx->format.pixelformat = f->fmt.pix.pixelformat; - ctx->format.bytesperline = f->fmt.pix.bytesperline; - ctx->format.sizeimage = f->fmt.pix.sizeimage; - - /* Initialize crop */ - ctx->format.crop.top = 0; - ctx->format.crop.left = 0; - ctx->format.crop.width = fd_size[index].width; - ctx->format.crop.height = fd_size[index].height; - - return 0; -} - -/* - * msm_fd_reqbufs - V4l2 ioctl request buffers handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @req: Pointer to v4l2_requestbuffer struct. - */ -static int msm_fd_reqbufs(struct file *file, - void *fh, struct v4l2_requestbuffers *req) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_reqbufs(&ctx->vb2_q, req); -} - -/* - * msm_fd_qbuf - V4l2 ioctl queue buffer handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @pb: Pointer to v4l2_buffer struct. - */ -static int msm_fd_qbuf(struct file *file, void *fh, - struct v4l2_buffer *pb) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_qbuf(&ctx->vb2_q, pb); -} - -/* - * msm_fd_dqbuf - V4l2 ioctl dequeue buffer handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @pb: Pointer to v4l2_buffer struct. - */ -static int msm_fd_dqbuf(struct file *file, - void *fh, struct v4l2_buffer *pb) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); -} - -/* - * msm_fd_streamon - V4l2 ioctl stream on handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @buf_type: V4l2 buffer type. - */ -static int msm_fd_streamon(struct file *file, - void *fh, enum v4l2_buf_type buf_type) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = vb2_streamon(&ctx->vb2_q, buf_type); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Stream on fails\n"); - - return ret; -} - -/* - * msm_fd_streamoff - V4l2 ioctl stream off handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @buf_type: V4l2 buffer type. - */ -static int msm_fd_streamoff(struct file *file, - void *fh, enum v4l2_buf_type buf_type) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = vb2_streamoff(&ctx->vb2_q, buf_type); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Stream off fails\n"); - - return ret; -} - -/* - * msm_fd_subscribe_event - V4l2 ioctl subscribe for event handler. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_event_subscription containing event information. - */ -static int msm_fd_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - if (sub->type != MSM_EVENT_FD) - return -EINVAL; - - ret = v4l2_event_subscribe(fh, sub, MSM_FD_MAX_RESULT_BUFS, NULL); - if (!ret) - atomic_set(&ctx->subscribed_for_event, 1); - - return ret; -} - -/* - * msm_fd_unsubscribe_event - V4l2 ioctl unsubscribe from event handler. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_event_subscription containing event information. - */ -static int msm_fd_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = v4l2_event_unsubscribe(fh, sub); - if (!ret) - atomic_set(&ctx->subscribed_for_event, 0); - - return ret; -} - -/* - * msm_fd_guery_ctrl - V4l2 ioctl query control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct info need to be filled based on id. - */ -static int msm_fd_guery_ctrl(struct file *file, void *fh, - struct v4l2_queryctrl *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - switch (a->id) { - case V4L2_CID_FD_SPEED: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = ctx->fd_device->clk_rates_num; - a->minimum = 0; - a->maximum = ctx->fd_device->clk_rates_num; - a->step = 1; - strlcpy(a->name, "msm fd face speed idx", - sizeof(a->name)); - case V4L2_CID_FD_FACE_ANGLE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_angle[MSM_FD_DEF_ANGLE_IDX]; - a->minimum = msm_fd_angle[0]; - a->maximum = msm_fd_angle[ARRAY_SIZE(msm_fd_angle) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd face angle ctrl", - sizeof(a->name)); - break; - case V4L2_CID_FD_FACE_DIRECTION: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_dir[MSM_FD_DEF_DIR_IDX]; - a->minimum = msm_fd_dir[0]; - a->maximum = msm_fd_dir[ARRAY_SIZE(msm_fd_dir) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd face direction ctrl", - sizeof(a->name)); - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_min_size[MSM_FD_DEF_MIN_SIZE_IDX]; - a->minimum = msm_fd_min_size[0]; - a->maximum = msm_fd_min_size[ARRAY_SIZE(msm_fd_min_size) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd minimum face size (pixels)", - sizeof(a->name)); - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = MSM_FD_DEF_THRESHOLD; - a->minimum = 0; - a->maximum = MSM_FD_MAX_THRESHOLD_VALUE; - a->step = 1; - strlcpy(a->name, "msm fd detection threshold", - sizeof(a->name)); - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = fd_size[0].work_size; - a->minimum = fd_size[(ARRAY_SIZE(fd_size) - 1)].work_size; - a->maximum = fd_size[0].work_size; - a->step = 1; - strlcpy(a->name, "msm fd working memory size", - sizeof(a->name)); - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = -1; - a->minimum = 0; - a->maximum = INT_MAX; - a->step = 1; - strlcpy(a->name, "msm fd ion fd of working memory", - sizeof(a->name)); - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_g_ctrl - V4l2 ioctl get control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct need to be filled. - */ -static int msm_fd_g_ctrl(struct file *file, void *fh, struct v4l2_control *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - switch (a->id) { - case V4L2_CID_FD_SPEED: - a->value = ctx->settings.speed; - break; - case V4L2_CID_FD_FACE_ANGLE: - a->value = msm_fd_angle[ctx->settings.angle_index]; - break; - case V4L2_CID_FD_FACE_DIRECTION: - a->value = msm_fd_dir[ctx->settings.direction_index]; - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - a->value = msm_fd_min_size[ctx->settings.min_size_index]; - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - a->value = ctx->settings.threshold; - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - if (!ctx->format.size) - return -EINVAL; - - a->value = ctx->format.size->work_size; - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - if (!ctx->work_buf.handle) - return -EINVAL; - - a->value = ctx->work_buf.fd; - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_s_ctrl - V4l2 ioctl set control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct need to be set. - */ -static int msm_fd_s_ctrl(struct file *file, void *fh, struct v4l2_control *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int idx; - int ret; - - switch (a->id) { - case V4L2_CID_FD_SPEED: - if (a->value > ctx->fd_device->clk_rates_num) - a->value = ctx->fd_device->clk_rates_num; - else if (a->value < 0) - a->value = 0; - - ctx->settings.speed = a->value; - break; - case V4L2_CID_FD_FACE_ANGLE: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_angle, - ARRAY_SIZE(msm_fd_angle)); - - ctx->settings.angle_index = idx; - a->value = msm_fd_angle[ctx->settings.angle_index]; - break; - case V4L2_CID_FD_FACE_DIRECTION: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_dir, - ARRAY_SIZE(msm_fd_dir)); - - ctx->settings.direction_index = idx; - a->value = msm_fd_dir[ctx->settings.direction_index]; - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_min_size, - ARRAY_SIZE(msm_fd_min_size)); - - ctx->settings.min_size_index = idx; - a->value = msm_fd_min_size[ctx->settings.min_size_index]; - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - if (a->value > MSM_FD_MAX_THRESHOLD_VALUE) - a->value = MSM_FD_MAX_THRESHOLD_VALUE; - else if (a->value < 0) - a->value = 0; - - ctx->settings.threshold = a->value; - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - if (!ctx->format.size) - return -EINVAL; - - if (a->value < ctx->format.size->work_size) - a->value = ctx->format.size->work_size; - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - if (ctx->work_buf.handle) - msm_fd_hw_unmap_buffer(&ctx->work_buf); - - if (a->value >= 0) { - ret = msm_fd_hw_map_buffer(&ctx->mem_pool, - a->value, &ctx->work_buf); - if (ret < 0) - return ret; - } - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_cropcap - V4l2 ioctl crop capabilites. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_cropcap struct need to be set. - */ -static int msm_fd_cropcap(struct file *file, void *fh, struct v4l2_cropcap *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Cropcap fails format missing\n"); - return -EINVAL; - } - - a->bounds.top = 0; - a->bounds.left = 0; - a->bounds.width = ctx->format.size->width; - a->bounds.height = ctx->format.size->height; - - a->defrect = ctx->format.crop; - - a->pixelaspect.numerator = 1; - a->pixelaspect.denominator = 1; - - return 0; -} - -/* - * msm_fd_g_crop - V4l2 ioctl get crop. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_crop struct need to be set. - */ -static int msm_fd_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Get crop, format missing!\n"); - return -EINVAL; - } - - crop->c = ctx->format.crop; - - return 0; -} - -/* - * msm_fd_s_crop - V4l2 ioctl set crop. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_crop struct need to be set. - */ -static int msm_fd_s_crop(struct file *file, void *fh, - const struct v4l2_crop *crop) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int min_face_size; - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Get crop, format missing!\n"); - return -EINVAL; - } - - /* First check that crop is valid */ - min_face_size = msm_fd_min_size[ctx->settings.min_size_index]; - - if (crop->c.width < min_face_size || crop->c.height < min_face_size) - return -EINVAL; - - if (crop->c.width + crop->c.left > ctx->format.size->width) - return -EINVAL; - - if (crop->c.height + crop->c.top > ctx->format.size->height) - return -EINVAL; - - ctx->format.crop = crop->c; - - return 0; -} - -/* V4l2 ioctl handlers */ -static const struct v4l2_ioctl_ops fd_ioctl_ops = { - .vidioc_querycap = msm_fd_querycap, - .vidioc_enum_fmt_vid_out = msm_fd_enum_fmt_vid_out, - .vidioc_g_fmt_vid_out = msm_fd_g_fmt, - .vidioc_try_fmt_vid_out = msm_fd_try_fmt_vid_out, - .vidioc_s_fmt_vid_out = msm_fd_s_fmt_vid_out, - .vidioc_reqbufs = msm_fd_reqbufs, - .vidioc_qbuf = msm_fd_qbuf, - .vidioc_dqbuf = msm_fd_dqbuf, - .vidioc_streamon = msm_fd_streamon, - .vidioc_streamoff = msm_fd_streamoff, - .vidioc_queryctrl = msm_fd_guery_ctrl, - .vidioc_s_ctrl = msm_fd_s_ctrl, - .vidioc_g_ctrl = msm_fd_g_ctrl, - .vidioc_cropcap = msm_fd_cropcap, - .vidioc_g_crop = msm_fd_g_crop, - .vidioc_s_crop = msm_fd_s_crop, - .vidioc_subscribe_event = msm_fd_subscribe_event, - .vidioc_unsubscribe_event = msm_fd_unsubscribe_event, - .vidioc_default = msm_fd_private_ioctl, -}; - -/* - * msm_fd_fill_results - Read and fill face detection result. - * @fd: Pointer to fd device. - * @face: Pointer of face data which information need to be stored. - * @idx: Face number index need to be filled. - */ -static void msm_fd_fill_results(struct msm_fd_device *fd, - struct msm_fd_face_data *face, int idx) -{ - int half_face_size; - - msm_fd_hw_get_result_angle_pose(fd, idx, &face->angle, &face->pose); - - msm_fd_hw_get_result_conf_size(fd, idx, &face->confidence, - &face->face.width); - face->face.height = face->face.width; - - face->face.left = msm_fd_hw_get_result_x(fd, idx); - face->face.top = msm_fd_hw_get_result_y(fd, idx); - - half_face_size = (face->face.width >> 1); - if (face->face.left > half_face_size) - face->face.left -= half_face_size; - else - face->face.left = 0; - - half_face_size = (face->face.height >> 1); - if (face->face.top > half_face_size) - face->face.top -= half_face_size; - else - face->face.top = 0; -} - -/* - * msm_fd_wq_handler - Fd device workqueue handler. - * @work: Pointer to work struct. - * - * This function is bottom half of fd irq what it does: - * - * - Stop the fd engine. - * - Getter fd result and store in stats buffer. - * - If available schedule next buffer for processing. - * - Sent event to v4l2. - * - Release buffer from v4l2 queue. - */ -static void msm_fd_wq_handler(struct work_struct *work) -{ - struct msm_fd_buffer *active_buf; - struct msm_fd_stats *stats; - struct msm_fd_event *fd_event; - struct msm_fd_device *fd; - struct fd_ctx *ctx; - struct v4l2_event event; - int i; - - fd = container_of(work, struct msm_fd_device, work); - - active_buf = msm_fd_hw_get_active_buffer(fd); - if (!active_buf) { - /* This should never happen, something completely wrong */ - dev_err(fd->dev, "Oops no active buffer empty queue\n"); - return; - } - ctx = vb2_get_drv_priv(active_buf->vb.vb2_queue); - - /* Increment sequence number, 0 means sequence is not valid */ - ctx->sequence++; - if (unlikely(!ctx->sequence)) - ctx->sequence = 1; - - /* Fill face detection statistics */ - stats = &ctx->stats[ctx->sequence % MSM_FD_MAX_RESULT_BUFS]; - - /* First mark stats as invalid */ - atomic_set(&stats->frame_id, 0); - - stats->face_cnt = msm_fd_hw_get_face_count(fd); - for (i = 0; i < stats->face_cnt; i++) - msm_fd_fill_results(fd, &stats->face_data[i], i); - - /* Stats are ready, set correct frame id */ - atomic_set(&stats->frame_id, ctx->sequence); - - /* We have the data from fd hw, we can start next processing */ - msm_fd_hw_schedule_next_buffer(fd); - - /* Sent event */ - memset(&event, 0x00, sizeof(event)); - event.type = MSM_EVENT_FD; - fd_event = (struct msm_fd_event *)event.u.data; - fd_event->face_cnt = stats->face_cnt; - fd_event->buf_index = active_buf->vb.v4l2_buf.index; - fd_event->frame_id = ctx->sequence; - v4l2_event_queue_fh(&ctx->fh, &event); - - /* Return buffer to vb queue */ - active_buf->vb.v4l2_buf.sequence = ctx->fh.sequence; - vb2_buffer_done(&active_buf->vb, VB2_BUF_STATE_DONE); - - /* Release buffer from the device */ - msm_fd_hw_buffer_done(fd, active_buf); -} - -/* - * msm_fd_irq - Fd device irq handler. - * @irq: Pointer to work struct. - * @dev_id: Pointer to fd device. - */ -static irqreturn_t msm_fd_irq(int irq, void *dev_id) -{ - struct msm_fd_device *fd = dev_id; - - if (msm_fd_hw_is_finished(fd)) - queue_work(fd->work_queue, &fd->work); - else - dev_err(fd->dev, "Something wrong! FD still running\n"); - - return IRQ_HANDLED; -} - -/* - * fd_probe - Fd device probe method. - * @pdev: Pointer fd platform device. - */ -static int fd_probe(struct platform_device *pdev) -{ - struct msm_fd_device *fd; - int ret; - - /* Face detection device struct */ - fd = kzalloc(sizeof(struct msm_fd_device), GFP_KERNEL); - if (!fd) - return -ENOMEM; - - mutex_init(&fd->lock); - spin_lock_init(&fd->slock); - fd->dev = &pdev->dev; - - /* Get resources */ - ret = msm_fd_hw_get_mem_resources(pdev, fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail get resources\n"); - ret = -ENODEV; - goto error_mem_resources; - } - - fd->vdd = regulator_get(&pdev->dev, "vdd"); - if (IS_ERR(fd->vdd)) { - dev_err(&pdev->dev, "Fail to get vdd regulator\n"); - ret = -ENODEV; - goto error_get_regulator; - } - - ret = msm_fd_hw_get_clocks(fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail to get clocks\n"); - goto error_get_clocks; - } - - ret = msm_fd_hw_get_iommu(fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail to get iommu\n"); - goto error_iommu_get; - } - - fd->irq_num = platform_get_irq(pdev, 0); - if (fd->irq_num < 0) { - dev_err(&pdev->dev, "Can not get fd irq resource\n"); - ret = -ENODEV; - goto error_irq_request; - } - - ret = devm_request_irq(&pdev->dev, fd->irq_num, msm_fd_irq, - IRQF_TRIGGER_RISING, dev_name(&pdev->dev), fd); - if (ret) { - dev_err(&pdev->dev, "Can not claim IRQ %d\n", fd->irq_num); - goto error_irq_request; - } - - fd->work_queue = alloc_workqueue(MSM_FD_DRV_NAME, - WQ_HIGHPRI | WQ_NON_REENTRANT | WQ_UNBOUND, 0); - if (!fd->work_queue) { - dev_err(&pdev->dev, "Can not register workqueue\n"); - ret = -ENOMEM; - goto error_alloc_workqueue; - } - INIT_WORK(&fd->work, msm_fd_wq_handler); - INIT_LIST_HEAD(&fd->buf_queue); - - /* v4l2 device */ - ret = v4l2_device_register(&pdev->dev, &fd->v4l2_dev); - if (ret < 0) { - dev_err(&pdev->dev, "Failed to register v4l2 device\n"); - ret = -ENOENT; - goto error_v4l2_register; - } - - fd->video.fops = &fd_fops; - fd->video.ioctl_ops = &fd_ioctl_ops; - fd->video.minor = -1; - fd->video.release = video_device_release; - fd->video.v4l2_dev = &fd->v4l2_dev; - fd->video.vfl_dir = VFL_DIR_TX; - fd->video.vfl_type = VFL_TYPE_GRABBER; - strlcpy(fd->video.name, MSM_FD_DRV_NAME, sizeof(fd->video.name)); - - ret = video_register_device(&fd->video, VFL_TYPE_GRABBER, -1); - if (ret < 0) { - v4l2_err(&fd->v4l2_dev, "Failed to register video device\n"); - goto error_video_register; - } - - video_set_drvdata(&fd->video, fd); - - platform_set_drvdata(pdev, fd); - - return 0; - -error_video_register: - v4l2_device_unregister(&fd->v4l2_dev); -error_v4l2_register: - destroy_workqueue(fd->work_queue); -error_alloc_workqueue: - devm_free_irq(&pdev->dev, fd->irq_num, fd); -error_irq_request: - msm_fd_hw_put_iommu(fd); -error_iommu_get: - msm_fd_hw_put_clocks(fd); -error_get_clocks: - regulator_put(fd->vdd); -error_get_regulator: - msm_fd_hw_release_mem_resources(fd); -error_mem_resources: - kfree(fd); - return ret; -} - -/* - * fd_device_remove - Fd device remove method. - * @pdev: Pointer fd platform device. - */ -static int fd_device_remove(struct platform_device *pdev) -{ - struct msm_fd_device *fd; - - fd = platform_get_drvdata(pdev); - if (NULL == fd) { - dev_err(&pdev->dev, "Can not get fd drvdata\n"); - return 0; - } - video_unregister_device(&fd->video); - destroy_workqueue(fd->work_queue); - v4l2_device_unregister(&fd->v4l2_dev); - devm_free_irq(&pdev->dev, fd->irq_num, fd); - msm_fd_hw_put_iommu(fd); - msm_fd_hw_put_clocks(fd); - regulator_put(fd->vdd); - msm_fd_hw_release_mem_resources(fd); - kfree(fd); - - return 0; -} - -/* Device tree match struct */ -static const struct of_device_id msm_fd_dt_match[] = { - {.compatible = "qcom,face-detection"}, - {} -}; - -/* Fd platform driver definition */ -static struct platform_driver fd_driver = { - .probe = fd_probe, - .remove = fd_device_remove, - .driver = { - .name = MSM_FD_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_fd_dt_match, - }, -}; - -static int __init msm_fd_init_module(void) -{ - return platform_driver_register(&fd_driver); -} - -static void __exit msm_fd_exit_module(void) -{ - platform_driver_unregister(&fd_driver); -} - -module_init(msm_fd_init_module); -module_exit(msm_fd_exit_module); -MODULE_DESCRIPTION("MSM FD driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.h b/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.h deleted file mode 100644 index ed7d4c3a88c7..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_dev.h +++ /dev/null @@ -1,245 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_DEV_H__ -#define __MSM_FD_DEV_H__ - -#include -#include -#include -#include - -/* Maximum number of result buffers */ -#define MSM_FD_MAX_RESULT_BUFS 5 -/* Max number of clocks defined in device tree */ -#define MSM_FD_MAX_CLK_NUM 10 -/* Max number of clock rates defined in device tree */ -#define MSM_FD_MAX_CLK_RATES 5 -/* Max number of faces which can be detected in one hw processing */ -#define MSM_FD_MAX_FACES_DETECTED 32 - -/* - * struct msm_fd_size - Structure contain FD size related values. - * @width: Image width. - * @height: Image height. - * @reg_val: Register value for this size. - * @work_size: Working buffer size in bytes for this size. - */ -struct msm_fd_size { - int width; - int height; - u32 reg_val; - int work_size; -}; - -/* - * struct msm_fd_setings - Structure contain FD settings values. - * @min_size_index: Minimum face size array index. - * @angle_index: Face detection angle array index. - * @direction_index: Face detection direction array index. - * @threshold: Face detection threshold value. - * @speed: Face detection speed value (it should match with clock rate index). - */ -struct msm_fd_setings { - unsigned int min_size_index; - unsigned int angle_index; - unsigned int direction_index; - unsigned int threshold; - unsigned int speed; -}; - -/* - * struct msm_fd_format - Structure contain FD format settings. - * @size: Pointer to fd size struct used for this format. - * @crop: V4l2 crop structure. - * @bytesperline: Bytes per line of input image buffer. - * @sizeimage: Size of input image buffer. - * @pixelformat: Pixel format of input image buffer. - */ -struct msm_fd_format { - struct msm_fd_size *size; - struct v4l2_rect crop; - int bytesperline; - int sizeimage; - u32 pixelformat; -}; - -/* - * struct msm_fd_mem_pool - Structure contain FD memory pool information. - * @fd_device: Pointer to fd device. - * @client: Pointer to ion client. - * @domain_num: Domain number associated with FD hw. - */ -struct msm_fd_mem_pool { - struct msm_fd_device *fd_device; - struct ion_client *client; - int domain_num; -}; - -/* - * struct msm_fd_buf_handle - Structure contain FD buffer handle information. - * @fd: ion FD from which this buffer is imported. - * @pool: Pointer to FD memory pool struct. - * @handle: Pointer to ion handle. - * @size: Size of the buffer. - * @addr: Adders of FD mmu mapped buffer. This address should be set to FD hw. - */ -struct msm_fd_buf_handle { - int fd; - struct msm_fd_mem_pool *pool; - void *handle; - unsigned long size; - ion_phys_addr_t addr; -}; - -/* - * struct msm_fd_buffer - Vb2 buffer wrapper structure. - * @vb: Videobuf 2 buffer structure. - * @active: Flag indicating if buffer currently used by FD hw. - * @completion: Completion need to wait on, if buffer is used by FD hw. - * @format: Format information of this buffer. - * @settings: Settings value of this buffer. - * @work_addr: Working buffer address need to be used when for this buffer. - * @list: Buffer is part of FD device processing queue - */ -struct msm_fd_buffer { - struct vb2_buffer vb; - atomic_t active; - struct completion completion; - struct msm_fd_format format; - struct msm_fd_setings settings; - ion_phys_addr_t work_addr; - struct list_head list; -}; - -/* - * struct msm_fd_stats - Structure contains FD result statistic information. - * @frame_id: Frame id for which statistic corresponds to. - * @face_cnt: Number of faces detected and included in face data. - * @face_data: Structure containing detected face data information. - */ -struct msm_fd_stats { - atomic_t frame_id; - u32 face_cnt; - struct msm_fd_face_data face_data[MSM_FD_MAX_FACES_DETECTED]; -}; - -/* - * struct fd_ctx - Structure contains per open file handle context. - * @fd_device: Pointer to fd device. - * @fh: V4l2 file handle. - * @vb2_q: Videobuf 2 queue. - * @sequence: Sequence number for this statistic. - * @format: Current format. - * @settings: Current settings. - * @mem_pool: FD hw memory pool. - * @stats: Pointer to statistic buffers. - * @work_buf: Working memory buffer handle. - * @wait_stop_stream: Pointer to completion to wait on stop stream. - */ -struct fd_ctx { - struct msm_fd_device *fd_device; - struct v4l2_fh fh; - struct vb2_queue vb2_q; - unsigned int sequence; - atomic_t subscribed_for_event; - struct msm_fd_format format; - struct msm_fd_setings settings; - struct msm_fd_mem_pool mem_pool; - struct msm_fd_stats *stats; - struct msm_fd_buf_handle work_buf; - struct completion *wait_stop_stream; -}; - -/* - * enum msm_fd_device_state - FD device state. - * @MSM_FD_DEVICE_IDLE: Device is idle, we can start with processing. - * @MSM_FD_DEVICE_RUNNING: Device is running, next processing will be - * scheduled from fd irq. - */ -enum msm_fd_device_state { - MSM_FD_DEVICE_IDLE, - MSM_FD_DEVICE_RUNNING, -}; - -/* - * enum msm_fd_mem_resources - FD device iomem resources. - * @MSM_FD_IOMEM_CORE: Index of fd core registers. - * @MSM_FD_IOMEM_MISC: Index of fd misc registers. - * @MSM_FD_IOMEM_VBIF: Index of fd vbif registers. - * @MSM_FD_IOMEM_LAST: Not valid. - */ -enum msm_fd_mem_resources { - MSM_FD_IOMEM_CORE, - MSM_FD_IOMEM_MISC, - MSM_FD_IOMEM_VBIF, - MSM_FD_IOMEM_LAST -}; - -/* - * struct msm_fd_device - FD device structure. - * @lock: Lock used for reference count. - * @slock: Spinlock used to protect FD device struct. - * @ref_count: Device reference count. - * @res_mem: Array of memory resources used by FD device. - * @iomem_base: Array of register mappings used by FD device. - * @vdd: Pointer to vdd regulator. - * @clk_num: Number of clocks attached to the device. - * @clk: Array of clock resources used by fd device. - * @clk_rates: Array of clock rates set. - * @bus_client: Memory access bus client. - * @iommu_domain: Pointer to FD device iommu domain handler. - * @iommu_domain_num: FD device iommu domain number. - * @iommu_attached_cnt: Iommu attached devices reference count. - * @iommu_dev: Pointer to Ion iommu device. - * @dev: Pointer to device struct. - * @v4l2_dev: V4l2 device. - * @video: Video device. - * @state: FD device state. - * @buf_queue: FD device processing queue. - * @work_queue: Pointer to FD device IRQ bottom half workqueue. - * @work: IRQ bottom half work struct. - */ -struct msm_fd_device { - struct mutex lock; - spinlock_t slock; - int ref_count; - - int irq_num; - struct resource *res_mem[MSM_FD_IOMEM_LAST]; - void __iomem *iomem_base[MSM_FD_IOMEM_LAST]; - struct resource *ioarea[MSM_FD_IOMEM_LAST]; - struct regulator *vdd; - - unsigned int clk_num; - struct clk *clk[MSM_FD_MAX_CLK_NUM]; - unsigned int clk_rates_num; - unsigned int clk_rates[MSM_FD_MAX_CLK_RATES][MSM_FD_MAX_CLK_NUM]; - - uint32_t bus_client; - - struct iommu_domain *iommu_domain; - int iommu_domain_num; - unsigned int iommu_attached_cnt; - - struct device *iommu_dev; - struct device *dev; - struct v4l2_device v4l2_dev; - struct video_device video; - - enum msm_fd_device_state state; - struct list_head buf_queue; - struct workqueue_struct *work_queue; - struct work_struct work; -}; - -#endif /* __MSM_FD_DEV_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.c b/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.c deleted file mode 100644 index d16f8d9a50cb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.c +++ /dev/null @@ -1,1182 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_fd_dev.h" -#include "msm_fd_hw.h" -#include "msm_fd_regs.h" - -/* Face detection processing timeout in ms */ -#define MSM_FD_PROCESSING_TIMEOUT_MS 500 - -/* Fd iommu partition definition */ -static struct msm_iova_partition msm_fd_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, -}; - -/* Fd iommu domain definition */ -static struct msm_iova_layout msm_fd_fw_layout = { - .partitions = &msm_fd_fw_partition, - .npartitions = 1, - .client_name = "fd_iommu", - .domain_flags = 0, -}; - -/* Face detection bus bandwidth definitions */ -static struct msm_bus_vectors msm_fd_bandwidth_vectors[] = { - { - .src = MSM_BUS_MASTER_VPU, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 450000000, - .ib = 900000000, - }, -}; - -static struct msm_bus_paths msm_fd_bus_client_config[] = { - { - ARRAY_SIZE(msm_fd_bandwidth_vectors), - msm_fd_bandwidth_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_fd_bus_scale_data = { - msm_fd_bus_client_config, - ARRAY_SIZE(msm_fd_bus_client_config), - .name = "msm_face_detect", -}; - -/* - * msm_fd_hw_read_reg - Fd read from register. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - */ -static inline u32 msm_fd_hw_read_reg(struct msm_fd_device *fd, - enum msm_fd_mem_resources base_idx, u32 reg) -{ - return readl_relaxed(fd->iomem_base[base_idx] + reg); -} - -/* - * msm_fd_hw_read_reg - Fd write to register. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - e @value: Value to be written. - */ -static inline void msm_fd_hw_write_reg(struct msm_fd_device *fd, - enum msm_fd_mem_resources base_idx, u32 reg, u32 value) -{ - writel_relaxed(value, fd->iomem_base[base_idx] + reg); -} - -/* - * msm_fd_hw_reg_clr - Fd clear register bits. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - * @clr_bits: Bits need to be clear from register. - */ -static inline void msm_fd_hw_reg_clr(struct msm_fd_device *fd, - enum msm_fd_mem_resources mmio_range, u32 reg, u32 clr_bits) -{ - u32 bits = msm_fd_hw_read_reg(fd, mmio_range, reg); - - msm_fd_hw_write_reg(fd, mmio_range, reg, (bits & ~clr_bits)); -} - -/* - * msm_fd_hw_reg_clr - Fd set register bits. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - * @set_bits: Bits need to be set to register. - */ -static inline void msm_fd_hw_reg_set(struct msm_fd_device *fd, - enum msm_fd_mem_resources mmio_range, u32 reg, u32 set_bits) -{ - u32 bits = msm_fd_hw_read_reg(fd, mmio_range, reg); - - msm_fd_hw_write_reg(fd, mmio_range, reg, (bits | set_bits)); -} - -/* - * msm_fd_hw_reg_clr - Fd set size mode register. - * @fd: Pointer to fd device. - * @mode: Size mode to be set. - */ -static inline void msm_fd_hw_set_size_mode(struct msm_fd_device *fd, u32 mode) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_IMAGE_SIZE, mode); -} - -/* - * msm_fd_hw_reg_clr - Fd set crop registers. - * @fd: Pointer to fd device. - * @crop: Pointer to v4l2 crop struct containing the crop information - */ -static inline void msm_fd_hw_set_crop(struct msm_fd_device *fd, - struct v4l2_rect *crop) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_START_X, - (crop->top & MSM_FD_START_X_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_START_Y, - (crop->left & MSM_FD_START_Y_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_SIZE_X, - (crop->width & MSM_FD_SIZE_X_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_SIZE_Y, - (crop->height & MSM_FD_SIZE_Y_MASK)); -} - -/* - * msm_fd_hw_reg_clr - Fd set bytes per line register. - * @fd: Pointer to fd device. - * @b: Bytes per line need to be set. - */ -static inline void msm_fd_hw_set_bytesperline(struct msm_fd_device *fd, u32 b) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_LINE_BYTES, - (b & MSM_FD_LINE_BYTES_MASK)); -} - -/* - * msm_fd_hw_reg_clr - Fd set image address. - * @fd: Pointer to fd device. - * @addr: Input image address need to be set. - */ -static inline void msm_fd_hw_set_image_addr(struct msm_fd_device *fd, u32 addr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_IMAGE_ADDR, addr); -} - -/* - * msm_fd_hw_set_work_addr - Fd set working buffer address. - * @fd: Pointer to fd device. - * @addr: Working buffer address need to be set. - */ -static inline void msm_fd_hw_set_work_addr(struct msm_fd_device *fd, u32 addr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_WORK_ADDR, addr); -} - -/* - * msm_fd_hw_set_direction_angle - Fd set face direction and face angle. - * @fd: Pointer to fd device. - * @direction: Face direction need to be set. - * @angle: Face angle need to be set. - */ -static inline void msm_fd_hw_set_direction_angle(struct msm_fd_device *fd, - u32 direction, u32 angle) -{ - u32 reg; - u32 value; - - value = direction | (angle ? 1 << (angle + 1) : 0); - if (value > MSM_FD_CONDT_DIR_MAX) - value = MSM_FD_CONDT_DIR_MAX; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT); - - reg &= ~MSM_FD_CONDT_DIR_MASK; - reg |= (value << MSM_FD_CONDT_DIR_SHIFT); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT, reg); -} - -/* - * msm_fd_hw_set_min_face - Fd set minimum face size register. - * @fd: Pointer to fd device. - * @size: Minimum face size need to be set. - */ -static inline void msm_fd_hw_set_min_face(struct msm_fd_device *fd, u32 size) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT); - - reg &= ~MSM_FD_CONDT_MIN_MASK; - reg |= (size << MSM_FD_CONDT_MIN_SHIFT); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT, reg); -} - -/* - * msm_fd_hw_set_threshold - Fd set detection threshold register. - * @fd: Pointer to fd device. - * @c: Maximum face count need to be set. - */ -static inline void msm_fd_hw_set_threshold(struct msm_fd_device *fd, u32 thr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_DHINT, - (thr & MSM_FD_DHINT_MASK)); -} - -/* - * msm_fd_hw_srst - Sw reset control registers. - * @fd: Pointer to fd device. - * - * Before every processing we need to toggle this bit, - * This functions set sw reset control bit to 1/0. - */ -static inline void msm_fd_hw_srst(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, - MSM_FD_CONTROL_SRST); - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, 0); -} - -/* - * msm_fd_hw_get_face_count - Fd read face count register. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_get_face_count(struct msm_fd_device *fd) -{ - u32 reg; - u32 value; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_RESULT_CNT); - - value = reg & MSM_FD_RESULT_CNT_MASK; - if (value > MSM_FD_MAX_FACES_DETECTED) { - dev_warn(fd->dev, "Face count %d out of limit\n", value); - value = MSM_FD_MAX_FACES_DETECTED; - } - - return value; -} - -/* - * msm_fd_hw_run - Starts face detection engine. - * @fd: Pointer to fd device. - * - * Before call this function make sure that control sw reset is perfomed - * (see function msm_fd_hw_srst). - * NOTE: Engine need to be reset before started again. - */ -static inline void msm_fd_hw_run(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, - MSM_FD_CONTROL_RUN); -} - -/* - * msm_fd_hw_is_finished - Check if fd hw engine is done with processing. - * @fd: Pointer to fd device. - * - * NOTE: If finish bit is not set, we should not read the result. - */ -int msm_fd_hw_is_finished(struct msm_fd_device *fd) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL); - - return reg & MSM_FD_CONTROL_FINISH; -} - -/* - * msm_fd_hw_is_runnig - Check if fd hw engine is busy. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_is_runnig(struct msm_fd_device *fd) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL); - - return reg & MSM_FD_CONTROL_RUN; -} - -/* - * msm_fd_hw_get_result_x - Get fd result center x coordinate. - * @fd: Pointer to fd device. - * @idx: Result face index - */ -int msm_fd_hw_get_result_x(struct msm_fd_device *fd, int idx) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CENTER_X(idx)); - - return reg; -} - -/* - * msm_fd_hw_get_result_y - Get fd result center y coordinate. - * @fd: Pointer to fd device. - * @idx: Result face index - */ -int msm_fd_hw_get_result_y(struct msm_fd_device *fd, int idx) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CENTER_Y(idx)); - - return reg; -} - -/* - * msm_fd_hw_get_result_conf_size - Get fd result confident level and size. - * @fd: Pointer to fd device. - * @idx: Result face index. - * @conf: Pointer to confident value need to be filled. - * @size: Pointer to size value need to be filled. - */ -void msm_fd_hw_get_result_conf_size(struct msm_fd_device *fd, - int idx, u32 *conf, u32 *size) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CONF_SIZE(idx)); - - *conf = (reg >> MSM_FD_RESULT_CONF_SHIFT) & MSM_FD_RESULT_CONF_MASK; - *size = (reg >> MSM_FD_RESULT_SIZE_SHIFT) & MSM_FD_RESULT_SIZE_MASK; -} - -/* - * msm_fd_hw_get_result_angle_pose - Get fd result angle and pose. - * @fd: Pointer to fd device. - * @idx: Result face index. - * @angle: Pointer to angle value need to be filled. - * @pose: Pointer to pose value need to be filled. - */ -void msm_fd_hw_get_result_angle_pose(struct msm_fd_device *fd, int idx, - u32 *angle, u32 *pose) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_ANGLE_POSE(idx)); - *angle = (reg >> MSM_FD_RESULT_ANGLE_SHIFT) & MSM_FD_RESULT_ANGLE_MASK; - *pose = (reg >> MSM_FD_RESULT_POSE_SHIFT) & MSM_FD_RESULT_POSE_MASK; -} - -/* - * msm_fd_hw_vbif_register - Configure and enable vbif interface. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_vbif_register(struct msm_fd_device *fd) -{ - - msm_fd_hw_reg_set(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_CLKON, 0x1); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_IN_RD_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_IN_WR_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_RD_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_WR_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_DDR_OUT_MAX_BURST, 0x0F); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_ARB_CTL, 0x30); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_AXI_AMEMTYPE_CONF0, 0x02); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_AXI_AOOO_EN, 0x10001); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_ROUND_ROBIN_QOS_ARB, 0x03); -} - -/* - * msm_fd_hw_vbif_unregister - Disable vbif interface. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_vbif_unregister(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_CLKON, 0x0); -} - -/* - * msm_fd_hw_release_mem_resources - Releases memory resources. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_release_mem_resources(struct msm_fd_device *fd) -{ - int i; - - /* Prepare memory resources */ - for (i = 0; i < MSM_FD_IOMEM_LAST; i++) { - if (fd->iomem_base[i]) { - iounmap(fd->iomem_base[i]); - fd->iomem_base[i] = NULL; - } - if (fd->ioarea[i]) { - release_mem_region(fd->res_mem[i]->start, - resource_size(fd->res_mem[i])); - fd->ioarea[i] = NULL; - } - fd->res_mem[i] = NULL; - } -} - -/* - * msm_fd_hw_get_mem_resources - Get memory resources. - * @pdev: Pointer to fd platform device. - * @fd: Pointer to fd device. - * - * Get and ioremap platform memory resources. - */ -int msm_fd_hw_get_mem_resources(struct platform_device *pdev, - struct msm_fd_device *fd) -{ - int i; - int ret = 0; - - /* Prepare memory resources */ - for (i = 0; i < MSM_FD_IOMEM_LAST; i++) { - /* Get resources */ - fd->res_mem[i] = platform_get_resource(pdev, - IORESOURCE_MEM, i); - if (!fd->res_mem[i]) { - dev_err(fd->dev, "Fail get resource idx %d\n", - i); - ret = -ENODEV; - break; - } - - fd->ioarea[i] = request_mem_region(fd->res_mem[i]->start, - resource_size(fd->res_mem[i]), fd->res_mem[i]->name); - if (!fd->ioarea[i]) { - dev_err(fd->dev, "%s can not request mem\n", - fd->res_mem[i]->name); - ret = -ENODEV; - break; - } - - fd->iomem_base[i] = ioremap(fd->res_mem[i]->start, - resource_size(fd->res_mem[i])); - if (!fd->iomem_base[i]) { - dev_err(fd->dev, "%s can not remap region\n", - fd->res_mem[i]->name); - ret = -ENODEV; - break; - } - } - - if (ret < 0) - msm_fd_hw_release_mem_resources(fd); - - return ret; -} - -/* - * msm_fd_hw_get_iommu - Get fd iommu. - * @fd: Pointer to fd device. - * - * Registers and get fd iommu domain. - */ -int msm_fd_hw_get_iommu(struct msm_fd_device *fd) -{ - int ret; - - fd->iommu_domain_num = msm_register_domain(&msm_fd_fw_layout); - if (fd->iommu_domain_num < 0) { - dev_err(fd->dev, "Can not register iommu domain\n"); - ret = -ENODEV; - goto error; - } - - fd->iommu_domain = msm_get_iommu_domain(fd->iommu_domain_num); - if (!fd->iommu_domain) { - dev_err(fd->dev, "Can not get iommu domain\n"); - ret = -ENODEV; - goto error; - } - - fd->iommu_dev = msm_iommu_get_ctx("camera_fd"); - if (IS_ERR(fd->iommu_dev)) { - dev_err(fd->dev, "Can not get iommu device\n"); - ret = -EPROBE_DEFER; - goto error_iommu_get_dev; - } - - return 0; - -error_iommu_get_dev: - msm_unregister_domain(fd->iommu_domain); - fd->iommu_domain = NULL; - fd->iommu_domain_num = -1; -error: - return ret; -} - -/* - * msm_fd_hw_get_iommu - Put fd iommu. - * @fd: Pointer to fd device. - * - * Unregisters fd iommu domain. - */ -void msm_fd_hw_put_iommu(struct msm_fd_device *fd) -{ - msm_unregister_domain(fd->iommu_domain); - fd->iommu_domain = NULL; -} - -/* - * msm_fd_hw_get_clocks - Get fd clocks. - * @fd: Pointer to fd device. - * - * Read clock information from device tree and perform get clock. - */ -int msm_fd_hw_get_clocks(struct msm_fd_device *fd) -{ - const char *clk_name; - size_t cnt; - int clk_rates; - int i; - int ret; - - cnt = of_property_count_strings(fd->dev->of_node, "clock-names"); - if (cnt > MSM_FD_MAX_CLK_NUM) { - dev_err(fd->dev, "Exceed max number of clocks %zu\n", cnt); - return -EINVAL; - } - - clk_rates = 0; - for (i = 0; i < cnt; i++) { - ret = of_property_read_string_index(fd->dev->of_node, - "clock-names", i, &clk_name); - if (ret < 0) { - dev_err(fd->dev, "Can not read clock name %d\n", i); - goto error; - } - - fd->clk[i] = clk_get(fd->dev, clk_name); - if (IS_ERR(fd->clk[i])) { - ret = -ENOENT; - dev_err(fd->dev, "Error clock get %s\n", clk_name); - goto error; - } - dev_dbg(fd->dev, "Clock name idx %d %s\n", i, clk_name); - } - fd->clk_num = cnt; - - cnt = 0; - for (clk_rates = 0; clk_rates < MSM_FD_MAX_CLK_RATES; clk_rates++) { - for (i = 0; i < fd->clk_num; i++) { - ret = of_property_read_u32_index(fd->dev->of_node, - "clock-rates", cnt++, - &fd->clk_rates[clk_rates][i]); - if (ret < 0) - break; - dev_dbg(fd->dev, "Clock rate idx %d idx %d value %d\n", - clk_rates, i, fd->clk_rates[clk_rates][i]); - - } - if (ret < 0) - break; - } - fd->clk_rates_num = clk_rates; - if (fd->clk_rates_num == 0) { - ret = -ENOENT; - dev_err(fd->dev, "Can not get clock rates\n"); - goto error; - } - - return 0; -error: - for (; i > 0; i--) - clk_put(fd->clk[i - 1]); - - return ret; -} - -/* - * msm_fd_hw_get_clocks - Put fd clocks. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_put_clocks(struct msm_fd_device *fd) -{ - int i; - - for (i = 0; i < fd->clk_num; i++) { - if (!IS_ERR_OR_NULL(fd->clk[i])) - clk_put(fd->clk[i]); - fd->clk_num = 0; - } - return 0; -} - -/* - * msm_fd_hw_set_clock_rate_idx - Set clock rate based on the index. - * @fd: Pointer to fd device. - * @idx: Clock Array index described in device tree. - */ -static int msm_fd_hw_set_clock_rate_idx(struct msm_fd_device *fd, - unsigned int idx) -{ - int ret; - long clk_rate; - int i; - - if (idx >= fd->clk_rates_num) - idx = fd->clk_rates_num - 1; - - for (i = 0; i < fd->clk_num; i++) { - - clk_rate = clk_round_rate(fd->clk[i], fd->clk_rates[idx][i]); - if (clk_rate < 0) { - dev_dbg(fd->dev, "Clk raund rate fail skip %d\n", i); - continue; - } - - ret = clk_set_rate(fd->clk[i], clk_rate); - if (ret < 0) { - dev_err(fd->dev, "Fail clock rate %ld\n", clk_rate); - return -EINVAL; - } - dev_dbg(fd->dev, "Clk rate %d-%ld idx %d\n", i, clk_rate, idx); - } - - return 0; -} -/* - * msm_fd_hw_enable_clocks - Prepare and enable fd clocks. - * @fd: Pointer to fd device. - */ -static int msm_fd_hw_enable_clocks(struct msm_fd_device *fd) -{ - int i; - int ret; - - for (i = 0; i < fd->clk_num; i++) { - ret = clk_prepare(fd->clk[i]); - if (ret < 0) { - dev_err(fd->dev, "clock prepare failed %d\n", i); - goto error; - } - - ret = clk_enable(fd->clk[i]); - if (ret < 0) { - dev_err(fd->dev, "clock enable %d\n", i); - clk_unprepare(fd->clk[i]); - goto error; - } - } - - return 0; -error: - for (; i > 0; i--) { - clk_disable(fd->clk[i - 1]); - clk_unprepare(fd->clk[i - 1]); - } - return ret; -} -/* - * msm_fd_hw_disable_clocks - Disable fd clock. - * @fd: Pointer to fd device. - */ -static void msm_fd_hw_disable_clocks(struct msm_fd_device *fd) -{ - int i; - - for (i = 0; i < fd->clk_num; i++) { - clk_disable(fd->clk[i]); - clk_unprepare(fd->clk[i]); - } -} - -/* - * msm_fd_hw_bus_request - Request bus for memory access. - * @fd: Pointer to fd device. - */ -static int msm_fd_hw_bus_request(struct msm_fd_device *fd) -{ - int ret; - - fd->bus_client = msm_bus_scale_register_client(&msm_fd_bus_scale_data); - if (!fd->bus_client) { - dev_err(fd->dev, "Fail to register bus client\n"); - return -ENOENT; - } - - ret = msm_bus_scale_client_update_request(fd->bus_client, 0); - if (ret < 0) { - dev_err(fd->dev, "Fail bus scale update %d\n", ret); - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_hw_bus_release - Release memory access bus. - * @fd: Pointer to fd device. - */ -static void msm_fd_hw_bus_release(struct msm_fd_device *fd) -{ - if (fd->bus_client) { - msm_bus_scale_unregister_client(fd->bus_client); - fd->bus_client = 0; - } -} - -/* - * msm_fd_hw_get - Get fd hw for performing any hw operation. - * @fd: Pointer to fd device. - * @clock_rate_idx: Clock rate index. - * - * Prepare fd hw for operation. Have reference count protected by - * fd device mutex. - */ -int msm_fd_hw_get(struct msm_fd_device *fd, unsigned int clock_rate_idx) -{ - int ret; - - mutex_lock(&fd->lock); - - if (fd->ref_count == 0) { - ret = msm_fd_hw_set_clock_rate_idx(fd, clock_rate_idx); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable vdd\n"); - goto error; - } - - ret = regulator_enable(fd->vdd); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable vdd\n"); - goto error; - } - - ret = msm_fd_hw_enable_clocks(fd); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable clocks\n"); - goto error_clocks; - } - - ret = msm_fd_hw_bus_request(fd); - if (ret < 0) { - dev_err(fd->dev, "Fail bus request\n"); - goto error_bus_request; - } - msm_fd_hw_vbif_register(fd); - } - - fd->ref_count++; - mutex_unlock(&fd->lock); - - return 0; - -error_bus_request: - msm_fd_hw_disable_clocks(fd); -error_clocks: - regulator_disable(fd->vdd); -error: - mutex_unlock(&fd->lock); - return ret; -} - -/* - * msm_fd_hw_get - Put fd hw. - * @fd: Pointer to fd device. - * - * Release fd hw. Have reference count protected by - * fd device mutex. - */ -void msm_fd_hw_put(struct msm_fd_device *fd) -{ - mutex_lock(&fd->lock); - BUG_ON(fd->ref_count == 0); - - if (--fd->ref_count == 0) { - msm_fd_hw_vbif_unregister(fd); - msm_fd_hw_bus_release(fd); - msm_fd_hw_disable_clocks(fd); - regulator_disable(fd->vdd); - } - mutex_unlock(&fd->lock); -} - -/* - * msm_fd_hw_attach_iommu - Attach iommu to face detection engine. - * @fd: Pointer to fd device. - * - * Iommu attach have reference count protected by - * fd device mutex. - */ -static int msm_fd_hw_attach_iommu(struct msm_fd_device *fd) -{ - int ret; - - mutex_lock(&fd->lock); - - if (fd->iommu_attached_cnt == UINT_MAX) { - dev_err(fd->dev, "Max count reached! can not attach iommu\n"); - goto error; - } - - if (fd->iommu_attached_cnt == 0) { - ret = iommu_attach_device(fd->iommu_domain, fd->iommu_dev); - if (ret < 0) { - dev_err(fd->dev, "Can not attach iommu domain\n"); - goto error; - } - } - fd->iommu_attached_cnt++; - mutex_unlock(&fd->lock); - - return 0; - -error: - mutex_unlock(&fd->lock); - return ret; -} - -/* - * msm_fd_hw_detach_iommu - Detach iommu from face detection engine. - * @fd: Pointer to fd device. - * - * Iommu detach have reference count protected by - * fd device mutex. - */ -static void msm_fd_hw_detach_iommu(struct msm_fd_device *fd) -{ - mutex_lock(&fd->lock); - if (fd->iommu_attached_cnt == 0) { - dev_err(fd->dev, "There is no attached device\n"); - mutex_unlock(&fd->lock); - return; - } - - if (--fd->iommu_attached_cnt == 0) - iommu_detach_device(fd->iommu_domain, fd->iommu_dev); - - mutex_unlock(&fd->lock); -} - -/* - * msm_fd_hw_map_buffer - Map buffer to fd hw mmu. - * @pool: Pointer to fd memory pool. - * @fd: Ion fd. - * @buf: Fd buffer handle, for storing mapped buffer information. - * - * It will map ion fd to fd hw mmu. - */ -int msm_fd_hw_map_buffer(struct msm_fd_mem_pool *pool, int fd, - struct msm_fd_buf_handle *buf) -{ - int ret; - - if (!pool || fd < 0) - return -EINVAL; - - ret = msm_fd_hw_attach_iommu(pool->fd_device); - if (ret < 0) - goto error; - - buf->pool = pool; - buf->fd = fd; - - buf->handle = ion_import_dma_buf(pool->client, buf->fd); - if (IS_ERR_OR_NULL(buf->handle)) - goto error_import_dma; - - ret = ion_map_iommu(pool->client, buf->handle, pool->domain_num, - 0, SZ_4K, 0, &buf->addr, &buf->size, 0, 0); - if (ret < 0) - goto error_map_iommu; - - return buf->size; - -error_map_iommu: - ion_free(pool->client, buf->handle); -error_import_dma: - msm_fd_hw_detach_iommu(pool->fd_device); -error: - return -ENOMEM; -} - -/* - * msm_fd_hw_unmap_buffer - Unmap buffer from fd hw mmu. - * @buf: Fd buffer handle, for storing mapped buffer information. - */ -void msm_fd_hw_unmap_buffer(struct msm_fd_buf_handle *buf) -{ - if (buf->size) { - ion_unmap_iommu(buf->pool->client, buf->handle, - buf->pool->domain_num, 0); - msm_fd_hw_detach_iommu(buf->pool->fd_device); - } - - if (!IS_ERR_OR_NULL(buf->handle)) - ion_free(buf->pool->client, buf->handle); - - buf->fd = -1; - buf->pool = NULL; - buf->handle = NULL; -} - -/* - * msm_fd_hw_enable - Configure and enable fd hw. - * @fd: Fd device. - * @buffer: Buffer need to be processed. - * - * Configure and starts fd processing with given buffer. - * NOTE: Fd will not be enabled if engine is in running state. - */ -static int msm_fd_hw_enable(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - struct msm_fd_buf_handle *buf_handle = - buffer->vb.planes[0].mem_priv; - - if (msm_fd_hw_is_runnig(fd)) { - dev_err(fd->dev, "Device is busy we can not enable\n"); - return 0; - } - - msm_fd_hw_srst(fd); - msm_fd_hw_set_size_mode(fd, buffer->format.size->reg_val); - msm_fd_hw_set_crop(fd, &buffer->format.crop); - msm_fd_hw_set_bytesperline(fd, buffer->format.bytesperline); - msm_fd_hw_set_image_addr(fd, buf_handle->addr); - msm_fd_hw_set_work_addr(fd, buffer->work_addr); - msm_fd_hw_set_min_face(fd, buffer->settings.min_size_index); - msm_fd_hw_set_threshold(fd, buffer->settings.threshold); - msm_fd_hw_set_direction_angle(fd, buffer->settings.direction_index, - buffer->settings.angle_index); - msm_fd_hw_run(fd); - return 1; -} - -/* - * msm_fd_hw_try_enable - Try to enable fd hw. - * @fd: Fd device. - * @buffer: Buffer need to be processed. - * @state: Enable on device state - * - * It will enable fd hw if actual device state is equal with state argument. - */ -static int msm_fd_hw_try_enable(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer, enum msm_fd_device_state state) -{ - int enabled = 0; - - if (state == fd->state) { - - fd->state = MSM_FD_DEVICE_RUNNING; - atomic_set(&buffer->active, 1); - - msm_fd_hw_enable(fd, buffer); - enabled = 1; - } - return enabled; -} - -/* - * msm_fd_hw_next_buffer - Get next buffer from fd device processing queue. - * @fd: Fd device. - */ -static struct msm_fd_buffer *msm_fd_hw_next_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buffer = NULL; - - if (!list_empty(&fd->buf_queue)) - buffer = list_first_entry(&fd->buf_queue, - struct msm_fd_buffer, list); - - return buffer; -} - -/* - * msm_fd_hw_add_buffer - Add buffer to fd device processing queue. - * @fd: Fd device. - */ -void msm_fd_hw_add_buffer(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - spin_lock(&fd->slock); - - atomic_set(&buffer->active, 0); - init_completion(&buffer->completion); - - INIT_LIST_HEAD(&buffer->list); - list_add_tail(&buffer->list, &fd->buf_queue); - spin_unlock(&fd->slock); -} - -/* - * msm_fd_hw_remove_buffers_from_queue - Removes buffer from - * fd device processing queue. - * @fd: Fd device. - */ -void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd, - struct vb2_queue *vb2_q) -{ - struct msm_fd_buffer *curr_buff; - struct msm_fd_buffer *temp; - struct msm_fd_buffer *active_buffer; - unsigned long time; - - spin_lock(&fd->slock); - - active_buffer = NULL; - list_for_each_entry_safe(curr_buff, temp, &fd->buf_queue, list) { - if (curr_buff->vb.vb2_queue == vb2_q) { - - if (atomic_read(&curr_buff->active)) - active_buffer = curr_buff; - else - list_del(&curr_buff->list); - - } - } - spin_unlock(&fd->slock); - - /* We need to wait active buffer to finish */ - if (active_buffer) { - time = wait_for_completion_timeout(&active_buffer->completion, - msecs_to_jiffies(MSM_FD_PROCESSING_TIMEOUT_MS)); - if (!time) { - /* Remove active buffer */ - msm_fd_hw_get_active_buffer(fd); - /* Schedule if other buffers are present in device */ - msm_fd_hw_schedule_next_buffer(fd); - } - } - - return; -} - -/* - * msm_fd_hw_buffer_done - Mark as done and removes from processing queue. - * @fd: Fd device. - * @buffer: Fd buffer. - */ -int msm_fd_hw_buffer_done(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - int ret = 0; - - spin_lock(&fd->slock); - - if (atomic_read(&buffer->active)) { - atomic_set(&buffer->active, 0); - complete_all(&buffer->completion); - } else { - dev_err(fd->dev, "Buffer is not active\n"); - ret = -1; - } - - spin_unlock(&fd->slock); - - return ret; -} - -/* - * msm_fd_hw_get_active_buffer - Get active buffer from fd processing queue. - * @fd: Fd device. - */ -struct msm_fd_buffer *msm_fd_hw_get_active_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buffer = NULL; - - spin_lock(&fd->slock); - if (!list_empty(&fd->buf_queue)) { - buffer = list_first_entry(&fd->buf_queue, - struct msm_fd_buffer, list); - list_del(&buffer->list); - } - spin_unlock(&fd->slock); - - return buffer; -} - -/* - * msm_fd_hw_schedule_and_start - Schedule active buffer and start processing. - * @fd: Fd device. - * - * This can be executed only when device is in idle state. - */ -int msm_fd_hw_schedule_and_start(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buf; - - spin_lock(&fd->slock); - buf = msm_fd_hw_next_buffer(fd); - if (buf) - msm_fd_hw_try_enable(fd, buf, MSM_FD_DEVICE_IDLE); - - spin_unlock(&fd->slock); - - return 0; -} - -/* - * msm_fd_hw_schedule_next_buffer - Schedule next buffer and start processing. - * @fd: Fd device. - * - * NOTE: This can be executed only when device is in running state. - */ -int msm_fd_hw_schedule_next_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buf; - int ret; - - spin_lock(&fd->slock); - - /* We can schedule next buffer only in running state */ - if (fd->state != MSM_FD_DEVICE_RUNNING) { - dev_err(fd->dev, "Can not schedule next buffer\n"); - spin_unlock(&fd->slock); - return -EBUSY; - } - - buf = msm_fd_hw_next_buffer(fd); - if (buf) { - ret = msm_fd_hw_try_enable(fd, buf, MSM_FD_DEVICE_RUNNING); - if (0 == ret) { - dev_err(fd->dev, "Ouch can not process next buffer\n"); - spin_unlock(&fd->slock); - return -EBUSY; - } - } else { - fd->state = MSM_FD_DEVICE_IDLE; - } - spin_unlock(&fd->slock); - - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.h b/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.h deleted file mode 100644 index 1483d9f74a41..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_hw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_HW_H__ -#define __MSM_FD_HW_H__ - -#include "msm_fd_dev.h" - -int msm_fd_hw_is_finished(struct msm_fd_device *fd); - -int msm_fd_hw_get_face_count(struct msm_fd_device *fd); - -int msm_fd_hw_get_result_x(struct msm_fd_device *fd, int idx); - -int msm_fd_hw_get_result_y(struct msm_fd_device *fd, int idx); - -void msm_fd_hw_get_result_conf_size(struct msm_fd_device *fd, - int idx, u32 *conf, u32 *size); - -void msm_fd_hw_get_result_angle_pose(struct msm_fd_device *fd, int idx, - u32 *angle, u32 *pose); - -void msm_fd_hw_release_mem_resources(struct msm_fd_device *fd); - -int msm_fd_hw_get_mem_resources(struct platform_device *pdev, - struct msm_fd_device *fd); - -int msm_fd_hw_get_iommu(struct msm_fd_device *fd); - -void msm_fd_hw_put_iommu(struct msm_fd_device *fd); - -int msm_fd_hw_get_clocks(struct msm_fd_device *fd); - -int msm_fd_hw_put_clocks(struct msm_fd_device *fd); - -int msm_fd_hw_get(struct msm_fd_device *fd, unsigned int clock_rate_idx); - -void msm_fd_hw_put(struct msm_fd_device *fd); - -int msm_fd_hw_map_buffer(struct msm_fd_mem_pool *pool, int fd, - struct msm_fd_buf_handle *buf); - -void msm_fd_hw_unmap_buffer(struct msm_fd_buf_handle *buf); - -void msm_fd_hw_add_buffer(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer); - -void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd, - struct vb2_queue *vb2_q); - -int msm_fd_hw_buffer_done(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer); - -struct msm_fd_buffer *msm_fd_hw_get_active_buffer(struct msm_fd_device *fd); - -int msm_fd_hw_schedule_and_start(struct msm_fd_device *fd); - -int msm_fd_hw_schedule_next_buffer(struct msm_fd_device *fd); - -#endif /* __MSM_FD_HW_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_regs.h b/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_regs.h deleted file mode 100644 index ea47bb8fc84c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/fd/msm_fd_regs.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_REGS_H__ -#define __MSM_FD_REGS_H__ - -/* FD core registers */ -#define MSM_FD_VERSION (0x38) - -#define MSM_FD_CONTROL (0x00) -#define MSM_FD_CONTROL_SRST (1 << 0) -#define MSM_FD_CONTROL_RUN (1 << 1) -#define MSM_FD_CONTROL_FINISH (1 << 2) - -#define MSM_FD_RESULT_CNT (0x04) -#define MSM_FD_RESULT_CNT_MASK (0x3F) - -#define MSM_FD_CONDT (0x08) -#define MSM_FD_CONDT_MIN_MASK (0x03) -#define MSM_FD_CONDT_MIN_SHIFT (0x00) -#define MSM_FD_CONDT_DIR_MAX (0x08) -#define MSM_FD_CONDT_DIR_MASK (0x3C) -#define MSM_FD_CONDT_DIR_SHIFT (0x02) - -#define MSM_FD_START_X (0x0C) -#define MSM_FD_START_X_MASK (0x3FF) - -#define MSM_FD_START_Y (0x10) -#define MSM_FD_START_Y_MASK (0x1FF) - -#define MSM_FD_SIZE_X (0x14) -#define MSM_FD_SIZE_X_MASK (0x3FF) - -#define MSM_FD_SIZE_Y (0x18) -#define MSM_FD_SIZE_Y_MASK (0x1FF) - -#define MSM_FD_DHINT (0x1C) -#define MSM_FD_DHINT_MASK (0xF) - -#define MSM_FD_IMAGE_ADDR (0x24) -#define MSM_FD_IMAGE_ADDR_ALIGN (0x8) - -#define MSM_FD_WORK_ADDR (0x28) -#define MSM_FD_WORK_ADDR_ALIGN (0x8) - -#define MSM_FD_IMAGE_SIZE (0x2C) -#define MSM_FD_IMAGE_SIZE_QVGA (0x0) -#define MSM_FD_IMAGE_SIZE_VGA (0x1) -#define MSM_FD_IMAGE_SIZE_WQVGA (0x2) -#define MSM_FD_IMAGE_SIZE_WVGA (0x3) - -#define MSM_FD_LINE_BYTES (0x30) -#define MSM_FD_LINE_BYTES_MASK (0x1FFF) -#define MSM_FD_LINE_BYTES_ALIGN (0x8) - -#define MSM_FD_RESULT_CENTER_X(x) (0x400 + (0x10 * (x))) - -#define MSM_FD_RESULT_CENTER_Y(x) (0x404 + (0x10 * (x))) - -#define MSM_FD_RESULT_CONF_SIZE(x) (0x408 + (0x10 * (x))) -#define MSM_FD_RESULT_SIZE_MASK (0x1FF) -#define MSM_FD_RESULT_SIZE_SHIFT (0x000) -#define MSM_FD_RESULT_CONF_MASK (0xF) -#define MSM_FD_RESULT_CONF_SHIFT (0x9) - -#define MSM_FD_RESULT_ANGLE_POSE(x) (0x40C + (0x10 * (x))) -#define MSM_FD_RESULT_ANGLE_MASK (0x1FF) -#define MSM_FD_RESULT_ANGLE_SHIFT (0x000) -#define MSM_FD_RESULT_POSE_MASK (0x7) -#define MSM_FD_RESULT_POSE_SHIFT (0x9) - -/* FD misc registers */ -#define MSM_FD_MISC_HW_VERSION (0x00) - -#define MSM_FD_MISC_SW_RESET (0x10) -#define MSM_FD_MISC_SW_RESET_SET (1 << 0) - -#define MSM_FD_MISC_FIFO_STATUS (0x14) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_DCNT_MAST (0x1F) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_DCNT_SHIFT (0) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_FULL (1 << 13) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_EMPTY (1 << 14) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_DCNT_MAST (0x1F) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_DCNT_SHIFT (16) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_EMPTY (1 << 29) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_FULL (1 << 30) - -#define MSM_FD_MISC_DATA_ENDIAN (0x18) -#define MSM_FD_MISC_DATA_ENDIAN_BYTE_SWAP_SET (1 << 0) - -#define MSM_FD_MISC_VBIF_REQ_PRIO (0x20) -#define MSM_FD_MISC_VBIF_REQ_PRIO_MASK (0x3) - -#define MSM_FD_MISC_VBIF_PRIO_LEVEL (0x24) -#define MSM_FD_MISC_VBIF_PRIO_LEVEL_MASK (0x3) - -#define MSM_FD_MISC_VBIF_MMU_PDIRECT (0x28) -#define MSM_FD_MISC_VBIF_MMU_PDIRECT_INCREMENT (1 << 0) - -#define MSM_FD_MISC_VBIF_IRQ_CLR (0x30) -#define MSM_FD_MISC_VBIF_IRQ_CLR_ALL (1 << 0) - -#define MSM_FD_MISC_VBIF_DONE_STATUS (0x34) -#define MSM_FD_MISC_VBIF_DONE_STATUS_WRITE (1 << 0) -#define MSM_FD_MISC_VBIF_DONE_STATUS_READ (1 << 1) - -#define MSM_FD_MISC_TEST_BUS_SEL (0x40) -#define MSM_FD_MISC_TEST_BUS_SEL_TEST_MODE_MASK (0xF) -#define MSM_FD_MISC_TEST_BUS_SEL_TEST_MODE_SHIFT (0) -#define MSM_FD_MISC_TEST_BUS_SEL_7_0_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_7_0_SHIFT (16) -#define MSM_FD_MISC_TEST_BUS_SEL_15_8_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_15_8_SHIFT (18) -#define MSM_FD_MISC_TEST_BUS_SEL_23_16_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_23_16_SHIFT (20) -#define MSM_FD_MISC_TEST_BUS_SEL_31_24_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_31_24_SHIFT (22) - -#define MSM_FD_MISC_AHB_TEST_EN (0x44) -#define MSM_FD_MISC_AHB_TEST_EN_MASK (0x3) - -#define MSM_FD_MISC_FD2VBIF_INT_TEST_SEL (0x48) -#define MSM_FD_MISC_FD2VBIF_INT_TEST_MASK (0xF) - -#define MSM_FD_MISC_TEST_BUS (0x4C) - -/* FD vbif registers */ -#define MSM_FD_VBIF_CLKON (0x04) -#define MSM_FD_VBIF_IN_RD_LIM_CONF0 (0xB0) -#define MSM_FD_VBIF_IN_WR_LIM_CONF0 (0xC0) -#define MSM_FD_VBIF_OUT_RD_LIM_CONF0 (0xD0) -#define MSM_FD_VBIF_OUT_WR_LIM_CONF0 (0xD4) -#define MSM_FD_VBIF_DDR_OUT_MAX_BURST (0xD8) -#define MSM_FD_VBIF_ARB_CTL (0xF0) -#define MSM_FD_VBIF_OUT_AXI_AMEMTYPE_CONF0 (0x160) -#define MSM_FD_VBIF_OUT_AXI_AOOO_EN (0x178) -#define MSM_FD_VBIF_OUT_AXI_AOOO (0x17c) -#define MSM_FD_VBIF_ROUND_ROBIN_QOS_ARB (0x124) - -#endif /* __MSM_FD_REGS_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_cam_sensor.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_cam_sensor.h deleted file mode 100755 index 20035d9ac580..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_cam_sensor.h +++ /dev/null @@ -1,987 +0,0 @@ -#ifndef __LINUX_MSM_CAM_SENSOR_H -#define __LINUX_MSM_CAM_SENSOR_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -#define I2C_SEQ_REG_SETTING_MAX 5 -#define I2C_SEQ_REG_DATA_MAX 256 -#define I2C_REG_DATA_MAX (8*1024) -#define MAX_CID 16 - -#define MSM_SENSOR_MCLK_8HZ 8000000 -#define MSM_SENSOR_MCLK_16HZ 16000000 -#define MSM_SENSOR_MCLK_24HZ 24000000 - -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define MAX_SENSOR_NAME 32 - -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 50 -#define MAX_ACTUATOR_REG_TBL_SIZE 50 -#define MAX_ACTUATOR_AF_TOTAL_STEPS 1024 - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define MSM_ACTUATOR_MOVE_SIGNED_FAR -1 -#define MSM_ACTUATOR_MOVE_SIGNED_NEAR 1 - -#define MAX_EEPROM_NAME 32 - -#define MAX_AF_ITERATIONS 3 -#define MAX_NUMBER_OF_STEPS 47 - -#define MAX_LED_TRIGGERS 3 - -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_EXIF 9 -//Focus related enums -#define EXT_CAM_AF 11 -#define EXT_CAM_FOCUS 12 -#define EXT_CAM_SET_TOUCHAF_POS 13 -#define EXT_CAM_SET_AF_STATUS 14 -#define EXT_CAM_GET_AF_STATUS 15 -#define EXT_CAM_GET_AF_RESULT 16 -#define EXT_CAM_SET_AF_STOP 17 -#define EXT_CAM_FLASH_MODE 18 -#define EXT_CAM_SET_FLASH 19 -#define EXT_CAM_VT_MODE 20 - - -//************************************* Native functionalities for YUV sensor added -#define EXT_CAM_EV 1 -#define EXT_CAM_WB 2 -#define EXT_CAM_METERING 3 -#define EXT_CAM_ISO 4 -#define EXT_CAM_EFFECT 5 -#define EXT_CAM_SCENE_MODE 6 -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_CONTRAST 8 -#define EXT_CAM_EXIF 9 -#define EXT_CAM_SET_AE_AWB 10 -//Focus related enums -#define EXT_CAM_AF 11 -#define EXT_CAM_FOCUS 12 -#define EXT_CAM_SET_TOUCHAF_POS 13 -#define EXT_CAM_SET_AF_STATUS 14 -#define EXT_CAM_GET_AF_STATUS 15 -#define EXT_CAM_GET_AF_RESULT 16 -#define EXT_CAM_SET_AF_STOP 17 -#define EXT_CAM_FLASH_MODE 18 -#define EXT_CAM_SET_FLASH 19 -#define EXT_CAM_VT_MODE 20 -#define EXT_CAM_FPS_RANGE 21 - -//Exposure Compensation -#define CAMERA_EV_M4 0 -#define CAMERA_EV_M3 1 -#define CAMERA_EV_M2 2 -#define CAMERA_EV_M1 3 -#define CAMERA_EV_DEFAULT 4 -#define CAMERA_EV_P1 5 -#define CAMERA_EV_P2 6 -#define CAMERA_EV_P3 7 -#define CAMERA_EV_P4 8 - -//White Balance -#define CAMERA_WHITE_BALANCE_OFF 0 -#define CAMERA_WHITE_BALANCE_AUTO 1 -#define CAMERA_WHITE_BALANCE_INCANDESCENT 2 -#define CAMERA_WHITE_BALANCE_FLUORESCENT 3 -#define CAMERA_WHITE_BALANCE_DAYLIGHT 5 -#define CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT 6 - -//Metering -#define CAMERA_AVERAGE 0 -#define CAMERA_CENTER_WEIGHT 1 -#define CAMERA_SPOT 2 - -//ISO -#define CAMERA_ISO_MODE_AUTO 0 -#define CAMERA_ISO_MODE_50 1 -#define CAMERA_ISO_MODE_100 2 -#define CAMERA_ISO_MODE_200 3 -#define CAMERA_ISO_MODE_400 4 -#define CAMERA_ISO_MODE_800 5 - -//Effect -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#define CAMERA_EFFECT_WASHED 12 -#define CAMERA_EFFECT_VINTAGE_WARM 13 -#define CAMERA_EFFECT_VINTAGE_COLD 14 -#define CAMERA_EFFECT_POINT_COLOR_1 15 -#define CAMERA_EFFECT_POINT_COLOR_2 16 -#define CAMERA_EFFECT_POINT_COLOR_3 17 -#define CAMERA_EFFECT_POINT_COLOR_4 18 -#define CAMERA_EFFECT_CARTOONIZE 19 -#define CAMERA_EFFECT_MAX 20 - -//scene mode -#define CAMERA_SCENE_AUTO 0 -#define CAMERA_SCENE_LANDSCAPE 3 -#define CAMERA_SCENE_NIGHT 6 -#define CAMERA_SCENE_BEACH 7 -#define CAMERA_SCENE_PORTRAIT 8 -#define CAMERA_SCENE_SPORT 9 -#define CAMERA_SCENE_FIRE 11 -#define CAMERA_SCENE_SUNSET 12 -#define CAMERA_SCENE_PARTY 13 -#define CAMERA_SCENE_CANDLE 14 -#define CAMERA_SCENE_AGAINST_LIGHT 16 -#define CAMERA_SCENE_FALL 17 -#define CAMERA_SCENE_TEXT 19 -#define CAMERA_SCENE_DAWN 21 //need to check - - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -#define CAMERA_MODE_INIT 0 -#define CAMERA_MODE_PREVIEW 1 -#define CAMERA_MODE_CAPTURE 2 -#define CAMERA_MODE_RECORDING 3 - -//Flash modes -#define CAMERA_FLASH_OFF 0 -#define CAMERA_FLASH_ON 2 -#define CAMERA_FLASH_AUTO 1 -#define CAMERA_FLASH_TORCH 3 - -//AF modes -#define CAMERA_AF_AUTO 0 -#define CAMERA_AF_MACRO 2 -#define CAMERA_AF_OCR 3 - -enum flash_type { -#if !defined(CONFIG_FLED_SM5701) - LED_FLASH = 1, -#endif - STROBE_FLASH, - GPIO_FLASH -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_BURST_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_VT_RESET, - SENSOR_GPIO_VT_STANDBY, - SENSOR_GPIO_EXT_VANA_POWER, - SENSOR_GPIO_EXT_CAMIO_EN, - SENSOR_GPIO_OIS_EN, - SENSOR_GPIO_OIS_RESET, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VANA_VT, - CAM_VIO_VT, - CAM_VAF, - CAM_VREG_MAX, -}; - -#if defined (CONFIG_CAMERA_SYSFS_V2) -enum msm_camera_cam_info_isp { - CAM_INFO_ISP_TYPE_INTERNAL = 0, - CAM_INFO_ISP_TYPE_EXTERNAL, - CAM_INFO_ISP_TYPE_SOC, -}; - -enum msm_camera_cam_info_cal_mem { - CAM_INFO_CAL_MEM_TYPE_NONE = 0, - CAM_INFO_CAL_MEM_TYPE_FROM, - CAM_INFO_CAL_MEM_TYPE_EEPROM, - CAM_INFO_CAL_MEM_TYPE_OTP, -}; - -enum msm_camera_cam_info_read_ver { - CAM_INFO_READ_VER_SYSFS = 0, - CAM_INFO_READ_VER_CAMON, -}; - -enum msm_camera_cam_info_core_voltage { - CAM_INFO_CORE_VOLT_NONE = 0, - CAM_INFO_CORE_VOLT_USE, -}; - -enum msm_camera_cam_info_upgrade { - CAM_INFO_FW_UPGRADE_NONE = 0, - CAM_INFO_FW_UPGRADE_SYSFS, - CAM_INFO_FW_UPGRADE_CAMON, -}; - -enum msm_camera_cam_info_companion { - CAM_INFO_COMPANION_NONE = 0, - CAM_INFO_COMPANION_USE, -}; - -enum msm_camera_cam_info_ois { - CAM_INFO_OIS_NONE = 0, - CAM_INFO_OIS_USE, -}; -#endif - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_RES_8, - MSM_SENSOR_RES_9, - MSM_SENSOR_RES_10, - MSM_SENSOR_RES_11, - MSM_SENSOR_RES_12, - MSM_SENSOR_RES_13, - MSM_SENSOR_INVALID_RES, -}; - -enum msm_camera_stream_type_t { - MSM_CAMERA_STREAM_PREVIEW, - MSM_CAMERA_STREAM_SNAPSHOT, - MSM_CAMERA_STREAM_VIDEO, - MSM_CAMERA_STREAM_INVALID, -}; - -enum sensor_sub_module_t { - SUB_MODULE_SENSOR, - SUB_MODULE_CHROMATIX, - SUB_MODULE_ACTUATOR, - SUB_MODULE_EEPROM, - SUB_MODULE_LED_FLASH, - SUB_MODULE_STROBE_FLASH, - SUB_MODULE_CSID, - SUB_MODULE_CSID_3D, - SUB_MODULE_CSIPHY, - SUB_MODULE_CSIPHY_3D, - SUB_MODULE_MAX, -}; - -enum { - MSM_CAMERA_EFFECT_MODE_OFF, - MSM_CAMERA_EFFECT_MODE_MONO, - MSM_CAMERA_EFFECT_MODE_NEGATIVE, - MSM_CAMERA_EFFECT_MODE_SOLARIZE, - MSM_CAMERA_EFFECT_MODE_SEPIA, - MSM_CAMERA_EFFECT_MODE_POSTERIZE, - MSM_CAMERA_EFFECT_MODE_WHITEBOARD, - MSM_CAMERA_EFFECT_MODE_BLACKBOARD, - MSM_CAMERA_EFFECT_MODE_AQUA, - MSM_CAMERA_EFFECT_MODE_EMBOSS, - MSM_CAMERA_EFFECT_MODE_SKETCH, - MSM_CAMERA_EFFECT_MODE_NEON, - MSM_CAMERA_EFFECT_MODE_MAX -}; - -enum { - MSM_CAMERA_WB_MODE_AUTO, - MSM_CAMERA_WB_MODE_CUSTOM, - MSM_CAMERA_WB_MODE_INCANDESCENT, - MSM_CAMERA_WB_MODE_FLUORESCENT, - MSM_CAMERA_WB_MODE_WARM_FLUORESCENT, - MSM_CAMERA_WB_MODE_DAYLIGHT, - MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT, - MSM_CAMERA_WB_MODE_TWILIGHT, - MSM_CAMERA_WB_MODE_SHADE, - MSM_CAMERA_WB_MODE_OFF, - MSM_CAMERA_WB_MODE_MAX -}; - -enum { - MSM_CAMERA_SCENE_MODE_OFF, - MSM_CAMERA_SCENE_MODE_AUTO, - MSM_CAMERA_SCENE_MODE_LANDSCAPE, - MSM_CAMERA_SCENE_MODE_SNOW, - MSM_CAMERA_SCENE_MODE_BEACH, - MSM_CAMERA_SCENE_MODE_SUNSET, - MSM_CAMERA_SCENE_MODE_NIGHT, - MSM_CAMERA_SCENE_MODE_PORTRAIT, - MSM_CAMERA_SCENE_MODE_BACKLIGHT, - MSM_CAMERA_SCENE_MODE_SPORTS, - MSM_CAMERA_SCENE_MODE_ANTISHAKE, - MSM_CAMERA_SCENE_MODE_FLOWERS, - MSM_CAMERA_SCENE_MODE_CANDLELIGHT, - MSM_CAMERA_SCENE_MODE_FIREWORKS, - MSM_CAMERA_SCENE_MODE_PARTY, - MSM_CAMERA_SCENE_MODE_NIGHT_PORTRAIT, - MSM_CAMERA_SCENE_MODE_THEATRE, - MSM_CAMERA_SCENE_MODE_ACTION, - MSM_CAMERA_SCENE_MODE_AR, - MSM_CAMERA_SCENE_MODE_FACE_PRIORITY, - MSM_CAMERA_SCENE_MODE_BARCODE, - MSM_CAMERA_SCENE_MODE_HDR, - MSM_CAMERA_SCENE_MODE_MAX -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, - CSID_RELEASE, -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, - CSIPHY_RELEASE, -}; - -enum camera_vreg_type { - REG_LDO, - REG_VS, - REG_GPIO, -}; - -enum sensor_af_e { - SENSOR_AF_CANCEL = 1, - SENSOR_AF_START, - SENSOR_AF_PRE_FLASH_ON, - SENSOR_AF_PRE_FLASH_OFF, - SENSOR_AF_PRE_FLASH_AE_STABLE, -}; - -struct msm_sensor_gpio_config { -enum msm_sensor_power_seq_gpio_t gpio_name; -uint8_t config_val; -}; - -enum sensor_af_t { - SENSOR_AF_FOCUSSED, - SENSOR_AF_NOT_FOCUSSED, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum cci_i2c_master_t { - MASTER_0, - MASTER_1, - MASTER_MAX, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -struct msm_sensor_info_t { - char sensor_name[MAX_SENSOR_NAME]; - uint32_t session_id; - int32_t subdev_id[SUB_MODULE_MAX]; - uint8_t is_mount_angle_valid; - uint32_t sensor_mount_angle; - int modes_supported; - enum camb_position_t position; -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint8_t *reg_burst_data; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_camera_i2c_array_write_config { - struct msm_camera_i2c_reg_setting conf_array; - uint16_t slave_addr; -}; - -struct msm_camera_i2c_read_config { - uint16_t slave_addr; - uint16_t reg_addr; - enum msm_camera_i2c_data_type data_type; - uint16_t *data; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -struct msm_camera_csi_lane_params { - uint16_t csi_lane_assign; - uint16_t csi_lane_mask; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct camera_vreg_t { - const char *reg_name; - enum camera_vreg_type type; - int min_voltage; - int max_voltage; - int op_mode; - uint32_t delay; -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - void *regulator[1]; -#endif -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_probe_succeed; - char subdev_name[32]; - struct msm_sensor_info_t sensor_info; -}; - -struct sensorb_cfg_data { - int cfgtype; - int flicker_type; - union { - struct msm_sensor_info_t sensor_info; - struct msm_sensor_init_params sensor_init_params; - void *setting; - } cfg; -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - union { - struct msm_camera_csiphy_params *csiphy_params; - struct msm_camera_csi_lane_params *csi_lane_params; - } cfg; -}; - -enum eeprom_cfg_type_t { - CFG_EEPROM_GET_INFO, - CFG_EEPROM_GET_CAL_DATA, - CFG_EEPROM_READ_CAL_DATA, - CFG_EEPROM_READ_DATA, - CFG_EEPROM_READ_COMPRESSED_DATA, - CFG_EEPROM_WRITE_DATA, - CFG_EEPROM_GET_ERASESIZE, - CFG_EEPROM_ERASE, - CFG_EEPROM_POWER_ON, - CFG_EEPROM_POWER_OFF, - CFG_EEPROM_READ_DATA_FROM_HW, - CFG_EEPROM_GET_MM_INFO, - CFG_EEPROM_GET_FW_VERSION_INFO, -}; - -struct eeprom_get_t { - uint32_t num_bytes; -}; - -struct eeprom_read_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t comp_size; -}; - -struct eeprom_write_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t *write_size; - uint8_t compress; -}; - -struct eeprom_erase_t { - uint32_t num_bytes; - uint32_t addr; -}; - -struct eeprom_get_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_size; -}; - -struct msm_eeprom_cfg_data { - enum eeprom_cfg_type_t cfgtype; - uint8_t is_supported; - union { - char eeprom_name[MAX_EEPROM_NAME]; - struct eeprom_get_t get_data; - struct eeprom_read_t read_data; - struct eeprom_write_t write_data; - struct eeprom_erase_t erase_data; - struct eeprom_get_cmm_t get_cmm_data; - } cfg; -}; - -enum msm_sensor_cfg_type_t { - CFG_SET_SLAVE_INFO, - CFG_SLAVE_READ_I2C, - CFG_WRITE_I2C_ARRAY, - CFG_SLAVE_WRITE_I2C_ARRAY, - CFG_WRITE_I2C_SEQ_ARRAY, - CFG_POWER_UP, - CFG_POWER_DOWN, - CFG_SET_STOP_STREAM_SETTING, - CFG_GET_SENSOR_INFO, - CFG_GET_SENSOR_INIT_PARAMS, - CFG_SET_INIT_SETTING, - CFG_SET_RESOLUTION, - CFG_SET_STOP_STREAM, - CFG_SET_START_STREAM, - CFG_SET_GPIO_STATE, - CFG_SET_SENSOR_OTP_CAL, // Randy 10.08 - CFG_SET_SATURATION, - CFG_SET_CONTRAST, - CFG_SET_SHARPNESS, - CFG_SET_ISO, - CFG_SET_EXPOSURE_COMPENSATION, - CFG_SET_ANTIBANDING, - CFG_SET_BESTSHOT_MODE, - CFG_SET_EFFECT, - CFG_SET_WHITE_BALANCE, - CFG_SET_AUTOFOCUS, - CFG_CANCEL_AUTOFOCUS, - CFG_SET_STREAM_TYPE, -}; - -enum msm_actuator_cfg_type_t { - CFG_GET_ACTUATOR_INFO, - CFG_SET_ACTUATOR_INFO, - CFG_SET_DEFAULT_FOCUS, - CFG_MOVE_FOCUS, - CFG_SET_POSITION, - CFG_ACTUATOR_POWERDOWN, - CFG_ACTUATOR_POWERUP, - CFG_SET_ACTUATOR_SW_LANDING, - CFG_ACTUATOR_INIT, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HALL_EFFECT, - ACTUATOR_HVCM, - ACTUATOR_DW9804, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct msm_actuator_move_params_t { - int8_t dir; - int8_t sign_dir; - int16_t dest_step_pos; - int32_t num_steps; - uint16_t curr_lens_pos; - struct damping_params_t *ringing_params; -}; - -struct msm_actuator_tuning_params_t { - int16_t initial_code; - uint16_t pwd_step; - uint16_t region_size; - uint32_t total_steps; - struct region_params_t *region_params; -}; - -struct msm_actuator_params_t { - enum actuator_type act_type; - uint8_t reg_tbl_size; - uint16_t data_size; - uint16_t init_setting_size; - uint32_t i2c_addr; - enum msm_actuator_addr_type i2c_addr_type; - enum msm_actuator_data_type i2c_data_type; - struct msm_actuator_reg_params_t *reg_tbl_params; - struct reg_settings_t *init_settings; -}; - -struct msm_actuator_set_info_t { - struct msm_actuator_params_t actuator_params; - struct msm_actuator_tuning_params_t af_tuning_params; -}; - -struct msm_actuator_get_info_t { - uint32_t focal_length_num; - uint32_t focal_length_den; - uint32_t f_number_num; - uint32_t f_number_den; - uint32_t f_pix_num; - uint32_t f_pix_den; - uint32_t total_f_dist_num; - uint32_t total_f_dist_den; - uint32_t hor_view_angle_num; - uint32_t hor_view_angle_den; - uint32_t ver_view_angle_num; - uint32_t ver_view_angle_den; -}; - -enum af_camera_name { - ACTUATOR_MAIN_CAM_0, - ACTUATOR_MAIN_CAM_1, - ACTUATOR_MAIN_CAM_2, - ACTUATOR_MAIN_CAM_3, - ACTUATOR_MAIN_CAM_4, - ACTUATOR_MAIN_CAM_5, - ACTUATOR_WEB_CAM_0, - ACTUATOR_WEB_CAM_1, - ACTUATOR_WEB_CAM_2, -}; - - -struct msm_actuator_set_position_t { - uint16_t number_of_steps; - uint16_t pos[MAX_NUMBER_OF_STEPS]; - uint16_t delay[MAX_NUMBER_OF_STEPS]; -}; - -struct msm_actuator_cfg_data { - int cfgtype; - uint8_t is_af_supported; - union { - struct msm_actuator_move_params_t move; - struct msm_actuator_set_info_t set_info; - struct msm_actuator_get_info_t get_info; - struct msm_actuator_set_position_t setpos; - enum af_camera_name cam_name; - } cfg; -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, - MSM_ACTUATOR_WRITE_DAC_SEQ, -}; - -enum msm_actuator_init_focus_type{ - MSM_ACTUATOR_INIT_FOCUS_DELAY = 0xDD, - MSM_ACTUATOR_INIT_FOCUS_READ_STATUS = 0xDC, -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -enum msm_camera_led_config_t { - MSM_CAMERA_LED_OFF, - MSM_CAMERA_LED_LOW, - MSM_CAMERA_LED_HIGH, - MSM_CAMERA_LED_INIT, - MSM_CAMERA_LED_RELEASE, -}; - -struct msm_camera_led_cfg_t { - enum msm_camera_led_config_t cfgtype; - uint32_t torch_current; - uint32_t flash_current[MAX_LED_TRIGGERS]; -}; - -/* sensor init structures and enums */ -enum msm_sensor_init_cfg_type_t { - CFG_SINIT_PROBE, - CFG_SINIT_PROBE_DONE, - CFG_SINIT_PROBE_WAIT_DONE, -}; - -struct sensor_init_cfg_data { - enum msm_sensor_init_cfg_type_t cfgtype; - union { - void *setting; - } cfg; -}; - -struct ioctl_native_cmd { - unsigned short mode; - unsigned short address; - unsigned short value_1; - unsigned short value_2; - unsigned short value_3; -}; - -typedef struct -{ - unsigned short iso; - unsigned short shutterspeed; - unsigned short isFlashOn; -} exif_data_t; - -enum msm_cam_flicker_type { - MSM_CAM_FLICKER_50HZ, - MSM_CAM_FLICKER_60HZ, -}; - -#define VIDIOC_MSM_SENSOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data) - -#define VIDIOC_MSM_SENSOR_RELEASE \ - _IO('V', BASE_VIDIOC_PRIVATE + 2) - -#define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t) - -#define VIDIOC_MSM_CSIPHY_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data) - -#define VIDIOC_MSM_CSID_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data) - -#define VIDIOC_MSM_ACTUATOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data) - -#define VIDIOC_MSM_FLASH_LED_DATA_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t) - -#define VIDIOC_MSM_EEPROM_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data) - -#define VIDIOC_MSM_SENSOR_GET_AF_STATUS \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, uint32_t) - -#define VIDIOC_MSM_SENSOR_INIT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data) - -#define VIDIOC_MSM_SENSOR_NATIVE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct ioctl_native_cmd) - -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camera.h deleted file mode 100755 index 21b26c247bc9..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camera.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __LINUX_MSM_CAMERA_H -#define __LINUX_MSM_CAMERA_H - -#include -#include "../../include/uapi/media/msm_camera.h" - -#endif /* __LINUX_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camsensor_sdk.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camsensor_sdk.h deleted file mode 100755 index b01f3116dae3..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msm_camsensor_sdk.h +++ /dev/null @@ -1,311 +0,0 @@ -#ifndef __LINUX_MSM_CAMSENSOR_SDK_H -#define __LINUX_MSM_CAMSENSOR_SDK_H - -#include - -#define KVERSION 0x1 - -#define MAX_POWER_CONFIG 12 -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 -#define MAX_CID 16 -#define I2C_SEQ_REG_DATA_MAX 256 -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#define MAX_ACTUATOR_REG_TBL_SIZE 8 -#define MAX_ACTUATOR_REGION 5 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define MAX_ACTUATOR_INIT_SET 12 -#define MAX_I2C_REG_SET 12 - -#define MAX_NAME_SIZE 32 -#define MAX_FLASH_NUM 8 - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, - SENSOR_I2C, -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_DWORD_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_CUSTOM1, - SENSOR_GPIO_CUSTOM2, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VAF, - CAM_V_CUSTOM1, - CAM_V_CUSTOM2, - CAM_VREG_MAX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HVCM, -}; - -enum msm_flash_driver_type { - FLASH_DRIVER_PMIC, - FLASH_DRIVER_I2C, - FLASH_DRIVER_GPIO, - FLASH_DRIVER_DEFAULT -}; - -enum msm_flash_cfg_type_t { - CFG_FLASH_INIT, - CFG_FLASH_RELEASE, - CFG_FLASH_OFF, - CFG_FLASH_LOW, - CFG_FLASH_HIGH, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting power_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting power_down_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - char ois_name[32]; - char flash_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_flash_supported; -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID]; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - uint32_t csi_clk; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; - uint32_t csiphy_clk; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting_array { - struct msm_camera_i2c_reg_array reg_setting_a[MAX_I2C_REG_SET]; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_camera.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_camera.h deleted file mode 100755 index 7f19a88af73b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_camera.h +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef __LINUX_MSMB_CAMERA_H -#define __LINUX_MSMB_CAMERA_H - -#include -#include -#include - -#define MSM_CAM_V4L2_IOCTL_NOTIFY \ - _IOW('V', BASE_VIDIOC_PRIVATE + 30, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_META \ - _IOW('V', BASE_VIDIOC_PRIVATE + 31, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_CMD_ACK \ - _IOW('V', BASE_VIDIOC_PRIVATE + 32, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR \ - _IOW('V', BASE_VIDIOC_PRIVATE + 33, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS \ - _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event) - -#define QCAMERA_DEVICE_GROUP_ID 1 -#define QCAMERA_VNODE_GROUP_ID 2 -#define MSM_CAMERA_NAME "msm_camera" -#define MSM_CONFIGURATION_NAME "msm_config" -#define MSM_CAMERA_DUMMY_NAME "msm_cam_dummy" - -#define MSM_CAMERA_SUBDEV_CSIPHY 0 -#define MSM_CAMERA_SUBDEV_CSID 1 -#define MSM_CAMERA_SUBDEV_ISPIF 2 -#define MSM_CAMERA_SUBDEV_VFE 3 -#define MSM_CAMERA_SUBDEV_AXI 4 -#define MSM_CAMERA_SUBDEV_VPE 5 -#define MSM_CAMERA_SUBDEV_SENSOR 6 -#define MSM_CAMERA_SUBDEV_ACTUATOR 7 -#define MSM_CAMERA_SUBDEV_EEPROM 8 -#define MSM_CAMERA_SUBDEV_CPP 9 -#define MSM_CAMERA_SUBDEV_CCI 10 -#define MSM_CAMERA_SUBDEV_LED_FLASH 11 -#define MSM_CAMERA_SUBDEV_STROBE_FLASH 12 -#define MSM_CAMERA_SUBDEV_BUF_MNGR 13 -#define MSM_CAMERA_SUBDEV_SENSOR_INIT 14 - -#define MSM_MAX_CAMERA_SENSORS 5 - -/* The below macro is defined to put an upper limit on maximum - * number of buffer requested per stream. In case of extremely - * large value for number of buffer due to data structure corruption - * we return error to avoid integer overflow. This value may be - * configured in future*/ -#define MSM_CAMERA_MAX_STREAM_BUF 40 - -/* featur base */ -#define MSM_CAMERA_FEATURE_BASE 0x00010000 -#define MSM_CAMERA_FEATURE_SHUTDOWN (MSM_CAMERA_FEATURE_BASE + 1) - -#define MSM_CAMERA_STATUS_BASE 0x00020000 -#define MSM_CAMERA_STATUS_FAIL (MSM_CAMERA_STATUS_BASE + 1) -#define MSM_CAMERA_STATUS_SUCCESS (MSM_CAMERA_STATUS_BASE + 2) - -/* event type */ -#define MSM_CAMERA_V4L2_EVENT_TYPE (V4L2_EVENT_PRIVATE_START + 0x00002000) - -/* event id */ -#define MSM_CAMERA_EVENT_MIN 0 -#define MSM_CAMERA_NEW_SESSION (MSM_CAMERA_EVENT_MIN + 1) -#define MSM_CAMERA_DEL_SESSION (MSM_CAMERA_EVENT_MIN + 2) -#define MSM_CAMERA_SET_PARM (MSM_CAMERA_EVENT_MIN + 3) -#define MSM_CAMERA_GET_PARM (MSM_CAMERA_EVENT_MIN + 4) -#define MSM_CAMERA_MAPPING_CFG (MSM_CAMERA_EVENT_MIN + 5) -#define MSM_CAMERA_MAPPING_SES (MSM_CAMERA_EVENT_MIN + 6) -#define MSM_CAMERA_MSM_NOTIFY (MSM_CAMERA_EVENT_MIN + 7) -#define MSM_CAMERA_EVENT_MAX (MSM_CAMERA_EVENT_MIN + 8) - -/* data.command */ -#define MSM_CAMERA_PRIV_S_CROP (V4L2_CID_PRIVATE_BASE + 1) -#define MSM_CAMERA_PRIV_G_CROP (V4L2_CID_PRIVATE_BASE + 2) -#define MSM_CAMERA_PRIV_G_FMT (V4L2_CID_PRIVATE_BASE + 3) -#define MSM_CAMERA_PRIV_S_FMT (V4L2_CID_PRIVATE_BASE + 4) -#define MSM_CAMERA_PRIV_TRY_FMT (V4L2_CID_PRIVATE_BASE + 5) -#define MSM_CAMERA_PRIV_METADATA (V4L2_CID_PRIVATE_BASE + 6) -#define MSM_CAMERA_PRIV_QUERY_CAP (V4L2_CID_PRIVATE_BASE + 7) -#define MSM_CAMERA_PRIV_STREAM_ON (V4L2_CID_PRIVATE_BASE + 8) -#define MSM_CAMERA_PRIV_STREAM_OFF (V4L2_CID_PRIVATE_BASE + 9) -#define MSM_CAMERA_PRIV_NEW_STREAM (V4L2_CID_PRIVATE_BASE + 10) -#define MSM_CAMERA_PRIV_DEL_STREAM (V4L2_CID_PRIVATE_BASE + 11) -#define MSM_CAMERA_PRIV_SHUTDOWN (V4L2_CID_PRIVATE_BASE + 12) -#define MSM_CAMERA_PRIV_STREAM_INFO_SYNC \ - (V4L2_CID_PRIVATE_BASE + 13) - -/* data.status - success */ -#define MSM_CAMERA_CMD_SUCESS 0x00000001 -#define MSM_CAMERA_BUF_MAP_SUCESS 0x00000002 - -/* data.status - error */ -#define MSM_CAMERA_ERR_EVT_BASE 0x00010000 -#define MSM_CAMERA_ERR_CMD_FAIL (MSM_CAMERA_ERR_EVT_BASE + 1) -#define MSM_CAMERA_ERR_MAPPING (MSM_CAMERA_ERR_EVT_BASE + 2) - -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 16 elements */ -struct msm_v4l2_event_data { - /*word 0*/ - unsigned int command; - /*word 1*/ - unsigned int status; - /*word 2*/ - unsigned int session_id; - /*word 3*/ - unsigned int stream_id; - /*word 4*/ - unsigned int map_op; - /*word 5*/ - unsigned int map_buf_idx; - /*word 6*/ - unsigned int notify; - /*word 7*/ - unsigned int arg_value; - /*word 8*/ - unsigned int ret_value; - /*word 9*/ - unsigned int v4l2_event_type; - /*word 10*/ - unsigned int v4l2_event_id; - /*word 11*/ - unsigned int nop5; - /*word 12*/ - unsigned int nop6; - /*word 13*/ - unsigned int nop7; - /*word 14*/ - unsigned int nop8; - /*word 15*/ - unsigned int nop9; -}; - -/* map to v4l2_format.fmt.raw_data */ -struct msm_v4l2_format_data { - enum v4l2_buf_type type; - unsigned int width; - unsigned int height; - unsigned int pixelformat; /* FOURCC */ - unsigned char num_planes; - unsigned int plane_sizes[VIDEO_MAX_PLANES]; -}; - -/* MSM Four-character-code (FOURCC) */ -#define msm_v4l2_fourcc(a, b, c, d)\ - ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) |\ - ((__u32)(d) << 24)) - -/* Composite stats */ -#define MSM_V4L2_PIX_FMT_STATS_COMB v4l2_fourcc('S', 'T', 'C', 'M') -/* AEC stats */ -#define MSM_V4L2_PIX_FMT_STATS_AE v4l2_fourcc('S', 'T', 'A', 'E') -/* AF stats */ -#define MSM_V4L2_PIX_FMT_STATS_AF v4l2_fourcc('S', 'T', 'A', 'F') -/* AWB stats */ -#define MSM_V4L2_PIX_FMT_STATS_AWB v4l2_fourcc('S', 'T', 'W', 'B') -/* IHIST stats */ -#define MSM_V4L2_PIX_FMT_STATS_IHST v4l2_fourcc('I', 'H', 'S', 'T') -/* Column count stats */ -#define MSM_V4L2_PIX_FMT_STATS_CS v4l2_fourcc('S', 'T', 'C', 'S') -/* Row count stats */ -#define MSM_V4L2_PIX_FMT_STATS_RS v4l2_fourcc('S', 'T', 'R', 'S') -/* Bayer Grid stats */ -#define MSM_V4L2_PIX_FMT_STATS_BG v4l2_fourcc('S', 'T', 'B', 'G') -/* Bayer focus stats */ -#define MSM_V4L2_PIX_FMT_STATS_BF v4l2_fourcc('S', 'T', 'B', 'F') -/* Bayer hist stats */ -#define MSM_V4L2_PIX_FMT_STATS_BHST v4l2_fourcc('B', 'H', 'S', 'T') - -enum smmu_attach_mode { - NON_SECURE_MODE, - SECURE_MODE, - MAX_PROTECTION_MODE, -}; - -struct msm_camera_smmu_attach_type { - enum smmu_attach_mode attach; -}; - -#endif /* __LINUX_MSMB_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_isp.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_isp.h deleted file mode 100755 index 88c9a69f20e2..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_isp.h +++ /dev/null @@ -1,465 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSMB_ISP__ -#define __MSMB_ISP__ - -#include - -#define MAX_PLANES_PER_STREAM 3 -#define MAX_NUM_STREAM 7 - -#define ISP_VERSION_44 44 -#define ISP_VERSION_40 40 -#define ISP_VERSION_32 32 -#define ISP_NATIVE_BUF_BIT (0x10000 << 0) -#define ISP0_BIT (0x10000 << 1) -#define ISP1_BIT (0x10000 << 2) -#define ISP_META_CHANNEL_BIT (0x10000 << 3) -#define ISP_SCRATCH_BUF_BIT (0x10000 << 4) -#define ISP_STATS_STREAM_BIT 0x80000000 - -struct msm_vfe_cfg_cmd_list; - -#define MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR 0xCACFC - -enum ISP_START_PIXEL_PATTERN { - ISP_BAYER_RGRGRG, - ISP_BAYER_GRGRGR, - ISP_BAYER_BGBGBG, - ISP_BAYER_GBGBGB, - ISP_YUV_YCbYCr, - ISP_YUV_YCrYCb, - ISP_YUV_CbYCrY, - ISP_YUV_CrYCbY, - ISP_PIX_PATTERN_MAX -}; - -enum msm_vfe_plane_fmt { - Y_PLANE, - CB_PLANE, - CR_PLANE, - CRCB_PLANE, - CBCR_PLANE, - VFE_PLANE_FMT_MAX -}; - -enum msm_vfe_input_src { - VFE_PIX_0, - VFE_RAW_0, - VFE_RAW_1, - VFE_RAW_2, - VFE_SRC_MAX, -}; - -enum msm_vfe_axi_stream_src { - PIX_ENCODER, - PIX_VIEWFINDER, - CAMIF_RAW, - IDEAL_RAW, - RDI_INTF_0, - RDI_INTF_1, - RDI_INTF_2, - VFE_AXI_SRC_MAX -}; - -enum msm_vfe_frame_skip_pattern { - NO_SKIP, - EVERY_2FRAME, - EVERY_3FRAME, - EVERY_4FRAME, - EVERY_5FRAME, - EVERY_6FRAME, - EVERY_7FRAME, - EVERY_8FRAME, - EVERY_16FRAME, - EVERY_32FRAME, - SKIP_ALL, - MAX_SKIP, -}; - -enum msm_vfe_camif_input { - CAMIF_DISABLED, - CAMIF_PAD_REG_INPUT, - CAMIF_MIDDI_INPUT, - CAMIF_MIPI_INPUT, -}; - -struct msm_vfe_camif_cfg { - uint32_t lines_per_frame; - uint32_t pixels_per_line; - uint32_t first_pixel; - uint32_t last_pixel; - uint32_t first_line; - uint32_t last_line; - uint32_t epoch_line0; - uint32_t epoch_line1; - enum msm_vfe_camif_input camif_input; -}; - -enum msm_vfe_inputmux { - CAMIF, - TESTGEN, - EXTERNAL_READ, -}; - -enum msm_vfe_stats_composite_group { - STATS_COMPOSITE_GRP_NONE, - STATS_COMPOSITE_GRP_1, - STATS_COMPOSITE_GRP_2, - STATS_COMPOSITE_GRP_MAX, -}; - -struct msm_vfe_pix_cfg { - struct msm_vfe_camif_cfg camif_cfg; - enum msm_vfe_inputmux input_mux; - enum ISP_START_PIXEL_PATTERN pixel_pattern; - uint32_t input_format; -}; - -struct msm_vfe_rdi_cfg { - uint8_t cid; - uint8_t frame_based; -}; - -struct msm_vfe_input_cfg { - union { - struct msm_vfe_pix_cfg pix_cfg; - struct msm_vfe_rdi_cfg rdi_cfg; - } d; - enum msm_vfe_input_src input_src; - uint32_t input_pix_clk; -}; - -struct msm_vfe_axi_plane_cfg { - uint32_t output_width; /*Include padding*/ - uint32_t output_height; - uint32_t output_stride; - uint32_t output_scan_lines; - uint32_t output_plane_format; /*Y/Cb/Cr/CbCr*/ - uint32_t plane_addr_offset; - uint8_t csid_src; /*RDI 0-2*/ - uint8_t rdi_cid;/*CID 1-16*/ -}; - -struct msm_vfe_axi_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - uint32_t vt_enable; - uint32_t output_format;/*Planar/RAW/Misc*/ - enum msm_vfe_axi_stream_src stream_src; /*CAMIF/IDEAL/RDIs*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - - uint32_t burst_count; - uint32_t hfr_mode; - uint8_t frame_base; - - uint32_t init_frame_drop; /*MAX 31 Frames*/ - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - uint8_t buf_divert; /* if TRUE no vb2 buf done. */ - /*Return values*/ - uint32_t axi_stream_handle; - uint32_t burst_len; -}; - -struct msm_vfe_axi_stream_release_cmd { - uint32_t stream_handle; -}; - -enum msm_vfe_axi_stream_cmd { - STOP_STREAM, - START_STREAM, - STOP_IMMEDIATELY, -}; - -struct msm_vfe_axi_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MAX_NUM_STREAM]; - enum msm_vfe_axi_stream_cmd cmd; -}; - -enum msm_vfe_axi_stream_update_type { - AXI_STREAM_UPDATE_INVALID, - ENABLE_STREAM_BUF_DIVERT, - DISABLE_STREAM_BUF_DIVERT, - UPDATE_STREAM_FRAMEDROP_PATTERN, - UPDATE_STREAM_AXI_CONFIG, - UPDATE_STREAM_REQUEST_FRAMES, -}; - -struct msm_vfe_axi_stream_cfg_update_info { - uint32_t stream_handle; - uint32_t output_format; - uint32_t request_frm_num; - enum msm_vfe_frame_skip_pattern skip_pattern; - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; -}; - -struct msm_vfe_axi_stream_update_cmd { - uint32_t num_streams; - enum msm_vfe_axi_stream_update_type update_type; - struct msm_vfe_axi_stream_cfg_update_info update_info[MAX_NUM_STREAM]; -}; - -enum msm_isp_stats_type { - MSM_ISP_STATS_AEC, /* legacy based AEC */ - MSM_ISP_STATS_AF, /* legacy based AF */ - MSM_ISP_STATS_AWB, /* legacy based AWB */ - MSM_ISP_STATS_RS, /* legacy based RS */ - MSM_ISP_STATS_CS, /* legacy based CS */ - MSM_ISP_STATS_IHIST, /* legacy based HIST */ - MSM_ISP_STATS_SKIN, /* legacy based SKIN */ - MSM_ISP_STATS_BG, /* Bayer Grids */ - MSM_ISP_STATS_BF, /* Bayer Focus */ - MSM_ISP_STATS_BE, /* Bayer Exposure*/ - MSM_ISP_STATS_BHIST, /* Bayer Hist */ - MSM_ISP_STATS_BF_SCALE, /* Bayer Focus scale */ - MSM_ISP_STATS_MAX /* MAX */ -}; - -struct msm_vfe_stats_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - enum msm_isp_stats_type stats_type; - uint32_t composite_flag; - uint32_t framedrop_pattern; - uint32_t irq_subsample_pattern; - uint32_t buffer_offset; - uint32_t stream_handle; -}; - -struct msm_vfe_stats_stream_release_cmd { - uint32_t stream_handle; -}; -struct msm_vfe_stats_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MSM_ISP_STATS_MAX]; - uint8_t enable; - uint32_t stats_burst_len; -}; - -enum msm_vfe_reg_cfg_type { - VFE_WRITE, - VFE_WRITE_MB, - VFE_READ, - VFE_CFG_MASK, - VFE_WRITE_DMI_16BIT, - VFE_WRITE_DMI_32BIT, - VFE_WRITE_DMI_64BIT, - VFE_READ_DMI_16BIT, - VFE_READ_DMI_32BIT, - VFE_READ_DMI_64BIT, - GET_MAX_CLK_RATE, - GET_ISP_ID, - VFE_HW_UPDATE_LOCK, - VFE_HW_UPDATE_UNLOCK, - SET_WM_UB_SIZE, -}; - -struct msm_vfe_cfg_cmd2 { - uint16_t num_cfg; - uint16_t cmd_len; - uint32_t frame_id; - void __user *cfg_data; - void __user *cfg_cmd; -}; - -struct msm_vfe_cfg_cmd_list { - struct msm_vfe_cfg_cmd2 cfg_cmd; - struct msm_vfe_cfg_cmd_list *next; - uint32_t next_size; -}; - -struct msm_vfe_reg_rw_info { - uint32_t reg_offset; - uint32_t cmd_data_offset; - uint32_t len; -}; - -struct msm_vfe_reg_mask_info { - uint32_t reg_offset; - uint32_t mask; - uint32_t val; -}; - -struct msm_vfe_reg_dmi_info { - uint32_t hi_tbl_offset; /*Optional*/ - uint32_t lo_tbl_offset; /*Required*/ - uint32_t len; -}; - -struct msm_vfe_reg_cfg_cmd { - union { - struct msm_vfe_reg_rw_info rw_info; - struct msm_vfe_reg_mask_info mask_info; - struct msm_vfe_reg_dmi_info dmi_info; - } u; - - enum msm_vfe_reg_cfg_type cmd_type; -}; - -enum msm_isp_buf_type { - ISP_PRIVATE_BUF, - ISP_SHARE_BUF, - MAX_ISP_BUF_TYPE, -}; - -struct msm_isp_buf_request { - uint32_t session_id; - uint32_t stream_id; - uint8_t num_buf; - uint32_t handle; - enum msm_isp_buf_type buf_type; -}; - -struct msm_isp_qbuf_info { - uint32_t handle; - int32_t buf_idx; - /*Only used for prepare buffer*/ - struct v4l2_buffer buffer; - /*Only used for diverted buffer*/ - uint32_t dirty_buf; -}; - -struct msm_vfe_axi_src_state { - enum msm_vfe_input_src input_src; - uint32_t src_active; -}; - -enum msm_isp_event_idx { - ISP_REG_UPDATE = 0, - ISP_START_ACK = 1, - ISP_STOP_ACK = 2, - ISP_IRQ_VIOLATION = 3, - ISP_WM_BUS_OVERFLOW = 4, - ISP_STATS_OVERFLOW = 5, - ISP_CAMIF_ERROR = 6, - ISP_BUF_DONE = 9, - ISP_EVENT_MAX = 10 -}; - -#define ISP_EVENT_OFFSET 8 -#define ISP_EVENT_BASE (V4L2_EVENT_PRIVATE_START) -#define ISP_BUF_EVENT_BASE (ISP_EVENT_BASE + (1 << ISP_EVENT_OFFSET)) -#define ISP_STATS_EVENT_BASE (ISP_EVENT_BASE + (2 << ISP_EVENT_OFFSET)) -#define ISP_SOF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET)) -#define ISP_EOF_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET)) -#define ISP_EVENT_REG_UPDATE (ISP_EVENT_BASE + ISP_REG_UPDATE) -#define ISP_EVENT_START_ACK (ISP_EVENT_BASE + ISP_START_ACK) -#define ISP_EVENT_STOP_ACK (ISP_EVENT_BASE + ISP_STOP_ACK) -#define ISP_EVENT_IRQ_VIOLATION (ISP_EVENT_BASE + ISP_IRQ_VIOLATION) -#define ISP_EVENT_WM_BUS_OVERFLOW (ISP_EVENT_BASE + ISP_WM_BUS_OVERFLOW) -#define ISP_EVENT_STATS_OVERFLOW (ISP_EVENT_BASE + ISP_STATS_OVERFLOW) -#define ISP_EVENT_CAMIF_ERROR (ISP_EVENT_BASE + ISP_CAMIF_ERROR) -#define ISP_EVENT_SOF (ISP_SOF_EVENT_BASE) -#define ISP_EVENT_EOF (ISP_EOF_EVENT_BASE) -#define ISP_EVENT_BUF_DONE (ISP_EVENT_BASE + ISP_BUF_DONE) -#define ISP_EVENT_BUF_DIVERT (ISP_BUF_EVENT_BASE) -#define ISP_EVENT_STATS_NOTIFY (ISP_STATS_EVENT_BASE) -#define ISP_EVENT_COMP_STATS_NOTIFY (ISP_EVENT_STATS_NOTIFY + MSM_ISP_STATS_MAX) -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 64 bytes */ - -struct msm_isp_buf_event { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; - uint32_t output_format; - int8_t buf_idx; -}; -struct msm_isp_stats_event { - uint32_t stats_mask; /* 4 bytes */ - uint8_t stats_buf_idxs[MSM_ISP_STATS_MAX]; /* 11 bytes */ -}; - -struct msm_isp_stream_ack { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; -}; - -struct msm_isp_event_data { - /*Wall clock except for buffer divert events - *which use monotonic clock - */ - struct timeval timestamp; - /* Monotonic timestamp since bootup */ - struct timeval mono_timestamp; - enum msm_vfe_input_src input_intf; - uint32_t frame_id; - union { - struct msm_isp_stats_event stats; - struct msm_isp_buf_event buf_done; - } u; /* union can have max 52 bytes */ -}; - -#define V4L2_PIX_FMT_QBGGR8 v4l2_fourcc('Q', 'B', 'G', '8') -#define V4L2_PIX_FMT_QGBRG8 v4l2_fourcc('Q', 'G', 'B', '8') -#define V4L2_PIX_FMT_QGRBG8 v4l2_fourcc('Q', 'G', 'R', '8') -#define V4L2_PIX_FMT_QRGGB8 v4l2_fourcc('Q', 'R', 'G', '8') -#define V4L2_PIX_FMT_QBGGR10 v4l2_fourcc('Q', 'B', 'G', '0') -#define V4L2_PIX_FMT_QGBRG10 v4l2_fourcc('Q', 'G', 'B', '0') -#define V4L2_PIX_FMT_QGRBG10 v4l2_fourcc('Q', 'G', 'R', '0') -#define V4L2_PIX_FMT_QRGGB10 v4l2_fourcc('Q', 'R', 'G', '0') -#define V4L2_PIX_FMT_QBGGR12 v4l2_fourcc('Q', 'B', 'G', '2') -#define V4L2_PIX_FMT_QGBRG12 v4l2_fourcc('Q', 'G', 'B', '2') -#define V4L2_PIX_FMT_QGRBG12 v4l2_fourcc('Q', 'G', 'R', '2') -#define V4L2_PIX_FMT_QRGGB12 v4l2_fourcc('Q', 'R', 'G', '2') -#define V4L2_PIX_FMT_NV14 v4l2_fourcc('N', 'V', '1', '4') -#define V4L2_PIX_FMT_NV41 v4l2_fourcc('N', 'V', '4', '1') -#define V4L2_PIX_FMT_META v4l2_fourcc('Q', 'M', 'E', 'T') - -#define VIDIOC_MSM_VFE_REG_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2) - -#define VIDIOC_MSM_ISP_REQUEST_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+1, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_ENQUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+2, struct msm_isp_qbuf_info) - -#define VIDIOC_MSM_ISP_RELEASE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+3, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_REQUEST_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+4, struct msm_vfe_axi_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+5, struct msm_vfe_axi_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+6, struct msm_vfe_axi_stream_release_cmd) - -#define VIDIOC_MSM_ISP_INPUT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+7, struct msm_vfe_input_cfg) - -#define VIDIOC_MSM_ISP_SET_SRC_STATE \ - _IOWR('V', BASE_VIDIOC_PRIVATE+8, struct msm_vfe_axi_src_state) - -#define VIDIOC_MSM_ISP_REQUEST_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+9, \ - struct msm_vfe_stats_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+10, struct msm_vfe_stats_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+11, \ - struct msm_vfe_stats_stream_release_cmd) - -#define VIDIOC_MSM_ISP_UPDATE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+13, struct msm_vfe_axi_stream_update_cmd) - -#define VIDIOC_MSM_VFE_REG_LIST_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+14, struct msm_vfe_cfg_cmd_list) - -#endif /* __MSMB_ISP__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_ispif.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_ispif.h deleted file mode 100755 index 641723731ac0..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_ispif.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef MSM_CAM_ISPIF_H -#define MSM_CAM_ISPIF_H - -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V3 0x30000000 - -enum msm_ispif_vfe_intf { - VFE0, - VFE1, - VFE_MAX -}; -#define VFE0_MASK (1 << VFE0) -#define VFE1_MASK (1 << VFE1) - -enum msm_ispif_intftype { - PIX0, - RDI0, - PIX1, - RDI1, - RDI2, - INTF_MAX -}; -#define MAX_PARAM_ENTRIES (INTF_MAX * 2) -#define MAX_CID_CH 8 - -#define PIX0_MASK (1 << PIX0) -#define PIX1_MASK (1 << PIX1) -#define RDI0_MASK (1 << RDI0) -#define RDI1_MASK (1 << RDI1) -#define RDI2_MASK (1 << RDI2) - - -enum msm_ispif_vc { - VC0, - VC1, - VC2, - VC3, - VC_MAX -}; - -enum msm_ispif_cid { - CID0, - CID1, - CID2, - CID3, - CID4, - CID5, - CID6, - CID7, - CID8, - CID9, - CID10, - CID11, - CID12, - CID13, - CID14, - CID15, - CID_MAX -}; - -enum msm_ispif_csid { - CSID0, - CSID1, - CSID2, - CSID3, - CSID_MAX -}; - -struct msm_ispif_params_entry { - enum msm_ispif_vfe_intf vfe_intf; - enum msm_ispif_intftype intftype; - int num_cids; - enum msm_ispif_cid cids[3]; - enum msm_ispif_csid csid; - int crop_enable; - uint16_t crop_start_pixel; - uint16_t crop_end_pixel; -}; - -struct msm_ispif_param_data { - uint32_t num; - struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES]; -}; - -struct msm_isp_info { - uint32_t max_resolution; - uint32_t id; - uint32_t ver; -}; - -struct msm_ispif_vfe_info { - int num_vfe; - struct msm_isp_info info[VFE_MAX]; -}; - -enum ispif_cfg_type_t { - ISPIF_CLK_ENABLE, - ISPIF_CLK_DISABLE, - ISPIF_INIT, - ISPIF_CFG, - ISPIF_START_FRAME_BOUNDARY, - ISPIF_STOP_FRAME_BOUNDARY, - ISPIF_STOP_IMMEDIATELY, - ISPIF_RELEASE, - ISPIF_ENABLE_REG_DUMP, - ISPIF_SET_VFE_INFO, -}; - -struct ispif_cfg_data { - enum ispif_cfg_type_t cfg_type; - union { - int reg_dump; /* ISPIF_ENABLE_REG_DUMP */ - uint32_t csid_version; /* ISPIF_INIT */ - struct msm_ispif_vfe_info vfe_info; /* ISPIF_SET_VFE_INFO */ - struct msm_ispif_param_data params; /* CFG, START, STOP */ - }; -}; - -#define VIDIOC_MSM_ISPIF_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data) - -#endif /* MSM_CAM_ISPIF_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_pproc.h b/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_pproc.h deleted file mode 100755 index ac50b51f5cd0..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/media/msmb_pproc.h +++ /dev/null @@ -1,362 +0,0 @@ -#ifndef __MSMB_PPROC_H -#define __MSMB_PPROC_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES VIDEO_MAX_PLANES - -#define MAX_NUM_CPP_STRIPS 8 -#define MSM_CPP_MAX_NUM_PLANES 3 -#define MSM_CPP_MIN_FRAME_LENGTH 13 -#define MSM_CPP_MAX_FRAME_LENGTH 2048 -#define MSM_CPP_MAX_FW_NAME_LEN 32 -#define MAX_FREQ_TBL 10 - - -enum msm_cpp_frame_type { - MSM_CPP_OFFLINE_FRAME, - MSM_CPP_REALTIME_FRAME, -}; - -enum msm_vpe_frame_type { - MSM_VPE_OFFLINE_FRAME, - MSM_VPE_REALTIME_FRAME, -}; - -struct msm_cpp_frame_strip_info { - int scale_v_en; - int scale_h_en; - - int upscale_v_en; - int upscale_h_en; - - int src_start_x; - int src_end_x; - int src_start_y; - int src_end_y; - - /* Padding is required for upscaler because it does not - * pad internally like other blocks, also needed for rotation - * rotation expects all the blocks in the stripe to be the same size - * Padding is done such that all the extra padded pixels - * are on the right and bottom - */ - int pad_bottom; - int pad_top; - int pad_right; - int pad_left; - - int v_init_phase; - int h_init_phase; - int h_phase_step; - int v_phase_step; - - int prescale_crop_width_first_pixel; - int prescale_crop_width_last_pixel; - int prescale_crop_height_first_line; - int prescale_crop_height_last_line; - - int postscale_crop_height_first_line; - int postscale_crop_height_last_line; - int postscale_crop_width_first_pixel; - int postscale_crop_width_last_pixel; - - int dst_start_x; - int dst_end_x; - int dst_start_y; - int dst_end_y; - - int bytes_per_pixel; - unsigned int source_address; - unsigned int destination_address; - unsigned int compl_destination_address; - unsigned int src_stride; - unsigned int dst_stride; - int rotate_270; - int horizontal_flip; - int vertical_flip; - int scale_output_width; - int scale_output_height; - int prescale_crop_en; - int postscale_crop_en; -}; - -struct msm_cpp_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; - uint32_t identity; -}; - -struct msm_cpp_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_cpp_buffer_info_t *buffer_info; -}; - -struct msm_cpp_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - struct msm_cpp_frame_strip_info *strip_info; - uint32_t msg_len; - uint32_t *cpp_cmd_msg; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - struct timeval in_time, out_time; - void *cookie; - int32_t *status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; -}; - -struct cpp_hw_info { - uint32_t cpp_hw_version; - uint32_t cpp_hw_caps; - unsigned long freq_tbl[MAX_FREQ_TBL]; - uint32_t freq_tbl_count; -}; - -struct msm_vpe_frame_strip_info { - uint32_t src_w; - uint32_t src_h; - uint32_t dst_w; - uint32_t dst_h; - uint32_t src_x; - uint32_t src_y; - uint32_t phase_step_x; - uint32_t phase_step_y; - uint32_t phase_init_x; - uint32_t phase_init_y; -}; - -struct msm_vpe_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; -}; - -struct msm_vpe_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_vpe_buffer_info_t *buffer_info; -}; - -struct msm_vpe_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_vpe_frame_type frame_type; - struct msm_vpe_frame_strip_info strip_info; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - unsigned long src_phyaddr; - unsigned long dest_phyaddr; - unsigned long src_chroma_plane_offset; - unsigned long dest_chroma_plane_offset; - struct timeval in_time, out_time; - void *cookie; - - struct msm_vpe_buffer_info_t input_buffer_info; - struct msm_vpe_buffer_info_t output_buffer_info; -}; - -struct msm_pproc_queue_buf_info { - struct msm_buf_mngr_info buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t) - - -#define VIDIOC_MSM_VPE_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t) - -#define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0) -#define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1) - -struct msm_camera_v4l2_ioctl_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - void __user *ioctl_ptr; -}; - -#ifdef CONFIG_COMPAT -struct msm_cpp_frame_info32_t { - int32_t frame_id; - struct compat_timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - compat_caddr_t strip_info; - uint32_t msg_len; - compat_uint_t cpp_cmd_msg; - int src_fd; - int dst_fd; - struct compat_timeval in_time, out_time; - compat_caddr_t cookie; - compat_int_t status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; - struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2]; -}; - -struct msm_cpp_stream_buff_info32_t { - uint32_t identity; - uint32_t num_buffs; - compat_caddr_t buffer_info; -}; - -struct msm_pproc_queue_buf_info32_t { - struct msm_buf_mngr_info32_t buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl32_t) - -struct msm_camera_v4l2_ioctl32_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - compat_caddr_t ioctl_ptr; -}; -#endif - -#endif /* __MSMB_PPROC_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/soc/qcom/camera2.h b/drivers/media/platform/msm/camera_v2_fortuna/include/soc/qcom/camera2.h deleted file mode 100644 index a581779e8bc4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/soc/qcom/camera2.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __CAMERA2_H__ -#define __CAMERA2_H__ - -#include "../../../include/media/msm_cam_sensor.h" -#include -#include -#include -#include -#include -#define MAX_SPECIAL_SUPPORT_SIZE 10 - -enum msm_camera_device_type_t { - MSM_CAMERA_I2C_DEVICE, - MSM_CAMERA_PLATFORM_DEVICE, - MSM_CAMERA_SPI_DEVICE, -}; - -enum msm_bus_perf_setting { - S_INIT, - S_PREVIEW, - S_VIDEO, - S_CAPTURE, - S_ZSL, - S_STEREO_VIDEO, - S_STEREO_CAPTURE, - S_DEFAULT, - S_LIVESHOT, - S_DUAL, - S_EXIT -}; - -struct msm_camera_slave_info { - uint16_t sensor_slave_addr; - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_cam_clk_info { - const char *clk_name; - long clk_rate; - uint32_t delay; -}; - -struct msm_pinctrl_info { - struct pinctrl *pinctrl; - struct pinctrl_state *gpio_state_active; - struct pinctrl_state *gpio_state_suspend; - bool use_pinctrl; -}; - -struct msm_cam_clk_setting { - struct msm_cam_clk_info *clk_info; - uint16_t num_clk_info; - uint8_t enable; -}; - -struct v4l2_subdev_info { - enum v4l2_mbus_pixelcode code; - enum v4l2_colorspace colorspace; - uint16_t fmt; - uint16_t order; -}; - -struct msm_camera_power_ctrl_t { - struct device *dev; - struct msm_sensor_power_setting *power_setting; - uint16_t power_setting_size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t power_down_setting_size; - struct msm_camera_gpio_conf *gpio_conf; - struct camera_vreg_t *cam_vreg; - int num_vreg; - struct msm_camera_i2c_conf *i2c_conf; - struct msm_cam_clk_info *clk_info; - struct msm_pinctrl_info pinctrl_info; - uint8_t cam_pinctrl_status; - uint16_t clk_info_size; -}; - -struct msm_camera_sensor_board_info { - const char *sensor_name; - const char *eeprom_name; - const char *actuator_name; - const char *ois_name; - const char *special_support_sensors[MAX_SPECIAL_SUPPORT_SIZE]; - int32_t special_support_size; - struct msm_camera_slave_info *slave_info; - struct msm_camera_csi_lane_params *csi_lane_params; - struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; - struct msm_actuator_info *actuator_info; - struct msm_sensor_info_t *sensor_info; - const char *misc_regulator; - struct msm_camera_power_ctrl_t power_info; - struct msm_camera_sensor_slave_info *cam_slave_info; -}; - -enum msm_camera_i2c_cmd_type { - MSM_CAMERA_I2C_CMD_WRITE, - MSM_CAMERA_I2C_CMD_POLL, -}; - -struct msm_camera_i2c_reg_conf { - uint16_t reg_addr; - uint16_t reg_data; - enum msm_camera_i2c_data_type dt; - enum msm_camera_i2c_cmd_type cmd_type; - int16_t mask; -}; - -struct msm_camera_i2c_conf_array { - struct msm_camera_i2c_reg_conf *conf; - uint16_t size; - uint16_t delay; - enum msm_camera_i2c_data_type data_type; -}; - -struct eeprom_map_t { - uint32_t valid_size; - uint32_t addr; - uint32_t addr_t; - uint32_t data; - uint32_t data_t; - uint32_t delay; -}; - -struct eeprom_slave_add_t { - uint32_t addr; -}; - -struct msm_eeprom_memory_map_t { - struct eeprom_map_t page; - struct eeprom_map_t pageen; - struct eeprom_map_t poll; - struct eeprom_map_t mem; - struct eeprom_slave_add_t saddr; -}; - -struct msm_eeprom_memory_block_t { - struct msm_eeprom_memory_map_t *map; - uint32_t num_map; /* number of map blocks */ - uint8_t *mapdata; - uint32_t num_data; /* size of total mapdata */ -}; - -struct msm_eeprom_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_offset; - uint32_t cmm_size; -}; - -struct msm_eeprom_board_info { - const char *eeprom_name; - uint16_t i2c_slaveaddr; - struct msm_camera_power_ctrl_t power_info; - struct msm_eeprom_cmm_t cmm_data; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/include/uapi/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_fortuna/include/uapi/media/msm_camera.h deleted file mode 100644 index 3aff71ef61d4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/include/uapi/media/msm_camera.h +++ /dev/null @@ -1,2280 +0,0 @@ -/* Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __UAPI_MSM_CAMERA_H -#define __UAPI_MSM_CAMERA_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include -#ifdef MSM_CAMERA_GCC -#include -#else -#include -#endif - -#include - -#define BIT(nr) (1UL << (nr)) - -#define MSM_CAM_IOCTL_MAGIC 'm' - -#define MAX_SERVER_PAYLOAD_LENGTH 8192 - -#define MSM_CAM_IOCTL_GET_SENSOR_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *) - -#define MSM_CAM_IOCTL_REGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *) - -#define MSM_CAM_IOCTL_UNREGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned) - -#define MSM_CAM_IOCTL_CTRL_COMMAND \ - _IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_STATS \ - _IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *) - -#define MSM_CAM_IOCTL_GETFRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *) - -#define MSM_CAM_IOCTL_ENABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_CTRL_CMD_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_CMD \ - _IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *) - -#define MSM_CAM_IOCTL_DISABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PAD_REG_RESET2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_VFE_APPS_RESET \ - _IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *) - -#define MSM_CAM_IOCTL_AXI_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_PICTURE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_frame *) - -#define MSM_CAM_IOCTL_SET_CROP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *) - -#define MSM_CAM_IOCTL_PICT_PP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *) - -#define MSM_CAM_IOCTL_PICT_PP_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *) - -#define MSM_CAM_IOCTL_SENSOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_FLASH_LED_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 23) - -#define MSM_CAM_IOCTL_CTRL_COMMAND_2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_AF_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 25, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_AF_CTRL_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 26, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_CONFIG_VPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 27, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_AXI_VPE_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 28, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 29, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CHARGE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 30, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 31) - -#define MSM_CAM_IOCTL_FLASH_CTRL \ - _IOW(MSM_CAM_IOCTL_MAGIC, 32, struct flash_ctrl_data *) - -#define MSM_CAM_IOCTL_ERROR_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 33, uint32_t *) - -#define MSM_CAM_IOCTL_ABORT_CAPTURE \ - _IO(MSM_CAM_IOCTL_MAGIC, 34) - -#define MSM_CAM_IOCTL_SET_FD_ROI \ - _IOW(MSM_CAM_IOCTL_MAGIC, 35, struct fd_roi_info *) - -#define MSM_CAM_IOCTL_GET_CAMERA_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 36, struct msm_camera_info *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_PIC_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 37) - -#define MSM_CAM_IOCTL_RELEASE_PIC_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 38, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PUT_ST_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 39, struct msm_camera_st_frame *) - -#define MSM_CAM_IOCTL_V4L2_EVT_NOTIFY \ - _IOW(MSM_CAM_IOCTL_MAGIC, 40, struct v4l2_event_and_payload) - -#define MSM_CAM_IOCTL_SET_MEM_MAP_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 41, struct msm_mem_map_info *) - -#define MSM_CAM_IOCTL_ACTUATOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 42, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_MCTL_POST_PROC \ - _IOW(MSM_CAM_IOCTL_MAGIC, 43, struct msm_mctl_post_proc_cmd *) - -#define MSM_CAM_IOCTL_RESERVE_FREE_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 44, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_RELEASE_FREE_FRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 45, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_PICT_PP_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 46, struct msm_pp_frame *) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_S_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 47, struct v4l2_control) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_QUERY_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 48, struct v4l2_queryctrl) - -#define MSM_CAM_IOCTL_GET_KERNEL_SYSTEM_TIME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 49, struct timeval *) - -#define MSM_CAM_IOCTL_SET_VFE_OUTPUT_TYPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 50, uint32_t *) - -#define MSM_CAM_IOCTL_MCTL_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 51, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_GET_ACTUATOR_INFO \ - _IOW(MSM_CAM_IOCTL_MAGIC, 52, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_EEPROM_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 53, struct msm_eeprom_cfg_data *) - -#define MSM_CAM_IOCTL_ISPIF_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 54, struct ispif_cfg_data *) - -#define MSM_CAM_IOCTL_STATS_REQBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 55, struct msm_stats_reqbuf *) - -#define MSM_CAM_IOCTL_STATS_ENQUEUEBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 56, struct msm_stats_buf_info *) - -#define MSM_CAM_IOCTL_STATS_FLUSH_BUFQ \ - _IOR(MSM_CAM_IOCTL_MAGIC, 57, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_SET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 58, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_UNSET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 59, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_GET_INST_HANDLE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 60, uint32_t *) - -#define MSM_CAM_IOCTL_STATS_UNREG_BUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 61, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_CSIC_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 62, struct csic_cfg_data *) - -#define MSM_CAM_IOCTL_CSID_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 63, struct csid_cfg_data *) - -#define MSM_CAM_IOCTL_CSIPHY_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 64, struct csiphy_cfg_data *) - -#define MSM_CAM_IOCTL_OEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 65, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_AXI_INIT \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 66, uint8_t *) - -#define MSM_CAM_IOCTL_AXI_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 67) - -struct v4l2_event_and_payload { - struct v4l2_event evt; - uint32_t payload_length; - uint32_t transaction_id; - void *payload; -}; - -struct msm_stats_reqbuf { - int num_buf; /* how many buffers requested */ - int stats_type; /* stats type */ -}; - -struct msm_stats_flush_bufq { - int stats_type; /* enum msm_stats_enum_type */ -}; - -struct msm_mctl_pp_cmd { - int32_t id; - uint16_t length; - void *value; -}; - -struct msm_mctl_post_proc_cmd { - int32_t type; - struct msm_mctl_pp_cmd cmd; -}; - -#define MSM_CAMERA_LED_OFF 0 -#define MSM_CAMERA_LED_LOW 1 -#define MSM_CAMERA_LED_HIGH 2 -#define MSM_CAMERA_LED_INIT 3 -#define MSM_CAMERA_LED_RELEASE 4 - -#define MSM_CAMERA_STROBE_FLASH_NONE 0 -#define MSM_CAMERA_STROBE_FLASH_XENON 1 - -#define MSM_MAX_CAMERA_SENSORS 5 -#define MAX_SENSOR_NAME 32 -#define MAX_CAM_NAME_SIZE 32 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 32 -#define MAX_ACTUATOR_TYPE_SIZE 32 -#define MAX_ACTUATOR_REG_TBL_SIZE 8 - - -#define MSM_MAX_CAMERA_CONFIGS 2 - -#define PP_SNAP 0x01 -#define PP_RAW_SNAP ((0x01)<<1) -#define PP_PREV ((0x01)<<2) -#define PP_THUMB ((0x01)<<3) -#define PP_MASK (PP_SNAP|PP_RAW_SNAP|PP_PREV|PP_THUMB) - -#define MSM_CAM_CTRL_CMD_DONE 0 -#define MSM_CAM_SENSOR_VFE_CMD 1 - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES 8 - -/***************************************************** - * structure - *****************************************************/ - -/* define five type of structures for userspace <==> kernel - * space communication: - * command 1 - 2 are from userspace ==> kernel - * command 3 - 4 are from kernel ==> userspace - * - * 1. control command: control command(from control thread), - * control status (from config thread); - */ -struct msm_ctrl_cmd { - uint16_t type; - uint16_t length; - void *value; - uint16_t status; - uint32_t timeout_ms; - int resp_fd; /* FIXME: to be used by the kernel, pass-through for now */ - int vnode_id; /* video dev id. Can we overload resp_fd? */ - int queue_idx; - uint32_t evt_id; - uint32_t stream_type; /* used to pass value to qcamera server */ - int config_ident; /*used as identifier for config node*/ -}; - -struct msm_cam_evt_msg { - unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */ - unsigned short msg_id; - unsigned int len; /* size in, number of bytes out */ - uint32_t frame_id; - void *data; - struct timespec timestamp; -}; - -struct msm_pp_frame_sp { - /* phy addr of the buffer */ - unsigned long phy_addr; - uint32_t y_off; - uint32_t cbcr_off; - /* buffer length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame_mp { - /* phy addr of the plane */ - unsigned long phy_addr; - /* offset of plane data */ - uint32_t data_offset; - /* plane length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame { - uint32_t handle; /* stores vb cookie */ - uint32_t frame_id; - unsigned short buf_idx; - int path; - unsigned short image_type; - unsigned short num_planes; /* 1 for sp */ - struct timeval timestamp; - union { - struct msm_pp_frame_sp sp; - struct msm_pp_frame_mp mp[MAX_PLANES]; - }; - int node_type; - uint32_t inst_handle; -}; - -struct msm_pp_crop { - uint32_t src_x; - uint32_t src_y; - uint32_t src_w; - uint32_t src_h; - uint32_t dst_x; - uint32_t dst_y; - uint32_t dst_w; - uint32_t dst_h; - uint8_t update_flag; -}; - -struct msm_mctl_pp_frame_cmd { - uint32_t cookie; - uint8_t vpe_output_action; - struct msm_pp_frame src_frame; - struct msm_pp_frame dest_frame; - struct msm_pp_crop crop; - int path; -}; - -struct msm_cam_evt_divert_frame { - unsigned short image_mode; - unsigned short op_mode; - unsigned short inst_idx; - unsigned short node_idx; - struct msm_pp_frame frame; - int do_pp; -}; - -struct msm_mctl_pp_cmd_ack_event { - uint32_t cmd; /* VPE_CMD_ZOOM? */ - int status; /* 0 done, < 0 err */ - uint32_t cookie; /* daemon's cookie */ -}; - -struct msm_mctl_pp_event_info { - int32_t event; - union { - struct msm_mctl_pp_cmd_ack_event ack; - }; -}; - -struct msm_isp_event_ctrl { - unsigned short resptype; - union { - struct msm_cam_evt_msg isp_msg; - struct msm_ctrl_cmd ctrl; - struct msm_cam_evt_divert_frame div_frame; - struct msm_mctl_pp_event_info pp_event_info; - } isp_data; -}; - -#define MSM_CAM_RESP_CTRL 0 -#define MSM_CAM_RESP_STAT_EVT_MSG 1 -#define MSM_CAM_RESP_STEREO_OP_1 2 -#define MSM_CAM_RESP_STEREO_OP_2 3 -#define MSM_CAM_RESP_V4L2 4 -#define MSM_CAM_RESP_DIV_FRAME_EVT_MSG 5 -#define MSM_CAM_RESP_DONE_EVENT 6 -#define MSM_CAM_RESP_MCTL_PP_EVENT 7 -#define MSM_CAM_RESP_MAX 8 - -#define MSM_CAM_APP_NOTIFY_EVENT 0 -#define MSM_CAM_APP_NOTIFY_ERROR_EVENT 1 - -/* this one is used to send ctrl/status up to config thread */ - -struct msm_stats_event_ctrl { - /* 0 - ctrl_cmd from control thread, - * 1 - stats/event kernel, - * 2 - V4L control or read request */ - int resptype; - int timeout_ms; - struct msm_ctrl_cmd ctrl_cmd; - /* struct vfe_event_t stats_event; */ - struct msm_cam_evt_msg stats_event; -}; - -/* 2. config command: config command(from config thread); */ -struct msm_camera_cfg_cmd { - /* what to config: - * 1 - sensor config, 2 - vfe config */ - uint16_t cfg_type; - - /* sensor config type */ - uint16_t cmd_type; - uint16_t queue; - uint16_t length; - void *value; -}; - -#define CMD_GENERAL 0 -#define CMD_AXI_CFG_OUT1 1 -#define CMD_AXI_CFG_SNAP_O1_AND_O2 2 -#define CMD_AXI_CFG_OUT2 3 -#define CMD_PICT_T_AXI_CFG 4 -#define CMD_PICT_M_AXI_CFG 5 -#define CMD_RAW_PICT_AXI_CFG 6 - -#define CMD_FRAME_BUF_RELEASE 7 -#define CMD_PREV_BUF_CFG 8 -#define CMD_SNAP_BUF_RELEASE 9 -#define CMD_SNAP_BUF_CFG 10 -#define CMD_STATS_DISABLE 11 -#define CMD_STATS_AEC_AWB_ENABLE 12 -#define CMD_STATS_AF_ENABLE 13 -#define CMD_STATS_AEC_ENABLE 14 -#define CMD_STATS_AWB_ENABLE 15 -#define CMD_STATS_ENABLE 16 - -#define CMD_STATS_AXI_CFG 17 -#define CMD_STATS_AEC_AXI_CFG 18 -#define CMD_STATS_AF_AXI_CFG 19 -#define CMD_STATS_AWB_AXI_CFG 20 -#define CMD_STATS_RS_AXI_CFG 21 -#define CMD_STATS_CS_AXI_CFG 22 -#define CMD_STATS_IHIST_AXI_CFG 23 -#define CMD_STATS_SKIN_AXI_CFG 24 - -#define CMD_STATS_BUF_RELEASE 25 -#define CMD_STATS_AEC_BUF_RELEASE 26 -#define CMD_STATS_AF_BUF_RELEASE 27 -#define CMD_STATS_AWB_BUF_RELEASE 28 -#define CMD_STATS_RS_BUF_RELEASE 29 -#define CMD_STATS_CS_BUF_RELEASE 30 -#define CMD_STATS_IHIST_BUF_RELEASE 31 -#define CMD_STATS_SKIN_BUF_RELEASE 32 - -#define UPDATE_STATS_INVALID 33 -#define CMD_AXI_CFG_SNAP_GEMINI 34 -#define CMD_AXI_CFG_SNAP 35 -#define CMD_AXI_CFG_PREVIEW 36 -#define CMD_AXI_CFG_VIDEO 37 - -#define CMD_STATS_IHIST_ENABLE 38 -#define CMD_STATS_RS_ENABLE 39 -#define CMD_STATS_CS_ENABLE 40 -#define CMD_VPE 41 -#define CMD_AXI_CFG_VPE 42 -#define CMD_AXI_CFG_ZSL 43 -#define CMD_AXI_CFG_SNAP_VPE 44 -#define CMD_AXI_CFG_SNAP_THUMB_VPE 45 - -#define CMD_CONFIG_PING_ADDR 46 -#define CMD_CONFIG_PONG_ADDR 47 -#define CMD_CONFIG_FREE_BUF_ADDR 48 -#define CMD_AXI_CFG_ZSL_ALL_CHNLS 49 -#define CMD_AXI_CFG_VIDEO_ALL_CHNLS 50 -#define CMD_VFE_BUFFER_RELEASE 51 -#define CMD_VFE_PROCESS_IRQ 52 -#define CMD_STATS_BG_ENABLE 53 -#define CMD_STATS_BF_ENABLE 54 -#define CMD_STATS_BHIST_ENABLE 55 -#define CMD_STATS_BG_BUF_RELEASE 56 -#define CMD_STATS_BF_BUF_RELEASE 57 -#define CMD_STATS_BHIST_BUF_RELEASE 58 -#define CMD_VFE_PIX_SOF_COUNT_UPDATE 59 -#define CMD_VFE_COUNT_PIX_SOF_ENABLE 60 -#define CMD_STATS_BE_ENABLE 61 -#define CMD_STATS_BE_BUF_RELEASE 62 - -#define CMD_AXI_CFG_PRIM BIT(8) -#define CMD_AXI_CFG_PRIM_ALL_CHNLS BIT(9) -#define CMD_AXI_CFG_SEC BIT(10) -#define CMD_AXI_CFG_SEC_ALL_CHNLS BIT(11) -#define CMD_AXI_CFG_TERT1 BIT(12) -#define CMD_AXI_CFG_TERT2 BIT(13) - -#define CMD_AXI_START 0xE1 -#define CMD_AXI_STOP 0xE2 -#define CMD_AXI_RESET 0xE3 -#define CMD_AXI_ABORT 0xE4 - - - -#define AXI_CMD_PREVIEW BIT(0) -#define AXI_CMD_CAPTURE BIT(1) -#define AXI_CMD_RECORD BIT(2) -#define AXI_CMD_ZSL BIT(3) -#define AXI_CMD_RAW_CAPTURE BIT(4) -#define AXI_CMD_LIVESHOT BIT(5) - -/* vfe config command: config command(from config thread)*/ -struct msm_vfe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -struct msm_vpe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -#define MAX_CAMERA_ENABLE_NAME_LEN 32 -struct camera_enable_cmd { - char name[MAX_CAMERA_ENABLE_NAME_LEN]; -}; - -#define MSM_PMEM_OUTPUT1 0 -#define MSM_PMEM_OUTPUT2 1 -#define MSM_PMEM_OUTPUT1_OUTPUT2 2 -#define MSM_PMEM_THUMBNAIL 3 -#define MSM_PMEM_MAINIMG 4 -#define MSM_PMEM_RAW_MAINIMG 5 -#define MSM_PMEM_AEC_AWB 6 -#define MSM_PMEM_AF 7 -#define MSM_PMEM_AEC 8 -#define MSM_PMEM_AWB 9 -#define MSM_PMEM_RS 10 -#define MSM_PMEM_CS 11 -#define MSM_PMEM_IHIST 12 -#define MSM_PMEM_SKIN 13 -#define MSM_PMEM_VIDEO 14 -#define MSM_PMEM_PREVIEW 15 -#define MSM_PMEM_VIDEO_VPE 16 -#define MSM_PMEM_C2D 17 -#define MSM_PMEM_MAINIMG_VPE 18 -#define MSM_PMEM_THUMBNAIL_VPE 19 -#define MSM_PMEM_BAYER_GRID 20 -#define MSM_PMEM_BAYER_FOCUS 21 -#define MSM_PMEM_BAYER_HIST 22 -#define MSM_PMEM_BAYER_EXPOSURE 23 -#define MSM_PMEM_MAX 24 - -#define STAT_AEAW 0 -#define STAT_AEC 1 -#define STAT_AF 2 -#define STAT_AWB 3 -#define STAT_RS 4 -#define STAT_CS 5 -#define STAT_IHIST 6 -#define STAT_SKIN 7 -#define STAT_BG 8 -#define STAT_BF 9 -#define STAT_BE 10 -#define STAT_BHIST 11 -#define STAT_MAX 12 - -#define FRAME_PREVIEW_OUTPUT1 0 -#define FRAME_PREVIEW_OUTPUT2 1 -#define FRAME_SNAPSHOT 2 -#define FRAME_THUMBNAIL 3 -#define FRAME_RAW_SNAPSHOT 4 -#define FRAME_MAX 5 - -enum msm_stats_enum_type { - MSM_STATS_TYPE_AEC, /* legacy based AEC */ - MSM_STATS_TYPE_AF, /* legacy based AF */ - MSM_STATS_TYPE_AWB, /* legacy based AWB */ - MSM_STATS_TYPE_RS, /* legacy based RS */ - MSM_STATS_TYPE_CS, /* legacy based CS */ - MSM_STATS_TYPE_IHIST, /* legacy based HIST */ - MSM_STATS_TYPE_SKIN, /* legacy based SKIN */ - MSM_STATS_TYPE_BG, /* Bayer Grids */ - MSM_STATS_TYPE_BF, /* Bayer Focus */ - MSM_STATS_TYPE_BE, /* Bayer Exposure*/ - MSM_STATS_TYPE_BHIST, /* Bayer Hist */ - MSM_STATS_TYPE_AE_AW, /* legacy stats for vfe 2.x*/ - MSM_STATS_TYPE_COMP, /* Composite stats */ - MSM_STATS_TYPE_MAX /* MAX */ -}; - -struct msm_stats_buf_info { - int type; /* msm_stats_enum_type */ - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; - int buf_idx; -}; - -struct msm_pmem_info { - int type; - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; -}; - -struct outputCfg { - uint32_t height; - uint32_t width; - - uint32_t window_height_firstline; - uint32_t window_height_lastline; -}; - -#define VIDEO_NODE 0 -#define MCTL_NODE 1 - -#define OUTPUT_1 0 -#define OUTPUT_2 1 -#define OUTPUT_1_AND_2 2 /* snapshot only */ -#define OUTPUT_1_AND_3 3 /* video */ -#define CAMIF_TO_AXI_VIA_OUTPUT_2 4 -#define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 5 -#define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6 -#define OUTPUT_1_2_AND_3 7 -#define OUTPUT_ALL_CHNLS 8 -#define OUTPUT_VIDEO_ALL_CHNLS 9 -#define OUTPUT_ZSL_ALL_CHNLS 10 -#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_ZSL_ALL_CHNLS - -#define OUTPUT_PRIM BIT(8) -#define OUTPUT_PRIM_ALL_CHNLS BIT(9) -#define OUTPUT_SEC BIT(10) -#define OUTPUT_SEC_ALL_CHNLS BIT(11) -#define OUTPUT_TERT1 BIT(12) -#define OUTPUT_TERT2 BIT(13) - - - -#define MSM_FRAME_PREV_1 0 -#define MSM_FRAME_PREV_2 1 -#define MSM_FRAME_ENC 2 - -#define OUTPUT_TYPE_P BIT(0) -#define OUTPUT_TYPE_T BIT(1) -#define OUTPUT_TYPE_S BIT(2) -#define OUTPUT_TYPE_V BIT(3) -#define OUTPUT_TYPE_L BIT(4) -#define OUTPUT_TYPE_ST_L BIT(5) -#define OUTPUT_TYPE_ST_R BIT(6) -#define OUTPUT_TYPE_ST_D BIT(7) -#define OUTPUT_TYPE_R BIT(8) -#define OUTPUT_TYPE_R1 BIT(9) -#define OUTPUT_TYPE_SAEC BIT(10) -#define OUTPUT_TYPE_SAFC BIT(11) -#define OUTPUT_TYPE_SAWB BIT(12) -#define OUTPUT_TYPE_IHST BIT(13) -#define OUTPUT_TYPE_CSTA BIT(14) - -struct fd_roi_info { - void *info; - int info_len; -}; - -struct msm_mem_map_info { - uint32_t cookie; - uint32_t length; - uint32_t mem_type; -}; - -#define MSM_MEM_MMAP 0 -#define MSM_MEM_USERPTR 1 -#define MSM_PLANE_MAX 8 -#define MSM_PLANE_Y 0 -#define MSM_PLANE_UV 1 - -struct msm_frame { - struct timespec ts; - int path; - int type; - unsigned long buffer; - uint32_t phy_offset; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - int fd; - - void *cropinfo; - int croplen; - uint32_t error_code; - struct fd_roi_info roi_info; - uint32_t frame_id; - int stcam_quality_ind; - uint32_t stcam_conv_value; - - struct ion_allocation_data ion_alloc; - struct ion_fd_data fd_data; - int ion_dev_fd; -}; - -enum msm_st_frame_packing { - SIDE_BY_SIDE_HALF, - SIDE_BY_SIDE_FULL, - TOP_DOWN_HALF, - TOP_DOWN_FULL, -}; - -struct msm_st_crop { - uint32_t in_w; - uint32_t in_h; - uint32_t out_w; - uint32_t out_h; -}; - -struct msm_st_half { - uint32_t buf_p0_off; - uint32_t buf_p1_off; - uint32_t buf_p0_stride; - uint32_t buf_p1_stride; - uint32_t pix_x_off; - uint32_t pix_y_off; - struct msm_st_crop stCropInfo; -}; - -struct msm_st_frame { - struct msm_frame buf_info; - int type; - enum msm_st_frame_packing packing; - struct msm_st_half L; - struct msm_st_half R; - int frame_id; -}; - -#define MSM_CAMERA_ERR_MASK (0xFFFFFFFF & 1) - -struct stats_buff { - unsigned long buff; - int fd; -}; - -struct msm_stats_buf { - uint8_t awb_ymin; - struct stats_buff aec; - struct stats_buff awb; - struct stats_buff af; - struct stats_buff be; - struct stats_buff ihist; - struct stats_buff rs; - struct stats_buff cs; - struct stats_buff skin; - int type; - uint32_t status_bits; - unsigned long buffer; - int fd; - int length; - struct ion_handle *handle; - uint32_t frame_id; - int buf_idx; -}; -#define MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT 0 -/* video capture mode in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_PREVIEW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+1) -/* extendedmode for video recording in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_VIDEO \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+2) -/* extendedmode for the full size main image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_MAIN (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+3) -/* extendedmode for the thumb nail image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_THUMBNAIL \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+4) -/* ISP_PIX_OUTPUT1: no pp, directly send output1 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+5) -/* ISP_PIX_OUTPUT2: no pp, directly send output2 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+6) -/* raw image type */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RAW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+7) -/* RDI dump */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+8) -/* RDI dump 1 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+9) -/* RDI dump 2 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+10) -#define MSM_V4L2_EXT_CAPTURE_MODE_AEC \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+11) -#define MSM_V4L2_EXT_CAPTURE_MODE_AWB \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+12) -#define MSM_V4L2_EXT_CAPTURE_MODE_AF \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+13) -#define MSM_V4L2_EXT_CAPTURE_MODE_IHIST \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+14) -#define MSM_V4L2_EXT_CAPTURE_MODE_CS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+15) -#define MSM_V4L2_EXT_CAPTURE_MODE_RS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+16) -#define MSM_V4L2_EXT_CAPTURE_MODE_CSTA \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+17) -#define MSM_V4L2_EXT_CAPTURE_MODE_V2X_LIVESHOT \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+18) -#define MSM_V4L2_EXT_CAPTURE_MODE_MAX (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+19) - - -#define MSM_V4L2_PID_MOTION_ISO V4L2_CID_PRIVATE_BASE -#define MSM_V4L2_PID_EFFECT (V4L2_CID_PRIVATE_BASE+1) -#define MSM_V4L2_PID_HJR (V4L2_CID_PRIVATE_BASE+2) -#define MSM_V4L2_PID_LED_MODE (V4L2_CID_PRIVATE_BASE+3) -#define MSM_V4L2_PID_PREP_SNAPSHOT (V4L2_CID_PRIVATE_BASE+4) -#define MSM_V4L2_PID_EXP_METERING (V4L2_CID_PRIVATE_BASE+5) -#define MSM_V4L2_PID_ISO (V4L2_CID_PRIVATE_BASE+6) -#define MSM_V4L2_PID_CAM_MODE (V4L2_CID_PRIVATE_BASE+7) -#define MSM_V4L2_PID_LUMA_ADAPTATION (V4L2_CID_PRIVATE_BASE+8) -#define MSM_V4L2_PID_BEST_SHOT (V4L2_CID_PRIVATE_BASE+9) -#define MSM_V4L2_PID_FOCUS_MODE (V4L2_CID_PRIVATE_BASE+10) -#define MSM_V4L2_PID_BL_DETECTION (V4L2_CID_PRIVATE_BASE+11) -#define MSM_V4L2_PID_SNOW_DETECTION (V4L2_CID_PRIVATE_BASE+12) -#define MSM_V4L2_PID_CTRL_CMD (V4L2_CID_PRIVATE_BASE+13) -#define MSM_V4L2_PID_EVT_SUB_INFO (V4L2_CID_PRIVATE_BASE+14) -#define MSM_V4L2_PID_STROBE_FLASH (V4L2_CID_PRIVATE_BASE+15) -#define MSM_V4L2_PID_INST_HANDLE (V4L2_CID_PRIVATE_BASE+16) -#define MSM_V4L2_PID_MMAP_INST (V4L2_CID_PRIVATE_BASE+17) -#define MSM_V4L2_PID_PP_PLANE_INFO (V4L2_CID_PRIVATE_BASE+18) -#define MSM_V4L2_PID_MAX MSM_V4L2_PID_PP_PLANE_INFO - -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_DEFAULT 0 -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_PREVIEW (MSM_V4L2_CAM_OP_DEFAULT+1) -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_VIDEO (MSM_V4L2_CAM_OP_DEFAULT+2) -/* camera operation mode for standard shapshot - two frame output queues */ -#define MSM_V4L2_CAM_OP_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+3) -/* camera operation mode for zsl shapshot - three output queues */ -#define MSM_V4L2_CAM_OP_ZSL (MSM_V4L2_CAM_OP_DEFAULT+4) -/* camera operation mode for raw snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_RAW (MSM_V4L2_CAM_OP_DEFAULT+5) -/* camera operation mode for jpeg snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_JPEG_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+6) - - -#define MSM_V4L2_VID_CAP_TYPE 0 -#define MSM_V4L2_STREAM_ON 1 -#define MSM_V4L2_STREAM_OFF 2 -#define MSM_V4L2_SNAPSHOT 3 -#define MSM_V4L2_QUERY_CTRL 4 -#define MSM_V4L2_GET_CTRL 5 -#define MSM_V4L2_SET_CTRL 6 -#define MSM_V4L2_QUERY 7 -#define MSM_V4L2_GET_CROP 8 -#define MSM_V4L2_SET_CROP 9 -#define MSM_V4L2_OPEN 10 -#define MSM_V4L2_CLOSE 11 -#define MSM_V4L2_SET_CTRL_CMD 12 -#define MSM_V4L2_EVT_SUB_MASK 13 -#define MSM_V4L2_PRIVATE_CMD 14 -#define MSM_V4L2_MAX 15 -#define V4L2_CAMERA_EXIT 43 - -struct crop_info { - void *info; - int len; -}; - -struct msm_postproc { - int ftnum; - struct msm_frame fthumnail; - int fmnum; - struct msm_frame fmain; -}; - -struct msm_snapshot_pp_status { - void *status; -}; - -#define CFG_SET_MODE 0 -#define CFG_SET_EFFECT 1 -#define CFG_START 2 -#define CFG_PWR_UP 3 -#define CFG_PWR_DOWN 4 -#define CFG_WRITE_EXPOSURE_GAIN 5 -#define CFG_SET_DEFAULT_FOCUS 6 -#define CFG_MOVE_FOCUS 7 -#define CFG_REGISTER_TO_REAL_GAIN 8 -#define CFG_REAL_TO_REGISTER_GAIN 9 -#define CFG_SET_FPS 10 -#define CFG_SET_PICT_FPS 11 -#define CFG_SET_BRIGHTNESS 12 -#define CFG_SET_CONTRAST 13 -#define CFG_SET_ZOOM 14 -#define CFG_SET_EXPOSURE_MODE 15 -#define CFG_SET_WB 16 -#define CFG_SET_ANTIBANDING 17 -#define CFG_SET_EXP_GAIN 18 -#define CFG_SET_PICT_EXP_GAIN 19 -#define CFG_SET_LENS_SHADING 20 -#define CFG_GET_PICT_FPS 21 -#define CFG_GET_PREV_L_PF 22 -#define CFG_GET_PREV_P_PL 23 -#define CFG_GET_PICT_L_PF 24 -#define CFG_GET_PICT_P_PL 25 -#define CFG_GET_AF_MAX_STEPS 26 -#define CFG_GET_PICT_MAX_EXP_LC 27 -#define CFG_SEND_WB_INFO 28 -#define CFG_SENSOR_INIT 29 -#define CFG_GET_3D_CALI_DATA 30 -#define CFG_GET_CALIB_DATA 31 -#define CFG_GET_OUTPUT_INFO 32 -#define CFG_GET_EEPROM_INFO 33 -#define CFG_GET_EEPROM_DATA 34 -#define CFG_SET_ACTUATOR_INFO 35 -#define CFG_GET_ACTUATOR_INFO 36 -/* TBD: QRD */ -#define CFG_SET_SATURATION 37 -#define CFG_SET_SHARPNESS 38 -#define CFG_SET_TOUCHAEC 39 -#define CFG_SET_AUTO_FOCUS 40 -#define CFG_SET_AUTOFLASH 41 -#define CFG_SET_EXPOSURE_COMPENSATION 42 -#define CFG_SET_ISO 43 -#define CFG_START_STREAM 44 -#define CFG_STOP_STREAM 45 -#define CFG_GET_CSI_PARAMS 46 -#define CFG_POWER_UP 47 -#define CFG_POWER_DOWN 48 -#define CFG_WRITE_I2C_ARRAY 49 -#define CFG_READ_I2C_ARRAY 50 -#define CFG_PCLK_CHANGE 51 -#define CFG_CONFIG_VREG_ARRAY 52 -#define CFG_CONFIG_CLK_ARRAY 53 -#define CFG_GPIO_OP 54 -#define CFG_MAX 55 - - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define SENSOR_PREVIEW_MODE 0 -#define SENSOR_SNAPSHOT_MODE 1 -#define SENSOR_RAW_SNAPSHOT_MODE 2 -#define SENSOR_HFR_60FPS_MODE 3 -#define SENSOR_HFR_90FPS_MODE 4 -#define SENSOR_HFR_120FPS_MODE 5 - -#define SENSOR_QTR_SIZE 0 -#define SENSOR_FULL_SIZE 1 -#define SENSOR_QVGA_SIZE 2 -#define SENSOR_INVALID_SIZE 3 - -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#define CAMERA_EFFECT_FADED 12 -#define CAMERA_EFFECT_VINTAGECOOL 13 -#define CAMERA_EFFECT_VINTAGEWARM 14 -#define CAMERA_EFFECT_ACCENT_BLUE 15 -#define CAMERA_EFFECT_ACCENT_GREEN 16 -#define CAMERA_EFFECT_ACCENT_ORANGE 17 -#define CAMERA_EFFECT_MAX 18 - -/* QRD */ -#define CAMERA_EFFECT_BW 10 -#define CAMERA_EFFECT_BLUISH 12 -#define CAMERA_EFFECT_REDDISH 13 -#define CAMERA_EFFECT_GREENISH 14 - -/* QRD */ -#define CAMERA_ANTIBANDING_OFF 0 -#define CAMERA_ANTIBANDING_50HZ 2 -#define CAMERA_ANTIBANDING_60HZ 1 -#define CAMERA_ANTIBANDING_AUTO 3 - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - -#define CAMERA_BRIGHTNESS_LV0 0 -#define CAMERA_BRIGHTNESS_LV1 1 -#define CAMERA_BRIGHTNESS_LV2 2 -#define CAMERA_BRIGHTNESS_LV3 3 -#define CAMERA_BRIGHTNESS_LV4 4 -#define CAMERA_BRIGHTNESS_LV5 5 -#define CAMERA_BRIGHTNESS_LV6 6 -#define CAMERA_BRIGHTNESS_LV7 7 -#define CAMERA_BRIGHTNESS_LV8 8 - - -#define CAMERA_SATURATION_LV0 0 -#define CAMERA_SATURATION_LV1 1 -#define CAMERA_SATURATION_LV2 2 -#define CAMERA_SATURATION_LV3 3 -#define CAMERA_SATURATION_LV4 4 -#define CAMERA_SATURATION_LV5 5 -#define CAMERA_SATURATION_LV6 6 -#define CAMERA_SATURATION_LV7 7 -#define CAMERA_SATURATION_LV8 8 - -#define CAMERA_SHARPNESS_LV0 0 -#define CAMERA_SHARPNESS_LV1 3 -#define CAMERA_SHARPNESS_LV2 6 -#define CAMERA_SHARPNESS_LV3 9 -#define CAMERA_SHARPNESS_LV4 12 -#define CAMERA_SHARPNESS_LV5 15 -#define CAMERA_SHARPNESS_LV6 18 -#define CAMERA_SHARPNESS_LV7 21 -#define CAMERA_SHARPNESS_LV8 24 -#define CAMERA_SHARPNESS_LV9 27 -#define CAMERA_SHARPNESS_LV10 30 - -#define CAMERA_SETAE_AVERAGE 0 -#define CAMERA_SETAE_CENWEIGHT 1 - -#define CAMERA_WB_AUTO 1 /* This list must match aeecamera.h */ -#define CAMERA_WB_CUSTOM 2 -#define CAMERA_WB_INCANDESCENT 3 -#define CAMERA_WB_FLUORESCENT 4 -#define CAMERA_WB_DAYLIGHT 5 -#define CAMERA_WB_CLOUDY_DAYLIGHT 6 -#define CAMERA_WB_TWILIGHT 7 -#define CAMERA_WB_SHADE 8 - -#define CAMERA_EXPOSURE_COMPENSATION_LV0 12 -#define CAMERA_EXPOSURE_COMPENSATION_LV1 6 -#define CAMERA_EXPOSURE_COMPENSATION_LV2 0 -#define CAMERA_EXPOSURE_COMPENSATION_LV3 -6 -#define CAMERA_EXPOSURE_COMPENSATION_LV4 -12 - -enum msm_v4l2_saturation_level { - MSM_V4L2_SATURATION_L0, - MSM_V4L2_SATURATION_L1, - MSM_V4L2_SATURATION_L2, - MSM_V4L2_SATURATION_L3, - MSM_V4L2_SATURATION_L4, - MSM_V4L2_SATURATION_L5, - MSM_V4L2_SATURATION_L6, - MSM_V4L2_SATURATION_L7, - MSM_V4L2_SATURATION_L8, - MSM_V4L2_SATURATION_L9, - MSM_V4L2_SATURATION_L10, -}; - -enum msm_v4l2_contrast_level { - MSM_V4L2_CONTRAST_L0, - MSM_V4L2_CONTRAST_L1, - MSM_V4L2_CONTRAST_L2, - MSM_V4L2_CONTRAST_L3, - MSM_V4L2_CONTRAST_L4, - MSM_V4L2_CONTRAST_L5, - MSM_V4L2_CONTRAST_L6, - MSM_V4L2_CONTRAST_L7, - MSM_V4L2_CONTRAST_L8, - MSM_V4L2_CONTRAST_L9, - MSM_V4L2_CONTRAST_L10, -}; - - -enum msm_v4l2_exposure_level { - MSM_V4L2_EXPOSURE_N2, - MSM_V4L2_EXPOSURE_N1, - MSM_V4L2_EXPOSURE_D, - MSM_V4L2_EXPOSURE_P1, - MSM_V4L2_EXPOSURE_P2, -}; - -enum msm_v4l2_sharpness_level { - MSM_V4L2_SHARPNESS_L0, - MSM_V4L2_SHARPNESS_L1, - MSM_V4L2_SHARPNESS_L2, - MSM_V4L2_SHARPNESS_L3, - MSM_V4L2_SHARPNESS_L4, - MSM_V4L2_SHARPNESS_L5, - MSM_V4L2_SHARPNESS_L6, -}; - -enum msm_v4l2_expo_metering_mode { - MSM_V4L2_EXP_FRAME_AVERAGE, - MSM_V4L2_EXP_CENTER_WEIGHTED, - MSM_V4L2_EXP_SPOT_METERING, -}; - -enum msm_v4l2_iso_mode { - MSM_V4L2_ISO_AUTO = 0, - MSM_V4L2_ISO_DEBLUR, - MSM_V4L2_ISO_100, - MSM_V4L2_ISO_200, - MSM_V4L2_ISO_400, - MSM_V4L2_ISO_800, - MSM_V4L2_ISO_1600, -}; - -enum msm_v4l2_wb_mode { - MSM_V4L2_WB_OFF, - MSM_V4L2_WB_AUTO , - MSM_V4L2_WB_CUSTOM, - MSM_V4L2_WB_INCANDESCENT, - MSM_V4L2_WB_FLUORESCENT, - MSM_V4L2_WB_DAYLIGHT, - MSM_V4L2_WB_CLOUDY_DAYLIGHT, -}; - -enum msm_v4l2_special_effect { - MSM_V4L2_EFFECT_OFF, - MSM_V4L2_EFFECT_MONO, - MSM_V4L2_EFFECT_NEGATIVE, - MSM_V4L2_EFFECT_SOLARIZE, - MSM_V4L2_EFFECT_SEPIA, - MSM_V4L2_EFFECT_POSTERAIZE, - MSM_V4L2_EFFECT_WHITEBOARD, - MSM_V4L2_EFFECT_BLACKBOARD, - MSM_V4L2_EFFECT_AQUA, - MSM_V4L2_EFFECT_EMBOSS, - MSM_V4L2_EFFECT_SKETCH, - MSM_V4L2_EFFECT_NEON, - MSM_V4L2_EFFECT_MAX, -}; - -enum msm_v4l2_power_line_frequency { - MSM_V4L2_POWER_LINE_OFF, - MSM_V4L2_POWER_LINE_60HZ, - MSM_V4L2_POWER_LINE_50HZ, - MSM_V4L2_POWER_LINE_AUTO, -}; - -#define CAMERA_ISO_TYPE_AUTO 0 -#define CAMEAR_ISO_TYPE_HJR 1 -#define CAMEAR_ISO_TYPE_100 2 -#define CAMERA_ISO_TYPE_200 3 -#define CAMERA_ISO_TYPE_400 4 -#define CAMEAR_ISO_TYPE_800 5 -#define CAMERA_ISO_TYPE_1600 6 - -struct sensor_pict_fps { - uint16_t prevfps; - uint16_t pictfps; -}; - -struct exp_gain_cfg { - uint16_t gain; - uint32_t line; -}; - -struct focus_cfg { - int32_t steps; - int dir; -}; - -struct fps_cfg { - uint16_t f_mult; - uint16_t fps_div; - uint32_t pict_fps_div; -}; -struct wb_info_cfg { - uint16_t red_gain; - uint16_t green_gain; - uint16_t blue_gain; -}; -struct sensor_3d_exp_cfg { - uint16_t gain; - uint32_t line; - uint16_t r_gain; - uint16_t b_gain; - uint16_t gr_gain; - uint16_t gb_gain; - uint16_t gain_adjust; -}; -struct sensor_3d_cali_data_t{ - unsigned char left_p_matrix[3][4][8]; - unsigned char right_p_matrix[3][4][8]; - unsigned char square_len[8]; - unsigned char focal_len[8]; - unsigned char pixel_pitch[8]; - uint16_t left_r; - uint16_t left_b; - uint16_t left_gb; - uint16_t left_af_far; - uint16_t left_af_mid; - uint16_t left_af_short; - uint16_t left_af_5um; - uint16_t left_af_50up; - uint16_t left_af_50down; - uint16_t right_r; - uint16_t right_b; - uint16_t right_gb; - uint16_t right_af_far; - uint16_t right_af_mid; - uint16_t right_af_short; - uint16_t right_af_5um; - uint16_t right_af_50up; - uint16_t right_af_50down; -}; -struct sensor_init_cfg { - uint8_t prev_res; - uint8_t pict_res; -}; - -struct sensor_calib_data { - /* Color Related Measurements */ - uint16_t r_over_g; - uint16_t b_over_g; - uint16_t gr_over_gb; - - /* Lens Related Measurements */ - uint16_t macro_2_inf; - uint16_t inf_2_macro; - uint16_t stroke_amt; - uint16_t af_pos_1m; - uint16_t af_pos_inf; -}; - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_INVALID_RES, -}; - -struct msm_sensor_output_info_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; - uint32_t vt_pixel_clk; - uint32_t op_pixel_clk; - uint16_t binning_factor; -}; - -struct sensor_output_info_t { - struct msm_sensor_output_info_t *output_info; - uint16_t num_info; -}; - -struct msm_sensor_exp_gain_info_t { - uint16_t coarse_int_time_addr; - uint16_t global_gain_addr; - uint16_t vert_offset; -}; - -struct msm_sensor_output_reg_addr_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; -}; - -struct sensor_driver_params_type { - struct msm_camera_i2c_reg_setting *init_settings; - uint16_t init_settings_size; - struct msm_camera_i2c_reg_setting *mode_settings; - uint16_t mode_settings_size; - struct msm_sensor_output_reg_addr_t *sensor_output_reg_addr; - struct msm_camera_i2c_reg_setting *start_settings; - struct msm_camera_i2c_reg_setting *stop_settings; - struct msm_camera_i2c_reg_setting *groupon_settings; - struct msm_camera_i2c_reg_setting *groupoff_settings; - struct msm_sensor_exp_gain_info_t *sensor_exp_gain_info; - struct msm_sensor_output_info_t *output_info; -}; - -struct mirror_flip { - int32_t x_mirror; - int32_t y_flip; -}; - -struct cord { - uint32_t x; - uint32_t y; -}; - -struct msm_eeprom_data_t { - void *eeprom_data; - uint16_t index; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -enum msm_camera_csi_data_format { - CSI_8BIT, - CSI_10BIT, - CSI_12BIT, -}; - -struct msm_camera_csi_params { - enum msm_camera_csi_data_format data_format; - uint8_t lane_cnt; - uint8_t lane_assign; - uint8_t settle_cnt; - uint8_t dpcm_scheme; -}; - -enum csic_cfg_type_t { - CSIC_INIT, - CSIC_CFG, -}; - -struct csic_cfg_data { - enum csic_cfg_type_t cfgtype; - struct msm_camera_csi_params *csic_params; -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - struct msm_camera_csiphy_params *csiphy_params; -}; - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define ISPIF_STREAM(intf, action, vfe) (((intf)<> 24) : 0xFF) - -#define CLR_IMG_MODE(handle) (handle &= 0xFF00FFFF) -#define SET_IMG_MODE(handle, data) \ - (handle |= ((0x1 << 23) | ((data & 0x7F) << 16))) -#define GET_IMG_MODE(handle) \ - ((handle & 0x800000) ? ((handle & 0x7F0000) >> 16) : 0xFF) - -#define CLR_MCTLPP_INST_IDX(handle) (handle &= 0xFFFF00FF) -#define SET_MCTLPP_INST_IDX(handle, data) \ - (handle |= ((0x1 << 15) | ((data & 0x7F) << 8))) -#define GET_MCTLPP_INST_IDX(handle) \ - ((handle & 0x8000) ? ((handle & 0x7F00) >> 8) : 0xFF) - -#define CLR_VIDEO_INST_IDX(handle) (handle &= 0xFFFFFF00) -#define GET_VIDEO_INST_IDX(handle) \ - ((handle & 0x80) ? (handle & 0x7F) : 0xFF) -#define SET_VIDEO_INST_IDX(handle, data) \ - (handle |= (0x1 << 7) | (data & 0x7F)) - -#endif /* __UAPI_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/isp/Makefile deleted file mode 100644 index ee2201ebdc24..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_isp.o msm_buf_mgr.o msm_isp_util.o msm_isp_axi_util.o msm_isp_stats_util.o -obj-$(CONFIG_MSMB_CAMERA) += msm_isp44.o msm_isp40.o msm_isp32.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.c deleted file mode 100644 index ad115100babb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.c +++ /dev/null @@ -1,962 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include "../include/media/msm_camera.h" -#include - -#include - -#include "msm.h" -#include "msm_buf_mgr.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_isp_bufq *msm_isp_get_bufq( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - uint32_t bufq_index = bufq_handle & 0xFF; - if (bufq_index > buf_mgr->num_buf_q) - return bufq; - - bufq = &buf_mgr->bufq[bufq_index]; - if (bufq->bufq_handle == bufq_handle) - return bufq; - - return NULL; -} - -static struct msm_isp_buffer *msm_isp_get_buf_ptr( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return buf_info; - } - - if (bufq->num_bufs <= buf_index) { - pr_err("%s: Invalid buf index\n", __func__); - return buf_info; - } - buf_info = &bufq->bufs[buf_index]; - return buf_info; -} - -static uint32_t msm_isp_get_buf_handle( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - if ((buf_mgr->buf_handle_cnt << 8) == 0) - buf_mgr->buf_handle_cnt++; - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) - return 0; - } - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].bufq_handle == 0) { - memset(&buf_mgr->bufq[i], - 0, sizeof(struct msm_isp_bufq)); - buf_mgr->bufq[i].bufq_handle = - (++buf_mgr->buf_handle_cnt) << 8 | i; - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_free_buf_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = - msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) - return -EINVAL; - memset(bufq, 0, sizeof(struct msm_isp_bufq)); - return 0; -} - -static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info, - struct v4l2_buffer *v4l2_buf) -{ - int i, rc = -1; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < v4l2_buf->length; i++) { - mapped_info = &buf_info->mapped_info[i]; - mapped_info->handle = - ion_import_dma_buf(buf_mgr->client, - v4l2_buf->m.planes[i].m.userptr); - if (IS_ERR_OR_NULL(mapped_info->handle)) { - pr_err("%s: buf has null/error ION handle %pK\n", - __func__, mapped_info->handle); - goto ion_map_error; - } - if (ion_map_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0, SZ_4K, - 0, &(mapped_info->paddr), - &(mapped_info->len), 0, 0) < 0) { - rc = -EINVAL; - pr_err("%s: cannot map address", __func__); - ion_free(buf_mgr->client, mapped_info->handle); - goto ion_map_error; - } - mapped_info->paddr += v4l2_buf->m.planes[i].data_offset; - CDBG("%s: plane: %d addr:%lu\n", - __func__, i, mapped_info->paddr); - - buf_pending = kzalloc(sizeof(struct buffer_cmd), GFP_ATOMIC); - if (!buf_pending) { - pr_err("No free memory for buf_pending\n"); - return rc; - } - - buf_pending->mapped_info = mapped_info; - list_add_tail(&buf_pending->list, &buf_mgr->buffer_q); - } - buf_info->num_planes = v4l2_buf->length; - return 0; -ion_map_error: - for (--i; i >= 0; i--) { - mapped_info = &buf_info->mapped_info[i]; - ion_unmap_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - } - return rc; -} - -static void msm_isp_unprepare_v4l2_buf( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info) -{ - int i; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < buf_info->num_planes; i++) { - mapped_info = &buf_info->mapped_info[i]; - - list_for_each_entry(buf_pending, &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - - if (buf_pending->mapped_info == mapped_info) { - ion_unmap_iommu(buf_mgr->client, - mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - - list_del_init(&buf_pending->list); - kfree(buf_pending); - break; - } - } - } - return; -} - -static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info, struct vb2_buffer *vb2_buf) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - struct v4l2_buffer *buf = NULL; - struct v4l2_plane *plane = NULL; - - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("Invalid buffer prepare\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_info->bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - rc = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - - if (buf_info->state != MSM_ISP_BUFFER_STATE_INITIALIZED) { - pr_err("%s: Invalid buffer state: %d\n", - __func__, buf_info->state); - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (vb2_buf) { - buf = &vb2_buf->v4l2_buf; - buf_info->vb2_buf = vb2_buf; - } else { - buf = &info->buffer; - plane = - kzalloc(sizeof(struct v4l2_plane) * buf->length, - GFP_KERNEL); - if (!plane) { - pr_err("%s: Cannot alloc plane: %d\n", - __func__, buf_info->state); - return rc; - } - if (copy_from_user(plane, - (void __user *)(buf->m.planes), - sizeof(struct v4l2_plane) * buf->length)) { - kfree(plane); - return rc; - } - buf->m.planes = plane; - } - - rc = msm_isp_prepare_v4l2_buf(buf_mgr, buf_info, buf); - if (rc < 0) { - pr_err("%s: Prepare buffer error\n", __func__); - kfree(plane); - return rc; - } - spin_lock_irqsave(&bufq->bufq_lock, flags); - buf_info->state = MSM_ISP_BUFFER_STATE_PREPARED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - kfree(plane); - return rc; -} - -static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, - uint32_t buf_handle) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - bufq = msm_isp_get_bufq(buf_mgr, buf_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, buf_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (buf_info->state == MSM_ISP_BUFFER_STATE_UNUSED || - buf_info->state == - MSM_ISP_BUFFER_STATE_INITIALIZED) - continue; - - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } - msm_isp_unprepare_v4l2_buf(buf_mgr, buf_info); - } - return 0; -} - -static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_buffer *temp_buf_info; - struct msm_isp_bufq *bufq = NULL; - struct vb2_buffer *vb2_buf = NULL; - struct buffer_cmd *buf_pending = NULL; - struct msm_isp_buffer_mapped_info *mped_info_tmp1; - struct msm_isp_buffer_mapped_info *mped_info_tmp2; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (!bufq->bufq_handle) { - pr_err("%s: Invalid bufq handle\n", __func__); - return rc; - } - - *buf_info = NULL; - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - list_for_each_entry(temp_buf_info, - &bufq->share_head, share_list) { - if (!temp_buf_info->buf_used[id]) { - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count++; - if (temp_buf_info->buf_get_count == - bufq->buf_client_count) - list_del_init( - &temp_buf_info->share_list); - if (temp_buf_info->buf_reuse_flag) { - kfree(temp_buf_info); - } else { - *buf_info = temp_buf_info; - rc = 0; - } - spin_unlock_irqrestore( - &bufq->bufq_lock, flags); - return rc; - } - } - } - - switch (BUF_SRC(bufq->stream_id)) { - case MSM_ISP_BUFFER_SRC_NATIVE: - list_for_each_entry(temp_buf_info, &bufq->head, list) { - if (temp_buf_info->state == - MSM_ISP_BUFFER_STATE_QUEUED) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &temp_buf_info->mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - /* found one buf */ - list_del_init( - &temp_buf_info->list); - *buf_info = temp_buf_info; - break; - } - } - break; - } - } - break; - case MSM_ISP_BUFFER_SRC_HAL: - vb2_buf = buf_mgr->vb2_ops->get_buf( - bufq->session_id, bufq->stream_id); - if (vb2_buf) { - if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &bufq->bufs[vb2_buf->v4l2_buf.index] - .mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - *buf_info = - &bufq->bufs[vb2_buf->v4l2_buf.index]; - (*buf_info)->vb2_buf = vb2_buf; - break; - } - } - } else { - pr_err("%s: Incorrect buf index %d\n", - __func__, vb2_buf->v4l2_buf.index); - rc = -EINVAL; - } - } - break; - case MSM_ISP_BUFFER_SRC_SCRATCH: - /* In scratch buf case we have only on buffer in queue. - * We return every time same buffer. */ - *buf_info = list_entry(bufq->head.next, typeof(**buf_info), - list); - break; - default: - pr_err("%s: Incorrect buf source.\n", __func__); - rc = -EINVAL; - return rc; - } - - if (!(*buf_info)) { - if (bufq->buf_type == ISP_SHARE_BUF) { - temp_buf_info = kzalloc( - sizeof(struct msm_isp_buffer), GFP_ATOMIC); - if (temp_buf_info) { - temp_buf_info->buf_reuse_flag = 1; - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count = 1; - list_add_tail(&temp_buf_info->share_list, - &bufq->share_head); - } else - rc = -ENOMEM; - } - } else { - (*buf_info)->state = MSM_ISP_BUFFER_STATE_DEQUEUED; - if (bufq->buf_type == ISP_SHARE_BUF) { - memset((*buf_info)->buf_used, 0, - sizeof(uint8_t) * bufq->buf_client_count); - (*buf_info)->buf_used[id] = 1; - (*buf_info)->buf_get_count = 1; - (*buf_info)->buf_put_count = 0; - (*buf_info)->buf_reuse_flag = 0; - list_add_tail(&(*buf_info)->share_list, - &bufq->share_head); - } - rc = 0; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; -} - -static int msm_isp_put_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - switch (buf_info->state) { - case MSM_ISP_BUFFER_STATE_PREPARED: - if (MSM_ISP_BUFFER_SRC_SCRATCH == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - case MSM_ISP_BUFFER_STATE_DEQUEUED: - case MSM_ISP_BUFFER_STATE_DIVERTED: - if (MSM_ISP_BUFFER_SRC_NATIVE == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - else if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_DISPATCHED: - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_QUEUED: - rc = 0; - break; - default: - pr_err("%s: incorrect state = %d", - __func__, buf_info->state); - break; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return rc; -} - -static int msm_isp_buf_done(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - enum msm_isp_buffer_state state; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - state = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (state == MSM_ISP_BUFFER_STATE_DEQUEUED || - state == MSM_ISP_BUFFER_STATE_DIVERTED) { - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - buf_info->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - buf_info->vb2_buf->v4l2_buf.timestamp = *tv; - buf_info->vb2_buf->v4l2_buf.sequence = frame_id; - buf_info->vb2_buf->v4l2_buf.reserved = output_format; - buf_mgr->vb2_ops->buf_done(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } else { - rc = msm_isp_put_buf(buf_mgr, buf_info->bufq_handle, - buf_info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - - return 0; -} - -static int msm_isp_flush_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type) -{ - int rc = -1, i; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - continue; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (flush_type == MSM_ISP_BUFFER_FLUSH_DIVERTED && - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } else if (flush_type == MSM_ISP_BUFFER_FLUSH_ALL && - (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED || - buf_info->state == MSM_ISP_BUFFER_STATE_DISPATCHED)) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - } - return 0; -} - -static int msm_isp_buf_divert(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED) { - buf_info->state = MSM_ISP_BUFFER_STATE_DIVERTED; - buf_info->tv = tv; - buf_info->frame_id = frame_id; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return 0; -} - -static int msm_isp_buf_enqueue(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info) -{ - int rc = -1, buf_state; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - buf_state = msm_isp_buf_prepare(buf_mgr, info, NULL); - if (buf_state < 0) { - pr_err("%s: Buf prepare failed\n", __func__); - return -EINVAL; - } - - if (buf_state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (info->dirty_buf) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (BUF_SRC(bufq->stream_id)) - pr_err("%s: Invalid native buffer state\n", - __func__); - else - rc = msm_isp_buf_done(buf_mgr, - info->handle, info->buf_idx, - buf_info->tv, buf_info->frame_id, 0); - } - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (MSM_ISP_BUFFER_SRC_HAL != BUF_SRC(bufq->stream_id)) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - return rc; -} - -static int msm_isp_get_bufq_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) { - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_get_buf_src(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src) -{ - struct msm_isp_bufq *bufq = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return -EINVAL; - } - *buf_src = BUF_SRC(bufq->stream_id); - - return 0; -} - -static int msm_isp_request_bufq(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - CDBG("%s: E\n", __func__); - - if (!buf_request->num_buf || buf_request->num_buf > VIDEO_MAX_FRAME) { - pr_err("Invalid buffer request\n"); - return rc; - } - - buf_request->handle = msm_isp_get_buf_handle(buf_mgr, - buf_request->session_id, buf_request->stream_id); - if (!buf_request->handle) { - pr_err("Invalid buffer handle\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_request->handle); - if (!bufq) { - pr_err("Invalid buffer queue\n"); - return rc; - } - - bufq->bufs = kzalloc(sizeof(struct msm_isp_buffer) * - buf_request->num_buf, GFP_KERNEL); - if (!bufq->bufs) { - pr_err("No free memory for buf info\n"); - msm_isp_free_buf_handle(buf_mgr, buf_request->handle); - return rc; - } - - spin_lock_init(&bufq->bufq_lock); - bufq->bufq_handle = buf_request->handle; - bufq->session_id = buf_request->session_id; - bufq->stream_id = buf_request->stream_id; - bufq->num_bufs = buf_request->num_buf; - bufq->buf_type = buf_request->buf_type; - if (bufq->buf_type == ISP_SHARE_BUF) - bufq->buf_client_count = ISP_SHARE_BUF_CLIENT; - INIT_LIST_HEAD(&bufq->head); - INIT_LIST_HEAD(&bufq->share_head); - for (i = 0; i < buf_request->num_buf; i++) { - bufq->bufs[i].state = MSM_ISP_BUFFER_STATE_INITIALIZED; - bufq->bufs[i].bufq_handle = bufq->bufq_handle; - bufq->bufs[i].buf_idx = i; - } - - return 0; -} - -static int msm_isp_release_bufq(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - int rc = -1; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq release\n"); - return rc; - } - - msm_isp_buf_unprepare(buf_mgr, bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq_handle); - return 0; -} - -static void msm_isp_release_all_bufq( - struct msm_isp_buf_mgr *buf_mgr) -{ - struct msm_isp_bufq *bufq = NULL; - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - bufq = &buf_mgr->bufq[i]; - if (!bufq->bufq_handle) - continue; - msm_isp_buf_unprepare(buf_mgr, bufq->bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq->bufq_handle); - } -} - -static void msm_isp_register_ctx(struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx) -{ - int i; - buf_mgr->num_iommu_ctx = num_iommu_ctx; - for (i = 0; i < num_iommu_ctx; i++) - buf_mgr->iommu_ctx[i] = iommu_ctx[i]; -} - -static int msm_isp_attach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int rc, i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { - rc = iommu_attach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); - if (rc) { - pr_err("%s: Iommu attach error\n", __func__); - return -EINVAL; - } - } - return 0; -} - -static void msm_isp_detach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) - iommu_detach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); -} - -static int msm_isp_init_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q) -{ - int rc = -1; - if (buf_mgr->open_count++) - return 0; - - if (!num_buf_q) { - pr_err("Invalid buffer queue number\n"); - return rc; - } - CDBG("%s: E\n", __func__); - - msm_isp_attach_ctx(buf_mgr); - INIT_LIST_HEAD(&buf_mgr->buffer_q); - buf_mgr->num_buf_q = num_buf_q; - buf_mgr->bufq = - kzalloc(sizeof(struct msm_isp_bufq) * num_buf_q, - GFP_KERNEL); - if (!buf_mgr->bufq) { - pr_err("Bufq malloc error\n"); - goto bufq_error; - } - buf_mgr->client = msm_ion_client_create(ctx_name); - buf_mgr->buf_handle_cnt = 0; - return 0; -bufq_error: - return rc; -} - -static int msm_isp_deinit_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr) -{ - if (--buf_mgr->open_count) - return 0; - msm_isp_release_all_bufq(buf_mgr); - ion_client_destroy(buf_mgr->client); - kfree(buf_mgr->bufq); - buf_mgr->num_buf_q = 0; - msm_isp_detach_ctx(buf_mgr); - return 0; -} - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg) -{ - switch (cmd) { - case VIDIOC_MSM_ISP_REQUEST_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->request_buf(buf_mgr, buf_req); - break; - } - case VIDIOC_MSM_ISP_ENQUEUE_BUF: { - struct msm_isp_qbuf_info *qbuf_info = arg; - buf_mgr->ops->enqueue_buf(buf_mgr, qbuf_info); - break; - } - case VIDIOC_MSM_ISP_RELEASE_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->release_buf(buf_mgr, buf_req->handle); - break; - } - } - return 0; -} - -static struct msm_isp_buf_ops isp_buf_ops = { - .request_buf = msm_isp_request_bufq, - .enqueue_buf = msm_isp_buf_enqueue, - .release_buf = msm_isp_release_bufq, - .get_bufq_handle = msm_isp_get_bufq_handle, - .get_buf_src = msm_isp_get_buf_src, - .get_buf = msm_isp_get_buf, - .put_buf = msm_isp_put_buf, - .flush_buf = msm_isp_flush_buf, - .buf_done = msm_isp_buf_done, - .buf_divert = msm_isp_buf_divert, - .register_ctx = msm_isp_register_ctx, - .buf_mgr_init = msm_isp_init_isp_buf_mgr, - .buf_mgr_deinit = msm_isp_deinit_isp_buf_mgr, -}; - -int msm_isp_create_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, - struct msm_iova_layout *iova_layout) -{ - int rc = 0; - if (buf_mgr->init_done) - return rc; - - buf_mgr->iommu_domain_num = msm_register_domain(iova_layout); - if (buf_mgr->iommu_domain_num < 0) { - pr_err("%s: Invalid iommu domain number\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->iommu_domain = msm_get_iommu_domain( - buf_mgr->iommu_domain_num); - if (!buf_mgr->iommu_domain) { - pr_err("%s: Invalid iommu domain\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->ops = &isp_buf_ops; - buf_mgr->vb2_ops = vb2_ops; - buf_mgr->init_done = 1; - buf_mgr->open_count = 0; - return 0; -iommu_domain_error: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.h deleted file mode 100644 index b98067e44151..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_buf_mgr.h +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_ISP_BUF_H_ -#define _MSM_ISP_BUF_H_ - -#include "../include/media/msmb_isp.h" -#include -#include "msm_sd.h" - -/* Buffer type could be userspace / HAL. - * Userspase could provide native or scratch buffer. */ -#define BUF_SRC(id) ( \ - (id & ISP_SCRATCH_BUF_BIT) ? MSM_ISP_BUFFER_SRC_SCRATCH : \ - (id & ISP_NATIVE_BUF_BIT) ? MSM_ISP_BUFFER_SRC_NATIVE : \ - MSM_ISP_BUFFER_SRC_HAL) - -#define ISP_SHARE_BUF_CLIENT 2 - -struct msm_isp_buf_mgr; - -enum msm_isp_buffer_src_t { - MSM_ISP_BUFFER_SRC_HAL, - MSM_ISP_BUFFER_SRC_NATIVE, - MSM_ISP_BUFFER_SRC_SCRATCH, - MSM_ISP_BUFFER_SRC_MAX, -}; - -enum msm_isp_buffer_state { - MSM_ISP_BUFFER_STATE_UNUSED, /* not used */ - MSM_ISP_BUFFER_STATE_INITIALIZED, /* REQBUF done */ - MSM_ISP_BUFFER_STATE_PREPARED, /* BUF mapped */ - MSM_ISP_BUFFER_STATE_QUEUED, /* buf queued */ - MSM_ISP_BUFFER_STATE_DEQUEUED, /* in use in VFE */ - MSM_ISP_BUFFER_STATE_DIVERTED, /* Sent to other hardware*/ - MSM_ISP_BUFFER_STATE_DISPATCHED, /* Sent to HAL*/ -}; - -enum msm_isp_buffer_flush_t { - MSM_ISP_BUFFER_FLUSH_DIVERTED, - MSM_ISP_BUFFER_FLUSH_ALL, -}; - -struct msm_isp_buffer_mapped_info { - unsigned long len; - dma_addr_t paddr; - struct ion_handle *handle; -}; - -struct buffer_cmd { - struct list_head list; - struct msm_isp_buffer_mapped_info *mapped_info; -}; - -struct msm_isp_buffer { - /*Common Data structure*/ - int num_planes; - struct msm_isp_buffer_mapped_info mapped_info[VIDEO_MAX_PLANES]; - int buf_idx; - uint32_t bufq_handle; - uint32_t frame_id; - struct timeval *tv; - - /*Native buffer*/ - struct list_head list; - enum msm_isp_buffer_state state; - - /*Vb2 buffer data*/ - struct vb2_buffer *vb2_buf; - - /*Share buffer cache state*/ - struct list_head share_list; - uint8_t buf_used[ISP_SHARE_BUF_CLIENT]; - uint8_t buf_get_count; - uint8_t buf_put_count; - uint8_t buf_reuse_flag; -}; - -struct msm_isp_bufq { - uint32_t session_id; - uint32_t stream_id; - uint32_t num_bufs; - uint32_t bufq_handle; - enum msm_isp_buf_type buf_type; - struct msm_isp_buffer *bufs; - spinlock_t bufq_lock; - - /*Native buffer queue*/ - struct list_head head; - /*Share buffer cache queue*/ - struct list_head share_head; - uint8_t buf_client_count; -}; - -struct msm_isp_buf_ops { - int (*request_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request); - - int (*enqueue_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info); - - int (*release_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle); - - int (*get_bufq_handle) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id); - - int (*get_buf_src) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src); - - int (*get_buf) (struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info); - - int (*put_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index); - - int (*flush_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type); - - int (*buf_done) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format); - int (*buf_divert) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id); - void (*register_ctx) (struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx); - int (*buf_mgr_init) (struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q); - int (*buf_mgr_deinit) (struct msm_isp_buf_mgr *buf_mgr); -}; - -struct msm_isp_buf_mgr { - int init_done; - uint32_t open_count; - spinlock_t lock; - uint16_t num_buf_q; - struct msm_isp_bufq *bufq; - - struct ion_client *client; - struct msm_isp_buf_ops *ops; - uint32_t buf_handle_cnt; - - struct msm_sd_req_vb2_q *vb2_ops; - - /*IOMMU specific*/ - int iommu_domain_num; - struct iommu_domain *iommu_domain; - - int num_iommu_ctx; - struct device *iommu_ctx[2]; - struct list_head buffer_q; -}; - -int msm_isp_create_isp_buf_mgr(struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, struct msm_iova_layout *iova_layout); - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg); - -#endif /* _MSM_ISP_BUF_H_ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.c deleted file mode 100644 index f2586f872f80..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.c +++ /dev/null @@ -1,317 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_isp.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_sd.h" -#include "msm_isp44.h" -#include "msm_isp40.h" -#include "msm_isp32.h" - -static struct msm_sd_req_vb2_q vfe_vb2_ops; - -static const struct of_device_id msm_vfe_dt_match[] = { - { - .compatible = "qcom,vfe44", - .data = &vfe44_hw_info, - }, - { - .compatible = "qcom,vfe40", - .data = &vfe40_hw_info, - }, - { - .compatible = "qcom,vfe32", - .data = &vfe32_hw_info, - }, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_vfe_dt_match); - -static const struct platform_device_id msm_vfe_dev_id[] = { - {"msm_vfe32", (kernel_ulong_t) &vfe32_hw_info}, - {} -}; - -#define MAX_OVERFLOW_COUNTERS 15 -#define OVERFLOW_LENGTH 512 -#define OVERFLOW_BUFFER_LENGTH 32 -static struct msm_isp_buf_mgr vfe_buf_mgr; -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats); -static char *stats_str[MAX_OVERFLOW_COUNTERS] = { - "imgmaster0_overflow_cnt", - "imgmaster1_overflow_cnt", - "imgmaster2_overflow_cnt", - "imgmaster3_overflow_cnt", - "imgmaster4_overflow_cnt", - "imgmaster5_overflow_cnt", - "imgmaster6_overflow_cnt", - "be_overflow_cnt", - "bg_overflow_cnt", - "bf_overflow_cnt", - "awb_overflow_cnt", - "rs_overflow_cnt", - "cs_overflow_cnt", - "ihist_overflow_cnt", - "skinbhist_overflow_cnt", -}; - -static int vfe_debugfs_statistics_open(struct inode *inode, struct file *file) -{ - file->private_data = inode->i_private; - return 0; -} - -static ssize_t vfe_debugfs_statistics_read(struct file *t_file, char *t_char, - size_t t_size_t, loff_t *t_loff_t) -{ - int i; - char name[OVERFLOW_LENGTH] = {0}; - int *ptr; - char buffer[OVERFLOW_BUFFER_LENGTH] = {0}; - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - ptr = (int *)stats; - - for (i = 0; i < MAX_OVERFLOW_COUNTERS; i++) { - strlcat(name, stats_str[i], sizeof(name)); - strlcat(name, " ", sizeof(name)); - snprintf(buffer, sizeof(buffer), "%d", ptr[i]); - strlcat(name, buffer, sizeof(name)); - strlcat(name, "\r\n", sizeof(name)); - } - return simple_read_from_buffer(t_char, t_size_t, - t_loff_t, name, strlen(name)); -} - -static ssize_t vfe_debugfs_statistics_write(struct file *t_file, - const char *t_char, size_t t_size_t, loff_t *t_loff_t) -{ - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - memset(stats, 0, sizeof(struct msm_isp_statistics)); - - return sizeof(struct msm_isp_statistics); -} - -static const struct file_operations vfe_debugfs_error = { - .open = vfe_debugfs_statistics_open, - .read = vfe_debugfs_statistics_read, - .write = vfe_debugfs_statistics_write, -}; - -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_isp", NULL); - if (!debugfs_base) - return -ENOMEM; - if (!debugfs_create_file("stats", S_IRUGO | S_IWUSR, debugfs_base, - stats, &vfe_debugfs_error)) - return -ENOMEM; - return 0; -} -static long msm_isp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } -} - -static long msm_isp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_isp_subdev_do_ioctl); -} - -static struct v4l2_file_operations msm_isp_v4l2_subdev_fops = { -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_isp_subdev_fops_ioctl, -#endif - .unlocked_ioctl = msm_isp_subdev_fops_ioctl -}; - -static int vfe_probe(struct platform_device *pdev) -{ - struct vfe_device *vfe_dev; - /*struct msm_cam_subdev_info sd_info;*/ - const struct of_device_id *match_dev; - int rc = 0; - - struct msm_iova_partition vfe_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vfe_layout = { - .partitions = &vfe_partition, - .npartitions = 1, - .client_name = "vfe", - .domain_flags = 0, - }; - - vfe_dev = kzalloc(sizeof(struct vfe_device), GFP_KERNEL); - if (!vfe_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - vfe_dev->stats = kzalloc(sizeof(struct msm_isp_statistics), GFP_KERNEL); - if (!vfe_dev->stats) { - pr_err("%s: no enough memory\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - match_dev = of_match_device(msm_vfe_dt_match, &pdev->dev); - if (!match_dev) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - vfe_dev->hw_info = - (struct msm_vfe_hardware_info *) match_dev->data; - } else { - vfe_dev->hw_info = (struct msm_vfe_hardware_info *) - platform_get_device_id(pdev)->driver_data; - } - - if (!vfe_dev->hw_info) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - ISP_DBG("%s: device id = %d\n", __func__, pdev->id); - - vfe_dev->pdev = pdev; - rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); - if (rc < 0) { - pr_err("%s: failed to get platform resources\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - - INIT_LIST_HEAD(&vfe_dev->tasklet_q); - tasklet_init(&vfe_dev->vfe_tasklet, - msm_isp_do_tasklet, (unsigned long)vfe_dev); - - v4l2_subdev_init(&vfe_dev->subdev.sd, vfe_dev->hw_info->subdev_ops); - vfe_dev->subdev.sd.internal_ops = - vfe_dev->hw_info->subdev_internal_ops; - snprintf(vfe_dev->subdev.sd.name, - ARRAY_SIZE(vfe_dev->subdev.sd.name), - "vfe"); - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vfe_dev->subdev.sd, vfe_dev); - platform_set_drvdata(pdev, &vfe_dev->subdev.sd); - mutex_init(&vfe_dev->realtime_mutex); - mutex_init(&vfe_dev->core_mutex); - spin_lock_init(&vfe_dev->tasklet_lock); - spin_lock_init(&vfe_dev->shared_data_lock); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spin_lock_init(&vfe_dev->sof_lock); -#endif - media_entity_init(&vfe_dev->subdev.sd.entity, 0, NULL, 0); - vfe_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vfe_dev->subdev.sd.entity.group_id = MSM_CAMERA_SUBDEV_VFE; - vfe_dev->subdev.sd.entity.name = pdev->name; - vfe_dev->subdev.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x2; - rc = msm_sd_register(&vfe_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - kfree(vfe_dev); - goto end; - } - - msm_isp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_isp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_isp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_isp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vfe_dev->subdev.sd.devnode->fops = &msm_isp_v4l2_subdev_fops; - - vfe_dev->buf_mgr = &vfe_buf_mgr; - v4l2_subdev_notify(&vfe_dev->subdev.sd, - MSM_SD_NOTIFY_REQ_CB, &vfe_vb2_ops); - rc = msm_isp_create_isp_buf_mgr(vfe_dev->buf_mgr, - &vfe_vb2_ops, &vfe_layout); - if (rc < 0) { - pr_err("%s: Unable to create buffer manager\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - msm_isp_enable_debugfs(vfe_dev->stats); - vfe_dev->buf_mgr->ops->register_ctx(vfe_dev->buf_mgr, - &vfe_dev->iommu_ctx[0], vfe_dev->hw_info->num_iommu_ctx); - vfe_dev->vfe_open_cnt = 0; -end: - return rc; -} - -static struct platform_driver vfe_driver = { - .probe = vfe_probe, - .driver = { - .name = "msm_vfe", - .owner = THIS_MODULE, - .of_match_table = msm_vfe_dt_match, - }, - .id_table = msm_vfe_dev_id, -}; - -static int __init msm_vfe_init_module(void) -{ - return platform_driver_register(&vfe_driver); -} - -static void __exit msm_vfe_exit_module(void) -{ - platform_driver_unregister(&vfe_driver); -} - -module_init(msm_vfe_init_module); -module_exit(msm_vfe_exit_module); -MODULE_DESCRIPTION("MSM VFE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.h deleted file mode 100644 index fca5d35fb6c3..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp.h +++ /dev/null @@ -1,538 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VFE_H__ -#define __MSM_VFE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_isp.h" -#include -#include -#include "msm_buf_mgr.h" - -#define VFE40_8974V1_VERSION 0x10000018 -#define VFE40_8974V2_VERSION 0x1001001A -#define VFE40_8974V3_VERSION 0x1001001B -#define VFE40_8x26_VERSION 0x20000013 -#define VFE40_8x26V2_VERSION 0x20010014 -#define VFE40_8916_VERSION 0x10030000 -#define VFE40_8939_VERSION 0x10040000 - -#define MAX_IOMMU_CTX 2 -#define MAX_NUM_WM 7 -#define MAX_NUM_RDI 3 -#define MAX_NUM_RDI_MASTER 3 -#define MAX_NUM_COMPOSITE_MASK 4 -#define MAX_NUM_STATS_COMP_MASK 2 -#define MAX_INIT_FRAME_DROP 31 -#define ISP_Q2 (1 << 2) - -#define AVTIMER_MSW_PHY_ADDR 0xFE05300C -#define AVTIMER_LSW_PHY_ADDR 0xFE053008 -#define AVTIMER_MSW_PHY_ADDR_8916 0x7706010 -#define AVTIMER_LSW_PHY_ADDR_8916 0x770600C -#define AVTIMER_MODE_CTL_PHY_ADDR_8916 0x7706040 -/*AVTimer h/w is configured to generate 27Mhz ticks*/ -#define AVTIMER_TICK_SCALER_8916 27 -#define AVTIMER_ITERATION_CTR 16 - -#define VFE_PING_FLAG 0xFFFFFFFF -#define VFE_PONG_FLAG 0x0 - -#define VFE_MAX_CFG_TIMEOUT 3000 -#define VFE_CLK_INFO_MAX 16 -#define STATS_COMP_BIT_MASK 0xFF0000 - -struct vfe_device; -struct msm_vfe_axi_stream; -struct msm_vfe_stats_stream; - -struct vfe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum msm_isp_pack_fmt { - QCOM, - MIPI, - DPCM6, - DPCM8, - PLAIN8, - PLAIN16, - MAX_ISP_PACK_FMT, -}; - -enum msm_isp_camif_update_state { - NO_UPDATE, - ENABLE_CAMIF, - DISABLE_CAMIF, - DISABLE_CAMIF_IMMEDIATELY -}; - -enum msm_isp_reset_type { - ISP_RST_HARD, - ISP_RST_SOFT, - ISP_RST_MAX -}; - -struct msm_isp_timestamp { - /*Monotonic clock for v4l2 buffer*/ - struct timeval buf_time; - /*Monotonic clock for VT */ - struct timeval vt_time; - /*Wall clock for userspace event*/ - struct timeval event_time; -}; - -struct msm_vfe_irq_ops { - void (*read_irq_status) (struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1); - void (*process_reg_update) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_reset_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_halt_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_camif_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_axi_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_stats_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -}; - -struct msm_vfe_axi_ops { - void (*reload_wm) (struct vfe_device *vfe_dev, - uint32_t reload_mask); - void (*enable_wm) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable); - int32_t (*cfg_io_format) (struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, - uint32_t io_format); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); - long (*halt) (struct vfe_device *vfe_dev, uint32_t blocking); -}; - -struct msm_vfe_core_ops { - void (*reg_update) (struct vfe_device *vfe_dev); - long (*reset_hw) (struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, - uint32_t blocking); - int (*init_hw) (struct vfe_device *vfe_dev); - void (*init_hw_reg) (struct vfe_device *vfe_dev); - void (*release_hw) (struct vfe_device *vfe_dev); - void (*cfg_camif) (struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg); - void (*update_camif_state) (struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state); - void (*cfg_rdi_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src); - int (*get_platform_data) (struct vfe_device *vfe_dev); - void (*get_error_mask) (uint32_t *error_mask0, uint32_t *error_mask1); - void (*process_error_status) (struct vfe_device *vfe_dev); - void (*get_overflow_mask) (uint32_t *overflow_mask); - void (*get_irq_mask) (struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask); - void (*restore_irq_mask) (struct vfe_device *vfe_dev); - void (*get_halt_restart_mask) (uint32_t *irq0_mask, - uint32_t *irq1_mask); - void (*init_vbif_counters) (struct vfe_device *vfe_dev); - void (*vbif_clear_counters) (struct vfe_device *vfe_dev); - void (*vbif_read_counters) (struct vfe_device *vfe_dev); -}; -struct msm_vfe_stats_ops { - int (*get_stats_idx) (enum msm_isp_stats_type stats_type); - int (*check_streams) (struct msm_vfe_stats_stream *stream_info); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*enable_module) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_frame_id) (struct vfe_device *vfe_dev); - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); -}; - -struct msm_vfe_ops { - struct msm_vfe_irq_ops irq_ops; - struct msm_vfe_axi_ops axi_ops; - struct msm_vfe_core_ops core_ops; - struct msm_vfe_stats_ops stats_ops; -}; - -struct msm_vfe_hardware_info { - int num_iommu_ctx; - int vfe_clk_idx; - struct msm_vfe_ops vfe_ops; - struct msm_vfe_axi_hardware_info *axi_hw_info; - struct msm_vfe_stats_hardware_info *stats_hw_info; - struct v4l2_subdev_internal_ops *subdev_internal_ops; - struct v4l2_subdev_ops *subdev_ops; - uint32_t dmi_reg_offset; -}; - -struct msm_vfe_axi_hardware_info { - uint8_t num_wm; - uint8_t num_rdi; - uint8_t num_rdi_master; - uint8_t num_comp_mask; - uint32_t min_wm_ub; -}; - -enum msm_vfe_axi_state { - AVALIABLE, - INACTIVE, - ACTIVE, - PAUSED, - START_PENDING, - STOP_PENDING, - PAUSE_PENDING, - RESUME_PENDING, - STARTING, - STOPPING, - PAUSING, - RESUMING, -}; - -enum msm_vfe_axi_cfg_update_state { - NO_AXI_CFG_UPDATE, - APPLYING_UPDATE_RESUME, - UPDATE_REQUESTED, -}; - -#define VFE_NO_DROP 0xFFFFFFFF -#define VFE_DROP_EVERY_2FRAME 0x55555555 -#define VFE_DROP_EVERY_4FRAME 0x11111111 -#define VFE_DROP_EVERY_8FRAME 0x01010101 -#define VFE_DROP_EVERY_16FRAME 0x00010001 -#define VFE_DROP_EVERY_32FRAME 0x00000001 - -enum msm_vfe_axi_stream_type { - CONTINUOUS_STREAM, - BURST_STREAM, -}; - -struct msm_vfe_axi_stream { - uint32_t frame_id; - enum msm_vfe_axi_state state; - enum msm_vfe_axi_stream_src stream_src; - uint8_t num_planes; - uint8_t wm[MAX_PLANES_PER_STREAM]; - uint32_t output_format;/*Planar/RAW/Misc*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - uint8_t comp_mask_index; - struct msm_isp_buffer *buf[2]; - uint32_t session_id; - uint32_t stream_id; - uint32_t bufq_handle; - uint32_t bufq_scratch_handle; - uint32_t stream_handle; - uint32_t request_frm_num; - uint8_t buf_divert; - enum msm_vfe_axi_stream_type stream_type; - uint32_t vt_enable; - uint32_t frame_based; - uint32_t framedrop_period; - uint32_t framedrop_pattern; - uint32_t num_burst_capture;/*number of frame to capture*/ - uint32_t init_frame_drop; - uint32_t burst_frame_count;/*number of sof before burst stop*/ - uint8_t framedrop_update; - spinlock_t lock; - - /*Bandwidth calculation info*/ - uint32_t max_width; - /*Based on format plane size in Q2. e.g NV12 = 1.5*/ - uint32_t format_factor; - uint32_t bandwidth; - - /*Run time update variables*/ - uint32_t runtime_init_frame_drop; - uint32_t runtime_burst_frame_count;/*number of sof before burst stop*/ - uint32_t runtime_num_burst_capture; - uint8_t runtime_framedrop_update; - uint32_t runtime_output_format; - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - -}; - -enum msm_vfe_overflow_state { - NO_OVERFLOW, - OVERFLOW_DETECTED, - HALT_REQUESTED, - RESTART_REQUESTED, -}; - -struct msm_vfe_axi_composite_info { - uint32_t stream_handle; - uint32_t stream_composite_mask; -}; - -struct msm_vfe_src_info { - uint32_t frame_id; - uint8_t active; - uint8_t pix_stream_count; - uint8_t raw_stream_count; - enum msm_vfe_inputmux input_mux; - uint32_t width; - long pixel_clock; - uint32_t session_id; - uint32_t input_format;/*V4L2 pix format with bayer pattern*/ - uint32_t last_updt_frm_id; -}; - -enum msm_wm_ub_cfg_type { - MSM_WM_UB_CFG_DEFAULT, - MSM_WM_UB_EQUAL_SLICING, - MSM_WM_UB_CFG_MAX_NUM -}; -#define MAX_SESSIONS 5 -struct msm_vfe_axi_shared_data { - struct msm_vfe_axi_hardware_info *hw_info; - struct msm_vfe_axi_stream stream_info[MAX_NUM_STREAM]; - uint32_t free_wm[MAX_NUM_WM]; - uint32_t wm_image_size[MAX_NUM_WM]; - enum msm_wm_ub_cfg_type wm_ub_cfg_policy; - uint8_t num_used_wm; - uint8_t num_active_stream; - struct msm_vfe_axi_composite_info - composite_info[MAX_NUM_COMPOSITE_MASK]; - uint8_t num_used_composite_mask; - uint32_t stream_update; - atomic_t axi_cfg_update; - enum msm_isp_camif_update_state pipeline_update; - struct msm_vfe_src_info src_info[VFE_SRC_MAX]; - uint16_t stream_handle_cnt; - uint16_t current_frame_src_mask[MAX_SESSIONS]; - uint16_t session_frame_src_mask[MAX_SESSIONS]; - unsigned int frame_id[MAX_SESSIONS]; - uint32_t event_mask; - uint32_t burst_len; -}; - -struct msm_vfe_stats_hardware_info { - uint32_t stats_capability_mask; - uint8_t *stats_ping_pong_offset; - uint8_t num_stats_type; - uint8_t num_stats_comp_mask; -}; - -enum msm_vfe_stats_state { - STATS_AVALIABLE, - STATS_INACTIVE, - STATS_ACTIVE, - STATS_START_PENDING, - STATS_STOP_PENDING, - STATS_STARTING, - STATS_STOPPING, -}; - -struct msm_vfe_stats_stream { - uint32_t session_id; - uint32_t stream_id; - uint32_t stream_handle; - uint32_t composite_flag; - enum msm_isp_stats_type stats_type; - enum msm_vfe_stats_state state; - uint32_t framedrop_pattern; - uint32_t framedrop_period; - uint32_t irq_subsample_pattern; - - uint32_t buffer_offset; - struct msm_isp_buffer *buf[2]; - uint32_t bufq_handle; -}; - -struct msm_vfe_stats_shared_data { - struct msm_vfe_stats_stream stream_info[MSM_ISP_STATS_MAX]; - uint8_t num_active_stream; - atomic_t stats_comp_mask[MAX_NUM_STATS_COMP_MASK]; - uint16_t stream_handle_cnt; - atomic_t stats_update; - uint32_t stats_mask; - uint32_t stats_burst_len; -}; - -struct msm_vfe_tasklet_queue_cmd { - struct list_head list; - uint32_t vfeInterruptStatus0; - uint32_t vfeInterruptStatus1; - struct msm_isp_timestamp ts; - uint8_t cmd_used; -}; - -#define MSM_VFE_TASKLETQ_SIZE 200 - -struct msm_vfe_error_info { - atomic_t overflow_state; - uint32_t overflow_recover_irq_mask0; - uint32_t overflow_recover_irq_mask1; - uint32_t error_mask0; - uint32_t error_mask1; - uint32_t violation_status; - uint32_t camif_status; - uint32_t stream_framedrop_count[MAX_NUM_STREAM]; - uint32_t stats_framedrop_count[MSM_ISP_STATS_MAX]; - uint32_t info_dump_frame_count; - uint32_t error_count; -}; - -struct msm_isp_statistics { - int32_t imagemaster0_overflow; - int32_t imagemaster1_overflow; - int32_t imagemaster2_overflow; - int32_t imagemaster3_overflow; - int32_t imagemaster4_overflow; - int32_t imagemaster5_overflow; - int32_t imagemaster6_overflow; - int32_t be_overflow; - int32_t bg_overflow; - int32_t bf_overflow; - int32_t awb_overflow; - int32_t rs_overflow; - int32_t cs_overflow; - int32_t ihist_overflow; - int32_t skinbhist_overflow; -}; - -struct msm_vbif_cntrs { - int previous_write_val; - int vfe_total_iter; - int fb_err_lvl; - int total_vbif_cnt_2; -}; - -struct vfe_device { - struct platform_device *pdev; - struct msm_sd_subdev subdev; - struct resource *vfe_irq; - struct resource *vfe_mem; - struct resource *vfe_vbif_mem; - struct resource *vfe_io; - struct resource *vfe_vbif_io; - void __iomem *vfe_base; - void __iomem *vfe_vbif_base; - - struct device *iommu_ctx[MAX_IOMMU_CTX]; - - struct regulator *fs_vfe; - struct clk **vfe_clk; - uint32_t num_clk; - - uint32_t bus_perf_client; - - struct completion reset_complete; - struct completion halt_complete; - struct completion stream_config_complete; - struct completion stats_config_complete; - struct mutex realtime_mutex; - struct mutex core_mutex; - - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - spinlock_t shared_data_lock; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spinlock_t sof_lock; -#endif - struct list_head tasklet_q; - struct tasklet_struct vfe_tasklet; - struct msm_vfe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VFE_TASKLETQ_SIZE]; - uint32_t vfe_hw_version; - struct msm_vfe_hardware_info *hw_info; - struct msm_vfe_axi_shared_data axi_data; - struct msm_vfe_stats_shared_data stats_data; - struct msm_vfe_error_info error_info; - struct msm_isp_buf_mgr *buf_mgr; - int dump_reg; - int vfe_clk_idx; - uint32_t vfe_open_cnt; - uint8_t vt_enable; - void __iomem *p_avtimer_msw; - void __iomem *p_avtimer_lsw; - void __iomem *p_avtimer_ctl; - uint8_t avtimer_scaler; - uint8_t ignore_error; - struct msm_isp_statistics *stats; - struct msm_vbif_cntrs vbif_cntrs; - uint32_t vfe_ub_size; - uint32_t frame_id; - uint32_t eof_event_occur; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.c deleted file mode 100644 index 42499f1bfe54..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.c +++ /dev/null @@ -1,1358 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp32.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#define VFE32_BURST_LEN 3 -#define VFE32_UB_SIZE 1024 -#define VFE32_EQUAL_SLICE_UB 194 -#define VFE32_AXI_SLICE_UB 792 -#define VFE32_WM_BASE(idx) (0x4C + 0x18 * idx) -#define VFE32_RDI_BASE(idx) (idx ? 0x734 + 0x4 * (idx - 1) : 0x06FC) -#define VFE32_XBAR_BASE(idx) (0x40 + 0x4 * (idx / 4)) -#define VFE32_XBAR_SHIFT(idx) ((idx % 4) * 8) -#define VFE32_PING_PONG_BASE(wm, ping_pong) \ - (VFE32_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13}; - -#define VFE32_NUM_STATS_TYPE 7 -#define VFE32_STATS_BASE(idx) (0xF4 + 0xC * idx) -#define VFE32_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE32_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE32_CLK_IDX 0 -#define MSM_ISP32_TOTAL_WM_UB 792 -/*792 double word*/ - -static struct msm_cam_clk_info msm_vfe32_1_clk_info[] = { - /*vfe32 clock info for B-family: 8610 */ - {"vfe_clk_src", 266670000}, - {"vfe_clk", -1}, - {"vfe_ahb_clk", -1}, - {"csi_vfe_clk", -1}, - {"bus_clk", -1}, -}; - -static struct msm_cam_clk_info msm_vfe32_2_clk_info[] = { - /*vfe32 clock info for A-family: 8960 */ - {"vfe_clk", 266667000}, - {"vfe_pclk", -1}, - {"csi_vfe_clk", -1}, -}; - -static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - vfe_dev->vfe_clk_idx = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe32_1_clk_info, - vfe_dev->vfe_clk, ARRAY_SIZE(msm_vfe32_1_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 1); - if (rc < 0) - goto clk_enable_failed; - else - vfe_dev->vfe_clk_idx = 2; - } else - vfe_dev->vfe_clk_idx = 1; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe32_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_base); - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe32_init_hardware_reg(struct vfe_device *vfe_dev) -{ - /* CGC_OVERRIDE */ - msm_camera_io_w(0x07FFFFFF, vfe_dev->vfe_base + 0xC); - /* BUS_CFG */ - msm_camera_io_w(0x00000009, vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(0x01000025, vfe_dev->vfe_base + 0x1C); - msm_camera_io_w_mb(0x1CFFFFFF, vfe_dev->vfe_base + 0x20); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(0x1FFFFFFF, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x0, vfe_dev->vfe_base+0x6FC); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(1)); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(2)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(0)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(4)); - -} - -static void msm_vfe32_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & BIT(23)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe32_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ -} - -static void msm_vfe32_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x1F)) - return; - - if (irq_status0 & BIT(0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } -} - -static void msm_vfe32_process_violation_status(struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & BIT(0)) - pr_err("%s: black violation\n", __func__); - if (violation_status & BIT(1)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & BIT(2)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & BIT(3)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & BIT(4)) - pr_err("%s: crop violation\n", __func__); - if (violation_status & BIT(5)) - pr_err("%s: scale violation\n", __func__); - if (violation_status & BIT(6)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & BIT(7)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & BIT(8)) - pr_err("%s: matrix violation\n", __func__); - if (violation_status & BIT(9)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & BIT(10)) - pr_err("%s: la violation\n", __func__); - if (violation_status & BIT(11)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & BIT(12)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & BIT(13)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & BIT(14)) - pr_err("%s: asf violation\n", __func__); - if (violation_status & BIT(15)) - pr_err("%s: scale y violation\n", __func__); - if (violation_status & BIT(16)) - pr_err("%s: scale cbcr violation\n", __func__); - if (violation_status & BIT(17)) - pr_err("%s: chroma subsample violation\n", __func__); - if (violation_status & BIT(18)) - pr_err("%s: framedrop enc y violation\n", __func__); - if (violation_status & BIT(19)) - pr_err("%s: framedrop enc cbcr violation\n", __func__); - if (violation_status & BIT(20)) - pr_err("%s: framedrop view y violation\n", __func__); - if (violation_status & BIT(21)) - pr_err("%s: framedrop view cbcr violation\n", __func__); - if (violation_status & BIT(22)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & BIT(23)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & BIT(24)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe32_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & BIT(0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & BIT(1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & BIT(2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & BIT(3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & BIT(4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & BIT(5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & BIT(6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & BIT(7)) { - pr_err("%s: violation\n", __func__); - msm_vfe32_process_violation_status(vfe_dev); - } - if (error_status1 & BIT(8)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err("%s: image master 0 bus overflow\n", __func__); - } - if (error_status1 & BIT(9)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err("%s: image master 1 bus overflow\n", __func__); - } - if (error_status1 & BIT(10)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err("%s: image master 2 bus overflow\n", __func__); - } - if (error_status1 & BIT(11)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err("%s: image master 3 bus overflow\n", __func__); - } - if (error_status1 & BIT(12)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err("%s: image master 4 bus overflow\n", __func__); - } - if (error_status1 & BIT(13)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err("%s: image master 5 bus overflow\n", __func__); - } - if (error_status1 & BIT(14)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err("%s: image master 6 bus overflow\n", __func__); - } - if (error_status1 & BIT(15)) { - vfe_dev->stats->bg_overflow++; - pr_err("%s: status ae/bg bus overflow\n", __func__); - } - if (error_status1 & BIT(16)) { - vfe_dev->stats->bf_overflow++; - pr_err("%s: status af/bf bus overflow\n", __func__); - } - if (error_status1 & BIT(17)) { - vfe_dev->stats->awb_overflow++; - pr_err("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & BIT(18)) { - vfe_dev->stats->rs_overflow++; - pr_err("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & BIT(19)) { - vfe_dev->stats->cs_overflow++; - pr_err("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & BIT(20)) { - vfe_dev->stats->ihist_overflow++; - pr_err("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & BIT(21)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err("%s: status skin bhist bus overflow\n", __func__); - } - if (error_status1 & BIT(22)) - pr_err("%s: axi error\n", __func__); -} - -static void msm_vfe32_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(*irq_status1, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x18); - - if (*irq_status1 & BIT(0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x204); - - if (*irq_status1 & BIT(7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x7B4); -} - -static void msm_vfe32_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x20) && !(irq_status1 & 0x1C000000)) - return; - - if (irq_status0 & BIT(5)) - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (irq_status1 & BIT(26)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - if (irq_status1 & BIT(27)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_1, ts); - if (irq_status1 & BIT(28)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_2, ts); - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev); - return; -} - -static void msm_vfe32_reg_update( - struct vfe_device *vfe_dev) -{ - msm_camera_io_w_mb(0xF, vfe_dev->vfe_base + 0x260); -} - -#if 0 -static uint32_t msm_vfe32_reset_values[ISP_RST_MAX] = { - 0x3FF, /* ISP_RST_HARD reset everything */ - 0x3EF /* ISP_RST_SOFT same as HARD RESET */ -}; -#endif - -static long msm_vfe32_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - long rc = 0; - if (blocking) { - init_completion(&vfe_dev->reset_complete); - msm_camera_io_w_mb(0x3FF, vfe_dev->vfe_base + 0x4); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x3FF, vfe_dev->vfe_base + 0x4); - } - return rc; -} - -static void msm_vfe32_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - if (!vfe_dev->pdev->dev.of_node) { - /*vfe32 A-family: 8960*/ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x38); - } else { - /*vfe32 B-family: 8610*/ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x1C800000, vfe_dev->vfe_base + 0x20); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x9AAAAAAA , vfe_dev->vfe_base + 0x600); - msm_camera_io_w(reload_mask, vfe_dev->vfe_base + 0x38); - } -} - -static void msm_vfe32_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); -} - -static void msm_vfe32_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t framedrop_pattern = 0, framedrop_period = 0; - uint32_t rdi_reg_cfg; - int32_t val = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x504); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x508); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x514); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x518); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x520); - } else if (stream_info->stream_src == RDI_INTF_0 || - stream_info->stream_src == RDI_INTF_1 || - stream_info->stream_src == RDI_INTF_2) { - if (stream_info->runtime_init_frame_drop) { - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + - VFE32_RDI_BASE(stream_info->stream_src - VFE_SRC_MAX)); - val = ((stream_info->runtime_init_frame_drop + 1) << 20) - | 0x1000000; - rdi_reg_cfg |= val; - msm_camera_io_w(rdi_reg_cfg, vfe_dev->vfe_base + - VFE32_RDI_BASE(stream_info->stream_src - VFE_SRC_MAX)); - } else if (0 == stream_info->runtime_init_frame_drop) { - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + - VFE32_RDI_BASE(stream_info->stream_src - VFE_SRC_MAX)); - if (stream_info->framedrop_period == 0 || - stream_info->framedrop_period == 1) - rdi_reg_cfg = 0xFE0FFFFF & rdi_reg_cfg; - else - rdi_reg_cfg = 0xFF0FFFFF & rdi_reg_cfg; - val = stream_info->framedrop_period << 20; - rdi_reg_cfg = rdi_reg_cfg | val; - msm_camera_io_w(rdi_reg_cfg, vfe_dev->vfe_base + - VFE32_RDI_BASE(stream_info->stream_src - VFE_SRC_MAX)); - } - } - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x260); -} - -static void msm_vfe32_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x520); - } -} - -static int32_t msm_vfe32_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_fmt = 0, pack_reg = 0; - uint32_t io_format_reg; - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x6F8); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x6F8); - return 0; -} - -static void msm_vfe32_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x14); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, - vfe_dev->vfe_base + 0x1EC); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x1F0); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x1F4); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x6FC); - val &= 0xFFFFFFFC; - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x6FC); -} - -static void msm_vfe32_update_camif_state( - struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x1E4); - if (update_state == ENABLE_CAMIF) { - bus_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x1E4); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x1E0); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - vfe_dev->ignore_error = 1; - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - vfe_dev->ignore_error = 0; - } -} - -static void msm_vfe32_cfg_rdi_reg(struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - -} - -static void msm_vfe32_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } - return; -} - -static void msm_vfe32_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - /* FRAME BASED */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - return; -} - -static void msm_vfe32_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 5; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 3; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= BIT(1); /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x60; - break; - case IDEAL_RAW: - xbar_cfg = 0x80; - break; - case RDI_INTF_0: - xbar_cfg = 0xA0; - break; - case RDI_INTF_1: - xbar_cfg = 0xC0; - break; - case RDI_INTF_2: - xbar_cfg = 0xE0; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - } - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - return; -} - -static void msm_vfe32_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); -} - -static void msm_vfe32_cfg_axi_ub_equal_default(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint32_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP32_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (uint64_t)(axi_data->wm_image_size[i] * - prop_size); - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | - (wm_ub_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += wm_ub_size; - } else { - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE32_WM_BASE(i) + 0xC); - } - } -} - -static void msm_vfe32_cfg_axi_ub_equal_slicing(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t final_ub_slice_size; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (ub_offset + VFE32_EQUAL_SLICE_UB > VFE32_AXI_SLICE_UB) { - final_ub_slice_size = VFE32_AXI_SLICE_UB - ub_offset; - msm_camera_io_w(ub_offset << 16 | - (final_ub_slice_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += final_ub_slice_size; - } else { - msm_camera_io_w(ub_offset << 16 | - (VFE32_EQUAL_SLICE_UB - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += VFE32_EQUAL_SLICE_UB; - } - } -} - -static void msm_vfe32_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe32_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe32_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe32_update_ping_pong_addr(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe32_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - uint32_t halt_mask; - uint32_t axi_busy_flag = false; - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1D8); - if (blocking) { - axi_busy_flag = true; - } - while (axi_busy_flag) { - if (msm_camera_io_r( - vfe_dev->vfe_base + 0x1DC) & 0x1) - axi_busy_flag = false; - } - msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); - halt_mask &= 0xFEFFFFFF; - /* Disable AXI IRQ */ - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x20); - return 0; -} - -static uint32_t msm_vfe32_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 6) & 0x7F; -} - -static uint32_t msm_vfe32_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 21) & 0x7; -} - -static uint32_t msm_vfe32_get_pingpong_status(struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x180); -} - -static int msm_vfe32_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_AEC: - case MSM_ISP_STATS_BG: - return 0; - case MSM_ISP_STATS_AF: - case MSM_ISP_STATS_BF: - return 1; - case MSM_ISP_STATS_AWB: - return 2; - case MSM_ISP_STATS_RS: - return 3; - case MSM_ISP_STATS_CS: - return 4; - case MSM_ISP_STATS_IHIST: - return 5; - case MSM_ISP_STATS_SKIN: - case MSM_ISP_STATS_BHIST: - return 6; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe32_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe32_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - stats_mask = stats_mask & 0x7F; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - if (enable) - atomic_add(stats_mask, stats_comp); - else - atomic_sub(stats_mask, stats_comp); - ISP_DBG("%s: comp_mask: %x\n", - __func__, atomic_read(&stats_data->stats_comp_mask[i])); - } - return; -} - -static void msm_vfe32_stats_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(STATS_IDX(stream_info->stream_handle) + 13); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~(BIT(STATS_IDX(stream_info->stream_handle) + 13)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_cfg_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_clear_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE32_UB_SIZE; - uint32_t ub_size[VFE32_NUM_STATS_TYPE] = { - 107, /*MSM_ISP_STATS_BG*/ - 92, /*MSM_ISP_STATS_BF*/ - 2, /*MSM_ISP_STATS_AWB*/ - 7, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 2, /*MSM_ISP_STATS_IHIST*/ - 7, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE32_STATS_BASE(i) + 0x8); - } - return; -} - -static void msm_vfe32_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - module_cfg_mask |= 1 << (5 + i); - break; - case 5: - module_cfg_mask |= 1 << 16; - break; - case 6: - module_cfg_mask |= 1 << 19; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x10); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x10); -} - -static void msm_vfe32_stats_update_ping_pong_addr(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe32_stats_get_wm_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 13) & 0x7F; -} - -static void msm_vfe32_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x002FFF7E; -} - -static void msm_vfe32_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x1C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = 0x0; - *irq1_mask = 0x01800000; -} - -static uint32_t msm_vfe32_stats_get_comp_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 24) & 0x1; -} - -static uint32_t msm_vfe32_stats_get_frame_id(struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe_imgwr"); - else - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe_misc"); - else - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[1]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe32_get_error_mask(uint32_t *error_mask0, - uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x007FFFFF; -} - -struct msm_vfe_axi_hardware_info msm_vfe32_axi_hw_info = { - .num_wm = 6, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe32_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_AEC | 1 << MSM_ISP_STATS_BG | - 1 << MSM_ISP_STATS_AF | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_SKIN | 1 << MSM_ISP_STATS_BHIST, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE32_NUM_STATS_TYPE, - .num_stats_comp_mask = 0, -}; - -static struct v4l2_subdev_core_ops msm_vfe32_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe32_subdev_ops = { - .core = &msm_vfe32_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe32_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe32_hw_info = { - .num_iommu_ctx = 2, - .vfe_clk_idx = VFE32_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe32_read_irq_status, - .process_camif_irq = msm_vfe32_process_camif_irq, - .process_reset_irq = msm_vfe32_process_reset_irq, - .process_halt_irq = msm_vfe32_process_halt_irq, - .process_reg_update = msm_vfe32_process_reg_update, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe32_axi_reload_wm, - .enable_wm = msm_vfe32_axi_enable_wm, - .cfg_io_format = msm_vfe32_cfg_io_format, - .cfg_comp_mask = msm_vfe32_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe32_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe32_cfg_framedrop, - .clear_framedrop = msm_vfe32_clear_framedrop, - .cfg_wm_reg = msm_vfe32_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe32_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe32_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe32_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe32_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_get_comp_mask, - .get_wm_mask = msm_vfe32_get_wm_mask, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - .halt = msm_vfe32_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe32_reg_update, - .cfg_camif = msm_vfe32_cfg_camif, - .update_camif_state = msm_vfe32_update_camif_state, - .cfg_rdi_reg = msm_vfe32_cfg_rdi_reg, - .reset_hw = msm_vfe32_reset_hardware, - .init_hw = msm_vfe32_init_hardware, - .init_hw_reg = msm_vfe32_init_hardware_reg, - .release_hw = msm_vfe32_release_hardware, - .get_platform_data = msm_vfe32_get_platform_data, - .get_error_mask = msm_vfe32_get_error_mask, - .get_overflow_mask = msm_vfe32_get_overflow_mask, - .get_irq_mask = msm_vfe32_get_irq_mask, - .restore_irq_mask = msm_vfe32_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe32_get_halt_restart_mask, - .process_error_status = msm_vfe32_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe32_get_stats_idx, - .check_streams = msm_vfe32_stats_check_streams, - .cfg_comp_mask = msm_vfe32_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe32_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_stats_clear_wm_reg, - .cfg_ub = msm_vfe32_stats_cfg_ub, - .enable_module = msm_vfe32_stats_enable_module, - .update_ping_pong_addr = - msm_vfe32_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_stats_get_comp_mask, - .get_wm_mask = msm_vfe32_stats_get_wm_mask, - .get_frame_id = msm_vfe32_stats_get_frame_id, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x5A0, - .axi_hw_info = &msm_vfe32_axi_hw_info, - .stats_hw_info = &msm_vfe32_stats_hw_info, - .subdev_ops = &msm_vfe32_subdev_ops, - .subdev_internal_ops = &msm_vfe32_internal_ops, -}; -EXPORT_SYMBOL(vfe32_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.h deleted file mode 100644 index 05350486271d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp32.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP32_H__ -#define __MSM_ISP32_H__ - -extern struct msm_vfe_hardware_info vfe32_hw_info; -#endif /* __MSM_ISP32_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.c deleted file mode 100644 index 9a16946da8c9..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.c +++ /dev/null @@ -1,1835 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_isp40.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define VFE40_BURST_LEN 1 -#define VFE40_BURST_LEN_8916_VERSION 2 -#define VFE40_STATS_BURST_LEN 1 -#define VFE40_STATS_BURST_LEN_8916_VERSION 2 -#define VFE40_UB_SIZE 1536 /* 1536 * 128 bits = 24KB */ -#define VFE40_UB_SIZE_8916 2048 /* 2048 * 128 bits = 32KB */ -#define VFE40_EQUAL_SLICE_UB 190 /* (UB_SIZE - STATS SIZE)/6 */ -#define VFE40_EQUAL_SLICE_UB_8916 276 -#define VFE40_TOTAL_WM_UB 1144 /* UB_SIZE - STATS SIZE */ -#define VFE40_TOTAL_WM_UB_8916 1656 - - -/* STATS_SIZE (BE + BG + BF+ RS + CS + IHIST + BHIST ) = 392 */ -#define VFE40_STATS_SIZE 392 -#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE40_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE40_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE40_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE40_PING_PONG_BASE(wm, ping_pong) \ - (VFE40_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 8, 9, 10, 11, 12, 13, 14, 15}; - -#define VFE40_NUM_STATS_TYPE 8 -#define VFE40_STATS_BASE(idx) (0x168 + 0x18 * idx) -#define VFE40_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE40_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE40_VBIF_CLKON 0x4 -#define VFE40_VBIF_FIXED_SORT_EN 0x30 -#define VFE40_VBIF_FIXED_SORT_SEL0 0x34 -#define VFE40_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE40_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE40_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE40_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE40_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE40_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE40_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE40_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE40_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE40_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE40_VBIF_ARB_CTL 0xF0 -#define VFE40_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE40_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE40_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE40_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE40_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE40_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE40_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE40_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE40_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE40_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE40_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE40_CLK_IDX 1 -/*Iterations for averaging outstanding writes counts*/ -#define MAX_NUM_FRAMES 10 -/* Maximum outstanding writes to avoid image master bus -overflows*/ -#define MAX_OUT_WRITES_LEVEL 4000000 - -static struct msm_cam_clk_info msm_vfe40_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe40_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE40_8974V1_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26V2_VERSION) { - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0002AAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8974V2_VERSION || - vfe_dev->vfe_hw_version == VFE40_8974V3_VERSION) { - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION || - vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe40_init_vbif_parms_8974_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10010110, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_OCMEM_OUT_MAX_BURST); - msm_camera_io_w(0x00000030, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000001, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8974_v2(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8x26(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x000000FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x00FF00FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - return; -} - -static void msm_vfe40_init_vbif_parms_8939(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x00000fff, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_EN); - msm_camera_io_w(0x00555000, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_SEL0); - return; -} - -static void msm_vfe40_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8974V1_VERSION: - msm_vfe40_init_vbif_parms_8974_v1(vfe_dev); - break; - case VFE40_8974V2_VERSION: - case VFE40_8974V3_VERSION: - msm_vfe40_init_vbif_parms_8974_v2(vfe_dev); - break; - case VFE40_8x26_VERSION: - case VFE40_8x26V2_VERSION: - msm_vfe40_init_vbif_parms_8x26(vfe_dev); - break; - case VFE40_8916_VERSION: - /*Reset hardware values are correct vbif values. - So no need to set*/ - break; - case VFE40_8939_VERSION: - msm_vfe40_init_vbif_parms_8939(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } - -} - -static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, - &msm_vfe40_clk_info[0]); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe40_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe40_init_hardware_reg(struct vfe_device *vfe_dev) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - msm_vfe40_init_qos_parms(vfe_dev); - msm_vfe40_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0x3FFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - /* Enable EPOCH IRQ for 100 frame lines*/ - irq_mask |= BIT(3); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x64, vfe_dev->vfe_base + 0x318); - msm_camera_io_w(vfe_dev->stats_data.stats_mask, - vfe_dev->vfe_base + 0x44); - -} - -static void msm_vfe40_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe40_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int cnt; - - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - cnt = vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count; - if (cnt > 0) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)){ - vfe_dev->eof_event_occur = 1; - ISP_DBG("%s: EOF IRQ\n", __func__); - } - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) { - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->hw_info->vfe_ops.core_ops. - vbif_read_counters(vfe_dev); - } - } -} - -static void msm_vfe40_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & (1 << 0)) - pr_err("%s: camif violation\n", __func__); - if (violation_status & (1 << 1)) - pr_err("%s: black violation\n", __func__); - if (violation_status & (1 << 2)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & (1 << 3)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & (1 << 4)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & (1 << 5)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & (1 << 6)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & (1 << 7)) - pr_err("%s: color correct violation\n", __func__); - if (violation_status & (1 << 8)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & (1 << 9)) - pr_err("%s: la violation\n", __func__); - if (violation_status & (1 << 10)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & (1 << 11)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & (1 << 12)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & (1 << 13)) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status & (1 << 14)) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status & (1 << 15)) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status & (1 << 16)) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status & (1 << 17)) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status & (1 << 18)) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status & (1 << 19)) - pr_err("%s: asf enc violation\n", __func__); - if (violation_status & (1 << 20)) - pr_err("%s: asf view violation\n", __func__); - if (violation_status & (1 << 21)) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status & (1 << 22)) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status & (1 << 23)) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status & (1 << 24)) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status & (1 << 25)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & (1 << 26)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & (1 << 27)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe40_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err_ratelimited("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err_ratelimited("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err_ratelimited("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err_ratelimited("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err_ratelimited("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err_ratelimited("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err_ratelimited("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err_ratelimited("%s: violation\n", __func__); - msm_vfe40_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err_ratelimited("%s: image master 0 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 10)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err_ratelimited("%s: image master 1 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 11)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err_ratelimited("%s: image master 2 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 12)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err_ratelimited("%s: image master 3 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 13)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err_ratelimited("%s: image master 4 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 14)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err_ratelimited("%s: image master 5 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 15)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err_ratelimited("%s: image master 6 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 16)) { - vfe_dev->stats->be_overflow++; - pr_err_ratelimited("%s: status be bus overflow\n", __func__); - } - if (error_status1 & (1 << 17)) { - vfe_dev->stats->bg_overflow++; - pr_err_ratelimited("%s: status bg bus overflow\n", __func__); - } - if (error_status1 & (1 << 18)) { - vfe_dev->stats->bf_overflow++; - pr_err_ratelimited("%s: status bf bus overflow\n", __func__); - } - if (error_status1 & (1 << 19)) { - vfe_dev->stats->awb_overflow++; - pr_err_ratelimited("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & (1 << 20)) { - vfe_dev->stats->rs_overflow++; - pr_err_ratelimited("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & (1 << 21)) { - vfe_dev->stats->cs_overflow++; - pr_err_ratelimited("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & (1 << 22)) { - vfe_dev->stats->ihist_overflow++; - pr_err_ratelimited("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & (1 << 23)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err_ratelimited("%s: status skin bhist bus overflow\n", - __func__); - } -} - -static void msm_vfe40_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - /* - * Ignore composite 2/3 irq which is used for dual VFE only - */ - - if (*irq_status0 & 0x6000000) - *irq_status0 &= ~(0x18000000); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x18000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x18000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (irq_status0 & BIT(5)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - if (irq_status0 & BIT(6)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_1, ts); - if (irq_status0 & BIT(7)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_2, ts); - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - return; -} - -static void msm_vfe40_reg_update(struct vfe_device *vfe_dev) -{ - msm_camera_io_w_mb(0xF, vfe_dev->vfe_base + 0x378); -} - -static uint32_t msm_vfe40_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - - -static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe40_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(1000)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe40_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe40_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); -} - -static void msm_vfe40_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - - /* - * For dual VFE, composite 2/3 interrupt is used to trigger - * microcontroller to update certain VFE registers - */ - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask |= BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask |= BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask &= ~BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask &= ~BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_init_vbif_cntrs(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - - msm_camera_io_w(0x15, vfe_dev->vfe_vbif_base + 0x340); - msm_camera_io_w(0x40, vfe_dev->vfe_vbif_base + 0x344); - msm_camera_io_w(0x78, vfe_dev->vfe_vbif_base + 0x348); - - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - break; - default: - break; - } -} - -void msm_vfe40_vbif_clear_cnt(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - break; - default: - break; - } -} - -void msm_vfe40_vbif_read_cnt_epoch(struct vfe_device *vfe_dev) -{ - uint32_t vbif_cnt_0_l = 0; - uint32_t vbif_cnt_1_l = 0; - uint32_t vbif_cnt_2_l = 0; - struct msm_vbif_cntrs *vbif_cntrs = &vfe_dev->vbif_cntrs; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - - if (vfe_dev->axi_data.frame_id[session_id]%2 > 0) { - /*Disable counters before reading*/ - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x308); - /*Read counters*/ - vbif_cnt_0_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x360); - vbif_cnt_1_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x364); - vbif_cnt_2_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x368); - /*clear counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - /*Enable counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - - vbif_cntrs->total_vbif_cnt_2 += vbif_cnt_2_l; - vbif_cntrs->vfe_total_iter++; - - ISP_DBG("%s: VBIF cntr0 = %d, cntr1 = %d, cntr 2 = %d", - __func__, vbif_cnt_0_l, vbif_cnt_1_l, vbif_cnt_2_l); - - if ((vbif_cnt_2_l > 0) & (vbif_cntrs->previous_write_val > 0)) { - if ((vbif_cnt_2_l > (10 * - vbif_cntrs->previous_write_val)) - | (vbif_cnt_2_l > MAX_OUT_WRITES_LEVEL)) - vbif_cntrs->fb_err_lvl = 3; - else if (vbif_cnt_2_l > (5 * - vbif_cntrs->previous_write_val)) - vbif_cntrs->fb_err_lvl = 2; - else if (vbif_cnt_2_l > (2 * - (vbif_cntrs->previous_write_val))) - vbif_cntrs->fb_err_lvl = 1; - else - vbif_cntrs->fb_err_lvl = 0; - } - if ((vbif_cntrs->previous_write_val == 0) & - (vbif_cnt_2_l > 0)) { - vbif_cntrs->previous_write_val = vbif_cnt_2_l; - } - - if (vbif_cntrs->vfe_total_iter == MAX_NUM_FRAMES) { - vbif_cntrs->previous_write_val = - (vbif_cntrs->total_vbif_cnt_2)/MAX_NUM_FRAMES; - vbif_cntrs->vfe_total_iter = 0; - vbif_cntrs->total_vbif_cnt_2 = 0; - } - } -} - -static void msm_vfe40_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe40_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe40_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - if (update_state == ENABLE_CAMIF) { - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x2F4); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - vfe_dev->ignore_error = 1; - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - vfe_dev->ignore_error = 0; - } -} - -static void msm_vfe40_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); -} - -static void msm_vfe40_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t burst_len; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - burst_len = VFE40_BURST_LEN_8916_VERSION; - else - burst_len = VFE40_BURST_LEN; - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ - return; -} - -static void msm_vfe40_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); - return; -} - -static void msm_vfe40_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - return; -} - -static void msm_vfe40_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); -} - -static void msm_vfe40_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t total_wm_ub; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - total_wm_ub = VFE40_TOTAL_WM_UB_8916; - else - total_wm_ub = VFE40_TOTAL_WM_UB; - - prop_size = total_wm_ub - - axi_data->hw_info->min_wm_ub * num_used_wms; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - uint64_t delta = 0; - uint64_t temp = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(temp, total_image_size); - delta = temp; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe40_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t equal_slice_ub; - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - equal_slice_ub = VFE40_EQUAL_SLICE_UB_8916; - else - equal_slice_ub = VFE40_EQUAL_SLICE_UB; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (equal_slice_ub - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += equal_slice_ub; - } -} - -static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe40_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe40_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - long rc = 0; - /* Keep only restart mask and halt mask*/ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x28); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x2C); - /* Clear IRQ Status*/ - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - if (blocking) { - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } - return rc; -} - -static uint32_t msm_vfe40_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static void msm_vfe40_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x00FFFE7E; -} - -static void msm_vfe40_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x28); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} - -static uint32_t msm_vfe40_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe40_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe40_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return 0; - case MSM_ISP_STATS_BG: - return 1; - case MSM_ISP_STATS_BF: - return 2; - case MSM_ISP_STATS_AWB: - return 3; - case MSM_ISP_STATS_RS: - return 4; - case MSM_ISP_STATS_CS: - return 5; - case MSM_ISP_STATS_IHIST: - return 6; - case MSM_ISP_STATS_BHIST: - return 7; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe40_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - stats_mask = stats_mask & 0xFF; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - stats_comp = &stats_data->stats_comp_mask[i]; - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (stats_mask << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - stats_mask)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(stats_mask << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - vfe_dev->stats_data.stats_mask = reg_mask; - return; - } -} - -static void msm_vfe40_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 16); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 16)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t ub_offset = vfe_dev->vfe_ub_size; - uint32_t stats_burst_len = stats_data->stats_burst_len; - - uint32_t ub_size[VFE40_NUM_STATS_TYPE] = { - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION; - ub_offset = VFE40_UB_SIZE_8916; - } else { - stats_burst_len = VFE40_STATS_BURST_LEN; - ub_offset = VFE40_UB_SIZE; - } - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(stats_burst_len << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE40_STATS_BASE(i) + 0xC); - } -} - -static void msm_vfe40_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - module_cfg_mask |= 1 << (5 + i); - break; - case 6: - module_cfg_mask |= 1 << 15; - break; - case 7: - module_cfg_mask |= 1 << 18; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); -} - -static void msm_vfe40_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe40_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 16) & 0xFF; -} - -static uint32_t msm_vfe40_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe40_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe40_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x00FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe40_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE40_NUM_STATS_TYPE, - .num_stats_comp_mask = 2, -}; - -static struct v4l2_subdev_core_ops msm_vfe40_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe40_subdev_ops = { - .core = &msm_vfe40_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe40_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe40_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE40_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe40_read_irq_status, - .process_camif_irq = msm_vfe40_process_camif_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_halt_irq = msm_vfe40_process_halt_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_reg_update = msm_vfe40_process_reg_update, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe40_axi_reload_wm, - .enable_wm = msm_vfe40_axi_enable_wm, - .cfg_io_format = msm_vfe40_cfg_io_format, - .cfg_comp_mask = msm_vfe40_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe40_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe40_cfg_framedrop, - .clear_framedrop = msm_vfe40_clear_framedrop, - .cfg_wm_reg = msm_vfe40_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe40_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe40_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe40_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe40_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_get_comp_mask, - .get_wm_mask = msm_vfe40_get_wm_mask, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - .halt = msm_vfe40_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe40_reg_update, - .cfg_camif = msm_vfe40_cfg_camif, - .update_camif_state = msm_vfe40_update_camif_state, - .cfg_rdi_reg = msm_vfe40_cfg_rdi_reg, - .reset_hw = msm_vfe40_reset_hardware, - .init_hw = msm_vfe40_init_hardware, - .init_hw_reg = msm_vfe40_init_hardware_reg, - .release_hw = msm_vfe40_release_hardware, - .get_platform_data = msm_vfe40_get_platform_data, - .get_error_mask = msm_vfe40_get_error_mask, - .get_overflow_mask = msm_vfe40_get_overflow_mask, - .get_irq_mask = msm_vfe40_get_irq_mask, - .restore_irq_mask = msm_vfe40_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe40_get_halt_restart_mask, - .process_error_status = msm_vfe40_process_error_status, - .init_vbif_counters = msm_vfe40_init_vbif_cntrs, - .vbif_clear_counters = msm_vfe40_vbif_clear_cnt, - .vbif_read_counters = msm_vfe40_vbif_read_cnt_epoch, - }, - .stats_ops = { - .get_stats_idx = msm_vfe40_get_stats_idx, - .check_streams = msm_vfe40_stats_check_streams, - .cfg_comp_mask = msm_vfe40_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe40_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_stats_clear_wm_reg, - .cfg_ub = msm_vfe40_stats_cfg_ub, - .enable_module = msm_vfe40_stats_enable_module, - .update_ping_pong_addr = - msm_vfe40_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_stats_get_comp_mask, - .get_wm_mask = msm_vfe40_stats_get_wm_mask, - .get_frame_id = msm_vfe40_stats_get_frame_id, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe40_axi_hw_info, - .stats_hw_info = &msm_vfe40_stats_hw_info, - .subdev_ops = &msm_vfe40_subdev_ops, - .subdev_internal_ops = &msm_vfe40_internal_ops, -}; -EXPORT_SYMBOL(vfe40_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.h deleted file mode 100644 index e9b151816a37..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp40.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP40_H__ -#define __MSM_ISP40_H__ - -extern struct msm_vfe_hardware_info vfe40_hw_info; -#endif /* __MSM_ISP40_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.c deleted file mode 100644 index 03c6231988e2..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.c +++ /dev/null @@ -1,1480 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp44.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_AWB 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE44_8084V1_VERSION 0x4000000A - -#define VFE44_BURST_LEN 3 -#define VFE44_STATS_BURST_LEN 2 -#define VFE44_UB_SIZE 2048 -#define VFE44_EQUAL_SLICE_UB 228 -#define VFE44_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE44_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE44_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE44_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE44_PING_PONG_BASE(wm, ping_pong) \ - (VFE44_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13, 14, 15}; - -#define SHIFT_BF_SCALE_BIT 1 -#define VFE44_NUM_STATS_COMP 2 -#define VFE44_NUM_STATS_TYPE 9 -#define VFE44_STATS_BASE(idx) \ - ((idx) == STATS_IDX_BF_SCALE ? 0xA0C : (0x168 + 0x18 * (idx-1))) -#define VFE44_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE44_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE44_VBIF_CLKON 0x4 -#define VFE44_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE44_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE44_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE44_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE44_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE44_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE44_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE44_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE44_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE44_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE44_VBIF_ARB_CTL 0xF0 -#define VFE44_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE44_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE44_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE44_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE44_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE44_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE44_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE44_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE44_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE44_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE44_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE44_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe44_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe44_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE44_8084V1_VERSION) { - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe44_init_vbif_parms_8084_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE44_VBIF_CLKON); - msm_camera_io_w(0x00100000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x00001000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10100000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00101000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x3, - vfe_vbif_base + VFE44_VBIF_ROUND_ROBIN_QOS_ARB); -} - -static void msm_vfe44_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE44_8084V1_VERSION: - msm_vfe44_init_vbif_parms_8084_v1(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - break; - } - -} - -static int msm_vfe44_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe44_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe44_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe44_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe44_init_qos_parms(vfe_dev); - msm_vfe44_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0xFBFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); -} - -static void msm_vfe44_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe44_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe44_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe44_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status == 0) - pr_err("%s: camif violation\n", __func__); - if (violation_status == 1) - pr_err("%s: black violation\n", __func__); - if (violation_status == 2) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status == 3) - pr_err("%s: demux violation\n", __func__); - if (violation_status == 4) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status == 5) - pr_err("%s: wb violation\n", __func__); - if (violation_status == 6) - pr_err("%s: clf violation\n", __func__); - if (violation_status == 7) - pr_err("%s: color correct violation\n", __func__); - if (violation_status == 8) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status == 9) - pr_err("%s: la violation\n", __func__); - if (violation_status == 10) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status == 11) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status == 12) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status == 13) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status == 14) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status == 15) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status == 16) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status == 17) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status == 18) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status == 21) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status == 22) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status == 23) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status == 24) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status == 25) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status == 26) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status == 27) - pr_err("%s: realign buf cr violation\n", __func__); - if (violation_status == 28) - pr_err("%s: ltm violation\n", __func__); - if (violation_status == 29) - pr_err("%s: ltm cov violation\n", __func__); - if (violation_status == 30) - pr_err("%s: abf violation\n", __func__); - if (violation_status == 31) - pr_err("%s: bpc violation\n", __func__); -} - -static void msm_vfe44_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe44_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status awb bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe44_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x10000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x10000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (irq_status0 & BIT(5)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - if (irq_status0 & BIT(6)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_1, ts); - if (irq_status0 & BIT(7)) - msm_isp_sof_notify(vfe_dev, VFE_RAW_2, ts); - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); -} - -static void msm_vfe44_reg_update(struct vfe_device *vfe_dev) -{ - msm_camera_io_w_mb(0xF, vfe_dev->vfe_base + 0x378); -} - -static uint32_t msm_vfe44_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - -static long msm_vfe44_reset_hardware(struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe44_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe44_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe44_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); -} - -static void msm_vfe44_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe44_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - if (update_state == ENABLE_CAMIF) { - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x2, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe44_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); -} - -static void msm_vfe44_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe44_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe44_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -static void msm_vfe44_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -#define MSM_ISP44_TOTAL_WM_UB 1203 - -static void msm_vfe44_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP44_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (axi_data->wm_image_size[i] * - prop_size)/total_image_size; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe44_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (VFE44_EQUAL_SLICE_UB - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += VFE44_EQUAL_SLICE_UB; - } -} - -static void msm_vfe44_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe44_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe44_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe44_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) -{ - uint32_t halt_mask; - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - halt_mask |= (1 << 8); - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x2C); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - return wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); -} - -static uint32_t msm_vfe44_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe44_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe44_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe44_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return STATS_IDX_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_AWB: - return STATS_IDX_AWB; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe44_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe44_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_sub((1 << STATS_IDX_BF_SCALE), - stats_comp); - - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - mask_bf_scale)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(mask_bf_scale << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - return; - } -} - -static void msm_vfe44_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE44_UB_SIZE; - uint32_t ub_size[VFE44_NUM_STATS_TYPE] = { - 128, /*MSM_ISP_STATS_BF_SCALE*/ - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE44_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE44_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe44_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_BE: - case STATS_IDX_BG: - case STATS_IDX_BF: - case STATS_IDX_AWB: - case STATS_IDX_RS: - case STATS_IDX_CS: - module_cfg_mask |= 1 << (4 + i); - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 15; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 18; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 2; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x888); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x888); -} - -static void msm_vfe44_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe44_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe44_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe44_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe44_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe44_axi_hw_info = { - .num_wm = 5, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe44_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE44_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE44_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe44_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe44_subdev_ops = { - .core = &msm_vfe44_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe44_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe44_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE44_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe44_read_irq_status, - .process_camif_irq = msm_vfe44_process_camif_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_halt_irq = msm_vfe44_process_halt_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_reg_update = msm_vfe44_process_reg_update, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe44_axi_reload_wm, - .enable_wm = msm_vfe44_axi_enable_wm, - .cfg_io_format = msm_vfe44_cfg_io_format, - .cfg_comp_mask = msm_vfe44_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe44_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe44_cfg_framedrop, - .clear_framedrop = msm_vfe44_clear_framedrop, - .cfg_wm_reg = msm_vfe44_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe44_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe44_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe44_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe44_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_get_comp_mask, - .get_wm_mask = msm_vfe44_get_wm_mask, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - .halt = msm_vfe44_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe44_reg_update, - .cfg_camif = msm_vfe44_cfg_camif, - .update_camif_state = msm_vfe44_update_camif_state, - .cfg_rdi_reg = msm_vfe44_cfg_rdi_reg, - .reset_hw = msm_vfe44_reset_hardware, - .init_hw = msm_vfe44_init_hardware, - .init_hw_reg = msm_vfe44_init_hardware_reg, - .release_hw = msm_vfe44_release_hardware, - .get_platform_data = msm_vfe44_get_platform_data, - .get_error_mask = msm_vfe44_get_error_mask, - .process_error_status = msm_vfe44_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe44_get_stats_idx, - .check_streams = msm_vfe44_stats_check_streams, - .cfg_comp_mask = msm_vfe44_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe44_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_stats_clear_wm_reg, - .cfg_ub = msm_vfe44_stats_cfg_ub, - .enable_module = msm_vfe44_stats_enable_module, - .update_ping_pong_addr = - msm_vfe44_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_stats_get_comp_mask, - .get_wm_mask = msm_vfe44_stats_get_wm_mask, - .get_frame_id = msm_vfe44_stats_get_frame_id, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe44_axi_hw_info, - .stats_hw_info = &msm_vfe44_stats_hw_info, - .subdev_ops = &msm_vfe44_subdev_ops, - .subdev_internal_ops = &msm_vfe44_internal_ops, -}; -EXPORT_SYMBOL(vfe44_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.h deleted file mode 100644 index 7bd630d4ef4d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp44.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP44_H__ -#define __MSM_ISP44_H__ - -extern struct msm_vfe_hardware_info vfe44_hw_info; -#endif /* __MSM_ISP44_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.c deleted file mode 100644 index 5d2b896cfb72..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.c +++ /dev/null @@ -1,1917 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp46.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_HDR_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_HDR_BHIST 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE46_8994V1_VERSION 0x60000000 - -#define VFE46_BURST_LEN 3 -#define VFE46_FETCH_BURST_LEN 3 -#define VFE46_STATS_BURST_LEN 3 -#define VFE46_UB_SIZE_VFE0 2048 -#define VFE46_UB_SIZE_VFE1 1536 -#define VFE46_UB_STATS_SIZE 144 -#define MSM_ISP46_TOTAL_IMAGE_UB_VFE0 (VFE46_UB_SIZE_VFE0 - VFE46_UB_STATS_SIZE) -#define MSM_ISP46_TOTAL_IMAGE_UB_VFE1 (VFE46_UB_SIZE_VFE1 - VFE46_UB_STATS_SIZE) -#define VFE46_WM_BASE(idx) (0xA0 + 0x24 * idx) -#define VFE46_RDI_BASE(idx) (0x39C + 0x4 * idx) -#define VFE46_XBAR_BASE(idx) (0x90 + 0x4 * (idx / 2)) -#define VFE46_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE46_PING_PONG_BASE(wm, ping_pong) \ - (VFE46_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) -#define SHIFT_BF_SCALE_BIT 1 -#define VFE46_NUM_STATS_COMP 2 -#define VFE46_BUS_RD_CGC_OVERRIDE_BIT 16 - -static uint32_t stats_base_addr[] = { - 0x1E4, /* BF_SCALE */ - 0x19C, /* HDR_BE */ - 0x1F0, /* BG */ - 0x1CC, /* BF */ - 0x1B4, /* HDR_BHIST */ - 0x220, /* RS */ - 0x238, /* CS */ - 0x250, /* IHIST */ - 0x208, /* BHIST (SKIN_BHIST) */ -}; - -static uint8_t stats_pingpong_offset_map[] = { - 11, /* BF_SCALE */ - 8, /* HDR_BE */ - 12, /* BG */ - 10, /* BF */ - 9, /* HDR_BHIST */ - 14, /* RS */ - 15, /* CS */ - 16, /* IHIST */ - 13, /* BHIST (SKIN_BHIST) */ -}; - -#define VFE46_NUM_STATS_TYPE 9 -#define VFE46_STATS_BASE(idx) (stats_base_addr[idx]) -#define VFE46_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE46_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE46_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE46_BUS_BDG_QOS_CFG_BASE 0x378 -#define VFE46_BUS_BDG_QOS_CFG_NUM 8 -#define VFE46_BUS_BDG_DS_CFG_BASE 0xBD8 -#define VFE46_BUS_BDG_DS_CFG_NUM 17 - -#define VFE46_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe46_clk_info[VFE_CLK_INFO_MAX]; - -static uint32_t vfe46_qos_settings_8994_v1[] = { - 0xAAA9AAA9, /* QOS_CFG_0 */ - 0xAAA9AAA9, /* QOS_CFG_1 */ - 0xAAA9AAA9, /* QOS_CFG_2 */ - 0xAAA9AAA9, /* QOS_CFG_3 */ - 0xAAA9AAA9, /* QOS_CFG_4 */ - 0xAAA9AAA9, /* QOS_CFG_5 */ - 0xAAA9AAA9, /* QOS_CFG_6 */ - 0x0001AAA9, /* QOS_CFG_7 */ -}; - -static uint32_t vfe46_ds_settings_8994_v1[] = { - 0x44441111, /* DS_CFG_0 */ - 0x44441111, /* DS_CFG_1 */ - 0x44441111, /* DS_CFG_2 */ - 0x44441111, /* DS_CFG_3 */ - 0x44441111, /* DS_CFG_4 */ - 0x44441111, /* DS_CFG_5 */ - 0x44441111, /* DS_CFG_6 */ - 0x44441111, /* DS_CFG_7 */ - 0x44441111, /* DS_CFG_8 */ - 0x44441111, /* DS_CFG_9 */ - 0x44441111, /* DS_CFG_10 */ - 0x44441111, /* DS_CFG_11 */ - 0x44441111, /* DS_CFG_12 */ - 0x44441111, /* DS_CFG_13 */ - 0x44441111, /* DS_CFG_14 */ - 0x44441111, /* DS_CFG_15 */ - 0x00000103, /* DS_CFG_16 */ -}; - -static void msm_vfe46_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *qos_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) - qos_settings = vfe46_qos_settings_8994_v1; - - if (qos_settings == NULL) { - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE46_BUS_BDG_QOS_CFG_NUM; i++) - msm_camera_io_w(qos_settings[i], - vfebase + VFE46_BUS_BDG_QOS_CFG_BASE + i * 4); - } -} - -static void msm_vfe46_init_vbif_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) { - msm_camera_io_w(0x3, - vfe_vbif_base + VFE46_VBIF_ROUND_ROBIN_QOS_ARB); - } else { - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } -} - -static void msm_vfe46_init_danger_safe_parms( - struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *ds_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) - ds_settings = vfe46_ds_settings_8994_v1; - - if (ds_settings == NULL) { - pr_err("%s: DS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE46_BUS_BDG_DS_CFG_NUM; i++) - msm_camera_io_w(ds_settings[i], - vfebase + VFE46_BUS_BDG_DS_CFG_BASE + i * 4); - } -} - -static int msm_vfe46_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe46_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe46_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe46_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe46_init_qos_parms(vfe_dev); - msm_vfe46_init_vbif_parms(vfe_dev); - msm_vfe46_init_danger_safe_parms(vfe_dev); - /* MODULE_LENS_CGC_OVERRIDE */ - msm_camera_io_w(0x00000182, vfe_dev->vfe_base + 0x2C); - /* MODULE_COLOR_CGC_OVERRIDE */ - msm_camera_io_w(0x00000018, vfe_dev->vfe_base + 0x34); - /* BUS_CFG */ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x84); - /* IRQ_MASK/CLEAR */ - msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0xE1FFFFFF, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(vfe_dev->stats_data.reg_mask, - vfe_dev->vfe_base + 0x78); -} - -static void msm_vfe46_clear_status_reg(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(0x80000000, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x58); -} - -static void msm_vfe46_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) { - complete(&vfe_dev->reset_complete); - vfe_dev->reset_pending = 0; - } -} - -static void msm_vfe46_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) { - complete(&vfe_dev->halt_complete); - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - } -} - -static void msm_vfe46_process_input_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x100000F)) - return; - - if (irq_status0 & (1 << 24)) { - ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__); - msm_isp_fetch_engine_done_notify(vfe_dev, - &vfe_dev->fetch_engine_info); - } - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, - (1 << VFE_PIX_0)); - msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe46_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - - if (violation_status > 39) { - pr_err("%s: invalid violation status %d\n", - __func__, violation_status); - return; - } - - pr_err("%s: VFE pipeline violation status %d\n", __func__, - violation_status); -} - -static void msm_vfe46_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe46_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status hdr be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status hdr bhist bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe46_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x3D0); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x7C); - -} - -static void msm_vfe46_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, input_src); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev, input_src); - msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); -} - -static void msm_vfe46_reg_update(struct vfe_device *vfe_dev) -{ - msm_camera_io_w_mb(0xF, vfe_dev->vfe_base + 0x3D8); -} - -static long msm_vfe46_reset_hardware(struct vfe_device *vfe_dev, - uint32_t first_start, uint32_t blocking_call) -{ - long rc = 0; - init_completion(&vfe_dev->reset_complete); - - if (blocking_call) - vfe_dev->reset_pending = 1; - - if (first_start) { - msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0x18); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0x0001FFFF); - } - - if (blocking_call) { - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - if (rc <= 0) { - pr_err("%s:%d failed: reset timeout\n", __func__, - __LINE__); - vfe_dev->reset_pending = 0; - } - } - - return rc; -} - -static void msm_vfe46_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x80); -} - -static void msm_vfe46_axi_update_cgc_override(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - if (enable) - val |= (1 << wm_idx); - else - val &= ~(1 << wm_idx); - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x3C); -} - -static void msm_vfe46_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - val = msm_camera_io_r(vfe_dev->vfe_base + VFE46_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE46_WM_BASE(wm_idx)); -} - -static void msm_vfe46_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE46_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3D8); -} - -static void msm_vfe46_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe46_convert_bpp_to_reg(int32_t bpp, uint32_t *bpp_reg) -{ - int rc = 0; - switch (bpp) { - case 8: - *bpp_reg = 0; - break; - case 10: - *bpp_reg = 0x1; - break; - case 12: - *bpp_reg = 0x2; - break; - case 14: - *bpp_reg = 0x3; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - return rc; -} - -static int32_t msm_vfe46_convert_io_fmt_to_reg( - enum msm_isp_pack_fmt pack_format, uint32_t *pack_reg) -{ - int rc = 0; - - switch (pack_format) { - case QCOM: - *pack_reg = 0x0; - break; - case MIPI: - *pack_reg = 0x1; - break; - case DPCM6: - *pack_reg = 0x2; - break; - case DPCM8: - *pack_reg = 0x3; - break; - case PLAIN8: - *pack_reg = 0x4; - break; - case PLAIN16: - *pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt %d!\n", __func__, pack_format); - return -EINVAL; - } - - return rc; -} -static int32_t msm_vfe46_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int rc = 0; - int bpp = 0, read_bpp = 0; - enum msm_isp_pack_fmt pack_fmt = 0, read_pack_fmt = 0; - uint32_t bpp_reg = 0, pack_reg = 0; - uint32_t read_bpp_reg = 0, read_pack_reg = 0; - uint32_t io_format_reg = 0; /*io format register bit*/ - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x88); - - /*input config*/ - if ((stream_src < RDI_INTF_0) && - (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == - EXTERNAL_READ)) { - read_bpp = msm_isp_get_bit_per_pixel( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe46_convert_bpp_to_reg(read_bpp, &read_bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! in_bpp %d rc %d\n", - __func__, read_bpp, rc); - return rc; - } - - read_pack_fmt = msm_isp_get_pack_format( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe46_convert_io_fmt_to_reg( - read_pack_fmt, &read_pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - /*use input format(v4l2_pix_fmt) to get pack format*/ - io_format_reg &= 0xFFC8FFFF; - io_format_reg |= (read_bpp_reg << 20 | read_pack_reg << 16); - } - - bpp = msm_isp_get_bit_per_pixel(io_format); - rc = msm_vfe46_convert_bpp_to_reg(bpp, &bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! bpp %d rc = %d\n", - __func__, bpp, rc); - return rc; - } - - switch (stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - /*use output format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - rc = msm_vfe46_convert_io_fmt_to_reg(pack_fmt, &pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x88); - return 0; -} - -static int msm_vfe46_start_fetch_engine(struct vfe_device *vfe_dev, - void *arg) -{ - int rc = 0; - uint32_t bufq_handle; - struct msm_isp_buffer *buf = NULL; - struct msm_vfe_fetch_eng_start *fe_cfg = arg; - - if (vfe_dev->fetch_engine_info.is_busy == 1) { - pr_err("%s: fetch engine busy\n", __func__); - return -EINVAL; - } - - /* There is other option of passing buffer address from user, - in such case, driver needs to map the buffer and use it*/ - bufq_handle = vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, fe_cfg->session_id, fe_cfg->stream_id); - vfe_dev->fetch_engine_info.bufq_handle = bufq_handle; - vfe_dev->fetch_engine_info.session_id = fe_cfg->session_id; - vfe_dev->fetch_engine_info.stream_id = fe_cfg->stream_id; - - rc = vfe_dev->buf_mgr->ops->get_buf_by_index( - vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf); - if (rc < 0) { - pr_err("%s: No fetch buffer\n", __func__); - return -EINVAL; - } - vfe_dev->fetch_engine_info.buf_idx = fe_cfg->buf_idx; - vfe_dev->fetch_engine_info.is_busy = 1; - - msm_camera_io_w(buf->mapped_info[0].paddr, vfe_dev->vfe_base + 0x268); - - msm_camera_io_w_mb(0x100000, vfe_dev->vfe_base + 0x80); - msm_camera_io_w_mb(0x200000, vfe_dev->vfe_base + 0x80); - - ISP_DBG("%s:VFE%d Fetch Engine ready\n", __func__, vfe_dev->pdev->id); - buf->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - - return 0; -} - -static void msm_vfe46_cfg_fetch_engine(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t x_size_word, temp; - struct msm_vfe_fetch_engine_cfg *fe_cfg = NULL; - - if (pix_cfg->input_mux == EXTERNAL_READ) { - fe_cfg = &pix_cfg->fetch_engine_cfg; - pr_debug("%s:VFE%d wd x ht buf = %d x %d, fe = %d x %d\n", - __func__, vfe_dev->pdev->id, fe_cfg->buf_width, - fe_cfg->buf_height, - fe_cfg->fetch_width, fe_cfg->fetch_height); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x84); - temp &= 0xFFFFFFFD; - temp |= (1 << 1); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x84); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - temp &= 0xFEFFFFFF; - temp |= (1 << 24); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x5C); - - temp = fe_cfg->fetch_height - 1; - msm_camera_io_w(temp & 0x3FFF, vfe_dev->vfe_base + 0x278); - - x_size_word = msm_isp_cal_word_per_line( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format, - fe_cfg->fetch_width); - msm_camera_io_w((x_size_word - 1) << 16, - vfe_dev->vfe_base + 0x27C); - - msm_camera_io_w(x_size_word << 16 | - (temp & 0x3FFF) << 2 | VFE46_FETCH_BURST_LEN, - vfe_dev->vfe_base + 0x280); - - temp = ((fe_cfg->buf_width - 1) & 0x3FFF) << 16 | - ((fe_cfg->buf_height - 1) & 0x3FFF); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x284); - - /* need to use formulae to calculate MAIN_UNPACK_PATTERN*/ - msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x288); - msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x2A4); - - vfe_dev->hw_info->vfe_ops.axi_ops.update_cgc_override(vfe_dev, - VFE46_BUS_RD_CGC_OVERRIDE_BIT, 1); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - temp |= 2 << 5; - temp |= 128 << 8; - temp |= pix_cfg->pixel_pattern; - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x50); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - } else { - pr_err("%s: Invalid mux configuration - mux: %d", __func__, - pix_cfg->input_mux); - } -} - -static void msm_vfe46_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - msm_camera_io_w(pix_cfg->input_mux << 5 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x50); - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x3B4); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x3B8); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x3BC); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x3C8); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x39C); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x39C); -} - -static void msm_vfe46_cfg_input_mux(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t core_cfg = 0; - uint32_t val = 0; - - core_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - core_cfg &= 0xFFFFFF9F; - - switch (pix_cfg->input_mux) { - case CAMIF: - core_cfg |= 0x0 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_camif(vfe_dev, pix_cfg); - break; - case TESTGEN: - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - val |= (1 << 31); - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3C); - - /* CAMIF and TESTGEN will both go thorugh CAMIF*/ - core_cfg |= 0x1 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_camif(vfe_dev, pix_cfg); - break; - case EXTERNAL_READ: - core_cfg |= 0x2 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_fetch_engine(vfe_dev, pix_cfg); - break; - default: - pr_err("%s: Unsupported input mux %d\n", - __func__, pix_cfg->input_mux); - break; - } - return; -} - -static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - val |= 0xF1; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x5C); - - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3AC); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3AC); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x3A8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - /* testgen GO*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - /* testgen OFF*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } -} - -static void msm_vfe46_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE46_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x03; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE46_RDI_BASE(rdi)); -} - -static void msm_vfe46_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE46_WM_BASE(stream_info->wm[plane_idx]); - - val = msm_camera_io_r(vfe_dev->vfe_base + wm_base + 0xC); - val &= ~0x2; - if (stream_info->frame_based) - val |= 0x2; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - if (!stream_info->frame_based) { - /* WR_IMAGE_SIZE */ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+3)/4 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - val = VFE46_BURST_LEN | - (stream_info->plane_cfg[plane_idx].output_height - 1) << - 2 | - ((msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride)+1)/2) << 16; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe46_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE46_WM_BASE(stream_info->wm[plane_idx]); - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /* WR_IMAGE_SIZE */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe46_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /* SINGLE_STREAM_SEL */ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - /* PAIR_STREAM_SWAP_CTRL */ - xbar_cfg |= 0x3 << 4; - break; - } - xbar_cfg |= 0x1 << 2; /* PAIR_STREAM_EN */ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /* VIEW_STREAM_EN */ - else if (stream_info->stream_src == PIX_VIDEO) - xbar_cfg |= 0x2; - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0xC00; - break; - case RDI_INTF_1: - xbar_cfg = 0xD00; - break; - case RDI_INTF_2: - xbar_cfg = 0xE00; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE46_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE46_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); -} - -static void msm_vfe46_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE46_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); -} - - -static void msm_vfe46_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->pdev->id == ISP_VFE0) { - prop_size = MSM_ISP46_TOTAL_IMAGE_UB_VFE0 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - prop_size = MSM_ISP46_TOTAL_IMAGE_UB_VFE1 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe46_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t ub_equal_slice = 0; - if (vfe_dev->pdev->id == ISP_VFE0) { - ub_equal_slice = MSM_ISP46_TOTAL_IMAGE_UB_VFE0 / - axi_data->hw_info->num_wm; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - ub_equal_slice = MSM_ISP46_TOTAL_IMAGE_UB_VFE1 / - axi_data->hw_info->num_wm; - } else { - pr_err("%s: incorrect VFE device\n ", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (ub_equal_slice - 1), - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - ub_offset += ub_equal_slice; - } -} - -static void msm_vfe46_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe46_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe46_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe46_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE46_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - int rc = 0; - - /* Keep only halt and restart mask */ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x60); - - /*Clear IRQ Status0, only leave reset irq mask*/ - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - - /*Clear IRQ Status1, only leave halt irq mask*/ - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - - /*push clear cmd*/ - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - if (blocking) { - init_completion(&vfe_dev->halt_complete); - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - rc = wait_for_completion_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } else { - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - } - - /* if any stream is waiting for update, signal complete */ - if (vfe_dev->axi_data.stream_update) { - ISP_DBG("%s: complete stream update\n", __func__); - msm_isp_axi_stream_update(vfe_dev, 0xF); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, 0xF); - } - - if (atomic_read(&vfe_dev->stats_data.stats_update)) { - ISP_DBG("%s: complete on stats update\n", __func__); - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - } - - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - ISP_DBG("%s: complete on axi config update\n", __func__); - msm_isp_axi_cfg_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - } - - return rc; -} - -static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, - uint32_t blocking, uint32_t enable_camif) -{ - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - /* Start AXI */ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - - if (enable_camif) { - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - - return 0; -} - -static uint32_t msm_vfe46_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe46_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe46_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x2A8); -} - -static int msm_vfe46_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_HDR_BE: - return STATS_IDX_HDR_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_HDR_BHIST: - return STATS_IDX_HDR_BHIST; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe46_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe46_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask < 1) - /* no stats composite masks */ - return; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - stats_data->reg_mask = - msm_camera_io_r(vfe_dev->vfe_base + 0x78); - comp_stats_mask = - stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - stats_data->reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_set(stats_comp, stats_mask | - atomic_read(stats_comp)); - break; - - } else { - - if (!(atomic_read(stats_comp) & stats_mask)) - continue; - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_set(stats_comp, - ~(1 << STATS_IDX_BF_SCALE) & - atomic_read(stats_comp)); - - atomic_set(stats_comp, - ~stats_mask & atomic_read(stats_comp)); - stats_data->reg_mask &= ~(mask_bf_scale << (16 + i*8)); - break; - } - } - - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, stats_data->reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x78); - return; -} - -static void msm_vfe46_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE46_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe46_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE46_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe46_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t ub_size[VFE46_NUM_STATS_TYPE] = { - 16, /* MSM_ISP_STATS_BF_SCALE */ - 16, /* MSM_ISP_STATS_HDR_BE */ - 16, /* MSM_ISP_STATS_BG */ - 16, /* MSM_ISP_STATS_BF */ - 16, /* MSM_ISP_STATS_HDR_BHIST */ - 16, /* MSM_ISP_STATS_RS */ - 16, /* MSM_ISP_STATS_CS */ - 16, /* MSM_ISP_STATS_IHIST */ - 16, /* MSM_ISP_STATS_BHIST */ - }; - if (vfe_dev->pdev->id == ISP_VFE1) { - ub_offset = VFE46_UB_SIZE_VFE1; - } else if (vfe_dev->pdev->id == ISP_VFE0) { - ub_offset = VFE46_UB_SIZE_VFE0; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE46_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE46_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe46_stats_update_cgc_override(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, cgc_mask = 0; - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - cgc_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - cgc_mask |= (1 << 1); - break; - case STATS_IDX_BF: - cgc_mask |= (1 << 2); - break; - case STATS_IDX_BG: - cgc_mask |= (1 << 3); - break; - case STATS_IDX_BHIST: - cgc_mask |= (1 << 4); - break; - case STATS_IDX_RS: - cgc_mask |= (1 << 5); - break; - case STATS_IDX_CS: - cgc_mask |= (1 << 6); - break; - case STATS_IDX_IHIST: - cgc_mask |= (1 << 7); - break; - case STATS_IDX_BF_SCALE: - cgc_mask |= (1 << 2); - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - /* CGC override */ - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - if (enable) - module_cfg |= cgc_mask; - else - module_cfg &= ~cgc_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x30); -} - -static void msm_vfe46_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - module_cfg_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - module_cfg_mask |= 1 << 1; - break; - case STATS_IDX_BF: - module_cfg_mask |= 1 << 2; - break; - case STATS_IDX_BG: - module_cfg_mask |= 1 << 3; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 4; - break; - case STATS_IDX_RS: - module_cfg_mask |= 1 << 5; - break; - case STATS_IDX_CS: - module_cfg_mask |= 1 << 6; - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 7; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 5; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x44); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x9B8); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x9B8); -} - -static void msm_vfe46_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE46_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe46_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe46_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe46_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; -} - -static int msm_vfe46_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - if (vfe_dev->hw_info->num_iommu_secure_ctx) { - vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); - if (!vfe_dev->iommu_secure_ctx[0]) { - pr_err("%s: cannot get secure iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe46_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static void msm_vfe46_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x01FFFE7E; -} - -static void msm_vfe46_get_rdi_wm_mask(struct vfe_device *vfe_dev, - uint32_t *rdi_wm_mask) -{ - *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; -} - -static void msm_vfe46_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x60); -} - -static void msm_vfe46_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x60); -} - - -static void msm_vfe46_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} -static struct msm_vfe_axi_hardware_info msm_vfe46_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 96, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe46_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_HDR_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_HDR_BHIST | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE46_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE46_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe46_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe46_subdev_ops = { - .core = &msm_vfe46_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe46_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe46_hw_info = { - .num_iommu_ctx = 1, - .num_iommu_secure_ctx = 1, - .vfe_clk_idx = VFE46_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe46_read_irq_status, - .process_camif_irq = msm_vfe46_process_input_irq, - .process_reset_irq = msm_vfe46_process_reset_irq, - .process_halt_irq = msm_vfe46_process_halt_irq, - .process_reset_irq = msm_vfe46_process_reset_irq, - .process_reg_update = msm_vfe46_process_reg_update, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe46_axi_reload_wm, - .enable_wm = msm_vfe46_axi_enable_wm, - .cfg_io_format = msm_vfe46_cfg_io_format, - .cfg_comp_mask = msm_vfe46_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe46_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe46_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe46_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe46_cfg_framedrop, - .clear_framedrop = msm_vfe46_clear_framedrop, - .cfg_wm_reg = msm_vfe46_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe46_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe46_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe46_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe46_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe46_update_ping_pong_addr, - .get_comp_mask = msm_vfe46_get_comp_mask, - .get_wm_mask = msm_vfe46_get_wm_mask, - .get_pingpong_status = msm_vfe46_get_pingpong_status, - .halt = msm_vfe46_axi_halt, - .restart = msm_vfe46_axi_restart, - .update_cgc_override = - msm_vfe46_axi_update_cgc_override, - }, - .core_ops = { - .reg_update = msm_vfe46_reg_update, - .cfg_input_mux = msm_vfe46_cfg_input_mux, - .update_camif_state = msm_vfe46_update_camif_state, - .start_fetch_eng = msm_vfe46_start_fetch_engine, - .cfg_rdi_reg = msm_vfe46_cfg_rdi_reg, - .reset_hw = msm_vfe46_reset_hardware, - .init_hw = msm_vfe46_init_hardware, - .init_hw_reg = msm_vfe46_init_hardware_reg, - .clear_status_reg = msm_vfe46_clear_status_reg, - .release_hw = msm_vfe46_release_hardware, - .get_platform_data = msm_vfe46_get_platform_data, - .get_error_mask = msm_vfe46_get_error_mask, - .get_overflow_mask = msm_vfe46_get_overflow_mask, - .get_rdi_wm_mask = msm_vfe46_get_rdi_wm_mask, - .get_irq_mask = msm_vfe46_get_irq_mask, - .restore_irq_mask = msm_vfe46_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe46_get_halt_restart_mask, - .process_error_status = msm_vfe46_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe46_get_stats_idx, - .check_streams = msm_vfe46_stats_check_streams, - .cfg_comp_mask = msm_vfe46_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe46_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe46_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe46_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe46_stats_clear_wm_reg, - .cfg_ub = msm_vfe46_stats_cfg_ub, - .enable_module = msm_vfe46_stats_enable_module, - .update_ping_pong_addr = - msm_vfe46_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe46_stats_get_comp_mask, - .get_wm_mask = msm_vfe46_stats_get_wm_mask, - .get_frame_id = msm_vfe46_stats_get_frame_id, - .get_pingpong_status = msm_vfe46_get_pingpong_status, - .update_cgc_override = - msm_vfe46_stats_update_cgc_override, - }, - }, - .dmi_reg_offset = 0xACC, - .axi_hw_info = &msm_vfe46_axi_hw_info, - .stats_hw_info = &msm_vfe46_stats_hw_info, - .subdev_ops = &msm_vfe46_subdev_ops, - .subdev_internal_ops = &msm_vfe46_internal_ops, -}; -EXPORT_SYMBOL(vfe46_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.h deleted file mode 100644 index bf8739318d41..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp46.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP46_H__ -#define __MSM_ISP46_H__ - -extern struct msm_vfe_hardware_info vfe46_hw_info; -#endif /* __MSM_ISP46_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.c deleted file mode 100644 index 4fd8fea55dc4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.c +++ /dev/null @@ -1,1909 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp47.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_HDR_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_HDR_BHIST 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE47_8996V1_VERSION 0x60000000 - -#define VFE47_BURST_LEN 3 -#define VFE47_FETCH_BURST_LEN 3 -#define VFE47_STATS_BURST_LEN 3 -#define VFE47_UB_SIZE_VFE0 2048 -#define VFE47_UB_SIZE_VFE1 1536 -#define VFE47_UB_STATS_SIZE 144 -#define MSM_ISP47_TOTAL_IMAGE_UB_VFE0 (VFE47_UB_SIZE_VFE0 - VFE47_UB_STATS_SIZE) -#define MSM_ISP47_TOTAL_IMAGE_UB_VFE1 (VFE47_UB_SIZE_VFE1 - VFE47_UB_STATS_SIZE) -#define VFE47_WM_BASE(idx) (0xA0 + 0x24 * idx) -#define VFE47_RDI_BASE(idx) (0x39C + 0x4 * idx) -#define VFE47_XBAR_BASE(idx) (0x90 + 0x4 * (idx / 2)) -#define VFE47_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE47_PING_PONG_BASE(wm, ping_pong) \ - (VFE47_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) -#define SHIFT_BF_SCALE_BIT 1 -#define VFE47_NUM_STATS_COMP 2 - -static uint32_t stats_base_addr[] = { - 0x1E4, /* BF_SCALE */ - 0x19C, /* HDR_BE */ - 0x1F0, /* BG */ - 0x1CC, /* BF */ - 0x1B4, /* HDR_BHIST */ - 0x220, /* RS */ - 0x238, /* CS */ - 0x250, /* IHIST */ - 0x208, /* BHIST (SKIN_BHIST) */ -}; - -static uint8_t stats_pingpong_offset_map[] = { - 11, /* BF_SCALE */ - 8, /* HDR_BE */ - 12, /* BG */ - 10, /* BF */ - 9, /* HDR_BHIST */ - 14, /* RS */ - 15, /* CS */ - 16, /* IHIST */ - 13, /* BHIST (SKIN_BHIST) */ -}; - -#define VFE47_NUM_STATS_TYPE 9 -#define VFE47_STATS_BASE(idx) (stats_base_addr[idx]) -#define VFE47_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE47_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE47_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE47_BUS_BDG_QOS_CFG_BASE 0x378 -#define VFE47_BUS_BDG_QOS_CFG_NUM 8 -#define VFE47_BUS_BDG_DS_CFG_BASE 0xBD8 -#define VFE47_BUS_BDG_DS_CFG_NUM 17 - -#define VFE47_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe47_clk_info[VFE_CLK_INFO_MAX]; - -static uint32_t vfe47_qos_settings_8996_v1[] = { - 0xAAA9AAA9, /* QOS_CFG_0 */ - 0xAAA9AAA9, /* QOS_CFG_1 */ - 0xAAA9AAA9, /* QOS_CFG_2 */ - 0xAAA9AAA9, /* QOS_CFG_3 */ - 0xAAA9AAA9, /* QOS_CFG_4 */ - 0xAAA9AAA9, /* QOS_CFG_5 */ - 0xAAA9AAA9, /* QOS_CFG_6 */ - 0x0001AAA9, /* QOS_CFG_7 */ -}; - -static uint32_t vfe47_ds_settings_8996_v1[] = { - 0x44441111, /* DS_CFG_0 */ - 0x44441111, /* DS_CFG_1 */ - 0x44441111, /* DS_CFG_2 */ - 0x44441111, /* DS_CFG_3 */ - 0x44441111, /* DS_CFG_4 */ - 0x44441111, /* DS_CFG_5 */ - 0x44441111, /* DS_CFG_6 */ - 0x44441111, /* DS_CFG_7 */ - 0x44441111, /* DS_CFG_8 */ - 0x44441111, /* DS_CFG_9 */ - 0x44441111, /* DS_CFG_10 */ - 0x44441111, /* DS_CFG_11 */ - 0x44441111, /* DS_CFG_12 */ - 0x44441111, /* DS_CFG_13 */ - 0x44441111, /* DS_CFG_14 */ - 0x44441111, /* DS_CFG_15 */ - 0x00000103, /* DS_CFG_16 */ -}; - -static void msm_vfe47_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *qos_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) - qos_settings = vfe47_qos_settings_8996_v1; - - if (qos_settings == NULL) { - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE47_BUS_BDG_QOS_CFG_NUM; i++) - msm_camera_io_w(qos_settings[i], - vfebase + VFE47_BUS_BDG_QOS_CFG_BASE + i * 4); - } -} - -static void msm_vfe47_init_vbif_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) { - msm_camera_io_w(0x3, - vfe_vbif_base + VFE47_VBIF_ROUND_ROBIN_QOS_ARB); - } else { - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } -} - -static void msm_vfe47_init_danger_safe_parms( - struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *ds_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) - ds_settings = vfe47_ds_settings_8996_v1; - - if (ds_settings == NULL) { - pr_err("%s: DS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE47_BUS_BDG_DS_CFG_NUM; i++) - msm_camera_io_w(ds_settings[i], - vfebase + VFE47_BUS_BDG_DS_CFG_BASE + i * 4); - } -} - -static int msm_vfe47_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe47_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe47_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe47_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe47_init_qos_parms(vfe_dev); - msm_vfe47_init_vbif_parms(vfe_dev); - msm_vfe47_init_danger_safe_parms(vfe_dev); - /* MODULE_LENS_CGC_OVERRIDE */ - msm_camera_io_w(0x00000383, vfe_dev->vfe_base + 0x2C); - /* MODULE_COLOR_CGC_OVERRIDE */ - msm_camera_io_w(0x0000001C, vfe_dev->vfe_base + 0x34); - /* BUS_CFG */ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x84); - /* IRQ_MASK/CLEAR */ - msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0xE1FFFFFF, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(vfe_dev->stats_data.reg_mask, - vfe_dev->vfe_base + 0x78); -} - -static void msm_vfe47_clear_status_reg(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(0x80000000, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x58); -} - -static void msm_vfe47_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) { - complete(&vfe_dev->reset_complete); - vfe_dev->reset_pending = 0; - } -} - -static void msm_vfe47_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) { - complete(&vfe_dev->halt_complete); - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - } -} - -static void msm_vfe47_process_input_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x100000F)) - return; - - if (irq_status0 & (1 << 24)) { - ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__); - msm_isp_fetch_engine_done_notify(vfe_dev, - &vfe_dev->fetch_engine_info); - } - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, - (1 << VFE_PIX_0)); - msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe47_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - - if (violation_status > 39) { - pr_err("%s: invalid violation status %d\n", - __func__, violation_status); - return; - } - - pr_err("%s: VFE pipeline violation status %d\n", __func__, - violation_status); -} - -static void msm_vfe47_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe47_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status hdr be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status hdr bhist bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe47_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x3D0); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x7C); - -} - -static void msm_vfe47_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_sof_notify(vfe_dev, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_sof_notify(vfe_dev, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, input_src); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev, input_src); - msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); -} - -static void msm_vfe47_reg_update(struct vfe_device *vfe_dev) -{ - msm_camera_io_w_mb(0xF, vfe_dev->vfe_base + 0x3D8); -} - -static long msm_vfe47_reset_hardware(struct vfe_device *vfe_dev, - uint32_t first_start, uint32_t blocking_call) -{ - long rc = 0; - init_completion(&vfe_dev->reset_complete); - - if (blocking_call) - vfe_dev->reset_pending = 1; - - if (first_start) { - msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0x18); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0x0001FFFF); - } - - if (blocking_call) { - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - if (rc <= 0) { - pr_err("%s:%d failed: reset timeout\n", __func__, - __LINE__); - vfe_dev->reset_pending = 0; - } - } - - return rc; -} - -static void msm_vfe47_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x80); -} - -static void msm_vfe47_axi_update_cgc_override(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - if (enable) - val |= (1 << wm_idx); - else - val &= ~(1 << wm_idx); - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x3C); -} - -static void msm_vfe47_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - val = msm_camera_io_r(vfe_dev->vfe_base + VFE47_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE47_WM_BASE(wm_idx)); -} - -static void msm_vfe47_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE47_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3D8); -} - -static void msm_vfe47_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe47_convert_bpp_to_reg(int32_t bpp, uint32_t *bpp_reg) -{ - int rc = 0; - switch (bpp) { - case 8: - *bpp_reg = 0; - break; - case 10: - *bpp_reg = 1 << 0; - break; - case 12: - *bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - return rc; -} - -static int32_t msm_vfe47_convert_io_fmt_to_reg( - enum msm_isp_pack_fmt pack_format, uint32_t *pack_reg) -{ - int rc = 0; - - switch (pack_format) { - case QCOM: - *pack_reg = 0x0; - break; - case MIPI: - *pack_reg = 0x1; - break; - case DPCM6: - *pack_reg = 0x2; - break; - case DPCM8: - *pack_reg = 0x3; - break; - case PLAIN8: - *pack_reg = 0x4; - break; - case PLAIN16: - *pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt %d!\n", __func__, pack_format); - return -EINVAL; - } - - return rc; -} -static int32_t msm_vfe47_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int rc = 0; - int bpp = 0, read_bpp = 0; - enum msm_isp_pack_fmt pack_fmt = 0, read_pack_fmt = 0; - uint32_t bpp_reg = 0, pack_reg = 0; - uint32_t read_bpp_reg = 0, read_pack_reg = 0; - uint32_t io_format_reg = 0; /*io format register bit*/ - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x88); - - /*input config*/ - if ((stream_src < RDI_INTF_0) && - (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == - EXTERNAL_READ)) { - read_bpp = msm_isp_get_bit_per_pixel( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe47_convert_bpp_to_reg(read_bpp, &read_bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! in_bpp %d rc %d\n", - __func__, read_bpp, rc); - return rc; - } - - read_pack_fmt = msm_isp_get_pack_format( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe47_convert_io_fmt_to_reg( - read_pack_fmt, &read_pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - /*use input format(v4l2_pix_fmt) to get pack format*/ - io_format_reg &= 0xFFC8FFFF; - io_format_reg |= (read_bpp_reg << 20 | read_pack_reg << 16); - } - - bpp = msm_isp_get_bit_per_pixel(io_format); - rc = msm_vfe47_convert_bpp_to_reg(bpp, &bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! bpp %d rc = %d\n", - __func__, bpp, rc); - return rc; - } - - switch (stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - /*use output format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - rc = msm_vfe47_convert_io_fmt_to_reg(pack_fmt, &pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x88); - return 0; -} - -static int msm_vfe47_start_fetch_engine(struct vfe_device *vfe_dev, - void *arg) -{ - int rc = 0; - uint32_t bufq_handle; - struct msm_isp_buffer *buf = NULL; - struct msm_vfe_fetch_eng_start *fe_cfg = arg; - - if (vfe_dev->fetch_engine_info.is_busy == 1) { - pr_err("%s: fetch engine busy\n", __func__); - return -EINVAL; - } - - /* There is other option of passing buffer address from user, - in such case, driver needs to map the buffer and use it*/ - bufq_handle = vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, fe_cfg->session_id, fe_cfg->stream_id); - vfe_dev->fetch_engine_info.bufq_handle = bufq_handle; - vfe_dev->fetch_engine_info.session_id = fe_cfg->session_id; - vfe_dev->fetch_engine_info.stream_id = fe_cfg->stream_id; - - rc = vfe_dev->buf_mgr->ops->get_buf_by_index( - vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf); - if (rc < 0) { - pr_err("%s: No fetch buffer\n", __func__); - return -EINVAL; - } - vfe_dev->fetch_engine_info.buf_idx = fe_cfg->buf_idx; - vfe_dev->fetch_engine_info.is_busy = 1; - - msm_camera_io_w(buf->mapped_info[0].paddr, vfe_dev->vfe_base + 0x268); - - msm_camera_io_w_mb(0x100000, vfe_dev->vfe_base + 0x80); - msm_camera_io_w_mb(0x200000, vfe_dev->vfe_base + 0x80); - - ISP_DBG("%s:VFE%d Fetch Engine ready\n", __func__, vfe_dev->pdev->id); - buf->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - - return 0; -} - -static void msm_vfe47_cfg_fetch_engine(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t x_size_word, temp; - struct msm_vfe_fetch_engine_cfg *fe_cfg = NULL; - - if (pix_cfg->input_mux == EXTERNAL_READ) { - fe_cfg = &pix_cfg->fetch_engine_cfg; - pr_debug("%s:VFE%d wd x ht buf = %d x %d, fe = %d x %d\n", - __func__, vfe_dev->pdev->id, fe_cfg->buf_width, - fe_cfg->buf_height, - fe_cfg->fetch_width, fe_cfg->fetch_height); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x84); - temp &= 0xFFFFFFFD; - temp |= (1 << 1); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x84); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - temp &= 0xFEFFFFFF; - temp |= (1 << 24); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x5C); - - temp = fe_cfg->fetch_height - 1; - msm_camera_io_w(temp & 0x3FFF, vfe_dev->vfe_base + 0x278); - - x_size_word = msm_isp_cal_word_per_line( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format, - fe_cfg->fetch_width); - msm_camera_io_w((x_size_word - 1) << 16, - vfe_dev->vfe_base + 0x27C); - - msm_camera_io_w(x_size_word << 16 | - (temp & 0x3FFF) << 2 | VFE47_FETCH_BURST_LEN, - vfe_dev->vfe_base + 0x280); - - temp = ((fe_cfg->buf_width - 1) & 0x3FFF) << 16 | - ((fe_cfg->buf_height - 1) & 0x3FFF); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x284); - - /* need to use formulae to calculate MAIN_UNPACK_PATTERN*/ - msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x288); - msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x2A4); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - temp |= 2 << 5; - temp |= 128 << 8; - temp |= pix_cfg->pixel_pattern; - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x50); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - } else { - pr_err("%s: Invalid mux configuration - mux: %d", __func__, - pix_cfg->input_mux); - } -} - -static void msm_vfe47_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - msm_camera_io_w(pix_cfg->input_mux << 5 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x50); - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x3B4); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x3B8); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x3BC); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x3C8); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x39C); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x39C); -} - -static void msm_vfe47_cfg_input_mux(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t core_cfg = 0; - uint32_t val = 0; - - core_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - core_cfg &= 0xFFFFFF9F; - - switch (pix_cfg->input_mux) { - case CAMIF: - core_cfg |= 0x0 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_camif(vfe_dev, pix_cfg); - break; - case TESTGEN: - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - val |= (1 << 31); - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3C); - - /* CAMIF and TESTGEN will both go thorugh CAMIF*/ - core_cfg |= 0x1 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_camif(vfe_dev, pix_cfg); - break; - case EXTERNAL_READ: - core_cfg |= 0x2 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_fetch_engine(vfe_dev, pix_cfg); - break; - default: - pr_err("%s: Unsupported input mux %d\n", - __func__, pix_cfg->input_mux); - break; - } - return; -} - -static void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - val |= 0xF1; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x5C); - - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3AC); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3AC); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x3A8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - /* testgen GO*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - /* testgen OFF*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } -} - -static void msm_vfe47_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE47_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x03; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE47_RDI_BASE(rdi)); -} - -static void msm_vfe47_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE47_WM_BASE(stream_info->wm[plane_idx]); - - val = msm_camera_io_r(vfe_dev->vfe_base + wm_base + 0xC); - val &= ~0x2; - if (stream_info->frame_based) - val |= 0x2; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - if (!stream_info->frame_based) { - /* WR_IMAGE_SIZE */ - val = ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+3)/4 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - val = VFE47_BURST_LEN | - (stream_info->plane_cfg[plane_idx].output_height - 1) << - 2 | - ((msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride)+1)/2) << 16; - } - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe47_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE47_WM_BASE(stream_info->wm[plane_idx]); - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /* WR_IMAGE_SIZE */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe47_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /* SINGLE_STREAM_SEL */ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - /* PAIR_STREAM_SWAP_CTRL */ - xbar_cfg |= 0x3 << 4; - break; - } - xbar_cfg |= 0x1 << 2; /* PAIR_STREAM_EN */ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /* VIEW_STREAM_EN */ - else if (stream_info->stream_src == PIX_VIDEO) - xbar_cfg |= 0x2; - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0xC00; - break; - case RDI_INTF_1: - xbar_cfg = 0xD00; - break; - case RDI_INTF_2: - xbar_cfg = 0xE00; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE47_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE47_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); -} - -static void msm_vfe47_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE47_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); -} - - -static void msm_vfe47_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->pdev->id == ISP_VFE0) { - prop_size = MSM_ISP47_TOTAL_IMAGE_UB_VFE0 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - prop_size = MSM_ISP47_TOTAL_IMAGE_UB_VFE1 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe47_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t ub_equal_slice = 0; - if (vfe_dev->pdev->id == ISP_VFE0) { - ub_equal_slice = MSM_ISP47_TOTAL_IMAGE_UB_VFE0 / - axi_data->hw_info->num_wm; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - ub_equal_slice = MSM_ISP47_TOTAL_IMAGE_UB_VFE1 / - axi_data->hw_info->num_wm; - } else { - pr_err("%s: incorrect VFE device\n ", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (ub_equal_slice - 1), - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - ub_offset += ub_equal_slice; - } -} - -static void msm_vfe47_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe47_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe47_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe47_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE47_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - int rc = 0; - - /* Keep only halt and restart mask */ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x60); - - /*Clear IRQ Status0, only leave reset irq mask*/ - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - - /*Clear IRQ Status1, only leave halt irq mask*/ - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - - /*push clear cmd*/ - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - if (blocking) { - init_completion(&vfe_dev->halt_complete); - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - rc = wait_for_completion_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } else { - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - } - - /* if any stream is waiting for update, signal complete */ - if (vfe_dev->axi_data.stream_update) { - ISP_DBG("%s: complete stream update\n", __func__); - msm_isp_axi_stream_update(vfe_dev, 0xF); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, 0xF); - } - - if (atomic_read(&vfe_dev->stats_data.stats_update)) { - ISP_DBG("%s: complete on stats update\n", __func__); - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - } - - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - ISP_DBG("%s: complete on axi config update\n", __func__); - msm_isp_axi_cfg_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - } - - return rc; -} - -static int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, - uint32_t blocking, uint32_t enable_camif) -{ - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - /* Start AXI */ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - - if (enable_camif) { - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - - return 0; -} - -static uint32_t msm_vfe47_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe47_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe47_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x2A8); -} - -static int msm_vfe47_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_HDR_BE: - return STATS_IDX_HDR_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_HDR_BHIST: - return STATS_IDX_HDR_BHIST; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe47_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe47_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask < 1) - /* no stats composite masks */ - return; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - stats_data->reg_mask = - msm_camera_io_r(vfe_dev->vfe_base + 0x78); - comp_stats_mask = - stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - stats_data->reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_set(stats_comp, stats_mask | - atomic_read(stats_comp)); - break; - - } else { - - if (!(atomic_read(stats_comp) & stats_mask)) - continue; - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_set(stats_comp, - ~(1 << STATS_IDX_BF_SCALE) & - atomic_read(stats_comp)); - - atomic_set(stats_comp, - ~stats_mask & atomic_read(stats_comp)); - stats_data->reg_mask &= ~(mask_bf_scale << (16 + i*8)); - break; - } - } - - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, stats_data->reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x78); - return; -} - -static void msm_vfe47_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE47_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe47_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE47_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe47_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t ub_size[VFE47_NUM_STATS_TYPE] = { - 16, /* MSM_ISP_STATS_BF_SCALE */ - 16, /* MSM_ISP_STATS_HDR_BE */ - 16, /* MSM_ISP_STATS_BG */ - 16, /* MSM_ISP_STATS_BF */ - 16, /* MSM_ISP_STATS_HDR_BHIST */ - 16, /* MSM_ISP_STATS_RS */ - 16, /* MSM_ISP_STATS_CS */ - 16, /* MSM_ISP_STATS_IHIST */ - 16, /* MSM_ISP_STATS_BHIST */ - }; - if (vfe_dev->pdev->id == ISP_VFE1) { - ub_offset = VFE47_UB_SIZE_VFE1; - } else if (vfe_dev->pdev->id == ISP_VFE0) { - ub_offset = VFE47_UB_SIZE_VFE0; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE47_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE47_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe47_stats_update_cgc_override(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, cgc_mask = 0; - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - cgc_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - cgc_mask |= (1 << 1); - break; - case STATS_IDX_BF: - cgc_mask |= (1 << 2); - break; - case STATS_IDX_BG: - cgc_mask |= (1 << 3); - break; - case STATS_IDX_BHIST: - cgc_mask |= (1 << 4); - break; - case STATS_IDX_RS: - cgc_mask |= (1 << 5); - break; - case STATS_IDX_CS: - cgc_mask |= (1 << 6); - break; - case STATS_IDX_IHIST: - cgc_mask |= (1 << 7); - break; - case STATS_IDX_BF_SCALE: - cgc_mask |= (1 << 2); - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - /* CGC override */ - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - if (enable) - module_cfg |= cgc_mask; - else - module_cfg &= ~cgc_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x30); -} - -static void msm_vfe47_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - module_cfg_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - module_cfg_mask |= 1 << 1; - break; - case STATS_IDX_BF: - module_cfg_mask |= 1 << 2; - break; - case STATS_IDX_BG: - module_cfg_mask |= 1 << 3; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 4; - break; - case STATS_IDX_RS: - module_cfg_mask |= 1 << 5; - break; - case STATS_IDX_CS: - module_cfg_mask |= 1 << 6; - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 7; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 5; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x44); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x9B8); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x9B8); -} - -static void msm_vfe47_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE47_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe47_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe47_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe47_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; -} - -static int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - if (vfe_dev->hw_info->num_iommu_secure_ctx) { - vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); - if (!vfe_dev->iommu_secure_ctx[0]) { - pr_err("%s: cannot get secure iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe47_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static void msm_vfe47_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x01FFFE7E; -} - -static void msm_vfe47_get_rdi_wm_mask(struct vfe_device *vfe_dev, - uint32_t *rdi_wm_mask) -{ - *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; -} - -static void msm_vfe47_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x60); -} - -static void msm_vfe47_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x60); -} - - -static void msm_vfe47_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} -static struct msm_vfe_axi_hardware_info msm_vfe47_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 96, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe47_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_HDR_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_HDR_BHIST | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE47_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE47_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe47_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe47_subdev_ops = { - .core = &msm_vfe47_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe47_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe47_hw_info = { - .num_iommu_ctx = 1, - .num_iommu_secure_ctx = 1, - .vfe_clk_idx = VFE47_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe47_read_irq_status, - .process_camif_irq = msm_vfe47_process_input_irq, - .process_reset_irq = msm_vfe47_process_reset_irq, - .process_halt_irq = msm_vfe47_process_halt_irq, - .process_reset_irq = msm_vfe47_process_reset_irq, - .process_reg_update = msm_vfe47_process_reg_update, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe47_axi_reload_wm, - .enable_wm = msm_vfe47_axi_enable_wm, - .cfg_io_format = msm_vfe47_cfg_io_format, - .cfg_comp_mask = msm_vfe47_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe47_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe47_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe47_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe47_cfg_framedrop, - .clear_framedrop = msm_vfe47_clear_framedrop, - .cfg_wm_reg = msm_vfe47_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe47_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe47_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe47_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe47_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe47_update_ping_pong_addr, - .get_comp_mask = msm_vfe47_get_comp_mask, - .get_wm_mask = msm_vfe47_get_wm_mask, - .get_pingpong_status = msm_vfe47_get_pingpong_status, - .halt = msm_vfe47_axi_halt, - .restart = msm_vfe47_axi_restart, - .update_cgc_override = - msm_vfe47_axi_update_cgc_override, - }, - .core_ops = { - .reg_update = msm_vfe47_reg_update, - .cfg_input_mux = msm_vfe47_cfg_input_mux, - .update_camif_state = msm_vfe47_update_camif_state, - .start_fetch_eng = msm_vfe47_start_fetch_engine, - .cfg_rdi_reg = msm_vfe47_cfg_rdi_reg, - .reset_hw = msm_vfe47_reset_hardware, - .init_hw = msm_vfe47_init_hardware, - .init_hw_reg = msm_vfe47_init_hardware_reg, - .clear_status_reg = msm_vfe47_clear_status_reg, - .release_hw = msm_vfe47_release_hardware, - .get_platform_data = msm_vfe47_get_platform_data, - .get_error_mask = msm_vfe47_get_error_mask, - .get_overflow_mask = msm_vfe47_get_overflow_mask, - .get_rdi_wm_mask = msm_vfe47_get_rdi_wm_mask, - .get_irq_mask = msm_vfe47_get_irq_mask, - .restore_irq_mask = msm_vfe47_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe47_get_halt_restart_mask, - .process_error_status = msm_vfe47_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe47_get_stats_idx, - .check_streams = msm_vfe47_stats_check_streams, - .cfg_comp_mask = msm_vfe47_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe47_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe47_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe47_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe47_stats_clear_wm_reg, - .cfg_ub = msm_vfe47_stats_cfg_ub, - .enable_module = msm_vfe47_stats_enable_module, - .update_ping_pong_addr = - msm_vfe47_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe47_stats_get_comp_mask, - .get_wm_mask = msm_vfe47_stats_get_wm_mask, - .get_frame_id = msm_vfe47_stats_get_frame_id, - .get_pingpong_status = msm_vfe47_get_pingpong_status, - .update_cgc_override = - msm_vfe47_stats_update_cgc_override, - }, - }, - .dmi_reg_offset = 0xACC, - .axi_hw_info = &msm_vfe47_axi_hw_info, - .stats_hw_info = &msm_vfe47_stats_hw_info, - .subdev_ops = &msm_vfe47_subdev_ops, - .subdev_internal_ops = &msm_vfe47_internal_ops, -}; -EXPORT_SYMBOL(vfe47_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.h deleted file mode 100644 index 12b079678dc1..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp47.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP47_H__ -#define __MSM_ISP47_H__ - -extern struct msm_vfe_hardware_info vfe47_hw_info; -#endif /* __MSM_ISP47_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.c deleted file mode 100644 index 7814909326e3..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.c +++ /dev/null @@ -1,1955 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_camera_io_util.h" - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) -#define FAST_ISP_STREAM_OFF -#endif - -#define SRC_TO_INTF(src) \ - ((src < RDI_INTF_0) ? VFE_PIX_0 : \ - (VFE_RAW_0 + src - RDI_INTF_0)) - -#define HANDLE_TO_IDX(handle) (handle & 0xFF) - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MIN_IB 1700000000 - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int i, rc = -1; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == AVALIABLE) - break; - } - - if (i == MAX_NUM_STREAM) { - pr_err("%s: No free stream\n", __func__); - return rc; - } - - if ((axi_data->stream_handle_cnt << 8) == 0) - axi_data->stream_handle_cnt++; - - stream_cfg_cmd->axi_stream_handle = - (++axi_data->stream_handle_cnt) << 8 | i; - - memset(&axi_data->stream_info[i], 0, - sizeof(struct msm_vfe_axi_stream)); - spin_lock_init(&axi_data->stream_info[i].lock); - axi_data->stream_info[i].session_id = stream_cfg_cmd->session_id; - axi_data->stream_info[i].stream_id = stream_cfg_cmd->stream_id; - axi_data->stream_info[i].buf_divert = stream_cfg_cmd->buf_divert; - axi_data->stream_info[i].state = INACTIVE; - axi_data->stream_info[i].stream_handle = - stream_cfg_cmd->axi_stream_handle; - return 0; -} - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx) -{ - if (axi_data->stream_info[stream_idx].state != AVALIABLE) { - axi_data->stream_info[stream_idx].state = AVALIABLE; - axi_data->stream_info[stream_idx].stream_handle = 0; - } else { - pr_err("%s: stream does not exist\n", __func__); - } -} - -int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int rc = -1, i; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid axi_stream_handle\n", __func__); - return rc; - } - switch (stream_cfg_cmd->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - stream_info->num_planes = 1; - stream_info->format_factor = ISP_Q2; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - stream_info->num_planes = 2; - stream_info->format_factor = 1.5 * ISP_Q2; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - return rc; - } - - if (axi_data->hw_info->num_wm - axi_data->num_used_wm < - stream_info->num_planes) { - pr_err("%s: No free write masters\n", __func__); - return rc; - } - - if ((stream_info->num_planes > 1) && - (axi_data->hw_info->num_comp_mask - - axi_data->num_used_composite_mask < 1)) { - pr_err("%s: No free composite mask\n", __func__); - return rc; - } - - if (stream_cfg_cmd->init_frame_drop >= MAX_INIT_FRAME_DROP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - if (stream_cfg_cmd->frame_skip_pattern >= MAX_SKIP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - for (i = 0; i < stream_info->num_planes; i++) { - stream_info->plane_cfg[i] = stream_cfg_cmd->plane_cfg[i]; - stream_info->max_width = max(stream_info->max_width, - stream_cfg_cmd->plane_cfg[i].output_width); - } - - stream_info->output_format = stream_cfg_cmd->output_format; - stream_info->runtime_output_format = stream_info->output_format; - stream_info->stream_src = stream_cfg_cmd->stream_src; - stream_info->frame_based = stream_cfg_cmd->frame_base; - return 0; -} - -static uint32_t msm_isp_axi_get_plane_size( - struct msm_vfe_axi_stream *stream_info, int plane_idx) -{ - uint32_t size = 0; - struct msm_vfe_axi_plane_cfg *plane_cfg = stream_info->plane_cfg; - switch (stream_info->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - break; - } - return size; -} - -void msm_isp_axi_reserve_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - for (i = 0; i < stream_info->num_planes; i++) { - for (j = 0; j < axi_data->hw_info->num_wm; j++) { - if (!axi_data->free_wm[j]) { - axi_data->free_wm[j] = - stream_info->stream_handle; - axi_data->wm_image_size[j] = - msm_isp_axi_get_plane_size( - stream_info, i); - axi_data->num_used_wm++; - break; - } - } - stream_info->wm[i] = j; - } -} - -void msm_isp_axi_free_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) { - axi_data->free_wm[stream_info->wm[i]] = 0; - axi_data->num_used_wm--; - } -} - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - uint8_t comp_mask = 0; - for (i = 0; i < stream_info->num_planes; i++) - comp_mask |= 1 << stream_info->wm[i]; - - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - if (!axi_data->composite_info[i].stream_handle) { - axi_data->composite_info[i].stream_handle = - stream_info->stream_handle; - axi_data->composite_info[i]. - stream_composite_mask = comp_mask; - axi_data->num_used_composite_mask++; - break; - } - } - stream_info->comp_mask_index = i; - return; -} - -void msm_isp_axi_free_comp_mask(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - axi_data->composite_info[stream_info->comp_mask_index]. - stream_composite_mask = 0; - axi_data->composite_info[stream_info->comp_mask_index]. - stream_handle = 0; - axi_data->num_used_composite_mask--; -} - -int msm_isp_axi_get_bufq_handles( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - - if (stream_info->stream_id & ISP_SCRATCH_BUF_BIT) { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id & ~ISP_SCRATCH_BUF_BIT); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - - stream_info->bufq_scratch_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_scratch_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } else { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } - return rc; -} - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int rc = 0, i; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - enum msm_vfe_axi_state valid_state = - (stream_cfg_cmd->cmd == START_STREAM) ? INACTIVE : ACTIVE; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state != valid_state) { - if ((stream_info->state == PAUSING || - stream_info->state == PAUSED || - stream_info->state == RESUME_PENDING || - stream_info->state == RESUMING) && - (stream_cfg_cmd->cmd == STOP_STREAM || - stream_cfg_cmd->cmd == STOP_IMMEDIATELY)) { - stream_info->state = ACTIVE; - } else { - pr_err("%s: Invalid stream state: %d\n", - __func__, stream_info->state); - spin_unlock_irqrestore( - &stream_info->lock, flags); - rc = -EINVAL; - break; - } - } - spin_unlock_irqrestore(&stream_info->lock, flags); - - if (stream_cfg_cmd->cmd == START_STREAM) { - rc = msm_isp_axi_get_bufq_handles(vfe_dev, stream_info); - if (rc) - break; - } - } - return rc; -} - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - - if (stream_info->runtime_framedrop_update) { - stream_info->runtime_init_frame_drop--; - if (stream_info->runtime_init_frame_drop == 0) { - stream_info->runtime_framedrop_update = 0; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - } - } - if (stream_info->stream_type == BURST_STREAM) { - stream_info->runtime_burst_frame_count--; - if (stream_info->runtime_burst_frame_count == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev); - } - } - } -} - -static void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - stream_info->runtime_init_frame_drop = stream_info->init_frame_drop; - stream_info->runtime_burst_frame_count = - stream_info->burst_frame_count; - stream_info->runtime_num_burst_capture = - stream_info->num_burst_capture; - stream_info->runtime_framedrop_update = stream_info->framedrop_update; - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(vfe_dev, stream_info); -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -void msm_isp_sof_notify(struct vfe_device *vfe_dev, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data sof_event; - uint32_t session_id; - unsigned long flags; - uint16_t session_mask = 0; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - session_mask = vfe_dev->axi_data.session_frame_src_mask[session_id]; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - - if (!(session_mask & (1 << frame_src))) { - /*pr_err("%s: Ignoring the Sof for the source INTF %d\n", - __func__, (1 << frame_src));*/ - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - /*pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - session_mask, - session_id);*/ - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - session_mask)) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - sof_event.input_intf = session_mask; - sof_event.frame_id = vfe_dev->axi_data.frame_id[session_id]; - sof_event.timestamp = ts->event_time; - sof_event.mono_timestamp = ts->buf_time; - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, - ISP_EVENT_SOF + frame_src, &sof_event); - /*pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]);*/ - } -} -#else -void msm_isp_sof_notify(struct vfe_device *vfe_dev, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data sof_event; - uint32_t session_id; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - if (!(vfe_dev->axi_data.session_frame_src_mask[session_id] - & (1 << frame_src))) { - pr_err("%s: Ignoring the Sof for the sourece INTF %d\n", - __func__, (1 << frame_src)); - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - vfe_dev->axi_data.session_frame_src_mask[session_id], - session_id); - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - vfe_dev->axi_data.session_frame_src_mask[session_id])) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - sof_event.input_intf = - vfe_dev->axi_data.session_frame_src_mask[session_id]; - sof_event.frame_id = vfe_dev->axi_data.frame_id[session_id]; - sof_event.timestamp = ts->event_time; - sof_event.mono_timestamp = ts->buf_time; - - //pr_err("%s: AAAAA SOF frame id = %u\n", - // __func__, vfe_dev->axi_data.frame_id[session_id]); - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, - ISP_EVENT_SOF + frame_src, &sof_event); - pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]); - } -} -#endif - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - uint32_t framedrop_period = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid stream handle",__func__); - return; - } - - framedrop_period = msm_isp_get_framedrop_period( - stream_cfg_cmd->frame_skip_pattern); - - stream_info->frame_skip_pattern = - stream_cfg_cmd->frame_skip_pattern; - if (stream_cfg_cmd->frame_skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (stream_cfg_cmd->init_frame_drop < framedrop_period) { - stream_info->framedrop_pattern <<= - stream_cfg_cmd->init_frame_drop; - stream_info->init_frame_drop = 0; - stream_info->framedrop_update = 0; - } else { - stream_info->init_frame_drop = stream_cfg_cmd->init_frame_drop; - stream_info->framedrop_update = 1; - } - - if (stream_cfg_cmd->burst_count > 0) { - stream_info->stream_type = BURST_STREAM; - stream_info->num_burst_capture = - stream_cfg_cmd->burst_count; - stream_info->burst_frame_count = - stream_cfg_cmd->init_frame_drop + - (stream_cfg_cmd->burst_count - 1) * - framedrop_period + 1; - } else { - stream_info->stream_type = CONTINUOUS_STREAM; - stream_info->burst_frame_count = 0; - stream_info->num_burst_capture = 0; - } -} - -void msm_isp_calculate_bandwidth( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src < RDI_INTF_0) { - stream_info->bandwidth = - (axi_data->src_info[VFE_PIX_0].pixel_clock / - axi_data->src_info[VFE_PIX_0].width) * - stream_info->max_width; - stream_info->bandwidth = stream_info->bandwidth * - stream_info->format_factor / ISP_Q2; - } else { - int rdi = SRC_TO_INTF(stream_info->stream_src); - stream_info->bandwidth = axi_data->src_info[rdi].pixel_clock; - } -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_start_avtimer(void) -{ - avcs_core_open(); - avcs_core_disable_power_collapse(1); -} -#else -void msm_isp_start_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - uint32_t io_format = 0, avtimer_scaler = 0; - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - rc = msm_isp_axi_create_stream( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - rc = msm_isp_validate_axi_request( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: Request validation failed\n", __func__); - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)); - return rc; - } - stream_info = &vfe_dev->axi_data. - stream_info[HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - msm_isp_axi_reserve_wm(&vfe_dev->axi_data, stream_info); - - if (stream_info->stream_src < RDI_INTF_0) { - io_format = vfe_dev->axi_data.src_info[VFE_PIX_0].input_format; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - if (stream_info->stream_src == CAMIF_RAW && - io_format != stream_info->output_format) - pr_warn("%s: Overriding input format\n", - __func__); - - io_format = stream_info->output_format; - } - rc = vfe_dev->hw_info->vfe_ops.axi_ops.cfg_io_format( - vfe_dev, stream_info->stream_src, io_format); - if (rc) { - pr_err("%s: cfg io format failed\n", __func__); - msm_isp_axi_free_wm(&vfe_dev->axi_data, - stream_info); - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX( - stream_cfg_cmd->axi_stream_handle)); - return rc; - } - } - - msm_isp_calculate_framedrop(&vfe_dev->axi_data, stream_cfg_cmd); - stream_info->vt_enable = stream_cfg_cmd->vt_enable; - axi_data->burst_len = stream_cfg_cmd->burst_len; - - if (stream_info->vt_enable) { - vfe_dev->vt_enable = stream_info->vt_enable; - msm_isp_start_avtimer(); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_ctl = - ioremap(AVTIMER_MODE_CTL_PHY_ADDR_8916, 4); - if (vfe_dev->p_avtimer_ctl) { - avtimer_scaler = - msm_camera_io_r(vfe_dev->p_avtimer_ctl); - /*If bit 2 is set, it indicates AVTimer - ticks are scaled*/ - if (avtimer_scaler & 0x00000002) - vfe_dev->avtimer_scaler = - AVTIMER_TICK_SCALER_8916; - } - } else { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR, 4); - } - } - if (stream_info->num_planes > 1) { - msm_isp_axi_reserve_comp_mask( - &vfe_dev->axi_data, stream_info); - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_comp_mask(vfe_dev, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_xbar_reg(vfe_dev, stream_info, i); - } - return rc; -} - -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_axi_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_release_cmd->stream_handle)]; - struct msm_vfe_axi_stream_cfg_cmd stream_cfg; - - if (stream_info->state == AVALIABLE) { - pr_err("%s: Stream already released\n", __func__); - return -EINVAL; - } else if (stream_info->state != INACTIVE) { - stream_cfg.cmd = STOP_STREAM; - stream_cfg.num_streams = 1; - stream_cfg.stream_handle[0] = stream_release_cmd->stream_handle; - msm_isp_cfg_axi_stream(vfe_dev, (void *) &stream_cfg); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_xbar_reg(vfe_dev, stream_info, i); - } - - if (stream_info->num_planes > 1) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_comp_mask(vfe_dev, stream_info); - msm_isp_axi_free_comp_mask(&vfe_dev->axi_data, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - } - - vfe_dev->hw_info->vfe_ops.axi_ops.clear_framedrop(vfe_dev, stream_info); - msm_isp_axi_free_wm(axi_data, stream_info); - - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX(stream_release_cmd->stream_handle)); - - return rc; -} - -static void msm_isp_axi_stream_enable_cfg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - if (stream_info->state == INACTIVE) - return; - for (i = 0; i < stream_info->num_planes; i++) { - if (stream_info->state == START_PENDING || - stream_info->state == RESUME_PENDING) - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 1); - else { - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 0); - /* Issue a reg update for Raw Snapshot Case - * since we dont have reg update ack - */ - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev); - } - } - } - - if (stream_info->state == START_PENDING) - axi_data->num_active_stream++; - else if (stream_info->state == STOP_PENDING) - axi_data->num_active_stream--; -} - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || - axi_data->stream_info[i].state == - STOP_PENDING) { - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == - START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || - axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == STARTING ? - ACTIVE : INACTIVE; - } - } - - if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF || - (vfe_dev->axi_data.pipeline_update == - DISABLE_CAMIF_IMMEDIATELY)) { - vfe_dev->hw_info->vfe_ops.stats_ops. - enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } - - vfe_dev->axi_data.stream_update--; - if (vfe_dev->axi_data.stream_update == 0) - complete(&vfe_dev->stream_config_complete); -} - -static void msm_isp_reload_ping_pong_offset(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - uint32_t flag; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - flag = i ? VFE_PONG_FLAG : VFE_PING_FLAG; - for (j = 0; j < stream_info->num_planes; j++) { - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[j], flag, - buf->mapped_info[j].paddr + - stream_info->plane_cfg[j].plane_addr_offset); - } - } -} - -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev) -{ - int i, j; - uint32_t update_state; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->stream_type == BURST_STREAM || - stream_info->state == AVALIABLE) - continue; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state == PAUSING) { - /*AXI Stopped, apply update*/ - stream_info->state = PAUSED; - msm_isp_reload_ping_pong_offset(vfe_dev, stream_info); - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - /*Resume AXI*/ - stream_info->state = RESUME_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - stream_info->state = RESUMING; - } else if (stream_info->state == RESUMING) { - stream_info->runtime_output_format = - stream_info->output_format; - stream_info->state = ACTIVE; - } - spin_unlock_irqrestore(&stream_info->lock, flags); - } - - update_state = atomic_dec_return(&axi_data->axi_cfg_update); -} - -static void msm_isp_cfg_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf = stream_info->buf[0]; - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - VFE_PONG_FLAG, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - stream_info->buf[1] = buf; -} - -static void msm_isp_get_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - uint32_t pingpong_bit = 0, i; - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - for (i = 0; i < stream_info->num_planes; i++) { - if (pingpong_bit != - (~(pingpong_status >> stream_info->wm[i]) & 0x1)) { - pr_warn("%s: Write master ping pong mismatch. Status: 0x%x\n", - __func__, pingpong_status); - } - } - *done_buf = stream_info->buf[pingpong_bit]; -} - -static int msm_isp_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status) -{ - int i, rc = -1; - struct msm_isp_buffer *buf = NULL; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = 0; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - if (stream_idx >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream_idx",__func__); - return rc; - } - if (stream_info->bufq_scratch_handle && !stream_info->request_frm_num) - bufq_handle = stream_info->bufq_scratch_handle; - else - bufq_handle = stream_info->bufq_handle; - - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - - if (rc < 0) { - vfe_dev->error_info.stream_framedrop_count[stream_idx]++; - return rc; - } - - if (stream_info->bufq_scratch_handle && - bufq_handle == stream_info->bufq_handle) - stream_info->request_frm_num--; - - if (buf->num_planes != stream_info->num_planes) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - pingpong_status, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -static inline void msm_isp_get_vt_tstamp(struct vfe_device *vfe_dev, - struct msm_isp_timestamp *time_stamp) -{ - uint32_t avtimer_msw_1st = 0, avtimer_lsw = 0; - uint32_t avtimer_msw_2nd = 0; - uint64_t av_timer_tick = 0; - - if (!vfe_dev->p_avtimer_msw || !vfe_dev->p_avtimer_lsw) { - pr_err("%s: ioremap failed\n", __func__); - return; - } - - do { - avtimer_msw_1st = msm_camera_io_r(vfe_dev->p_avtimer_msw); - avtimer_lsw = msm_camera_io_r(vfe_dev->p_avtimer_lsw); - avtimer_msw_2nd = msm_camera_io_r(vfe_dev->p_avtimer_msw); - } while (avtimer_msw_1st != avtimer_msw_2nd); - av_timer_tick = ((uint64_t)avtimer_msw_1st << 32) | avtimer_lsw; - do_div(av_timer_tick, vfe_dev->avtimer_scaler); - avtimer_lsw = do_div(av_timer_tick, USEC_PER_SEC); - time_stamp->vt_time.tv_sec = (uint32_t)(av_timer_tick); - time_stamp->vt_time.tv_usec = avtimer_lsw; -} - -static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, struct msm_isp_buffer *buf, - struct msm_isp_timestamp *ts) -{ - int rc; - struct msm_isp_event_data buf_event; - struct timeval *time_stamp; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - uint32_t session_id = vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)].session_id; - uint32_t frame_id = vfe_dev->axi_data.frame_id[session_id]; - uint32_t buf_src; - memset(&buf_event, 0, sizeof(buf_event)); - - if (buf && ts) { - if (vfe_dev->vt_enable) { - msm_isp_get_vt_tstamp(vfe_dev, ts); - time_stamp = &ts->vt_time; - } - else - time_stamp = &ts->buf_time; - - rc = vfe_dev->buf_mgr->ops->get_buf_src(vfe_dev->buf_mgr, - buf->bufq_handle, &buf_src); - if (stream_info->buf_divert && rc == 0 && - buf_src != MSM_ISP_BUFFER_SRC_SCRATCH) { - rc = vfe_dev->buf_mgr->ops->buf_divert(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id); - /* Buf divert return value represent whether the buf - * can be diverted. A positive return value means - * other ISP hardware is still processing the frame. - */ - if (rc == 0) { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = *time_stamp; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.handle = - stream_info->bufq_handle; - buf_event.u.buf_done.buf_idx = buf->buf_idx; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DIVERT + stream_idx, - &buf_event); - } - } else { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = ts->buf_time; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DONE, &buf_event); - vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id, - stream_info->runtime_output_format); - } - } -} - -static enum msm_isp_camif_update_state - msm_isp_get_camif_update_state(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint8_t pix_stream_cnt = 0, cur_pix_stream_cnt; - cur_pix_stream_cnt = - axi_data->src_info[VFE_PIX_0].pix_stream_count + - axi_data->src_info[VFE_PIX_0].raw_stream_count; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - pix_stream_cnt++; - } - - if (pix_stream_cnt) { - if (cur_pix_stream_cnt == 0 && pix_stream_cnt && - stream_cfg_cmd->cmd == START_STREAM) - return ENABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_STREAM) - return DISABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_IMMEDIATELY) - return DISABLE_CAMIF_IMMEDIATELY; - } - return NO_UPDATE; -} - -static void msm_isp_update_camif_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src >= RDI_INTF_0) - continue; - if (stream_info->stream_src == PIX_ENCODER || - stream_info->stream_src == PIX_VIEWFINDER || - stream_info->stream_src == IDEAL_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count--; - } else if (stream_info->stream_src == CAMIF_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count--; - } - } -} - -static void msm_isp_update_rdi_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - continue; - if (stream_info->stream_src == RDI_INTF_0) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_1) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_2) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count--; - } - - } -} - -uint8_t msm_isp_get_curr_stream_cnt( - struct vfe_device *vfe_dev) -{ - uint8_t curr_stream_cnt = 0; - curr_stream_cnt = vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count; - - return curr_stream_cnt; -} - -void msm_camera_io_dump_2(void __iomem *addr, int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - ISP_DBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - ISP_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - ISP_DBG("%s\n", line_str); -} - -/*Factor in Q2 format*/ -#define ISP_DEFAULT_FORMAT_FACTOR 6 -#define ISP_BUS_UTILIZATION_FACTOR 6 -static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) -{ - int i, rc = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; - uint32_t num_pix_streams = 0; - uint32_t num_rdi_streams = 0; - uint32_t total_streams = 0; - uint64_t total_bandwidth = 0; - uint64_t ib_total_bandwidth = 0; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state == ACTIVE || - stream_info->state == START_PENDING) { - if (stream_info->stream_src < RDI_INTF_0) { - total_pix_bandwidth += stream_info->bandwidth; - num_pix_streams++; - } else { - total_rdi_bandwidth += stream_info->bandwidth; - num_rdi_streams++; - } - } - } - if (num_pix_streams > 0) - total_pix_bandwidth = total_pix_bandwidth / - num_pix_streams * (num_pix_streams - 1) + - ((unsigned long)axi_data->src_info[VFE_PIX_0]. - pixel_clock) * ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2; - total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; - total_streams = num_pix_streams + num_rdi_streams; - if (total_streams == 1) { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2 - MSM_ISP_MIN_IB; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - (total_bandwidth - MSM_ISP_MIN_AB) , ib_total_bandwidth); - } - else { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - total_bandwidth, ib_total_bandwidth); - } - if (rc < 0) - pr_err("%s: update failed\n", __func__); - - return rc; -} - -static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state camif_update) -{ - int rc; - unsigned long flags; - spin_lock_irqsave(&vfe_dev->shared_data_lock, flags); - init_completion(&vfe_dev->stream_config_complete); - vfe_dev->axi_data.pipeline_update = camif_update; -#if defined(FAST_ISP_STREAM_OFF) - vfe_dev->axi_data.stream_update = 1; -#else - vfe_dev->axi_data.stream_update = 2; -#endif - spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags); - rc = wait_for_completion_timeout( - &vfe_dev->stream_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_init_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - /*Set address for both PING & PONG register */ - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", - __func__); - return rc; - } - - /* For burst stream of one capture, only one buffer - * is allocated. Duplicate ping buffer address to pong - * buffer to ensure hardware write to a valid address - */ - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture <= 1) { - msm_isp_cfg_pong_address(vfe_dev, stream_info); - } else { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", - __func__); - return rc; - } - } - return rc; -} - -static void msm_isp_deinit_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < 2; i++) { - struct msm_isp_buffer *buf; - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -static void msm_isp_get_stream_wm_mask( - struct msm_vfe_axi_stream *stream_info, - uint32_t *wm_reload_mask) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) - *wm_reload_mask |= (1 << stream_info->wm[i]); -} - -#if defined(FAST_ISP_STREAM_OFF) -static void msm_isp_axi_stream_update_new(struct vfe_device *vfe_dev, enum msm_isp_camif_update_state camif_update) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || axi_data->stream_info[i].state == STOP_PENDING) { - msm_isp_axi_stream_enable_cfg(vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = axi_data->stream_info[i].state == START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = axi_data->stream_info[i].state == STARTING ? ACTIVE : INACTIVE; - } - } - - if (camif_update == DISABLE_CAMIF) { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } - -} -#endif - -static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t src_state, wait_for_complete = 0; - uint32_t wm_reload_mask = 0x0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint8_t init_frm_drop = 0; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - stream_info->frame_id = 0; - src_state = axi_data->src_info[ - SRC_TO_INTF(stream_info->stream_src)].active; - - msm_isp_calculate_bandwidth(axi_data, stream_info); - msm_isp_reset_framedrop(vfe_dev, stream_info); - init_frm_drop = stream_info->init_frame_drop; - msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); - rc = msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])); - return rc; - } - - stream_info->state = START_PENDING; - if (src_state) { - wait_for_complete = 1; - } else { - if (vfe_dev->dump_reg) - msm_camera_io_dump_2(vfe_dev->vfe_base, 0x900); - - /*Configure AXI start bits to start immediately*/ - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = ACTIVE; - } - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].session_id = - stream_info->session_id; - vfe_dev->axi_data. - session_frame_src_mask[stream_info->session_id] |= - (1 << SRC_TO_INTF(stream_info->stream_src)); - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].frame_id = 0; - } - msm_isp_update_stream_bandwidth(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, wm_reload_mask); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - - vfe_dev->hw_info->vfe_ops.core_ops.init_vbif_counters(vfe_dev); - - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - if (camif_update == ENABLE_CAMIF) { - vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id = 0; - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, camif_update); - } - if (vfe_dev->axi_data.src_info[VFE_RAW_0].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_0].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_1].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_1].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_2].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_2].frame_id = 0; - -#if defined(FAST_ISP_STREAM_OFF) - if (wait_for_complete){ - msm_isp_axi_stream_update_new(vfe_dev, camif_update); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - } -#else - if (wait_for_complete) - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif - - return rc; -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - unsigned long flags; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM || - stream_cfg_cmd->num_streams == 0) - return -EINVAL; - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (cur_stream_cnt > 0) - wait_for_complete = 1; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count + vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count) >= 1) - skip_session_mask_update = 1; - else - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - } - - if (wait_for_complete) { - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } else { - pr_err("%s: Stop Immediately! stream_id=%d\n", __func__, - stream_info->stream_id); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - - if (cur_stream_cnt == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#else -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - /* We dont get reg update IRQ for raw snapshot - * so frame skip cant be ocnfigured - */ - wait_for_complete = 1; - } else if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture == 0) { - /* Configure AXI writemasters to stop immediately - * since for burst case, write masters already skip - * all frames. - */ - if (stream_info->stream_src == RDI_INTF_0 || - stream_info->stream_src == RDI_INTF_1 || - stream_info->stream_src == RDI_INTF_2) - wait_for_complete = 1; - else { - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } else { - wait_for_complete = 1; - } - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count <= 1) && (vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count <= 1)) { - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - if (stream_info->stream_type == - BURST_STREAM) - skip_session_mask_update = 1; - } - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - - } - if (wait_for_complete) { -#if defined(FAST_ISP_STREAM_OFF) - msm_isp_axi_stream_update_new(vfe_dev, DISABLE_CAMIF); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, NO_UPDATE); -#else - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#endif - - -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - enum msm_isp_camif_update_state camif_update; - - rc = msm_isp_axi_check_stream_state(vfe_dev, stream_cfg_cmd); - if (rc < 0) { - pr_err("%s: Invalid stream state\n", __func__); - return rc; - } - - if (axi_data->num_active_stream == 0) { - /*Configure UB*/ - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_ub(vfe_dev); - } - camif_update = msm_isp_get_camif_update_state(vfe_dev, stream_cfg_cmd); - - if (stream_cfg_cmd->cmd == START_STREAM) - rc = msm_isp_start_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - else - rc = msm_isp_stop_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - - if (rc < 0) - pr_err("%s: start/stop stream failed\n", __func__); - return rc; -} - -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i, j; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream_update_cmd *update_cmd = arg; - struct msm_vfe_axi_stream_cfg_update_info *update_info; - - if (update_cmd->update_type == UPDATE_STREAM_AXI_CONFIG && - atomic_read(&axi_data->axi_cfg_update)) { - pr_err("%s: AXI stream config updating\n", __func__); - return -EBUSY; - } - - /*num_stream is uint32 and update_info[] bound by MAX_NUM_STREAM*/ - if (update_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - /*check array reference bounds*/ - if (HANDLE_TO_IDX(update_info->stream_handle) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - if (stream_info->state != ACTIVE && - stream_info->state != INACTIVE) { - pr_err("%s: Invalid stream state\n", __func__); - return -EINVAL; - } - if (stream_info->state == ACTIVE && - stream_info->stream_type == BURST_STREAM && - (1 != update_cmd->num_streams || - UPDATE_STREAM_FRAMEDROP_PATTERN != - update_cmd->update_type)) { - pr_err("%s: Cannot update active burst stream\n", - __func__); - return -EINVAL; - } - } - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - - switch (update_cmd->update_type) { - case ENABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 1; - break; - case DISABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 0; - vfe_dev->buf_mgr->ops->flush_buf(vfe_dev->buf_mgr, - stream_info->bufq_handle, - MSM_ISP_BUFFER_FLUSH_DIVERTED); - break; - case UPDATE_STREAM_FRAMEDROP_PATTERN: { - uint32_t framedrop_period = - msm_isp_get_framedrop_period( - update_info->skip_pattern); - stream_info->runtime_init_frame_drop = 0; - if (update_info->skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - break; - } - case UPDATE_STREAM_AXI_CONFIG: { - for (j = 0; j < stream_info->num_planes; j++) { - stream_info->plane_cfg[j] = - update_info->plane_cfg[j]; - } - stream_info->output_format = update_info->output_format; - if (stream_info->state == ACTIVE) { - stream_info->state = PAUSE_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = PAUSING; - atomic_set(&axi_data->axi_cfg_update, - UPDATE_REQUESTED); - } else { - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - stream_info->runtime_output_format = - stream_info->output_format; - } - break; - } - case UPDATE_STREAM_REQUEST_FRAMES: { - stream_info->request_frm_num += - update_info->request_frm_num; - break; - } - default: - pr_err("%s: Invalid update type\n", __func__); - return -EINVAL; - } - } - return rc; -} - -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, rc = 0; - struct msm_isp_buffer *done_buf = NULL; - uint32_t comp_mask = 0, wm_mask = 0; - uint32_t pingpong_status, stream_idx; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_composite_info *comp_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t frame_id = 0; - - comp_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_comp_mask(irq_status0, irq_status1); - wm_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(comp_mask || wm_mask)) - return; - - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - pingpong_status = - vfe_dev->hw_info->vfe_ops.axi_ops.get_pingpong_status(vfe_dev); - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - comp_info = &axi_data->composite_info[i]; - if (comp_mask & (1 << i)) { - if (!comp_info->stream_handle) { - pr_err("%s: Invalid handle for composite irq\n", - __func__); - } else { - stream_idx = - HANDLE_TO_IDX(comp_info->stream_handle); - stream_info = - &axi_data->stream_info[stream_idx]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, - stream_info->frame_id); - return; - } - stream_info->frame_id = frame_id; - - if (stream_info->stream_type == BURST_STREAM) - stream_info-> - runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == - CONTINUOUS_STREAM || - stream_info-> - runtime_num_burst_capture >= 1) { - rc = msm_isp_cfg_ping_pong_address( - vfe_dev, stream_info, - pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - wm_mask &= ~(comp_info->stream_composite_mask); - } - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (wm_mask & (1 << i)) { - if (!axi_data->free_wm[i]) { - pr_err("%s: Invalid handle for wm irq\n", - __func__); - continue; - } - stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]); - stream_info = &axi_data->stream_info[stream_idx]; - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, stream_info->frame_id); - return; - } - - if (stream_info->stream_type == BURST_STREAM) - stream_info->runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == CONTINUOUS_STREAM || - stream_info->runtime_num_burst_capture > 1) { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - return; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.h deleted file mode 100644 index 05eaebd47f53..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_axi_util.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_AXI_UTIL_H__ -#define __MSM_ISP_AXI_UTIL_H__ - -#include "msm_isp.h" - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx); - -int msm_isp_validate_axi_request( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_reserve_wm( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd); - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev); - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev); - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev); -void msm_isp_sof_notify(struct vfe_device *vfe_dev, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts); -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -uint8_t msm_isp_get_curr_stream_cnt(struct vfe_device *vfe_dev); -#endif -#endif /* __MSM_ISP_AXI_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.c deleted file mode 100644 index 50b1940fc34c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.c +++ /dev/null @@ -1,575 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_stats_util.h" - -static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - int rc = -1; - struct msm_isp_buffer *buf; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = stream_info->bufq_handle; - uint32_t stats_pingpong_offset; - - if (STATS_IDX(stream_info->stream_handle) >= - vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, - STATS_IDX(stream_info->stream_handle)); - return -EINVAL; - } - - stats_pingpong_offset = - vfe_dev->hw_info->stats_hw_info->stats_ping_pong_offset[ - STATS_IDX(stream_info->stream_handle)]; - - pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - if (rc < 0) { - vfe_dev->error_info.stats_framedrop_count[ - STATS_IDX(stream_info->stream_handle)]++; - return rc; - } - - if (buf->num_planes != 1) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - vfe_dev->hw_info->vfe_ops.stats_ops.update_ping_pong_addr( - vfe_dev, stream_info, - pingpong_status, buf->mapped_info[0].paddr + - stream_info->buffer_offset); - - if (stream_info->buf[pingpong_bit] && done_buf) - *done_buf = stream_info->buf[pingpong_bit]; - - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, j, rc; - struct msm_isp_event_data buf_event; - struct msm_isp_stats_event *stats_event = &buf_event.u.stats; - struct msm_isp_buffer *done_buf; - struct msm_vfe_stats_stream *stream_info = NULL; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t pingpong_status; - uint32_t comp_stats_type_mask = 0, atomic_stats_mask = 0; - uint32_t stats_comp_mask = 0, stats_irq_mask = 0; - uint32_t num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - stats_comp_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_comp_mask(irq_status0, irq_status1); - stats_irq_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(stats_comp_mask || stats_irq_mask)) - return; - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - - /* - * If any of composite mask is set, clear irq bits from mask, - * they will be restored by comp mask - */ - if (stats_comp_mask) { - for (j = 0; j < num_stats_comp_mask; j++) { - stats_irq_mask &= ~atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - } - } - - for (j = 0; j < num_stats_comp_mask; j++) { - atomic_stats_mask = atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - if (!stats_comp_mask) { - stats_irq_mask &= ~atomic_stats_mask; - } else { - /* restore irq bits from composite mask */ - if (stats_comp_mask & (1 << j)) - stats_irq_mask |= atomic_stats_mask; - } - /* if no irq bits set from this composite mask continue*/ - if (!stats_irq_mask) - continue; - memset(&buf_event, 0, sizeof(struct msm_isp_event_data)); - buf_event.timestamp = ts->event_time; - buf_event.frame_id = - vfe_dev->axi_data.frame_id[session_id]; - buf_event.input_intf = VFE_PIX_0; - pingpong_status = vfe_dev->hw_info-> - vfe_ops.stats_ops.get_pingpong_status(vfe_dev); - - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; - i++) { - if (!(stats_irq_mask & (1 << i))) - continue; - stream_info = &vfe_dev->stats_data.stream_info[i]; - done_buf = NULL; - msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status, &done_buf); - if (done_buf) { - rc = vfe_dev->buf_mgr->ops->buf_divert( - vfe_dev->buf_mgr, done_buf->bufq_handle, - done_buf->buf_idx, &ts->buf_time, - vfe_dev->axi_data. - frame_id[session_id]); - if (rc != 0) - continue; - - stats_event->stats_buf_idxs - [stream_info->stats_type] = - done_buf->buf_idx; - if (!stream_info->composite_flag) { - stats_event->stats_mask = - 1 << stream_info->stats_type; - ISP_DBG("%s: stats frameid: 0x%x %d\n", - __func__, buf_event.frame_id, - stream_info->stats_type); - msm_isp_send_event(vfe_dev, - ISP_EVENT_STATS_NOTIFY + - stream_info->stats_type, - &buf_event); - } else { - comp_stats_type_mask |= - 1 << stream_info->stats_type; - } - } - stats_irq_mask &= ~(1 << i); - } - - if (comp_stats_type_mask) { - ISP_DBG("%s: comp_stats frameid: 0x%x, 0x%x\n", - __func__, buf_event.frame_id, - comp_stats_type_mask); - stats_event->stats_mask = comp_stats_type_mask; - msm_isp_send_event(vfe_dev, - ISP_EVENT_COMP_STATS_NOTIFY, &buf_event); - comp_stats_type_mask = 0; - } - } -} - -int msm_isp_stats_create_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd) -{ - int rc = -1; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t stats_idx; - - if (!(vfe_dev->hw_info->stats_hw_info->stats_capability_mask & - (1 << stream_req_cmd->stats_type))) { - pr_err("%s: Stats type not supported\n", __func__); - return rc; - } - - stats_idx = vfe_dev->hw_info->vfe_ops.stats_ops. - get_stats_idx(stream_req_cmd->stats_type); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state != STATS_AVALIABLE) { - pr_err("%s: Stats already requested\n", __func__); - return rc; - } - - if (stream_req_cmd->framedrop_pattern >= MAX_SKIP) { - pr_err("%s: Invalid framedrop pattern\n", __func__); - return rc; - } - - if (stream_req_cmd->irq_subsample_pattern >= MAX_SKIP) { - pr_err("%s: Invalid irq subsample pattern\n", __func__); - return rc; - } - - stream_info->session_id = stream_req_cmd->session_id; - stream_info->stream_id = stream_req_cmd->stream_id; - stream_info->composite_flag = stream_req_cmd->composite_flag; - stream_info->stats_type = stream_req_cmd->stats_type; - stream_info->buffer_offset = stream_req_cmd->buffer_offset; - stream_info->framedrop_pattern = stream_req_cmd->framedrop_pattern; - stream_info->irq_subsample_pattern = - stream_req_cmd->irq_subsample_pattern; - stream_info->state = STATS_INACTIVE; - - if ((vfe_dev->stats_data.stream_handle_cnt << 8) == 0) - vfe_dev->stats_data.stream_handle_cnt++; - - stream_req_cmd->stream_handle = - (++vfe_dev->stats_data.stream_handle_cnt) << 8 | stats_idx; - - stream_info->stream_handle = stream_req_cmd->stream_handle; - return 0; -} - -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd = arg; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t framedrop_period; - uint32_t stats_idx; - - rc = msm_isp_stats_create_stream(vfe_dev, stream_req_cmd); - if (rc < 0) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - stats_idx = STATS_IDX(stream_req_cmd->stream_handle); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - - framedrop_period = msm_isp_get_framedrop_period( - stream_req_cmd->framedrop_pattern); - - if (stream_req_cmd->framedrop_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg(vfe_dev, stream_info); - return rc; -} - -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_cfg_cmd stream_cfg_cmd; - struct msm_vfe_stats_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - int stats_idx = STATS_IDX(stream_release_cmd->stream_handle); - struct msm_vfe_stats_stream *stream_info = NULL; - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state == STATS_AVALIABLE) { - pr_err("%s: stream already release\n", __func__); - return rc; - } else if (stream_info->state != STATS_INACTIVE) { - stream_cfg_cmd.enable = 0; - stream_cfg_cmd.num_streams = 1; - stream_cfg_cmd.stream_handle[0] = - stream_release_cmd->stream_handle; - rc = msm_isp_cfg_stats_stream(vfe_dev, &stream_cfg_cmd); - } - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.clear_wm_reg(vfe_dev, stream_info); - memset(stream_info, 0, sizeof(struct msm_vfe_stats_stream)); - return 0; -} - -static int msm_isp_init_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int rc = 0; - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: no buf configured for stream: 0x%x\n", - __func__, stream_info->stream_handle); - return -EINVAL; - } - - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", __func__); - return rc; - } - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", __func__); - return rc; - } - return rc; -} - -static void msm_isp_deinit_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev) -{ - int i; - uint32_t stats_mask = 0, comp_stats_mask = 0; - uint32_t enable = 0; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; i++) { - if (stats_data->stream_info[i].state == STATS_START_PENDING || - stats_data->stream_info[i].state == - STATS_STOP_PENDING) { - stats_mask |= i; - enable = stats_data->stream_info[i].state == - STATS_START_PENDING ? 1 : 0; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_START_PENDING ? - STATS_STARTING : STATS_STOPPING; - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, BIT(i), enable); - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, BIT(i), enable); - } else if (stats_data->stream_info[i].state == STATS_STARTING || - stats_data->stream_info[i].state == STATS_STOPPING) { - if (stats_data->stream_info[i].composite_flag) - comp_stats_mask |= i; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_STARTING ? STATS_ACTIVE : STATS_INACTIVE; - } - } - atomic_sub(1, &stats_data->stats_update); - if (!atomic_read(&stats_data->stats_update)) - complete(&vfe_dev->stats_config_complete); -} - -static int msm_isp_stats_wait_for_cfg_done(struct vfe_device *vfe_dev) -{ - int rc; - init_completion(&vfe_dev->stats_config_complete); - atomic_set(&vfe_dev->stats_data.stats_update, 2); - rc = wait_for_completion_timeout( - &vfe_dev->stats_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - rc = vfe_dev->hw_info->vfe_ops.stats_ops.check_streams( - stats_data->stream_info); - if (rc < 0) - return rc; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - rc = msm_isp_init_stats_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, idx); - return rc; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_START_PENDING; - else - stream_info->state = STATS_ACTIVE; - - stats_data->num_active_stream++; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - - } - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 1); - } - } - return rc; -} - -static int msm_isp_stop_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_STOP_PENDING; - else - stream_info->state = STATS_INACTIVE; - - stats_data->num_active_stream--; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 0); - } - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - msm_isp_deinit_stats_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} - -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - stats_data->stats_burst_len = stream_cfg_cmd->stats_burst_len; - - if (vfe_dev->stats_data.num_active_stream == 0) - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev); - - if (stream_cfg_cmd->enable) - rc = msm_isp_start_stats_stream(vfe_dev, stream_cfg_cmd); - else - rc = msm_isp_stop_stats_stream(vfe_dev, stream_cfg_cmd); - - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.h deleted file mode 100644 index 7b4c4b4eb0dc..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_stats_util.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_STATS_UTIL_H__ -#define __MSM_ISP_STATS_UTIL_H__ - -#include "msm_isp.h" -#define STATS_IDX(idx) (idx & 0xFF) - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev); -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg); -#endif /* __MSM_ISP_STATS_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.c deleted file mode 100644 index faf4540a7f97..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.c +++ /dev/null @@ -1,1653 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include - -#include "msm.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_camera_io_util.h" - -#define MAX_ISP_V4l2_EVENTS 100 -static DEFINE_MUTEX(bandwidth_mgr_mutex); -static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr; - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MSM_MIN_REQ_VFE_CPP_BW 1700000000 - -#define VFE40_8974V2_VERSION 0x1001001A - -#ifndef CONFIG_ARCH_MSM8939 -#define CAMERA_BOOST -#endif - -#ifdef CAMERA_BOOST -#define MBYTE (1ULL << 20) - -#define BW_MBPS(_bw) \ -{ \ - .vectors = &(struct msm_bus_vectors){ \ - .src = 1, \ - .dst = 512, \ - .ib = (_bw) * MBYTE, \ - .ab = 0, \ - }, \ - .num_paths = 1, \ -} - -static struct msm_bus_paths bw_level_tbl[] = { - [0] = BW_MBPS(381), /* At least 50 MHz on bus. */ - [1] = BW_MBPS(4066), /* At least 533 MHz on bus. */ -}; - -static struct msm_bus_scale_pdata bus_client_pdata = { - .usecase = bw_level_tbl, - .num_usecases = ARRAY_SIZE(bw_level_tbl), - .active_only = 1, - .name = "Camera_boost", -}; - -static u32 bus_client; -#endif - -static struct msm_bus_vectors msm_isp_init_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_isp_ping_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_vectors msm_isp_pong_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_paths msm_isp_bus_client_config[] = { - { - ARRAY_SIZE(msm_isp_init_vectors), - msm_isp_init_vectors, - }, - { - ARRAY_SIZE(msm_isp_ping_vectors), - msm_isp_ping_vectors, - }, - { - ARRAY_SIZE(msm_isp_pong_vectors), - msm_isp_pong_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_isp_bus_client_pdata = { - msm_isp_bus_client_config, - ARRAY_SIZE(msm_isp_bus_client_config), - .name = "msm_camera_isp", -}; - -static void msm_isp_print_fourcc_error(const char *origin, - uint32_t fourcc_format) -{ - int i; - char text[5]; - text[4] = '\0'; - for (i = 0; i < 4; i++) { - text[i] = (char)(((fourcc_format) >> (i * 8)) & 0xFF); - if ((text[i] < '0') || (text[i] > 'z')) { - pr_err("%s: Invalid output format %d (unprintable)\n", - origin, fourcc_format); - return; - } - } - pr_err("%s: Invalid output format %s\n", - origin, text); - return; -} - -#ifdef CONFIG_COMPAT -struct msm_vfe_cfg_cmd2_32 { - uint16_t num_cfg; - uint16_t cmd_len; - compat_caddr_t cfg_data; - compat_caddr_t cfg_cmd; -}; - -#define VIDIOC_MSM_VFE_REG_CFG_COMPAT \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2_32) -#endif /* CONFIG_COMPAT */ - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client) -{ - int rc = 0; - mutex_lock(&bandwidth_mgr_mutex); - isp_bandwidth_mgr.client_info[client].active = 1; - if (isp_bandwidth_mgr.use_count++) { - mutex_unlock(&bandwidth_mgr_mutex); - return rc; - } - isp_bandwidth_mgr.bus_client = - msm_bus_scale_register_client(&msm_isp_bus_client_pdata); - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s: client register failed\n", __func__); - mutex_unlock(&bandwidth_mgr_mutex); - return -EINVAL; - } - - isp_bandwidth_mgr.bus_vector_active_idx = 1; - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - -#ifdef CAMERA_BOOST - if (!bus_client) { - bus_client = msm_bus_scale_register_client(&bus_client_pdata); - msm_bus_scale_client_update_request(bus_client, 1); - } -#endif - - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib) -{ - int i; - struct msm_bus_paths *path; - mutex_lock(&bandwidth_mgr_mutex); - if (!isp_bandwidth_mgr.use_count || - !isp_bandwidth_mgr.bus_client) { - pr_err("%s:error bandwidth manager inactive use_cnt:%d bus_clnt:%d\n", - __func__, isp_bandwidth_mgr.use_count, - isp_bandwidth_mgr.bus_client); - return -EINVAL; - } - - isp_bandwidth_mgr.client_info[client].ab = ab; - isp_bandwidth_mgr.client_info[client].ib = ib; - ALT_VECTOR_IDX(isp_bandwidth_mgr.bus_vector_active_idx); - path = - &(msm_isp_bus_client_pdata.usecase[ - isp_bandwidth_mgr.bus_vector_active_idx]); - path->vectors[0].ab = MSM_ISP_MIN_AB; - path->vectors[0].ib = MSM_ISP_MIN_IB; - for (i = 0; i < MAX_ISP_CLIENT; i++) { - if (isp_bandwidth_mgr.client_info[i].active) { - path->vectors[0].ab += - isp_bandwidth_mgr.client_info[i].ab; - path->vectors[0].ib += - isp_bandwidth_mgr.client_info[i].ib; - } - } - /* All the clients combined i.e. VFE + CPP should use at least - minimum recommended bandwidth */ - if (path->vectors[0].ib < MSM_MIN_REQ_VFE_CPP_BW) - path->vectors[0].ib = MSM_MIN_REQ_VFE_CPP_BW; - msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client) -{ - mutex_lock(&bandwidth_mgr_mutex); - memset(&isp_bandwidth_mgr.client_info[client], 0, - sizeof(struct msm_isp_bandwidth_info)); - if (--isp_bandwidth_mgr.use_count) { - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s:%d error: bus client invalid\n", __func__, __LINE__); - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, 0); - msm_bus_scale_unregister_client(isp_bandwidth_mgr.bus_client); - -#ifdef CAMERA_BOOST - msm_bus_scale_client_update_request(bus_client, 0); - msm_bus_scale_unregister_client(bus_client); - bus_client = 0; -#endif - - isp_bandwidth_mgr.bus_client = 0; - mutex_unlock(&bandwidth_mgr_mutex); -} - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern) -{ - switch (frame_skip_pattern) { - case NO_SKIP: - case EVERY_2FRAME: - case EVERY_3FRAME: - case EVERY_4FRAME: - case EVERY_5FRAME: - case EVERY_6FRAME: - case EVERY_7FRAME: - case EVERY_8FRAME: - return frame_skip_pattern + 1; - case EVERY_16FRAME: - return 16; - break; - case EVERY_32FRAME: - return 32; - break; - case SKIP_ALL: - return 1; - default: - return 1; - } - return 1; -} - -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info) -{ - uint32_t count; - int i, rc; - uint32_t rates[VFE_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - ISP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > VFE_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - VFE_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(vfe_clk_info[i].clk_name)); - ISP_DBG("clock-names[%d] = %s\n", i, vfe_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - vfe_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - ISP_DBG("clk_rate[%d] = %ld\n", i, vfe_clk_info[i].clk_rate); - } - vfe_dev->num_clk = count; - return 0; -} - -static inline void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp) -{ - struct timespec ts; - ktime_get_ts(&ts); - time_stamp->buf_time.tv_sec = ts.tv_sec; - time_stamp->buf_time.tv_usec = ts.tv_nsec/1000; - do_gettimeofday(&(time_stamp->event_time)); -} - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - rc = v4l2_event_subscribe(fh, sub, MAX_ISP_V4l2_EVENTS, NULL); - if (rc == 0) { - if (sub->type == V4L2_EVENT_ALL) { - int i; - - vfe_dev->axi_data.event_mask = 0; - for (i = 0; i < ISP_EVENT_MAX; i++) - vfe_dev->axi_data.event_mask |= (1 << i); - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask |= (1 << event_idx); - } - } - return rc; -} - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - - rc = v4l2_event_unsubscribe(fh, sub); - if (sub->type == V4L2_EVENT_ALL) { - vfe_dev->axi_data.event_mask = 0; - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask &= ~(1 << event_idx); - } - return rc; -} - -static int msm_isp_get_max_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int clk_idx = 0; - unsigned long max_value = ~0; - long round_rate = 0; - - if (!vfe_dev || !rate) { - pr_err("%s:%d failed: vfe_dev %pK rate %pK\n", __func__, __LINE__, - vfe_dev, rate); - return -EINVAL; - } - - *rate = 0; - if (!vfe_dev->hw_info) { - pr_err("%s:%d failed: vfe_dev->hw_info %pK\n", __func__, - __LINE__, vfe_dev->hw_info); - return -EINVAL; - } - - clk_idx = vfe_dev->hw_info->vfe_clk_idx; - if (clk_idx >= vfe_dev->num_clk) { - pr_err("%s:%d failed: clk_idx %d max array size %d\n", - __func__, __LINE__, clk_idx, - vfe_dev->num_clk); - return -EINVAL; - } - - round_rate = clk_round_rate(vfe_dev->vfe_clk[clk_idx], max_value); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return -EINVAL; - } - - *rate = round_rate; - return 0; -} - -static int msm_isp_set_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int rc = 0; - int clk_idx = vfe_dev->hw_info->vfe_clk_idx; - long round_rate = - clk_round_rate(vfe_dev->vfe_clk[clk_idx], *rate); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return round_rate; - } - - rc = clk_set_rate(vfe_dev->vfe_clk[clk_idx], round_rate); - if (rc < 0) { - pr_err("%s: Vfe set rate error\n", __func__); - return rc; - } - *rate = round_rate; - return 0; -} - -int msm_isp_cfg_pix(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - pr_err("%s: pixel path is active\n", __func__); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux = - input_cfg->d.pix_cfg.input_mux; - vfe_dev->axi_data.src_info[VFE_PIX_0].width = - input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; - - rc = msm_isp_set_clk_rate(vfe_dev, - &vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock); - if (rc < 0) { - pr_err("%s: clock set rate failed\n", __func__); - return rc; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = - input_cfg->d.pix_cfg.input_format; - - vfe_dev->hw_info->vfe_ops.core_ops.cfg_camif( - vfe_dev, &input_cfg->d.pix_cfg); - return rc; -} - -int msm_isp_cfg_rdi(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[input_cfg->input_src].active) { - pr_err("%s: RAW%d path is active\n", __func__, - input_cfg->input_src - VFE_RAW_0); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[input_cfg->input_src].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->hw_info->vfe_ops.core_ops.cfg_rdi_reg( - vfe_dev, &input_cfg->d.rdi_cfg, input_cfg->input_src); - return rc; -} - -int msm_isp_cfg_input(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_input_cfg *input_cfg = arg; - - switch (input_cfg->input_src) { - case VFE_PIX_0: - rc = msm_isp_cfg_pix(vfe_dev, input_cfg); - break; - case VFE_RAW_0: - case VFE_RAW_1: - case VFE_RAW_2: - rc = msm_isp_cfg_rdi(vfe_dev, input_cfg); - break; - default: - pr_err("%s: Invalid input source\n", __func__); - rc = -EINVAL; - } - return rc; -} - -static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - - /* use real time mutex for hard real-time ioctls such as - * buffer operations and register updates. - * Use core mutex for other ioctls that could take - * longer time to complete such as start/stop ISP streams - * which blocks until the hardware start/stop streaming - */ - ISP_DBG("%s cmd: %d\n", __func__, _IOC_TYPE(cmd)); - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_VFE_REG_LIST_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd_list(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_BUF: - case VIDIOC_MSM_ISP_ENQUEUE_BUF: - case VIDIOC_MSM_ISP_RELEASE_BUF: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_buf_cmd(vfe_dev->buf_mgr, cmd, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_INPUT_CFG: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_input(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_SET_SRC_STATE: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_set_src_state(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_REQUEST_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_UPDATE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_update_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case MSM_SD_SHUTDOWN: - while (vfe_dev->vfe_open_cnt != 0) - msm_isp_close_node(sd, NULL); - break; - - default: - pr_err_ratelimited("%s: Invalid ISP command\n", __func__); - rc = -EINVAL; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_isp_ioctl_compat(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - void __user *up; - if (is_compat_task()) { - up = compat_ptr((unsigned long)arg); - arg = up; - } - - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG_COMPAT: { - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - struct msm_vfe_cfg_cmd2 proc_cmd; - struct msm_vfe_cfg_cmd2_32 *proc_cmd_ptr32; - mutex_lock(&vfe_dev->realtime_mutex); - proc_cmd_ptr32 = (struct msm_vfe_cfg_cmd2_32 *) - compat_ptr((unsigned long)arg); - proc_cmd.num_cfg = proc_cmd_ptr32->num_cfg; - proc_cmd.cmd_len = proc_cmd_ptr32->cmd_len; - proc_cmd.cfg_data = compat_ptr(proc_cmd_ptr32->cfg_data); - proc_cmd.cfg_cmd = compat_ptr(proc_cmd_ptr32->cfg_cmd); - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - default: - return msm_isp_ioctl_unlocked(sd, cmd, arg); - } - - return rc; -} - -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_compat(sd, cmd, arg); -} -#else /* CONFIG_COMPAT */ -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_unlocked(sd, cmd, arg); -} -#endif /* CONFIG_COMPAT */ - -static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd, - uint32_t *cfg_data, uint32_t cmd_len) -{ - if (!vfe_dev || !reg_cfg_cmd) { - pr_err("%s:%d failed: vfe_dev %pK reg_cfg_cmd %pK\n", __func__, - __LINE__, vfe_dev, reg_cfg_cmd); - return -EINVAL; - } - if ((reg_cfg_cmd->cmd_type != VFE_CFG_MASK) && - (!cfg_data || !cmd_len)) { - pr_err("%s:%d failed: cmd type %d cfg_data %pK cmd_len %d\n", - __func__, __LINE__, reg_cfg_cmd->cmd_type, cfg_data, - cmd_len); - return -EINVAL; - } - - /* Validate input parameters */ - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: - case VFE_READ: - case VFE_WRITE_MB: { - if ((reg_cfg_cmd->u.rw_info.reg_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.reg_offset + - reg_cfg_cmd->u.rw_info.len) > - resource_size(vfe_dev->vfe_mem))) { - pr_err("%s:%d reg_offset %d len %d res %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.reg_offset, - reg_cfg_cmd->u.rw_info.len, - (uint32_t)resource_size(vfe_dev->vfe_mem)); - return -EINVAL; - } - - if ((reg_cfg_cmd->u.rw_info.cmd_data_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.cmd_data_offset + - reg_cfg_cmd->u.rw_info.len) > cmd_len)) { - pr_err("%s:%d cmd_data_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.cmd_data_offset, - reg_cfg_cmd->u.rw_info.len, cmd_len); - return -EINVAL; - } - break; - } - - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT || - reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - if ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset <= - reg_cfg_cmd->u.dmi_info.lo_tbl_offset) || - (reg_cfg_cmd->u.dmi_info.hi_tbl_offset - - reg_cfg_cmd->u.dmi_info.lo_tbl_offset != - (sizeof(uint32_t)))) { - pr_err("%s:%d hi %d lo %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset); - return -EINVAL; - } - if (reg_cfg_cmd->u.dmi_info.len <= sizeof(uint32_t)) { - pr_err("%s:%d len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.len); - return -EINVAL; - } - if (((UINT_MAX - - reg_cfg_cmd->u.dmi_info.hi_tbl_offset) < - (reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t))) || - ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset + - reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t)) > cmd_len)) { - pr_err("%s:%d hi_tbl_offset %d len %d cmd %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - } - if ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset > - (UINT_MAX - reg_cfg_cmd->u.dmi_info.len)) || - ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset + - reg_cfg_cmd->u.dmi_info.len) > cmd_len)) { - pr_err("%s:%d lo_tbl_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.lo_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - break; - } - - default: - break; - } - - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: { - msm_camera_io_memcpy(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_WRITE_MB: { - msm_camera_io_memcpy_mb(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_CFG_MASK: { - uint32_t temp; - if ((UINT_MAX - sizeof(temp) < - reg_cfg_cmd->u.mask_info.reg_offset) || - (resource_size(vfe_dev->vfe_mem) < - reg_cfg_cmd->u.mask_info.reg_offset + - sizeof(temp))) { - pr_err("%s: VFE_CFG_MASK: Invalid length\n", __func__); - return -EINVAL; - } - temp = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - - temp &= ~reg_cfg_cmd->u.mask_info.mask; - temp |= reg_cfg_cmd->u.mask_info.val; - msm_camera_io_w(temp, vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - break; - } - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = *lo_tbl_ptr++; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_16BIT) { - lo_val1 = lo_val & 0x0000FFFF; - lo_val = (lo_val & 0xFFFF0000)>>16; - msm_camera_io_w(lo_val1, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } else if (reg_cfg_cmd->cmd_type == - VFE_WRITE_DMI_64BIT) { - lo_tbl_ptr++; - hi_val = *hi_tbl_ptr; - hi_tbl_ptr = hi_tbl_ptr + 2; - msm_camera_io_w(hi_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - } - msm_camera_io_w(lo_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } - break; - } - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_16BIT) { - lo_val1 = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - lo_val |= lo_val1 << 16; - } - *lo_tbl_ptr++ = lo_val; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - *hi_tbl_ptr = hi_val; - hi_tbl_ptr += 2; - lo_tbl_ptr++; - } - } - break; - } - case VFE_HW_UPDATE_LOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t update_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id; - if (vfe_dev->axi_data.frame_id[session_id] != *cfg_data - || update_id == *cfg_data) { - pr_err("hw update lock failed,acquire id %u\n", - *cfg_data); - pr_err("hw update lock failed,current id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - pr_err("hw update lock failed,last id %u\n", - update_id); - return -EINVAL; - } - break; - } - case VFE_HW_UPDATE_UNLOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - if (vfe_dev->axi_data.frame_id[session_id] - != *cfg_data) { - pr_err("hw update across frame boundary,begin id %u\n", - *cfg_data); - pr_err("hw update across frame boundary,end id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - } - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id = - vfe_dev->axi_data.frame_id[session_id]; - break; - } - case VFE_READ: { - int i; - uint32_t *data_ptr = cfg_data + - reg_cfg_cmd->u.rw_info.cmd_data_offset/4; - for (i = 0; i < reg_cfg_cmd->u.rw_info.len/4; i++) { - if ((data_ptr < cfg_data) || - (UINT_MAX / sizeof(*data_ptr) < - (data_ptr - cfg_data)) || - (sizeof(*data_ptr) * (data_ptr - cfg_data) >= - cmd_len)) - return -EINVAL; - *data_ptr++ = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset); - reg_cfg_cmd->u.rw_info.reg_offset += 4; - } - break; - } - case GET_MAX_CLK_RATE: { - int rc = 0; - - if (cmd_len < sizeof(unsigned long)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(unsigned long)); - return -EINVAL; - } - rc = msm_isp_get_max_clk_rate(vfe_dev, - (unsigned long *)cfg_data); - if (rc < 0) { - pr_err("%s:%d failed: rc %d\n", __func__, __LINE__, rc); - return -EINVAL; - } - break; - } - case GET_ISP_ID: { - uint32_t *isp_id = NULL; - - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %u\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - - isp_id = (uint32_t *)cfg_data; - *isp_id = vfe_dev->pdev->id; - break; - } - case SET_WM_UB_SIZE: { - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - vfe_dev->vfe_ub_size = *cfg_data; - break; - } - } - return 0; -} - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_cfg_cmd2 *proc_cmd = arg; - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd; - uint32_t *cfg_data = NULL; - - if (!proc_cmd->num_cfg) { - pr_err("%s: Passed num_cfg as 0\n", __func__); - return -EINVAL; - } - - reg_cfg_cmd = kzalloc(sizeof(struct msm_vfe_reg_cfg_cmd)* - proc_cmd->num_cfg, GFP_KERNEL); - if (!reg_cfg_cmd) { - pr_err("%s: reg_cfg alloc failed\n", __func__); - rc = -ENOMEM; - goto reg_cfg_failed; - } - - if (copy_from_user(reg_cfg_cmd, - (void __user *)(proc_cmd->cfg_cmd), - sizeof(struct msm_vfe_reg_cfg_cmd) * proc_cmd->num_cfg)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - - if (proc_cmd->cmd_len > 0) { - cfg_data = kzalloc(proc_cmd->cmd_len, GFP_KERNEL); - if (!cfg_data) { - pr_err("%s: cfg_data alloc failed\n", __func__); - rc = -ENOMEM; - goto cfg_data_failed; - } - - if (copy_from_user(cfg_data, - (void __user *)(proc_cmd->cfg_data), - proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - } - - //pr_err("%s: platform_id=%u, kernel_id=%u\n", __func__,proc_cmd->frame_id, vfe_dev->frame_id); - if( (vfe_dev->frame_id == proc_cmd->frame_id && vfe_dev->eof_event_occur != 1) - || proc_cmd->frame_id == 0) { - for (i = 0; i < proc_cmd->num_cfg; i++) - msm_isp_send_hw_cmd(vfe_dev, ®_cfg_cmd[i], cfg_data, proc_cmd->cmd_len); - } else{ - rc = MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR; - pr_err("%s: skip hw update, platform_id=%u, kernel_id=%u, eof_event_occur=%u\n", - __func__,proc_cmd->frame_id, vfe_dev->frame_id, vfe_dev->eof_event_occur); - } - - if (copy_to_user(proc_cmd->cfg_data, - cfg_data, proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - -copy_cmd_failed: - kfree(cfg_data); -cfg_data_failed: - kfree(reg_cfg_cmd); -reg_cfg_failed: - return rc; -} - -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_cfg_cmd_list *proc_cmd = - (struct msm_vfe_cfg_cmd_list *)arg; - struct msm_vfe_cfg_cmd_list cmd, cmd_next; - - if (!vfe_dev || !arg) { - pr_err("%s:%d failed: vfe_dev %pK arg %pK", __func__, __LINE__, - vfe_dev, arg); - return -EINVAL; - } - - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd->cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = *proc_cmd; - - while (cmd.next) { - if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list)) { - pr_err("%s:%d failed: next size %u != expected %zu\n", - __func__, __LINE__, cmd.next_size, - sizeof(struct msm_vfe_cfg_cmd_list)); - break; - } - if (copy_from_user(&cmd_next, (void __user *)cmd.next, - sizeof(struct msm_vfe_cfg_cmd_list))) { - rc = -EFAULT; - continue; - } - - rc = msm_isp_proc_cmd(vfe_dev, &cmd_next.cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = cmd_next; - } - return rc; -} - -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t event_type, - struct msm_isp_event_data *event_data) -{ - struct v4l2_event isp_event; - memset(&isp_event, 0, sizeof(struct v4l2_event)); - isp_event.id = 0; - isp_event.type = event_type; - memcpy(&isp_event.u.data[0], event_data, - sizeof(struct msm_isp_event_data)); - v4l2_event_queue(vfe_dev->subdev.sd.devnode, &isp_event); - return 0; -} - -#define CAL_WORD(width, M, N) ((width * M + N - 1) / N) - -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line) -{ - int val = -1; - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - val = CAL_WORD(pixel_per_line, 5, 32); - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - val = CAL_WORD(pixel_per_line, 3, 16); - break; - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - val = CAL_WORD(pixel_per_line, 1, 6); - break; - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - val = CAL_WORD(pixel_per_line, 1, 5); - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - val = CAL_WORD(pixel_per_line, 2, 8); - break; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return val; -} - -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - return MIPI; - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - return QCOM; - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return -EINVAL; -} - -int msm_isp_get_bit_per_pixel(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_Y4: - return 4; - case V4L2_PIX_FMT_Y6: - return 6; - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_YVU410: - case V4L2_PIX_FMT_YVU420: - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YYUV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_YUV422P: - case V4L2_PIX_FMT_YUV411P: - case V4L2_PIX_FMT_Y41P: - case V4L2_PIX_FMT_YUV444: - case V4L2_PIX_FMT_YUV555: - case V4L2_PIX_FMT_YUV565: - case V4L2_PIX_FMT_YUV32: - case V4L2_PIX_FMT_YUV410: - case V4L2_PIX_FMT_YUV420: - case V4L2_PIX_FMT_GREY: - case V4L2_PIX_FMT_PAL8: - case V4L2_PIX_FMT_UV8: - case MSM_V4L2_PIX_FMT_META: - return 8; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_Y10: - case V4L2_PIX_FMT_Y10BPACK: - return 10; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_Y12: - return 12; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - case V4L2_PIX_FMT_Y16: - return 16; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); -#if defined(CONFIG_SR200PC20) - return 8; -#else - return -EINVAL; -#endif - } -} - -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev) -{ - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - error_info->info_dump_frame_count++; - if (error_info->info_dump_frame_count == 0) - error_info->info_dump_frame_count++; -} - -void msm_isp_process_error_info(struct vfe_device *vfe_dev) -{ - int i; - uint8_t num_stats_type = - vfe_dev->hw_info->stats_hw_info->num_stats_type; - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - static DEFINE_RATELIMIT_STATE(rs, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - static DEFINE_RATELIMIT_STATE(rs_stats, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - - if (error_info->error_count == 1 || - !(error_info->info_dump_frame_count % 100)) { - vfe_dev->hw_info->vfe_ops.core_ops. - process_error_status(vfe_dev); - error_info->error_mask0 = 0; - error_info->error_mask1 = 0; - error_info->camif_status = 0; - error_info->violation_status = 0; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (error_info->stream_framedrop_count[i] != 0 && - __ratelimit(&rs)) { - pr_err("%s: Stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stream_framedrop_count[i]); - error_info->stream_framedrop_count[i] = 0; - } - } - for (i = 0; i < num_stats_type; i++) { - if (error_info->stats_framedrop_count[i] != 0 && - __ratelimit(&rs_stats)) { - pr_err("%s: Stats stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stats_framedrop_count[i]); - error_info->stats_framedrop_count[i] = 0; - } - } - } -} - -static inline void msm_isp_update_error_info(struct vfe_device *vfe_dev, - uint32_t error_mask0, uint32_t error_mask1) -{ - vfe_dev->error_info.error_mask0 |= error_mask0; - vfe_dev->error_info.error_mask1 |= error_mask1; - vfe_dev->error_info.error_count++; -} - -static inline void msm_isp_process_overflow_irq( - struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - uint32_t overflow_mask; - uint32_t halt_restart_mask0, halt_restart_mask1; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - uint8_t cur_stream_cnt = 0; -#endif - /*Mask out all other irqs if recovery is started*/ - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - *irq_status0 &= halt_restart_mask0; - *irq_status1 &= halt_restart_mask1; - return; - } - - /*Check if any overflow bit is set*/ - vfe_dev->hw_info->vfe_ops.core_ops. - get_overflow_mask(&overflow_mask); - overflow_mask &= *irq_status1; - if (overflow_mask) { -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - /* When immediate stop is issued during streamoff and - AXI bridge is halted, if write masters are still - active, then it's possible to get overflow Irq - because WM is still writing pixels into UB, but UB - has no way to write into bus. Since everything is - being stopped anyway, skip the overflow recovery */ - return; - } -#endif - pr_warn("%s: Bus overflow detected: 0x%x\n", - __func__, overflow_mask); - atomic_set(&vfe_dev->error_info.overflow_state, - OVERFLOW_DETECTED); - pr_warn("%s: Start bus overflow recovery\n", __func__); - /*Store current IRQ mask*/ - vfe_dev->hw_info->vfe_ops.core_ops.get_irq_mask(vfe_dev, - &vfe_dev->error_info.overflow_recover_irq_mask0, - &vfe_dev->error_info.overflow_recover_irq_mask1); - /*Stop CAMIF Immediately*/ - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - /*Halt the hardware & Clear all other IRQ mask*/ - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, HALT_REQUESTED); - *irq_status0 = 0; - *irq_status1 = 0; - } -} - -static inline void msm_isp_reset_burst_count( - struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_stream_request_cmd framedrop_info; - memset(&framedrop_info, 0, sizeof(struct msm_vfe_axi_stream_request_cmd)); - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - if (stream_info->stream_type == BURST_STREAM && - stream_info->num_burst_capture != 0) { - framedrop_info.axi_stream_handle = i; - framedrop_info.burst_count = - stream_info->num_burst_capture; - framedrop_info.frame_skip_pattern = - stream_info->frame_skip_pattern; - framedrop_info.init_frame_drop = 0; - msm_isp_calculate_framedrop(&vfe_dev->axi_data, - &framedrop_info); - } - } -} - -static void msm_isp_process_overflow_recovery( - struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - uint32_t halt_restart_mask0, halt_restart_mask1; - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - irq_status0 &= halt_restart_mask0; - irq_status1 &= halt_restart_mask1; - if (irq_status0 == 0 && irq_status1 == 0) - return; - - switch (atomic_read(&vfe_dev->error_info.overflow_state)) { - case HALT_REQUESTED: { - pr_err("%s: Halt done, Restart Pending\n", __func__); - /*Reset the hardware*/ - vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_SOFT, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, - RESTART_REQUESTED); - } - break; - case RESTART_REQUESTED: { - pr_err("%s: Restart done, Resuming\n", __func__); - /*Reset the burst stream frame drop pattern, in the - *case where bus overflow happens during the burstshot, - *the framedrop pattern might be updated after reg update - *to skip all the frames after the burst shot. The burst shot - *might not be completed due to the overflow, so the framedrop - *pattern need to change back to the original settings in order - *to recovr from overflow. - */ - msm_isp_reset_burst_count(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0xFFFFFFFF); - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - break; - case NO_OVERFLOW: - case OVERFLOW_DETECTED: - default: - break; - } -} - -irqreturn_t msm_isp_process_irq(int irq_num, void *data) -{ - unsigned long flags; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - uint32_t irq_status0, irq_status1; - uint32_t error_mask0, error_mask1; - - vfe_dev->hw_info->vfe_ops.irq_ops. - read_irq_status(vfe_dev, &irq_status0, &irq_status1); - if ((irq_status0 == 0) && (irq_status1 == 0)) { - pr_err_ratelimited("%s: irq_status0 & 1 are both 0\n", - __func__); - return IRQ_HANDLED; - } - msm_isp_process_overflow_irq(vfe_dev, - &irq_status0, &irq_status1); - vfe_dev->hw_info->vfe_ops.core_ops. - get_error_mask(&error_mask0, &error_mask1); - error_mask0 &= irq_status0; - error_mask1 &= irq_status1; - irq_status0 &= ~error_mask0; - irq_status1 &= ~error_mask1; - if (!vfe_dev->ignore_error && - ((error_mask0 != 0) || (error_mask1 != 0))) - msm_isp_update_error_info(vfe_dev, error_mask0, error_mask1); - - if ((irq_status0 == 0) && (irq_status1 == 0) && - (!(((error_mask0 != 0) || (error_mask1 != 0)) && - vfe_dev->error_info.error_count == 1))) { - ISP_DBG("%s: irq status 0 and 1 = 0, also error irq hadnled!\n", - __func__); - return IRQ_HANDLED; - } - - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = &vfe_dev->tasklet_queue_cmd[vfe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err_ratelimited("%s: Tasklet queue overflow: %d\n", - __func__, vfe_dev->pdev->id); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vfe_dev->irq_cnt); - } - queue_cmd->vfeInterruptStatus0 = irq_status0; - queue_cmd->vfeInterruptStatus1 = irq_status1; - msm_isp_get_timestamp(&queue_cmd->ts); - queue_cmd->cmd_used = 1; - vfe_dev->taskletq_idx = - (vfe_dev->taskletq_idx + 1) % MSM_VFE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vfe_dev->tasklet_q); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - tasklet_schedule(&vfe_dev->vfe_tasklet); - return IRQ_HANDLED; -} - -void msm_isp_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - struct msm_vfe_irq_ops *irq_ops = &vfe_dev->hw_info->vfe_ops.irq_ops; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct msm_isp_timestamp ts; - uint32_t irq_status0, irq_status1; - while (atomic_read(&vfe_dev->irq_cnt)) { - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vfe_dev->tasklet_q, - struct msm_vfe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vfe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vfe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status0 = queue_cmd->vfeInterruptStatus0; - irq_status1 = queue_cmd->vfeInterruptStatus1; - ts = queue_cmd->ts; - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - pr_err_ratelimited("There is Overflow, kicking up recovery !!!!"); - msm_isp_process_overflow_recovery(vfe_dev, - irq_status0, irq_status1); - continue; - } - ISP_DBG("%s: status0: 0x%x status1: 0x%x\n", - __func__, irq_status0, irq_status1); - irq_ops->process_reset_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_halt_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_camif_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_axi_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_stats_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_reg_update(vfe_dev, - irq_status0, irq_status1, &ts); - msm_isp_process_error_info(vfe_dev); - } -} - -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg) -{ - struct msm_vfe_axi_src_state *src_state = arg; - if (src_state->input_src >= VFE_SRC_MAX) - return -EINVAL; - vfe_dev->axi_data.src_info[src_state->input_src].active = - src_state->src_active; - return 0; -} - -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - long rc; - ISP_DBG("%s\n", __func__); - - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (vfe_dev->vfe_open_cnt++) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) { - pr_err("%s: init hardware failed\n", __func__); - vfe_dev->vfe_open_cnt--; - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EBUSY; - } - - rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_HARD, 1); - if (rc <= 0) { - pr_err("%s: reset timeout\n", __func__); - vfe_dev->vfe_open_cnt--; - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - vfe_dev->vfe_hw_version = msm_camera_io_r(vfe_dev->vfe_base); - ISP_DBG("%s: HW Version: 0x%x\n", __func__, vfe_dev->vfe_hw_version); - - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - - vfe_dev->buf_mgr->ops->buf_mgr_init(vfe_dev->buf_mgr, "msm_isp", 28); - - memset(&vfe_dev->axi_data, 0, sizeof(struct msm_vfe_axi_shared_data)); - memset(&vfe_dev->stats_data, 0, - sizeof(struct msm_vfe_stats_shared_data)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - vfe_dev->axi_data.hw_info = vfe_dev->hw_info->axi_hw_info; - vfe_dev->taskletq_idx = 0; - vfe_dev->vt_enable = 0; - vfe_dev->p_avtimer_lsw = NULL; - vfe_dev->p_avtimer_msw = NULL; - vfe_dev->p_avtimer_ctl = NULL; - vfe_dev->avtimer_scaler = 1; /*No scaling*/ - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_end_avtimer(void) -{ - avcs_core_disable_power_collapse(0); -} -#else -void msm_isp_end_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - long rc; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - ISP_DBG("%s\n", __func__); - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (!vfe_dev->vfe_open_cnt) { - pr_err("%s invalid state open cnt %d\n", __func__, - vfe_dev->vfe_open_cnt); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - - if (--vfe_dev->vfe_open_cnt) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - if (rc <= 0) - pr_err("%s: halt timeout rc=%ld\n", __func__, rc); - - vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr); - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - if (vfe_dev->vt_enable) { - iounmap(vfe_dev->p_avtimer_lsw); - iounmap(vfe_dev->p_avtimer_msw); - iounmap(vfe_dev->p_avtimer_ctl); - msm_isp_end_avtimer(); - vfe_dev->vt_enable = 0; - vfe_dev->avtimer_scaler = 1; - } - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.h b/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.h deleted file mode 100644 index da1a968d8be6..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/isp/msm_isp_util.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_UTIL_H__ -#define __MSM_ISP_UTIL_H__ - -#include "msm_isp.h" -#include "../include/soc/qcom/camera2.h" - -/* #define CONFIG_MSM_ISP_DBG 1 */ - -#ifdef CONFIG_MSM_ISP_DBG -#define ISP_DBG(fmt, args...) printk(fmt, ##args) -#else -#define ISP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define ALT_VECTOR_IDX(x) {x = 3 - x; } -struct msm_isp_bandwidth_info { - uint32_t active; - uint64_t ab; - uint64_t ib; -}; - -enum msm_isp_hw_client { - ISP_VFE0, - ISP_VFE1, - ISP_CPP, - MAX_ISP_CLIENT, -}; - -struct msm_isp_bandwidth_mgr { - uint32_t bus_client; - uint32_t bus_vector_active_idx; - uint32_t use_count; - struct msm_isp_bandwidth_info client_info[MAX_ISP_CLIENT]; -}; - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern); - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client); -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib); -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client); - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg); -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t type, struct msm_isp_event_data *event_data); -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line); -int msm_isp_get_bit_per_pixel(uint32_t output_format); -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format); -irqreturn_t msm_isp_process_irq(int irq_num, void *data); -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg); -void msm_isp_do_tasklet(unsigned long data); -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev); -void msm_isp_process_error_info(struct vfe_device *vfe_dev); -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -long msm_isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg); -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg); -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info); - -#endif /* __MSM_ISP_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/ispif/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/ispif/Makefile deleted file mode 100644 index 38a22a4bef8f..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/ispif/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_ispif.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.c b/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.c deleted file mode 100644 index a277c8209c9b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.c +++ /dev/null @@ -1,1368 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_isp.h" - -#include "msm_ispif.h" -#include "msm.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" - -#ifdef CONFIG_MSM_ISPIF_V1 -#include "msm_ispif_hwreg_v1.h" -#else -#include "msm_ispif_hwreg_v2.h" -#endif - -#define V4L2_IDENT_ISPIF 50001 -#define MSM_ISPIF_DRV_NAME "msm_ispif" - -#define ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY 0x00 -#define ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY 0x01 -#define ISPIF_INTF_CMD_DISABLE_IMMEDIATELY 0x02 - -#define ISPIF_TIMEOUT_SLEEP_US 1000 -#define ISPIF_TIMEOUT_ALL_US 1000000 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static void msm_ispif_io_dump_reg(struct ispif_device *ispif) -{ - if (!ispif->enb_dump_reg) - return; - msm_camera_io_dump(ispif->base, 0x250); -} - - -static inline int msm_ispif_is_intf_valid(uint32_t csid_version, - enum msm_ispif_vfe_intf intf_type) -{ - return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) || - (intf_type >= VFE_MAX)) ? false : true; -} - -static struct msm_cam_clk_info ispif_8626_reset_clk_info[] = { - {"ispif_ahb_clk", NO_SET_RATE}, - {"camss_top_ahb_clk", NO_SET_RATE}, - {"csi0_ahb_clk", NO_SET_RATE}, - {"csi0_src_clk", NO_SET_RATE}, - {"csi0_phy_clk", NO_SET_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_ahb_clk", NO_SET_RATE}, - {"csi1_src_clk", NO_SET_RATE}, - {"csi1_phy_clk", NO_SET_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"camss_vfe_vfe_clk", NO_SET_RATE}, - {"camss_csi_vfe_clk", NO_SET_RATE}, -}; - -static struct msm_cam_clk_info ispif_8974_ahb_clk_info[ISPIF_CLK_INFO_MAX]; - -static struct msm_cam_clk_info ispif_8974_reset_clk_info[] = { - {"csi0_src_clk", INIT_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_src_clk", INIT_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"csi2_src_clk", INIT_RATE}, - {"csi2_clk", NO_SET_RATE}, - {"csi2_pix_clk", NO_SET_RATE}, - {"csi2_rdi_clk", NO_SET_RATE}, - {"csi3_src_clk", INIT_RATE}, - {"csi3_clk", NO_SET_RATE}, - {"csi3_pix_clk", NO_SET_RATE}, - {"csi3_rdi_clk", NO_SET_RATE}, - {"vfe0_clk_src", INIT_RATE}, - {"camss_vfe_vfe0_clk", NO_SET_RATE}, - {"camss_csi_vfe0_clk", NO_SET_RATE}, - {"vfe1_clk_src", INIT_RATE}, - {"camss_vfe_vfe1_clk", NO_SET_RATE}, - {"camss_csi_vfe1_clk", NO_SET_RATE}, -}; - -static int msm_ispif_reset_hw(struct ispif_device *ispif) -{ - int rc = 0; - long timeout = 0; - struct clk *reset_clk[ARRAY_SIZE(ispif_8974_reset_clk_info)]; - struct clk *reset_clk1[ARRAY_SIZE(ispif_8626_reset_clk_info)]; - ispif->clk_idx = 0; - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 1); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } else { - /* This is set when device is 8x26 */ - ispif->clk_idx = 2; - } - } else { - /* This is set when device is 8974 */ - ispif->clk_idx = 1; - } - - init_completion(&ispif->reset_complete[VFE0]); - if (ispif->hw_num_isps > 1) - init_completion(&ispif->reset_complete[VFE1]); - - /* initiate reset of ISPIF */ - msm_camera_io_w(ISPIF_RST_CMD_MASK, - ispif->base + ISPIF_RST_CMD_ADDR); - if (ispif->hw_num_isps > 1) - msm_camera_io_w(ISPIF_RST_CMD_1_MASK, - ispif->base + ISPIF_RST_CMD_1_ADDR); - - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE0], msecs_to_jiffies(500)); - CDBG("%s: VFE0 done\n", __func__); - - if (timeout <= 0) { - pr_err("%s: VFE0 reset wait timeout\n", __func__); - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) - pr_err("%s: VFE0 reset wait timeout\n", - __func__); - } - return -ETIMEDOUT; - } - - if (ispif->hw_num_isps > 1) { - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE1], - msecs_to_jiffies(500)); - CDBG("%s: VFE1 done\n", __func__); - if (timeout <= 0) { - pr_err("%s: VFE1 reset wait timeout\n", __func__); - msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - return -ETIMEDOUT; - } - } - - if (ispif->clk_idx == 1) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - if (ispif->clk_idx == 2) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - return rc; -} - -int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[ISPIF_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CDBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - count = ISPIF_AHB_CLK_INFO; - if (count > ISPIF_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - ISPIF_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(ispif_8974_ahb_clk_info[i].clk_name)); - CDBG("clock-names[%d] = %s\n", - i, ispif_8974_ahb_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - ispif_8974_ahb_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - CDBG("clk_rate[%d] = %ld\n", i, - ispif_8974_ahb_clk_info[i].clk_rate); - } - ispif_dev->num_clk = count; - return 0; -} - -static int msm_ispif_clk_ahb_enable(struct ispif_device *ispif, int enable) -{ - int rc = 0; - - if (ispif->csid_version < CSID_VERSION_V30) { - /* Older ISPIF versiond don't need ahb clokc */ - return 0; - } - - rc = msm_ispif_get_ahb_clk_info(ispif, ispif->pdev); - if (rc < 0) { - pr_err("%s: msm_isp_get_clk_info() failed", __func__); - return -EFAULT; - } - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_ahb_clk_info, ispif->ahb_clk, - ispif->num_clk, enable); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } - - return rc; -} - -static int msm_ispif_reset(struct ispif_device *ispif) -{ - int rc = 0; - int i; - - BUG_ON(!ispif); - - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - for (i = 0; i < ispif->vfe_info.num_vfe; i++) { - - msm_camera_io_w(1 << PIX0_LINE_BUF_EN_BIT, - ispif->base + ISPIF_VFE_m_CTRL_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_1(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_2(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(i)); - - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_INPUT_SEL(i)); - - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(i)); - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(i)); - pr_debug("%s: base %lx", __func__, (unsigned long)ispif->base); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 2)); - - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 1)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static int msm_ispif_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_ISPIF; - chip->revision = 0; - return 0; -} - -static void msm_ispif_sel_csid_core(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_INPUT_SEL(vfe_intf)); - switch (intftype) { - case PIX0: - data &= ~(BIT(1) | BIT(0)); - data |= csid; - break; - case RDI0: - data &= ~(BIT(5) | BIT(4)); - data |= (csid << 4); - break; - case PIX1: - data &= ~(BIT(9) | BIT(8)); - data |= (csid << 8); - break; - case RDI1: - data &= ~(BIT(13) | BIT(12)); - data |= (csid << 12); - break; - case RDI2: - data &= ~(BIT(21) | BIT(20)); - data |= (csid << 20); - break; - } - - msm_camera_io_w_mb(data, ispif->base + - ISPIF_VFE_m_INPUT_SEL(vfe_intf)); -} - -static void msm_ispif_enable_crop(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf, uint16_t start_pixel, - uint16_t end_pixel) -{ - uint32_t data; - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - data |= (1 << (intftype + 7)); - if (intftype == PIX0) - data |= 1 << PIX0_LINE_BUF_EN_BIT; - msm_camera_io_w(data, - ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - - if (intftype == PIX0) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 0)); - else if (intftype == PIX1) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 1)); - else { - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } -} - -static void msm_ispif_enable_intf_cids(struct ispif_device *ispif, - uint8_t intftype, uint16_t cid_mask, uint8_t vfe_intf, uint8_t enable) -{ - uint32_t intf_addr, data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - switch (intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } - - data = msm_camera_io_r(ispif->base + intf_addr); - if (enable) - data |= cid_mask; - else - data &= ~cid_mask; - msm_camera_io_w_mb(data, ispif->base + intf_addr); -} - -static int msm_ispif_validate_intf_status(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf) -{ - int rc = 0; - uint32_t data = 0; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0)); - break; - case RDI0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0)); - break; - case PIX1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI2: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2)); - break; - } - if ((data & 0xf) != 0xf) - rc = -EBUSY; - return rc; -} - -static void msm_ispif_select_clk_mux(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data = 0; - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf << (vfe_intf * 8)); - data |= (csid << (vfe_intf * 8)); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI0: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (vfe_intf * 12)); - data |= (csid << (vfe_intf * 12)); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case PIX1: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf0 << (vfe_intf * 8)); - data |= (csid << (4 + (vfe_intf * 8))); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI1: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (4 + (vfe_intf * 12))); - data |= (csid << (4 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case RDI2: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (8 + (vfe_intf * 12))); - data |= (csid << (8 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - } - CDBG("%s intftype %d data %x\n", __func__, intftype, data); - mb(); - return; -} - -static uint16_t msm_ispif_get_cids_mask_from_cfg( - struct msm_ispif_params_entry *entry) -{ - int i; - uint16_t cids_mask = 0; - - BUG_ON(!entry); - - for (i = 0; i < entry->num_cids; i++) - cids_mask |= (1 << entry->cids[i]); - - return cids_mask; -} - -static int msm_ispif_config(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0, i = 0; - uint16_t cid_mask; - enum msm_ispif_intftype intftype; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, - vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - msm_camera_io_w_mb(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - } - - for (i = 0; i < params->num; i++) { - intftype = params->entries[i].intftype; - - vfe_intf = params->entries[i].vfe_intf; - - CDBG("%s intftype %x, vfe_intf %d, csid %d\n", __func__, - intftype, vfe_intf, params->entries[i].csid); - - if ((intftype >= INTF_MAX) || - (vfe_intf >= ispif->vfe_info.num_vfe) || - (ispif->csid_version <= CSID_VERSION_V22 && - (vfe_intf > VFE0))) { - pr_err("%s: VFEID %d and CSID version %d mismatch\n", - __func__, vfe_intf, ispif->csid_version); - return -EINVAL; - } - - if (ispif->csid_version >= CSID_VERSION_V30) - msm_ispif_select_clk_mux(ispif, intftype, - params->entries[i].csid, vfe_intf); - - rc = msm_ispif_validate_intf_status(ispif, intftype, vfe_intf); - if (rc) { - pr_err("%s:validate_intf_status failed, rc = %d\n", - __func__, rc); - return rc; - } - - msm_ispif_sel_csid_core(ispif, intftype, - params->entries[i].csid, vfe_intf); - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, intftype, - cid_mask, vfe_intf, 1); - if (params->entries[i].crop_enable) - msm_ispif_enable_crop(ispif, intftype, vfe_intf, - params->entries[i].crop_start_pixel, - params->entries[i].crop_end_pixel); - } - - for (vfe_intf = 0; vfe_intf < 2; vfe_intf++) { - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(vfe_intf)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static void msm_ispif_intf_cmd(struct ispif_device *ispif, uint32_t cmd_bits, - struct msm_ispif_param_data *params) -{ - uint8_t vc; - int i, k; - enum msm_ispif_intftype intf_type; - enum msm_ispif_cid cid; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - if (params->entries[i].num_cids > MAX_CID_CH) { - pr_err("%s: out of range of cid_num %d\n", - __func__, params->entries[i].num_cids); - return; - } - } - - for (i = 0; i < params->num; i++) { - intf_type = params->entries[i].intftype; - vfe_intf = params->entries[i].vfe_intf; - for (k = 0; k < params->entries[i].num_cids; k++) { - cid = params->entries[i].cids[k]; - vc = cid / 4; - if (intf_type == RDI2) { - /* zero out two bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 &= - ~(0x3 << (vc * 2 + 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 |= - (cmd_bits << (vc * 2 + 8)); - } else { - /* zero 2 bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd &= - ~(0x3 << (vc * 2 + intf_type * 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd |= - (cmd_bits << (vc * 2 + intf_type * 8)); - } - } - - /* cmd for PIX0, PIX1, RDI0, RDI1 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(vfe_intf)); - - /* cmd for RDI2 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd1 != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd1, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(vfe_intf)); - } -} - -static int msm_ispif_stop_immediately(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_DISABLE_IMMEDIATELY, params); - - /* after stop the interface we need to unmask the CID enable bits */ - for (i = 0; i < params->num; i++) { - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, params->entries[i].vfe_intf, 0); - } - - return rc; -} - -static int msm_ispif_start_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0; - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY, params); - - return rc; -} - -static int msm_ispif_stop_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - uint32_t intf_addr; - enum msm_ispif_vfe_intf vfe_intf; - uint32_t stop_flag = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - if (!msm_ispif_is_intf_valid(ispif->csid_version, - params->entries[i].vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - rc = -EINVAL; - goto end; - } - } - - msm_ispif_intf_cmd(ispif, - ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY, params); - - for (i = 0; i < params->num; i++) { - cid_mask = - msm_ispif_get_cids_mask_from_cfg(¶ms->entries[i]); - vfe_intf = params->entries[i].vfe_intf; - - switch (params->entries[i].intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, - params->entries[i].intftype); - rc = -EPERM; - goto end; - } - - rc = readl_poll_timeout(ispif->base + intf_addr, stop_flag, - (stop_flag & 0xF) == 0xF, - ISPIF_TIMEOUT_SLEEP_US, - ISPIF_TIMEOUT_ALL_US); - if (rc < 0) - goto end; - - /* disable CIDs in CID_MASK register */ - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, vfe_intf, 0); - } - -end: - return rc; -} - -static void ispif_process_irq(struct ispif_device *ispif, - struct ispif_irq_status *out, enum msm_ispif_vfe_intf vfe_id) -{ - BUG_ON(!ispif); - BUG_ON(!out); - - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_PIX_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[PIX0]++; - } - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_RDI0_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI0]++; - } - if (out[vfe_id].ispifIrqStatus1 & - ISPIF_IRQ_STATUS_RDI1_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI1]++; - } - if (out[vfe_id].ispifIrqStatus2 & - ISPIF_IRQ_STATUS_RDI2_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI2]++; - } -} - -static inline void msm_ispif_read_irq_status(struct ispif_irq_status *out, - void *data) -{ - struct ispif_device *ispif = (struct ispif_device *)data; - - BUG_ON(!ispif); - BUG_ON(!out); - - out[VFE0].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE0)); - - out[VFE0].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE0)); - - out[VFE0].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE0)); - msm_camera_io_w_mb(out[VFE0].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE0)); - - if (ispif->vfe_info.num_vfe > 1) { - out[VFE1].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE1)); - - out[VFE1].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE1)); - - out[VFE1].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE1)); - msm_camera_io_w_mb(out[VFE1].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE1)); - } - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - if (out[VFE0].ispifIrqStatus0 & ISPIF_IRQ_STATUS_MASK) { - if (out[VFE0].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE0]); - - if (out[VFE0].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 pix0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi1 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE0); - } - if (ispif->hw_num_isps > 1) { - if (out[VFE1].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE1]); - - if (out[VFE1].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 pix0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi1 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE1); - } -} - -static irqreturn_t msm_io_ispif_irq(int irq_num, void *data) -{ - struct ispif_irq_status irq[VFE_MAX]; - - msm_ispif_read_irq_status(irq, data); - return IRQ_HANDLED; -} - -static int msm_ispif_set_vfe_info(struct ispif_device *ispif, - struct msm_ispif_vfe_info *vfe_info) -{ - memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info)); - - return 0; -} - -static int msm_ispif_init(struct ispif_device *ispif, - uint32_t csid_version) -{ - int rc = 0; - - BUG_ON(!ispif); - - if (ispif->ispif_state == ISPIF_POWER_UP) { - pr_err("%s: ispif already initted state = %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - /* can we set to zero? */ - ispif->applied_intf_cmd[VFE0].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE0].intf_cmd1 = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd1 = 0xFFFFFFFF; - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - - ispif->csid_version = csid_version; - - if (ispif->csid_version >= CSID_VERSION_V30) { - if (!ispif->clk_mux_mem || !ispif->clk_mux_io) { - pr_err("%s csi clk mux mem %pK io %pK\n", __func__, - ispif->clk_mux_mem, ispif->clk_mux_io); - rc = -ENOMEM; - return rc; - } - ispif->clk_mux_base = ioremap(ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem)); - if (!ispif->clk_mux_base) { - pr_err("%s: clk_mux_mem ioremap failed\n", __func__); - rc = -ENOMEM; - return rc; - } - } - - ispif->base = ioremap(ispif->mem->start, - resource_size(ispif->mem)); - if (!ispif->base) { - rc = -ENOMEM; - pr_err("%s: nomem\n", __func__); - goto end; - } - rc = request_irq(ispif->irq->start, msm_io_ispif_irq, - IRQF_TRIGGER_RISING, "ispif", ispif); - if (rc) { - pr_err("%s: request_irq error = %d\n", __func__, rc); - goto error_irq; - } - - rc = msm_ispif_clk_ahb_enable(ispif, 1); - if (rc) { - pr_err("%s: ahb_clk enable failed", __func__); - goto error_ahb; - } - - msm_ispif_reset_hw(ispif); - - rc = msm_ispif_reset(ispif); - if (rc == 0) { - ispif->ispif_state = ISPIF_POWER_UP; - CDBG("%s: power up done\n", __func__); - goto end; - } - -error_ahb: - free_irq(ispif->irq->start, ispif); -error_irq: - iounmap(ispif->base); - -end: - return rc; -} - -static void msm_ispif_release(struct ispif_device *ispif) -{ - BUG_ON(!ispif); - - if (!ispif->base) { - pr_err("%s: ispif base is NULL\n", __func__); - return; - } - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - return; - } - - /* make sure no streaming going on */ - msm_ispif_reset(ispif); - - msm_ispif_clk_ahb_enable(ispif, 0); - - free_irq(ispif->irq->start, ispif); - - iounmap(ispif->base); - - iounmap(ispif->clk_mux_base); - - ispif->ispif_state = ISPIF_POWER_DOWN; -} - -static long msm_ispif_cmd(struct v4l2_subdev *sd, void *arg) -{ - long rc = 0; - struct ispif_cfg_data *pcdata = (struct ispif_cfg_data *)arg; - struct ispif_device *ispif = - (struct ispif_device *)v4l2_get_subdevdata(sd); - - BUG_ON(!sd); - BUG_ON(!pcdata); - - mutex_lock(&ispif->mutex); - switch (pcdata->cfg_type) { - case ISPIF_ENABLE_REG_DUMP: - ispif->enb_dump_reg = pcdata->reg_dump; /* save dump config */ - break; - case ISPIF_INIT: - rc = msm_ispif_init(ispif, pcdata->csid_version); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_CFG: - rc = msm_ispif_config(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_START_FRAME_BOUNDARY: - rc = msm_ispif_start_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_FRAME_BOUNDARY: - rc = msm_ispif_stop_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_IMMEDIATELY: - rc = msm_ispif_stop_immediately(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_RELEASE: - msm_ispif_release(ispif); - break; - case ISPIF_SET_VFE_INFO: - rc = msm_ispif_set_vfe_info(ispif, &pcdata->vfe_info); - break; - default: - pr_err("%s: invalid cfg_type\n", __func__); - rc = -EINVAL; - break; - } - mutex_unlock(&ispif->mutex); - return rc; -} -static struct v4l2_file_operations msm_ispif_v4l2_subdev_fops; - -static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ -#ifdef CONFIG_COMPAT - void __user *up; - if (is_compat_task()) { - up = (void __user *)compat_ptr((unsigned long)arg); - arg = up; - } -#endif - - switch (cmd) { - case VIDIOC_MSM_ISPIF_CFG: - return msm_ispif_cmd(sd, arg); - case MSM_SD_SHUTDOWN: { - struct ispif_device *ispif = - (struct ispif_device *)v4l2_get_subdevdata(sd); - if (ispif && ispif->base) - msm_ispif_release(ispif); - return 0; - } - default: - pr_err_ratelimited("%s: invalid cmd 0x%x received\n", - __func__, cmd); - return -ENOIOCTLCMD; - } -} - -static long msm_ispif_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - return msm_ispif_subdev_ioctl(sd, cmd, arg); -} - -static long msm_ispif_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_ispif_subdev_do_ioctl); -} - -static int ispif_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - mutex_lock(&ispif->mutex); - /* mem remap is done in init when the clock is on */ - ispif->open_cnt++; - mutex_unlock(&ispif->mutex); - return 0; -} - -static int ispif_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - if (!ispif) { - pr_err("%s: invalid input\n", __func__); - return -EINVAL; - } - - mutex_lock(&ispif->mutex); - if (ispif->open_cnt == 0) { - pr_err("%s: Invalid close\n", __func__); - rc = -ENODEV; - goto end; - } - ispif->open_cnt--; - if (ispif->open_cnt == 0) - msm_ispif_release(ispif); -end: - mutex_unlock(&ispif->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ispif_subdev_core_ops = { - .g_chip_ident = &msm_ispif_subdev_g_chip_ident, - .ioctl = &msm_ispif_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_ispif_subdev_ops = { - .core = &msm_ispif_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_ispif_internal_ops = { - .open = ispif_open_node, - .close = ispif_close_node, -}; - -static int ispif_probe(struct platform_device *pdev) -{ - int rc; - struct ispif_device *ispif; - - ispif = kzalloc(sizeof(struct ispif_device), GFP_KERNEL); - if (!ispif) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,num-isps", &ispif->hw_num_isps); - if (rc) - /* backward compatibility */ - ispif->hw_num_isps = 1; - /* not an error condition */ - rc = 0; - } - - mutex_init(&ispif->mutex); - ispif->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "ispif"); - if (!ispif->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "ispif"); - if (!ispif->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->io = request_mem_region(ispif->mem->start, - resource_size(ispif->mem), pdev->name); - if (!ispif->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto error; - } - ispif->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csi_clk_mux"); - if (ispif->clk_mux_mem) { - ispif->clk_mux_io = request_mem_region( - ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem), - ispif->clk_mux_mem->name); - if (!ispif->clk_mux_io) - pr_err("%s: no valid csi_mux region\n", __func__); - } - - v4l2_subdev_init(&ispif->msm_sd.sd, &msm_ispif_subdev_ops); - ispif->msm_sd.sd.internal_ops = &msm_ispif_internal_ops; - ispif->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - - snprintf(ispif->msm_sd.sd.name, - ARRAY_SIZE(ispif->msm_sd.sd.name), MSM_ISPIF_DRV_NAME); - v4l2_set_subdevdata(&ispif->msm_sd.sd, ispif); - - platform_set_drvdata(pdev, &ispif->msm_sd.sd); - - media_entity_init(&ispif->msm_sd.sd.entity, 0, NULL, 0); - ispif->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ispif->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ISPIF; - ispif->msm_sd.sd.entity.name = pdev->name; - ispif->msm_sd.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x1; - rc = msm_sd_register(&ispif->msm_sd); - if (rc) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto error; - } - msm_ispif_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_ispif_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_ispif_v4l2_subdev_fops.unlocked_ioctl = msm_ispif_subdev_fops_ioctl; - msm_ispif_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_ispif_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; -#ifdef CONFIG_COMPAT - msm_ispif_v4l2_subdev_fops.compat_ioctl32 = msm_ispif_subdev_fops_ioctl; -#endif - - ispif->pdev = pdev; - ispif->ispif_state = ISPIF_POWER_DOWN; - ispif->open_cnt = 0; - return 0; - -error: - mutex_destroy(&ispif->mutex); - kfree(ispif); - return rc; -} - -static const struct of_device_id msm_ispif_dt_match[] = { - {.compatible = "qcom,ispif"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ispif_dt_match); - -static struct platform_driver ispif_driver = { - .probe = ispif_probe, - .driver = { - .name = MSM_ISPIF_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_ispif_dt_match, - }, -}; - -static int __init msm_ispif_init_module(void) -{ - return platform_driver_register(&ispif_driver); -} - -static void __exit msm_ispif_exit_module(void) -{ - platform_driver_unregister(&ispif_driver); -} - -module_init(msm_ispif_init_module); -module_exit(msm_ispif_exit_module); -MODULE_DESCRIPTION("MSM ISP Interface driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.h b/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.h deleted file mode 100755 index 180b0ce5a445..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_ISPIF_H -#define MSM_ISPIF_H - -#include -#include -#include -#include "../include/media/msmb_ispif.h" -#include "msm_sd.h" - -#define ISPIF_CLK_INFO_MAX 16 -#define ISPIF_AHB_CLK_INFO 2 - -struct ispif_irq_status { - uint32_t ispifIrqStatus0; - uint32_t ispifIrqStatus1; - uint32_t ispifIrqStatus2; -}; - -enum msm_ispif_state_t { - ISPIF_POWER_UP, - ISPIF_POWER_DOWN, -}; -struct ispif_sof_count { - uint32_t sof_cnt[INTF_MAX]; -}; - -struct ispif_intf_cmd { - uint32_t intf_cmd; - uint32_t intf_cmd1; -}; - -struct ispif_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint8_t start_ack_pending; - uint32_t csid_version; - int enb_dump_reg; - uint32_t open_cnt; - struct ispif_sof_count sof_count[VFE_MAX]; - struct ispif_intf_cmd applied_intf_cmd[VFE_MAX]; - enum msm_ispif_state_t ispif_state; - struct msm_ispif_vfe_info vfe_info; - struct clk *ahb_clk[ISPIF_CLK_INFO_MAX]; - struct completion reset_complete[VFE_MAX]; - uint32_t hw_num_isps; - uint32_t num_clk; - uint32_t clk_idx; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v1.h b/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v1.h deleted file mode 100644 index 91af7cb2c4fb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v1.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V1_H__ -#define __MSM_ISPIF_HWREG_V1_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x0000 -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x0124 -#define PIX0_LINE_BUF_EN_BIT 0 - -#define ISPIF_VFE(m) (0x0) - -#define ISPIF_VFE_m_CTRL_0(m) (0x0008 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x0100 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x010C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x0118 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x0108 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x0114 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x0120 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x0104 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x0110 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x011C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x000C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x0004 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x0030 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x0010 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x0014 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x20) : 0) \ - + 8*(n)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x0290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x001C + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x0020 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x0024 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x0028 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x34) : 0) \ - + 8*(n)) - -/* Defines for compatibility with newer ISPIF versions */ -#define ISPIF_RST_CMD_1_ADDR (0x0000) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x0000 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x0000 + ISPIF_VFE(m)) - - - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define RDI_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define AHB_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define PIX_1_CLK_DOMAIN_RST BIT(26) -#define RDI_2_CLK_DOMAIN_RST BIT(25) -#define RDI_2_MISR_RST_STB BIT(20) -#define RDI_2_VFE_RST_STB BIT(19) -#define RDI_2_CSID_RST_STB BIT(18) -#define RDI_1_MISR_RST_STB BIT(14) -#define RDI_1_VFE_RST_STB BIT(13) -#define RDI_1_CSID_RST_STB BIT(12) -#define PIX_1_VFE_RST_STB BIT(10) -#define PIX_1_CSID_RST_STB BIT(9) -#define RDI_0_MISR_RST_STB BIT(8) -#define RDI_0_VFE_RST_STB BIT(7) -#define RDI_0_CSID_RST_STB BIT(6) -#define PIX_0_MISR_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE1C77FF -#define ISPIF_RST_CMD_1_MASK 0xFFFFFFFF /* undefined */ - -/* irq_mask_0 */ -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RESET_DONE_IRQ BIT(27) -/* irq_mask_1 */ -#define PIX_INTF_1_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -/* irq_mask_2 */ -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x000249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x000249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x000001 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA -#endif /* __MSM_ISPIF_HWREG_V1_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v2.h b/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v2.h deleted file mode 100644 index 3cc21a7dce6d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/ispif/msm_ispif_hwreg_v2.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V2_H__ -#define __MSM_ISPIF_HWREG_V2_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x008 -#define ISPIF_RST_CMD_1_ADDR 0x00C -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x01C -#define PIX0_LINE_BUF_EN_BIT 6 - -#define ISPIF_VFE(m) ((m) * 0x200) - -#define ISPIF_VFE_m_CTRL_0(m) (0x200 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x208 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x20C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x210 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x21C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x220 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x224 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x230 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x234 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x238 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x244 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x248 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x24C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x254 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x264 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x278 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x288 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x28C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x298 + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x29C + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x2C0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x2D0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x2E4 + ISPIF_VFE(m)) - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define PIX_1_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define RDI_2_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define RDI_CLK_DOMAIN_RST BIT(26) -#define AHB_CLK_DOMAIN_RST BIT(25) -#define RDI_2_VFE_RST_STB BIT(12) -#define RDI_2_CSID_RST_STB BIT(11) -#define RDI_1_VFE_RST_STB BIT(10) -#define RDI_1_CSID_RST_STB BIT(9) -#define RDI_0_VFE_RST_STB BIT(8) -#define RDI_0_CSID_RST_STB BIT(7) -#define PIX_1_VFE_RST_STB BIT(6) -#define PIX_1_CSID_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE0F1FFF -#define ISPIF_RST_CMD_1_MASK 0xFC0F1FF9 - -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) -#define RESET_DONE_IRQ BIT(27) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x1 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA - -#endif /* __MSM_ISPIF_HWREG_V2_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/Makefile deleted file mode 100644 index 18d8329d180d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) - -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/jpeg_10 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io - -obj-$(CONFIG_MSMB_JPEG) += msm_jpeg_dev.o msm_jpeg_sync.o msm_jpeg_core.o msm_jpeg_hw.o msm_jpeg_platform.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_common.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_common.h deleted file mode 100644 index 634becafc575..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_common.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_COMMON_H -#define MSM_JPEG_COMMON_H - -#ifdef MSM_JPEG_DEBUG -#define JPEG_DBG(fmt, args...) pr_info(fmt, ##args) -#else -#define JPEG_DBG(fmt, args...) do { } while (0) -#endif - -#define JPEG_PR_ERR pr_err -#define JPEG_DBG_HIGH pr_debug - -enum JPEG_MODE { - JPEG_MODE_DISABLE, - JPEG_MODE_OFFLINE, - JPEG_MODE_REALTIME, - JPEG_MODE_REALTIME_ROTATION -}; - -enum JPEG_ROTATION { - JPEG_ROTATION_0, - JPEG_ROTATION_90, - JPEG_ROTATION_180, - JPEG_ROTATION_270 -}; - -#endif /* MSM_JPEG_COMMON_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.c b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.c deleted file mode 100644 index 52011346fb80..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.c +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (c) 2012-2013,The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size) { - unsigned long flags; - int rc = 0; - int tm = 500; /*500ms*/ - JPEG_DBG("%s:%d] reset", __func__, __LINE__); - memset(&pgmn_dev->fe_pingpong_buf, 0, - sizeof(pgmn_dev->fe_pingpong_buf)); - pgmn_dev->fe_pingpong_buf.is_fe = 1; - memset(&pgmn_dev->we_pingpong_buf, 0, - sizeof(pgmn_dev->we_pingpong_buf)); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - msm_jpeg_hw_reset(base, size); - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - rc = wait_event_interruptible_timeout( - pgmn_dev->reset_wait, - pgmn_dev->reset_done_ack, - msecs_to_jiffies(tm)); - - if (!pgmn_dev->reset_done_ack) { - JPEG_DBG("%s: reset ACK failed %d", __func__, rc); - return -EBUSY; - } - - JPEG_DBG("%s: reset_done_ack rc %d", __func__, rc); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - pgmn_dev->state = MSM_JPEG_RESET; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - - return 0; -} - -void msm_jpeg_core_release(struct msm_jpeg_device *pgmn_dev, - int domain_num) { - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf_status[i] && - pgmn_dev->release_buf) - msm_jpeg_platform_p2v(pgmn_dev, - pgmn_dev->we_pingpong_buf.buf[i].file, - &pgmn_dev->we_pingpong_buf.buf[i].handle, - domain_num); - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } -} - -void msm_jpeg_core_init(struct msm_jpeg_device *pgmn_dev) -{ - init_waitqueue_head(&pgmn_dev->reset_wait); - spin_lock_init(&pgmn_dev->reset_lock); -} - -int msm_jpeg_core_fe_start(struct msm_jpeg_device *pgmn_dev) -{ - msm_jpeg_hw_fe_start(pgmn_dev->base); - return 0; -} - -/* fetch engine */ -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) -{ - if (0 == buf->cbcr_len) - buf->cbcr_buffer_addr = 0x0; - JPEG_DBG("%s:%d] 0x%08x %d 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, buf->y_len, - (int) buf->cbcr_buffer_addr, buf->cbcr_len); - return msm_jpeg_hw_pingpong_update(&pgmn_dev->fe_pingpong_buf, buf, - pgmn_dev->base); -} - -void *msm_jpeg_core_fe_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->fe_pingpong_buf); -} - -/* write engine */ -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) { - JPEG_DBG("%s:%d] 0x%08x 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, (int) buf->cbcr_buffer_addr, - buf->y_len); - pgmn_dev->we_pingpong_buf.buf[0] = *buf; - pgmn_dev->we_pingpong_buf.buf_status[0] = 1; - msm_jpeg_hw_we_buffer_update( - &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); - - return 0; -} - -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf) -{ - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf[i].y_buffer_addr - == buf->y_buffer_addr) - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } - return 0; -} - -void *msm_jpeg_core_we_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->we_pingpong_buf); -} - -void *msm_jpeg_core_framedone_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - struct msm_jpeg_hw_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - buf_p = msm_jpeg_hw_pingpong_active_buffer( - &pgmn_dev->we_pingpong_buf); - if (buf_p && !pgmn_dev->decode_flag) { - buf_p->framedone_len = - msm_jpeg_hw_encode_output_size(pgmn_dev->base); - JPEG_DBG("%s:%d] framedone_len %d\n", __func__, __LINE__, - buf_p->framedone_len); - } - - return buf_p; -} - -void *msm_jpeg_core_reset_ack_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - /* @todo return the status back to msm_jpeg_core_reset */ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return NULL; -} - -void *msm_jpeg_core_err_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_PR_ERR("%s: Error %x\n", __func__, jpeg_irq_status); - return NULL; -} - -static int (*msm_jpeg_irq_handler) (int, void *, void *); - -void msm_jpeg_core_return_buffers(struct msm_jpeg_device *pgmn_dev, - int jpeg_irq_status) -{ - void *data = NULL; - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - pgmn_dev, data); - data = msm_jpeg_core_we_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_WE, - pgmn_dev, data); -} - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context) -{ - void *data = NULL; - unsigned long flags; - int jpeg_irq_status; - struct msm_jpeg_device *pgmn_dev = (struct msm_jpeg_device *)context; - - JPEG_DBG("%s:%d] irq_num = %d\n", __func__, __LINE__, irq_num); - - jpeg_irq_status = msm_jpeg_hw_irq_get_status(pgmn_dev->base); - - JPEG_DBG("%s:%d] jpeg_irq_status = %0x\n", __func__, __LINE__, - jpeg_irq_status); - - /*For reset and framedone IRQs, clear all bits*/ - if (pgmn_dev->state == MSM_JPEG_IDLE) { - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else if (jpeg_irq_status & 0x10000000) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - } else if (jpeg_irq_status & 0x1) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - } else { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - jpeg_irq_status, pgmn_dev->base); - } - - if (msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status)) { - /* send fe ping pong irq */ - JPEG_DBG_HIGH("%s:%d] Session done\n", __func__, __LINE__); - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - context, data); - data = msm_jpeg_core_framedone_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_FRAMEDONE, - context, data); - pgmn_dev->state = MSM_JPEG_INIT; - } - if (msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status)) { - data = msm_jpeg_core_reset_ack_irq(jpeg_irq_status, - pgmn_dev); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 1; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - wake_up(&pgmn_dev->reset_wait); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_RESET_ACK, - context, data); - } - - /* Unexpected/unintended HW interrupt */ - if (msm_jpeg_hw_irq_is_err(jpeg_irq_status)) { - if (pgmn_dev->state != MSM_JPEG_EXECUTING) { - /*Clear all the bits and ignore the IRQ*/ - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else { - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - msm_jpeg_core_return_buffers(pgmn_dev, jpeg_irq_status); - data = msm_jpeg_core_err_irq(jpeg_irq_status, pgmn_dev); - if (msm_jpeg_irq_handler) { - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_ERR, - context, data); - } - } - } - - return IRQ_HANDLED; -} - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)) -{ - msm_jpeg_irq_handler = irq_handler; -} - -void msm_jpeg_core_irq_remove(void) -{ - msm_jpeg_irq_handler = NULL; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.h deleted file mode 100644 index 212eaff91d88..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_core.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_CORE_H -#define MSM_JPEG_CORE_H - -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_sync.h" - -#define msm_jpeg_core_buf msm_jpeg_hw_buf - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context); - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)); -void msm_jpeg_core_irq_remove(void); - -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf); - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size); -int msm_jpeg_core_fe_start(struct msm_jpeg_device *); - -void msm_jpeg_core_release(struct msm_jpeg_device *, int); -void msm_jpeg_core_init(struct msm_jpeg_device *); -#endif /* MSM_JPEG_CORE_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_dev.c b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_dev.c deleted file mode 100644 index 34273d90b8c4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_dev.c +++ /dev/null @@ -1,315 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" - -#define MSM_JPEG_NAME "jpeg" -#define DEV_NAME_LEN 10 - -static int msm_jpeg_open(struct inode *inode, struct file *filp) -{ - int rc = 0; - - struct msm_jpeg_device *pgmn_dev = container_of(inode->i_cdev, - struct msm_jpeg_device, cdev); - filp->private_data = pgmn_dev; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_open(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - - return rc; -} - -static int msm_jpeg_release(struct inode *inode, struct file *filp) -{ - int rc; - - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG(KERN_INFO "%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_release(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - return rc; -} -#ifdef CONFIG_COMPAT -static long msm_jpeg_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_compat_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} -#endif -static long msm_jpeg_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} - -static const struct file_operations msm_jpeg_fops = { - .owner = THIS_MODULE, - .open = msm_jpeg_open, - .release = msm_jpeg_release, - .unlocked_ioctl = msm_jpeg_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_jpeg_compat_ioctl, -#endif -}; - - -int msm_jpeg_subdev_init(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - - JPEG_DBG("%s:%d: jpeg_sd=0x%x pgmn_dev=0x%x\n", - __func__, __LINE__, (uint32_t)jpeg_sd, (uint32_t)pgmn_dev); - rc = __msm_jpeg_open(pgmn_dev); - JPEG_DBG("%s:%d: rc=%d\n", - __func__, __LINE__, rc); - return rc; -} - -static long msm_jpeg_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)sd->host_priv; - - JPEG_DBG("%s: cmd=%d\n", __func__, cmd); - - JPEG_DBG("%s: pgmn_dev 0x%x", __func__, (uint32_t)pgmn_dev); - - JPEG_DBG("%s: Calling __msm_jpeg_ioctl\n", __func__); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, (unsigned long)arg); - pr_debug("%s: X\n", __func__); - return rc; -} - -void msm_jpeg_subdev_release(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - JPEG_DBG("%s:pgmn_dev=0x%x", __func__, (uint32_t)pgmn_dev); - rc = __msm_jpeg_release(pgmn_dev); - JPEG_DBG("%s:rc=%d", __func__, rc); -} - -static const struct v4l2_subdev_core_ops msm_jpeg_subdev_core_ops = { - .ioctl = msm_jpeg_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_jpeg_subdev_ops = { - .core = &msm_jpeg_subdev_core_ops, -}; - -static int msm_jpeg_init_dev(struct platform_device *pdev) -{ - int rc = -1; - struct device *dev; - struct msm_jpeg_device *msm_jpeg_device_p; - char devname[DEV_NAME_LEN]; - - msm_jpeg_device_p = kzalloc(sizeof(struct msm_jpeg_device), GFP_ATOMIC); - if (!msm_jpeg_device_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - msm_jpeg_device_p->pdev = pdev; - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - - snprintf(devname, sizeof(devname), "%s%d", MSM_JPEG_NAME, pdev->id); - - rc = __msm_jpeg_init(msm_jpeg_device_p); - if (rc < -1) { - JPEG_PR_ERR("%s: initialization failed\n", __func__); - goto fail; - } - - v4l2_subdev_init(&msm_jpeg_device_p->subdev, &msm_jpeg_subdev_ops); - v4l2_set_subdev_hostdata(&msm_jpeg_device_p->subdev, msm_jpeg_device_p); - JPEG_DBG("%s: msm_jpeg_device_p 0x%x", __func__, - (uint32_t)msm_jpeg_device_p); - - rc = alloc_chrdev_region(&msm_jpeg_device_p->msm_jpeg_devno, 0, 1, - devname); - if (rc < 0) { - JPEG_PR_ERR("%s: failed to allocate chrdev\n", __func__); - goto fail_1; - } - - if (!msm_jpeg_device_p->msm_jpeg_class) { - msm_jpeg_device_p->msm_jpeg_class = - class_create(THIS_MODULE, devname); - if (IS_ERR(msm_jpeg_device_p->msm_jpeg_class)) { - rc = PTR_ERR(msm_jpeg_device_p->msm_jpeg_class); - JPEG_PR_ERR("%s: create device class failed\n", - __func__); - goto fail_2; - } - } - - dev = device_create(msm_jpeg_device_p->msm_jpeg_class, NULL, - MKDEV(MAJOR(msm_jpeg_device_p->msm_jpeg_devno), - MINOR(msm_jpeg_device_p->msm_jpeg_devno)), NULL, - "%s%d", MSM_JPEG_NAME, pdev->id); - if (IS_ERR(dev)) { - JPEG_PR_ERR("%s: error creating device\n", __func__); - rc = -ENODEV; - goto fail_3; - } - - cdev_init(&msm_jpeg_device_p->cdev, &msm_jpeg_fops); - msm_jpeg_device_p->cdev.owner = THIS_MODULE; - msm_jpeg_device_p->cdev.ops = - (const struct file_operations *) &msm_jpeg_fops; - rc = cdev_add(&msm_jpeg_device_p->cdev, - msm_jpeg_device_p->msm_jpeg_devno, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: error adding cdev\n", __func__); - rc = -ENODEV; - goto fail_4; - } - - platform_set_drvdata(pdev, &msm_jpeg_device_p); - - JPEG_DBG("%s %s%d: success\n", __func__, MSM_JPEG_NAME, pdev->id); - - return rc; - -fail_4: - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - -fail_3: - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - -fail_2: - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - -fail_1: - __msm_jpeg_exit(msm_jpeg_device_p); - return rc; - -fail: - kfree(msm_jpeg_device_p); - return rc; - -} - -static void msm_jpeg_exit(struct msm_jpeg_device *msm_jpeg_device_p) -{ - cdev_del(&msm_jpeg_device_p->cdev); - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - - __msm_jpeg_exit(msm_jpeg_device_p); -} - -static int __msm_jpeg_probe(struct platform_device *pdev) -{ - return msm_jpeg_init_dev(pdev); -} - -static int __msm_jpeg_remove(struct platform_device *pdev) -{ - struct msm_jpeg_device *msm_jpegd_device_p; - - msm_jpegd_device_p = platform_get_drvdata(pdev); - if (msm_jpegd_device_p) - msm_jpeg_exit(msm_jpegd_device_p); - - return 0; -} - -static const struct of_device_id msm_jpeg_dt_match[] = { - {.compatible = "qcom,jpeg"}, - {}, -}; - -MODULE_DEVICE_TABLE(of, msm_jpeg_dt_match); - -static struct platform_driver msm_jpeg_driver = { - .probe = __msm_jpeg_probe, - .remove = __msm_jpeg_remove, - .driver = { - .name = "msm_jpeg", - .owner = THIS_MODULE, - .of_match_table = msm_jpeg_dt_match, - }, -}; - -static int __init msm_jpeg_driver_init(void) -{ - int rc; - rc = platform_driver_register(&msm_jpeg_driver); - return rc; -} - -static void __exit msm_jpeg_driver_exit(void) -{ - platform_driver_unregister(&msm_jpeg_driver); -} - -MODULE_DESCRIPTION("msm jpeg jpeg driver"); - -module_init(msm_jpeg_driver_init); -module_exit(msm_jpeg_driver_exit); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.c b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.c deleted file mode 100644 index 95c0e9e84748..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.c +++ /dev/null @@ -1,416 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_common.h" - -#include - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *base) -{ - int buf_free_index = -1; - - if (!pingpong_hw->buf_status[0]) { - buf_free_index = 0; - } else if (!pingpong_hw->buf_status[1]) { - buf_free_index = 1; - } else { - JPEG_PR_ERR("%s:%d: pingpong buffer busy\n", - __func__, __LINE__); - return -EBUSY; - } - - pingpong_hw->buf[buf_free_index] = *buf; - pingpong_hw->buf_status[buf_free_index] = 1; - - if (pingpong_hw->is_fe) { - /* it is fe */ - msm_jpeg_hw_fe_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } else { - /* it is we */ - msm_jpeg_hw_we_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } - return 0; -} - -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) { - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - pingpong_hw->buf_status[pingpong_hw->buf_active_index] = 0; - } - - pingpong_hw->buf_active_index = !pingpong_hw->buf_active_index; - - return (void *) buf_p; -} - -void *msm_jpeg_hw_pingpong_active_buffer( - struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - - return (void *) buf_p; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_get_status[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, JPEG_IRQ_STATUS_ADDR, - JPEG_IRQ_STATUS_BMSK, {0} }, -}; - -int msm_jpeg_hw_irq_get_status(void *base) -{ - uint32_t n_irq_status = 0; - n_irq_status = msm_jpeg_hw_read(&hw_cmd_irq_get_status[0], base); - return n_irq_status; -} - -struct msm_jpeg_hw_cmd hw_cmd_encode_output_size[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK, {0} } , -}; - -long msm_jpeg_hw_encode_output_size(void *base) -{ - uint32_t encode_output_size = 0; - - encode_output_size = msm_jpeg_hw_read(&hw_cmd_encode_output_size[0], - base); - - return encode_output_size; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_clear[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_CLEAR_BMSK, {JPEG_IRQ_CLEAR_ALL} }, -}; - -void msm_jpeg_hw_irq_clear(uint32_t mask, uint32_t data, void *base) -{ - JPEG_DBG("%s:%d] mask %0x data %0x", __func__, __LINE__, mask, data); - hw_cmd_irq_clear[0].mask = mask; - hw_cmd_irq_clear[0].data = data; - msm_jpeg_hw_write(&hw_cmd_irq_clear[0], base); -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_CMD_CLEAR_WRITE_PLN_QUEUES} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_OFFSET_ADDR, - JPEG_PLN0_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_PNTR_ADDR, - JPEG_PLN0_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_PNTR_ADDR, - JPEG_PLN1_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_PNTR_ADDR, - JPEG_PLN2_RD_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_fe_ping_update[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->y_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->pln2_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_start[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_OFFLINE_CMD_START} }, -}; - -void msm_jpeg_hw_fe_start(void *base) -{ - msm_jpeg_hw_write(&hw_cmd_fe_start[0], base); - - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_we_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_decode_status(void *base) -{ - uint32_t data; - data = readl_relaxed(base + JPEG_DECODE_MCUS_DECODED_STATUS); - JPEG_DBG_HIGH("Decode MCUs decode status %u", data); - data = readl_relaxed(base + JPEG_DECODE_BITS_CONSUMED_STATUS); - JPEG_DBG_HIGH("Decode bits consumed status %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_Y_STATE); - JPEG_DBG_HIGH("Decode prediction Y state %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_C_STATE); - JPEG_DBG_HIGH("Decode prediction C state %u", data); - data = readl_relaxed(base + JPEG_DECODE_RSM_STATE); - JPEG_DBG_HIGH("Decode prediction RSM state %u", data); -} - - -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_we_ping_update[0]; - hw_cmd_p->data = p_input->y_buffer_addr; - JPEG_DBG_HIGH("%s Output pln0 buffer address is %x\n", __func__, - p_input->y_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - JPEG_DBG_HIGH("%s Output pln1 buffer address is %x\n", __func__, - p_input->cbcr_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->pln2_addr; - JPEG_DBG_HIGH("%s Output pln2 buffer address is %x\n", __func__, - p_input->pln2_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_reset[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_DISABLE_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_CLEAR_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_RESET_CMD_ADDR, - JPEG_RESET_CMD_RMSK, {JPEG_RESET_DEFAULT} }, -}; - -void msm_jpeg_hw_reset(void *base, int size) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - hw_cmd_p = &hw_cmd_reset[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p, base); - wmb(); - - return; -} - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - data = readl_relaxed(paddr); - data &= hw_cmd_p->mask; - - return data; -} - -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t old_data, new_data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - if (hw_cmd_p->mask == 0xffffffff) { - old_data = 0; - } else { - old_data = readl_relaxed(paddr); - old_data &= ~hw_cmd_p->mask; - } - - new_data = hw_cmd_p->data & hw_cmd_p->mask; - new_data |= old_data; - writel_relaxed(new_data, paddr); -} - -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us, - void *base) -{ - int tm = hw_cmd_p->n; - uint32_t data; - uint32_t wait_data = hw_cmd_p->data & hw_cmd_p->mask; - - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data != wait_data) { - while (tm) { - udelay(m_us); - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data == wait_data) - break; - tm--; - } - } - hw_cmd_p->data = data; - return tm; -} - -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us) -{ - int tm = hw_cmd_p->n; - while (tm) { - udelay(m_us); - tm--; - } -} - -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *hw_cmd_p, uint32_t m_cmds, - uint32_t max_size, void *base) -{ - int is_copy_to_user = 0; - uint32_t data; - - while (m_cmds--) { - if (hw_cmd_p->offset >= max_size) { - JPEG_PR_ERR("%s:%d] %d exceed hw region %d\n", __func__, - __LINE__, hw_cmd_p->offset, max_size); - return -EFAULT; - } - if (hw_cmd_p->offset & 0x3) { - JPEG_PR_ERR("%s:%d] %d Invalid alignment\n", __func__, - __LINE__, hw_cmd_p->offset); - return -EFAULT; - } - - switch (hw_cmd_p->type) { - case MSM_JPEG_HW_CMD_TYPE_READ: - hw_cmd_p->data = msm_jpeg_hw_read(hw_cmd_p, base); - is_copy_to_user = 1; - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE: - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE_OR: - data = msm_jpeg_hw_read(hw_cmd_p, base); - hw_cmd_p->data = (hw_cmd_p->data & hw_cmd_p->mask) | - data; - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_MWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1000, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1); - break; - - case MSM_JPEG_HW_CMD_TYPE_MDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1000); - break; - - default: - JPEG_PR_ERR("wrong hw command type\n"); - break; - } - - hw_cmd_p++; - } - return is_copy_to_user; -} - -void msm_jpeg_io_dump(void *base, int size) -{ - char line_str[128], *p_str; - void __iomem *addr = (void __iomem *)base; - int i; - u32 *p = (u32 *) addr; - u32 data; - JPEG_DBG_HIGH("%s:%d] %pK %d", __func__, __LINE__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08lx: ", (unsigned long)p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - JPEG_DBG_HIGH("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - JPEG_DBG_HIGH("%s\n", line_str); -} - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.h deleted file mode 100644 index c3c5bd77231c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_H -#define MSM_JPEG_HW_H - -#include -#include "msm_jpeg_hw_reg.h" -#include -#include - -struct msm_jpeg_hw_buf { - struct msm_jpeg_buf vbuf; - struct file *file; - uint32_t framedone_len; - uint32_t y_buffer_addr; - uint32_t y_len; - uint32_t cbcr_buffer_addr; - uint32_t cbcr_len; - uint32_t num_of_mcu_rows; - struct ion_handle *handle; - uint32_t pln2_addr; - uint32_t pln2_len; -}; - -struct msm_jpeg_hw_pingpong { - uint8_t is_fe; /* 1: fe; 0: we */ - struct msm_jpeg_hw_buf buf[2]; - int buf_status[2]; - int buf_active_index; -}; - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *); -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw); -void *msm_jpeg_hw_pingpong_active_buffer(struct msm_jpeg_hw_pingpong - *pingpong_hw); - -void msm_jpeg_hw_irq_clear(uint32_t, uint32_t, void *); -int msm_jpeg_hw_irq_get_status(void *); -long msm_jpeg_hw_encode_output_size(void *); -#define MSM_JPEG_HW_MASK_COMP_FRAMEDONE \ - MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK -#define MSM_JPEG_HW_MASK_COMP_FE \ - MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK -#define MSM_JPEG_HW_MASK_COMP_WE \ - (MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK | \ - MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK) -#define MSM_JPEG_HW_MASK_COMP_RESET_ACK \ - MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK -#define MSM_JPEG_HW_MASK_COMP_ERR \ - (MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK) - -#define msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FRAMEDONE) -#define msm_jpeg_hw_irq_is_fe_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FE) -#define msm_jpeg_hw_irq_is_we_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_WE) -#define msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_RESET_ACK) -#define msm_jpeg_hw_irq_is_err(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_ERR) - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); - -void msm_jpeg_hw_we_buffer_cfg(uint8_t is_realtime); - -void msm_jpeg_hw_fe_start(void *); -void msm_jpeg_hw_clk_cfg(void); - -void msm_jpeg_hw_reset(void *base, int size); -void msm_jpeg_hw_irq_cfg(void); - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *, void *); -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *, void *); -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *, int, void *); -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *, int); -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *, uint32_t , - uint32_t , void *); -void msm_jpeg_hw_region_dump(int size); -void msm_jpeg_io_dump(void *base, int size); -void msm_jpeg_decode_status(void *base); - -#endif /* MSM_JPEG_HW_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw_reg.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw_reg.h deleted file mode 100644 index 4fbab4b3ea71..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_hw_reg.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_REG_H -#define MSM_JPEG_HW_REG_H - -#define JPEG_REG_BASE 0 - -#define MSM_JPEG_HW_IRQ_MASK_ADDR 0x00000018 -#define MSM_JPEG_HW_IRQ_MASK_RMSK 0xFFFFFFFF -#define MSM_JPEG_HW_IRQ_ENABLE 0xFFFFFFFF - -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK 0x00000001 -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_SHIFT 0x00000000 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_SHIFT 0x00000001 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_MASK 0x00000004 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_SHIFT 0x00000002 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_MASK 0x00000008 -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_SHIFT 0x00000003 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_SHIFT 0x00000004 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK 0x00000020 -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_SHIFT 0x00000005 - -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK 0x10000000 -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_SHIFT 0x0000000a - -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_MASK 0x00000800 -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_SHIFT 0x0000000b - -#define MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF (0x1<<19) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR (0x1<<20) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR (0x1<<21) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF (0x1<<22) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW (0x1<<23) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM (0x1<<24) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ (0x1<<25) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM (0x1<<26) -#define MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK (0x1<<29) - -#define JPEG_OFFLINE_CMD_START 0x00000001 - -#define JPEG_RESET_DEFAULT 0x00032013 - -#define JPEG_IRQ_DISABLE_ALL 0x00000000 -#define JPEG_IRQ_CLEAR_ALL 0xFFFFFFFF - -#define JPEG_PLN0_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000038) -#define JPEG_PLN0_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN0_RD_OFFSET_ADDR 0x0000003C -#define JPEG_PLN0_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN1_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000044) -#define JPEG_PLN1_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_RD_OFFSET_ADDR 0x00000048 -#define JPEG_PLN1_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN2_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000050) -#define JPEG_PLN2_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_RD_OFFSET_ADDR 0x00000054 -#define JPEG_PLN2_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_CMD_ADDR (JPEG_REG_BASE + 0x00000010) -#define JPEG_CMD_BMSK 0x00000FFF -#define JPEG_CMD_CLEAR_WRITE_PLN_QUEUES 0x700 - -#define JPEG_PLN0_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000cc) -#define JPEG_PLN0_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D0) -#define JPEG_PLN1_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D4) -#define JPEG_PLN2_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_IRQ_MASK_ADDR (JPEG_REG_BASE + 0x00000018) -#define JPEG_IRQ_MASK_BMSK 0xFFFFFFFF -#define JPEG_IRQ_ALLSOURCES_ENABLE 0xFFFFFFFF - -#define JPEG_IRQ_CLEAR_ADDR (JPEG_REG_BASE + 0x0000001c) -#define JPEG_IRQ_CLEAR_BMSK 0xFFFFFFFF - -#define JPEG_RESET_CMD_ADDR (JPEG_REG_BASE + 0x00000008) -#define JPEG_RESET_CMD_RMSK 0xFFFFFFFF - -#define JPEG_IRQ_STATUS_ADDR (JPEG_REG_BASE + 0x00000020) -#define JPEG_IRQ_STATUS_BMSK 0xFFFFFFFF - -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR (JPEG_REG_BASE + 0x00000180) -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK 0x1FFFFFFF - -#define JPEG_DECODE_MCUS_DECODED_STATUS (JPEG_REG_BASE + 0x00000258) -#define JPEG_DECODE_BITS_CONSUMED_STATUS (JPEG_REG_BASE + 0x0000025C) -#define JPEG_DECODE_PRED_Y_STATE (JPEG_REG_BASE + 0x00000260) -#define JPEG_DECODE_PRED_C_STATE (JPEG_REG_BASE + 0x00000264) -#define JPEG_DECODE_RSM_STATE (JPEG_REG_BASE + 0x00000268) - -#define JPEG_HW_VERSION (JPEG_REG_BASE + 0x00000000) - -#define VBIF_BASE_ADDRESS 0xFDA60000 -#define VBIF_REGION_SIZE 0xC30 -#define JPEG_VBIF_CLKON 0x4 -#define JPEG_VBIF_IN_RD_LIM_CONF0 0xB0 -#define JPEG_VBIF_IN_RD_LIM_CONF1 0xB4 -#define JPEG_VBIF_IN_RD_LIM_CONF2 0xB8 -#define JPEG_VBIF_IN_WR_LIM_CONF0 0xC0 -#define JPEG_VBIF_IN_WR_LIM_CONF1 0xC4 -#define JPEG_VBIF_IN_WR_LIM_CONF2 0xC8 -#define JPEG_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define JPEG_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define JPEG_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define JPEG_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define JPEG_VBIF_ARB_CTL 0xF0 -#define JPEG_VBIF_OUT_AXI_AOOO_EN 0x178 -#define JPEG_VBIF_OUT_AXI_AOOO 0x17c -#define JPEG_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 - -#endif /* MSM_JPEG_HW_REG_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.c b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.c deleted file mode 100644 index 1243d8b42fef..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.c +++ /dev/null @@ -1,460 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_platform.h" -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" -#include "msm_jpeg_hw.h" -#include "msm_camera_io_util.h" - -#define JPEG_CLK_INFO_MAX 16 - -static struct msm_cam_clk_info jpeg_8x_clk_info[JPEG_CLK_INFO_MAX]; - -static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[JPEG_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - JPEG_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > JPEG_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - JPEG_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(jpeg_8x_clk_info[i].clk_name)); - JPEG_DBG("clock-names[%d] = %s\n", - i, jpeg_8x_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - jpeg_8x_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - JPEG_DBG("clk_rate[%d] = %ld\n", - i, jpeg_8x_clk_info[i].clk_rate); - } - jpeg_dev->num_clk = count; - return 0; -} - - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate) -{ - int rc = 0; - struct clk *jpeg_clk; - - jpeg_clk = clk_get(&pgmn_dev->pdev->dev, "core_clk"); - if (IS_ERR(jpeg_clk)) { - JPEG_PR_ERR("%s get failed\n", "core_clk"); - rc = PTR_ERR(jpeg_clk); - return rc; - } - - rc = clk_set_rate(jpeg_clk, clk_rate); - - return rc; -} - -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num) -{ - ion_unmap_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0); - ion_free(pgmn_dev->jpeg_client, *ionhandle); - *ionhandle = NULL; -} - -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file_p, struct ion_handle **ionhandle, - int domain_num) { - dma_addr_t paddr; - unsigned long size; - int rc; - *ionhandle = ion_import_dma_buf(pgmn_dev->jpeg_client, fd); - if (IS_ERR_OR_NULL(*ionhandle)) - return 0; - - rc = ion_map_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0, - SZ_4K, 0, &paddr, (unsigned long *)&size, 0, 0); - JPEG_DBG("%s:%d] addr 0x%x size %ld", __func__, __LINE__, - (uint32_t)paddr, size); - - if (rc < 0) { - JPEG_PR_ERR("%s: ion_map_iommu fd %d error %d\n", __func__, fd, - rc); - goto error1; - } - - /* validate user input */ - if (len > size) { - JPEG_PR_ERR("%s: invalid offset + len\n", __func__); - goto error1; - } - - return paddr; -error1: - ion_free(pgmn_dev->jpeg_client, *ionhandle); - return 0; -} - -static void set_vbif_params(struct msm_jpeg_device *pgmn_dev, - void *jpeg_vbif_base) -{ - writel_relaxed(0x1, - jpeg_vbif_base + JPEG_VBIF_CLKON); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF2); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF2); - writel_relaxed(0x00001010, - jpeg_vbif_base + JPEG_VBIF_OUT_RD_LIM_CONF0); - writel_relaxed(0x00000110, - jpeg_vbif_base + JPEG_VBIF_OUT_WR_LIM_CONF0); - writel_relaxed(0x00000707, - jpeg_vbif_base + JPEG_VBIF_DDR_OUT_MAX_BURST); - writel_relaxed(0x7, - jpeg_vbif_base + JPEG_VBIF_OCMEM_OUT_MAX_BURST); - writel_relaxed(0x00000030, - jpeg_vbif_base + JPEG_VBIF_ARB_CTL); - writel_relaxed(0x00000FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO_EN); - writel_relaxed(0x0FFF0FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO); - /*FE and WE QOS configuration need to be set when - QOS RR arbitration is enabled*/ - if (pgmn_dev->hw_version != JPEG_8974_V1) - writel_relaxed(0x00000003, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - else - writel_relaxed(0x00000001, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - - writel_relaxed(0x22222222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0); - writel_relaxed(0x2222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1); -} - -static struct msm_bus_vectors msm_jpeg_init_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_jpeg_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = JPEG_CLK_RATE * 2.5, - .ib = JPEG_CLK_RATE * 2.5, - }, -}; - -static struct msm_bus_paths msm_jpeg_bus_client_config[] = { - { - ARRAY_SIZE(msm_jpeg_init_vectors), - msm_jpeg_init_vectors, - }, - { - ARRAY_SIZE(msm_jpeg_vectors), - msm_jpeg_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_jpeg_bus_client_pdata = { - msm_jpeg_bus_client_config, - ARRAY_SIZE(msm_jpeg_bus_client_config), - .name = "msm_jpeg", -}; - -#ifdef CONFIG_MSM_IOMMU -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - int rc = iommu_attach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - if (rc < 0) { - JPEG_PR_ERR("%s: Device attach failed\n", __func__); - return -ENODEV; - } - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - iommu_detach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -#else -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -#endif - - - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context) -{ - int rc = -1; - int jpeg_irq; - struct resource *jpeg_mem, *vbif_mem, *jpeg_io, *jpeg_irq_res; - void *jpeg_base; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - pgmn_dev->state = MSM_JPEG_IDLE; - - jpeg_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!jpeg_mem) { - JPEG_PR_ERR("%s: jpeg no mem resource?\n", __func__); - return -ENODEV; - } - - vbif_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!vbif_mem) { - JPEG_PR_ERR("%s: vbif no mem resource?\n", __func__); - return -ENODEV; - } - - jpeg_irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!jpeg_irq_res) { - JPEG_PR_ERR("no irq resource?\n"); - return -ENODEV; - } - jpeg_irq = jpeg_irq_res->start; - JPEG_DBG("%s base address: 0x%x, jpeg irq number: %d\n", __func__, - jpeg_mem->start, jpeg_irq); - - pgmn_dev->jpeg_bus_client = - msm_bus_scale_register_client(&msm_jpeg_bus_client_pdata); - if (!pgmn_dev->jpeg_bus_client) { - JPEG_PR_ERR("%s: Registration Failed!\n", __func__); - pgmn_dev->jpeg_bus_client = 0; - return -EINVAL; - } - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 1); - - jpeg_io = request_mem_region(jpeg_mem->start, - resource_size(jpeg_mem), pdev->name); - if (!jpeg_io) { - JPEG_PR_ERR("%s: region already claimed\n", __func__); - return -EBUSY; - } - - jpeg_base = ioremap(jpeg_mem->start, resource_size(jpeg_mem)); - if (!jpeg_base) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_remap; - } - - pgmn_dev->jpeg_fs = regulator_get(&pgmn_dev->pdev->dev, "vdd"); - rc = regulator_enable(pgmn_dev->jpeg_fs); - if (rc) { - JPEG_PR_ERR("%s:%d]jpeg regulator get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - if (msm_jpeg_get_clk_info(pgmn_dev, pgmn_dev->pdev) < 0) { - JPEG_PR_ERR("%s:%d]jpeg clock get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - rc = msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - goto fail_clk; - } - - pgmn_dev->hw_version = readl_relaxed(jpeg_base + - JPEG_HW_VERSION); - JPEG_DBG_HIGH("%s:%d] jpeg HW version 0x%x", __func__, __LINE__, - pgmn_dev->hw_version); - - pgmn_dev->jpeg_vbif = ioremap(vbif_mem->start, resource_size(vbif_mem)); - if (!pgmn_dev->jpeg_vbif) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_vbif; - } - - JPEG_DBG("%s:%d] jpeg_vbif 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->jpeg_vbif); - - rc = msm_jpeg_attach_iommu(pgmn_dev); - if (rc < 0) - goto fail_iommu; - - set_vbif_params(pgmn_dev, pgmn_dev->jpeg_vbif); - - rc = request_irq(jpeg_irq, handler, IRQF_TRIGGER_RISING, "jpeg", - context); - if (rc) { - JPEG_PR_ERR("%s: request_irq failed, %d\n", __func__, - jpeg_irq); - goto fail_request_irq; - } - - *mem = jpeg_mem; - *base = jpeg_base; - *irq = jpeg_irq; - - pgmn_dev->jpeg_client = msm_ion_client_create("camera/jpeg"); - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - - pgmn_dev->state = MSM_JPEG_INIT; - return rc; - -fail_request_irq: - msm_jpeg_detach_iommu(pgmn_dev); - -fail_iommu: - iounmap(pgmn_dev->jpeg_vbif); - - -fail_vbif: - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - -fail_clk: - rc = regulator_disable(pgmn_dev->jpeg_fs); - if (!rc) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, rc); - pgmn_dev->jpeg_fs = NULL; - -fail_fs: - iounmap(jpeg_base); - -fail_remap: - release_mem_region(jpeg_mem->start, resource_size(jpeg_mem)); - JPEG_DBG("%s:%d] fail\n", __func__, __LINE__); - return rc; -} - -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context) -{ - int result = 0; - - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - free_irq(irq, context); - - msm_jpeg_detach_iommu(pgmn_dev); - - if (pgmn_dev->jpeg_bus_client) { - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 0); - msm_bus_scale_unregister_client(pgmn_dev->jpeg_bus_client); - } - - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - JPEG_DBG("%s:%d] clock disbale done", __func__, __LINE__); - - if (pgmn_dev->jpeg_fs) { - result = regulator_disable(pgmn_dev->jpeg_fs); - if (!result) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, result); - pgmn_dev->jpeg_fs = NULL; - } - iounmap(pgmn_dev->jpeg_vbif); - iounmap(base); - release_mem_region(mem->start, resource_size(mem)); - ion_client_destroy(pgmn_dev->jpeg_client); - pgmn_dev->state = MSM_JPEG_IDLE; - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return result; -} - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.h deleted file mode 100644 index b59c41f8780c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_platform.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_PLATFORM_H -#define MSM_JPEG_PLATFORM_H - -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#define JPEG_CLK_RATE 266670000 - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate); -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num); -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file, struct ion_handle **ionhandle, - int domain_num); - -int msm_jpeg_platform_clk_enable(void); -int msm_jpeg_platform_clk_disable(void); - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context); -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context); - -#endif /* MSM_JPEG_PLATFORM_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.c b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.c deleted file mode 100644 index fac3da77d26f..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.c +++ /dev/null @@ -1,1292 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -#define JPEG_REG_SIZE 0x308 -#define JPEG_DEV_CNT 3 -#define JPEG_DEC_ID 2 -#define UINT32_MAX (0xFFFFFFFFU) - -#ifdef CONFIG_COMPAT -#define MSM_JPEG_IOCTL_RESET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_INPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 6, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 8, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 9, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_EVT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_TEST_DUMP_REGION32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 15, compat_ulong_t) - -struct msm_jpeg_ctrl_cmd32 { - uint32_t type; - uint32_t len; - compat_uptr_t value; -}; -struct msm_jpeg_buf32 { - uint32_t type; - int fd; - - compat_uptr_t vaddr; - - uint32_t y_off; - uint32_t y_len; - uint32_t framedone_len; - - uint32_t cbcr_off; - uint32_t cbcr_len; - - uint32_t num_of_mcu_rows; - uint32_t offset; - uint32_t pln2_off; - uint32_t pln2_len; -}; - -#endif - - -inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, name); - q_p->name = name; - spin_lock_init(&q_p->lck); - INIT_LIST_HEAD(&q_p->q); - init_waitqueue_head(&q_p->wait); - q_p->unblck = 0; -} - -inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p) -{ - unsigned long flags; - struct msm_jpeg_q_entry *q_entry_p = NULL; - void *data = NULL; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - spin_lock_irqsave(&q_p->lck, flags); - if (!list_empty(&q_p->q)) { - q_entry_p = list_first_entry(&q_p->q, struct msm_jpeg_q_entry, - list); - list_del_init(&q_entry_p->list); - } - spin_unlock_irqrestore(&q_p->lck, flags); - - if (q_entry_p) { - data = q_entry_p->data; - kfree(q_entry_p); - } else { - JPEG_DBG("%s:%d] %s no entry\n", __func__, __LINE__, - q_p->name); - } - - return data; -} - -inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data) -{ - unsigned long flags; - - struct msm_jpeg_q_entry *q_entry_p; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - - q_entry_p = kmalloc(sizeof(struct msm_jpeg_q_entry), GFP_ATOMIC); - if (!q_entry_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - q_entry_p->data = data; - - spin_lock_irqsave(&q_p->lck, flags); - list_add_tail(&q_entry_p->list, &q_p->q); - spin_unlock_irqrestore(&q_p->lck, flags); - - return 0; -} - -inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p, - struct msm_jpeg_core_buf *buf) -{ - struct msm_jpeg_core_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - memcpy(buf_p, buf, sizeof(struct msm_jpeg_core_buf)); - - msm_jpeg_q_in(q_p, buf_p); - return 0; -} - -inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p) -{ - long tm = MAX_SCHEDULE_TIMEOUT; /* 500ms */ - int rc; - - JPEG_DBG("%s:%d] %s wait\n", __func__, __LINE__, q_p->name); - rc = wait_event_interruptible_timeout(q_p->wait, - (!list_empty_careful(&q_p->q) || q_p->unblck), - msecs_to_jiffies(tm)); - JPEG_DBG("%s:%d] %s wait done\n", __func__, __LINE__, q_p->name); - if (list_empty_careful(&q_p->q)) { - if (rc == 0) { - rc = -ETIMEDOUT; - JPEG_PR_ERR("%s:%d] %s timeout\n", __func__, __LINE__, - q_p->name); - } else if (q_p->unblck) { - JPEG_DBG("%s:%d] %s unblock is true\n", __func__, - __LINE__, q_p->name); - q_p->unblck = 0; - rc = -ECANCELED; - } else if (rc < 0) { - JPEG_PR_ERR("%s:%d] %s rc %d\n", __func__, __LINE__, - q_p->name, rc); - } - } - return rc; -} - -inline int msm_jpeg_q_wakeup(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - wake_up(&q_p->wait); - return 0; -} - -inline int msm_jpeg_q_unblock(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - q_p->unblck = 1; - wake_up(&q_p->wait); - return 0; -} - -inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_q *q_p, int domain_num) -{ - struct msm_jpeg_core_buf *buf_p; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - buf_p = msm_jpeg_q_out(q_p); - if (buf_p) { - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, - &buf_p->handle, domain_num); - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(buf_p); - } - } while (buf_p); - q_p->unblck = 0; -} - -inline void msm_jpeg_q_cleanup(struct msm_jpeg_q *q_p) -{ - void *data; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - data = msm_jpeg_q_out(q_p); - if (data) { - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(data); - } - } while (data); - q_p->unblck = 0; -} - -/*************** event queue ****************/ - -int msm_jpeg_framedone_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (buf_in) { - buf_in->vbuf.framedone_len = buf_in->framedone_len; - buf_in->vbuf.type = MSM_JPEG_EVT_SESSION_DONE; - JPEG_DBG("%s:%d] 0x%08x %d framedone_len %d\n", - __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len, - buf_in->vbuf.framedone_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, buf_in); - } else { - JPEG_PR_ERR("%s:%d] no output return buffer\n", - __func__, __LINE__); - rc = -1; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - return rc; -} - -int msm_jpeg_evt_get(struct msm_jpeg_device *pgmn_dev, - void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->evt_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->evt_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no buffer\n", __func__, __LINE__); - return -EAGAIN; - } - - memset(&ctrl_cmd, 0, sizeof(ctrl_cmd)); - ctrl_cmd.type = buf_p->vbuf.type; - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) ctrl_cmd.value, ctrl_cmd.len); - - if (copy_to_user(to, &ctrl_cmd, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_evt_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->evt_q); - return 0; -} - -void msm_jpeg_reset_ack_irq(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); -} - -void msm_jpeg_err_irq(struct msm_jpeg_device *pgmn_dev, - int event) -{ - int rc = 0; - struct msm_jpeg_core_buf buf; - - JPEG_PR_ERR("%s:%d] error: %d\n", __func__, __LINE__, event); - - buf.vbuf.type = MSM_JPEG_EVT_ERR; - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, &buf); - if (!rc) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - if (!rc) - JPEG_PR_ERR("%s:%d] err err\n", __func__, __LINE__); - - return; -} - -/*************** output queue ****************/ - -int msm_jpeg_we_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - struct msm_jpeg_core_buf *buf_out; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->output_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no output return buffer\n", __func__, - __LINE__); - rc = -1; - return rc; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_out->y_buffer_addr, buf_out->y_len); - rc = msm_jpeg_core_we_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - msm_jpeg_core_we_buf_reset(pgmn_dev, buf_in); - JPEG_DBG("%s:%d] no output buffer\n", __func__, __LINE__); - rc = -2; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->output_rtn_q); - - return rc; -} - -int msm_jpeg_output_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->output_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->output_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no output buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_output_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->output_rtn_q); - return 0; -} - -int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_buf buf_cmd; - struct msm_jpeg_core_buf *buf_p; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] vaddr = 0x%08x y_len = %d\n, fd = %d", - __func__, __LINE__, (int) buf_cmd.vaddr, buf_cmd.y_len, - buf_cmd.fd); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + buf_cmd.pln2_len, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s:%d]After v2p pln0_addr %x pln0_len %d", - __func__, __LINE__, buf_p->y_buffer_addr, - buf_cmd.y_len); - - JPEG_DBG("pl1_len %d, pln1_addr %x, pln2_adrr %x,pln2_len %d", - buf_cmd.cbcr_len, buf_p->cbcr_buffer_addr, - buf_p->pln2_addr, buf_cmd.pln2_len); - - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->output_buf_q, buf_p); - return 0; -} - -/*************** input queue ****************/ - -int msm_jpeg_fe_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - struct msm_jpeg_core_buf *buf_out; - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->input_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no input return buffer\n", __func__, - __LINE__); - rc = -EFAULT; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - rc = msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - msm_jpeg_core_fe_start(pgmn_dev); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, __LINE__); - rc = -EFAULT; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->input_rtn_q); - - return rc; -} - -int msm_jpeg_input_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_wait(&pgmn_dev->input_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->input_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no input buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_input_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->input_rtn_q); - return 0; -} - -int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + - buf_cmd.pln2_len + buf_cmd.offset, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num) + - buf_cmd.offset + buf_cmd.y_off; - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->num_of_mcu_rows = buf_cmd.num_of_mcu_rows; - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len + buf_cmd.cbcr_off; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len + buf_cmd.pln2_off; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s: y_addr=%x, y_len=%x, cbcr_addr=%x, cbcr_len=%d", - __func__, buf_p->y_buffer_addr, buf_p->y_len, - buf_p->cbcr_buffer_addr, buf_p->cbcr_len); - JPEG_DBG("pln2_addr = %x, pln2_len = %d, fd =%d\n", - buf_p->pln2_addr, buf_p->pln2_len, buf_cmd.fd); - - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->input_buf_q, buf_p); - - return 0; -} - -int msm_jpeg_irq(int event, void *context, void *data) -{ - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - switch (event) { - case MSM_JPEG_EVT_SESSION_DONE: - msm_jpeg_framedone_irq(pgmn_dev, data); - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_FE: - msm_jpeg_fe_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_WE: - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_RESET_ACK: - msm_jpeg_reset_ack_irq(pgmn_dev); - break; - - case MSM_JPEG_HW_MASK_COMP_ERR: - default: - msm_jpeg_err_irq(pgmn_dev, event); - break; - } - - return 0; -} - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev) -{ - int rc; - - mutex_lock(&pgmn_dev->lock); - if (pgmn_dev->open_count) { - /* only open once */ - JPEG_PR_ERR("%s:%d] busy\n", __func__, __LINE__); - mutex_unlock(&pgmn_dev->lock); - return -EBUSY; - } - pgmn_dev->open_count++; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_irq_install(msm_jpeg_irq); - rc = msm_jpeg_platform_init(pgmn_dev->pdev, - &pgmn_dev->mem, &pgmn_dev->base, - &pgmn_dev->irq, msm_jpeg_core_irq, pgmn_dev); - if (rc) { - JPEG_PR_ERR("%s:%d] platform_init fail %d\n", __func__, - __LINE__, rc); - return rc; - } - - JPEG_DBG("%s:%d] platform resources - mem %pK, base %pK, irq %d\n", - __func__, __LINE__, - pgmn_dev->mem, pgmn_dev->base, pgmn_dev->irq); - pgmn_dev->res_size = resource_size(pgmn_dev->mem); - - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_q_cleanup(&pgmn_dev->input_buf_q); - msm_jpeg_core_init(pgmn_dev); - - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return rc; -} - -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - mutex_lock(&pgmn_dev->lock); - if (!pgmn_dev->open_count) { - JPEG_PR_ERR(KERN_ERR "%s: not opened\n", __func__); - mutex_unlock(&pgmn_dev->lock); - return -EINVAL; - } - pgmn_dev->open_count--; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_release(pgmn_dev, pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->input_buf_q, - pgmn_dev->domain_num); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - if (pgmn_dev->open_count) - JPEG_PR_ERR(KERN_ERR "%s: multiple opens\n", __func__); - - msm_jpeg_platform_release(pgmn_dev->mem, pgmn_dev->base, - pgmn_dev->irq, pgmn_dev); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return 0; -} - -int msm_jpeg_ioctl_hw_cmd(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - struct msm_jpeg_hw_cmd hw_cmd; - int is_copy_to_user; - - if (copy_from_user(&hw_cmd, arg, sizeof(struct msm_jpeg_hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1, - pgmn_dev->res_size, pgmn_dev->base); - JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x,pdata %x\n", - __func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset, - hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, &hw_cmd, sizeof(hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - } else { - return is_copy_to_user; - } - - return 0; -} - -int msm_jpeg_ioctl_hw_cmds(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int is_copy_to_user; - uint32_t len; - uint32_t m; - struct msm_jpeg_hw_cmds *hw_cmds_p; - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (copy_from_user(&m, arg, sizeof(m))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - if ((m == 0) || (m > ((UINT32_MAX - sizeof(struct msm_jpeg_hw_cmds)) / - sizeof(struct msm_jpeg_hw_cmd)))) { - JPEG_PR_ERR("%s:%d] m_cmds out of range\n", __func__, __LINE__); - return -EFAULT; - } - - len = sizeof(struct msm_jpeg_hw_cmds) + - sizeof(struct msm_jpeg_hw_cmd) * (m - 1); - hw_cmds_p = kmalloc(len, GFP_KERNEL); - if (!hw_cmds_p) { - JPEG_PR_ERR("%s:%d] no mem %d\n", __func__, __LINE__, len); - return -EFAULT; - } - - if (copy_from_user(hw_cmds_p, arg, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - - hw_cmd_p = (struct msm_jpeg_hw_cmd *) &(hw_cmds_p->hw_cmd); - - is_copy_to_user = msm_jpeg_hw_exec_cmds(hw_cmd_p, m, - pgmn_dev->res_size, pgmn_dev->base); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, hw_cmds_p, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - } else { - kfree(hw_cmds_p); - return is_copy_to_user; - } - kfree(hw_cmds_p); - return 0; -} - -int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg) -{ - struct msm_jpeg_core_buf *buf_out; - struct msm_jpeg_core_buf *buf_out_free[2] = {NULL, NULL}; - int i, rc; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - pgmn_dev->release_buf = 1; - for (i = 0; i < 2; i++) { - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, - __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) { - buf_out_free[i] = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out_free[i]) { - msm_jpeg_core_we_buf_update(pgmn_dev, buf_out_free[i]); - pgmn_dev->release_buf = 0; - } else { - JPEG_DBG("%s:%d] no output buffer\n", - __func__, __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) - kfree(buf_out_free[i]); - - pgmn_dev->state = MSM_JPEG_EXECUTING; - JPEG_DBG_HIGH("%s:%d] START\n", __func__, __LINE__); - wmb(); - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, arg); - wmb(); - - JPEG_DBG("%s:%d]", __func__, __LINE__); - return rc; -} - -int msm_jpeg_ioctl_reset(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int rc; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (pgmn_dev->state == MSM_JPEG_INIT) { - if (copy_from_user(&ctrl_cmd, arg, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - pgmn_dev->op_mode = ctrl_cmd.type; - - rc = msm_jpeg_core_reset(pgmn_dev, pgmn_dev->op_mode, pgmn_dev->base, - resource_size(pgmn_dev->mem)); - } else { - JPEG_PR_ERR("%s:%d] JPEG not been initialized Wrong state\n", - __func__, __LINE__); - rc = -1; - } - return rc; -} - -int msm_jpeg_ioctl_test_dump_region(struct msm_jpeg_device *pgmn_dev, - unsigned long arg) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_io_dump(pgmn_dev->base, JPEG_REG_SIZE); - return 0; -} - -int msm_jpeg_ioctl_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - long clk_rate; - int rc; - - if ((pgmn_dev->state != MSM_JPEG_INIT) && - (pgmn_dev->state != MSM_JPEG_RESET)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - if (get_user(clk_rate, (unsigned int __user *)arg)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - JPEG_DBG("%s:%d] Requested clk rate %ld\n", __func__, __LINE__, - clk_rate); - if (clk_rate < 0) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - rc = msm_jpeg_platform_set_clk_rate(pgmn_dev, clk_rate); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - return -EFAULT; - } - - return 0; -} -#ifdef CONFIG_COMPAT -int msm_jpeg_get_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - if (copy_from_user(&ctrl_cmd32, arg, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - ctrl_cmd->type = ctrl_cmd32.type; - ctrl_cmd->len = ctrl_cmd32.len; - temp = (unsigned long) ctrl_cmd32.value; - ctrl_cmd->value = (void *) temp; - - return 0; -} -int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - - ctrl_cmd32.type = ctrl_cmd->type; - ctrl_cmd32.len = ctrl_cmd->len; - temp = (unsigned long) ctrl_cmd->value; - ctrl_cmd32.value = (compat_uptr_t) temp; - - if (copy_from_user(arg, &ctrl_cmd32, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_get_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - if (copy_from_user(&jpeg_buf32, arg, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - jpeg_buf->type = jpeg_buf32.type; - jpeg_buf->fd = jpeg_buf32.fd; - temp = (unsigned long) jpeg_buf32.vaddr; - jpeg_buf->vaddr = (void *) temp; - jpeg_buf->y_off = jpeg_buf32.y_off; - jpeg_buf->y_len = jpeg_buf32.y_len; - jpeg_buf->framedone_len = jpeg_buf32.framedone_len; - jpeg_buf->cbcr_off = jpeg_buf32.cbcr_off; - jpeg_buf->cbcr_len = jpeg_buf32.cbcr_len; - jpeg_buf->num_of_mcu_rows = jpeg_buf32.num_of_mcu_rows; - jpeg_buf->offset = jpeg_buf32.offset; - jpeg_buf->pln2_off = jpeg_buf32.pln2_off; - jpeg_buf->pln2_len = jpeg_buf32.pln2_len; - - return 0; -} -int msm_jpeg_put_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - - jpeg_buf32.type = jpeg_buf->type; - jpeg_buf32.fd = jpeg_buf->fd; - temp = (unsigned long) jpeg_buf->vaddr; - jpeg_buf32.vaddr = (compat_uptr_t) temp; - jpeg_buf32.y_off = jpeg_buf->y_off; - jpeg_buf32.y_len = jpeg_buf->y_len; - jpeg_buf32.framedone_len = jpeg_buf->framedone_len; - jpeg_buf32.cbcr_off = jpeg_buf->cbcr_off; - jpeg_buf32.cbcr_len = jpeg_buf->cbcr_len; - jpeg_buf32.num_of_mcu_rows = jpeg_buf->num_of_mcu_rows; - jpeg_buf32.offset = jpeg_buf->offset; - jpeg_buf32.pln2_off = jpeg_buf->pln2_off; - jpeg_buf32.pln2_len = jpeg_buf->pln2_len; - - if (copy_to_user(arg, &jpeg_buf32, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - return 0; -} - -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - struct msm_jpeg_buf jpeg_buf; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET32: - rc = msm_jpeg_get_compat_ctrl_cmd(&ctrl_cmd, - (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) &ctrl_cmd); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET32: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET32: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET32: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) &ctrl_cmd); - if (rc < 0) - break; - msm_jpeg_put_compat_ctrl_cmd(&ctrl_cmd, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION32: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, - (void __user *) arg); - break; - - default: - JPEG_PR_ERR(KERN_INFO "%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#else -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - return 0; -} -#endif - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, (void __user *) arg); - break; - default: - pr_err_ratelimited("%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#ifdef CONFIG_MSM_IOMMU -static int camera_register_domain(void) -{ - struct msm_iova_partition camera_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - - struct msm_iova_layout camera_fw_layout = { - .partitions = &camera_fw_partition, - .npartitions = 1, - .client_name = "camera_jpeg", - .domain_flags = 0, - }; - return msm_register_domain(&camera_fw_layout); -} -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) -{ - int rc = 0; - int idx = 0; -#ifdef CONFIG_MSM_IOMMU - int i = 0, j = 0; - char *iommu_name[JPEG_DEV_CNT] = {"jpeg_enc0", "jpeg_enc1", - "jpeg_dec"}; -#endif - - mutex_init(&pgmn_dev->lock); - - pr_err("%s:%d] Jpeg Device id %d", __func__, __LINE__, - pgmn_dev->pdev->id); - idx = pgmn_dev->pdev->id; - pgmn_dev->idx = idx; - pgmn_dev->iommu_cnt = 1; - pgmn_dev->decode_flag = (idx == JPEG_DEC_ID); - - msm_jpeg_q_init("evt_q", &pgmn_dev->evt_q); - msm_jpeg_q_init("output_rtn_q", &pgmn_dev->output_rtn_q); - msm_jpeg_q_init("output_buf_q", &pgmn_dev->output_buf_q); - msm_jpeg_q_init("input_rtn_q", &pgmn_dev->input_rtn_q); - msm_jpeg_q_init("input_buf_q", &pgmn_dev->input_buf_q); - -#ifdef CONFIG_MSM_IOMMU - j = (pgmn_dev->iommu_cnt <= 1) ? idx : 0; - /*get device context for IOMMU*/ - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - pgmn_dev->iommu_ctx_arr[i] = msm_iommu_get_ctx(iommu_name[j]); - JPEG_DBG("%s:%d] name %s", __func__, __LINE__, iommu_name[j]); - JPEG_DBG("%s:%d] ctx 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->iommu_ctx_arr[i]); - if (!pgmn_dev->iommu_ctx_arr[i]) { - JPEG_PR_ERR("%s: No iommu fw context found\n", - __func__); - goto error; - } - j++; - } - pgmn_dev->domain_num = camera_register_domain(); - JPEG_DBG("%s:%d] dom_num 0x%x", __func__, __LINE__, - pgmn_dev->domain_num); - if (pgmn_dev->domain_num < 0) { - JPEG_PR_ERR("%s: could not register domain\n", __func__); - goto error; - } - pgmn_dev->domain = msm_get_iommu_domain(pgmn_dev->domain_num); - JPEG_DBG("%s:%d] dom 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->domain); - if (!pgmn_dev->domain) { - JPEG_PR_ERR("%s: cannot find domain\n", __func__); - goto error; - } -#endif - - return rc; -#ifdef CONFIG_MSM_IOMMU -error: -#endif - mutex_destroy(&pgmn_dev->lock); - return -EFAULT; -} - -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev) -{ - mutex_destroy(&pgmn_dev->lock); - kfree(pgmn_dev); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.h b/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.h deleted file mode 100644 index 1698f17175c0..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/jpeg_10/msm_jpeg_sync.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#ifndef MSM_JPEG_SYNC_H -#define MSM_JPEG_SYNC_H - -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_hw.h" - -#define JPEG_8974_V1 0x10000000 -#define JPEG_8974_V2 0x10010000 - -enum msm_jpeg_state { - MSM_JPEG_INIT, - MSM_JPEG_RESET, - MSM_JPEG_EXECUTING, - MSM_JPEG_STOPPED, - MSM_JPEG_IDLE -}; - -struct msm_jpeg_q { - char const *name; - struct list_head q; - spinlock_t lck; - wait_queue_head_t wait; - int unblck; -}; - -struct msm_jpeg_q_entry { - struct list_head list; - void *data; -}; - -struct msm_jpeg_device { - struct platform_device *pdev; - struct resource *mem; - int irq; - void *base; - struct clk *jpeg_clk[5]; - struct regulator *jpeg_fs; - uint32_t hw_version; - - struct device *device; - struct cdev cdev; - struct mutex lock; - char open_count; - uint8_t op_mode; - - /* event queue including frame done & err indications - */ - struct msm_jpeg_q evt_q; - - /* output return queue - */ - struct msm_jpeg_q output_rtn_q; - - /* output buf queue - */ - struct msm_jpeg_q output_buf_q; - - /* input return queue - */ - struct msm_jpeg_q input_rtn_q; - - /* input buf queue - */ - struct msm_jpeg_q input_buf_q; - - struct v4l2_subdev subdev; - - struct class *msm_jpeg_class; - - dev_t msm_jpeg_devno; - - /*iommu domain and context*/ - int domain_num; - int idx; - struct iommu_domain *domain; - struct device *iommu_ctx_arr[3]; - int iommu_cnt; - int decode_flag; - struct ion_client *jpeg_client; - void *jpeg_vbif; - int release_buf; - struct msm_jpeg_hw_pingpong fe_pingpong_buf; - struct msm_jpeg_hw_pingpong we_pingpong_buf; - int we_pingpong_index; - int reset_done_ack; - spinlock_t reset_lock; - wait_queue_head_t reset_wait; - uint32_t res_size; - uint32_t jpeg_bus_client; - uint32_t num_clk; - enum msm_jpeg_state state; -}; - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev); - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); - -#ifdef CONFIG_COMPAT -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev); - -#endif /* MSM_JPEG_SYNC_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm.c b/drivers/media/platform/msm/camera_v2_fortuna/msm.c deleted file mode 100644 index fc9f6fbb8fd0..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm.c +++ /dev/null @@ -1,1196 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" -#include - - -static struct v4l2_device *msm_v4l2_dev; -static struct list_head ordered_sd_list; - -#ifndef CONFIG_ARCH_MSM8939 -static struct pm_qos_request msm_v4l2_pm_qos_request; -#endif - -static struct msm_queue_head *msm_session_q; - -/* config node envent queue */ -static struct v4l2_fh *msm_eventq; -spinlock_t msm_eventq_lock; - -static struct pid *msm_pid; -spinlock_t msm_pid_lock; -static int module_init_status; -struct msm_cam_dummy_queue { - wait_queue_head_t state_wait; -}; -static struct msm_cam_dummy_queue cam_dummy_queue; - -#define msm_dequeue(queue, type, member) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if ((node) && (&node->member) && (&node->member.next)) \ - list_del_init(&node->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - node; \ -}) - -#define msm_delete_sd_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node->sd == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_delete_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_queue_drain(queue, type, member) do { \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node; \ - spin_lock_irqsave(&__q->lock, flags); \ - while (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if (node) { \ - if (&node->member) \ - list_del_init(&node->member); \ - kzfree(node); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0); - -typedef int (*msm_queue_func)(void *d1, void *d2); -#define msm_queue_traverse_action(queue, type, member, func, data) do {\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - msm_queue_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node && __f) { \ - __f(node, data); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0) - -typedef int (*msm_queue_find_func)(void *d1, void *d2); -#define msm_queue_find(queue, type, member, func, data) ({\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - typeof(node) __ret = NULL; \ - msm_queue_find_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if ((__f) && __f(node, data)) { \ - __ret = node; \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - __ret; \ -}) - -static void msm_init_queue(struct msm_queue_head *qhead) -{ - BUG_ON(!qhead); - - INIT_LIST_HEAD(&qhead->list); - spin_lock_init(&qhead->lock); - qhead->len = 0; - qhead->max = 0; -} - -static void msm_enqueue(struct msm_queue_head *qhead, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&qhead->lock, flags); - qhead->len++; - if (qhead->len > qhead->max) - qhead->max = qhead->len; - list_add_tail(entry, &qhead->list); - spin_unlock_irqrestore(&qhead->lock, flags); -} - -/* index = session id */ -static inline int __msm_queue_find_session(void *d1, void *d2) -{ - struct msm_session *session = d1; - return (session->session_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_stream(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - return (stream->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_command_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *ack = d1; - return (ack->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -#ifndef CONFIG_ARCH_MSM8939 -static void msm_pm_qos_add_request(void) -{ - pr_err("%s: add request",__func__); - pm_qos_add_request(&msm_v4l2_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); -} - -static void msm_pm_qos_remove_request(void) -{ - pr_err("%s: remove request",__func__); - msm_v4l2_pm_qos_request.type = PM_QOS_REQ_AFFINE_CORES; - msm_v4l2_pm_qos_request.cpus_affine.bits[0] = 0xF0; - - pm_qos_remove_request(&msm_v4l2_pm_qos_request); -} - -void msm_pm_qos_update_request(int val) -{ - pr_err("%s: update request %d",__func__,val); - pm_qos_update_request(&msm_v4l2_pm_qos_request, val); -} -#endif - -struct msm_session *msm_session_find(unsigned int session_id) -{ - struct msm_session *session; - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) - return NULL; - return session; -} - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - stream = kzalloc(sizeof(*stream), GFP_KERNEL); - if (!stream) - return -ENOMEM; - - stream->stream_id = stream_id; - stream->vb2_q = q; - spin_lock_init(&stream->stream_lock); - msm_enqueue(&session->stream_q, &stream->list); - session->stream_q.len++; - - INIT_LIST_HEAD(&stream->queued_list); - - return 0; -} - -void msm_delete_stream(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session = NULL; - struct msm_stream *stream = NULL; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return; - spin_lock_irqsave(&(session->stream_q.lock), flags); - list_del_init(&stream->list); - session->stream_q.len--; - spin_unlock_irqrestore(&(session->stream_q.lock), flags); - kzfree(stream); -} - -static void msm_sd_unregister_subdev(struct video_device *vdev) -{ - struct v4l2_subdev *sd = video_get_drvdata(vdev); - sd->devnode = NULL; - kzfree(vdev); -} - -static inline int __msm_sd_register_subdev(struct v4l2_subdev *sd) -{ - int rc = 0; - struct video_device *vdev; - - if (!msm_v4l2_dev || !sd || !sd->name[0]) - return -EINVAL; - - rc = v4l2_device_register_subdev(msm_v4l2_dev, sd); - if (rc < 0) - return rc; - - /* Register a device node for every subdev marked with the - * V4L2_SUBDEV_FL_HAS_DEVNODE flag. - */ - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE)) - return rc; - - vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); - if (!vdev) { - rc = -ENOMEM; - goto clean_up; - } - - video_set_drvdata(vdev, sd); - strlcpy(vdev->name, sd->name, sizeof(vdev->name)); - vdev->v4l2_dev = msm_v4l2_dev; - vdev->fops = &v4l2_subdev_fops; - vdev->release = msm_sd_unregister_subdev; - rc = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1, - sd->owner); - if (rc < 0) { - kzfree(vdev); - goto clean_up; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - sd->entity.info.v4l.major = VIDEO_MAJOR; - sd->entity.info.v4l.minor = vdev->minor; - sd->entity.name = video_device_node_name(vdev); -#endif - sd->devnode = vdev; - return 0; - -clean_up: - if (sd->devnode) - video_unregister_device(sd->devnode); - return rc; -} - -static void msm_add_sd_in_position(struct msm_sd_subdev *msm_subdev, - struct list_head *sd_list) -{ - struct msm_sd_subdev *temp_sd; - - list_for_each_entry(temp_sd, sd_list, list) { - if (msm_subdev->close_seq < temp_sd->close_seq) { - list_add_tail(&msm_subdev->list, &temp_sd->list); - return; - } - } - list_add_tail(&msm_subdev->list, sd_list); -} - -int msm_sd_register(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - if (WARN_ON(!msm_v4l2_dev) || WARN_ON(!msm_v4l2_dev->dev)) - return -EIO; - - msm_add_sd_in_position(msm_subdev, &ordered_sd_list); - return __msm_sd_register_subdev(&msm_subdev->sd); -} - -int msm_sd_unregister(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - v4l2_device_unregister_subdev(&msm_subdev->sd); - return 0; -} - -int msm_cam_get_module_init_status(void) -{ - int rc; - pr_warn("msm_cam_get_module_init_status : start\n"); - if (module_init_status == 1) - return 0; - while (1) { - rc = wait_event_interruptible(cam_dummy_queue.state_wait, - (module_init_status == 1)); - if (rc == -ETIMEDOUT) - continue; - else if (rc == 0) - break; - } - pr_err("msm_cam_get_module_init_status : end %d\n", rc); - return 0; -} - -int msm_create_session(unsigned int session_id, struct video_device *vdev) -{ - struct msm_session *session = NULL; - - if (!msm_session_q) { - pr_err("%s : session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - session = kzalloc(sizeof(*session), GFP_KERNEL); - if (!session) { - pr_err("%s : Memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - session->session_id = session_id; - session->event_q.vdev = vdev; - msm_init_queue(&session->command_ack_q); - msm_init_queue(&session->stream_q); - msm_enqueue(msm_session_q, &session->list); - mutex_init(&session->lock); - return 0; -} - -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - - if (!msm_session_q) { - pr_err("%s : Session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - mutex_lock(&session->lock); - cmd_ack = kzalloc(sizeof(*cmd_ack), GFP_KERNEL); - if (!cmd_ack) { - mutex_unlock(&session->lock); - pr_err("%s : memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - msm_init_queue(&cmd_ack->command_q); - INIT_LIST_HEAD(&cmd_ack->list); - init_completion(&cmd_ack->wait_complete); - cmd_ack->stream_id = stream_id; - - msm_enqueue(&session->command_ack_q, &cmd_ack->list); - session->command_ack_q.len++; - mutex_unlock(&session->lock); - return 0; -} - -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - mutex_lock(&session->lock); - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, __msm_queue_find_command_ack_q, - &stream_id); - if (!cmd_ack) { - mutex_unlock(&session->lock); - return; - } - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - spin_lock_irqsave(&(session->command_ack_q.lock), flags); - list_del_init(&cmd_ack->list); - kzfree(cmd_ack); - session->command_ack_q.len--; - spin_unlock_irqrestore(&(session->command_ack_q.lock), flags); - mutex_unlock(&session->lock); -} - -static inline int __msm_sd_close_subdevs(struct msm_sd_subdev *msm_sd, - struct msm_sd_close_ioctl *sd_close) -{ - struct v4l2_subdev *sd; - sd = &msm_sd->sd; - pr_debug("%s: Shutting down subdev %s", __func__, sd->name); - - v4l2_subdev_call(sd, core, ioctl, MSM_SD_SHUTDOWN, sd_close); - v4l2_subdev_call(sd, core, s_power, 0); - - return 0; -} - -static inline int __msm_destroy_session_streams(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - pr_err("%s: Error: Destroyed list is not empty\n", __func__); - INIT_LIST_HEAD(&stream->queued_list); - return 0; -} - -static void msm_destroy_session_streams(struct msm_session *session) -{ - - if (!session) - return; - - msm_queue_traverse_action(&session->stream_q, struct msm_stream, list, - __msm_destroy_session_streams, NULL); - - msm_queue_drain(&session->stream_q, struct msm_stream, list); -} - -static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *cmd_ack = d1; - - if (!(&cmd_ack->command_q)) - return 0; - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - return 0; -} - -static void msm_remove_session_cmd_ack_q(struct msm_session *session) -{ - if ((!session) || !(&session->command_ack_q)) - return; - - mutex_lock(&session->lock); - /* to ensure error handling purpose, it needs to detach all subdevs - * which are being connected to streams */ - msm_queue_traverse_action(&session->command_ack_q, - struct msm_command_ack, list, - __msm_remove_session_cmd_ack_q, NULL); - - msm_queue_drain(&session->command_ack_q, struct msm_command_ack, list); - - mutex_unlock(&session->lock); -} - -int msm_destroy_session(unsigned int session_id) -{ - struct msm_session *session; - struct v4l2_subdev *buf_mgr_subdev; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - msm_destroy_session_streams(session); - msm_remove_session_cmd_ack_q(session); - mutex_destroy(&session->lock); - msm_delete_entry(msm_session_q, struct msm_session, - list, session); - buf_mgr_subdev = msm_buf_mngr_get_subdev(); - if (buf_mgr_subdev) { - v4l2_subdev_call(buf_mgr_subdev, core, ioctl, - MSM_SD_SHUTDOWN, NULL); - } else { - pr_err("%s: Buff manger device node is NULL\n", __func__); - } - - return 0; -} - -static int __msm_close_destry_session_notify_apps(void *d1, void *d2) -{ - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct msm_session *session = d1; - - event.type = MSM_CAMERA_V4L2_EVENT_TYPE; - event.id = MSM_CAMERA_MSM_NOTIFY; - event_data->command = MSM_CAMERA_PRIV_SHUTDOWN; - - v4l2_event_queue(session->event_q.vdev, &event); - - return 0; -} - -static long msm_private_ioctl(struct file *file, void *fh, - bool valid_prio, unsigned int cmd, void *arg) -{ - int rc = 0; - struct msm_v4l2_event_data *event_data = arg; - struct v4l2_event event; - struct msm_session *session; - unsigned int session_id; - unsigned int stream_id; - unsigned long spin_flags = 0; - - if (cmd == MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS) { - module_init_status = *(int *) arg; - if (module_init_status) - wake_up(&cam_dummy_queue.state_wait); - return rc; - } - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - - if (!session) - return -EINVAL; - - switch (cmd) { - case MSM_CAM_V4L2_IOCTL_NOTIFY: { - if (WARN_ON(!session->event_q.vdev)) { - rc = -EFAULT; - break; - } - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - v4l2_event_queue(session->event_q.vdev, - &event); - } - break; - - case MSM_CAM_V4L2_IOCTL_CMD_ACK: { - struct msm_command_ack *cmd_ack; - struct msm_command *ret_cmd; - - ret_cmd = kzalloc(sizeof(*ret_cmd), GFP_KERNEL); - if (!ret_cmd) { - rc = -ENOMEM; - break; - } - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, - &stream_id); - if (WARN_ON(!cmd_ack)) { - kzfree(ret_cmd); - rc = -EFAULT; - break; - } - - spin_lock_irqsave(&(session->command_ack_q.lock), - spin_flags); - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - memcpy(&ret_cmd->event, &event, sizeof(struct v4l2_event)); - msm_enqueue(&cmd_ack->command_q, &ret_cmd->list); - complete(&cmd_ack->wait_complete); - spin_unlock_irqrestore(&(session->command_ack_q.lock), - spin_flags); - } - break; - - case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR: - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, - struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - break; - - default: - rc = -ENOTTY; - break; - } - - return rc; -} - -static int msm_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static int msm_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, 5, NULL); -} - -static const struct v4l2_ioctl_ops g_msm_ioctl_ops = { - .vidioc_subscribe_event = msm_subscribe_event, - .vidioc_unsubscribe_event = msm_unsubscribe_event, - .vidioc_default = msm_private_ioctl, -}; - -static unsigned int msm_poll(struct file *f, - struct poll_table_struct *pll_table) -{ - int rc = 0; - struct v4l2_fh *eventq = f->private_data; - - BUG_ON(!eventq); - - poll_wait(f, &eventq->wait, pll_table); - - if (v4l2_event_pending(eventq)) - rc = POLLIN | POLLRDNORM; - - return rc; -} - -static void msm_print_event_error(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - pr_err("Evt_type=%x Evt_id=%d Evt_cmd=%x\n", event->type, - event->id, event_data->command); - pr_err("Evt_session_id=%d Evt_stream_id=%d Evt_arg=%d\n", - event_data->session_id, event_data->stream_id, - event_data->arg_value); -} - -/* something seriously wrong if msm_close is triggered - * !!! user space imaging server is shutdown !!! - */ -int msm_post_event(struct v4l2_event *event, int timeout) -{ - int rc = 0; - struct video_device *vdev; - struct msm_session *session; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_command_ack *cmd_ack; - struct msm_command *cmd; - int session_id, stream_id; - unsigned long flags = 0; - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - spin_lock_irqsave(&msm_eventq_lock, flags); - if (!msm_eventq) { - spin_unlock_irqrestore(&msm_eventq_lock, flags); - pr_err("%s : msm event queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - spin_unlock_irqrestore(&msm_eventq_lock, flags); - - vdev = msm_eventq->vdev; - - /* send to imaging server and wait for ACK */ - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) { - pr_err("%s : session not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - mutex_lock(&session->lock); - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, &stream_id); - if (WARN_ON(!cmd_ack)) { - mutex_unlock(&session->lock); - pr_err("%s : cmd_ack not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - - /*re-init wait_complete */ - INIT_COMPLETION(cmd_ack->wait_complete); - - v4l2_event_queue(vdev, event); - - if (timeout < 0) { - mutex_unlock(&session->lock); - pr_err("%s : timeout cannot be negative Line %d\n", - __func__, __LINE__); - return rc; - } - - /* should wait on session based condition */ - rc = wait_for_completion_timeout(&cmd_ack->wait_complete, - msecs_to_jiffies(timeout)); - - - if (list_empty_careful(&cmd_ack->command_q.list)) { - if (!rc) { - pr_err("%s: Timed out\n", __func__); - msm_print_event_error(event); - rc = -ETIMEDOUT; - } else { - pr_err("%s: Error: No timeout but list empty!", - __func__); - msm_print_event_error(event); - mutex_unlock(&session->lock); - return -EINVAL; - } - } - - cmd = msm_dequeue(&cmd_ack->command_q, - struct msm_command, list); - if (!cmd) { - mutex_unlock(&session->lock); - pr_err("%s : cmd dequeue failed Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - event_data = (struct msm_v4l2_event_data *)cmd->event.u.data; - - /* compare cmd_ret and event */ - if (WARN_ON(event->type != cmd->event.type) || - WARN_ON(event->id != cmd->event.id)) { - pr_err("%s : Either event type or id didnot match Line %d\n", - __func__, __LINE__); - pr_err("%s : event->type %d event->id %d\n", __func__, - event->type, event->id); - pr_err("%s : cmd->event.type %d cmd->event.id %d\n", __func__, - cmd->event.type, cmd->event.id); - rc = -EINVAL; - } - - *event = cmd->event; - - kzfree(cmd); - mutex_unlock(&session->lock); - return rc; -} - -static int msm_close(struct file *filep) -{ - int rc = 0; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - struct msm_sd_close_ioctl sd_close; - struct msm_sd_subdev *msm_sd; - - /*stop all hardware blocks immediately*/ - if (!list_empty(&msm_v4l2_dev->subdevs)) - list_for_each_entry(msm_sd, &ordered_sd_list, list) - __msm_sd_close_subdevs(msm_sd, &sd_close); - -#ifndef CONFIG_ARCH_MSM8939 - /* remove msm_v4l2_pm_qos_request */ - msm_pm_qos_remove_request(); -#endif - - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = NULL; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - v4l2_fh_release(filep); - - spin_lock_irqsave(&msm_pid_lock, flags); - put_pid(msm_pid); - msm_pid = NULL; - spin_unlock_irqrestore(&msm_pid_lock, flags); - - atomic_set(&pvdev->opened, 0); - - return rc; -} - -static inline void msm_list_switch(struct list_head *l1, - struct list_head *l2) -{ - l1->next = l2->next; - l2->prev = l1->prev; - l1->prev->next = l2; - l2->next->prev = l1; - l1->prev = l2; - l2->next = l1; -} - -static int msm_open(struct file *filep) -{ - int rc; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - BUG_ON(!pvdev); - - /* !!! only ONE open is allowed !!! */ - if (atomic_read(&pvdev->opened)) - return -EBUSY; - - atomic_set(&pvdev->opened, 1); - - spin_lock_irqsave(&msm_pid_lock, flags); - msm_pid = get_pid(task_pid(current)); - spin_unlock_irqrestore(&msm_pid_lock, flags); - - /* create event queue */ - rc = v4l2_fh_open(filep); - if (rc < 0) - return rc; - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = filep->private_data; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - -#ifndef CONFIG_ARCH_MSM8939 - /* register msm_v4l2_pm_qos_request */ - msm_pm_qos_add_request(); -#endif - - return rc; -} - -static struct v4l2_file_operations msm_fops = { - .owner = THIS_MODULE, - .open = msm_open, - .poll = msm_poll, - .release = msm_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = video_ioctl2, -#endif -}; - -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return ERR_PTR(-EINVAL); - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - - if (!stream) - return ERR_PTR(-EINVAL); - - return stream; -} - -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return NULL; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return NULL; - - return stream->vb2_q; -} - -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - unsigned long flags1; - unsigned long flags2; - spin_lock_irqsave(&msm_session_q->lock, flags1); - list_for_each_entry(session, &(msm_session_q->list), list) { - spin_lock_irqsave(&(session->stream_q.lock), flags2); - list_for_each_entry( - stream, &(session->stream_q.list), list) { - if (stream->vb2_q == q) { - spin_unlock_irqrestore - (&(session->stream_q.lock), flags2); - spin_unlock_irqrestore - (&msm_session_q->lock, flags1); - return stream; - } - } - spin_unlock_irqrestore(&(session->stream_q.lock), flags2); - } - spin_unlock_irqrestore(&msm_session_q->lock, flags1); - return NULL; -} - -static struct v4l2_subdev *msm_sd_find(const char *name) -{ - unsigned long flags; - struct v4l2_subdev *subdev = NULL; - struct v4l2_subdev *subdev_out = NULL; - - spin_lock_irqsave(&msm_v4l2_dev->lock, flags); - if (!list_empty(&msm_v4l2_dev->subdevs)) { - list_for_each_entry(subdev, &msm_v4l2_dev->subdevs, list) - if (!strcmp(name, subdev->name)) { - subdev_out = subdev; - break; - } - } - spin_unlock_irqrestore(&msm_v4l2_dev->lock, flags); - - return subdev_out; -} - -static void msm_sd_notify(struct v4l2_subdev *sd, - unsigned int notification, void *arg) -{ - int rc = 0; - struct v4l2_subdev *subdev = NULL; - - BUG_ON(!sd); - BUG_ON(!arg); - - /* Check if subdev exists before processing*/ - if (!msm_sd_find(sd->name)) - return; - - switch (notification) { - case MSM_SD_NOTIFY_GET_SD: { - struct msm_sd_req_sd *get_sd = arg; - - get_sd->subdev = msm_sd_find(get_sd->name); - /* TODO: might need to add ref count on ret_sd */ - } - break; - - case MSM_SD_NOTIFY_PUT_SD: { - struct msm_sd_req_sd *put_sd = arg; - subdev = msm_sd_find(put_sd->name); - } - break; - - case MSM_SD_NOTIFY_REQ_CB: { - struct msm_sd_req_vb2_q *req_sd = arg; - rc = msm_vb2_request_cb(req_sd); - if (rc < 0) - return; - } - break; - - default: - break; - } -} - -static int msm_probe(struct platform_device *pdev) -{ - struct msm_video_device *pvdev; - int rc = 0; - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CONFIGURATION_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - msm_v4l2_dev->notify = msm_sd_notify; - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-config", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops; - pvdev->vdev->ioctl_ops = &g_msm_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - msm_session_q = kzalloc(sizeof(*msm_session_q), GFP_KERNEL); - if (WARN_ON(!msm_session_q)) - goto v4l2_fail; - - msm_init_queue(msm_session_q); - spin_lock_init(&msm_eventq_lock); - spin_lock_init(&msm_pid_lock); - INIT_LIST_HEAD(&ordered_sd_list); - init_waitqueue_head(&cam_dummy_queue.state_wait); - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static const struct of_device_id msm_dt_match[] = { - {.compatible = "qcom,msm-cam"}, - {} -} - -MODULE_DEVICE_TABLE(of, msm_dt_match); - -static struct platform_driver msm_driver = { - .probe = msm_probe, - .driver = { - .name = "msm", - .owner = THIS_MODULE, - .of_match_table = msm_dt_match, - }, -}; - -static int __init msm_init(void) -{ - return platform_driver_register(&msm_driver); -} - -static void __exit msm_exit(void) -{ - platform_driver_unregister(&msm_driver); -} - - -module_init(msm_init); -module_exit(msm_exit); -MODULE_DESCRIPTION("MSM V4L2 Camera"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm.h b/drivers/media/platform/msm/camera_v2_fortuna/msm.h deleted file mode 100644 index 8d3dbccadc89..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm.h +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_H -#define _MSM_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/media/msmb_camera.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define MSM_POST_EVT_TIMEOUT 40000 -#else -#define MSM_POST_EVT_TIMEOUT 5000 -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -enum CAMERA_TUNING -{ -NORMAL_MODE, -REAR_TUNING, -FRONT_TUNING, -REAR_FRONT_TUNING -}; -#endif - -#define MSM_POST_EVT_NOTIMEOUT 0xFFFFFFFF -#define MSM_CAMERA_STREAM_CNT_BITS 32 - -#ifndef CONFIG_ARCH_MSM8939 -#define CAMERA_DISABLE_PC_LATENCY 200 -#define CAMERA_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE -#endif - -struct msm_video_device { - struct video_device *vdev; - atomic_t opened; -}; - -struct msm_queue_head { - struct list_head list; - spinlock_t lock; - int len; - int max; -}; - -/** msm_event: - * - * event sent by imaging server - **/ -struct msm_event { - struct video_device *vdev; - atomic_t on_heap; -}; - -struct msm_command { - struct list_head list; - struct v4l2_event event; - atomic_t on_heap; -}; - -/** struct msm_command_ack - * - * Object of command_ack_q, which is - * created per open operation - * - * contains struct msm_command - **/ -struct msm_command_ack { - struct list_head list; - struct msm_queue_head command_q; - struct completion wait_complete; - int stream_id; -}; - -struct msm_v4l2_subdev { - /* FIXME: for session close and error handling such - * as daemon shutdown */ - int close_sequence; -}; - -struct msm_session { - struct list_head list; - - /* session index */ - unsigned int session_id; - - /* event queue sent by imaging server */ - struct msm_event event_q; - - /* ACK by imaging server. Object type of - * struct msm_command_ack per open, - * assumption is application can send - * command on every opened video node */ - struct msm_queue_head command_ack_q; - - /* real streams(either data or metadate) owned by one - * session struct msm_stream */ - struct msm_queue_head stream_q; - struct mutex lock; -}; - -#ifndef CONFIG_ARCH_MSM8939 -void msm_pm_qos_update_request(int val); -#endif - -int msm_cam_get_module_init_status(void); -int msm_post_event(struct v4l2_event *event, int timeout); -int msm_create_session(unsigned int session, struct video_device *vdev); -int msm_destroy_session(unsigned int session_id); - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q); -void msm_delete_stream(unsigned int session_id, unsigned int stream_id); -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id); -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id); -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id); -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id); -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q); -struct msm_session *msm_session_find(unsigned int session_id); -#endif /*_MSM_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/Makefile deleted file mode 100644 index 53cb511e31d7..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -obj-$(CONFIG_MSMB_CAMERA) += msm_generic_buf_mgr.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.c b/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.c deleted file mode 100644 index eb385616d75d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.c +++ /dev/null @@ -1,352 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include "msm_generic_buf_mgr.h" - -static struct msm_buf_mngr_device *msm_buf_mngr_dev; - -struct v4l2_subdev *msm_buf_mngr_get_subdev(void) -{ - return &msm_buf_mngr_dev->subdev.sd; -} - -static int32_t msm_buf_mngr_get_buf(struct msm_buf_mngr_device *buf_mngr_dev, - void __user *argp) -{ - unsigned long flags; - struct msm_buf_mngr_info *buf_info = - (struct msm_buf_mngr_info *)argp; - struct msm_get_bufs *new_entry = - kzalloc(sizeof(struct msm_get_bufs), GFP_KERNEL); - - if (!new_entry) { - pr_err("%s:No mem\n", __func__); - return -ENOMEM; - } - INIT_LIST_HEAD(&new_entry->entry); - new_entry->vb2_buf = buf_mngr_dev->vb2_ops.get_buf(buf_info->session_id, - buf_info->stream_id); - if (!new_entry->vb2_buf) { - pr_debug("%s:Get buf is null\n", __func__); - kfree(new_entry); - return -EINVAL; - } - new_entry->session_id = buf_info->session_id; - new_entry->stream_id = buf_info->stream_id; - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_add_tail(&new_entry->entry, &buf_mngr_dev->buf_qhead); - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - buf_info->index = new_entry->vb2_buf->v4l2_buf.index; - return 0; -} - -static int32_t msm_buf_mngr_buf_done(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - bufs->vb2_buf->v4l2_buf.sequence = buf_info->frame_id; - bufs->vb2_buf->v4l2_buf.timestamp = buf_info->timestamp; - bufs->vb2_buf->v4l2_buf.reserved = 0; - ret = buf_mngr_dev->vb2_ops.buf_done - (bufs->vb2_buf, - buf_info->session_id, - buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - - -static int32_t msm_buf_mngr_put_buf(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - ret = buf_mngr_dev->vb2_ops.put_buf(bufs->vb2_buf, - buf_info->session_id, buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - -static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *buf_mngr_dev) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - if (!list_empty(&buf_mngr_dev->buf_qhead)) { - list_for_each_entry_safe(bufs, - save, &buf_mngr_dev->buf_qhead, entry) { - pr_err("%s: Error delete invalid bufs =%x, ses_id=%d, str_id=%d, idx=%d\n", - __func__, (unsigned int)bufs, bufs->session_id, - bufs->stream_id, bufs->vb2_buf->v4l2_buf.index); - list_del_init(&bufs->entry); - kfree(bufs); - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); -} - -static int msm_generic_buf_mngr_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static int msm_generic_buf_mngr_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static long msm_buf_mngr_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - rc = msm_buf_mngr_get_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - rc = msm_buf_mngr_buf_done(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = msm_buf_mngr_put_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_INIT: - rc = msm_generic_buf_mngr_open(sd, NULL); - break; - case VIDIOC_MSM_BUF_MNGR_DEINIT: - rc = msm_generic_buf_mngr_close(sd, NULL); - break; - case MSM_SD_SHUTDOWN: - msm_buf_mngr_sd_shutdown(buf_mngr_dev); - break; - default: - return -ENOIOCTLCMD; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - int32_t rc = 0; - - void __user *up = compat_ptr(arg); - - struct msm_buf_mngr_info32_t *buf_info32 = NULL; - struct msm_buf_mngr_info *buf_info; - - if (copy_from_user(buf_info32, (void __user *)up, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - buf_info->session_id = buf_info32->session_id; - buf_info->stream_id = buf_info32->stream_id; - buf_info->frame_id = buf_info32->frame_id; - buf_info->index = buf_info32->index; - buf_info->timestamp.tv_sec = (long) buf_info32->timestamp.tv_sec; - buf_info->timestamp.tv_usec = (long) buf_info32->timestamp.tv_usec; - - /* Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's - * except VIDIOC_MSM_CPP_CFG32, which needs special - * processing - */ - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_GET_BUF; - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE32: - cmd = VIDIOC_MSM_BUF_MNGR_BUF_DONE; - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_PUT_BUF; - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = v4l2_subdev_call(sd, core, ioctl, cmd, buf_info); - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - buf_info32->session_id = buf_info->session_id; - buf_info32->stream_id = buf_info->stream_id; - buf_info32->index = buf_info->index; - buf_info32->timestamp.tv_sec = (int32_t) buf_info->timestamp.tv_sec; - buf_info32->timestamp.tv_usec = (int32_t) buf_info->timestamp.tv_usec; - - if (copy_to_user((void __user *)up, buf_info32, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - return 0; -} -#endif - -static struct v4l2_subdev_core_ops msm_buf_mngr_subdev_core_ops = { - .ioctl = msm_buf_mngr_subdev_ioctl, -}; - -static const struct v4l2_subdev_internal_ops - msm_generic_buf_mngr_subdev_internal_ops = { - .open = msm_generic_buf_mngr_open, - .close = msm_generic_buf_mngr_close, -}; - -static const struct v4l2_subdev_ops msm_buf_mngr_subdev_ops = { - .core = &msm_buf_mngr_subdev_core_ops, -}; - -static const struct of_device_id msm_buf_mngr_dt_match[] = { - {.compatible = "qcom,msm_buf_mngr"}, - {} -}; - -static struct v4l2_file_operations msm_buf_v4l2_subdev_fops; - -static long msm_bmgr_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); -} - - -static long msm_buf_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_bmgr_subdev_do_ioctl); -} - -static int32_t __init msm_buf_mngr_init(void) -{ - int32_t rc = 0; - msm_buf_mngr_dev = kzalloc(sizeof(*msm_buf_mngr_dev), - GFP_KERNEL); - if (WARN_ON(!msm_buf_mngr_dev)) { - pr_err("%s: not enough memory", __func__); - return -ENOMEM; - } - /* Sub-dev */ - v4l2_subdev_init(&msm_buf_mngr_dev->subdev.sd, - &msm_buf_mngr_subdev_ops); - - msm_buf_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_buf_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_buf_v4l2_subdev_fops.unlocked_ioctl = msm_buf_subdev_fops_ioctl; - msm_buf_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_buf_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - -#ifdef CONFIG_COMPAT - msm_buf_v4l2_subdev_fops.compat_ioctl32 = - msm_bmgr_subdev_fops_compat_ioctl; -#endif - snprintf(msm_buf_mngr_dev->subdev.sd.name, - ARRAY_SIZE(msm_buf_mngr_dev->subdev.sd.name), "msm_buf_mngr"); - msm_buf_mngr_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - v4l2_set_subdevdata(&msm_buf_mngr_dev->subdev.sd, msm_buf_mngr_dev); - - media_entity_init(&msm_buf_mngr_dev->subdev.sd.entity, 0, NULL, 0); - msm_buf_mngr_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_buf_mngr_dev->subdev.sd.entity.group_id = - MSM_CAMERA_SUBDEV_BUF_MNGR; - msm_buf_mngr_dev->subdev.sd.internal_ops = - &msm_generic_buf_mngr_subdev_internal_ops; - msm_buf_mngr_dev->subdev.close_seq = MSM_SD_CLOSE_4TH_CATEGORY; - rc = msm_sd_register(&msm_buf_mngr_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto end; - } - - msm_buf_mngr_dev->subdev.sd.devnode->fops = &msm_buf_v4l2_subdev_fops; - - v4l2_subdev_notify(&msm_buf_mngr_dev->subdev.sd, MSM_SD_NOTIFY_REQ_CB, - &msm_buf_mngr_dev->vb2_ops); - - INIT_LIST_HEAD(&msm_buf_mngr_dev->buf_qhead); - spin_lock_init(&msm_buf_mngr_dev->buf_q_spinlock); -end: - return rc; -} - -static void __exit msm_buf_mngr_exit(void) -{ - kfree(msm_buf_mngr_dev); -} - -module_init(msm_buf_mngr_init); -module_exit(msm_buf_mngr_exit); -MODULE_DESCRIPTION("MSM Buffer Manager"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.h b/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.h deleted file mode 100644 index 754c8a078960..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_buf_mgr/msm_generic_buf_mgr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_BUF_GENERIC_MNGR_H__ -#define __MSM_BUF_GENERIC_MNGR_H__ - -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include - -#include "msm.h" -#include "msm_sd.h" - -struct msm_get_bufs { - struct list_head entry; - struct vb2_buffer *vb2_buf; - uint32_t session_id; - uint32_t stream_id; -}; - -struct msm_buf_mngr_device { - struct list_head buf_qhead; - spinlock_t buf_q_spinlock; - struct msm_sd_subdev subdev; - struct msm_sd_req_vb2_q vb2_ops; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_sd.h b/drivers/media/platform/msm/camera_v2_fortuna/msm_sd.h deleted file mode 100644 index 9ab74f4a6ce1..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_sd.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_SD_H -#define _MSM_SD_H - -#include -#include "include/media/msmb_camera.h" - -/* NOTE: this header file should ONLY be included by subdev drivers */ - -struct msm_sd_close_ioctl { - unsigned int session; - unsigned int stream; -}; - -#define MSM_SD_CLOSE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 26, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 27, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION_AND_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 28, struct msm_sd_close_ioctl) - -#define MSM_SD_SHUTDOWN \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 29, struct msm_sd_close_ioctl) - -/* - * This is used to install Sequence in msm_sd_register. - * During msm_close, proper close sequence will be triggered. - * For example: - * - * close_sequence = 0x00100001 (ISP) - * close_sequence = 0x00100002 (ISP) - * close_sequence = 0x00100003 (ISP) - * close_sequence = 0x00200001 (sensor) - * close_sequence = 0x00200002 (sensor) - * close_sequence = 0x00200003 (sensor) - */ -#define MSM_SD_CLOSE_1ST_CATEGORY 0x00010000 -#define MSM_SD_CLOSE_2ND_CATEGORY 0x00020000 -#define MSM_SD_CLOSE_3RD_CATEGORY 0x00030000 -#define MSM_SD_CLOSE_4TH_CATEGORY 0x00040000 - -struct msm_sd_subdev { - struct v4l2_subdev sd; - int close_seq; - struct list_head list; -}; - -struct msm_sd_req_sd { - char *name; - struct v4l2_subdev *subdev; -}; - -struct msm_sd_req_vb2_q { - struct vb2_buffer *(*get_buf)(int session_id, unsigned int stream_id); - struct vb2_queue *(*get_vb2_queue)(int session_id, - unsigned int stream_id); - int (*put_buf)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); - int (*buf_done)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); -}; - -#define MSM_SD_NOTIFY_GET_SD 0x00000001 -#define MSM_SD_NOTIFY_PUT_SD 0x00000002 -#define MSM_SD_NOTIFY_REQ_CB 0x00000003 - -int msm_sd_register(struct msm_sd_subdev *msm_subdev); -int msm_sd_unregister(struct msm_sd_subdev *sd); -struct v4l2_subdev *msm_sd_get_subdev(struct v4l2_subdev *sd, - const char *get_name); -void msm_sd_put_subdev(struct v4l2_subdev *sd, struct v4l2_subdev *put); - -#endif /*_MSM_SD_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/Makefile deleted file mode 100644 index 47785ec433de..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.c b/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.c deleted file mode 100644 index 6e9336a20d29..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "msm_vb2.h" - -static int msm_vb2_queue_setup(struct vb2_queue *q, - const struct v4l2_format *fmt, - unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) -{ - int i; - struct msm_v4l2_format_data *data = q->drv_priv; - - if (!data) { - pr_err("%s: drv_priv NULL\n", __func__); - return -EINVAL; - } - if (data->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - if (WARN_ON(data->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - - *num_planes = data->num_planes; - - for (i = 0; i < data->num_planes; i++) - sizes[i] = data->plane_sizes[i]; - } else { - pr_err("%s: Unsupported buf type :%d\n", __func__, - data->type); - return -EINVAL; - } - return 0; -} - -int msm_vb2_buf_init(struct vb2_buffer *vb) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2_buf; - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s: Couldn't find stream\n", __func__); - return -EINVAL; - } - msm_vb2_buf = container_of(vb, struct msm_vb2_buffer, vb2_buf); - msm_vb2_buf->in_freeq = 0; - - return 0; -} - -static void msm_vb2_buf_queue(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_add_tail(&msm_vb2->list, &stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static int msm_vb2_buf_finish(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - struct msm_vb2_buffer *msm_vb2_entry, *temp; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return -EINVAL; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return -EINVAL; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_for_each_entry_safe(msm_vb2_entry, temp, &(stream->queued_list), - list) { - if (msm_vb2_entry == msm_vb2) { - list_del_init(&msm_vb2_entry->list); - break; - } - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return 0; -} - -static void msm_vb2_buf_cleanup(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2 NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - INIT_LIST_HEAD(&stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static struct vb2_ops msm_vb2_get_q_op = { - .queue_setup = msm_vb2_queue_setup, - .buf_init = msm_vb2_buf_init, - .buf_queue = msm_vb2_buf_queue, - .buf_cleanup = msm_vb2_buf_cleanup, - .buf_finish = msm_vb2_buf_finish, -}; - - -struct vb2_ops *msm_vb2_get_q_ops(void) -{ - return &msm_vb2_get_q_op; -} - -static void *msm_vb2_dma_contig_get_userptr(void *alloc_ctx, - unsigned long vaddr, unsigned long size, int write) -{ - struct msm_vb2_private_data *priv; - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) - return ERR_PTR(-ENOMEM); - priv->vaddr = (void *)vaddr; - priv->size = size; - priv->alloc_ctx = alloc_ctx; - return priv; -} - -static void msm_vb2_dma_contig_put_userptr(void *buf_priv) -{ - kzfree(buf_priv); -} - -static struct vb2_mem_ops msm_vb2_get_q_mem_op = { - .get_userptr = msm_vb2_dma_contig_get_userptr, - .put_userptr = msm_vb2_dma_contig_put_userptr, -}; - -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void) -{ - return &msm_vb2_get_q_mem_op; -} - -static struct vb2_queue *msm_vb2_get_queue(int session_id, - unsigned int stream_id) -{ - return msm_get_stream_vb2q(session_id, stream_id); -} - -static struct vb2_buffer *msm_vb2_get_buf(int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - struct msm_vb2_buffer *msm_vb2 = NULL; - unsigned long flags; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return NULL; - - spin_lock_irqsave(&stream->stream_lock, flags); - - if (!stream->vb2_q) { - pr_err("%s: stream q not available\n", __func__); - goto end; - } - - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf->state != VB2_BUF_STATE_ACTIVE) - continue; - - if (msm_vb2->in_freeq) - continue; - - msm_vb2->in_freeq = 1; - goto end; - } - msm_vb2 = NULL; - vb2_buf = NULL; -end: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return vb2_buf; -} - -static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2; - int rc = 0; - unsigned long flags; - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return -EINVAL; - - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - if (msm_vb2->in_freeq) { - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s: VB buffer is null\n", __func__); - rc = -EINVAL; - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -static int msm_vb2_buf_done(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - unsigned long flags; - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - int rc = 0; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return 0; - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf == vb) - break; - } - if (vb2_buf != vb) { - pr_err("%s:%d VB buffer is INVALID vb=%x, ses_id=%d, str_id=%d\n", - __func__, __LINE__, (unsigned int)vb, - session_id, stream_id); - rc = -EINVAL; - goto out; - } - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - /* put buf before buf done */ - if (msm_vb2->in_freeq) { - vb2_buffer_done(vb, VB2_BUF_STATE_DONE); - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s:%d VB buffer is NULL for ses_id=%d, str_id=%d\n", - __func__, __LINE__, session_id, stream_id); - rc = -EINVAL; - } -out: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req) -{ - if (!req) { - pr_err("%s: suddev is null\n", __func__); - return -EINVAL; - } - - req->get_buf = msm_vb2_get_buf; - req->get_vb2_queue = msm_vb2_get_queue; - req->put_buf = msm_vb2_put_buf; - req->buf_done = msm_vb2_buf_done; - - return 0; -} - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.h b/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.h deleted file mode 100644 index e4b7c670a8d1..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/msm_vb2/msm_vb2.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_VB_H -#define _MSM_VB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include -#include "msm.h" -#include "msm_sd.h" - -struct msm_vb2_buffer { - /* - * vb2 buffer has to be first in the structure - * because both v4l2 frameworks and driver directly - * cast msm_vb2_buffer to a vb2_buf. - */ - struct vb2_buffer vb2_buf; - struct list_head list; - int in_freeq; -}; - -struct msm_vb2_private_data { - void *vaddr; - unsigned long size; - /* Offset of the plane inside the buffer */ - void *alloc_ctx; -}; - -struct msm_stream { - struct list_head list; - - /* stream index per session, same - * as stream_id but set through s_parm */ - unsigned int stream_id; - /* vb2 buffer handling */ - struct vb2_queue *vb2_q; - spinlock_t stream_lock; - struct list_head queued_list; -}; - -struct vb2_ops *msm_vb2_get_q_ops(void); -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void); -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req_sd); - -#endif /*_MSM_VB_H */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/pproc/Makefile deleted file mode 100644 index 4193adc173f7..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_MSMB_CAMERA) += cpp/ -obj-$(CONFIG_MSMB_CAMERA) += vpe/ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/Makefile deleted file mode 100644 index dfae8dbd5223..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/isp/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSM_CPP) += msm_cpp.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.c deleted file mode 100644 index ca29e9cdf140..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.c +++ /dev/null @@ -1,2292 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-CPP %s:%d " fmt, __func__, __LINE__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_camera.h" -#include -#include "../../include/media/msmb_pproc.h" -#include -#include "msm_cpp.h" -#include "msm_isp_util.h" -#include "msm_camera_io_util.h" -#include - -#define MSM_CPP_DRV_NAME "msm_cpp" - -#define MSM_CPP_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_CPP_DBG 0 - -#define ENABLE_CPP_LOW 0 - -#define CPP_CMD_TIMEOUT_MS 300 - -#define MSM_CPP_CORE_CLK_IDX 4 -#define MSM_MICRO_IFACE_CLK_IDX 7 - -#define MSM_CPP_NOMINAL_CLOCK 266670000 -#define MSM_CPP_TURBO_CLOCK 320000000 - -#define CPP_FW_VERSION_1_2_0 0x10020000 -#define CPP_FW_VERSION_1_4_0 0x10040000 -#define CPP_FW_VERSION_1_6_0 0x10060000 - -/* stripe information offsets in frame command */ -#define STRIPE_BASE_FW_1_2_0 130 -#define STRIPE_BASE_FW_1_4_0 140 -#define STRIPE_BASE_FW_1_6_0 464 - - -/* dump the frame command before writing to the hardware */ -#define MSM_CPP_DUMP_FRM_CMD 0 - -#define CPP_CLK_INFO_MAX 16 - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info); - -#if CONFIG_MSM_CPP_DBG -#define CPP_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CPP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define CPP_LOW(fmt, args...) do { \ - if (ENABLE_CPP_LOW) \ - pr_info(fmt, ##args); \ - } while (0) - -#define ERR_USER_COPY(to) pr_err("copy %s user\n", \ - ((to) ? "to" : "from")) -#define ERR_COPY_FROM_USER() ERR_USER_COPY(0) - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ -}) - -struct msm_cpp_timer_data_t { - struct cpp_device *cpp_dev; - struct msm_cpp_frame_info_t *processed_frame; -}; - -struct msm_cpp_timer_t { - atomic_t used; - struct msm_cpp_timer_data_t data; - struct timer_list cpp_timer; -}; - -struct msm_cpp_timer_t cpp_timer; - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - CPP_DBG("E\n"); - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_info("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - CPP_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -#define msm_cpp_empty_list(queue, member) { \ - unsigned long flags; \ - struct msm_queue_cmd *qcmd = NULL; \ - if (queue) { \ - spin_lock_irqsave(&queue->lock, flags); \ - while (!list_empty(&queue->list)) { \ - queue->len--; \ - qcmd = list_first_entry(&queue->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - kfree(qcmd); \ - } \ - spin_unlock_irqrestore(&queue->lock, flags); \ - } \ -} - -static struct msm_cam_clk_info cpp_clk_info[CPP_CLK_INFO_MAX]; - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev); -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin); -static void cpp_timer_callback(unsigned long data); - -uint8_t induce_error; -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev); - -static void msm_cpp_write(u32 data, void __iomem *cpp_base) -{ - writel_relaxed((data), cpp_base + MSM_CPP_MICRO_FIFO_RX_DATA); -} - -static uint32_t msm_cpp_read(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - do { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_STAT); - } while (((tmp & 0x2) == 0x0) && (retry++ < 10)) ; - if (retry < 10) { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_DATA); - CPP_DBG("Read data: 0%x\n", tmp); - } else { - CPP_DBG("Read failed\n"); - tmp = 0xDEADBEEF; - } - - return tmp; -} - -static struct msm_cpp_buff_queue_info_t *msm_cpp_get_buff_queue_entry( - struct cpp_device *cpp_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if ((cpp_dev->buff_queue[i].used == 1) && - (cpp_dev->buff_queue[i].session_id == session_id) && - (cpp_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &cpp_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_cpp_get_phy_addr(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff, int *fd) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - *fd = buff->map_info.buff_info.fd; - break; - } - } - - return phy_add; -} - -static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue, - struct msm_cpp_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_cpp_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(cpp_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto QUEUE_BUFF_ERROR1; - } - rc = ion_map_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto QUEUE_BUFF_ERROR2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -QUEUE_BUFF_ERROR2: - ion_free(cpp_dev->client, buff->map_info.ion_handle); -QUEUE_BUFF_ERROR1: - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_cpp_dequeue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_map_list_t *buff) -{ - - ion_unmap_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0); - ion_free(cpp_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_cpp_fetch_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id, int *fd) -{ - unsigned long phy_addr = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_cpp_get_phy_addr(cpp_dev, buff_queue_info, - buffer_info->index, native_buff, fd); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - buffer_info); - *fd = buffer_info->fd; - } - return phy_addr; -} - -static int32_t msm_cpp_enqueue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_cpp_dequeue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info) -{ - struct msm_cpp_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - return 0; -} - -static int32_t msm_cpp_add_buff_queue_entry(struct cpp_device *cpp_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 0) { - buff_queue_info = &cpp_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_cpp_free_buff_queue_entry(struct cpp_device *cpp_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_cpp_create_buff_queue(struct cpp_device *cpp_dev, - uint32_t num_buffq) -{ - struct msm_cpp_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_cpp_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (cpp_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - cpp_dev->buff_queue = buff_queue; - cpp_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_cpp_delete_buff_queue(struct cpp_device *cpp_dev) -{ - uint32_t i; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - msm_cpp_dequeue_buff_info_list - (cpp_dev, &cpp_dev->buff_queue[i]); - msm_cpp_free_buff_queue_entry(cpp_dev, - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - } - } - kzfree(cpp_dev->buff_queue); - cpp_dev->buff_queue = NULL; - cpp_dev->num_buffq = 0; - return; -} - -static void msm_cpp_poll(void __iomem *cpp_base, u32 val) -{ - uint32_t tmp, retry = 0; - do { - usleep_range(1000, 2000); - tmp = msm_cpp_read(cpp_base); - if (tmp != 0xDEADBEEF) - CPP_LOW("poll: 0%x\n", tmp); - } while ((tmp != val) && (retry++ < MSM_CPP_POLL_RETRIES)); - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll finished\n"); - else - pr_err("Poll failed: expect: 0x%x\n", val); -} - -static void msm_cpp_poll_rx_empty(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - while (((tmp & 0x2) != 0x0) && (retry++ < MSM_CPP_POLL_RETRIES)) { - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to read rx fifo.*/ - usleep_range(200, 300); - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - } - - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll rx empty\n"); - else - pr_err("Poll rx empty failed\n"); -} - -void cpp_release_ion_client(struct kref *ref) -{ - struct cpp_device *cpp_dev = container_of(ref, - struct cpp_device, refcount); - pr_err("Calling ion_client_destroy\n"); - ion_client_destroy(cpp_dev->client); -} - -static int cpp_init_mem(struct cpp_device *cpp_dev) -{ - int rc = 0; - - kref_init(&cpp_dev->refcount); - kref_get(&cpp_dev->refcount); - cpp_dev->client = msm_ion_client_create("cpp"); - - CPP_DBG("E\n"); - if (!cpp_dev->domain) { - pr_err("domain / iommu context not found\n"); - return -ENODEV; - } - - CPP_DBG("X\n"); - return rc; -} - -static void cpp_deinit_mem(struct cpp_device *cpp_dev) -{ - CPP_DBG("E\n"); - kref_put(&cpp_dev->refcount, cpp_release_ion_client); - CPP_DBG("X\n"); -} - -static irqreturn_t msm_cpp_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t tx_level; - uint32_t irq_status; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - irq_status = msm_camera_io_r(cpp_dev->base + MSM_CPP_MICRO_IRQGEN_STAT); - CPP_DBG("status: 0x%x\n", irq_status); - if (irq_status & 0x8) { - tx_level = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_STAT) >> 2; - for (i = 0; i < tx_level; i++) { - tx_fifo[i] = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_DATA); - } - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = &cpp_dev->tasklet_queue_cmd[cpp_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err("%s: cpp tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &cpp_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - queue_cmd->tx_level = tx_level; - memset(&queue_cmd->tx_fifo[0], 0, sizeof(queue_cmd->tx_fifo)); - for (i = 0; i < tx_level; i++) - queue_cmd->tx_fifo[i] = tx_fifo[i]; - - queue_cmd->cmd_used = 1; - cpp_dev->taskletq_idx = - (cpp_dev->taskletq_idx + 1) % MSM_CPP_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &cpp_dev->tasklet_q); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - tasklet_schedule(&cpp_dev->cpp_tasklet); - } else if (irq_status & 0x7C0) { - pr_err("%s: fatal error: 0x%x\n", __func__, irq_status); - pr_err("%s: DEBUG_SP: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_err("%s: DEBUG_T: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_err("%s: DEBUG_N: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_err("%s: DEBUG_R: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_err("%s: DEBUG_OPPC: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_err("%s: DEBUG_MO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_err("%s: DEBUG_TIMER0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_err("%s: DEBUG_TIMER1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_err("%s: DEBUG_GPI: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_err("%s: DEBUG_GPO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_err("%s: DEBUG_T0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_err("%s: DEBUG_R0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_err("%s: DEBUG_T1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_err("%s: DEBUG_R1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - } - msm_camera_io_w(irq_status, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - return IRQ_HANDLED; -} - -void msm_cpp_do_tasklet(unsigned long data) -{ - unsigned long flags; - uint32_t irq_status; - uint32_t tx_level; - uint32_t msg_id, cmd_len; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = (struct cpp_device *) data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - struct msm_cpp_timer_t *timer = NULL; - - while (atomic_read(&cpp_dev->irq_cnt)) { - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&cpp_dev->tasklet_q, - struct msm_cpp_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&cpp_dev->irq_cnt, 0); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &cpp_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status = queue_cmd->irq_status; - tx_level = queue_cmd->tx_level; - for (i = 0; i < tx_level; i++) - tx_fifo[i] = queue_cmd->tx_fifo[i]; - - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - for (i = 0; i < tx_level; i++) { - if (tx_fifo[i] == MSM_CPP_MSG_ID_CMD) { - cmd_len = tx_fifo[i+1]; - msg_id = tx_fifo[i+2]; - if (msg_id == MSM_CPP_MSG_ID_FRAME_ACK) { - CPP_DBG("Frame done!!\n"); - /* delete CPP timer */ - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } else if (msg_id == - MSM_CPP_MSG_ID_FRAME_NACK) { - pr_err("NACK error from hw!!\n"); - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } - i += cmd_len + 2; - } - } - } -} -static void cpp_get_clk_freq_tbl(struct clk *clk, struct cpp_hw_info *hw_info) -{ - uint32_t count; - signed long freq_tbl_entry = 0; - - if ((clk == NULL) || (hw_info == NULL) || (clk->ops == NULL) || - (clk->ops->list_rate == NULL)) { - pr_err("Bad parameter\n"); - return; - } - - for (count = 0; count < MAX_FREQ_TBL; count++) { - freq_tbl_entry = clk->ops->list_rate(clk, count); - if (freq_tbl_entry >= 0) - hw_info->freq_tbl[count] = freq_tbl_entry; - else - break; - } - - hw_info->freq_tbl_count = count; -} - -static int cpp_init_hardware(struct cpp_device *cpp_dev) -{ - int rc = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_CPP); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (cpp_dev->fs_cpp == NULL) { - cpp_dev->fs_cpp = - regulator_get(&cpp_dev->pdev->dev, "vdd"); - if (IS_ERR(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd get failed %ld\n", - PTR_ERR(cpp_dev->fs_cpp)); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } else if (regulator_enable(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd enable failed\n"); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } - } - - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX] = - clk_get(&cpp_dev->pdev->dev, - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - if (IS_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX])) { - pr_err("%s get failed\n", - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - rc = - PTR_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_ASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", - __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to resets all its registers.*/ - usleep_range(10000, 12000); - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_DEASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments and - this was the smallest number which works. This sleep is - needed to leave enough time for Microcontroller to - resets all its registers.*/ - usleep_range(1000, 1200); - - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - } - - rc = msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto clk_failed; - } - - cpp_dev->base = ioremap(cpp_dev->mem->start, - resource_size(cpp_dev->mem)); - if (!cpp_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto remap_failed; - } - - cpp_dev->vbif_base = ioremap(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - if (!cpp_dev->vbif_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto vbif_remap_failed; - } - - cpp_dev->cpp_hw_base = ioremap(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - if (!cpp_dev->cpp_hw_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto cpp_hw_remap_failed; - } - - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = request_irq(cpp_dev->irq->start, msm_cpp_irq, - IRQF_TRIGGER_RISING, "cpp", cpp_dev); - if (rc < 0) { - pr_err("irq request fail\n"); - goto req_irq_fail; - } - cpp_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_INIT, NULL); - if (rc < 0) { - pr_err("buf mngr init failed\n"); - free_irq(cpp_dev->irq->start, cpp_dev); - goto req_irq_fail; - } - } - - cpp_dev->hw_info.cpp_hw_version = - msm_camera_io_r(cpp_dev->cpp_hw_base); - pr_info("CPP HW Version: 0x%x\n", cpp_dev->hw_info.cpp_hw_version); - cpp_dev->hw_info.cpp_hw_caps = - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4); - cpp_get_clk_freq_tbl(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - &cpp_dev->hw_info); - pr_debug("CPP HW Caps: 0x%x\n", cpp_dev->hw_info.cpp_hw_caps); - msm_camera_io_w(0x1, cpp_dev->vbif_base + 0x4); - cpp_dev->taskletq_idx = 0; - atomic_set(&cpp_dev->irq_cnt, 0); - msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE); - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - cpp_dev->stream_cnt = 0; - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - if (cpp_dev->is_firmware_loaded == 1) { - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - msm_camera_io_w_mb(0x7C8, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - } - } else { - msm_camera_io_w(0x1, - cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w_mb(0x7C8, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - } - return rc; -req_irq_fail: - iounmap(cpp_dev->cpp_hw_base); -cpp_hw_remap_failed: - iounmap(cpp_dev->vbif_base); -vbif_remap_failed: - iounmap(cpp_dev->base); -remap_failed: - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); -clk_failed: - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -bus_scale_register_failed: - return rc; -} - -static void cpp_release_hardware(struct cpp_device *cpp_dev) -{ - int32_t rc; - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_DEINIT, NULL); - if (rc < 0) { - pr_err("error in buf mngr deinit\n"); - rc = -EINVAL; - } - free_irq(cpp_dev->irq->start, cpp_dev); - tasklet_kill(&cpp_dev->cpp_tasklet); - atomic_set(&cpp_dev->irq_cnt, 0); - } - msm_cpp_delete_buff_queue(cpp_dev); - iounmap(cpp_dev->base); - iounmap(cpp_dev->vbif_base); - iounmap(cpp_dev->cpp_hw_base); - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - if (cpp_dev->stream_cnt > 0) { - pr_err("error: stream count active\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - } - cpp_dev->stream_cnt = 0; - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -} - -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin) -{ - uint32_t i; - uint32_t *ptr_bin = NULL; - int32_t rc = -EFAULT; - const struct firmware *fw = NULL; - struct device *dev = &cpp_dev->pdev->dev; - - msm_camera_io_w(0x1, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - - if (fw_name_bin) { - pr_debug("%s: FW file: %s\n", __func__, fw_name_bin); - rc = request_firmware(&fw, fw_name_bin, dev); - if (rc) { - dev_err(dev, - "Fail to loc blob %s from dev %pK, Error: %d\n", - fw_name_bin, dev, rc); - } - if (NULL != fw) - ptr_bin = (uint32_t *)fw->data; - - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_camera_io_w(0xFFFFFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - /*Start firmware loading*/ - msm_cpp_write(MSM_CPP_CMD_FW_LOAD, cpp_dev->base); - if (fw) - msm_cpp_write(fw->size, cpp_dev->base); - else - msm_cpp_write(MSM_CPP_END_ADDRESS, cpp_dev->base); - msm_cpp_write(MSM_CPP_START_ADDRESS, cpp_dev->base); - - if (ptr_bin) { - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < fw->size/4; i++) { - msm_cpp_write(*ptr_bin, cpp_dev->base); - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - ptr_bin++; - } - } - if (fw) - release_firmware(fw); - msm_camera_io_w_mb(0x00, cpp_dev->cpp_hw_base + 0xC); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_OK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - } - - /*Trigger MC to jump to start address*/ - msm_cpp_write(MSM_CPP_CMD_EXEC_JUMP, cpp_dev->base); - msm_cpp_write(MSM_CPP_JUMP_ADDRESS, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x1); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_JUMP_ACK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Get Bootloader Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_BOOTLOADER_VER, cpp_dev->base); - pr_info("MC Bootloader Version: 0x%x\n", - msm_cpp_read(cpp_dev->base)); - - /*Get Firmware Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_CMD, cpp_dev->base); - msm_cpp_write(0x1, cpp_dev->base); - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_TRAILER, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x2); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_FW_VER); - cpp_dev->fw_version = msm_cpp_read(cpp_dev->base); - pr_info("CPP FW Version: 0x%08x\n", cpp_dev->fw_version); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Disable MC clock*/ - /*msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_CLKEN_CTL);*/ -} - -static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc; - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - CPP_DBG("E\n"); - - mutex_lock(&cpp_dev->mutex); - if (cpp_dev->cpp_open_cnt == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free CPP instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 0) { - cpp_dev->cpp_subscribe_list[i].active = 1; - cpp_dev->cpp_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - CPP_DBG("open %d %pK\n", i, &fh->vfh); - cpp_dev->cpp_open_cnt++; - if (cpp_dev->cpp_open_cnt == 1) { - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) { - cpp_dev->cpp_open_cnt--; - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - mutex_unlock(&cpp_dev->mutex); - return rc; - } - - iommu_attach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_init_mem(cpp_dev); - cpp_dev->state = CPP_STATE_IDLE; - } - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_device_queue *processing_q = NULL; - struct msm_device_queue *eventData_q = NULL; - - if (!cpp_dev) { - pr_err("failed: cpp_dev %pK\n", cpp_dev); - return -EINVAL; - } - - mutex_lock(&cpp_dev->mutex); - - processing_q = &cpp_dev->processing_q; - eventData_q = &cpp_dev->eventData_q; - - if (cpp_dev->cpp_open_cnt == 0) { - mutex_unlock(&cpp_dev->mutex); - return 0; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 1) { - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - cpp_dev->cpp_open_cnt--; - if (cpp_dev->cpp_open_cnt == 0) { - pr_debug("irq_status: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4)); - pr_debug("DEBUG_SP: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_debug("DEBUG_T: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_debug("DEBUG_N: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_debug("DEBUG_R: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_debug("DEBUG_OPPC: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_debug("DEBUG_MO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_debug("DEBUG_TIMER0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_debug("DEBUG_TIMER1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_debug("DEBUG_GPI: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_debug("DEBUG_GPO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_debug("DEBUG_T0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_debug("DEBUG_R0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_debug("DEBUG_T1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_debug("DEBUG_R1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - cpp_deinit_mem(cpp_dev); - iommu_detach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_release_hardware(cpp_dev); - msm_cpp_empty_list(processing_q, list_frame); - msm_cpp_empty_list(eventData_q, list_eventdata); - cpp_dev->state = CPP_STATE_OFF; - } - - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_cpp_internal_ops = { - .open = cpp_open_node, - .close = cpp_close_node, -}; - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(cpp_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_debug("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_queue_cmd *event_qcmd = NULL; - struct msm_cpp_frame_info_t *processed_frame = NULL; - struct msm_device_queue *queue = &cpp_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - frame_qcmd = msm_dequeue(queue, list_frame); - if (frame_qcmd) { - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("Insufficient memory\n"); - kfree(frame_qcmd); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - CPP_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&cpp_dev->eventData_q, &event_qcmd->list_eventdata); - kfree(frame_qcmd); - - if (!processed_frame->output_buffer_info[0].processed_divert && - !processed_frame->output_buffer_info[0].native_buff) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[0].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - - if (processed_frame->duplicate_output && - !processed_frame-> - output_buffer_info[1].processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->duplicate_identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->duplicate_identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[1].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_CPP_FRAME_DONE; - v4l2_event_queue(cpp_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -#if MSM_CPP_DUMP_FRM_CMD -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - int i; - pr_info("-- start: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - for (i = 0; i < frame_info->msg_len; i++) - pr_err("msg[%03d] = 0x%08x\n", i, frame_info->cpp_cmd_msg[i]); - pr_info("-- end: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - return 0; -} -#else -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - return 0; -} -#endif - - -static void msm_cpp_do_timeout_work(struct work_struct *work) -{ - int ret; - uint32_t i = 0; - struct msm_cpp_frame_info_t *this_frame = NULL; - - pr_err("cpp_timer_callback called. (jiffies=%lu)\n", - jiffies); - if (!work) { - pr_err("Invalid work:%pK\n", work); - return; - } - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - - disable_irq(cpp_timer.data.cpp_dev->irq->start); - pr_err("Reloading firmware\n"); - cpp_load_fw(cpp_timer.data.cpp_dev, NULL); - pr_err("Firmware loading done\n"); - enable_irq(cpp_timer.data.cpp_dev->irq->start); - msm_camera_io_w_mb(0x8, cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - - this_frame = cpp_timer.data.processed_frame; - pr_err("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - pr_err("Rescheduling for identity=0x%x, frame_id=%03d\n", - this_frame->identity, this_frame->frame_id); - msm_cpp_write(0x6, cpp_timer.data.cpp_dev->base); - msm_cpp_dump_frame_cmd(this_frame); - for (i = 0; i < this_frame->msg_len; i++) - msm_cpp_write(this_frame->cpp_cmd_msg[i], - cpp_timer.data.cpp_dev->base); - return; -} - -void cpp_timer_callback(unsigned long data) -{ - struct msm_cpp_work_t *work = - cpp_timer.data.cpp_dev->work; - queue_work(cpp_timer.data.cpp_dev->timer_wq, - (struct work_struct *)work); -} - -static int msm_cpp_send_frame_to_hardware(struct cpp_device *cpp_dev, - struct msm_queue_cmd *frame_qcmd) -{ - uint32_t i; - int32_t rc = -EAGAIN; - int ret; - struct msm_cpp_frame_info_t *process_frame; - - if (cpp_dev->processing_q.len < MAX_CPP_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&cpp_dev->processing_q, - &frame_qcmd->list_frame); - - cpp_timer.data.processed_frame = process_frame; - atomic_set(&cpp_timer.used, 1); - /* install timer for cpp timeout */ - CPP_DBG("Installing cpp_timer\n"); - setup_timer(&cpp_timer.cpp_timer, - cpp_timer_callback, (unsigned long)&cpp_timer); - CPP_DBG("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - msm_cpp_write(0x6, cpp_dev->base); - msm_cpp_dump_frame_cmd(process_frame); - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < process_frame->msg_len; i++) { - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - if ((induce_error) && (i == 1)) { - pr_err("Induce error\n"); - msm_cpp_write(process_frame->cpp_cmd_msg[i]-1, - cpp_dev->base); - induce_error--; - } else - msm_cpp_write(process_frame->cpp_cmd_msg[i], - cpp_dev->base); - } - do_gettimeofday(&(process_frame->in_time)); - rc = 0; - } - if (rc < 0) - pr_err("process queue full. drop frame\n"); - return rc; -} - -static int msm_cpp_flush_frames(struct cpp_device *cpp_dev) -{ - return 0; -} - -static int msm_cpp_cfg(struct cpp_device *cpp_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_cpp_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); - uint32_t *cpp_frame_msg; - unsigned long in_phyaddr, out_phyaddr0, out_phyaddr1; - uint16_t num_stripes = 0; - struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info; - int32_t status = 0; - int32_t stripe_base = 0; - - int in_fd; - - int i = 0; - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = (copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR1; - } - - if ((new_frame->msg_len == 0) || - (new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) { - pr_err("%s:%d: Invalid frame len:%d\n", __func__, - __LINE__, new_frame->msg_len); - rc = -EINVAL; - goto ERROR1; - } - - cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len, - GFP_KERNEL); - if (!cpp_frame_msg) { - pr_err("Insufficient memory. return"); - rc = -ENOMEM; - goto ERROR1; - } - - rc = (copy_from_user(cpp_frame_msg, - (void __user *)new_frame->cpp_cmd_msg, - sizeof(uint32_t)*new_frame->msg_len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR2; - } - - new_frame->cpp_cmd_msg = cpp_frame_msg; - - in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), &in_fd); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto ERROR2; - } - - if (new_frame->output_buffer_info[0].native_buff == 0) { - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & - 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR2; - } - new_frame->output_buffer_info[0].index = buff_mgr_info.index; - } - - out_phyaddr0 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[0], - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), - &new_frame->output_buffer_info[0].fd); - if (!out_phyaddr0) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto ERROR3; - } - out_phyaddr1 = out_phyaddr0; - - /* get buffer for duplicate output */ - if (new_frame->duplicate_output) { - CPP_DBG("duplication enabled, dup_id=0x%x", - new_frame->duplicate_identity); - memset(&new_frame->output_buffer_info[1], 0, - sizeof(struct msm_cpp_buffer_info_t)); - memset(&dup_buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - dup_buff_mgr_info.session_id = - ((new_frame->duplicate_identity >> 16) & 0xFFFF); - dup_buff_mgr_info.stream_id = - (new_frame->duplicate_identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &dup_buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR3; - } - new_frame->output_buffer_info[1].index = - dup_buff_mgr_info.index; - out_phyaddr1 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[1], - ((new_frame->duplicate_identity >> 16) & 0xFFFF), - (new_frame->duplicate_identity & 0xFFFF), - &new_frame->output_buffer_info[1].fd); - if (!out_phyaddr1) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &dup_buff_mgr_info); - goto ERROR3; - } - /* set duplicate enable bit */ - cpp_frame_msg[5] |= 0x1; - CPP_DBG("out_phyaddr1= %08x\n", (uint32_t)out_phyaddr1); - } - - num_stripes = ((cpp_frame_msg[12] >> 20) & 0x3FF) + - ((cpp_frame_msg[12] >> 10) & 0x3FF) + - (cpp_frame_msg[12] & 0x3FF); - - if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_2_0) { - stripe_base = STRIPE_BASE_FW_1_2_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_4_0) { - stripe_base = STRIPE_BASE_FW_1_4_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_6_0) { - stripe_base = STRIPE_BASE_FW_1_6_0; - } else { - pr_err("invalid fw version %08x", cpp_dev->fw_version); - goto ERROR3; - } - - for (i = 0; i < num_stripes; i++) { - cpp_frame_msg[stripe_base + 5 + i*27] += - (uint32_t) in_phyaddr; - cpp_frame_msg[stripe_base + 11 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 12 + i * 27] += - (uint32_t) out_phyaddr1; - cpp_frame_msg[stripe_base + 13 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 14 + i * 27] += - (uint32_t) out_phyaddr1; - } - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto ERROR3; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_cpp_send_frame_to_hardware(cpp_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto ERROR4; - } - - ioctl_ptr->trans_code = rc; - status = rc; - rc = (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR4; - } - return rc; -ERROR4: - kfree(frame_qcmd); -ERROR3: - if (new_frame->output_buffer_info[0].native_buff == 0) - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -ERROR2: - kfree(cpp_frame_msg); -ERROR1: - ioctl_ptr->trans_code = rc; - status = rc; - if (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t))) - pr_err("error cannot copy error\n"); - kfree(new_frame); - return rc; -} - -long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - if ((ioctl_ptr == NULL) || (ioctl_ptr->ioctl_ptr == NULL)) { - pr_err("ioctl_ptr is null\n"); - return -EINVAL; - } - if (cpp_dev == NULL) { - pr_err("cpp_dev is null\n"); - return -EINVAL; - } - mutex_lock(&cpp_dev->mutex); - CPP_DBG("E cmd: 0x%x\n", cmd); - switch (cmd) { - case VIDIOC_MSM_CPP_GET_HW_INFO: { - CPP_DBG("VIDIOC_MSM_CPP_GET_HW_INFO\n"); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - &cpp_dev->hw_info, - sizeof(struct cpp_hw_info))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - break; - } - - case VIDIOC_MSM_CPP_LOAD_FIRMWARE: { - CPP_DBG("VIDIOC_MSM_CPP_LOAD_FIRMWARE\n"); - if (cpp_dev->is_firmware_loaded == 0) { - if (cpp_dev->fw_name_bin != NULL) { - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - } - if ((ioctl_ptr->len == 0) || - (ioctl_ptr->len > MSM_CPP_MAX_FW_NAME_LEN)) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - cpp_dev->fw_name_bin = kzalloc(ioctl_ptr->len+1, - GFP_KERNEL); - if (!cpp_dev->fw_name_bin) { - pr_err("%s:%d: malloc error\n", __func__, - __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr=NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - rc = (copy_from_user(cpp_dev->fw_name_bin, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - *(cpp_dev->fw_name_bin+ioctl_ptr->len) = '\0'; - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - cpp_dev->is_firmware_loaded = 1; - } - break; - } - case VIDIOC_MSM_CPP_CFG: - CPP_DBG("VIDIOC_MSM_CPP_CFG\n"); - rc = msm_cpp_cfg(cpp_dev, ioctl_ptr); - break; - case VIDIOC_MSM_CPP_FLUSH_QUEUE: - CPP_DBG("VIDIOC_MSM_CPP_FLUSH_QUEUE\n"); - rc = msm_cpp_flush_frames(cpp_dev); - break; - case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO: - case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_cpp_stream_buff_info_t *u_stream_buff_info; - struct msm_cpp_stream_buff_info_t k_stream_buff_info; - CPP_DBG("VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO\n"); - if (sizeof(struct msm_cpp_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (u_stream_buff_info->num_buffs == 0) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - - if (k_stream_buff_info.num_buffs > MSM_CAMERA_MAX_STREAM_BUF) { - pr_err("%s:%d: unexpected large num buff requested\n", - __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t), GFP_KERNEL); - if (ZERO_OR_NULL_PTR(k_stream_buff_info.buffer_info)) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - rc = msm_cpp_add_buff_queue_entry(cpp_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - } - if (!rc) - rc = msm_cpp_enqueue_buff_info_list(cpp_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - cpp_dev->stream_cnt++; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - CPP_DBG("VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO\n"); - - if (ioctl_ptr->len != sizeof(uint32_t)) - return -EINVAL; - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - msm_cpp_dequeue_buff_info_list(cpp_dev, buff_queue_info); - rc = msm_cpp_free_buff_queue_entry(cpp_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - if (cpp_dev->stream_cnt > 0) { - cpp_dev->stream_cnt--; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - if (cpp_dev->stream_cnt == 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0); - if (rc < 0) - pr_err("Bandwidth Reset Failed!\n"); - } - } else { - pr_err("error: stream count underflow %d\n", - cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &cpp_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_cpp_frame_info_t *process_frame; - CPP_DBG("VIDIOC_MSM_CPP_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - if (!event_qcmd) { - pr_err("no queue cmd available"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - process_frame = event_qcmd->command; - CPP_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_cpp_frame_info_t))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - kfree(process_frame->cpp_cmd_msg); - kfree(process_frame); - kfree(event_qcmd); - break; - } - case VIDIOC_MSM_CPP_SET_CLOCK: { - struct msm_cpp_clock_settings_t clock_settings; - unsigned long clock_rate = 0; - CPP_DBG("VIDIOC_MSM_CPP_SET_CLOCK\n"); - if (ioctl_ptr->len == 0) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr is NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->len != sizeof(struct msm_cpp_clock_settings_t)) { - pr_err("Not valid ioctl_ptr->len\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&clock_settings, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (clock_settings.clock_rate > 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, - clock_settings.avg, - clock_settings.inst); - if (rc < 0) { - pr_err("Bandwidth Set Failed!\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - clock_rate = clk_round_rate( - cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_settings.clock_rate); - if (clock_rate != clock_settings.clock_rate) - pr_err("clock rate differ from settings\n"); - - clk_set_rate(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_rate); - } - break; - } - case MSM_SD_SHUTDOWN: - CPP_DBG("MSM_SD_SHUTDOWN\n"); - mutex_unlock(&cpp_dev->mutex); - while (cpp_dev->cpp_open_cnt != 0) - cpp_close_node(sd, NULL); - mutex_lock(&cpp_dev->mutex); - rc = 0; - break; - case VIDIOC_MSM_CPP_QUEUE_BUF: { - struct msm_pproc_queue_buf_info queue_buf_info; - CPP_DBG("VIDIOC_MSM_CPP_QUEUE_BUF\n"); - rc = (copy_from_user(&queue_buf_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_pproc_queue_buf_info)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - - if (queue_buf_info.is_buf_dirty) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &queue_buf_info.buff_mgr_info); - } else { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &queue_buf_info.buff_mgr_info); - } - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EINVAL; - } - - break; - } - case VIDIOC_MSM_CPP_POP_STREAM_BUFFER: { - struct msm_buf_mngr_info buff_mgr_info; - struct msm_cpp_frame_info_t frame_info; - rc = (copy_from_user(&frame_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((frame_info.identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (frame_info.identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_err("error getting buffer rc:%d\n", rc); - break; - } - buff_mgr_info.frame_id = frame_info.frame_id; - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EAGAIN; - } - break; - } - default: - pr_err_ratelimited("invalid value: cmd=0x%x\n", cmd); - break; - } - mutex_unlock(&cpp_dev->mutex); - CPP_DBG("X\n"); - return rc; -} - -int msm_cpp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_subscribe(fh, sub, MAX_CPP_V4l2_EVENTS, NULL); -} - -int msm_cpp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_cpp_subdev_core_ops = { - .ioctl = msm_cpp_subdev_ioctl, - .subscribe_event = msm_cpp_subscribe_event, - .unsubscribe_event = msm_cpp_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_cpp_subdev_ops = { - .core = &msm_cpp_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_cpp_v4l2_subdev_fops; - -static long msm_cpp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - case VIDIOC_MSM_CPP_GET_INST_INFO: { - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_cpp_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_cpp_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_cpp_frame_info_t))) { - return -EINVAL; - } - } - break; - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_cpp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_cpp_subdev_do_ioctl); -} - -static int cpp_register_domain(void) -{ - struct msm_iova_partition cpp_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout cpp_fw_layout = { - .partitions = &cpp_fw_partition, - .npartitions = 1, - .client_name = "camera_cpp", - .domain_flags = 0, - }; - - return msm_register_domain(&cpp_fw_layout); -} - -static int msm_cpp_get_clk_info(struct cpp_device *cpp_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CPP_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CPP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > CPP_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - CPP_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cpp_clk_info[i].clk_name)); - CPP_DBG("clock-names[%d] = %s\n", i, cpp_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cpp_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CPP_DBG("clk_rate[%d] = %ld\n", i, cpp_clk_info[i].clk_rate); - } - cpp_dev->num_clk = count; - return 0; -} - - -static int cpp_probe(struct platform_device *pdev) -{ - struct cpp_device *cpp_dev; - int rc = 0; - CPP_DBG("E"); - cpp_dev = kzalloc(sizeof(struct cpp_device), GFP_KERNEL); - if (!cpp_dev) { - pr_err("no enough memory\n"); - return -ENOMEM; - } - - cpp_dev->cpp_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(cpp_clk_info), GFP_KERNEL); - if (!cpp_dev->cpp_clk) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto ERROR1; - } - - v4l2_subdev_init(&cpp_dev->msm_sd.sd, &msm_cpp_subdev_ops); - cpp_dev->msm_sd.sd.internal_ops = &msm_cpp_internal_ops; - snprintf(cpp_dev->msm_sd.sd.name, ARRAY_SIZE(cpp_dev->msm_sd.sd.name), - "cpp"); - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&cpp_dev->msm_sd.sd, cpp_dev); - platform_set_drvdata(pdev, &cpp_dev->msm_sd.sd); - mutex_init(&cpp_dev->mutex); - spin_lock_init(&cpp_dev->tasklet_lock); - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - cpp_dev->pdev = pdev; - - cpp_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp"); - if (!cpp_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->vbif_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_vbif"); - if (!cpp_dev->vbif_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->cpp_hw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_hw"); - if (!cpp_dev->cpp_hw_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cpp"); - if (!cpp_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->io = request_mem_region(cpp_dev->mem->start, - resource_size(cpp_dev->mem), pdev->name); - if (!cpp_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto ERROR2; - } - - cpp_dev->domain_num = cpp_register_domain(); - if (cpp_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->domain = - msm_get_iommu_domain(cpp_dev->domain_num); - if (!cpp_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp"); - if (IS_ERR(cpp_dev->iommu_ctx)) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -EPROBE_DEFER; - goto ERROR3; - } - - if (msm_cpp_get_clk_info(cpp_dev, pdev) < 0) { - pr_err("msm_cpp_get_clk_info() failed\n"); - goto ERROR3; - } - - media_entity_init(&cpp_dev->msm_sd.sd.entity, 0, NULL, 0); - cpp_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - cpp_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CPP; - cpp_dev->msm_sd.sd.entity.name = pdev->name; - cpp_dev->msm_sd.close_seq = MSM_SD_CLOSE_3RD_CATEGORY; - msm_sd_register(&cpp_dev->msm_sd); - msm_cpp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_cpp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_cpp_v4l2_subdev_fops.unlocked_ioctl = msm_cpp_subdev_fops_ioctl; - msm_cpp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_cpp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - cpp_dev->msm_sd.sd.devnode->fops = &msm_cpp_v4l2_subdev_fops; - cpp_dev->msm_sd.sd.entity.revision = cpp_dev->msm_sd.sd.devnode->num; - cpp_dev->state = CPP_STATE_BOOT; - - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) - goto CPP_PROBE_INIT_ERROR; - - msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - msm_camera_io_w(0x80000000, cpp_dev->base + 0xF0); - cpp_release_hardware(cpp_dev); - cpp_dev->state = CPP_STATE_OFF; - msm_cpp_enable_debugfs(cpp_dev); - - msm_queue_init(&cpp_dev->eventData_q, "eventdata"); - msm_queue_init(&cpp_dev->processing_q, "frame"); - INIT_LIST_HEAD(&cpp_dev->tasklet_q); - tasklet_init(&cpp_dev->cpp_tasklet, msm_cpp_do_tasklet, - (unsigned long)cpp_dev); - cpp_dev->timer_wq = create_workqueue("msm_cpp_workqueue"); - cpp_dev->work = kmalloc(sizeof(struct msm_cpp_work_t), - GFP_KERNEL); - - if (!cpp_dev->work) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto CPP_PROBE_INIT_ERROR; - } - - INIT_WORK((struct work_struct *)cpp_dev->work, msm_cpp_do_timeout_work); - cpp_dev->cpp_open_cnt = 0; - cpp_dev->is_firmware_loaded = 0; - cpp_timer.data.cpp_dev = cpp_dev; - atomic_set(&cpp_timer.used, 0); - cpp_dev->fw_name_bin = NULL; - if (rc == 0) - CPP_DBG("SUCCESS."); - else - CPP_DBG("FAILED."); - return rc; -CPP_PROBE_INIT_ERROR: - media_entity_cleanup(&cpp_dev->msm_sd.sd.entity); - msm_sd_unregister(&cpp_dev->msm_sd); -ERROR3: - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); -ERROR2: - kfree(cpp_dev->cpp_clk); -ERROR1: - kfree(cpp_dev); - return rc; -} - -static const struct of_device_id msm_cpp_dt_match[] = { - {.compatible = "qcom,cpp"}, - {} -}; - -static int cpp_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct cpp_device *cpp_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - cpp_dev = (struct cpp_device *)v4l2_get_subdevdata(sd); - if (!cpp_dev) { - pr_err("%s: cpp device is NULL\n", __func__); - return 0; - } - - msm_sd_unregister(&cpp_dev->msm_sd); - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); - release_mem_region(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - release_mem_region(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - mutex_destroy(&cpp_dev->mutex); - kfree(cpp_dev->work); - destroy_workqueue(cpp_dev->timer_wq); - kfree(cpp_dev->cpp_clk); - kfree(cpp_dev); - return 0; -} - -static struct platform_driver cpp_driver = { - .probe = cpp_probe, - .remove = cpp_device_remove, - .driver = { - .name = MSM_CPP_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cpp_dt_match, - }, -}; - -static int __init msm_cpp_init_module(void) -{ - return platform_driver_register(&cpp_driver); -} - -static void __exit msm_cpp_exit_module(void) -{ - platform_driver_unregister(&cpp_driver); -} - -static int msm_cpp_debugfs_error_s(void *data, u64 val) -{ - pr_err("setting error inducement"); - induce_error = val; - return 0; -} - -DEFINE_SIMPLE_ATTRIBUTE(cpp_debugfs_error, NULL, - msm_cpp_debugfs_error_s, "%llu\n"); - -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_cpp", NULL); - if (!debugfs_base) - return -ENOMEM; - - if (!debugfs_create_file("error", S_IRUGO | S_IWUSR, debugfs_base, - (void *)cpp_dev, &cpp_debugfs_error)) - return -ENOMEM; - - return 0; -} - -module_init(msm_cpp_init_module); -module_exit(msm_cpp_exit_module); -MODULE_DESCRIPTION("MSM CPP driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.h b/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.h deleted file mode 100644 index e306335a826d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/cpp/msm_cpp.h +++ /dev/null @@ -1,233 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CPP_H__ -#define __MSM_CPP_H__ - -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/* hw version info: - 31:28 Major version - 27:16 Minor version - 15:0 Revision bits -**/ -#define CPP_HW_VERSION_1_1_0 0x10010000 -#define CPP_HW_VERSION_1_1_1 0x10010001 -#define CPP_HW_VERSION_2_0_0 0x20000000 -#define CPP_HW_VERSION_4_0_0 0x40000000 -#define CPP_HW_VERSION_4_1_0 0x40010000 - -#define MAX_ACTIVE_CPP_INSTANCE 8 -#define MAX_CPP_PROCESSING_FRAME 2 -#define MAX_CPP_V4l2_EVENTS 30 - -#define MSM_CPP_MICRO_BASE 0x4000 -#define MSM_CPP_MICRO_HW_VERSION 0x0000 -#define MSM_CPP_MICRO_IRQGEN_STAT 0x0004 -#define MSM_CPP_MICRO_IRQGEN_CLR 0x0008 -#define MSM_CPP_MICRO_IRQGEN_MASK 0x000C -#define MSM_CPP_MICRO_FIFO_TX_DATA 0x0010 -#define MSM_CPP_MICRO_FIFO_TX_STAT 0x0014 -#define MSM_CPP_MICRO_FIFO_RX_DATA 0x0018 -#define MSM_CPP_MICRO_FIFO_RX_STAT 0x001C -#define MSM_CPP_MICRO_BOOT_START 0x0020 -#define MSM_CPP_MICRO_BOOT_LDORG 0x0024 -#define MSM_CPP_MICRO_CLKEN_CTL 0x0030 - -#define MSM_CPP_CMD_GET_BOOTLOADER_VER 0x1 -#define MSM_CPP_CMD_FW_LOAD 0x2 -#define MSM_CPP_CMD_EXEC_JUMP 0x3 -#define MSM_CPP_CMD_RESET_HW 0x5 -#define MSM_CPP_CMD_PROCESS_FRAME 0x6 -#define MSM_CPP_CMD_FLUSH_STREAM 0x7 -#define MSM_CPP_CMD_CFG_MEM_PARAM 0x8 -#define MSM_CPP_CMD_ERROR_REQUEST 0x9 -#define MSM_CPP_CMD_GET_STATUS 0xA -#define MSM_CPP_CMD_GET_FW_VER 0xB - -#define MSM_CPP_MSG_ID_CMD 0x3E646D63 -#define MSM_CPP_MSG_ID_OK 0x0A0A4B4F -#define MSM_CPP_MSG_ID_TRAILER 0xABCDEFAA - -#define MSM_CPP_MSG_ID_JUMP_ACK 0x00000001 -#define MSM_CPP_MSG_ID_FRAME_ACK 0x00000002 -#define MSM_CPP_MSG_ID_FRAME_NACK 0x00000003 -#define MSM_CPP_MSG_ID_FLUSH_ACK 0x00000004 -#define MSM_CPP_MSG_ID_FLUSH_NACK 0x00000005 -#define MSM_CPP_MSG_ID_CFG_MEM_ACK 0x00000006 -#define MSM_CPP_MSG_ID_CFG_MEM_INV 0x00000007 -#define MSM_CPP_MSG_ID_ERROR_STATUS 0x00000008 -#define MSM_CPP_MSG_ID_INVALID_CMD 0x00000009 -#define MSM_CPP_MSG_ID_GEN_STATUS 0x0000000A -#define MSM_CPP_MSG_ID_FLUSHED 0x0000000B -#define MSM_CPP_MSG_ID_FW_VER 0x0000000C - -#define MSM_CPP_JUMP_ADDRESS 0x20 -#define MSM_CPP_START_ADDRESS 0x0 -#define MSM_CPP_END_ADDRESS 0x3F00 - -#define MSM_CPP_POLL_RETRIES 20 -#define MSM_CPP_TASKLETQ_SIZE 16 -#define MSM_CPP_TX_FIFO_LEVEL 16 -#define MSM_CPP_RX_FIFO_LEVEL 512 - -struct cpp_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum cpp_state { - CPP_STATE_BOOT, - CPP_STATE_IDLE, - CPP_STATE_ACTIVE, - CPP_STATE_OFF, -}; - -enum cpp_iommu_state { - CPP_IOMMU_STATE_DETACHED, - CPP_IOMMU_STATE_ATTACHED, -}; - -enum msm_queue { - MSM_CAM_Q_CTRL, /* control command or control command status */ - MSM_CAM_Q_VFE_EVT, /* adsp event */ - MSM_CAM_Q_VFE_MSG, /* adsp message */ - MSM_CAM_Q_V4L2_REQ, /* v4l2 request */ - MSM_CAM_Q_VPE_MSG, /* vpe message */ - MSM_CAM_Q_PP_MSG, /* pp message */ -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - enum msm_queue type; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_cpp_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - uint32_t tx_level; - uint8_t cmd_used; -}; - -struct msm_cpp_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_cpp_buffer_info_t buff_info; -}; - -struct msm_cpp_buffer_map_list_t { - struct msm_cpp_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_cpp_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct msm_cpp_work_t { - struct work_struct my_work; - struct cpp_device *cpp_dev; -}; -struct msm_cpp_clock_settings_t { - long clock_rate; - uint64_t avg; - uint64_t inst; -}; - -struct cpp_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct resource *vbif_mem; - struct resource *vbif_io; - struct resource *cpp_hw_mem; - void __iomem *vbif_base; - void __iomem *base; - void __iomem *cpp_hw_base; - struct clk **cpp_clk; - struct regulator *fs_cpp; - struct mutex mutex; - enum cpp_state state; - enum cpp_iommu_state iommu_state; - uint8_t is_firmware_loaded; - char *fw_name_bin; - struct workqueue_struct *timer_wq; - struct msm_cpp_work_t *work; - uint32_t fw_version; - uint8_t stream_cnt; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx; - struct ion_client *client; - struct kref refcount; - uint32_t num_clk; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct cpp_tasklet; - struct msm_cpp_tasklet_queue_cmd - tasklet_queue_cmd[MSM_CPP_TASKLETQ_SIZE]; - - struct cpp_subscribe_info cpp_subscribe_list[MAX_ACTIVE_CPP_INSTANCE]; - uint32_t cpp_open_cnt; - struct cpp_hw_info hw_info; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* Processing Queue - * store frame info for frames sent to microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_cpp_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; -#endif /* __MSM_CPP_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/Makefile deleted file mode 100644 index 2f89544a31aa..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_vpe.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.c b/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.c deleted file mode 100644 index af233cfb76f1..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.c +++ /dev/null @@ -1,1655 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-VPE %s:%d " fmt, __func__, __LINE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_pproc.h" -#include "msm_vpe.h" -#include "msm_camera_io_util.h" - -#define MSM_VPE_IDENT_TO_SESSION_ID(identity) ((identity >> 16) & 0xFFFF) -#define MSM_VPE_IDENT_TO_STREAM_ID(identity) (identity & 0xFFFF) - -#define MSM_VPE_DRV_NAME "msm_vpe" - -#define MSM_VPE_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_VPE_DBG 0 - -#if CONFIG_MSM_VPE_DBG -#define VPE_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define VPE_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -static void vpe_mem_dump(const char * const name, const void * const addr, - int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - VPE_DBG("%s: (%s) %pK %d\n", __func__, name, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = *p++; - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - VPE_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - VPE_DBG("%s\n", line_str); -} - -static inline long long vpe_do_div(long long num, long long den) -{ - do_div(num, den); - return num; -} - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, \ - member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ - }) - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static struct msm_cam_clk_info vpe_clk_info[] = { - {"vpe_clk", 160000000}, - {"vpe_pclk", -1}, -}; - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev); - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_debug("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - VPE_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -static struct msm_vpe_buff_queue_info_t *msm_vpe_get_buff_queue_entry( - struct vpe_device *vpe_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if ((vpe_dev->buff_queue[i].used == 1) && - (vpe_dev->buff_queue[i].session_id == session_id) && - (vpe_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &vpe_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_vpe_get_phy_addr(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - break; - } - } - - return phy_add; -} - -static unsigned long msm_vpe_queue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue, - struct msm_vpe_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_vpe_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(vpe_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto queue_buff_error1; - } - - rc = ion_map_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto queue_buff_error2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -queue_buff_error2: - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); -queue_buff_error1: - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_vpe_dequeue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_map_list_t *buff) -{ - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_vpe_fetch_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id) -{ - unsigned long phy_addr = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_vpe_get_phy_addr(vpe_dev, buff_queue_info, - buffer_info->index, native_buff); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - buffer_info); - } - return phy_addr; -} - -static int32_t msm_vpe_enqueue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_vpe_dequeue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info) -{ - struct msm_vpe_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - return 0; -} - -static int32_t msm_vpe_add_buff_queue_entry(struct vpe_device *vpe_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 0) { - buff_queue_info = &vpe_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_vpe_free_buff_queue_entry(struct vpe_device *vpe_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_vpe_create_buff_queue(struct vpe_device *vpe_dev, - uint32_t num_buffq) -{ - struct msm_vpe_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_vpe_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (vpe_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - vpe_dev->buff_queue = buff_queue; - vpe_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_vpe_delete_buff_queue(struct vpe_device *vpe_dev) -{ - uint32_t i; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - msm_vpe_free_buff_queue_entry(vpe_dev, - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - } - } - kzfree(vpe_dev->buff_queue); - vpe_dev->buff_queue = NULL; - vpe_dev->num_buffq = 0; - return; -} - -void vpe_release_ion_client(struct kref *ref) -{ - struct vpe_device *vpe_dev = container_of(ref, - struct vpe_device, refcount); - ion_client_destroy(vpe_dev->client); -} - -static int vpe_init_mem(struct vpe_device *vpe_dev) -{ - kref_init(&vpe_dev->refcount); - kref_get(&vpe_dev->refcount); - vpe_dev->client = msm_ion_client_create("vpe"); - - if (!vpe_dev->client) { - pr_err("couldn't create ion client\n"); - return -ENODEV; - } - - return 0; -} - -static void vpe_deinit_mem(struct vpe_device *vpe_dev) -{ - kref_put(&vpe_dev->refcount, vpe_release_ion_client); -} - -static irqreturn_t msm_vpe_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t irq_status; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - struct vpe_device *vpe_dev = (struct vpe_device *) data; - - irq_status = msm_camera_io_r_mb(vpe_dev->base + - VPE_INTR_STATUS_OFFSET); - - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = &vpe_dev->tasklet_queue_cmd[vpe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - VPE_DBG("%s: vpe tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vpe_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - - queue_cmd->cmd_used = 1; - vpe_dev->taskletq_idx = - (vpe_dev->taskletq_idx + 1) % MSM_VPE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vpe_dev->tasklet_q); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - tasklet_schedule(&vpe_dev->vpe_tasklet); - - msm_camera_io_w_mb(irq_status, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - VPE_DBG("%s: irq_status=0x%x.\n", __func__, irq_status); - - return IRQ_HANDLED; -} - -static void msm_vpe_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vpe_device *vpe_dev = (struct vpe_device *)data; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - - while (atomic_read(&vpe_dev->irq_cnt)) { - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vpe_dev->tasklet_q, - struct msm_vpe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vpe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vpe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - VPE_DBG("Frame done!!\n"); - msm_vpe_notify_frame_done(vpe_dev); - } -} - -static int vpe_init_hardware(struct vpe_device *vpe_dev) -{ - int rc = 0; - - if (vpe_dev->fs_vpe == NULL) { - vpe_dev->fs_vpe = - regulator_get(&vpe_dev->pdev->dev, "vdd"); - if (IS_ERR(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd get failed %ld\n", - PTR_ERR(vpe_dev->fs_vpe)); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } else if (regulator_enable(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd enable failed\n"); - regulator_put(vpe_dev->fs_vpe); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } - } - - rc = msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto disable_and_put_regulator; - } - - vpe_dev->base = ioremap(vpe_dev->mem->start, - resource_size(vpe_dev->mem)); - if (!vpe_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto disable_and_put_regulator; - } - - if (vpe_dev->state != VPE_STATE_BOOT) { - rc = request_irq(vpe_dev->irq->start, msm_vpe_irq, - IRQF_TRIGGER_RISING, - "vpe", vpe_dev); - if (rc < 0) { - pr_err("irq request fail! start=%u\n", - (uint32_t) vpe_dev->irq->start); - rc = -EBUSY; - goto unmap_base; - } else { - VPE_DBG("Got irq! %d\n", (int)vpe_dev->irq->start); - } - } else { - VPE_DBG("Skip requesting the irq since device is booting\n"); - } - vpe_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - msm_vpe_create_buff_queue(vpe_dev, MSM_VPE_MAX_BUFF_QUEUE); - return rc; - -unmap_base: - iounmap(vpe_dev->base); -disable_and_put_regulator: - regulator_disable(vpe_dev->fs_vpe); - regulator_put(vpe_dev->fs_vpe); -fail: - return rc; -} - -static int vpe_release_hardware(struct vpe_device *vpe_dev) -{ - if (vpe_dev->state != VPE_STATE_BOOT) { - free_irq(vpe_dev->irq->start, vpe_dev); - tasklet_kill(&vpe_dev->vpe_tasklet); - atomic_set(&vpe_dev->irq_cnt, 0); - } - - msm_vpe_delete_buff_queue(vpe_dev); - iounmap(vpe_dev->base); - msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 0); - return 0; -} - -static int vpe_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - - mutex_lock(&vpe_dev->mutex); - if (vpe_dev->vpe_open_cnt == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free VPE instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].active == 0) { - vpe_dev->vpe_subscribe_list[i].active = 1; - vpe_dev->vpe_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - VPE_DBG("open %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt++; - if (vpe_dev->vpe_open_cnt == 1) { - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - vpe_dev->vpe_open_cnt--; - goto err_fixup_sub_list; - } - rc = vpe_init_mem(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init mem\n", __func__); - vpe_dev->vpe_open_cnt--; - rc = -ENODEV; - goto err_release_hardware; - } - vpe_dev->state = VPE_STATE_IDLE; - } - mutex_unlock(&vpe_dev->mutex); - - return rc; - -err_release_hardware: - vpe_release_hardware(vpe_dev); -err_fixup_sub_list: - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } -err_mutex_unlock: - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int vpe_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - mutex_lock(&vpe_dev->mutex); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&vpe_dev->mutex); - return -ENODEV; - } - - VPE_DBG("close %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt--; - if (vpe_dev->vpe_open_cnt == 0) { - vpe_deinit_mem(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - } - mutex_unlock(&vpe_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_vpe_internal_ops = { - .open = vpe_open_node, - .close = vpe_close_node, -}; - -static int msm_vpe_buffer_ops(struct vpe_device *vpe_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(vpe_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *processed_frame; - struct msm_device_queue *queue = &vpe_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - if (queue->len > 0) { - frame_qcmd = msm_dequeue(queue, list_frame); - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("%s: Insufficient memory\n", __func__); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - VPE_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&vpe_dev->eventData_q, &event_qcmd->list_eventdata); - - if (!processed_frame->output_buffer_info.processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(buff_mgr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info.index; - rc = msm_vpe_buffer_ops(vpe_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("%s: error doing VIDIOC_MSM_BUF_MNGR_BUF_DONE\n", - __func__); - rc = -EINVAL; - } - } - - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_VPE_FRAME_DONE; - v4l2_event_queue(vpe_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -static void vpe_update_scaler_params(struct vpe_device *vpe_dev, - struct msm_vpe_frame_strip_info strip_info) -{ - uint32_t out_ROI_width, out_ROI_height; - uint32_t src_ROI_width, src_ROI_height; - - /* - * phase_step_x, phase_step_y, phase_init_x and phase_init_y - * are represented in fixed-point, unsigned 3.29 format - */ - uint32_t phase_step_x = 0; - uint32_t phase_step_y = 0; - uint32_t phase_init_x = 0; - uint32_t phase_init_y = 0; - - uint32_t src_roi, src_x, src_y, src_xy, temp; - uint32_t yscale_filter_sel, xscale_filter_sel; - uint32_t scale_unit_sel_x, scale_unit_sel_y; - uint64_t numerator, denominator; - - /* - * assumption is both direction need zoom. this can be - * improved. - */ - temp = msm_camera_io_r(vpe_dev->base + VPE_OP_MODE_OFFSET) | 0x3; - msm_camera_io_w(temp, vpe_dev->base + VPE_OP_MODE_OFFSET); - - src_ROI_width = strip_info.src_w; - src_ROI_height = strip_info.src_h; - out_ROI_width = strip_info.dst_w; - out_ROI_height = strip_info.dst_h; - - VPE_DBG("src w = %u, h=%u, dst w = %u, h =%u.\n", - src_ROI_width, src_ROI_height, out_ROI_width, - out_ROI_height); - src_roi = (src_ROI_height << 16) + src_ROI_width; - - msm_camera_io_w(src_roi, vpe_dev->base + VPE_SRC_SIZE_OFFSET); - - src_x = strip_info.src_x; - src_y = strip_info.src_y; - - VPE_DBG("src_x = %d, src_y=%d.\n", src_x, src_y); - - src_xy = src_y*(1<<16) + src_x; - msm_camera_io_w(src_xy, vpe_dev->base + - VPE_SRC_XY_OFFSET); - VPE_DBG("src_xy = 0x%x, src_roi=0x%x.\n", src_xy, src_roi); - - /* decide whether to use FIR or M/N for scaling */ - if ((out_ROI_width == 1 && src_ROI_width < 4) || - (src_ROI_width < 4 * out_ROI_width - 3)) - scale_unit_sel_x = 0;/* use FIR scalar */ - else - scale_unit_sel_x = 1;/* use M/N scalar */ - - if ((out_ROI_height == 1 && src_ROI_height < 4) || - (src_ROI_height < 4 * out_ROI_height - 3)) - scale_unit_sel_y = 0;/* use FIR scalar */ - else - scale_unit_sel_y = 1;/* use M/N scalar */ - - /* calculate phase step for the x direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_width == 1) - phase_step_x = (uint32_t) ((src_ROI_width) << - SCALER_PHASE_BITS); - - /* if using FIR scalar */ - else if (scale_unit_sel_x == 0) { - - /* - * Calculate the quotient ( src_ROI_width - 1 ) ( - * out_ROI_width - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point - */ - numerator = (uint64_t)(src_ROI_width - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the "(out_ROI_width == - * 1 )" - */ - denominator = (uint64_t)(out_ROI_width - 1); - /* - * divide and round up to the larger 29th decimal - * point. - */ - phase_step_x = (uint32_t) vpe_do_div((numerator + - denominator - 1), denominator); - } else if (scale_unit_sel_x == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_width ) / ( - * out_ROI_width) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_width) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_width); - phase_step_x = - (uint32_t) vpe_do_div(numerator, denominator); - } - /* calculate phase step for the y direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_height == 1) - phase_step_y = - (uint32_t) ((src_ROI_height) << SCALER_PHASE_BITS); - - /* if FIR scalar */ - else if (scale_unit_sel_y == 0) { - /* - * Calculate the quotient ( src_ROI_height - 1 ) / ( - * out_ROI_height - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the " ( out_ROI_height - * == 1 )" case - */ - denominator = (uint64_t)(out_ROI_height - 1); - /* - * Quotient is rounded up to the larger 29th decimal - * point. - */ - phase_step_y = - (uint32_t) vpe_do_div( - (numerator + denominator - 1), denominator); - } else if (scale_unit_sel_y == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_height ) ( - * out_ROI_height) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_height); - phase_step_y = (uint32_t) vpe_do_div( - numerator, denominator); - } - - /* decide which set of FIR coefficients to use */ - if (phase_step_x > HAL_MDP_PHASE_STEP_2P50) - xscale_filter_sel = 0; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P66) - xscale_filter_sel = 1; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P25) - xscale_filter_sel = 2; - else - xscale_filter_sel = 3; - - if (phase_step_y > HAL_MDP_PHASE_STEP_2P50) - yscale_filter_sel = 0; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P66) - yscale_filter_sel = 1; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P25) - yscale_filter_sel = 2; - else - yscale_filter_sel = 3; - - /* calculate phase init for the x direction */ - - /* if using FIR scalar */ - if (scale_unit_sel_x == 0) { - if (out_ROI_width == 1) - phase_init_x = - (uint32_t) ((src_ROI_width - 1) << - SCALER_PHASE_BITS); - else - phase_init_x = 0; - } else if (scale_unit_sel_x == 1) /* M over N scalar */ - phase_init_x = 0; - - /* - * calculate phase init for the y direction if using FIR - * scalar - */ - if (scale_unit_sel_y == 0) { - if (out_ROI_height == 1) - phase_init_y = - (uint32_t) ((src_ROI_height - - 1) << SCALER_PHASE_BITS); - else - phase_init_y = 0; - } else if (scale_unit_sel_y == 1) /* M over N scalar */ - phase_init_y = 0; - - strip_info.phase_step_x = phase_step_x; - strip_info.phase_step_y = phase_step_y; - strip_info.phase_init_x = phase_init_x; - strip_info.phase_init_y = phase_init_y; - VPE_DBG("phase step x = %d, step y = %d.\n", - strip_info.phase_step_x, strip_info.phase_step_y); - VPE_DBG("phase init x = %d, init y = %d.\n", - strip_info.phase_init_x, strip_info.phase_init_y); - - msm_camera_io_w(strip_info.phase_step_x, vpe_dev->base + - VPE_SCALE_PHASEX_STEP_OFFSET); - msm_camera_io_w(strip_info.phase_step_y, vpe_dev->base + - VPE_SCALE_PHASEY_STEP_OFFSET); - - msm_camera_io_w(strip_info.phase_init_x, vpe_dev->base + - VPE_SCALE_PHASEX_INIT_OFFSET); - msm_camera_io_w(strip_info.phase_init_y, vpe_dev->base + - VPE_SCALE_PHASEY_INIT_OFFSET); -} - -static void vpe_program_buffer_addresses( - struct vpe_device *vpe_dev, - unsigned long srcP0, - unsigned long srcP1, - unsigned long outP0, - unsigned long outP1) -{ - VPE_DBG("%s VPE Configured with:\n" - "Src %x, %x Dest %x, %x", - __func__, (uint32_t)srcP0, (uint32_t)srcP1, - (uint32_t)outP0, (uint32_t)outP1); - - msm_camera_io_w(srcP0, vpe_dev->base + VPE_SRCP0_ADDR_OFFSET); - msm_camera_io_w(srcP1, vpe_dev->base + VPE_SRCP1_ADDR_OFFSET); - msm_camera_io_w(outP0, vpe_dev->base + VPE_OUTP0_ADDR_OFFSET); - msm_camera_io_w(outP1, vpe_dev->base + VPE_OUTP1_ADDR_OFFSET); -} - -static int vpe_start(struct vpe_device *vpe_dev) -{ - /* enable the frame irq, bit 0 = Display list 0 ROI done */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - msm_camera_io_dump(vpe_dev->base, 0x120); - msm_camera_io_dump(vpe_dev->base + 0x00400, 0x18); - msm_camera_io_dump(vpe_dev->base + 0x10000, 0x250); - msm_camera_io_dump(vpe_dev->base + 0x30000, 0x20); - msm_camera_io_dump(vpe_dev->base + 0x50000, 0x30); - msm_camera_io_dump(vpe_dev->base + 0x50400, 0x10); - - /* - * This triggers the operation. When the VPE is done, - * msm_vpe_irq will fire. - */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_DL0_START_OFFSET); - return 0; -} - -static void vpe_config_axi_default(struct vpe_device *vpe_dev) -{ - msm_camera_io_w(0x25, vpe_dev->base + VPE_AXI_ARB_2_OFFSET); -} - -static int vpe_reset(struct vpe_device *vpe_dev) -{ - uint32_t vpe_version; - uint32_t rc = 0; - - vpe_version = msm_camera_io_r( - vpe_dev->base + VPE_HW_VERSION_OFFSET); - VPE_DBG("vpe_version = 0x%x\n", vpe_version); - /* disable all interrupts.*/ - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - /* clear all pending interrupts*/ - msm_camera_io_w(0x1fffff, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - /* write sw_reset to reset the core. */ - msm_camera_io_w(0x10, vpe_dev->base + VPE_SW_RESET_OFFSET); - /* then poll the reset bit, it should be self-cleared. */ - while (1) { - rc = msm_camera_io_r(vpe_dev->base + VPE_SW_RESET_OFFSET) \ - & 0x10; - if (rc == 0) - break; - cpu_relax(); - } - /* - * at this point, hardware is reset. Then pogram to default - * values. - */ - msm_camera_io_w(VPE_AXI_RD_ARB_CONFIG_VALUE, - vpe_dev->base + VPE_AXI_RD_ARB_CONFIG_OFFSET); - - msm_camera_io_w(VPE_CGC_ENABLE_VALUE, - vpe_dev->base + VPE_CGC_EN_OFFSET); - msm_camera_io_w(1, vpe_dev->base + VPE_CMD_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_OP_MODE_VALUE, - vpe_dev->base + VPE_OP_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_SCALE_CONFIG, - vpe_dev->base + VPE_SCALE_CONFIG_OFFSET); - vpe_config_axi_default(vpe_dev); - return rc; -} - -static void vpe_update_scale_coef(struct vpe_device *vpe_dev, uint32_t *p) -{ - uint32_t i, offset; - offset = *p; - for (i = offset; i < (VPE_SCALE_COEFF_NUM + offset); i++) { - VPE_DBG("Setting scale table %d\n", i); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_LSBn(i)); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_MSBn(i)); - } -} - -static void vpe_input_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_SRC_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SRC_UNPACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_IMAGE_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_XY_OFFSET); -} - -static void vpe_output_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OUT_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_OUT_PACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_XY_OFFSET); -} - -static void vpe_operation_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OP_MODE_OFFSET); -} - -/** - * msm_vpe_transaction_setup() - send setup for one frame to VPE - * @vpe_dev: vpe device - * @data: packed setup commands - * - * See msm_vpe.h for the expected format of `data' - */ -static void msm_vpe_transaction_setup(struct vpe_device *vpe_dev, void *data) -{ - int i; - void *iter = data; - - vpe_mem_dump("vpe_transaction", data, VPE_TRANSACTION_SETUP_CONFIG_LEN); - - for (i = 0; i < VPE_NUM_SCALER_TABLES; ++i) { - vpe_update_scale_coef(vpe_dev, (uint32_t *)iter); - iter += VPE_SCALER_CONFIG_LEN; - } - vpe_input_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_INPUT_PLANE_CFG_LEN; - vpe_output_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_OUTPUT_PLANE_CFG_LEN; - vpe_operation_config(vpe_dev, (uint32_t *)iter); -} - -static int msm_vpe_send_frame_to_hardware(struct vpe_device *vpe_dev, - struct msm_queue_cmd *frame_qcmd) -{ - struct msm_vpe_frame_info_t *process_frame; - - if (vpe_dev->processing_q.len < MAX_VPE_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&vpe_dev->processing_q, - &frame_qcmd->list_frame); - - vpe_update_scaler_params(vpe_dev, process_frame->strip_info); - vpe_program_buffer_addresses( - vpe_dev, - process_frame->src_phyaddr, - process_frame->src_phyaddr - + process_frame->src_chroma_plane_offset, - process_frame->dest_phyaddr, - process_frame->dest_phyaddr - + process_frame->dest_chroma_plane_offset); - vpe_start(vpe_dev); - do_gettimeofday(&(process_frame->in_time)); - } - return 0; -} - -static int msm_vpe_cfg(struct vpe_device *vpe_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_vpe_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_vpe_frame_info_t), GFP_KERNEL); - unsigned long in_phyaddr, out_phyaddr; - struct msm_buf_mngr_info buff_mgr_info; - - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_vpe_frame_info_t)); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - rc = -EINVAL; - goto err_free_new_frame; - } - - in_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - memset(&new_frame->output_buffer_info, 0, - sizeof(struct msm_vpe_buffer_info_t)); - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - pr_err("error getting buffer\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - new_frame->output_buffer_info.index = buff_mgr_info.index; - out_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->output_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!out_phyaddr) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto err_put_buf; - } - - new_frame->src_phyaddr = in_phyaddr; - new_frame->dest_phyaddr = out_phyaddr; - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto err_put_buf; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_vpe_send_frame_to_hardware(vpe_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto err_free_frame_qcmd; - } - - return rc; - -err_free_frame_qcmd: - kfree(frame_qcmd); -err_put_buf: - msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -err_free_new_frame: - kfree(new_frame); - return rc; -} - -static long msm_vpe_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - mutex_lock(&vpe_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_VPE_TRANSACTION_SETUP: { - struct msm_vpe_transaction_setup_cfg *cfg; - VPE_DBG("VIDIOC_MSM_VPE_TRANSACTION_SETUP\n"); - if (sizeof(*cfg) != ioctl_ptr->len) { - pr_err("%s: size mismatch cmd=%d, len=%d, expected=%d", - __func__, cmd, ioctl_ptr->len, - sizeof(*cfg)); - rc = -EINVAL; - break; - } - - cfg = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!cfg) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = copy_from_user(cfg, (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(cfg); - break; - } - - msm_vpe_transaction_setup(vpe_dev, (void *)cfg); - kfree(cfg); - break; - } - case VIDIOC_MSM_VPE_CFG: { - VPE_DBG("VIDIOC_MSM_VPE_CFG\n"); - rc = msm_vpe_cfg(vpe_dev, ioctl_ptr); - break; - } - case VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_vpe_stream_buff_info_t *u_stream_buff_info; - struct msm_vpe_stream_buff_info_t k_stream_buff_info; - - VPE_DBG("VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO\n"); - - if (sizeof(struct msm_vpe_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - if ((u_stream_buff_info->num_buffs == 0) || - (u_stream_buff_info->num_buffs > - MSM_CAMERA_MAX_STREAM_BUF)) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t), GFP_KERNEL); - if (!k_stream_buff_info.buffer_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = msm_vpe_add_buff_queue_entry(vpe_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - if (!rc) - rc = msm_vpe_enqueue_buff_info_list(vpe_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - break; - } - case VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - VPE_DBG("VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO\n"); - if (ioctl_ptr->len != sizeof(uint32_t)) { - pr_err("%s:%d Invalid len\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - msm_vpe_dequeue_buff_info_list(vpe_dev, buff_queue_info); - rc = msm_vpe_free_buff_queue_entry(vpe_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - break; - } - case VIDIOC_MSM_VPE_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &vpe_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *process_frame; - VPE_DBG("VIDIOC_MSM_VPE_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - process_frame = event_qcmd->command; - VPE_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_vpe_frame_info_t))) { - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - kfree(process_frame); - kfree(event_qcmd); - break; - } - } - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int msm_vpe_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, MAX_VPE_V4l2_EVENTS, NULL); -} - -static int msm_vpe_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_vpe_subdev_core_ops = { - .ioctl = msm_vpe_subdev_ioctl, - .subscribe_event = msm_vpe_subscribe_event, - .unsubscribe_event = msm_vpe_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_vpe_subdev_ops = { - .core = &msm_vpe_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_vpe_v4l2_subdev_fops; - -static long msm_vpe_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - case VIDIOC_MSM_VPE_GET_INST_INFO: { - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_vpe_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_vpe_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_vpe_frame_info_t))) { - return -EINVAL; - } - } - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_vpe_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_vpe_subdev_do_ioctl); -} - -static int vpe_register_domain(void) -{ - struct msm_iova_partition vpe_iommu_partition = { - /* TODO: verify that these are correct? */ - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vpe_iommu_layout = { - .partitions = &vpe_iommu_partition, - .npartitions = 1, - .client_name = "camera_vpe", - .domain_flags = 0, - }; - - return msm_register_domain(&vpe_iommu_layout); -} - -static int vpe_probe(struct platform_device *pdev) -{ - struct vpe_device *vpe_dev; - int rc = 0; - - vpe_dev = kzalloc(sizeof(struct vpe_device), GFP_KERNEL); - if (!vpe_dev) { - pr_err("not enough memory\n"); - return -ENOMEM; - } - - vpe_dev->vpe_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(vpe_clk_info), GFP_KERNEL); - if (!vpe_dev->vpe_clk) { - pr_err("not enough memory\n"); - rc = -ENOMEM; - goto err_free_vpe_dev; - } - - v4l2_subdev_init(&vpe_dev->msm_sd.sd, &msm_vpe_subdev_ops); - vpe_dev->msm_sd.sd.internal_ops = &msm_vpe_internal_ops; - snprintf(vpe_dev->msm_sd.sd.name, ARRAY_SIZE(vpe_dev->msm_sd.sd.name), - "vpe"); - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vpe_dev->msm_sd.sd, vpe_dev); - platform_set_drvdata(pdev, &vpe_dev->msm_sd.sd); - mutex_init(&vpe_dev->mutex); - spin_lock_init(&vpe_dev->tasklet_lock); - - vpe_dev->pdev = pdev; - - vpe_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "vpe"); - if (!vpe_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto err_free_vpe_clk; - } - - vpe_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "vpe"); - if (!vpe_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain_num = vpe_register_domain(); - if (vpe_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain = - msm_get_iommu_domain(vpe_dev->domain_num); - if (!vpe_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->iommu_ctx_src = msm_iommu_get_ctx("vpe_src"); - vpe_dev->iommu_ctx_dst = msm_iommu_get_ctx("vpe_dst"); - if (!vpe_dev->iommu_ctx_src || !vpe_dev->iommu_ctx_dst) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - media_entity_init(&vpe_dev->msm_sd.sd.entity, 0, NULL, 0); - vpe_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vpe_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_VPE; - vpe_dev->msm_sd.sd.entity.name = pdev->name; - msm_sd_register(&vpe_dev->msm_sd); - msm_vpe_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_vpe_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_vpe_v4l2_subdev_fops.unlocked_ioctl = msm_vpe_subdev_fops_ioctl; - msm_vpe_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_vpe_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vpe_dev->msm_sd.sd.devnode->fops = &msm_vpe_v4l2_subdev_fops; - vpe_dev->msm_sd.sd.entity.revision = vpe_dev->msm_sd.sd.devnode->num; - vpe_dev->state = VPE_STATE_BOOT; - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - goto err_unregister_sd; - } - vpe_reset(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - if (rc < 0) { - pr_err("Couldn't attach to vpe_src context bank\n"); - rc = -ENODEV; - goto err_unregister_sd; - } - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - if (rc < 0) { - pr_err("Couldn't attach to vpe_dst context bank\n"); - rc = -ENODEV; - goto err_detach_src; - } - - vpe_dev->state = VPE_STATE_OFF; - - msm_queue_init(&vpe_dev->eventData_q, "vpe-eventdata"); - msm_queue_init(&vpe_dev->processing_q, "vpe-frame"); - INIT_LIST_HEAD(&vpe_dev->tasklet_q); - tasklet_init(&vpe_dev->vpe_tasklet, msm_vpe_do_tasklet, - (unsigned long)vpe_dev); - vpe_dev->vpe_open_cnt = 0; - - return rc; - -err_detach_src: - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); -err_unregister_sd: - msm_sd_unregister(&vpe_dev->msm_sd); -err_release_mem: - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); -err_free_vpe_clk: - kfree(vpe_dev->vpe_clk); -err_free_vpe_dev: - kfree(vpe_dev); - return rc; -} - -static int vpe_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct vpe_device *vpe_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - vpe_dev = (struct vpe_device *)v4l2_get_subdevdata(sd); - if (!vpe_dev) { - pr_err("%s: vpe device is NULL\n", __func__); - return 0; - } - - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - msm_sd_unregister(&vpe_dev->msm_sd); - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); - mutex_destroy(&vpe_dev->mutex); - kfree(vpe_dev); - return 0; -} - -static struct platform_driver vpe_driver = { - .probe = vpe_probe, - .remove = vpe_device_remove, - .driver = { - .name = MSM_VPE_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_vpe_init_module(void) -{ - return platform_driver_register(&vpe_driver); -} - -static void __exit msm_vpe_exit_module(void) -{ - platform_driver_unregister(&vpe_driver); -} - -module_init(msm_vpe_init_module); -module_exit(msm_vpe_exit_module); -MODULE_DESCRIPTION("MSM VPE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.h b/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.h deleted file mode 100644 index 1a8508963493..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/pproc/vpe/msm_vpe.h +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VPE_H__ -#define __MSM_VPE_H__ - -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/*********** start of register offset *********************/ -#define VPE_INTR_ENABLE_OFFSET 0x0020 -#define VPE_INTR_STATUS_OFFSET 0x0024 -#define VPE_INTR_CLEAR_OFFSET 0x0028 -#define VPE_DL0_START_OFFSET 0x0030 -#define VPE_HW_VERSION_OFFSET 0x0070 -#define VPE_SW_RESET_OFFSET 0x0074 -#define VPE_AXI_RD_ARB_CONFIG_OFFSET 0x0078 -#define VPE_SEL_CLK_OR_HCLK_TEST_BUS_OFFSET 0x007C -#define VPE_CGC_EN_OFFSET 0x0100 -#define VPE_CMD_STATUS_OFFSET 0x10008 -#define VPE_PROFILE_EN_OFFSET 0x10010 -#define VPE_PROFILE_COUNT_OFFSET 0x10014 -#define VPE_CMD_MODE_OFFSET 0x10060 -#define VPE_SRC_SIZE_OFFSET 0x10108 -#define VPE_SRCP0_ADDR_OFFSET 0x1010C -#define VPE_SRCP1_ADDR_OFFSET 0x10110 -#define VPE_SRC_YSTRIDE1_OFFSET 0x1011C -#define VPE_SRC_FORMAT_OFFSET 0x10124 -#define VPE_SRC_UNPACK_PATTERN1_OFFSET 0x10128 -#define VPE_OP_MODE_OFFSET 0x10138 -#define VPE_SCALE_PHASEX_INIT_OFFSET 0x1013C -#define VPE_SCALE_PHASEY_INIT_OFFSET 0x10140 -#define VPE_SCALE_PHASEX_STEP_OFFSET 0x10144 -#define VPE_SCALE_PHASEY_STEP_OFFSET 0x10148 -#define VPE_OUT_FORMAT_OFFSET 0x10150 -#define VPE_OUT_PACK_PATTERN1_OFFSET 0x10154 -#define VPE_OUT_SIZE_OFFSET 0x10164 -#define VPE_OUTP0_ADDR_OFFSET 0x10168 -#define VPE_OUTP1_ADDR_OFFSET 0x1016C -#define VPE_OUT_YSTRIDE1_OFFSET 0x10178 -#define VPE_OUT_XY_OFFSET 0x1019C -#define VPE_SRC_XY_OFFSET 0x10200 -#define VPE_SRC_IMAGE_SIZE_OFFSET 0x10208 -#define VPE_SCALE_CONFIG_OFFSET 0x10230 -#define VPE_DEINT_STATUS_OFFSET 0x30000 -#define VPE_DEINT_DECISION_OFFSET 0x30004 -#define VPE_DEINT_COEFF0_OFFSET 0x30010 -#define VPE_SCALE_STATUS_OFFSET 0x50000 -#define VPE_SCALE_SVI_PARAM_OFFSET 0x50010 -#define VPE_SCALE_SHARPEN_CFG_OFFSET 0x50020 -#define VPE_SCALE_COEFF_LSP_0_OFFSET 0x50400 -#define VPE_SCALE_COEFF_MSP_0_OFFSET 0x50404 - -#define VPE_AXI_ARB_1_OFFSET 0x00408 -#define VPE_AXI_ARB_2_OFFSET 0x0040C - -#define VPE_SCALE_COEFF_LSBn(n) (0x50400 + 8 * (n)) -#define VPE_SCALE_COEFF_MSBn(n) (0x50404 + 8 * (n)) -#define VPE_SCALE_COEFF_NUM 32 - -/*********** end of register offset ********************/ - - -#define VPE_HARDWARE_VERSION 0x00080308 -#define VPE_SW_RESET_VALUE 0x00000010 /* bit 4 for PPP*/ -#define VPE_AXI_RD_ARB_CONFIG_VALUE 0x124924 -#define VPE_CMD_MODE_VALUE 0x1 -#define VPE_DEFAULT_OP_MODE_VALUE 0x40FC0004 -#define VPE_CGC_ENABLE_VALUE 0xffff -#define VPE_DEFAULT_SCALE_CONFIG 0x3c - -#define VPE_NORMAL_MODE_CLOCK_RATE 150000000 -#define VPE_TURBO_MODE_CLOCK_RATE 200000000 -#define VPE_SUBDEV_MAX_EVENTS 30 - -/**************************************************/ -/*********** End of command id ********************/ -/**************************************************/ - -#define SCALER_PHASE_BITS 29 -#define HAL_MDP_PHASE_STEP_2P50 0x50000000 -#define HAL_MDP_PHASE_STEP_1P66 0x35555555 -#define HAL_MDP_PHASE_STEP_1P25 0x28000000 - - -#define MAX_ACTIVE_VPE_INSTANCE 8 -#define MAX_VPE_PROCESSING_FRAME 2 -#define MAX_VPE_V4l2_EVENTS 30 - -#define MSM_VPE_TASKLETQ_SIZE 16 - -/** - * The format of the msm_vpe_transaction_setup_cfg is as follows: - * - * - vpe_update_scale_coef (65*4 uint32_t's) - * - Each table is 65 uint32_t's long - * - 1st uint32_t in each table indicates offset - * - Following 64 uint32_t's are the data - * - * - vpe_input_plane_config (6 uint32_t's) - * - VPE_SRC_FORMAT_OFFSET - * - VPE_SRC_UNPACK_PATTERN1_OFFSET - * - VPE_SRC_IMAGE_SIZE_OFFSET - * - VPE_SRC_YSTRIDE1_OFFSET - * - VPE_SRC_SIZE_OFFSET - * - VPE_SRC_XY_OFFSET - * - * - vpe_output_plane_config (5 uint32_t's) - * - VPE_OUT_FORMAT_OFFSET - * - VPE_OUT_PACK_PATTERN1_OFFSET - * - VPE_OUT_YSTRIDE1_OFFSET - * - VPE_OUT_SIZE_OFFSET - * - VPE_OUT_XY_OFFSET - * - * - vpe_operation_config (1 uint32_t) - * - VPE_OP_MODE_OFFSET - * - */ - -#define VPE_SCALER_CONFIG_LEN 260 -#define VPE_INPUT_PLANE_CFG_LEN 24 -#define VPE_OUTPUT_PLANE_CFG_LEN 20 -#define VPE_OPERATION_MODE_CFG_LEN 4 -#define VPE_NUM_SCALER_TABLES 4 - -#define VPE_TRANSACTION_SETUP_CONFIG_LEN ( \ - (VPE_SCALER_CONFIG_LEN * VPE_NUM_SCALER_TABLES) \ - + VPE_INPUT_PLANE_CFG_LEN \ - + VPE_OUTPUT_PLANE_CFG_LEN \ - + VPE_OPERATION_MODE_CFG_LEN) -/* VPE_TRANSACTION_SETUP_CONFIG_LEN = 1088 */ - -struct msm_vpe_transaction_setup_cfg { - uint8_t scaler_cfg[VPE_TRANSACTION_SETUP_CONFIG_LEN]; -}; - -struct vpe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum vpe_state { - VPE_STATE_BOOT, - VPE_STATE_IDLE, - VPE_STATE_ACTIVE, - VPE_STATE_OFF, -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_vpe_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint8_t cmd_used; -}; - -struct msm_vpe_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_vpe_buffer_info_t buff_info; -}; - -struct msm_vpe_buffer_map_list_t { - struct msm_vpe_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_vpe_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct vpe_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - void __iomem *base; - struct clk **vpe_clk; - struct regulator *fs_vpe; - struct mutex mutex; - enum vpe_state state; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx_src; - struct device *iommu_ctx_dst; - struct ion_client *client; - struct kref refcount; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct vpe_tasklet; - struct msm_vpe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VPE_TASKLETQ_SIZE]; - - struct vpe_subscribe_info vpe_subscribe_list[MAX_ACTIVE_VPE_INSTANCE]; - uint32_t vpe_open_cnt; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* - * Processing Queue: store frame info for frames sent to - * microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_vpe_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; - -#endif /* __MSM_VPE_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/Makefile deleted file mode 100644 index 2f2c7da47112..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ flash/ eeprom/ -obj-$(CONFIG_MSM_CAMERA_SENSOR) += msm_sensor_init.o msm_sensor_driver.o msm_sensor.o -obj-$(CONFIG_IMX132) += imx132.o -obj-$(CONFIG_IMX134) += imx134.o -obj-$(CONFIG_OV8825) += ov8825.o -obj-$(CONFIG_OV8865) += ov8865.o -obj-$(CONFIG_s5k4e1) += s5k4e1.o -obj-$(CONFIG_OV12830) += ov12830.o -obj-$(CONFIG_OV9724) += ov9724.o -obj-$(CONFIG_HI256) += hi256.o -obj-$(CONFIG_OV5648) += ov5648.o -obj-$(CONFIG_MT9M114) += mt9m114.o -obj-$(CONFIG_MT9M114) += ov5645.o -obj-$(CONFIG_SP1628) += sp1628.o -obj-$(CONFIG_GC0339) += gc0339.o -obj-$(CONFIG_SR200PC20) += sr200pc20_yuv.o -obj-$(CONFIG_SR030PC50) += sr030pc50_yuv.o -obj-$(CONFIG_SR130PC20) += sr130pc20_yuv.o -obj-$(CONFIG_S5K4ECGX) += s5k4ecgx_yuv.o -obj-$(CONFIG_DB8221A) += db8221a_yuv.o -obj-$(CONFIG_OV5645) += ov5645.o -obj-$(CONFIG_OV5645) += ov7695.o -obj-$(CONFIG_GC0310) += gc0310.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/Makefile deleted file mode 100644 index 416004022ed5..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_actuator.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.c deleted file mode 100644 index d6ee94046f85..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.c +++ /dev/null @@ -1,1394 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_sd.h" -#include "msm_actuator.h" -#include "msm_cci.h" - -DEFINE_MSM_MUTEX(msm_actuator_mutex); - -#undef CDBG -#ifdef MSM_ACUTUATOR_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -static struct v4l2_file_operations msm_actuator_v4l2_subdev_fops; -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); - -static struct msm_actuator msm_vcm_actuator_table; -static struct msm_actuator msm_piezo_actuator_table; - -static struct i2c_driver msm_actuator_i2c_driver; -static struct msm_actuator *actuators[] = { - &msm_vcm_actuator_table, - &msm_piezo_actuator_table, - &msm_vcm_actuator_table, /* dummy entries */ - &msm_piezo_actuator_table, /* dummy entries */ -}; - -static int32_t msm_actuator_piezo_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) { - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s: i2c write error:%d\n", - __func__, rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = 0; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl, - int16_t next_lens_position, uint32_t hw_params, uint16_t delay) -{ - struct msm_actuator_reg_params_t *write_arr = a_ctrl->reg_tbl; - uint32_t hw_dword = hw_params; - uint16_t i2c_byte1 = 0, i2c_byte2 = 0; - uint16_t value = 0; - uint32_t size = a_ctrl->reg_tbl_size, i = 0; - struct msm_camera_i2c_reg_array *i2c_tbl = a_ctrl->i2c_reg_tbl; - CDBG("Enter\n"); - for (i = 0; i < size; i++) { - if (write_arr[i].reg_write_type == MSM_ACTUATOR_WRITE_DAC) { - value = (next_lens_position << - write_arr[i].data_shift) | - ((hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift); - - if (write_arr[i].reg_addr != 0xFFFF) { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = value; - if (size != (i+1)) { - i2c_byte2 = value & 0xFF; - CDBG("byte1:0x%x, byte2:0x%x\n", - i2c_byte1, i2c_byte2); - if (a_ctrl->i2c_tbl_index > - a_ctrl->total_steps) { - pr_err("failed:i2c table index out of bound\n"); - break; - } - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index]. - delay = 0; - a_ctrl->i2c_tbl_index++; - i++; - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (value & 0xFF00) >> 8; - } - } else { - i2c_byte1 = (value & 0xFF00) >> 8; - i2c_byte2 = value & 0xFF; - } - } else { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift; - } - if (a_ctrl->i2c_tbl_index > a_ctrl->total_steps) { - pr_err("failed: i2c table index out of bound\n"); - break; - } - CDBG("i2c_byte1:0x%x, i2c_byte2:0x%x\n", i2c_byte1, i2c_byte2); - i2c_tbl[a_ctrl->i2c_tbl_index].reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index].reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - CDBG("Enter\n"); - - for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_ACT_WRITE: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - case MSM_ACT_POLL: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - } - - if (0 != settings[i].delay) - msleep(settings[i].delay); - - if (rc < 0) - break; - } - - a_ctrl->curr_step_pos = 0; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vcm_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - uint16_t delay = 0; - uint16_t status_addr = 0; - uint16_t status_data = 0; - uint16_t status = 0; - uint16_t delay_count = 0; - uint16_t delay_count_limit = 0; - - CDBG("%s Enter, size %d\n", __func__, size); - - for (i = 0; i < size; i++) { - if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_DELAY) { - delay = settings[i].reg_data; - usleep_range(delay, delay + 1000); - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - } - else if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_READ_STATUS) { - /* reg_data[i] = limitation for delay count for read status */ - delay_count_limit = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - i++; - /*reg_addr[i+1] = addr for status register*/ - status_addr = settings[i].reg_addr; - /*reg_data[i+1] = value for stopping to read the status register*/ - status_data = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - delay_count = 0; - do { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, status_addr, &status, - MSM_CAMERA_I2C_BYTE_DATA); - CDBG("%s %d status %d\n", __func__, __LINE__,status); - if (rc < 0) { - CDBG("%s Failed I2C read Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(1000, 2000); - delay_count++; - if(delay_count >= delay_count_limit) break; - } while (status != status_data); - } - else { - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, settings[i].reg_addr, - settings[i].reg_data, MSM_CAMERA_I2C_BYTE_DATA); - if(rc < 0){ - pr_err("%s:%d I2C write failure size[%d] writen[%d]\n", - __func__, __LINE__, size, i); - break; - } - } - } - - CDBG("Exit\n"); - return 0; -} - -static void msm_actuator_write_focus( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t curr_lens_pos, - struct damping_params_t *damping_params, - int8_t sign_direction, - int16_t code_boundary) -{ - int16_t next_lens_pos = 0; - uint16_t damping_code_step = 0; - uint16_t wait_time = 0; - CDBG("Enter\n"); - - damping_code_step = damping_params->damping_step; - wait_time = damping_params->damping_delay; - - /* Write code based on damping_code_step in a loop */ - for (next_lens_pos = - curr_lens_pos + (sign_direction * damping_code_step); - (sign_direction * next_lens_pos) <= - (sign_direction * code_boundary); - next_lens_pos = - (next_lens_pos + - (sign_direction * damping_code_step))) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - next_lens_pos, damping_params->hw_params, wait_time); - curr_lens_pos = next_lens_pos; - } - - if (curr_lens_pos != code_boundary) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - code_boundary, damping_params->hw_params, wait_time); - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_piezo_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t dest_step_position = move_params->dest_step_pos; - struct damping_params_t ringing_params_kernel; - int32_t rc = 0; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[0]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - if (num_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - (num_steps * - a_ctrl->region_params[0].code_per_step), - ringing_params_kernel.hw_params, 0); - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = dest_step_position; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct damping_params_t ringing_params_kernel; - int8_t sign_dir = move_params->sign_dir; - uint16_t step_boundary = 0; - uint16_t target_step_pos = 0; - uint16_t target_lens_pos = 0; - int16_t dest_step_pos = move_params->dest_step_pos; - uint16_t curr_lens_pos = 0; - int dir = move_params->dir; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - - if (a_ctrl->step_position_table == NULL) { - pr_err("Step Position Table is NULL"); - return -EFAULT; - } - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[a_ctrl->curr_region_index]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - - CDBG("called, dir %d, num_steps %d\n", dir, num_steps); - - if (dest_step_pos == a_ctrl->curr_step_pos) - return rc; - - if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) || - (sign_dir < MSM_ACTUATOR_MOVE_SIGNED_FAR)) { - pr_err("Invalid sign_dir = %d\n", sign_dir); - return -EFAULT; - } - if ((dir > MOVE_FAR) || (dir < MOVE_NEAR)) { - pr_err("Invalid direction = %d\n", dir); - return -EFAULT; - } - if (dest_step_pos > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", - dest_step_pos); - return -EFAULT; - } - curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; - a_ctrl->i2c_tbl_index = 0; - CDBG("curr_step_pos =%d dest_step_pos =%d curr_lens_pos=%d\n", - a_ctrl->curr_step_pos, dest_step_pos, curr_lens_pos); - - while (a_ctrl->curr_step_pos != dest_step_pos) { - step_boundary = - a_ctrl->region_params[a_ctrl->curr_region_index]. - step_bound[dir]; - if ((dest_step_pos * sign_dir) <= - (step_boundary * sign_dir)) { - - target_step_pos = dest_step_pos; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - } else { - target_step_pos = step_boundary; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - a_ctrl->curr_region_index += sign_dir; - } - a_ctrl->curr_step_pos = target_step_pos; - } - - move_params->curr_lens_pos = curr_lens_pos; - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) -{ - int16_t code_per_step = 0; - int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; - uint16_t step_boundary = 0; - uint32_t max_code_size = 1; - uint16_t data_size = set_info->actuator_params.data_size; - CDBG("Enter\n"); - for (; data_size > 0; data_size--) - max_code_size *= 2; - - a_ctrl->max_code_size = max_code_size; - if ((a_ctrl->actuator_state == ACTUATOR_POWER_UP) && - (a_ctrl->step_position_table != NULL)) { - kfree(a_ctrl->step_position_table); - } - a_ctrl->step_position_table = NULL; - a_ctrl->step_position_table = - kzalloc(sizeof(uint16_t) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (a_ctrl->step_position_table == NULL) - return -ENOMEM; - cur_code = set_info->af_tuning_params.initial_code; - a_ctrl->step_position_table[step_index++] = cur_code; - for (region_index = 0; - region_index < a_ctrl->region_size; - region_index++) { - code_per_step = - a_ctrl->region_params[region_index].code_per_step; - step_boundary = - a_ctrl->region_params[region_index]. - step_bound[MOVE_NEAR]; - if (step_boundary > set_info->af_tuning_params.total_steps - 1) { - CDBG("%s: Error af steps mismatch!", __func__); - return -EFAULT; - } - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) - a_ctrl->step_position_table[step_index] = - cur_code; - else { - for (; step_index < - set_info->af_tuning_params.total_steps; - step_index++) - a_ctrl-> - step_position_table[ - step_index] = - max_code_size; - } - } - } - for (step_index = 0; - step_index < set_info->af_tuning_params.total_steps; - step_index++) { - CDBG("step_position_table[%d] = %d", step_index, - a_ctrl->step_position_table[step_index]); - } - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_actuator_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, move_params); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, - int config) -{ - int rc = 0, i, cnt; - struct msm_actuator_vreg *vreg_cfg; - - vreg_cfg = &a_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt) - return 0; - - if (cnt >= MSM_ACTUATOT_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - } - return rc; -} - -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) -{ - int32_t rc = 0; - CDBG("Enter\n"); - if (a_ctrl->actuator_state != ACTUATOR_POWER_DOWN) { - if (a_ctrl->vcm_enable) { - rc = gpio_direction_output(a_ctrl->vcm_pwd, 0); - if (!rc) - gpio_free(a_ctrl->vcm_pwd); - } - - rc = msm_actuator_vreg_control(a_ctrl, 0); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - if (a_ctrl->step_position_table != NULL) - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - if (a_ctrl->i2c_reg_tbl != NULL) - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_tbl_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_DOWN; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_set_position_tbl( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t pos, uint16_t delay) -{ - uint16_t msb, lsb, reg_addr; - reg_addr = a_ctrl->reg_tbl[0].reg_addr; - CDBG("%s reg_addr = %d\n", __func__, reg_addr); - - msb = (pos>>8)&0x00ff; - lsb = pos&0x00ff; - - CDBG("%s pos=%d msb= 0x%X, lsb=0x%X\n", __func__, pos, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr+1; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - -} - -static int32_t msm_actuator_vcm_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) -{ - - int32_t rc = 0; - int32_t index; - uint16_t pos, delay; - struct msm_camera_i2c_reg_setting reg_setting; - - CDBG("%s Enter : steps = %d\n", __func__, set_pos->number_of_steps); - - if (set_pos->number_of_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - - for (index = 0; index < set_pos->number_of_steps; index++) { - pos = a_ctrl->step_position_table[set_pos->pos[index]]; - delay = set_pos->delay[index]; - msm_actuator_set_position_tbl(a_ctrl, pos, delay); - } - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) { - struct reg_settings_t *init_settings = NULL; - int32_t rc = -EFAULT; - uint16_t i = 0; - struct msm_camera_cci_client *cci_client = NULL; - CDBG("Enter\n"); - - for (i = 0; i < ARRAY_SIZE(actuators); i++) { - if (set_info->actuator_params.act_type == - actuators[i]->act_type) { - a_ctrl->func_tbl = &actuators[i]->func_tbl; - rc = 0; - } - } - - if (rc < 0) { - pr_err("Actuator function table not found : act_type = %d\n", set_info->actuator_params.act_type); - return rc; - } - if (set_info->af_tuning_params.total_steps - > MAX_ACTUATOR_AF_TOTAL_STEPS) { - pr_err("Max actuator totalsteps exceeded = %d\n", - set_info->af_tuning_params.total_steps); - return -EFAULT; - } - if (set_info->af_tuning_params.region_size - > MAX_ACTUATOR_REGION) { - pr_err("MAX_ACTUATOR_REGION is exceeded.\n"); - return -EFAULT; - } - - a_ctrl->region_size = set_info->af_tuning_params.region_size; - a_ctrl->pwd_step = set_info->af_tuning_params.pwd_step; - a_ctrl->total_steps = set_info->af_tuning_params.total_steps; - - if (copy_from_user(&a_ctrl->region_params, - (void *)set_info->af_tuning_params.region_params, - a_ctrl->region_size * sizeof(struct region_params_t))) - return -EFAULT; - - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = a_ctrl->i2c_client.cci_client; - cci_client->sid = - set_info->actuator_params.i2c_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->cci_i2c_master = a_ctrl->cci_master; - } else { - a_ctrl->i2c_client.client->addr = - set_info->actuator_params.i2c_addr; - } - - a_ctrl->i2c_data_type = set_info->actuator_params.i2c_data_type; - a_ctrl->i2c_client.addr_type = set_info->actuator_params.i2c_addr_type; - if (set_info->actuator_params.reg_tbl_size <= - MAX_ACTUATOR_REG_TBL_SIZE) { - a_ctrl->reg_tbl_size = set_info->actuator_params.reg_tbl_size; - } else { - a_ctrl->reg_tbl_size = 0; - pr_err("MAX_ACTUATOR_REG_TBL_SIZE is exceeded.\n"); - return -EFAULT; - } - - if ((a_ctrl->actuator_state == ACTUATOR_POWER_UP) && - (a_ctrl->i2c_reg_tbl != NULL)) { - kfree(a_ctrl->i2c_reg_tbl); - } - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_reg_tbl = - kzalloc(sizeof(struct msm_camera_i2c_reg_array) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (!a_ctrl->i2c_reg_tbl) { - pr_err("kzalloc fail\n"); - return -ENOMEM; - } - - if (copy_from_user(&a_ctrl->reg_tbl, - (void *)set_info->actuator_params.reg_tbl_params, - a_ctrl->reg_tbl_size * - sizeof(struct msm_actuator_reg_params_t))) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - return -EFAULT; - } - - if (set_info->actuator_params.init_setting_size && - set_info->actuator_params.init_setting_size - <= MAX_ACTUATOR_REG_TBL_SIZE) { - if (a_ctrl->func_tbl->actuator_init_focus) { - init_settings = kzalloc(sizeof(struct reg_settings_t) * - (set_info->actuator_params.init_setting_size), - GFP_KERNEL); - if (init_settings == NULL) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error allocating memory for init_settings\n"); - return -EFAULT; - } - if (copy_from_user(init_settings, - (void *)set_info->actuator_params.init_settings, - set_info->actuator_params.init_setting_size * - sizeof(struct reg_settings_t))) { - kfree(init_settings); - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error copying init_settings\n"); - return -EFAULT; - } - rc = a_ctrl->func_tbl->actuator_init_focus(a_ctrl, - set_info->actuator_params.init_setting_size, - init_settings); - kfree(init_settings); - init_settings = NULL; - if (rc < 0) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error actuator_init_focus\n"); - return -EFAULT; - } - } - } - - a_ctrl->initial_code = set_info->af_tuning_params.initial_code; - if (a_ctrl->func_tbl->actuator_init_step_table) - rc = a_ctrl->func_tbl-> - actuator_init_step_table(a_ctrl, set_info); - - a_ctrl->curr_step_pos = 0; - a_ctrl->curr_region_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_UP; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_sw_landing( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - struct damping_params_t *damping_params; - struct damping_params_t damping_params_k; - struct damping_params_t damping_params_sacoff; - - int16_t pos_index, First_damping_lens_pos, Second_damping_lens_pos, damp_delay, damp_step, lens_pos; - - if(a_ctrl == NULL || a_ctrl->step_position_table == NULL || move_params == NULL || move_params->ringing_params == NULL) - { - pr_err("%s %d NULL Pointer\n", __func__, __LINE__); - return 0; - } - - CDBG("%s Enter %d\n", __func__, __LINE__); - /*get first and second damping position, damp delay and step*/ - if (copy_from_user(&damping_params_k,&move_params->ringing_params[2],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - if (copy_from_user(&damping_params_sacoff,&move_params->ringing_params[3],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - damping_params = &damping_params_k; - damp_delay = damping_params->damping_delay; - damp_step = damping_params->damping_step; - pos_index = (damping_params->hw_params&0xffff); // low 4byte : ker index, high 4byte : dac - - if (pos_index > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", pos_index); - return -EFAULT; - } - First_damping_lens_pos = a_ctrl->step_position_table[pos_index];// - Second_damping_lens_pos = (First_damping_lens_pos>>2) ; // for old version - - CDBG("%s %d First damping index =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - CDBG("%s %d damp_delay=%d, damp_step=%d\n", __func__, __LINE__, damp_delay, damp_step); - /*set the starting lens pos to first damping lens pos*/ - lens_pos = First_damping_lens_pos;// - CDBG("%s %d curr_lens_pos=%d\n", __func__, __LINE__, lens_pos); - - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - - // 1. Go to pan_focus// - if(damping_params_sacoff.damping_step & 0x1 ) - { - Second_damping_lens_pos = ((damping_params->hw_params>>16)&0xffff); // default 0, dac value - if (Second_damping_lens_pos < 0) - Second_damping_lens_pos = 0; - CDBG("%s %d First damping index new =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - a_ctrl->i2c_tbl_index = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - CDBG("%s %d i2c_tbl_index %d\n", __func__, __LINE__, a_ctrl->i2c_tbl_index); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - //reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s %d Go to pan_focus, lens_pos=%d\n", __func__, __LINE__, lens_pos); - } - - // 2. SAC mode off// - if(damping_params_sacoff.damping_step & 0x02 ) - { - - uint16_t addr, data ; - addr = ((damping_params_sacoff.hw_params>>16)&0xffff); // 0x02 - data = ((damping_params_sacoff.hw_params)&0xffff); // 0x00 - usleep_range(damping_params_sacoff.damping_delay , damping_params_sacoff.damping_delay+1000); //10 msec - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr,data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s SAC mode off delay=%d, addr=0x%x, data =0x%x \n", __func__, damping_params_sacoff.damping_delay, addr, data); - } - - // 3. Start SW landing// - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - a_ctrl->i2c_tbl_index = 0; - do{ - if(lens_pos < Second_damping_lens_pos + damp_step) break; - else{ - lens_pos -= damp_step; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - } - }while(lens_pos > Second_damping_lens_pos); - - /*set final position*/ - CDBG("%s %d set the final position in the table\n", __func__, __LINE__); - lens_pos = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - return rc; -} - -static int msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, - void __user *argp) -{ - struct msm_actuator_cfg_data *cdata = - (struct msm_actuator_cfg_data *)argp; - int32_t rc = 0; - - if (!a_ctrl) - return -1; - - mutex_lock(a_ctrl->actuator_mutex); - CDBG("Enter\n"); - CDBG("%s type %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_ACTUATOR_INIT: - rc = msm_actuator_init(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_init failed %d\n", rc); - break; - case CFG_GET_ACTUATOR_INFO: - cdata->is_af_supported = 1; - cdata->cfg.cam_name = a_ctrl->cam_name; - break; - - case CFG_SET_ACTUATOR_INFO: - rc = msm_actuator_set_param(a_ctrl, &cdata->cfg.set_info); - if (rc < 0) - pr_err("init table failed %d\n", rc); - break; - - case CFG_SET_DEFAULT_FOCUS: - rc = a_ctrl->func_tbl->actuator_set_default_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - - case CFG_MOVE_FOCUS: - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - case CFG_ACTUATOR_POWERDOWN: - rc = msm_actuator_power_down(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_power_down failed %d\n", rc); - break; - - case CFG_SET_POSITION: - rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl, - &cdata->cfg.setpos); - if (rc < 0) - pr_err("actuator_set_position failed %d\n", rc); - break; - - case CFG_SET_ACTUATOR_SW_LANDING: - if (a_ctrl && a_ctrl->func_tbl && a_ctrl->func_tbl->actuator_sw_landing) { - rc = a_ctrl->func_tbl->actuator_sw_landing(a_ctrl, &cdata->cfg.move); - if (rc < 0) - pr_err("actuator_sw_landing failed %d\n", rc); - } - - case CFG_ACTUATOR_POWERUP: - rc = msm_actuator_power_up(a_ctrl); - if (rc < 0) - pr_err("Failed actuator power up%d\n", rc); - break; - - default: - break; - } - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_get_subdev_id(struct msm_actuator_ctrl_t *a_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = a_ctrl->pdev->id; - else - *subdev_id = a_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_actuator_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_actuator_internal_ops = { - .close = msm_actuator_close, -}; - -static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("Enter\n"); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_actuator_get_subdev_id(a_ctrl, argp); - case VIDIOC_MSM_ACTUATOR_CFG: - return msm_actuator_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_actuator_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("%s called\n", __func__); - - CDBG("vcm info: %d %d\n", a_ctrl->vcm_pwd, - a_ctrl->vcm_enable); - - rc = msm_actuator_vreg_control(a_ctrl, 1); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - if (a_ctrl->vcm_enable) { - rc = gpio_request(a_ctrl->vcm_pwd, "msm_actuator"); - if (!rc) { - CDBG("Enable VCM PWD\n"); - gpio_direction_output(a_ctrl->vcm_pwd, 1); - } - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(a_ctrl->actuator_mutex); - if (on) - rc = msm_actuator_power_up(a_ctrl); - else - rc = msm_actuator_power_down(a_ctrl); - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static struct v4l2_subdev_core_ops msm_actuator_subdev_core_ops = { - .ioctl = msm_actuator_subdev_ioctl, - .s_power = msm_actuator_power, -}; - -static struct v4l2_subdev_ops msm_actuator_subdev_ops = { - .core = &msm_actuator_subdev_core_ops, -}; - -static const struct i2c_device_id msm_actuator_i2c_id[] = { - {"qcom,actuator", (kernel_ulong_t)NULL}, - { } -}; - -static int32_t msm_actuator_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_actuator_ctrl_t *act_ctrl_t = NULL; - pr_err("msm_actuator_i2c_probe: Enter\n"); - - if (client == NULL) { - pr_err("msm_actuator_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; - } - - act_ctrl_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!act_ctrl_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - kfree(act_ctrl_t); - goto probe_failure; - } - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &act_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", act_ctrl_t->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(act_ctrl_t); - return rc; - } - - act_ctrl_t->i2c_driver = &msm_actuator_i2c_driver; - act_ctrl_t->i2c_client.client = client; - act_ctrl_t->curr_step_pos = 0, - act_ctrl_t->curr_region_index = 0, - /* Set device type as I2C */ - act_ctrl_t->act_device_type = MSM_CAMERA_I2C_DEVICE; - act_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - act_ctrl_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - act_ctrl_t->actuator_mutex = &msm_actuator_mutex; - - act_ctrl_t->cam_name = act_ctrl_t->subdev_id; - CDBG("act_ctrl_t->cam_name: %d", act_ctrl_t->cam_name); - /* Assign name for sub device */ - snprintf(act_ctrl_t->msm_sd.sd.name, sizeof(act_ctrl_t->msm_sd.sd.name), - "%s", act_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&act_ctrl_t->msm_sd.sd, - act_ctrl_t->i2c_client.client, - act_ctrl_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&act_ctrl_t->msm_sd.sd, act_ctrl_t); - act_ctrl_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - act_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&act_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - act_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - act_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - act_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&act_ctrl_t->msm_sd); - msm_actuator_v4l2_subdev_fops = v4l2_subdev_fops; - -#ifdef CONFIG_COMPAT - msm_actuator_v4l2_subdev_fops.compat_ioctl32 = - msm_actuator_subdev_fops_ioctl; -#endif - act_ctrl_t->msm_sd.sd.devnode->fops = - &msm_actuator_v4l2_subdev_fops; - - act_ctrl_t->actuator_state = ACTUATOR_POWER_DOWN; - pr_info("msm_actuator_i2c_probe: succeeded\n"); - pr_err("msm_actuator_i2c_probe: Exit\n"); - -probe_failure: - return rc; -} - -static int32_t msm_actuator_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_actuator_ctrl_t *msm_actuator_t = NULL; - struct msm_actuator_vreg *vreg_cfg; - pr_err("msm_actuator_platform_probe: Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_actuator_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!msm_actuator_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_actuator_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_actuator_t->cci_master, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_actuator_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_actuator_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - msm_actuator_t->actuator_mutex = &msm_actuator_mutex; - msm_actuator_t->cam_name = pdev->id; - - /* Set platform device handle */ - msm_actuator_t->pdev = pdev; - /* Set device type as platform device */ - msm_actuator_t->act_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_actuator_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_actuator_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_actuator_t->i2c_client.cci_client) { - kfree(msm_actuator_t->vreg_cfg.cam_vreg); - kfree(msm_actuator_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = msm_actuator_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_actuator_t->msm_sd.sd, - msm_actuator_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_actuator_t->msm_sd.sd, msm_actuator_t); - msm_actuator_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - msm_actuator_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_actuator_t->msm_sd.sd.name, - ARRAY_SIZE(msm_actuator_t->msm_sd.sd.name), "msm_actuator"); - media_entity_init(&msm_actuator_t->msm_sd.sd.entity, 0, NULL, 0); - msm_actuator_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_actuator_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - msm_actuator_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&msm_actuator_t->msm_sd); - pr_err("msm_actuator_platform_probe: Exit\n"); - return rc; -} - -static const struct of_device_id msm_actuator_i2c_dt_match[] = { - {.compatible = "qcom,actuator"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_i2c_dt_match); - -static struct i2c_driver msm_actuator_i2c_driver = { - .id_table = msm_actuator_i2c_id, - .probe = msm_actuator_i2c_probe, - .remove = __exit_p(msm_actuator_i2c_remove), - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_i2c_dt_match, - }, -}; - -static const struct of_device_id msm_actuator_dt_match[] = { - {.compatible = "qcom,actuator", .data = NULL}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_dt_match); - -static struct platform_driver msm_actuator_platform_driver = { - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_dt_match, - }, -}; - -static int __init msm_actuator_init_module(void) -{ - int32_t rc = 0; - pr_err("msm_actuator_init_module: Enter\n"); - rc = platform_driver_probe(&msm_actuator_platform_driver, - msm_actuator_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&msm_actuator_i2c_driver); -} - -static struct msm_actuator msm_vcm_actuator_table = { - .act_type = ACTUATOR_VCM, - .func_tbl = { - .actuator_init_step_table = msm_actuator_vcm_init_step_table, - .actuator_move_focus = msm_actuator_move_focus, - .actuator_write_focus = msm_actuator_write_focus, - .actuator_set_default_focus = msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_vcm_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_vcm_set_position, - .actuator_sw_landing = msm_actuator_vcm_sw_landing, - }, -}; - -static struct msm_actuator msm_piezo_actuator_table = { - .act_type = ACTUATOR_PIEZO, - .func_tbl = { - .actuator_init_step_table = NULL, - .actuator_move_focus = msm_actuator_piezo_move_focus, - .actuator_write_focus = NULL, - .actuator_set_default_focus = - msm_actuator_piezo_set_default_focus, - .actuator_init_focus = msm_actuator_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - }, -}; - -module_init(msm_actuator_init_module); -MODULE_DESCRIPTION("MSM ACTUATOR"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.h deleted file mode 100644 index b9e90500d153..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/actuator/msm_actuator.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_ACTUATOR_H -#define MSM_ACTUATOR_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_ACTUATOT_MAX_VREGS (10) - -struct msm_actuator_ctrl_t; - -enum msm_actuator_state_t { - ACTUATOR_POWER_DOWN, - ACTUATOR_POWER_UP, -}; - -struct msm_actuator_func_tbl { - int32_t (*actuator_i2c_write_b_af)(struct msm_actuator_ctrl_t *, - uint8_t, - uint8_t); - int32_t (*actuator_init_step_table)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_info_t *); - int32_t (*actuator_init_focus)(struct msm_actuator_ctrl_t *, - uint16_t, struct reg_settings_t *); - int32_t (*actuator_set_default_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - int32_t (*actuator_move_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - void (*actuator_parse_i2c_params)(struct msm_actuator_ctrl_t *, - int16_t, uint32_t, uint16_t); - void (*actuator_write_focus)(struct msm_actuator_ctrl_t *, - uint16_t, - struct damping_params_t *, - int8_t, - int16_t); - int32_t (*actuator_set_position)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_position_t *); - int32_t (*actuator_sw_landing)(struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); -}; - -struct msm_actuator { - enum actuator_type act_type; - struct msm_actuator_func_tbl func_tbl; -}; - -struct msm_actuator_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_ACTUATOT_MAX_VREGS]; - int num_vreg; -}; - -struct msm_actuator_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t act_device_type; - struct msm_sd_subdev msm_sd; - enum af_camera_name cam_name; - struct mutex *actuator_mutex; - struct msm_actuator_func_tbl *func_tbl; - enum msm_actuator_data_type i2c_data_type; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *act_v4l2_subdev_ops; - - int16_t curr_step_pos; - uint16_t curr_region_index; - uint16_t *step_position_table; - struct region_params_t region_params[MAX_ACTUATOR_REGION]; - uint16_t reg_tbl_size; - struct msm_actuator_reg_params_t reg_tbl[MAX_ACTUATOR_REG_TBL_SIZE]; - uint16_t region_size; - void *user_data; - uint32_t vcm_pwd; - uint32_t vcm_enable; - uint32_t total_steps; - uint16_t pwd_step; - uint16_t initial_code; - struct msm_camera_i2c_reg_array *i2c_reg_tbl; - uint16_t i2c_tbl_index; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_actuator_state_t actuator_state; - struct msm_actuator_vreg vreg_cfg; - uint32_t max_code_size; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/Makefile deleted file mode 100644 index ee5bbef3491b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSM_CCI) += msm_cci.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cam_cci_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cam_cci_hwreg.h deleted file mode 100644 index 059633bfd54a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cam_cci_hwreg.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAM_CCI_HWREG__ -#define __MSM_CAM_CCI_HWREG__ - -#define CCI_HW_VERSION_ADDR 0x00000000 -#define CCI_RESET_CMD_ADDR 0x00000004 -#define CCI_RESET_CMD_RMSK 0x0f73f3f7 -#define CCI_M0_RESET_RMSK 0x3F1 -#define CCI_M1_RESET_RMSK 0x3F001 -#define CCI_QUEUE_START_ADDR 0x00000008 -#define CCI_SET_CID_SYNC_TIMER_0_ADDR 0x00000010 -#define CCI_I2C_M0_SCL_CTL_ADDR 0x00000100 -#define CCI_I2C_M0_SDA_CTL_0_ADDR 0x00000104 -#define CCI_I2C_M0_SDA_CTL_1_ADDR 0x00000108 -#define CCI_I2C_M0_SDA_CTL_2_ADDR 0x0000010c -#define CCI_I2C_M0_READ_DATA_ADDR 0x00000118 -#define CCI_I2C_M0_MISC_CTL_ADDR 0x00000110 -#define CCI_I2C_M0_READ_BUF_LEVEL_ADDR 0x0000011C -#define CCI_HALT_REQ_ADDR 0x00000034 -#define CCI_M0_HALT_REQ_RMSK 0x1 -#define CCI_M1_HALT_REQ_RMSK 0x2 -#define CCI_I2C_M1_SCL_CTL_ADDR 0x00000200 -#define CCI_I2C_M1_SDA_CTL_0_ADDR 0x00000204 -#define CCI_I2C_M1_SDA_CTL_1_ADDR 0x00000208 -#define CCI_I2C_M1_SDA_CTL_2_ADDR 0x0000020c -#define CCI_I2C_M1_MISC_CTL_ADDR 0x00000210 -#define CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR 0x00000304 -#define CCI_I2C_M0_Q0_CUR_CMD_ADDR 0x00000308 -#define CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR 0x00000300 -#define CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x00000310 -#define CCI_IRQ_MASK_0_ADDR 0x00000c04 -#define CCI_IRQ_MASK_0_RMSK 0x7fff7ff7 -#define CCI_IRQ_CLEAR_0_ADDR 0x00000c08 -#define CCI_IRQ_STATUS_0_ADDR 0x00000c0c -#define CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK 0x4000000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK 0x2000000 -#define CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK 0x1000000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK 0x100000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK 0x10000 -#define CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK 0x1000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK 0x100 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK 0x10 -#define CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK 0x18000EE6 -#define CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK 0x60EE6000 -#define CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK 0x1 -#define CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x00000c00 -#endif /* __MSM_CAM_CCI_HWREG__ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.c deleted file mode 100644 index 4cb65c8e375a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.c +++ /dev/null @@ -1,1366 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_cam_cci_hwreg.h" -#include "msm_camera_io_util.h" - -#define V4L2_IDENT_CCI 50005 -#define CCI_I2C_QUEUE_0_SIZE 64 -#define CCI_I2C_QUEUE_1_SIZE 16 -#define CYCLES_PER_MICRO_SEC 4915 -#define CCI_MAX_DELAY 10000 - -#define CCI_TIMEOUT msecs_to_jiffies(100) - -/* TODO move this somewhere else */ -#define MSM_CCI_DRV_NAME "msm_cci" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do {} while (0) -#endif - -/* Max bytes that can be read per CCI read transaction */ -#define CCI_READ_MAX 12 -#define CCI_I2C_READ_MAX_RETRIES 3 -#define CCI_I2C_MAX_READ 8192 -#define CCI_I2C_MAX_WRITE 8192 -#define CCI_NUM_CLK_MAX 16 - -static struct v4l2_subdev *g_cci_subdev; - -static struct msm_cam_clk_info cci_clk_info[CCI_NUM_CLK_MAX]; - -static void msm_cci_set_clk_param(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl) -{ - struct msm_cci_clk_params_t *clk_params = NULL; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - enum i2c_freq_mode_t i2c_freq_mode = c_ctrl->cci_info->i2c_freq_mode; - - if (cci_dev->master_clk_init[master]) - return; - clk_params = &cci_dev->cci_clk_params[i2c_freq_mode]; - - if (MASTER_0 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M0_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M0_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M0_MISC_CTL_ADDR); - } else if (MASTER_1 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M1_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M1_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M1_MISC_CTL_ADDR); - } - cci_dev->master_clk_init[master] = 1; - return; -} - -static void msm_cci_flush_queue(struct cci_device *cci_dev, - enum cci_i2c_master_t master) -{ - int32_t rc = 0; - - msm_camera_io_w_mb(1 << master, cci_dev->base + CCI_HALT_REQ_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc < 0) { - pr_err("%s:%d wait failed\n", __func__, __LINE__); - } else if (rc == 0) { - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - - /* Set proper mask to RESET CMD address based on MASTER */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, __LINE__, - rc); - } - return; -} - -static int32_t msm_cci_validate_queue(struct cci_device *cci_dev, - uint32_t len, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t read_val = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - read_val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR + reg_offset); - CDBG("%s line %d CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR %d len %d max %d\n", - __func__, __LINE__, read_val, len, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size); - if ((read_val + len + 1) > cci_dev-> - cci_i2c_queue_info[master][queue].max_queue_size) { - uint32_t reg_val = 0; - uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - msm_camera_io_w_mb(report_val, - cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - read_val++; - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR %d\n", - __func__, __LINE__, read_val); - msm_camera_io_w_mb(read_val, cci_dev->base + - CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR + reg_offset); - reg_val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(reg_val, cci_dev->base + - CCI_QUEUE_START_ADDR); - CDBG("%s line %d wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - return rc; - } - rc = cci_dev->cci_master_info[master].status; - if (rc < 0) - pr_err("%s failed rc %d\n", __func__, rc); - } - return rc; -} - -static int32_t msm_cci_data_queue(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl, enum cci_i2c_queue_t queue, uint8_t is_burst) -{ - uint16_t i = 0, j = 0, k = 0, h = 0, len = 0; - int32_t rc = 0; - uint32_t cmd = 0, delay = 0; - uint8_t data[11]; - uint16_t reg_addr = 0; - struct msm_camera_i2c_reg_setting *i2c_msg = - &c_ctrl->cfg.cci_i2c_write_cfg; - uint16_t cmd_size = i2c_msg->size; - struct msm_camera_i2c_reg_array *i2c_cmd = i2c_msg->reg_setting; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - - if (i2c_cmd == NULL) { - pr_err("%s:%d Failed line\n", __func__, - __LINE__); - return -EINVAL; - } - - if ((!cmd_size) || (cmd_size > CCI_I2C_MAX_WRITE)) { - pr_err("%s:%d Failed line\n", __func__, __LINE__); - return -EINVAL; - } - - CDBG("%s addr type %d data type %d\n", __func__, - i2c_msg->addr_type, i2c_msg->data_type); - - if (i2c_msg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - if (i2c_msg->data_type >= MSM_CAMERA_I2C_DATA_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - /* assume total size within the max queue */ - while (cmd_size) { - CDBG("%s cmd_size %d addr 0x%x data 0x%x", __func__, - cmd_size, i2c_cmd->reg_addr, i2c_cmd->reg_data); - delay = i2c_cmd->delay; - data[i++] = CCI_I2C_WRITE_CMD; - if (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA) { - if (i2c_cmd->reg_addr) { - reg_addr = i2c_cmd->reg_addr; - } - } - else { - reg_addr = i2c_cmd->reg_addr; - } - /* either byte or word addr */ - if (i2c_msg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - data[i++] = reg_addr; - else { - data[i++] = (reg_addr & 0xFF00) >> 8; - data[i++] = reg_addr & 0x00FF; - } - /* max of 10 data bytes */ - do { - if ((i2c_msg->data_type == MSM_CAMERA_I2C_BYTE_DATA) || - (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA)) { - data[i++] = i2c_cmd->reg_data; - if (!is_burst) - reg_addr++; - } else { - if ((i + 1) <= 10) { - data[i++] = (i2c_cmd->reg_data & - 0xFF00) >> 8; /* MSB */ - data[i++] = i2c_cmd->reg_data & - 0x00FF; /* LSB */ - if (!is_burst) - reg_addr += 2; - } else - break; - } - i2c_cmd++; - } while (--cmd_size && !i2c_cmd->reg_addr && (i <= 10)); - data[0] |= ((i-1) << 4); - len = ((i-1)/4) + 1; - rc = msm_cci_validate_queue(cci_dev, len, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - for (h = 0, k = 0; h < len; h++) { - cmd = 0; - for (j = 0; (j < 4 && k < i); j++) - cmd |= (data[k++] << (j * 8)); - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - if ((delay > 0) && (delay < CCI_MAX_DELAY)) { - cmd = (uint32_t)((delay * CYCLES_PER_MICRO_SEC) / - 0x100); - cmd <<= 4; - cmd |= CCI_I2C_WAIT_CMD; - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - i = 0; - } - return rc; -} - -static int32_t msm_cci_write_i2c_queue(struct cci_device *cci_dev, - uint32_t val, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cci_validate_queue(cci_dev, 1, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR:val 0x%x:0x%x\n", - __func__, CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - return rc; -} - -static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - uint32_t val = 0; - int32_t read_words = 0, exp_words = 0; - int32_t index = 0, first_byte = 0; - uint32_t i = 0; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_1; - struct cci_device *cci_dev = NULL; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - CDBG("%s line %d\n", __func__, __LINE__); - cci_dev = v4l2_get_subdevdata(sd); - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_read call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - if (read_cfg->data == NULL) { - pr_err("%s:%d Data ptr is NULL\n", __func__, - __LINE__); - goto ERROR; - } - - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - ((read_cfg->addr & 0xFF) << 8); - if (read_cfg->addr_type == MSM_CAMERA_I2C_WORD_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - (((read_cfg->addr & 0xFF00) >> 8) << 8) | - ((read_cfg->addr & 0xFF) << 16); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_READ_CMD | (read_cfg->num_byte << 4); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_UNLOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s cur word cnt 0x%x\n", __func__, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = 0; - } - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - - read_words = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_BUF_LEVEL_ADDR + master * 0x100); - exp_words = ((read_cfg->num_byte / 4) + 1); - if (read_words != exp_words) { - pr_err("%s:%d read_words = %d, exp words = %d\n", __func__, - __LINE__, read_words, exp_words); - memset(read_cfg->data, 0, read_cfg->num_byte); - rc = -EINVAL; - goto ERROR; - } - index = 0; - CDBG("%s index %d num_type %d\n", __func__, index, - read_cfg->num_byte); - first_byte = 0; - do { - val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_DATA_ADDR + master * 0x100); - CDBG("%s read val 0x%x\n", __func__, val); - for (i = 0; (i < 4) && (index < read_cfg->num_byte); i++) { - CDBG("%s i %d index %d\n", __func__, i, index); - if (!first_byte) { - CDBG("%s sid 0x%x\n", __func__, val & 0xFF); - first_byte++; - } else { - read_cfg->data[index] = - (val >> (i * 8)) & 0xFF; - CDBG("%s data[%d] 0x%x\n", __func__, index, - read_cfg->data[index]); - index++; - } - } - } while (--read_words > 0); -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - struct cci_device *cci_dev = NULL; - enum cci_i2c_master_t master; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - uint16_t read_bytes = 0; - - if (!sd || !c_ctrl) { - pr_err("%s:%d sd %pK c_ctrl %pK\n", __func__, - __LINE__, sd, c_ctrl); - return -EINVAL; - } - if (!c_ctrl->cci_info) { - pr_err("%s:%d cci_info NULL\n", __func__, __LINE__); - return -EINVAL; - } - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev) { - pr_err("%s:%d cci_dev NULL\n", __func__, __LINE__); - return -EINVAL; - } - - if (c_ctrl->cci_info->cci_i2c_master > MASTER_MAX - || c_ctrl->cci_info->cci_i2c_master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - if ((!read_cfg->num_byte) || (read_cfg->num_byte > CCI_I2C_MAX_READ)) { - pr_err("%s:%d read num bytes 0\n", __func__, __LINE__); - rc = -EINVAL; - goto ERROR; - } - - read_bytes = read_cfg->num_byte; - do { - if (read_bytes > CCI_READ_MAX) - read_cfg->num_byte = CCI_READ_MAX; - else - read_cfg->num_byte = read_bytes; - rc = msm_cci_i2c_read(sd, c_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - if (read_bytes > CCI_READ_MAX) { - read_cfg->addr += CCI_READ_MAX; - read_cfg->data += CCI_READ_MAX; - read_bytes -= CCI_READ_MAX; - } else { - read_bytes = 0; - } - } while (read_bytes); -ERROR: - return rc; -} - -static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl, uint8_t is_burst) -{ - int32_t rc = 0; - struct cci_device *cci_dev; - uint32_t val; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_0; - cci_dev = v4l2_get_subdevdata(sd); - - master = c_ctrl->cci_info->cci_i2c_master; - if (master >= MASTER_MAX - || master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_write call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - CDBG("%s:%d CCI_I2C_SET_PARAM_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - CDBG("%s:%d CCI_I2C_LOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - rc = msm_cci_data_queue(cci_dev, c_ctrl, queue, is_burst); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - val = CCI_I2C_UNLOCK_CMD; - CDBG("%s:%d CCI_I2C_UNLOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s:%d cur word count %d\n", __func__, __LINE__, val); - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - - CDBG("%s:%d E wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = cci_dev->cci_master_info[master].status; - } - CDBG("%s:%d X wait_for_completion_interruptible\n", __func__, - __LINE__); - -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int msm_cci_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - if (!chip) { - pr_err("%s:%d: NULL pointer supplied for chip ident\n", - __func__, __LINE__); - return -EINVAL; - } - chip->ident = V4L2_IDENT_CCI; - chip->revision = 0; - return 0; -} - -static int32_t msm_cci_pinctrl_init(struct cci_device *cci_dev) -{ - struct msm_pinctrl_info *cci_pctrl = NULL; - - cci_pctrl = &cci_dev->cci_pinctrl; - cci_pctrl->pinctrl = devm_pinctrl_get(&cci_dev->pdev->dev); - if (IS_ERR_OR_NULL(cci_pctrl->pinctrl)) { - pr_err("%s:%d devm_pinctrl_get cci_pinctrl failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_active = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_active)) { - pr_err("%s:%d look up state for active state failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_suspend = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_suspend)) { - pr_err("%s:%d look up state for suspend state failed\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -static int32_t msm_cci_init(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - uint8_t i = 0; - int32_t rc = 0, ret = 0; - struct cci_device *cci_dev; - enum cci_i2c_master_t master; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev || !c_ctrl) { - pr_err("%s:%d failed: invalid params %pK %pK\n", __func__, - __LINE__, cci_dev, c_ctrl); - rc = -ENOMEM; - return rc; - } - if (cci_dev->ref_count++) { - CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); - master = c_ctrl->cci_info->cci_i2c_master; - CDBG("%s:%d master %d\n", __func__, __LINE__, master); - if (master < MASTER_MAX && master >= 0) { - mutex_lock(&cci_dev->cci_master_info[master].mutex); - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - /* Set proper mask to RESET CMD address */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master]. - reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, - __LINE__, rc); - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - } - return 0; - } - ret = msm_cci_pinctrl_init(cci_dev); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - cci_dev->cci_pinctrl_status = 0; - } else { - cci_dev->cci_pinctrl_status = 1; - } - rc = msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 1); - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: request gpio failed\n", __func__); - goto request_gpio_failed; - } - rc = msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 1); - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: clk enable failed\n", __func__); - goto clk_enable_failed; - } - enable_irq(cci_dev->irq->start); - cci_dev->hw_version = msm_camera_io_r_mb(cci_dev->base + - CCI_HW_VERSION_ADDR); - pr_info("%s:%d: hw_version = 0x%x\n", __func__, __LINE__, - cci_dev->hw_version); - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_RESET_CMD_RMSK, cci_dev->base + - CCI_RESET_CMD_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_RESET_CMD_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[MASTER_0].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - goto reset_complete_failed; - } - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - msm_cci_set_clk_param(cci_dev, c_ctrl); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_MASK_0_ADDR); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - cci_dev->cci_state = CCI_STATE_ENABLED; - - return 0; - -reset_complete_failed: - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); -clk_enable_failed: - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - } - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); -request_gpio_failed: - cci_dev->ref_count--; - return rc; -} - -static int32_t msm_cci_release(struct v4l2_subdev *sd) -{ - uint8_t i = 0, rc = 0; - struct cci_device *cci_dev; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev->ref_count || cci_dev->cci_state != CCI_STATE_ENABLED) { - pr_err("%s invalid ref count %d / cci state %d\n", - __func__, cci_dev->ref_count, cci_dev->cci_state); - return -EINVAL; - } - if (--cci_dev->ref_count) { - CDBG("%s ref_count Exit %d\n", __func__, cci_dev->ref_count); - return 0; - } - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); - if (cci_dev->cci_pinctrl_status) { - rc = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - cci_dev->cci_pinctrl_status = 0; - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - cci_dev->cci_state = CCI_STATE_DISABLED; - - return 0; -} - -static int32_t msm_cci_config(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *cci_ctrl) -{ - int32_t rc = 0; - CDBG("%s line %d cmd %d\n", __func__, __LINE__, - cci_ctrl->cmd); - switch (cci_ctrl->cmd) { - case MSM_CCI_INIT: - rc = msm_cci_init(sd, cci_ctrl); - break; - case MSM_CCI_RELEASE: - rc = msm_cci_release(sd); - break; - case MSM_CCI_I2C_READ: - rc = msm_cci_i2c_read_bytes(sd, cci_ctrl); - break; - case MSM_CCI_I2C_WRITE: - rc = msm_cci_i2c_write(sd, cci_ctrl, 0); - break; - case MSM_CCI_I2C_WRITE_BURST: - rc = msm_cci_i2c_write(sd, cci_ctrl, 1); - break; - case MSM_CCI_GPIO_WRITE: - break; - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - cci_ctrl->status = rc; - return rc; -} - -static irqreturn_t msm_cci_irq(int irq_num, void *data) -{ - uint32_t irq; - struct cci_device *cci_dev = data; - irq = msm_camera_io_r_mb(cci_dev->base + CCI_IRQ_STATUS_0_ADDR); - msm_camera_io_w_mb(irq, cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - msm_camera_io_w_mb(0x0, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - CDBG("%s CCI_I2C_M0_STATUS_ADDR = 0x%x\n", __func__, irq); - if (irq & CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK) { - if (cci_dev->cci_master_info[MASTER_0].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_0].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_0]. - reset_complete); - } - if (cci_dev->cci_master_info[MASTER_1].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_1].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_1]. - reset_complete); - } - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_0].status = 0; - complete(&cci_dev->cci_master_info[MASTER_0].reset_complete); - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_1].status = 0; - complete(&cci_dev->cci_master_info[MASTER_1].reset_complete); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_1].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK) { - pr_err("%s:%d MASTER_0 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_0].status = -EINVAL; - msm_camera_io_w_mb(CCI_M0_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK) { - pr_err("%s:%d MASTER_1 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_1].status = -EINVAL; - msm_camera_io_w_mb(CCI_M1_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - return IRQ_HANDLED; -} - -static int msm_cci_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct cci_device *cci_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s line %d\n", __func__, __LINE__); - ret = msm_cci_irq(cci_dev->irq->start, cci_dev); - CDBG("%s: msm_cci_irq return %d\n", __func__, ret); - *handled = TRUE; - return 0; -} - -static long msm_cci_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - CDBG("%s line %d\n", __func__, __LINE__); - switch (cmd) { - case VIDIOC_MSM_CCI_CFG: - rc = msm_cci_config(sd, arg); - break; - case MSM_SD_SHUTDOWN: { - return rc; - } - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - return rc; -} - -static struct v4l2_subdev_core_ops msm_cci_subdev_core_ops = { - .g_chip_ident = &msm_cci_subdev_g_chip_ident, - .ioctl = &msm_cci_subdev_ioctl, - .interrupt_service_routine = msm_cci_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_cci_subdev_ops = { - .core = &msm_cci_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_cci_internal_ops; - -static void msm_cci_init_cci_params(struct cci_device *new_cci_dev) -{ - uint8_t i = 0, j = 0; - for (i = 0; i < NUM_MASTERS; i++) { - new_cci_dev->cci_master_info[i].status = 0; - mutex_init(&new_cci_dev->cci_master_info[i].mutex); - init_completion(&new_cci_dev-> - cci_master_info[i].reset_complete); - for (j = 0; j < NUM_QUEUES; j++) { - if (j == QUEUE_0) - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_0_SIZE; - else - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_1_SIZE; - } - } - return; -} - -static int32_t msm_cci_init_gpio_params(struct cci_device *cci_dev) -{ - int32_t rc = 0, i = 0; - uint32_t *val_array = NULL; - uint8_t tbl_size = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct gpio *gpio_tbl = NULL; - - cci_dev->cci_gpio_tbl_size = tbl_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, tbl_size); - if (!tbl_size) { - pr_err("%s:%d gpio count 0\n", __func__, __LINE__); - return 0; - } - - gpio_tbl = cci_dev->cci_gpio_tbl = - kzalloc(sizeof(struct gpio) * tbl_size, GFP_KERNEL); - if (!gpio_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - return 0; - } - - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].gpio = of_get_gpio(of_node, i); - CDBG("%s gpio_tbl[%d].gpio = %d\n", __func__, i, - gpio_tbl[i].gpio); - } - - val_array = kzalloc(sizeof(uint32_t) * tbl_size, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-tbl-flags", - val_array, tbl_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].flags = val_array[i]; - CDBG("%s gpio_tbl[%d].flags = %ld\n", __func__, i, - gpio_tbl[i].flags); - } - - for (i = 0; i < tbl_size; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-tbl-label", i, &gpio_tbl[i].label); - CDBG("%s gpio_tbl[%d].label = %s\n", __func__, i, - gpio_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(val_array); -ERROR1: - kfree(cci_dev->cci_gpio_tbl); - cci_dev->cci_gpio_tbl = NULL; - cci_dev->cci_gpio_tbl_size = 0; - return rc; -} - -static void msm_cci_init_default_clk_params(struct cci_device *cci_dev, - uint8_t index) -{ - /* default clock params are for 100Khz */ - cci_dev->cci_clk_params[index].hw_thigh = 78; - cci_dev->cci_clk_params[index].hw_tlow = 114; - cci_dev->cci_clk_params[index].hw_tsu_sto = 28; - cci_dev->cci_clk_params[index].hw_tsu_sta = 28; - cci_dev->cci_clk_params[index].hw_thd_dat = 10; - cci_dev->cci_clk_params[index].hw_thd_sta = 77; - cci_dev->cci_clk_params[index].hw_tbuf = 118; - cci_dev->cci_clk_params[index].hw_scl_stretch_en = 0; - cci_dev->cci_clk_params[index].hw_trdhld = 6; - cci_dev->cci_clk_params[index].hw_tsp = 1; -} - -static void msm_cci_init_clk_params(struct cci_device *cci_dev) -{ - int32_t rc = 0; - uint32_t val = 0; - uint8_t count = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct device_node *src_node = NULL; - - for (count = 0; count < I2C_MAX_MODES; count++) { - - if (I2C_STANDARD_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_standard_mode"); - else if (I2C_FAST_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_fast_mode"); - else - src_node = of_find_node_by_name(of_node, - "qcom,i2c_custom_mode"); - - rc = of_property_read_u32(src_node, "qcom,hw-thigh", &val); - CDBG("%s qcom,hw-thigh %d, rc %d\n", __func__, val, rc); - if (!rc) { - cci_dev->cci_clk_params[count].hw_thigh = val; - rc = of_property_read_u32(src_node, "qcom,hw-tlow", - &val); - CDBG("%s qcom,hw-tlow %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tlow = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sto", - &val); - CDBG("%s qcom,hw-tsu-sto %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sto = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sta", - &val); - CDBG("%s qcom,hw-tsu-sta %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-dat", - &val); - CDBG("%s qcom,hw-thd-dat %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_dat = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-sta", - &val); - CDBG("%s qcom,hw-thd-sta %d, rc %d\n", __func__, - val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-tbuf", - &val); - CDBG("%s qcom,hw-tbuf %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tbuf = val; - rc = of_property_read_u32(src_node, - "qcom,hw-scl-stretch-en", &val); - CDBG("%s qcom,hw-scl-stretch-en %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_scl_stretch_en = val; - rc = of_property_read_u32(src_node, "qcom,hw-trdhld", - &val); - CDBG("%s qcom,hw-trdhld %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_trdhld = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsp", - &val); - CDBG("%s qcom,hw-tsp %d, rc %d\n", __func__, val, rc); - } - if (!rc) - cci_dev->cci_clk_params[count].hw_tsp = val; - else - msm_cci_init_default_clk_params(cci_dev, count); - of_node_put(src_node); - src_node = NULL; - } - return; -} - -struct v4l2_subdev *msm_cci_get_subdev(void) -{ - return g_cci_subdev; -} - -static int msm_cci_get_clk_info(struct cci_device *cci_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CCI_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - cci_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CCI_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CCI_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cci_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, cci_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cci_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - cci_clk_info[i].clk_rate); - } - return 0; -} - -static int msm_cci_probe(struct platform_device *pdev) -{ - struct cci_device *new_cci_dev; - int rc = 0; - pr_err("%s: pdev %pK device id = %d\n", __func__, pdev, pdev->id); - new_cci_dev = kzalloc(sizeof(struct cci_device), GFP_KERNEL); - if (!new_cci_dev) { - CDBG("%s: no enough memory\n", __func__); - return -ENOMEM; - } - v4l2_subdev_init(&new_cci_dev->msm_sd.sd, &msm_cci_subdev_ops); - new_cci_dev->msm_sd.sd.internal_ops = &msm_cci_internal_ops; - snprintf(new_cci_dev->msm_sd.sd.name, - ARRAY_SIZE(new_cci_dev->msm_sd.sd.name), "msm_cci"); - v4l2_set_subdevdata(&new_cci_dev->msm_sd.sd, new_cci_dev); - platform_set_drvdata(pdev, &new_cci_dev->msm_sd.sd); - CDBG("%s sd %pK\n", __func__, &new_cci_dev->msm_sd.sd); - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - rc = msm_cci_get_clk_info(new_cci_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_cci_get_clk_info() failed", __func__); - return -EFAULT; - } - - new_cci_dev->ref_count = 0; - new_cci_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cci"); - if (!new_cci_dev->mem) { - CDBG("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cci"); - CDBG("%s line %d cci irq start %d end %d\n", __func__, - __LINE__, - (int) new_cci_dev->irq->start, - (int) new_cci_dev->irq->end); - if (!new_cci_dev->irq) { - CDBG("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->io = request_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem), pdev->name); - if (!new_cci_dev->io) { - CDBG("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto cci_no_resource; - } - - new_cci_dev->base = ioremap(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); - if (!new_cci_dev->base) { - rc = -ENOMEM; - goto cci_release_mem; - } - rc = request_irq(new_cci_dev->irq->start, msm_cci_irq, - IRQF_TRIGGER_RISING, "cci", new_cci_dev); - if (rc < 0) { - CDBG("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto cci_release_mem; - } - disable_irq(new_cci_dev->irq->start); - new_cci_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - msm_sd_register(&new_cci_dev->msm_sd); - new_cci_dev->pdev = pdev; - msm_cci_init_cci_params(new_cci_dev); - msm_cci_init_clk_params(new_cci_dev); - msm_cci_init_gpio_params(new_cci_dev); - rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); - if (rc) - pr_err("%s: failed to add child nodes, rc=%d\n", __func__, rc); - new_cci_dev->cci_state = CCI_STATE_DISABLED; - g_cci_subdev = &new_cci_dev->msm_sd.sd; - CDBG("%s cci subdev %pK\n", __func__, &new_cci_dev->msm_sd.sd); - CDBG("%s line %d\n", __func__, __LINE__); - return 0; - -cci_release_mem: - release_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); -cci_no_resource: - kfree(new_cci_dev); - return 0; -} - -static int __exit msm_cci_exit(struct platform_device *pdev) -{ - struct v4l2_subdev *subdev = platform_get_drvdata(pdev); - struct cci_device *cci_dev = - v4l2_get_subdevdata(subdev); - release_mem_region(cci_dev->mem->start, resource_size(cci_dev->mem)); - kfree(cci_dev); - return 0; -} - -static const struct of_device_id msm_cci_dt_match[] = { - {.compatible = "qcom,cci"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_cci_dt_match); - -static struct platform_driver cci_driver = { - .probe = msm_cci_probe, - .remove = msm_cci_exit, - .driver = { - .name = MSM_CCI_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cci_dt_match, - }, -}; - -static int __init msm_cci_init_module(void) -{ - return platform_driver_register(&cci_driver); -} - -static void __exit msm_cci_exit_module(void) -{ - platform_driver_unregister(&cci_driver); -} - -module_init(msm_cci_init_module); -module_exit(msm_cci_exit_module); -MODULE_DESCRIPTION("MSM CCI driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.h deleted file mode 100644 index 1e50388cc3ff..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/cci/msm_cci.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CCI_H -#define MSM_CCI_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_sd.h" - -#define NUM_MASTERS 2 -#define NUM_QUEUES 2 - -#define TRUE 1 -#define FALSE 0 - -#define CCI_PINCTRL_STATE_DEFAULT "cci_default" -#define CCI_PINCTRL_STATE_SLEEP "cci_suspend" -#define CCI_NUM_CLK_MAX 16 - - -enum cci_i2c_queue_t { - QUEUE_0, - QUEUE_1, -}; - -struct msm_camera_cci_client { - struct v4l2_subdev *cci_subdev; - uint32_t freq; - enum i2c_freq_mode_t i2c_freq_mode; - enum cci_i2c_master_t cci_i2c_master; - uint16_t sid; - uint16_t cid; - uint32_t timeout; - uint16_t retries; - uint16_t id_map; -}; - -enum msm_cci_cmd_type { - MSM_CCI_INIT, - MSM_CCI_RELEASE, - MSM_CCI_SET_SID, - MSM_CCI_SET_FREQ, - MSM_CCI_SET_SYNC_CID, - MSM_CCI_I2C_READ, - MSM_CCI_I2C_WRITE, - MSM_CCI_GPIO_WRITE, - MSM_CCI_I2C_WRITE_BURST, -}; - -struct msm_camera_cci_wait_sync_cfg { - uint16_t line; - uint16_t delay; -}; - -struct msm_camera_cci_gpio_cfg { - uint16_t gpio_queue; - uint16_t i2c_queue; -}; - -struct msm_camera_cci_i2c_read_cfg { - uint16_t addr; - enum msm_camera_i2c_reg_addr_type addr_type; - uint8_t *data; - uint16_t num_byte; -}; - -struct msm_camera_cci_i2c_queue_info { - uint32_t max_queue_size; - uint32_t report_id; - uint32_t irq_en; - uint32_t capture_rep_data; -}; - -struct msm_camera_cci_ctrl { - int32_t status; - struct msm_camera_cci_client *cci_info; - enum msm_cci_cmd_type cmd; - union { - struct msm_camera_i2c_reg_setting cci_i2c_write_cfg; - struct msm_camera_cci_i2c_read_cfg cci_i2c_read_cfg; - struct msm_camera_cci_wait_sync_cfg cci_wait_sync_cfg; - struct msm_camera_cci_gpio_cfg gpio_cfg; - } cfg; -}; - -struct msm_camera_cci_master_info { - uint32_t status; - uint8_t reset_pending; - struct mutex mutex; - struct completion reset_complete; -}; - -struct msm_cci_clk_params_t { - uint16_t hw_thigh; - uint16_t hw_tlow; - uint16_t hw_tsu_sto; - uint16_t hw_tsu_sta; - uint16_t hw_thd_dat; - uint16_t hw_thd_sta; - uint16_t hw_tbuf; - uint8_t hw_scl_stretch_en; - uint8_t hw_trdhld; - uint8_t hw_tsp; -}; - -enum msm_cci_state_t { - CCI_STATE_ENABLED, - CCI_STATE_DISABLED, -}; - -struct cci_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - void __iomem *base; - - uint32_t hw_version; - uint8_t ref_count; - enum msm_cci_state_t cci_state; - uint32_t num_clk; - - struct clk *cci_clk[CCI_NUM_CLK_MAX]; - struct msm_camera_cci_i2c_queue_info - cci_i2c_queue_info[NUM_MASTERS][NUM_QUEUES]; - struct msm_camera_cci_master_info cci_master_info[NUM_MASTERS]; - struct msm_cci_clk_params_t cci_clk_params[I2C_MAX_MODES]; - struct gpio *cci_gpio_tbl; - uint8_t cci_gpio_tbl_size; - uint8_t master_clk_init[MASTER_MAX]; - struct msm_pinctrl_info cci_pinctrl; - uint8_t cci_pinctrl_status; -}; - -enum msm_cci_i2c_cmd_type { - CCI_I2C_SET_PARAM_CMD = 1, - CCI_I2C_WAIT_CMD, - CCI_I2C_WAIT_SYNC_CMD, - CCI_I2C_WAIT_GPIO_EVENT_CMD, - CCI_I2C_TRIG_I2C_EVENT_CMD, - CCI_I2C_LOCK_CMD, - CCI_I2C_UNLOCK_CMD, - CCI_I2C_REPORT_CMD, - CCI_I2C_WRITE_CMD, - CCI_I2C_READ_CMD, - CCI_I2C_WRITE_DISABLE_P_CMD, - CCI_I2C_READ_DISABLE_P_CMD, - CCI_I2C_WRITE_CMD2, - CCI_I2C_WRITE_CMD3, - CCI_I2C_REPEAT_CMD, - CCI_I2C_INVALID_CMD, -}; - -enum msm_cci_gpio_cmd_type { - CCI_GPIO_SET_PARAM_CMD = 1, - CCI_GPIO_WAIT_CMD, - CCI_GPIO_WAIT_SYNC_CMD, - CCI_GPIO_WAIT_GPIO_IN_EVENT_CMD, - CCI_GPIO_WAIT_I2C_Q_TRIG_EVENT_CMD, - CCI_GPIO_OUT_CMD, - CCI_GPIO_TRIG_EVENT_CMD, - CCI_GPIO_REPORT_CMD, - CCI_GPIO_REPEAT_CMD, - CCI_GPIO_CONTINUE_CMD, - CCI_GPIO_INVALID_CMD, -}; - -struct v4l2_subdev *msm_cci_get_subdev(void); - -#define VIDIOC_MSM_CCI_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct msm_camera_cci_ctrl *) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/Makefile deleted file mode 100644 index 61ff4204fdeb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_csid.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_0_hwreg.h deleted file mode 100644 index 7bfeb200c80a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_0_hwreg.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_0_HWREG_H -#define MSM_CSID_2_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_0 = { - - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02000011, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_2_hwreg.h deleted file mode 100644 index 4ad1c2924b1f..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_2_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_2_HWREG_H -#define MSM_CSID_2_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02001000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_0_hwreg.h deleted file mode 100644 index 980f497e4596..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_0_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_0_HWREG_H -#define MSM_CSID_3_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_0 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30000000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_1_hwreg.h deleted file mode 100644 index d53867f5e5c5..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_1_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_1_HWREG_H -#define MSM_CSID_3_1_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_1 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30010000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_2_hwreg.h deleted file mode 100644 index b002d78e6f04..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/include/msm_csid_3_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_2_HWREG_H -#define MSM_CSID_3_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30020000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.c deleted file mode 100644 index b0d3f2e56090..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.c +++ /dev/null @@ -1,844 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_csid.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csid_2_0_hwreg.h" -#include "include/msm_csid_2_2_hwreg.h" -#include "include/msm_csid_3_0_hwreg.h" -#include "include/msm_csid_3_1_hwreg.h" -#include "include/msm_csid_3_2_hwreg.h" - -#define V4L2_IDENT_CSID 50002 -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V31 0x30010000 -#define CSID_VERSION_V31_1 0x30010001 -#define CSID_VERSION_V32 0x30020000 -#define CSID_VERSION_V33 0x30030000 -#define CSID_VERSION_V34 0x30040000 -#define CSID_VERSION_V40 0x40000000 -#define MSM_CSID_DRV_NAME "msm_csid" - -#define DBG_CSID 0 - -#define TRUE 1 -#define FALSE 0 - -#define CSID_NUM_CLK_MAX 16 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csid_clk_info[CSID_NUM_CLK_MAX]; -static struct msm_cam_clk_info csid_clk_src_info[CSID_NUM_CLK_MAX]; - -static struct camera_vreg_t csid_vreg_info[] = { - {"qcom,mipi-csi-vdd", REG_LDO, 0, 0, 12000}, -}; - -static struct camera_vreg_t csid_8960_vreg_info[] = { - {"mipi_csi_vdd", REG_LDO, 1200000, 1200000, 20000}, -}; - -static int msm_csid_cid_lut( - struct msm_camera_csid_lut_params *csid_lut_params, - struct csid_device *csid_dev) -{ - int rc = 0, i = 0; - uint32_t val = 0; - - if (!csid_lut_params) { - pr_err("%s:%d csid_lut_params NULL\n", __func__, __LINE__); - return -EINVAL; - } - for (i = 0; i < csid_lut_params->num_cid && i < 16; i++) { - if (csid_lut_params->vc_cfg[i]->cid >= - csid_lut_params->num_cid || - csid_lut_params->vc_cfg[i]->cid < 0) { - pr_err("%s: cid outside range %d\n", - __func__, csid_lut_params->vc_cfg[i]->cid); - return -EINVAL; - } - CDBG("%s lut params num_cid = %d, cid = %d\n", - __func__, - csid_lut_params->num_cid, - csid_lut_params->vc_cfg[i]->cid); - CDBG("%s lut params dt = 0x%x, df = %d\n", __func__, - csid_lut_params->vc_cfg[i]->dt, - csid_lut_params->vc_cfg[i]->decode_format); - if (csid_lut_params->vc_cfg[i]->dt < 0x12 || - csid_lut_params->vc_cfg[i]->dt > 0x37) { - pr_err("%s: unsupported data type 0x%x\n", - __func__, csid_lut_params->vc_cfg[i]->dt); - return rc; - } - val = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4) - & ~(0xFF << ((csid_lut_params->vc_cfg[i]->cid % 4) * - 8)); - val |= (csid_lut_params->vc_cfg[i]->dt << - ((csid_lut_params->vc_cfg[i]->cid % 4) * 8)); - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4); - - val = (csid_lut_params->vc_cfg[i]->decode_format << 4) | 0x3; - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_n_cfg_addr + - (csid_lut_params->vc_cfg[i]->cid * 4)); - } - return rc; -} - -#if DBG_CSID -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - uint32_t val = 0; - val = ((1 << csid_params->lane_cnt) - 1) << 20; - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); -} -#else -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) {} -#endif - -static void msm_csid_reset(struct csid_device *csid_dev) -{ - msm_camera_io_w(csid_dev->ctrl_reg->csid_reg.csid_rst_stb_all, - csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_rst_cmd_addr); - wait_for_completion(&csid_dev->reset_complete); - return; -} - -static int msm_csid_config(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - int rc = 0; - uint32_t val = 0; - void __iomem *csidbase; - csidbase = csid_dev->base; - if (!csidbase || !csid_params) { - pr_err("%s:%d csidbase %pK, csid params %pK\n", __func__, - __LINE__, csidbase, csid_params); - return -EINVAL; - } - - CDBG("%s csid_params, lane_cnt = %d, lane_assign = 0x%x\n", - __func__, - csid_params->lane_cnt, - csid_params->lane_assign); - CDBG("%s csid_params phy_sel = %d\n", __func__, - csid_params->phy_sel); - - msm_csid_reset(csid_dev); - - val = csid_params->lane_cnt - 1; - val |= csid_params->lane_assign << - csid_dev->ctrl_reg->csid_reg.csid_dl_input_sel_shift; - if (csid_dev->hw_version < 0x30000000) { - val |= (0xF << 10); - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - } else { - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - val = csid_params->phy_sel << - csid_dev->ctrl_reg->csid_reg.csid_phy_sel_shift; - val |= 0xF; - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_1_addr); - } - - rc = msm_csid_cid_lut(&csid_params->lut_params, csid_dev); - if (rc < 0) - return rc; - - msm_csid_set_debug_reg(csid_dev, csid_params); - return rc; -} - -static irqreturn_t msm_csid_irq(int irq_num, void *data) -{ - uint32_t irq; - struct csid_device *csid_dev; - void __iomem *csidbase; - - if (!data) { - pr_err("%s:%d data NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - }//prevent - csid_dev = data ; - if (!csid_dev->base) { - pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - } - csidbase = csid_dev->base; - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - CDBG("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", - __func__, csid_dev->pdev->id, irq); - if (irq & (0x1 << - csid_dev->ctrl_reg->csid_reg.csid_rst_done_irq_bitshift)) - complete(&csid_dev->reset_complete); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - return IRQ_HANDLED; -} - -static int msm_csid_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s E\n", __func__); - ret = msm_csid_irq(csid_dev->irq->start, csid_dev); - *handled = TRUE; - return 0; -} - -static int msm_csid_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSID; - chip->revision = 0; - return 0; -} - -static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) -{ - int rc = 0; - - if (!csid_version) { - pr_err("%s:%d csid_version NULL\n", __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - if (csid_dev->csid_state == CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - rc = -EINVAL; - return rc; - } - - csid_dev->base = ioremap(csid_dev->mem->start, - resource_size(csid_dev->mem)); - if (!csid_dev->base) { - pr_err("%s csid_dev->base NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - pr_info("%s: CSID_VERSION = 0x%x\n", __func__, - csid_dev->ctrl_reg->csid_reg.csid_version); - /* power up */ - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator on failed\n", __func__); - goto vreg_config_failed; - } - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator enable failed\n", __func__); - goto vreg_enable_failed; - } - - if (csid_dev->ctrl_reg->csid_reg.csid_version == CSID_VERSION_V22) - msm_cam_clk_sel_src(&csid_dev->pdev->dev, - &csid_clk_info[3], csid_clk_src_info, - csid_dev->num_clk_src_info); - - - rc = msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, csid_dev->csid_clk, - csid_dev->num_clk, 1); - if (rc < 0) { - pr_err("%s:%d clock enable failed\n", - __func__, __LINE__); - goto clk_enable_failed; - } - CDBG("%s:%d called\n", __func__, __LINE__); - csid_dev->hw_version = - msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_hw_version_addr); - CDBG("%s:%d called csid_dev->hw_version %x\n", __func__, __LINE__, - csid_dev->hw_version); - *csid_version = csid_dev->hw_version; - - init_completion(&csid_dev->reset_complete); - - enable_irq(csid_dev->irq->start); - - msm_csid_reset(csid_dev); - csid_dev->csid_state = CSID_POWER_UP; - return rc; - -clk_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_config_failed: - iounmap(csid_dev->base); - csid_dev->base = NULL; - return rc; -} - -static int msm_csid_release(struct csid_device *csid_dev) -{ - uint32_t irq; - - if (csid_dev->csid_state != CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - return -EINVAL; - } - - CDBG("%s:%d, hw_version = 0x%x\n", __func__, __LINE__, - csid_dev->hw_version); - - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - msm_camera_io_w(0, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - - disable_irq(csid_dev->irq->start); - - if (csid_dev->hw_version == CSID_VERSION_V20) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if (csid_dev->hw_version == CSID_VERSION_V22) { - msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, - csid_dev->csid_clk, - csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version >= CSID_VERSION_V30 && - csid_dev->hw_version < CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V40) || - (csid_dev->hw_version == CSID_VERSION_V31_1)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version == CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V32) || - (csid_dev->hw_version == CSID_VERSION_V33) || - (csid_dev->hw_version == CSID_VERSION_V34)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - csid_dev->hw_version); - return -EINVAL; - } - - iounmap(csid_dev->base); - csid_dev->base = NULL; - csid_dev->csid_state = CSID_POWER_DOWN; - return 0; -} - -static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) -{ - int rc = 0; - struct csid_cfg_data *cdata = (struct csid_cfg_data *)arg; - - if (!csid_dev || !cdata) { - pr_err("%s:%d csid_dev %pK, cdata %pK\n", __func__, __LINE__, - csid_dev, cdata); - return -EINVAL; - } - CDBG("%s cfgtype = %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CSID_INIT: - rc = msm_csid_init(csid_dev, &cdata->cfg.csid_version); - CDBG("%s csid version 0x%x\n", __func__, - cdata->cfg.csid_version); - break; - case CSID_CFG: { - struct msm_camera_csid_params csid_params; - struct msm_camera_csid_vc_cfg *vc_cfg = NULL; - int8_t i = 0; - if (copy_from_user(&csid_params, - (void *)cdata->cfg.csid_params, - sizeof(struct msm_camera_csid_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (csid_params.lut_params.num_cid < 1 || - csid_params.lut_params.num_cid > 16) { - pr_err("%s: %d num_cid outside range\n", - __func__, __LINE__); - rc = -EINVAL; - break; - } - for (i = 0; i < csid_params.lut_params.num_cid; i++) { - vc_cfg = kzalloc(sizeof(struct msm_camera_csid_vc_cfg), - GFP_KERNEL); - if (!vc_cfg) { - pr_err("%s: %d failed\n", __func__, __LINE__); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -ENOMEM; - break; - } - if (copy_from_user(vc_cfg, - (void *)csid_params.lut_params.vc_cfg[i], - sizeof(struct msm_camera_csid_vc_cfg))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - kfree(vc_cfg); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -EFAULT; - break; - } - csid_params.lut_params.vc_cfg[i] = vc_cfg; - } - rc = msm_csid_config(csid_dev, &csid_params); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - break; - } - case CSID_RELEASE: - rc = msm_csid_release(csid_dev); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csid_get_subdev_id(struct csid_device *csid_dev, void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csid_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - mutex_lock(&csid_dev->mutex); - CDBG("%s:%d id %d\n", __func__, __LINE__, csid_dev->pdev->id); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csid_get_subdev_id(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_IO_CFG: - rc = msm_csid_cmd(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csid_release(csid_dev); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - CDBG("%s:%d\n", __func__, __LINE__); - mutex_unlock(&csid_dev->mutex); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csid_internal_ops; - -static struct v4l2_subdev_core_ops msm_csid_subdev_core_ops = { - .g_chip_ident = &msm_csid_subdev_g_chip_ident, - .ioctl = &msm_csid_subdev_ioctl, - .interrupt_service_routine = msm_csid_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_csid_subdev_ops = { - .core = &msm_csid_subdev_core_ops, -}; - -static int msm_csid_get_clk_info(struct csid_device *csid_dev, - struct platform_device *pdev) -{ - uint32_t count; - uint32_t cnt = 0; - int i, rc; - int ii = 0; - uint32_t rates[CSID_NUM_CLK_MAX]; - const char *clock_name; - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csid_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return -EINVAL; - } - - if (count > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - cnt = count; - count = 0; - CDBG("%s: cnt = %d\n", __func__, cnt); - if (cnt == 0) { - pr_err("%s: no clocks found in device tree, cnt=%d", - __func__, cnt); - return -EINVAL; - } - - if (cnt > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid cnt=%d, max is %d\n", __func__, - cnt, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - count++; - rc = of_property_read_string_index(of_node, - "clock-names", i, &clock_name); - CDBG("%s: clock_names[%d] = %s\n", __func__, - i, clock_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - if (strcmp(clock_name, "csi_phy_src_clk") == 0) - break; - } - csid_dev->num_clk = count; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csid_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csid_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csid_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csid_clk_info[i].clk_rate); - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - csid_dev->num_clk_src_info = cnt - count; - CDBG("%s: count = %d\n", __func__, (cnt - count)); - - for (i = count; i < cnt; i++) { - ii++; - rc = of_property_read_string_index(of_node, - "clock-names", i, - &(csid_clk_src_info[ii].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - ii, csid_clk_src_info[ii].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - ii = 0; - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, cnt); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = count; i < cnt; i++) { - ii++; - csid_clk_src_info[ii].clk_rate = rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, ii, - csid_clk_src_info[ii].clk_rate); - } - } - return 0; -} - -static int csid_probe(struct platform_device *pdev) -{ - struct csid_device *new_csid_dev; - uint32_t csi_vdd_voltage = 0; - int rc = 0; - new_csid_dev = kzalloc(sizeof(struct csid_device), GFP_KERNEL); - if (!new_csid_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - new_csid_dev->ctrl_reg = NULL; - new_csid_dev->ctrl_reg = kzalloc(sizeof(struct csid_ctrl_t), - GFP_KERNEL); - if (!new_csid_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csid_dev); - return -ENOMEM; - } - - v4l2_subdev_init(&new_csid_dev->msm_sd.sd, &msm_csid_subdev_ops); - v4l2_set_subdevdata(&new_csid_dev->msm_sd.sd, new_csid_dev); - platform_set_drvdata(pdev, &new_csid_dev->msm_sd.sd); - mutex_init(&new_csid_dev->mutex); - - if (pdev->dev.of_node) { - rc = of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - if (rc < 0) { - pr_err("%s:%d failed to read cell-index\n", __func__, - __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s device id %d\n", __func__, pdev->id); - - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,csi-vdd-voltage", &csi_vdd_voltage); - if (rc < 0) { - pr_err("%s:%d failed to read qcom,csi-vdd-voltage\n", - __func__, __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s:%d reading mipi_csi_vdd is %d\n", __func__, __LINE__, - csi_vdd_voltage); - - csid_vreg_info[0].min_voltage = csi_vdd_voltage; - csid_vreg_info[0].max_voltage = csi_vdd_voltage; - } - - rc = msm_csid_get_clk_info(new_csid_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csid_get_clk_info() failed", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - - - new_csid_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csid"); - if (!new_csid_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csid"); - if (!new_csid_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->io = request_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem), pdev->name); - if (!new_csid_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - - new_csid_dev->pdev = pdev; - new_csid_dev->msm_sd.sd.internal_ops = &msm_csid_internal_ops; - new_csid_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csid_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csid_dev->msm_sd.sd.name), "msm_csid"); - media_entity_init(&new_csid_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csid_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csid_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSID; - new_csid_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x5; - msm_sd_register(&new_csid_dev->msm_sd); - - rc = request_irq(new_csid_dev->irq->start, msm_csid_irq, - IRQF_TRIGGER_RISING, "csid", new_csid_dev); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - disable_irq(new_csid_dev->irq->start); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s Error registering irq ", __func__); - goto csid_no_resource; - } - - if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V20; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V22; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V30; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v4.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V40; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.1")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_1; - new_csid_dev->hw_dts_version = CSID_VERSION_V31; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csid_dev->hw_dts_version); - rc = -ENODEV; - goto csid_no_resource; - } - - new_csid_dev->csid_state = CSID_POWER_DOWN; - return 0; - -csid_no_resource: - mutex_destroy(&new_csid_dev->mutex); - kfree(new_csid_dev->ctrl_reg); - kfree(new_csid_dev); - return rc; -} - -static const struct of_device_id msm_csid_dt_match[] = { - {.compatible = "qcom,csid"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csid_dt_match); - -static struct platform_driver csid_driver = { - .probe = csid_probe, - .driver = { - .name = MSM_CSID_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csid_dt_match, - }, -}; - -static int __init msm_csid_init_module(void) -{ - return platform_driver_register(&csid_driver); -} - -static void __exit msm_csid_exit_module(void) -{ - platform_driver_unregister(&csid_driver); -} - -module_init(msm_csid_init_module); -module_exit(msm_csid_exit_module); -MODULE_DESCRIPTION("MSM CSID driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.h deleted file mode 100644 index d53fd9133fd5..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csid/msm_csid.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_H -#define MSM_CSID_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -struct csid_reg_parms_t { -/* MIPI CSID registers */ - uint32_t csid_hw_version_addr; - uint32_t csid_core_ctrl_0_addr; - uint32_t csid_core_ctrl_1_addr; - uint32_t csid_rst_cmd_addr; - uint32_t csid_cid_lut_vc_0_addr; - uint32_t csid_cid_lut_vc_1_addr; - uint32_t csid_cid_lut_vc_2_addr; - uint32_t csid_cid_lut_vc_3_addr; - uint32_t csid_cid_n_cfg_addr; - uint32_t csid_irq_clear_cmd_addr; - uint32_t csid_irq_mask_addr; - uint32_t csid_irq_status_addr; - uint32_t csid_captured_unmapped_long_pkt_hdr_addr; - uint32_t csid_captured_mmaped_long_pkt_hdr_addr; - uint32_t csid_captured_short_pkt_addr; - uint32_t csid_captured_long_pkt_hdr_addr; - uint32_t csid_captured_long_pkt_ftr_addr; - uint32_t csid_pif_misr_dl0_addr; - uint32_t csid_pif_misr_dl1_addr; - uint32_t csid_pif_misr_dl2_addr; - uint32_t csid_pif_misr_dl3_addr; - uint32_t csid_stats_total_pkts_rcvd_addr; - uint32_t csid_stats_ecc_addr; - uint32_t csid_stats_crc_addr; - uint32_t csid_tg_ctrl_addr; - uint32_t csid_tg_vc_cfg_addr; - uint32_t csid_tg_dt_n_cfg_0_addr; - uint32_t csid_tg_dt_n_cfg_1_addr; - uint32_t csid_tg_dt_n_cfg_2_addr; - uint32_t csid_rst_done_irq_bitshift; - uint32_t csid_rst_stb_all; - uint32_t csid_dl_input_sel_shift; - uint32_t csid_phy_sel_shift; - uint32_t csid_version; -}; - -struct csid_ctrl_t { - struct csid_reg_parms_t csid_reg; -}; - -enum msm_csid_state_t { - CSID_POWER_UP, - CSID_POWER_DOWN, -}; - -struct csid_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct regulator *csi_vdd; - void __iomem *base; - struct mutex mutex; - struct completion reset_complete; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csid_state_t csid_state; - struct csid_ctrl_t *ctrl_reg; - uint32_t num_clk; - uint32_t num_clk_src_info; - - struct clk *csid_clk[11]; -}; - -#define VIDIOC_MSM_CSID_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct v4l2_subdev*) -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/Makefile deleted file mode 100644 index 15b0a5092423..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSM_CSIPHY) += msm_csiphy.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h deleted file mode 100644 index 5abf99123365..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_0_HWREG_H -#define MSM_CSIPHY_2_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_0 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x0, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h deleted file mode 100644 index 8682478f7e98..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_2_HWREG_H -#define MSM_CSIPHY_2_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_2 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x1, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h deleted file mode 100644 index af4d3e03a7ce..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_0_HWREG_H -#define MSM_CSIPHY_3_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_0 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x10, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h deleted file mode 100644 index c80a7c748fc6..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_1_HWREG_H -#define MSM_CSIPHY_3_1_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_1 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x31, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h deleted file mode 100644 index 19f14e73a92c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_2_HWREG_H -#define MSM_CSIPHY_3_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_2 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x32, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.c deleted file mode 100644 index 80f2d021b137..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.c +++ /dev/null @@ -1,937 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "msm_csiphy.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csiphy_2_0_hwreg.h" -#include "include/msm_csiphy_2_2_hwreg.h" -#include "include/msm_csiphy_3_0_hwreg.h" -#include "include/msm_csiphy_3_1_hwreg.h" -#include "include/msm_csiphy_3_2_hwreg.h" - -#define DBG_CSIPHY 0 - -#define V4L2_IDENT_CSIPHY 50003 -#define CSIPHY_VERSION_V22 0x01 -#define CSIPHY_VERSION_V20 0x00 -#define CSIPHY_VERSION_V30 0x10 -#define CSIPHY_VERSION_V31 0x31 -#define CSIPHY_VERSION_V32 0x32 -#define MSM_CSIPHY_DRV_NAME "msm_csiphy" - -#define CSIPHY_NUM_CLK_MAX 16 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csiphy_clk_info[CSIPHY_NUM_CLK_MAX]; - -static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, - struct msm_camera_csiphy_params *csiphy_params) -{ - int rc = 0; - int j = 0; - uint32_t val = 0; - uint8_t lane_cnt = 0; - uint16_t lane_mask = 0; - void __iomem *csiphybase; - uint8_t csiphy_id = csiphy_dev->pdev->id; - csiphybase = csiphy_dev->base; - if (!csiphybase) { - pr_err("%s: csiphybase NULL\n", __func__); - return -EINVAL; - } - - csiphy_dev->lane_mask[csiphy_id] |= csiphy_params->lane_mask; - lane_mask = csiphy_dev->lane_mask[csiphy_id]; - lane_cnt = csiphy_params->lane_cnt; - if (csiphy_params->lane_cnt < 1 || csiphy_params->lane_cnt > 4) { - pr_err("%s: unsupported lane cnt %d\n", - __func__, csiphy_params->lane_cnt); - return rc; - } - - CDBG("%s csiphy_params, mask = 0x%x cnt = %d\n", - __func__, - csiphy_params->lane_mask, - csiphy_params->lane_cnt); - CDBG("%s csiphy_params, settle cnt = 0x%x csid %d\n", - __func__, csiphy_params->settle_cnt, - csiphy_params->csid_core); - - if (csiphy_dev->hw_version >= CSIPHY_VERSION_V30) { - val = msm_camera_io_r(csiphy_dev->clk_mux_base); - if (csiphy_params->combo_mode && - (csiphy_params->lane_mask & 0x18)) { - val &= ~0xf0; - val |= csiphy_params->csid_core << 4; - } else { - val &= ~0xf; - val |= csiphy_params->csid_core; - } - msm_camera_io_w(val, csiphy_dev->clk_mux_base); - CDBG("%s clk mux addr %pK val 0x%x\n", __func__, - csiphy_dev->clk_mux_base, val); - mb(); - } - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_t_init_cfg0_addr); - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_t_wakeup_cfg0_addr); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - val = 0x3; - msm_camera_io_w((lane_mask << 2) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(0x10, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg3_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg4_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_mask0_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_clear0_addr); - } else { - val = 0x1; - msm_camera_io_w((lane_mask << 1) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(csiphy_params->combo_mode << - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_mode_config_shift, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_glbl_reset_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40); - } - - lane_mask &= 0x1f; - while (lane_mask & 0x1f) { - if (!(lane_mask & 0x1)) { - j++; - lane_mask >>= 1; - continue; - } - msm_camera_io_w(0x10, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*j); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg3_addr + 0x40*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_addr + 0x4*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear_addr + 0x4*j); - msm_camera_io_w(0xff, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40*j); - j++; - lane_mask >>= 1; - } - return rc; -} - -static irqreturn_t msm_csiphy_irq(int irq_num, void *data) -{ - uint32_t irq; - int i; - struct csiphy_device *csiphy_dev = data; - - for (i = 0; i < 8; i++) { - irq = msm_camera_io_r( - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_status0_addr + 0x4*i); - msm_camera_io_w(irq, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - pr_err("%s MIPI_CSIPHY%d_INTERRUPT_STATUS%d = 0x%x\n", - __func__, csiphy_dev->pdev->id, i, irq); - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - } - return IRQ_HANDLED; -} - -static void msm_csiphy_reset(struct csiphy_device *csiphy_dev) -{ - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); - usleep_range(5000, 8000); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); -} - -static int msm_csiphy_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSIPHY; - chip->revision = 0; - return 0; -} - -static int msm_csiphy_recovery(struct csiphy_device *csiphy_dev) -{ - int i = 0; - uint16_t csi_lane_mask; - - pr_err("msm_csiphy_recovery: E\n"); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - csiphy_dev->ref_count = 0; - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - pr_err("msm_csiphy_recovery: X\n"); - return 0; -} - -#if DBG_CSIPHY -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version < CSIPHY_VERSION_V30) { - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - enable_irq(csiphy_dev->irq->start); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#else -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#endif - -#if DBG_CSIPHY -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - disable_irq(csiphy_dev->irq->start); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} -#else -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} - -#endif - -static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg) -{ - int rc = 0; - struct csiphy_cfg_data *cdata = (struct csiphy_cfg_data *)arg; - struct msm_camera_csiphy_params csiphy_params; - struct msm_camera_csi_lane_params csi_lane_params; - if (!csiphy_dev || !cdata) { - pr_err("%s: csiphy_dev NULL\n", __func__); - return -EINVAL; - } - switch (cdata->cfgtype) { - case CSIPHY_INIT: - rc = msm_csiphy_init(csiphy_dev); - break; - case CSIPHY_CFG: - if (copy_from_user(&csiphy_params, - (void *)cdata->cfg.csiphy_params, - sizeof(struct msm_camera_csiphy_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_lane_config(csiphy_dev, &csiphy_params); - break; - case CSIPHY_RELEASE: - if (copy_from_user(&csi_lane_params, - (void *)cdata->cfg.csi_lane_params, - sizeof(struct msm_camera_csi_lane_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_release(csiphy_dev, &csi_lane_params); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csiphy_get_subdev_id(struct csiphy_device *csiphy_dev, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csiphy_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csiphy_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csiphy_device *csiphy_dev = v4l2_get_subdevdata(sd); - CDBG("%s:%d id %d\n", __func__, __LINE__, csiphy_dev->pdev->id); - mutex_lock(&csiphy_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csiphy_get_subdev_id(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_IO_CFG: - rc = msm_csiphy_cmd(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csiphy_release(csiphy_dev, arg); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - mutex_unlock(&csiphy_dev->mutex); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csiphy_internal_ops; - -static struct v4l2_subdev_core_ops msm_csiphy_subdev_core_ops = { - .g_chip_ident = &msm_csiphy_subdev_g_chip_ident, - .ioctl = &msm_csiphy_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_csiphy_subdev_ops = { - .core = &msm_csiphy_subdev_core_ops, -}; - -static int msm_csiphy_get_clk_info(struct csiphy_device *csiphy_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CSIPHY_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csiphy_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CSIPHY_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSIPHY_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csiphy_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csiphy_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csiphy_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csiphy_clk_info[i].clk_rate); - } - return 0; -} - -static int csiphy_probe(struct platform_device *pdev) -{ - struct csiphy_device *new_csiphy_dev; - int rc = 0; - - new_csiphy_dev = kzalloc(sizeof(struct csiphy_device), GFP_KERNEL); - if (!new_csiphy_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - new_csiphy_dev->ctrl_reg = NULL; - new_csiphy_dev->ctrl_reg = kzalloc(sizeof(struct csiphy_ctrl_t), - GFP_KERNEL); - if (!new_csiphy_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csiphy_dev); - return -ENOMEM; - } - v4l2_subdev_init(&new_csiphy_dev->msm_sd.sd, &msm_csiphy_subdev_ops); - v4l2_set_subdevdata(&new_csiphy_dev->msm_sd.sd, new_csiphy_dev); - platform_set_drvdata(pdev, &new_csiphy_dev->msm_sd.sd); - - mutex_init(&new_csiphy_dev->mutex); - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - CDBG("%s: device id = %d\n", __func__, pdev->id); - } - - rc = msm_csiphy_get_clk_info(new_csiphy_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csiphy_get_clk_info() failed", __func__); - rc = -EFAULT; - goto csiphy_no_resource; - } - - new_csiphy_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy"); - if (!new_csiphy_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csiphy"); - if (!new_csiphy_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->io = request_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem), pdev->name); - if (!new_csiphy_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - - rc = request_irq(new_csiphy_dev->irq->start, msm_csiphy_irq, - IRQF_TRIGGER_RISING, "csiphy", new_csiphy_dev); - if (rc < 0) { - release_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - disable_irq(new_csiphy_dev->irq->start); - - new_csiphy_dev->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy_clk_mux"); - if (new_csiphy_dev->clk_mux_mem) { - new_csiphy_dev->clk_mux_io = request_mem_region( - new_csiphy_dev->clk_mux_mem->start, - resource_size(new_csiphy_dev->clk_mux_mem), - new_csiphy_dev->clk_mux_mem->name); - if (!new_csiphy_dev->clk_mux_io) - pr_err("%s: ERROR %d\n", __func__, __LINE__); - } - - new_csiphy_dev->pdev = pdev; - new_csiphy_dev->msm_sd.sd.internal_ops = &msm_csiphy_internal_ops; - new_csiphy_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csiphy_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csiphy_dev->msm_sd.sd.name), "msm_csiphy"); - media_entity_init(&new_csiphy_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csiphy_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csiphy_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSIPHY; - new_csiphy_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x4; - msm_sd_register(&new_csiphy_dev->msm_sd); - - if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V20; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V22; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V30; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.1")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_1; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V31; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csiphy_dev->hw_dts_version); - rc = -EINVAL; - goto csiphy_no_resource; - } - - new_csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; - -csiphy_no_resource: - mutex_destroy(&new_csiphy_dev->mutex); - kfree(new_csiphy_dev->ctrl_reg); - kfree(new_csiphy_dev); - return rc; -} - -static const struct of_device_id msm_csiphy_dt_match[] = { - {.compatible = "qcom,csiphy"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csiphy_dt_match); - -static struct platform_driver csiphy_driver = { - .probe = csiphy_probe, - .driver = { - .name = MSM_CSIPHY_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csiphy_dt_match, - }, -}; - -static int __init msm_csiphy_init_module(void) -{ - return platform_driver_register(&csiphy_driver); -} - -static void __exit msm_csiphy_exit_module(void) -{ - platform_driver_unregister(&csiphy_driver); -} - -module_init(msm_csiphy_init_module); -module_exit(msm_csiphy_exit_module); -MODULE_DESCRIPTION("MSM CSIPHY driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.h deleted file mode 100644 index 8a363df67bc7..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/csiphy/msm_csiphy.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_H -#define MSM_CSIPHY_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -#define MAX_CSIPHY 3 - -struct csiphy_reg_parms_t { -/*MIPI CSI PHY registers*/ - uint32_t mipi_csiphy_lnn_cfg1_addr; - uint32_t mipi_csiphy_lnn_cfg2_addr; - uint32_t mipi_csiphy_lnn_cfg3_addr; - uint32_t mipi_csiphy_lnn_cfg4_addr; - uint32_t mipi_csiphy_lnn_cfg5_addr; - uint32_t mipi_csiphy_lnck_cfg1_addr; - uint32_t mipi_csiphy_lnck_cfg2_addr; - uint32_t mipi_csiphy_lnck_cfg3_addr; - uint32_t mipi_csiphy_lnck_cfg4_addr; - uint32_t mipi_csiphy_lnck_cfg5_addr; - uint32_t mipi_csiphy_lnck_misc1_addr; - uint32_t mipi_csiphy_glbl_reset_addr; - uint32_t mipi_csiphy_glbl_pwr_cfg_addr; - uint32_t mipi_csiphy_glbl_irq_cmd_addr; - uint32_t mipi_csiphy_hw_version_addr; - uint32_t mipi_csiphy_interrupt_status0_addr; - uint32_t mipi_csiphy_interrupt_mask0_addr; - uint32_t mipi_csiphy_interrupt_mask_val; - uint32_t mipi_csiphy_interrupt_mask_addr; - uint32_t mipi_csiphy_interrupt_clear0_addr; - uint32_t mipi_csiphy_interrupt_clear_addr; - uint32_t mipi_csiphy_mode_config_shift; - uint32_t mipi_csiphy_glbl_t_init_cfg0_addr; - uint32_t mipi_csiphy_t_wakeup_cfg0_addr; - uint32_t csiphy_version; -}; - -struct csiphy_ctrl_t { - struct csiphy_reg_parms_t csiphy_reg; -}; - -enum msm_csiphy_state_t { - CSIPHY_POWER_UP, - CSIPHY_POWER_DOWN, -}; - -struct csiphy_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csiphy_state_t csiphy_state; - struct csiphy_ctrl_t *ctrl_reg; - uint32_t num_clk; - - struct clk *csiphy_clk[8]; - - int32_t ref_count; - uint16_t lane_mask[MAX_CSIPHY]; -}; - -#define VIDIOC_MSM_CSIPHY_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, void *) -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a.h deleted file mode 100644 index 660cfa515937..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __db8221a_H__ -#define __db8221a_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef db8221a_DEBUG -#undef CDBG -#define db8221a_DEBUG -#ifdef db8221a_DEBUG -#define CDBG(fmt, args...) pr_err("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#else -#define CDBG(fmt, args...) pr_debug("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.c deleted file mode 100644 index e23e9681de66..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.c +++ /dev/null @@ -1,703 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "db8221a.h" -#include "db8221a_yuv.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define DB8221A_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define DB8221A_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl db8221a_ctrl; -static exif_data_t db8221a_exif; - -static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; -static int32_t prev_fps = 0; - -#if defined CONFIG_SEC_CAMERA_TUNING -#define FILENAME "/data/db8221a_yuv.h" -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif - -static int db8221a_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 coarseTime = 0; - u16 lineLength = 0; - const int SensorInputClock = 72000000; - int rc = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x06, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x07, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - coarseTime = ((read_value1&0xFF) << 8) | read_value2; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0A, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0B, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - lineLength = ((read_value1&0xFF) << 8) | read_value2; - CDBG("%s::%d coarseTime = %d, lineLength = %d",__func__,__LINE__,coarseTime,lineLength); - - if(coarseTime == 0 || lineLength == 0){ - pr_err("%s : %d I2C data is 0\n", __func__, __LINE__); - rc = -EFAULT; - } - else{ - db8221a_exif.shutterspeed = SensorInputClock/(coarseTime*lineLength*2); - CDBG("Exposure time = %d", db8221a_exif.shutterspeed); - } - return rc; -} - -static int db8221a_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (db8221a_exif.shutterspeed <= 10) - db8221a_exif.iso = 400; - else if (db8221a_exif.shutterspeed > 10 && db8221a_exif.shutterspeed <= 20) - db8221a_exif.iso = 200; - else if (db8221a_exif.shutterspeed > 20 && db8221a_exif.shutterspeed <= 30) - db8221a_exif.iso = 100; - else - db8221a_exif.iso = 50; - CDBG("ISO = %d", db8221a_exif.iso); - return 0; -} - -static int db8221a_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - CDBG("%s : %d E",__func__,__LINE__); - rc = db8221a_exif_shutter_speed(s_ctrl); - if( rc < 0 ) return rc; - rc = db8221a_exif_iso(s_ctrl); - return rc; -} - -int32_t db8221a_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - CDBG("%s : %d E",__func__,__LINE__); - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = db8221a_exif.iso; - exif_info->value_3 = db8221a_exif.shutterspeed; - return 0; -} - -int32_t db8221a_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - DB8221A_WRITE_LIST(db8221a_bright_m4); - break; - case CAMERA_EV_M3: - DB8221A_WRITE_LIST(db8221a_bright_m3); - break; - case CAMERA_EV_M2: - DB8221A_WRITE_LIST(db8221a_bright_m2); - break; - case CAMERA_EV_M1: - DB8221A_WRITE_LIST(db8221a_bright_m1); - break; - case CAMERA_EV_DEFAULT: - DB8221A_WRITE_LIST(db8221a_bright_default); - break; - case CAMERA_EV_P1: - DB8221A_WRITE_LIST(db8221a_bright_p1); - break; - case CAMERA_EV_P2: - DB8221A_WRITE_LIST(db8221a_bright_p2); - break; - case CAMERA_EV_P3: - DB8221A_WRITE_LIST(db8221a_bright_p3); - break; - case CAMERA_EV_P4: - DB8221A_WRITE_LIST(db8221a_bright_p4); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - DB8221A_WRITE_LIST(db8221a_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - DB8221A_WRITE_LIST(db8221a_wb_incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - DB8221A_WRITE_LIST(db8221a_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_Capture_1600_1200_for_24fps); - } - else { - DB8221A_WRITE_LIST(db8221a_Capture_1600_1200); - } - break; - case MSM_SENSOR_RES_QTR: -#if defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder); - } else { - if (24000 == prev_fps) { // from 24fps to auto fps - CDBG("prev_fps is 24!"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - DB8221A_WRITE_LIST(db8221a_preview_640_480); - } -#else - if (db8221a_ctrl.fixed_fps_val == 24000) { - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder_800_600); - } - else { - DB8221A_WRITE_LIST(db8221a_preview_800_600); - } -#endif - break; - case MSM_SENSOR_RES_2: - DB8221A_WRITE_LIST(db8221a_preview_640_480); - break; - case MSM_SENSOR_RES_3: - DB8221A_WRITE_LIST(db8221a_preview_352_288); - break; - case MSM_SENSOR_RES_4: - DB8221A_WRITE_LIST(db8221a_preview_320_240); - break; - case MSM_SENSOR_RES_5: - DB8221A_WRITE_LIST(db8221a_preview_176_144); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - - return rc; -} - -int32_t db8221a_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - DB8221A_WRITE_LIST(db8221a_effect_none); - break; - case CAMERA_EFFECT_MONO: - DB8221A_WRITE_LIST(db8221a_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - DB8221A_WRITE_LIST(db8221a_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - DB8221A_WRITE_LIST(db8221a_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - - CDBG(" CFG_GET_SENSOR_INFO"); - - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); -#if 0 - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); -#endif - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); - db8221a_ctrl.vtcall_mode = 0; - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("%s[%d] %s inside CFG_SET_INIT_SETTING", __func__, __LINE__ ,FILENAME); - } -#endif - break; - - case CFG_SET_RESOLUTION: - CDBG("CFG_SET_RESOLUTION"); - resolution = *((int32_t *)cdata->cfg.setting); - - if((db8221a_ctrl.prev_mode == CAMERA_MODE_INIT || db8221a_ctrl.prev_mode == CAMERA_MODE_RECORDING) - && (db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW)){ - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW){ - db8221a_set_resolution(s_ctrl, resolution); - } - else if((db8221a_ctrl.prev_mode == CAMERA_MODE_PREVIEW) - && (db8221a_ctrl.op_mode == CAMERA_MODE_CAPTURE)){ - CDBG("capture seq"); - if( resolution == MSM_SENSOR_RES_FULL ){ - db8221a_set_resolution(s_ctrl , resolution); - db8221a_get_exif(s_ctrl); - } - else{ - pr_err("%s:%d invalid capture size\n", __func__, __LINE__); - rc = -EINVAL; - } - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_RECORDING){ - CDBG("recording seq"); - if (db8221a_ctrl.prev_mode == CAMERA_MODE_INIT) { - - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - msleep(50); - - } - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - pr_err("%s:%d invalid sequence db8221a_ctrl.prev_mode:%d, db8221a_ctrl.op_mode:%d\n", - __func__, __LINE__, db8221a_ctrl.prev_mode, db8221a_ctrl.op_mode); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - DB8221A_WRITE_LIST(db8221a_stream_stop); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); -#if 0 - { - int slave_index = 0; - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - } -#endif - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - prev_fps = 0; - streamon = 0; - db8221a_ctrl.op_mode = CAMERA_MODE_INIT; - db8221a_ctrl.prev_mode = CAMERA_MODE_INIT; - db8221a_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - db8221a_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - db8221a_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - db8221a_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - db8221a_ctrl.settings.effect = CAMERA_EFFECT_OFF; - db8221a_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } - else { - pr_err("%s : %d undefined sensor_power_up",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } - else{ - pr_err("%s : %d undefined sensor_power_down",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - pr_err("%s: %d invalid\n", __func__, __LINE__); - //rc = -EINVAL; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - - return rc; -} - -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cam_info->mode) { - case EXT_CAM_EV: - db8221a_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - db8221a_set_exposure_compensation(s_ctrl, db8221a_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - db8221a_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - db8221a_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - db8221a_ctrl.prev_mode = db8221a_ctrl.op_mode; - db8221a_ctrl.op_mode = cam_info->value_1; - break; - case EXT_CAM_EXIF: - db8221a_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - db8221a_ctrl.vtcall_mode = cam_info->value_1; - break; - case EXT_CAM_FPS_RANGE: - CDBG("Prev_fps %d EXT_CAM_FPS_RANGE %d", db8221a_ctrl.fixed_fps_val, cam_info->value_1); - prev_fps = db8221a_ctrl.fixed_fps_val; - db8221a_ctrl.fixed_fps_val = cam_info->value_1; - break; - default: - pr_err("%s: %d unsupport mode : %d\n", __func__, __LINE__, cam_info->mode); - //rc = -EINVAL; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("%s : %d EXIT", __func__, __LINE__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.h deleted file mode 100644 index df7d5eafba6e..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/db8221a_yuv.h +++ /dev/null @@ -1,3970 +0,0 @@ -/* DB8221A_regs_goya.h - * - * Driver for DB8221A (2MP Camera) from dongbu - * - * Copyright (C) 2015, SAMSUNG ELECTRONICS - * - * 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. - * - */ - -#ifndef _DB8221A_REGS_H_ -#define _DB8221A_REGS_H_ - -#if defined(CONFIG_SEC_GTES_PROJECT) -#define INIT_RES_800_600 -#endif - -#if defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -#define MIPI_CLK_277MHZ -#endif - -/*==============================================*/ -/* CAMERA_Init */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr -#if defined(INIT_RES_800_600) - {0x14, 0x06}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x40}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#else - {0x14, 0x05}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x00}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#endif - -/*===================================*/ -/* For Analog Setting */ -/*===================================*/ - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - -/*==================================*/ -/* ADF Anlog */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - -/*==================================*/ -/* Line Length & Flip */ -/*==================================*/ - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - -/*==================================*/ -/* AE Gain Table */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // x1.8 - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - {0xDB, 0x0E}, // x2.0 - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - {0xDE, 0x0E}, // x3.0 - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - {0xE1, 0x0F}, // x4.0 - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - {0xE4, 0x0A}, // x5.0 - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - {0xE7, 0x0E}, // x6.0 - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - {0xEA, 0x0F}, // x7.0 - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - {0xED, 0x0F}, // x8.0 - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - {0xF0, 0x0F}, // x9.0 - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - -/*==================================*/ -/* AE */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0x07, 0x01}, // Variable Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x03}, // MinFrame 8fps - {0x7F, 0x21}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x01}, // SCLHorScale -#if defined(INIT_RES_800_600) - {0x55, 0xFF}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0xFF}, // -#else - {0x55, 0x99}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0x99}, // -#endif - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // -#if defined(INIT_RES_800_600) - {0x5C, 0x03}, // SCLCropEndX - {0x5D, 0x20}, // - {0x5E, 0x02}, // SCLCropEndY - {0x5F, 0x58}, // -#else - {0x5C, 0x02}, // SCLCropEndX - {0x5D, 0x80}, // - {0x5E, 0x01}, // SCLCropEndY - {0x5F, 0xE0}, // -#endif - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_Init - VT Call Initial 셋팅 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_VT_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr - {0x14, 0x01}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x60}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 - - //=================================== - // For Analog Setting - //=================================== - //Bayer Setting - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - // Pixel - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - // CDS - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - // CPGA - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - // Qt_rst, Qt_sig - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - //IClamp - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - // RAMP - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - // qbitline - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - // Line buffer - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - // Scanlath - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - // LineStart - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - // MIPI - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - - //================================== - // ADF Anlog - //================================== - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - - //================================== - // Line Length & Flip - //================================== - //LineLength - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - - //================================== - // AE Gain Table - //================================== - //Table1 X1.8 - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - //Table2 X2 - {0xDB, 0x0E}, // - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - //Table3 X3 - {0xDE, 0x0E}, // - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - //Table4 X4 - {0xE1, 0x0F}, // - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - //Table5 X5 - {0xE4, 0x0A}, // - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - //Table6 X6 - {0xE7, 0x0E}, // - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - //Table7 X7 - {0xEA, 0x0F}, // - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - //Table8 X8 - {0xED, 0x0F}, // - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - //Table9 X9 - {0xF0, 0x0F}, // - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - - //================================== - // AE - //================================== - {0xFF, 0x93}, // Page - {0x07, 0x02}, // Fixed Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x05}, // MinFrame 15fps - {0x7F, 0xDD}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - //D65 - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - //A light - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - //Out door CCM - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - // BGT2 - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - // SAT for Gamut - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - // VGA_PR - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x00}, //SCLHorScale - {0x55, 0x71}, // - {0x56, 0x00}, //SCLVerScale - {0x57, 0x7B}, // - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // - {0x5C, 0x00}, //SCLCropEndX - {0x5D, 0xB0}, // - {0x5E, 0x00}, //SCLCropEndY - {0x5F, 0x90}, // - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - // SXGA_PR - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 800x600) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_800_600[]= { - -// 80{0x60, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x16}, // Wait 25 -#else - {0xFE, 0x64}, // Wait 100 -#endif - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x32}, // Wait 50 - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - - {0xFE, 0x16}, // Wait 25 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#endif - - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 704x576) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_704_576[] = { - -// 704x576_PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xC3}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xEC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0xC0}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x40}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 640x480) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_640_480[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0x99}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - -#if defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x16}, // Wait 25 -#else - {0xFE, 0x64}, // Wait 100 -#endif - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#if defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x32}, // Wait 50 - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0x99}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xFE, 0x16}, // Wait 25 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on -#endif -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 352x288) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_352_288[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0xC0}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xE1}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xF5}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x60}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0x20}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 320x240) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_320_240[] = { - // 320x240 Size - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xCC}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xCC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x40}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0xF0}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 176x144) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_176_144[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x01}, - {0x15, 0x60}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0x70}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0x7A}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x00}, // SCLCropEndX - {0xC8, 0xB0}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0x90}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_SNAPSHOT (Size : 1600x1200) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_1600_1200[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x0C}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x00}, // SCLCtrl - {0xBF, 0x03}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x05}, // SCLCropEndX - {0xC8, 0x00}, - {0xC9, 0x04}, // SCLCropEndY - {0xCA, 0x00}, - - {0xFE, 0x96}, // Wait 150 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -struct msm_camera_i2c_reg_conf db8221a_Capture_1600_1200_for_24fps[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0x92}, - {0xED, 0x10}, // Func - - {0xFF, 0xE4}, - {0x14, 0x0C}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xE4, 0x05}, // - {0xE5, 0xF6}, // - {0xBE, 0x00}, // SCLCtrl - {0xBF, 0x03}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x05}, // SCLCropEndX - {0xC8, 0x00}, - {0xC9, 0x04}, // SCLCropEndY - {0xCA, 0x00}, - - {0xEA, 0x00}, // X Sub-Sampling - {0xEB, 0x00}, // Y Sub-Sampling - {0xFE, 0x96}, // Wait 150 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_STREAM_STOP */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_stream_stop[]= { - - {0xFF, 0xE4}, - {0x04, 0x00}, -}; - - -/*==============================================*/ -/* CAMERA_I2C_CHECK - for ESD */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_DTP_On[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0x00}, // BayerFunc - {0xBA, 0x28}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x05}, // TPG Gamma - - {0xFE, 0x64}, // Wait 100ms -}; - -struct msm_camera_i2c_reg_conf db8221a_DTP_Off[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0xFF}, // BayerFunc - {0xBA, 0xFF}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x00}, // TPG Disable - - {0xFE, 0x64}, // Wait 100 -}; - - -/*==============================================*/ -/* CAMERA_Flip_X */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_X_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x01}, // X-Flip - -}; - - -/*==============================================*/ -/* CAMERA_Flip_Y */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_Y_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x02}, // Y-Flip - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m4[] = { - -// Brightness -4 - {0xFF, 0x98}, // Page mode - {0xBC, 0xB8}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_2 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m3[] = { - -// Brightness -3 - {0xFF, 0x98}, // Page mode - {0xBC, 0xCA}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_3 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m2[] = { - -// Brightness -2 - {0xFF, 0x98}, // Page mode - {0xBC, 0xDC}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_4 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m1[] = { - -// Brightness -1 - {0xFF, 0x98}, // Page mode - {0xBC, 0xEE}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_5 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_default[] = { - -// Brightness 0 - {0xFF, 0x98}, // Page mode - {0xBC, 0x00}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_6 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p1[] = { - -// Brightness +1 - {0xFF, 0x98}, // Page mode - {0xBC, 0x12}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_7 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p2[] = { - -// Brightness +2 - {0xFF, 0x98}, // Page mode - {0xBC, 0x24}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_8 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p3[] = { - -// Brightness +3 - {0xFF, 0x98}, // Page mode - {0xBC, 0x36}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_9 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p4[] = { - -// Brightness +4 - {0xFF, 0x98}, // Page mode - {0xBC, 0x48}, // Brightness - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m4[] = { - -// Contrast -4 - {0xFF, 0x98}, // Page mode - {0xBD, 0xA0}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m3[] = { - -// Contrast -3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x98}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m2[] = { - -// Contrast -2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x90}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m1[] = { - -// Contrast -1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x88}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_default[] = { - -// Contrast 0 - {0xFF, 0x98}, // Page mode - {0xBD, 0x80}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p1[] = { - -// Contrast +1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x78}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p2[] = { - - // Contrast +2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x70}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p3[] = { - -// Contrast +3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x68}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p4[] = { - -// Contrast +4 - {0xFF, 0x98}, // Page mode - {0xBD, 0x60}, // Contrast - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_EFFECCT_NORMAL */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_none[] = { - - {0xFF, 0x98}, - {0xCB, 0x00}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_NEGATIVE */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_negative[] = { - - {0xFF, 0x98}, - {0xCB, 0x20}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_GRAY */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_gray[] = { - - {0xFF, 0x98}, - {0xCB, 0x08}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_SEPIA */ -/*==============================================*/ -#if defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x53}, // PEDData2 - {0xCE, 0x98}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#else -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 -#if defined(CONFIG_SEC_GTES_PROJECT) - {0xCD, 0x67}, // PEDData2 -#else - {0xCD, 0x71}, // PEDData2 -#endif - {0xCE, 0x9A}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#endif -/*==============================================*/ -/* CAMERA_EFFECT_AQUA */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_aqua[] = { - - {0xFF, 0x98}, - {0xCB, 0x18}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0xAB}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_AWB_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_auto[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x30}, - {0xDC, 0x01}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, - - {0x5B, 0x06}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_DayLight */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_daylight[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0x48}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x48}, - {0x4E, 0x04}, // Min Bgain - {0x4F, 0x80}, - {0x50, 0x04}, // Max BGain - {0x51, 0x80}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_CLOUDY (í린날) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_cloudy[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xF8}, - {0x50, 0x04}, // Max BGain - {0x51, 0x10}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_FLUORESCENT (형광등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_fluorescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x05}, // Min Bgain - {0x4F, 0xA8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xC0}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_INCA (백열등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_incandescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x20}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x03}, // Min Rgain - {0x4B, 0xD8}, - {0x4C, 0x03}, // Max Rgain - {0x4D, 0xF0}, - {0x4E, 0x06}, // Min Bgain - {0x4F, 0x5F}, - {0x50, 0x06}, // Max BGain - {0x51, 0x77}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_FPS_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_auto_fps[] = { - - {0xFF, 0x93}, - {0x07, 0x01}, // AEMODE - {0x7E, 0x03}, // Min Frame High - {0x7F, 0x21}, // Min Frame Low - - {0x82, 0x0F}, // 60Hz Max - {0x83, 0x0A}, // 60Hz 3 Lut - {0x84, 0x08}, // 60Hz 2 Lut - {0x85, 0x08}, // 60Hz 1 Lut - {0x86, 0x0C}, // 50Hz Max - {0x87, 0x08}, // 50Hz 3 Lut - {0x88, 0x06}, // 50Hz 2 Lut - {0x89, 0x06}, // 50Hz 1 Lut - {0x8A, 0x05}, // 60Hz Max Frame High -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // 60Hz Max Frame Low - {0x8C, 0x05}, // 50Hz Max Frame High - {0x8D, 0x26}, // 50Hz Max Frame Low -#else - {0x8B, 0x04}, // 60Hz Max Frame Low - {0x8C, 0x04}, // 50Hz Max Frame High - {0x8D, 0xF4}, // 50Hz Max Frame Low -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_CAMCORDER */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_24fps_Camcoder[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0x33}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xEA, 0x00}, // HorSubsampling - {0xEB, 0x01}, // VerSubsampling - - -// Fixed Frame - {0xFF, 0x93}, - {0x07, 0x02}, // AEMODE - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x01}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x01}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - {0x79, 0xC0}, // Gain Max - {0x7E, 0x09}, // Min Frame High - {0x7F, 0x61}, // Min Frame Low - - {0x72, 0x0D}, // Sensor clock -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF8}, // -#endif - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - - {0x18, 0x01}, // AESpeed - - {0x1B, 0x08}, //Analog gain Max - - - {0x82, 0x04}, // 60Hz Max - {0x83, 0x04}, // 60Hz 3 Lut - {0x84, 0x04}, // 60Hz 2 Lut - {0x85, 0x04}, // 60Hz 1 Lut - {0x86, 0x03}, // 50Hz Max - {0x87, 0x03}, // 50Hz 3 Lut - {0x88, 0x03}, // 50Hz 2 Lut - {0x89, 0x03}, // 50Hz 1 Lut -#if defined(MIPI_CLK_277MHZ) - {0x8A, 0x03}, // 60Hz Max Frame High - {0x8B, 0x0D}, // 60Hz Max Frame Low - {0x8C, 0x03}, // 50Hz Max Frame High - {0x8D, 0x34}, // 50Hz Max Frame Low -#else - {0x8A, 0x02}, // 60Hz Max Frame High - {0x8B, 0xF3}, // 60Hz Max Frame Low - {0x8C, 0x02}, // 50Hz Max Frame High - {0x8D, 0xD5}, // 50Hz Max Frame Low -#endif - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -struct msm_camera_i2c_reg_conf db8221a_24fps_Camcoder_800_600[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - - {0xEA, 0x00}, // HorSubsampling - {0xEB, 0x01}, // VerSubsampling - - -// Fixed Frame - {0xFF, 0x93}, - {0x07, 0x02}, // AEMODE - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x01}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x01}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - {0x79, 0xC0}, // Gain Max - {0x7E, 0x09}, // Min Frame High - {0x7F, 0x61}, // Min Frame Low - - {0x72, 0x0D}, // Sensor clock -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF8}, // -#endif - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - - {0x18, 0x01}, // AESpeed - - {0x1B, 0x08}, //Analog gain Max - - - {0x82, 0x04}, // 60Hz Max - {0x83, 0x04}, // 60Hz 3 Lut - {0x84, 0x04}, // 60Hz 2 Lut - {0x85, 0x04}, // 60Hz 1 Lut - {0x86, 0x03}, // 50Hz Max - {0x87, 0x03}, // 50Hz 3 Lut - {0x88, 0x03}, // 50Hz 2 Lut - {0x89, 0x03}, // 50Hz 1 Lut -#if defined(MIPI_CLK_277MHZ) - {0x8A, 0x03}, // 60Hz Max Frame High - {0x8B, 0x0D}, // 60Hz Max Frame Low - {0x8C, 0x03}, // 50Hz Max Frame High - {0x8D, 0x34}, // 50Hz Max Frame Low -#else - {0x8A, 0x02}, // 60Hz Max Frame High - {0x8B, 0xF3}, // 60Hz Max Frame Low - {0x8C, 0x02}, // 50Hz Max Frame High - {0x8D, 0xD5}, // 50Hz Max Frame Low -#endif - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_50Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_50Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x05}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x4B}, - {0x1F, 0x14}, -#else - {0x1E, 0x74}, - {0x1F, 0x7C}, -#endif - {0x08, 0x3D}, // 50Hz - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_60Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_60Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x04}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x69}, - {0x1F, 0x3B}, -#else - {0x1E, 0x8B}, - {0x1F, 0xBC}, -#endif - {0x08, 0x3F}, // 60Hz - -}; - - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_matrix[] = { - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_center[] = { - -// AE : Center - {0xFF, 0x93}, - {0x0B, 0x11}, //Weight_0 - {0x0C, 0x11}, //Weight_1 - {0x0D, 0x11}, //Weight_2 - {0x0E, 0xC8}, //Weight_3 - {0x0F, 0x18}, //Weight_4 - {0x10, 0xC1}, //Weight_5 - {0x11, 0xCF}, //Weight_6 - {0x12, 0x11}, //Weight_7 - {0x13, 0xC8}, //Weight_8 - {0x14, 0x18}, //Weight_9 - {0x15, 0x11}, //Weight_10 - {0x16, 0x11}, //Weight_11 - {0x17, 0x01}, //Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_spot[] = { - -// AE : Spot - {0xFF, 0x93}, - {0x0B, 0x00}, //Weight_0 - {0x0C, 0x00}, //Weight_1 - {0x0D, 0x00}, //Weight_2 - {0x0E, 0x11}, //Weight_3 - {0x0F, 0x01}, //Weight_4 - {0x10, 0x10}, //Weight_5 - {0x11, 0x1F}, //Weight_6 - {0x12, 0x00}, //Weight_7 - {0x13, 0x11}, //Weight_8 - {0x14, 0x01}, //Weight_9 - {0x15, 0x00}, //Weight_10 - {0x16, 0x00}, //Weight_11 - {0x17, 0x00}, //Weight_12 - -}; - -#endif /* _DB8221A_REGS_H_ */ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/Makefile deleted file mode 100644 index 4fa1153d6d02..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/cci -obj-$(CONFIG_MSM_EEPROM) += msm_eeprom.o -obj-$(CONFIG_MSM_OTP) += msm_otp.o \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.c deleted file mode 100644 index 931616a765ed..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.c +++ /dev/null @@ -1,1627 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_eeprom.h" - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -/** - * msm_eeprom_parse_memory_map() - parse memory map in device node - * @of: device node - * @str: id string - * @data: memory block for output - * - * This functions parses @of to fill @data. It allocates map itself, parses - * the @of node, calculate total data length, and allocates required buffer. - * It only fills the map, but does not perform actual reading. - */ -static int msm_eeprom_parse_memory_map(struct device_node *of, const char *str, - struct msm_eeprom_memory_block_t *data) -{ - int i, rc = 0; - char property[PROPERTY_MAXSIZE]; - uint32_t count = 6; - struct msm_eeprom_memory_map_t *map; - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-num-blocks", str); - rc = of_property_read_u32(of, property, &data->num_map); - CDBG("%s: %s %d\n", __func__, property, data->num_map); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-page%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-poll%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-mem%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - - CDBG("%s num_bytes %d\n", __func__, data->num_data); - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - int j; - struct msm_eeprom_memory_map_t *emap = block->map; - uint8_t *memptr = block->mapdata; - - pr_err("%s Enter \n", __func__); - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].page.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].page.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), emap[j].page.addr, - emap[j].page.data, emap[j].page.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].page.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].page.delay); - if (rc < 0) { - pr_err("%s: page write failed\n", __func__); - return rc; - } - } - - if (emap[j].poll.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].poll.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &(e_ctrl->i2c_client), emap[j].poll.addr, - emap[j].poll.data, emap[j].poll.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].poll.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].poll.delay); - if (rc < 0) { - pr_err("%s: poll failed\n", __func__); - return rc; - } - } - - if (emap[j].mem.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].mem.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - pr_err("%s %d \n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; - } - } - - pr_err("%s Exit \n", __func__); - return rc; -} - -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - CDBG("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - memptr = data->mapdata; - - for (j = 0; j + 1 < data->num_map; j += 2) { - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - memptr += map[j].mem.valid_size - + map[j+1].mem.valid_size; - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr + map[j].mem.valid_size); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, - *sum); - if (!rc) - ret |= 1 << (j/2); - memptr += map[j].mem.valid_size + map[j+1].mem.valid_size; - } - return ret; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - - pr_info("%s: read 0x%02X%02X, check Fidelix 16M:0x%02X%02X, Winbond 8M:0x%02X%02X, Winbond 16M:0x%02X%02X\n", __func__, - id[0], id[1], client->spi_client->mfr_id0, client->spi_client->device_id0, - client->spi_client->mfr_id1, client->spi_client->device_id1, - client->spi_client->mfr_id2, client->spi_client->device_id2); - - if ((id[0] == client->spi_client->mfr_id0 && id[1] == client->spi_client->device_id0) - || (id[0] == client->spi_client->mfr_id1 && id[1] == client->spi_client->device_id1) - || (id[0] == client->spi_client->mfr_id2 && id[1] == client->spi_client->device_id2)) - return 0; - - return -ENODEV; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl, bool *down) -{ - int rc = 0; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - rc = msm_eeprom_match_id(e_ctrl); - pr_warn("%s : E", __func__); - - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || rc < 0) { - if (down) *down = true; - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - } else { - if (down) *down = false; - } - return rc; -} - -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl, bool down) -{ - pr_warn("%s : E", __func__); - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || down) - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - else - return 0; -} - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - bool down; - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf, cdata->cfg.read_data.num_bytes); - CDBG("%s: read data, rc addr = 0x%pK %d %d\n", __func__, (void*)cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes, rc); - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; -#if 0 // just once to power up when load lib - bool down; -#endif - - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if 0 // just once to power up when load lib - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } -#endif - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf_comp, cdata->cfg.read_data.comp_size); - - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl, down); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - bool down; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - compressed_buf, compressed_size); - - // write CRC32 for compressed data - rc |= e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size, - (uint8_t *)&crc, 4); - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - buf, cdata->cfg.write_data.num_bytes); - } - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - bool down; - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl, down); - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - CDBG("%s:%d Enter\n", __func__, __LINE__); - /* check eeprom id */ - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) { - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - return rc; - } - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - return rc; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s:%d Exit\n", __func__, __LINE__); - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - size_t length = 0; - - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - length = strlen(e_ctrl->eboard_info->eeprom_name) + 1; - if (length > MAX_EEPROM_NAME) { - pr_err("%s:%d invalid eeprom_name length %d\n", - __func__,__LINE__, (int)length); - rc = -EINVAL; - break; - } - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, length); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before%X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after%X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_ERASESIZE: - CDBG("%s E CFG_EEPROM_GET_ERASESIZE\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->i2c_client.spi_client->erase_size; - break; - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl, NULL); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl, true); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - default: - break; - } - - CDBG("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - CDBG("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 19200000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - rc = of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size); \ - if (rc < 0) \ - return rc; \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - spic->cmd_tbl.name.delay_intv = out[3]; \ - spic->cmd_tbl.name.delay_count = out[4]; \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[5]; - struct device_node *of = spic->spi_master->dev.of_node; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-read", read, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readseq", read_seq, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-queryid", query_id, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-pprog", - page_program, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-wenable", - write_enable, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readst", - read_status, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-erase", erase, tmp, 5); - - rc = of_property_read_u32(of, "qcom,spi-busy-mask", tmp); - if (rc < 0) { - pr_err("%s: Failed to get busy mask\n", __func__); - return rc; - } - spic->busy_mask = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-page-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get page size\n", __func__); - return rc; - } - spic->page_size = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-erase-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get erase size\n", __func__); - return rc; - } - spic->erase_size = tmp[0]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id0", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 0\n", __func__); - return rc; - } - spic->mfr_id0 = tmp[0]; - spic->device_id0 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id1", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 1\n", __func__); - return rc; - } - spic->mfr_id1 = tmp[0]; - spic->device_id1 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id2", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 2\n", __func__); - return rc; - } - spic->mfr_id2 = tmp[0]; - spic->device_id2 = tmp[1]; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - int16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size > 0) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - - -static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, - struct device_node *of_node) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; - - cmm_data->cmm_support = - of_property_read_bool(of_node, "qcom,cmm-data-support"); - if (!cmm_data->cmm_support) - return -EINVAL; - cmm_data->cmm_compression = - of_property_read_bool(of_node, "qcom,cmm-data-compressed"); - if (!cmm_data->cmm_compression) - CDBG("No MM compression data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", - &cmm_data->cmm_offset); - if (rc < 0) - CDBG("No MM offset data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-size", - &cmm_data->cmm_size); - if (rc < 0) - CDBG("No MM size data\n"); - - CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", - cmm_data->cmm_compression, - cmm_data->cmm_offset, - cmm_data->cmm_size); - return 0; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) { - pr_err("%s : eb_info is NULL", __func__); - goto spi_free; - } - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) { - pr_err("%s : msm_eeprom_get_dt_data", __func__); - goto board_free; - } - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - CDBG("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - CDBG("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - CDBG("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - CDBG("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - rc = -ENOMEM; - kfree(e_ctrl); - return rc; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, "cal", &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - int j = 0; - uint32_t temp; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = client->dev.of_node; - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - goto probe_failure; - } - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ectrl_free; - } - e_ctrl->is_supported = 0; - if (!client->dev.of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - return -EINVAL; - } - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32(client->dev.of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - return rc; - } - - eb_info = e_ctrl->eboard_info; - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->i2c_client.client = client; - eb_info->i2c_slaveaddr = temp; - - /* Set device type as I2C */ - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - - rc = of_property_read_string(client->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto i2c_board_free; - } - - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); - if (rc < 0) - CDBG("%s MM data miss:%d\n", __func__, __LINE__); - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto i2c_board_free; - - rc = msm_eeprom_parse_memory_map(of_node, "cal", &e_ctrl->cal_data); - if (rc < 0) - goto i2c_board_free; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto i2c_memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto i2c_power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - pr_err("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto i2c_memdata_free; - } - /*IMPLEMENT READING PART*/ - /* Initialize sub device */ - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - return rc; - -i2c_power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -i2c_memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -i2c_board_free: - kfree(e_ctrl->eboard_info); -ectrl_free: - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,eeprom" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static const struct of_device_id msm_eeprom_i2c_dt_match[] = { - { .compatible = "qcom,eeprom" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,eeprom", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "msm_eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_i2c_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - CDBG("%s:%d platform rc %d\n", __func__, __LINE__, rc); -// rc = spi_register_driver(&msm_eeprom_spi_driver); -// CDBG("%s:%d spi rc %d\n", __func__, __LINE__, rc); - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0 /*&& spi_rc < 0*/) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.h deleted file mode 100644 index d1a371d35750..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_eeprom.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp.c deleted file mode 100644 index 17b71903df7b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp.c +++ /dev/null @@ -1,2099 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#if defined(CONFIG_SR544) -#include "msm_otp_sr544.h" -#else -#include "msm_otp_s5k5e3yx.h" -#endif -#include "../../include/media/msm_cam_sensor.h" - -//#define MSM_EEPROM_DEBUG 1 - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#undef EEPROM_MMAP_DEBUG - -uint8_t *map_data = NULL; - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl); -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block); - - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl); -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - pr_err("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - - for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; - - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr_crc); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, *sum); - if (!rc) - { - ret |= 1 << (j/2); - } - } - return ret; -} - -static int msm_eeprom_get_cmm_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &e_ctrl->eboard_info->cmm_data; - cdata->cfg.get_cmm_data.cmm_support = cmm_data->cmm_support; - cdata->cfg.get_cmm_data.cmm_compression = cmm_data->cmm_compression; - cdata->cfg.get_cmm_data.cmm_size = cmm_data->cmm_size; - return rc; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0; - pr_warn("%s : E", __func__); - - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - - return rc; -} -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl) -{ - pr_warn("%s : E", __func__); - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); -} - -#if defined(CONFIG_SR544) -static int prepare_read_write_data(struct msm_eeprom_ctrl_t *e_ctrl, uint8_t addr_h, uint8_t addr_l, enum msm_camera_i2c_data_type data_type, int isWrite) -{ - int rc=0; - - isWrite = !(!isWrite)+1; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_otp); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - addr_h, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - addr_l, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - isWrite, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - return rc; -} -#endif - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - /* this below code is giving probelm in device -> encrypt -> came launch - Ideally we should not free this data until dtor. so commentiong out */ - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - uint16_t data; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - -#if defined(CONFIG_SR544) - return rc; -#endif - - buf = kmalloc(cdata->cfg.read_data.num_bytes+1, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on otp\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf[i]=data; - } - -#if !defined(CONFIG_SR544) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - buf[cdata->cfg.read_data.num_bytes] = '\0'; - pr_err("[sjlee] %s : buf[%s]\n", __func__, buf); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_fw_version(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - memset(buf, 0, cdata->cfg.read_data.num_bytes); - if(e_ctrl->cal_data.num_data < (cdata->cfg.read_data.addr + cdata->cfg.read_data.num_bytes)) { - pr_err("%s : requested data size was mismatched! addr:size[0x%x:%d]\n", __func__, cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes); - rc = -ENOMEM; - goto FREE; - } - - memcpy(buf, &map_data[cdata->cfg.read_data.addr], cdata->cfg.read_data.num_bytes); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); - -FREE: - - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - uint16_t data; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if defined(CONFIG_SR544) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.comp_size; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf_comp[i]=data; - } - -#if !defined(CONFIG_SR544) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) - if (cdata->cfg.write_data.compress) { - - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - addr_h = ((cdata->cfg.write_data.addr+compressed_size)>>8)&0xFF; - addr_l = (cdata->cfg.write_data.addr+compressed_size)&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } else { - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } -#else - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size+i, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } -#endif - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - - int rc = 0; -#if 0 - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl); -#endif - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - /* power up */ - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - return rc; - } - - /* read cal data */ - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto POWER_DOWN; - } - - /* update support info */ - e_ctrl->is_supported = (msm_eeprom_match_crc(&e_ctrl->cal_data) << 1) | 1; - pr_err("%s:%d is_supported = 0x%X\n", __func__, __LINE__, e_ctrl->is_supported); - -POWER_DOWN: - /* power down */ - if (msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client) < 0) - pr_err("%s:%d pwoer down failed\n", __func__, __LINE__); - pr_err("%s:%d Exit\n", __func__, __LINE__); - - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - - CDBG("%s:%d: subdevid: %d, cfgtype: %d\n",__func__,__LINE__,e_ctrl->subdev_id, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, - sizeof(cdata->cfg.eeprom_name)); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before : %X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after : %X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_MM_INFO: - CDBG("%s E CFG_EEPROM_GET_MM_INFO\n", __func__); - rc = msm_eeprom_get_cmm_data(e_ctrl, cdata); - break; - - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_GET_FW_VERSION_INFO\n", __func__); - rc = eeprom_config_read_fw_version(e_ctrl, cdata); - break; - default: - break; - } - - pr_err("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - pr_err("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -uint8_t* get_eeprom_data_addr() -{ - return map_data; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -#if defined(CONFIG_SR544) -// compare dtsi file to GTA when L-OS upgrade for rossa/core-prime. -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr544_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %pK\n", __func__, __LINE__ , memptr); - } - return rc; -} -#else -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint8_t page; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), 0x0A04, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - page = 2; - break; - case 3: - page = 3; - break; - case 7: - page = 4; - break; - case 0xF: - page = 5; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - init_read_otp.reg_setting[1].reg_data = page; - init_write_otp.reg_setting[7].reg_data = page; - - if (emap[j].mem.valid_size) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - for (i=0x0A08; i<=0x0A41; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), i, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i-0x0A08] = OTP_Data; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - return rc; - } -#ifdef EEPROM_MMAP_DEBUG - for (i=0; inum_map); - pr_err("%s::%d %s %d\n", __func__, __LINE__, property, data->num_map); - if (rc < 0) { - pr_err("%s::%d failed rc %d\n", __func__,__LINE__,rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - pr_err("%s, %d: i = %d\n", __func__, __LINE__, i); - - snprintf(property, PROPERTY_MAXSIZE, "qcom,page%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,poll%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,mem%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - pr_err("%s::%d valid size = %d\n", __func__,__LINE__, data->num_data); - - total_size = 0; - -#if defined(CONFIG_SR544) - // if total-size is defined at dtsi file. - // set num_data as total-size (refer dtsi file of GTA) - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - pr_err("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - pr_err("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } -#endif - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - int j; - - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - return -EINVAL; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - goto probe_failure; - } - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - pr_err("%s client = 0x%pK\n", __func__, client); - - //e_ctrl->eboard_info = (struct msm_eeprom_board_info *)(id->driver_data); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -EINVAL; - goto memdata_free; - } - - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto board_free; - } - - rc = of_property_read_u32(of_node, "cell-index", - &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto board_free; - } - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - - pr_err("%s:%d e_ctrl->eboard_info->i2c_slaveaddr = %d\n", __func__, __LINE__ , e_ctrl->eboard_info->i2c_slaveaddr); - - /* Set device type as I2C */ - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - pr_err("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - pr_err("%s: no cal memory map\n", __func__); - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto board_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - -// e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = 1; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -board_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -memdata_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - if (of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size)) { \ - return -EFAULT; \ - } else { \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - } \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[3]; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,read", read, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,readseq", read_seq, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,queryid", query_id, tmp, 3); - - rc = of_property_read_u32_array(spic->spi_master->dev.of_node, - "qcom,eeprom-id", tmp, 2); - if (rc) { - pr_err("%s: Failed to get eeprom id\n", __func__); - return rc; - } - spic->mfr_id = tmp[0]; - spic->device_id = tmp[1]; - - return 0; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - pr_err("%s: read 0x%x 0x%x, check 0x%x 0x%x\n", __func__, id[0], - id[1], client->spi_client->mfr_id, client->spi_client->device_id); - if (id[0] != client->spi_client->mfr_id - || id[1] != client->spi_client->device_id) - return -ENODEV; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - pr_err("msm_camera_get_dt_power_setting_data : %d\n", __LINE__); - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - pr_err("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - pr_err("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - - -static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, - struct device_node *of_node) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; - - cmm_data->cmm_support = - of_property_read_bool(of_node, "qcom,cmm-data-support"); - if (!cmm_data->cmm_support){ - pr_err("%s::%d qcom,cmm-data-support failed ",__func__,__LINE__); - return -EINVAL; - } - cmm_data->cmm_compression = - of_property_read_bool(of_node, "qcom,cmm-data-compressed"); - if (!cmm_data->cmm_compression) - CDBG("No MM compression data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", - &cmm_data->cmm_offset); - if (rc < 0) - CDBG("No MM offset data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-size", - &cmm_data->cmm_size); - if (rc < 0) - CDBG("No MM size data\n"); - - CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", - cmm_data->cmm_compression, - cmm_data->cmm_offset, - cmm_data->cmm_size); - return 0; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) - goto spi_free; - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, spi->dev.of_node); - if (rc < 0) - CDBG("%s MM data miss:%d\n", __func__, __LINE__); - - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) - goto board_free; - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - pr_err("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - pr_err("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - pr_err("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - pr_err("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - kfree(e_ctrl); - return -ENOMEM; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); - if (rc < 0){ - pr_err("%s MM data miss:%d\n", __func__, __LINE__); - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_otp"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - pr_err("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,otp" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct of_device_id msm_eeprom_i2c_dt_match[] = { - { .compatible = "qcom,otp"}, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,otp", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_i2c_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0 /*, spi_rc = 0*/; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - if(rc<0){ - pr_err("%s:%d platform rc %d\n", __func__, __LINE__, rc); - return rc; - } - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_s5k5e3yx.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_s5k5e3yx.h deleted file mode 100644 index 215ed6baf643..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_s5k5e3yx.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 17 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array init_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_read_otp = { - init_read_s5k5e3yx_otp_reg, sizeof(init_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting finish_read_otp = { - finish_read_s5k5e3yx_otp_reg, sizeof(finish_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array init_write_s5k5e3yx_otp_reg[] = { - {0x3b42, 0x68, NULL, 0}, - {0x3b41, 0x01, NULL, 0}, - {0x3b40, 0x00, NULL, 0}, - {0x3b45, 0x02, NULL, 0}, - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x03, NULL, 0}, - {0x3b42, 0x00, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x03, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_write_otp = { - init_write_s5k5e3yx_otp_reg, sizeof(init_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_write_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, - {0x3b40, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting finish_write_otp = { - finish_write_s5k5e3yx_otp_reg, sizeof(finish_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_sr544.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_sr544.h deleted file mode 100644 index c4eeffe62a52..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/eeprom/msm_otp_sr544.h +++ /dev/null @@ -1,2102 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr544_init_reg[] = { -{0x0118, 0x0000}, //sleep On - -//--- SRAM timing control---// -{0x0E00, 0x0101}, -{0x0E02, 0x0101}, -{0x0E04, 0x0101}, -{0x0E06, 0x0101}, -{0x0E08, 0x0101}, -{0x0E0A, 0x0101}, -{0x0E0C, 0x0101}, -{0x0E0E, 0x0101}, - -//Firmware 2Lane v0.39, LB OTP Burst On + double luma under dark. FW 20140804 -{0x2000, 0x4031}, -{0x2002, 0x83F8}, -{0x2004, 0x4104}, -{0x2006, 0x4307}, -{0x2008, 0x4382}, -{0x200a, 0x80D0}, -{0x200c, 0x4382}, -{0x200e, 0x8070}, -{0x2010, 0x43A2}, -{0x2012, 0x0B80}, -{0x2014, 0x0C0A}, -{0x2016, 0x4382}, -{0x2018, 0x0B90}, -{0x201a, 0x0C0A}, -{0x201c, 0x4382}, -{0x201e, 0x0B9C}, -{0x2020, 0x0C0A}, -{0x2022, 0x93D2}, -{0x2024, 0x003D}, -{0x2026, 0x2002}, -{0x2028, 0x4030}, -{0x202a, 0xF6C0}, -{0x202c, 0x43C2}, -{0x202e, 0x0F82}, -{0x2030, 0x425F}, -{0x2032, 0x0118}, -{0x2034, 0xF37F}, -{0x2036, 0x930F}, -{0x2038, 0x2002}, -{0x203a, 0x0CC8}, -{0x203c, 0x3FF9}, -{0x203e, 0x4F82}, -{0x2040, 0x809A}, -{0x2042, 0x43D2}, -{0x2044, 0x0A80}, -{0x2046, 0x43D2}, -{0x2048, 0x0180}, -{0x204a, 0x43D2}, -{0x204c, 0x019A}, -{0x204e, 0x40F2}, -{0x2050, 0x0009}, -{0x2052, 0x019B}, -{0x2054, 0x12B0}, -{0x2056, 0xFE26}, -{0x2058, 0x4382}, -{0x205a, 0x8094}, -{0x205c, 0x93D2}, -{0x205e, 0x003E}, -{0x2060, 0x2002}, -{0x2062, 0x4030}, -{0x2064, 0xF5A0}, -{0x2066, 0x4308}, -{0x2068, 0x5038}, -{0x206a, 0x0030}, -{0x206c, 0x480F}, -{0x206e, 0x12B0}, -{0x2070, 0xFE38}, -{0x2072, 0x403B}, -{0x2074, 0x7606}, -{0x2076, 0x4B29}, -{0x2078, 0x5318}, -{0x207a, 0x480F}, -{0x207c, 0x12B0}, -{0x207e, 0xFE38}, -{0x2080, 0x4B2A}, -{0x2082, 0x5318}, -{0x2084, 0x480F}, -{0x2086, 0x12B0}, -{0x2088, 0xFE38}, -{0x208a, 0x4A0D}, -{0x208c, 0xF03D}, -{0x208e, 0x000F}, -{0x2090, 0x108D}, -{0x2092, 0x4B2E}, -{0x2094, 0x5E0E}, -{0x2096, 0x5E0E}, -{0x2098, 0x5E0E}, -{0x209a, 0x5E0E}, -{0x209c, 0x4A0F}, -{0x209e, 0xC312}, -{0x20a0, 0x100F}, -{0x20a2, 0x110F}, -{0x20a4, 0x110F}, -{0x20a6, 0x110F}, -{0x20a8, 0x590D}, -{0x20aa, 0x4D87}, -{0x20ac, 0x5000}, -{0x20ae, 0x5F0E}, -{0x20b0, 0x4E87}, -{0x20b2, 0x6000}, -{0x20b4, 0x5327}, -{0x20b6, 0x5038}, -{0x20b8, 0xFFD1}, -{0x20ba, 0x9038}, -{0x20bc, 0x0300}, -{0x20be, 0x2BD4}, -{0x20c0, 0x0261}, -{0x20c2, 0x0000}, -{0x20c4, 0x43A2}, -{0x20c6, 0x0384}, -{0x20c8, 0x42B2}, -{0x20ca, 0x0386}, -{0x20cc, 0x43C2}, -{0x20ce, 0x0180}, -{0x20d0, 0x43D2}, -{0x20d2, 0x003D}, -{0x20d4, 0x40B2}, -{0x20d6, 0x808B}, -{0x20d8, 0x0B88}, -{0x20da, 0x0C0A}, -{0x20dc, 0x40B2}, -{0x20de, 0x1009}, -{0x20e0, 0x0B8A}, -{0x20e2, 0x0C0A}, -{0x20e4, 0x40B2}, -{0x20e6, 0xC40C}, -{0x20e8, 0x0B8C}, -{0x20ea, 0x0C0A}, -{0x20ec, 0x40B2}, -{0x20ee, 0xC9E1}, -{0x20f0, 0x0B8E}, -{0x20f2, 0x0C0A}, -{0x20f4, 0x40B2}, -{0x20f6, 0x0C1E}, -{0x20f8, 0x0B92}, -{0x20fa, 0x0C0A}, -{0x20fc, 0x43D2}, -{0x20fe, 0x0F82}, -{0x2100, 0x0C3C}, -{0x2102, 0x0C3C}, -{0x2104, 0x0C3C}, -{0x2106, 0x0C3C}, -{0x2108, 0x421F}, -{0x210a, 0x00A6}, -{0x210c, 0x503F}, -{0x210e, 0x07D0}, -{0x2110, 0x3811}, -{0x2112, 0x4F82}, -{0x2114, 0x7100}, -{0x2116, 0x0004}, -{0x2118, 0x0C0D}, -{0x211a, 0x0005}, -{0x211c, 0x0C04}, -{0x211e, 0x000D}, -{0x2120, 0x0C09}, -{0x2122, 0x003D}, -{0x2124, 0x0C1D}, -{0x2126, 0x003C}, -{0x2128, 0x0C13}, -{0x212a, 0x0004}, -{0x212c, 0x0C09}, -{0x212e, 0x0004}, -{0x2130, 0x533F}, -{0x2132, 0x37EF}, -{0x2134, 0x4392}, -{0x2136, 0x8096}, -{0x2138, 0x4382}, -{0x213a, 0x809E}, -{0x213c, 0x4382}, -{0x213e, 0x80B6}, -{0x2140, 0x4382}, -{0x2142, 0x80BE}, -{0x2144, 0x4382}, -{0x2146, 0x80A2}, -{0x2148, 0x40B2}, -{0x214a, 0x0028}, -{0x214c, 0x7000}, -{0x214e, 0x43A2}, -{0x2150, 0x80A0}, -{0x2152, 0xB3E2}, -{0x2154, 0x00B4}, -{0x2156, 0x2402}, -{0x2158, 0x4392}, -{0x215a, 0x80A0}, -{0x215c, 0x4326}, -{0x215e, 0xB3D2}, -{0x2160, 0x00B4}, -{0x2162, 0x2002}, -{0x2164, 0x4030}, -{0x2166, 0xF590}, -{0x2168, 0x4306}, -{0x216a, 0x4384}, -{0x216c, 0x0002}, -{0x216e, 0x4384}, -{0x2170, 0x0006}, -{0x2172, 0x4382}, -{0x2174, 0x809C}, -{0x2176, 0x4382}, -{0x2178, 0x8098}, -{0x217a, 0x40B2}, -{0x217c, 0x0005}, -{0x217e, 0x7320}, -{0x2180, 0x4392}, -{0x2182, 0x7326}, -{0x2184, 0x12B0}, -{0x2186, 0xF952}, -{0x2188, 0x4392}, -{0x218a, 0x731C}, -{0x218c, 0x9382}, -{0x218e, 0x8096}, -{0x2190, 0x200A}, -{0x2192, 0x0B00}, -{0x2194, 0x7302}, -{0x2196, 0x02BC}, -{0x2198, 0x4382}, -{0x219a, 0x7004}, -{0x219c, 0x430F}, -{0x219e, 0x12B0}, -{0x21a0, 0xF752}, -{0x21a2, 0x12B0}, -{0x21a4, 0xF952}, -{0x21a6, 0x4392}, -{0x21a8, 0x80BC}, -{0x21aa, 0x4382}, -{0x21ac, 0x740E}, -{0x21ae, 0xB3E2}, -{0x21b0, 0x0080}, -{0x21b2, 0x2402}, -{0x21b4, 0x4392}, -{0x21b6, 0x740E}, -{0x21b8, 0x431F}, -{0x21ba, 0x12B0}, -{0x21bc, 0xF752}, -{0x21be, 0x4392}, -{0x21c0, 0x7004}, -{0x21c2, 0x4682}, -{0x21c4, 0x7110}, -{0x21c6, 0x9382}, -{0x21c8, 0x8092}, -{0x21ca, 0x2005}, -{0x21cc, 0x9392}, -{0x21ce, 0x7110}, -{0x21d0, 0x2402}, -{0x21d2, 0x4030}, -{0x21d4, 0xF494}, -{0x21d6, 0x9392}, -{0x21d8, 0x7110}, -{0x21da, 0x20A4}, -{0x21dc, 0x0B00}, -{0x21de, 0x7302}, -{0x21e0, 0x0032}, -{0x21e2, 0x4382}, -{0x21e4, 0x7004}, -{0x21e6, 0x0B00}, -{0x21e8, 0x7302}, -{0x21ea, 0x03E8}, -{0x21ec, 0x0800}, -{0x21ee, 0x7114}, -{0x21f0, 0x425F}, -{0x21f2, 0x0C9C}, -{0x21f4, 0x4F4E}, -{0x21f6, 0x430F}, -{0x21f8, 0x4E0D}, -{0x21fa, 0x430C}, -{0x21fc, 0x421F}, -{0x21fe, 0x0C9A}, -{0x2200, 0xDF0C}, -{0x2202, 0x1204}, -{0x2204, 0x440F}, -{0x2206, 0x532F}, -{0x2208, 0x120F}, -{0x220a, 0x1212}, -{0x220c, 0x0CA2}, -{0x220e, 0x403E}, -{0x2210, 0x80C0}, -{0x2212, 0x403F}, -{0x2214, 0x8072}, -{0x2216, 0x12B0}, -{0x2218, 0xF7BA}, -{0x221a, 0x4F07}, -{0x221c, 0x425F}, -{0x221e, 0x0CA0}, -{0x2220, 0x4F4E}, -{0x2222, 0x430F}, -{0x2224, 0x4E0D}, -{0x2226, 0x430C}, -{0x2228, 0x421F}, -{0x222a, 0x0C9E}, -{0x222c, 0xDF0C}, -{0x222e, 0x440F}, -{0x2230, 0x522F}, -{0x2232, 0x120F}, -{0x2234, 0x532F}, -{0x2236, 0x120F}, -{0x2238, 0x1212}, -{0x223a, 0x0CA4}, -{0x223c, 0x403E}, -{0x223e, 0x80A4}, -{0x2240, 0x403F}, -{0x2242, 0x8050}, -{0x2244, 0x12B0}, -{0x2246, 0xF7BA}, -{0x2248, 0x4F08}, -{0x224a, 0x430D}, -{0x224c, 0x441E}, -{0x224e, 0x0004}, -{0x2250, 0x442F}, -{0x2252, 0x5031}, -{0x2254, 0x000C}, -{0x2256, 0x9E0F}, -{0x2258, 0x2C01}, -{0x225a, 0x431D}, -{0x225c, 0x8E0F}, -{0x225e, 0x930F}, -{0x2260, 0x3402}, -{0x2262, 0xE33F}, -{0x2264, 0x531F}, -{0x2266, 0x421E}, -{0x2268, 0x0CA2}, -{0x226a, 0xC312}, -{0x226c, 0x100E}, -{0x226e, 0x9E0F}, -{0x2270, 0x2804}, -{0x2272, 0x930D}, -{0x2274, 0x2001}, -{0x2276, 0x5317}, -{0x2278, 0x5D08}, -{0x227a, 0x403B}, -{0x227c, 0x0196}, -{0x227e, 0x403D}, -{0x2280, 0x0040}, -{0x2282, 0x4D0F}, -{0x2284, 0x8B2F}, -{0x2286, 0x470A}, -{0x2288, 0x4F0C}, -{0x228a, 0x12B0}, -{0x228c, 0xFE58}, -{0x228e, 0x4E09}, -{0x2290, 0xC312}, -{0x2292, 0x1009}, -{0x2294, 0x1109}, -{0x2296, 0x1109}, -{0x2298, 0x1109}, -{0x229a, 0x1109}, -{0x229c, 0x1109}, -{0x229e, 0x4D0F}, -{0x22a0, 0x8B2F}, -{0x22a2, 0x480A}, -{0x22a4, 0x4F0C}, -{0x22a6, 0x12B0}, -{0x22a8, 0xFE58}, -{0x22aa, 0x4E0F}, -{0x22ac, 0xC312}, -{0x22ae, 0x100F}, -{0x22b0, 0x110F}, -{0x22b2, 0x110F}, -{0x22b4, 0x110F}, -{0x22b6, 0x110F}, -{0x22b8, 0x110F}, -{0x22ba, 0x5F09}, -{0x22bc, 0xC312}, -{0x22be, 0x1009}, -{0x22c0, 0x92B2}, -{0x22c2, 0x80BE}, -{0x22c4, 0x280C}, -{0x22c6, 0x90B2}, -{0x22c8, 0x0096}, -{0x22ca, 0x80B6}, -{0x22cc, 0x2408}, -{0x22ce, 0x0900}, -{0x22d0, 0x710E}, -{0x22d2, 0x0B00}, -{0x22d4, 0x7302}, -{0x22d6, 0x0320}, -{0x22d8, 0x12B0}, -{0x22da, 0xF6F2}, -{0x22dc, 0x3F74}, -{0x22de, 0x470A}, -{0x22e0, 0x580A}, -{0x22e2, 0xC312}, -{0x22e4, 0x100A}, -{0x22e6, 0x890A}, -{0x22e8, 0xB3E2}, -{0x22ea, 0x0C81}, -{0x22ec, 0x2418}, -{0x22ee, 0x425F}, -{0x22f0, 0x0C92}, -{0x22f2, 0xF37F}, -{0x22f4, 0x9F0A}, -{0x22f6, 0x280E}, -{0x22f8, 0x425F}, -{0x22fa, 0x0C92}, -{0x22fc, 0xF37F}, -{0x22fe, 0x4A0E}, -{0x2300, 0x8F0E}, -{0x2302, 0x4E82}, -{0x2304, 0x0CAC}, -{0x2306, 0x425F}, -{0x2308, 0x0C92}, -{0x230a, 0xF37F}, -{0x230c, 0x8F0A}, -{0x230e, 0x4A82}, -{0x2310, 0x0CAE}, -{0x2312, 0x3FDD}, -{0x2314, 0x4382}, -{0x2316, 0x0CAC}, -{0x2318, 0x4382}, -{0x231a, 0x0CAE}, -{0x231c, 0x3FD8}, -{0x231e, 0x4A82}, -{0x2320, 0x0CAC}, -{0x2322, 0x3FF5}, -{0x2324, 0x0B00}, -{0x2326, 0x7302}, -{0x2328, 0x0002}, -{0x232a, 0x069A}, -{0x232c, 0x0C1F}, -{0x232e, 0x0403}, -{0x2330, 0x0C05}, -{0x2332, 0x0001}, -{0x2334, 0x0C01}, -{0x2336, 0x0003}, -{0x2338, 0x0C03}, -{0x233a, 0x000B}, -{0x233c, 0x0C33}, -{0x233e, 0x0003}, -{0x2340, 0x0C03}, -{0x2342, 0x0653}, -{0x2344, 0x0C03}, -{0x2346, 0x065B}, -{0x2348, 0x0C13}, -{0x234a, 0x065F}, -{0x234c, 0x0C43}, -{0x234e, 0x0657}, -{0x2350, 0x0C03}, -{0x2352, 0x0653}, -{0x2354, 0x0C03}, -{0x2356, 0x0643}, -{0x2358, 0x0C0F}, -{0x235a, 0x067D}, -{0x235c, 0x0C01}, -{0x235e, 0x077F}, -{0x2360, 0x0C01}, -{0x2362, 0x0677}, -{0x2364, 0x0C01}, -{0x2366, 0x0673}, -{0x2368, 0x0C67}, -{0x236a, 0x0677}, -{0x236c, 0x0C03}, -{0x236e, 0x077D}, -{0x2370, 0x0C19}, -{0x2372, 0x0013}, -{0x2374, 0x0C27}, -{0x2376, 0x0003}, -{0x2378, 0x0C45}, -{0x237a, 0x0675}, -{0x237c, 0x0C01}, -{0x237e, 0x0671}, -{0x2380, 0x4392}, -{0x2382, 0x7004}, -{0x2384, 0x430F}, -{0x2386, 0x9382}, -{0x2388, 0x80BC}, -{0x238a, 0x2001}, -{0x238c, 0x431F}, -{0x238e, 0x4F82}, -{0x2390, 0x80BC}, -{0x2392, 0x930F}, -{0x2394, 0x2473}, -{0x2396, 0x0B00}, -{0x2398, 0x7302}, -{0x239a, 0x033A}, -{0x239c, 0x0675}, -{0x239e, 0x0C02}, -{0x23a0, 0x0339}, -{0x23a2, 0xAE0C}, -{0x23a4, 0x0C01}, -{0x23a6, 0x003C}, -{0x23a8, 0x0C01}, -{0x23aa, 0x0004}, -{0x23ac, 0x0C01}, -{0x23ae, 0x0642}, -{0x23b0, 0x0B00}, -{0x23b2, 0x7302}, -{0x23b4, 0x0386}, -{0x23b6, 0x0643}, -{0x23b8, 0x0C05}, -{0x23ba, 0x0001}, -{0x23bc, 0x0C01}, -{0x23be, 0x0003}, -{0x23c0, 0x0C03}, -{0x23c2, 0x000B}, -{0x23c4, 0x0C33}, -{0x23c6, 0x0003}, -{0x23c8, 0x0C03}, -{0x23ca, 0x0653}, -{0x23cc, 0x0C03}, -{0x23ce, 0x065B}, -{0x23d0, 0x0C13}, -{0x23d2, 0x065F}, -{0x23d4, 0x0C43}, -{0x23d6, 0x0657}, -{0x23d8, 0x0C03}, -{0x23da, 0x0653}, -{0x23dc, 0x0C03}, -{0x23de, 0x0643}, -{0x23e0, 0x0C0F}, -{0x23e2, 0x067D}, -{0x23e4, 0x0C01}, -{0x23e6, 0x077F}, -{0x23e8, 0x0C01}, -{0x23ea, 0x0677}, -{0x23ec, 0x0C01}, -{0x23ee, 0x0673}, -{0x23f0, 0x0C67}, -{0x23f2, 0x0677}, -{0x23f4, 0x0C03}, -{0x23f6, 0x077D}, -{0x23f8, 0x0C19}, -{0x23fa, 0x0013}, -{0x23fc, 0x0C27}, -{0x23fe, 0x0003}, -{0x2400, 0x0C45}, -{0x2402, 0x0675}, -{0x2404, 0x0C01}, -{0x2406, 0x0671}, -{0x2408, 0x12B0}, -{0x240a, 0xF6F2}, -{0x240c, 0x930F}, -{0x240e, 0x2405}, -{0x2410, 0x4292}, -{0x2412, 0x8096}, -{0x2414, 0x809E}, -{0x2416, 0x4382}, -{0x2418, 0x8096}, -{0x241a, 0x9382}, -{0x241c, 0x80BC}, -{0x241e, 0x241E}, -{0x2420, 0x0B00}, -{0x2422, 0x7302}, -{0x2424, 0x069E}, -{0x2426, 0x0675}, -{0x2428, 0x0C02}, -{0x242a, 0x0339}, -{0x242c, 0xAE0C}, -{0x242e, 0x0C01}, -{0x2430, 0x003C}, -{0x2432, 0x0C01}, -{0x2434, 0x0004}, -{0x2436, 0x0C01}, -{0x2438, 0x0642}, -{0x243a, 0x0C01}, -{0x243c, 0x06A1}, -{0x243e, 0x0C03}, -{0x2440, 0x06A0}, -{0x2442, 0x9382}, -{0x2444, 0x80D0}, -{0x2446, 0x2004}, -{0x2448, 0x930F}, -{0x244a, 0x26BD}, -{0x244c, 0x4030}, -{0x244e, 0xF18C}, -{0x2450, 0x43C2}, -{0x2452, 0x0A80}, -{0x2454, 0x0B00}, -{0x2456, 0x7302}, -{0x2458, 0xFFF0}, -{0x245a, 0x3EB5}, -{0x245c, 0x0B00}, -{0x245e, 0x7302}, -{0x2460, 0x069E}, -{0x2462, 0x0675}, -{0x2464, 0x0C02}, -{0x2466, 0x0301}, -{0x2468, 0xAE0C}, -{0x246a, 0x0C01}, -{0x246c, 0x0004}, -{0x246e, 0x0C03}, -{0x2470, 0x0642}, -{0x2472, 0x0C01}, -{0x2474, 0x06A1}, -{0x2476, 0x0C03}, -{0x2478, 0x06A0}, -{0x247a, 0x3FE3}, -{0x247c, 0x0B00}, -{0x247e, 0x7302}, -{0x2480, 0x033A}, -{0x2482, 0x0675}, -{0x2484, 0x0C02}, -{0x2486, 0x0301}, -{0x2488, 0xAE0C}, -{0x248a, 0x0C01}, -{0x248c, 0x0004}, -{0x248e, 0x0C03}, -{0x2490, 0x0642}, -{0x2492, 0x3F8E}, -{0x2494, 0x0B00}, -{0x2496, 0x7302}, -{0x2498, 0x0002}, -{0x249a, 0x069A}, -{0x249c, 0x0C1F}, -{0x249e, 0x0402}, -{0x24a0, 0x0C05}, -{0x24a2, 0x0001}, -{0x24a4, 0x0C01}, -{0x24a6, 0x0003}, -{0x24a8, 0x0C03}, -{0x24aa, 0x000B}, -{0x24ac, 0x0C33}, -{0x24ae, 0x0003}, -{0x24b0, 0x0C03}, -{0x24b2, 0x0653}, -{0x24b4, 0x0C03}, -{0x24b6, 0x065B}, -{0x24b8, 0x0C13}, -{0x24ba, 0x065F}, -{0x24bc, 0x0C43}, -{0x24be, 0x0657}, -{0x24c0, 0x0C03}, -{0x24c2, 0x0653}, -{0x24c4, 0x0C03}, -{0x24c6, 0x0643}, -{0x24c8, 0x0C0F}, -{0x24ca, 0x077D}, -{0x24cc, 0x0C01}, -{0x24ce, 0x067F}, -{0x24d0, 0x0C01}, -{0x24d2, 0x0677}, -{0x24d4, 0x0C01}, -{0x24d6, 0x0673}, -{0x24d8, 0x0C5F}, -{0x24da, 0x0663}, -{0x24dc, 0x0C6F}, -{0x24de, 0x0667}, -{0x24e0, 0x0C01}, -{0x24e2, 0x0677}, -{0x24e4, 0x0C01}, -{0x24e6, 0x077D}, -{0x24e8, 0x0C33}, -{0x24ea, 0x0013}, -{0x24ec, 0x0C27}, -{0x24ee, 0x0003}, -{0x24f0, 0x0C4F}, -{0x24f2, 0x0675}, -{0x24f4, 0x0C01}, -{0x24f6, 0x0671}, -{0x24f8, 0x0CFF}, -{0x24fa, 0x0C78}, -{0x24fc, 0x0661}, -{0x24fe, 0x4392}, -{0x2500, 0x7004}, -{0x2502, 0x430F}, -{0x2504, 0x9382}, -{0x2506, 0x80BC}, -{0x2508, 0x2001}, -{0x250a, 0x431F}, -{0x250c, 0x4F82}, -{0x250e, 0x80BC}, -{0x2510, 0x12B0}, -{0x2512, 0xF6F2}, -{0x2514, 0x930F}, -{0x2516, 0x2405}, -{0x2518, 0x4292}, -{0x251a, 0x8096}, -{0x251c, 0x809E}, -{0x251e, 0x4382}, -{0x2520, 0x8096}, -{0x2522, 0x9382}, -{0x2524, 0x80BC}, -{0x2526, 0x2019}, -{0x2528, 0x0B00}, -{0x252a, 0x7302}, -{0x252c, 0x0562}, -{0x252e, 0x0665}, -{0x2530, 0x0C02}, -{0x2532, 0x0301}, -{0x2534, 0xA60C}, -{0x2536, 0x0204}, -{0x2538, 0xAE0C}, -{0x253a, 0x0C03}, -{0x253c, 0x0642}, -{0x253e, 0x0C13}, -{0x2540, 0x06A1}, -{0x2542, 0x0C03}, -{0x2544, 0x06A0}, -{0x2546, 0x9382}, -{0x2548, 0x80D0}, -{0x254a, 0x277E}, -{0x254c, 0x43C2}, -{0x254e, 0x0A80}, -{0x2550, 0x0B00}, -{0x2552, 0x7302}, -{0x2554, 0xFFF0}, -{0x2556, 0x4030}, -{0x2558, 0xF1C6}, -{0x255a, 0x0B00}, -{0x255c, 0x7302}, -{0x255e, 0x0562}, -{0x2560, 0x0665}, -{0x2562, 0x0C02}, -{0x2564, 0x0339}, -{0x2566, 0xA60C}, -{0x2568, 0x023C}, -{0x256a, 0xAE0C}, -{0x256c, 0x0C01}, -{0x256e, 0x0004}, -{0x2570, 0x0C01}, -{0x2572, 0x0642}, -{0x2574, 0x0C13}, -{0x2576, 0x06A1}, -{0x2578, 0x0C03}, -{0x257a, 0x06A0}, -{0x257c, 0x9382}, -{0x257e, 0x80D0}, -{0x2580, 0x2763}, -{0x2582, 0x43C2}, -{0x2584, 0x0A80}, -{0x2586, 0x0B00}, -{0x2588, 0x7302}, -{0x258a, 0xFFF0}, -{0x258c, 0x4030}, -{0x258e, 0xF1C6}, -{0x2590, 0xB3E2}, -{0x2592, 0x00B4}, -{0x2594, 0x2002}, -{0x2596, 0x4030}, -{0x2598, 0xF16A}, -{0x259a, 0x4316}, -{0x259c, 0x4030}, -{0x259e, 0xF16A}, -{0x25a0, 0x4392}, -{0x25a2, 0x760E}, -{0x25a4, 0x425F}, -{0x25a6, 0x0118}, -{0x25a8, 0xF37F}, -{0x25aa, 0x930F}, -{0x25ac, 0x2005}, -{0x25ae, 0x43C2}, -{0x25b0, 0x0A80}, -{0x25b2, 0x0B00}, -{0x25b4, 0x7302}, -{0x25b6, 0xFFF0}, -{0x25b8, 0x9382}, -{0x25ba, 0x760C}, -{0x25bc, 0x2002}, -{0x25be, 0x0C64}, -{0x25c0, 0x3FF1}, -{0x25c2, 0x4F82}, -{0x25c4, 0x809A}, -{0x25c6, 0x421F}, -{0x25c8, 0x760A}, -{0x25ca, 0x932F}, -{0x25cc, 0x2013}, -{0x25ce, 0x4292}, -{0x25d0, 0x018A}, -{0x25d2, 0x80B8}, -{0x25d4, 0x12B0}, -{0x25d6, 0xFE26}, -{0x25d8, 0x40B2}, -{0x25da, 0x0005}, -{0x25dc, 0x7600}, -{0x25de, 0x4382}, -{0x25e0, 0x7602}, -{0x25e2, 0x0262}, -{0x25e4, 0x0000}, -{0x25e6, 0x0222}, -{0x25e8, 0x0000}, -{0x25ea, 0x0262}, -{0x25ec, 0x0000}, -{0x25ee, 0x0260}, -{0x25f0, 0x0000}, -{0x25f2, 0x3FD6}, -{0x25f4, 0x903F}, -{0x25f6, 0x0003}, -{0x25f8, 0x285B}, -{0x25fa, 0x903F}, -{0x25fc, 0x0102}, -{0x25fe, 0x204E}, -{0x2600, 0x425F}, -{0x2602, 0x0186}, -{0x2604, 0x4F4C}, -{0x2606, 0x93D2}, -{0x2608, 0x018F}, -{0x260a, 0x2446}, -{0x260c, 0x425F}, -{0x260e, 0x018F}, -{0x2610, 0x4F4D}, -{0x2612, 0x4308}, -{0x2614, 0x421B}, -{0x2616, 0x80B8}, -{0x2618, 0x431F}, -{0x261a, 0x480E}, -{0x261c, 0x930E}, -{0x261e, 0x2403}, -{0x2620, 0x5F0F}, -{0x2622, 0x831E}, -{0x2624, 0x23FD}, -{0x2626, 0xFC0F}, -{0x2628, 0x242F}, -{0x262a, 0x430F}, -{0x262c, 0x9D0F}, -{0x262e, 0x2C2C}, -{0x2630, 0x4B0E}, -{0x2632, 0x4E82}, -{0x2634, 0x7600}, -{0x2636, 0x4882}, -{0x2638, 0x7602}, -{0x263a, 0x4C82}, -{0x263c, 0x7604}, -{0x263e, 0x0264}, -{0x2640, 0x0000}, -{0x2642, 0x0224}, -{0x2644, 0x0000}, -{0x2646, 0x0264}, -{0x2648, 0x0000}, -{0x264a, 0x0260}, -{0x264c, 0x0000}, -{0x264e, 0x0268}, -{0x2650, 0x0000}, -{0x2652, 0x0C18}, -{0x2654, 0x02E8}, -{0x2656, 0x0000}, -{0x2658, 0x0C30}, -{0x265a, 0x02A8}, -{0x265c, 0x0000}, -{0x265e, 0x0C30}, -{0x2660, 0x0C30}, -{0x2662, 0x0C30}, -{0x2664, 0x0C30}, -{0x2666, 0x0C30}, -{0x2668, 0x0C30}, -{0x266a, 0x0C30}, -{0x266c, 0x0C30}, -{0x266e, 0x0C00}, -{0x2670, 0x02E8}, -{0x2672, 0x0000}, -{0x2674, 0x0C30}, -{0x2676, 0x0268}, -{0x2678, 0x0000}, -{0x267a, 0x0C18}, -{0x267c, 0x0260}, -{0x267e, 0x0000}, -{0x2680, 0x0C18}, -{0x2682, 0x531F}, -{0x2684, 0x9D0F}, -{0x2686, 0x2BD5}, -{0x2688, 0x5318}, -{0x268a, 0x9238}, -{0x268c, 0x2BC5}, -{0x268e, 0x0260}, -{0x2690, 0x0000}, -{0x2692, 0x5392}, -{0x2694, 0x80B8}, -{0x2696, 0x3F84}, -{0x2698, 0x432D}, -{0x269a, 0x3FBB}, -{0x269c, 0x903F}, -{0x269e, 0x0201}, -{0x26a0, 0x237F}, -{0x26a2, 0x5392}, -{0x26a4, 0x80B8}, -{0x26a6, 0x421F}, -{0x26a8, 0x80B8}, -{0x26aa, 0x12B0}, -{0x26ac, 0xFE38}, -{0x26ae, 0x3F78}, -{0x26b0, 0x931F}, -{0x26b2, 0x2376}, -{0x26b4, 0x12B0}, -{0x26b6, 0xFE26}, -{0x26b8, 0x4292}, -{0x26ba, 0x018A}, -{0x26bc, 0x80B8}, -{0x26be, 0x3FF3}, -{0x26c0, 0x4382}, -{0x26c2, 0x0B88}, -{0x26c4, 0x0C0A}, -{0x26c6, 0x4382}, -{0x26c8, 0x0B8A}, -{0x26ca, 0x0C0A}, -{0x26cc, 0x40B2}, -{0x26ce, 0x000C}, -{0x26d0, 0x0B8C}, -{0x26d2, 0x0C0A}, -{0x26d4, 0x40B2}, -{0x26d6, 0xB5E1}, -{0x26d8, 0x0B8E}, -{0x26da, 0x0C0A}, -{0x26dc, 0x40B2}, -{0x26de, 0x641C}, -{0x26e0, 0x0B92}, -{0x26e2, 0x0C0A}, -{0x26e4, 0x43C2}, -{0x26e6, 0x003D}, -{0x26e8, 0x4030}, -{0x26ea, 0xF02C}, -{0x26ec, 0x5231}, -{0x26ee, 0x4030}, -{0x26f0, 0xFE54}, -{0x26f2, 0xE3B2}, -{0x26f4, 0x740E}, -{0x26f6, 0x425F}, -{0x26f8, 0x0118}, -{0x26fa, 0xF37F}, -{0x26fc, 0x4F82}, -{0x26fe, 0x809A}, -{0x2700, 0x930F}, -{0x2702, 0x2005}, -{0x2704, 0x93C2}, -{0x2706, 0x0A82}, -{0x2708, 0x2402}, -{0x270a, 0x4392}, -{0x270c, 0x80D0}, -{0x270e, 0x9382}, -{0x2710, 0x809A}, -{0x2712, 0x2002}, -{0x2714, 0x4392}, -{0x2716, 0x8070}, -{0x2718, 0x421F}, -{0x271a, 0x710E}, -{0x271c, 0x93A2}, -{0x271e, 0x7110}, -{0x2720, 0x2411}, -{0x2722, 0x9382}, -{0x2724, 0x710E}, -{0x2726, 0x240C}, -{0x2728, 0x5292}, -{0x272a, 0x80A0}, -{0x272c, 0x7110}, -{0x272e, 0x4382}, -{0x2730, 0x740E}, -{0x2732, 0x9382}, -{0x2734, 0x80BA}, -{0x2736, 0x2402}, -{0x2738, 0x4392}, -{0x273a, 0x740E}, -{0x273c, 0x4392}, -{0x273e, 0x80BC}, -{0x2740, 0x430F}, -{0x2742, 0x4130}, -{0x2744, 0xF31F}, -{0x2746, 0x27ED}, -{0x2748, 0x40B2}, -{0x274a, 0x0003}, -{0x274c, 0x7110}, -{0x274e, 0x431F}, -{0x2750, 0x4130}, -{0x2752, 0x4F0E}, -{0x2754, 0x421D}, -{0x2756, 0x8070}, -{0x2758, 0x425F}, -{0x275a, 0x0118}, -{0x275c, 0xF37F}, -{0x275e, 0x903E}, -{0x2760, 0x0003}, -{0x2762, 0x2405}, -{0x2764, 0x931E}, -{0x2766, 0x2403}, -{0x2768, 0x0B00}, -{0x276a, 0x7302}, -{0x276c, 0x0384}, -{0x276e, 0x930F}, -{0x2770, 0x241A}, -{0x2772, 0x930D}, -{0x2774, 0x2018}, -{0x2776, 0x9382}, -{0x2778, 0x7308}, -{0x277a, 0x2402}, -{0x277c, 0x930E}, -{0x277e, 0x2419}, -{0x2780, 0x9382}, -{0x2782, 0x7328}, -{0x2784, 0x2402}, -{0x2786, 0x931E}, -{0x2788, 0x2414}, -{0x278a, 0x9382}, -{0x278c, 0x710E}, -{0x278e, 0x2402}, -{0x2790, 0x932E}, -{0x2792, 0x240F}, -{0x2794, 0x9382}, -{0x2796, 0x7114}, -{0x2798, 0x2402}, -{0x279a, 0x922E}, -{0x279c, 0x240A}, -{0x279e, 0x903E}, -{0x27a0, 0x0003}, -{0x27a2, 0x23DA}, -{0x27a4, 0x3C06}, -{0x27a6, 0x43C2}, -{0x27a8, 0x0A80}, -{0x27aa, 0x0B00}, -{0x27ac, 0x7302}, -{0x27ae, 0xFFF0}, -{0x27b0, 0x3FD3}, -{0x27b2, 0x4F82}, -{0x27b4, 0x809A}, -{0x27b6, 0x431F}, -{0x27b8, 0x4130}, -{0x27ba, 0x120B}, -{0x27bc, 0x120A}, -{0x27be, 0x1209}, -{0x27c0, 0x1208}, -{0x27c2, 0x1207}, -{0x27c4, 0x1206}, -{0x27c6, 0x1205}, -{0x27c8, 0x1204}, -{0x27ca, 0x8221}, -{0x27cc, 0x403B}, -{0x27ce, 0x0016}, -{0x27d0, 0x510B}, -{0x27d2, 0x4F08}, -{0x27d4, 0x4E09}, -{0x27d6, 0x4BA1}, -{0x27d8, 0x0000}, -{0x27da, 0x4B1A}, -{0x27dc, 0x0002}, -{0x27de, 0x4B91}, -{0x27e0, 0x0004}, -{0x27e2, 0x0002}, -{0x27e4, 0x4304}, -{0x27e6, 0x4305}, -{0x27e8, 0x4306}, -{0x27ea, 0x4307}, -{0x27ec, 0x9382}, -{0x27ee, 0x80B4}, -{0x27f0, 0x2425}, -{0x27f2, 0x438A}, -{0x27f4, 0x0000}, -{0x27f6, 0x430B}, -{0x27f8, 0x4B0F}, -{0x27fa, 0x5F0F}, -{0x27fc, 0x5F0F}, -{0x27fe, 0x580F}, -{0x2800, 0x4C8F}, -{0x2802, 0x0000}, -{0x2804, 0x4D8F}, -{0x2806, 0x0002}, -{0x2808, 0x4B0F}, -{0x280a, 0x5F0F}, -{0x280c, 0x590F}, -{0x280e, 0x41AF}, -{0x2810, 0x0000}, -{0x2812, 0x531B}, -{0x2814, 0x923B}, -{0x2816, 0x2BF0}, -{0x2818, 0x430B}, -{0x281a, 0x4B0F}, -{0x281c, 0x5F0F}, -{0x281e, 0x5F0F}, -{0x2820, 0x580F}, -{0x2822, 0x5F34}, -{0x2824, 0x6F35}, -{0x2826, 0x4B0F}, -{0x2828, 0x5F0F}, -{0x282a, 0x590F}, -{0x282c, 0x4F2E}, -{0x282e, 0x430F}, -{0x2830, 0x5E06}, -{0x2832, 0x6F07}, -{0x2834, 0x531B}, -{0x2836, 0x923B}, -{0x2838, 0x2BF0}, -{0x283a, 0x3C18}, -{0x283c, 0x4A2E}, -{0x283e, 0x4E0F}, -{0x2840, 0x5F0F}, -{0x2842, 0x5F0F}, -{0x2844, 0x580F}, -{0x2846, 0x4C8F}, -{0x2848, 0x0000}, -{0x284a, 0x4D8F}, -{0x284c, 0x0002}, -{0x284e, 0x5E0E}, -{0x2850, 0x590E}, -{0x2852, 0x41AE}, -{0x2854, 0x0000}, -{0x2856, 0x4A2F}, -{0x2858, 0x903F}, -{0x285a, 0x0007}, -{0x285c, 0x2404}, -{0x285e, 0x531F}, -{0x2860, 0x4F8A}, -{0x2862, 0x0000}, -{0x2864, 0x3FD9}, -{0x2866, 0x438A}, -{0x2868, 0x0000}, -{0x286a, 0x3FD6}, -{0x286c, 0x440C}, -{0x286e, 0x450D}, -{0x2870, 0x460A}, -{0x2872, 0x470B}, -{0x2874, 0x12B0}, -{0x2876, 0xFEAA}, -{0x2878, 0x4C08}, -{0x287a, 0x4D09}, -{0x287c, 0x4C0E}, -{0x287e, 0x430F}, -{0x2880, 0x4E0A}, -{0x2882, 0x4F0B}, -{0x2884, 0x460C}, -{0x2886, 0x470D}, -{0x2888, 0x12B0}, -{0x288a, 0xFE6E}, -{0x288c, 0x8E04}, -{0x288e, 0x7F05}, -{0x2890, 0x440E}, -{0x2892, 0x450F}, -{0x2894, 0xC312}, -{0x2896, 0x100F}, -{0x2898, 0x100E}, -{0x289a, 0x110F}, -{0x289c, 0x100E}, -{0x289e, 0x110F}, -{0x28a0, 0x100E}, -{0x28a2, 0x411D}, -{0x28a4, 0x0002}, -{0x28a6, 0x4E8D}, -{0x28a8, 0x0000}, -{0x28aa, 0x480F}, -{0x28ac, 0x5221}, -{0x28ae, 0x4134}, -{0x28b0, 0x4135}, -{0x28b2, 0x4136}, -{0x28b4, 0x4137}, -{0x28b6, 0x4138}, -{0x28b8, 0x4139}, -{0x28ba, 0x413A}, -{0x28bc, 0x413B}, -{0x28be, 0x4130}, -{0x28c0, 0x120A}, -{0x28c2, 0x4F0D}, -{0x28c4, 0x4E0C}, -{0x28c6, 0x425F}, -{0x28c8, 0x00BA}, -{0x28ca, 0x4F4A}, -{0x28cc, 0x503A}, -{0x28ce, 0x0010}, -{0x28d0, 0x931D}, -{0x28d2, 0x242B}, -{0x28d4, 0x932D}, -{0x28d6, 0x2421}, -{0x28d8, 0x903D}, -{0x28da, 0x0003}, -{0x28dc, 0x2418}, -{0x28de, 0x922D}, -{0x28e0, 0x2413}, -{0x28e2, 0x903D}, -{0x28e4, 0x0005}, -{0x28e6, 0x2407}, -{0x28e8, 0x903D}, -{0x28ea, 0x0006}, -{0x28ec, 0x2028}, -{0x28ee, 0xC312}, -{0x28f0, 0x100A}, -{0x28f2, 0x110A}, -{0x28f4, 0x3C24}, -{0x28f6, 0x4A0E}, -{0x28f8, 0xC312}, -{0x28fa, 0x100E}, -{0x28fc, 0x110E}, -{0x28fe, 0x4E0F}, -{0x2900, 0x110F}, -{0x2902, 0x4E0A}, -{0x2904, 0x5F0A}, -{0x2906, 0x3C1B}, -{0x2908, 0xC312}, -{0x290a, 0x100A}, -{0x290c, 0x3C18}, -{0x290e, 0x4A0E}, -{0x2910, 0xC312}, -{0x2912, 0x100E}, -{0x2914, 0x4E0F}, -{0x2916, 0x110F}, -{0x2918, 0x3FF3}, -{0x291a, 0x4A0F}, -{0x291c, 0xC312}, -{0x291e, 0x100F}, -{0x2920, 0x4F0E}, -{0x2922, 0x110E}, -{0x2924, 0x4F0A}, -{0x2926, 0x5E0A}, -{0x2928, 0x3C0A}, -{0x292a, 0x4A0F}, -{0x292c, 0xC312}, -{0x292e, 0x100F}, -{0x2930, 0x4F0E}, -{0x2932, 0x110E}, -{0x2934, 0x4F0A}, -{0x2936, 0x5E0A}, -{0x2938, 0x4E0F}, -{0x293a, 0x110F}, -{0x293c, 0x3FE3}, -{0x293e, 0x12B0}, -{0x2940, 0xFE58}, -{0x2942, 0x4E0F}, -{0x2944, 0xC312}, -{0x2946, 0x100F}, -{0x2948, 0x110F}, -{0x294a, 0x110F}, -{0x294c, 0x110F}, -{0x294e, 0x413A}, -{0x2950, 0x4130}, -{0x2952, 0x120B}, -{0x2954, 0x120A}, -{0x2956, 0x1209}, -{0x2958, 0x1208}, -{0x295a, 0x425F}, -{0x295c, 0x0080}, -{0x295e, 0xF36F}, -{0x2960, 0x4F0E}, -{0x2962, 0xF32E}, -{0x2964, 0x4E82}, -{0x2966, 0x80BA}, -{0x2968, 0xB3D2}, -{0x296a, 0x0786}, -{0x296c, 0x2402}, -{0x296e, 0x4392}, -{0x2970, 0x7002}, -{0x2972, 0x4392}, -{0x2974, 0x80BC}, -{0x2976, 0x4382}, -{0x2978, 0x740E}, -{0x297a, 0x9382}, -{0x297c, 0x80BA}, -{0x297e, 0x2402}, -{0x2980, 0x4392}, -{0x2982, 0x740E}, -{0x2984, 0x93C2}, -{0x2986, 0x00C6}, -{0x2988, 0x2406}, -{0x298a, 0xB392}, -{0x298c, 0x732A}, -{0x298e, 0x2403}, -{0x2990, 0xB3D2}, -{0x2992, 0x00C7}, -{0x2994, 0x2412}, -{0x2996, 0x4292}, -{0x2998, 0x01A8}, -{0x299a, 0x0688}, -{0x299c, 0x4292}, -{0x299e, 0x01AA}, -{0x29a0, 0x068A}, -{0x29a2, 0x4292}, -{0x29a4, 0x01AC}, -{0x29a6, 0x068C}, -{0x29a8, 0x4292}, -{0x29aa, 0x01AE}, -{0x29ac, 0x068E}, -{0x29ae, 0x4292}, -{0x29b0, 0x0190}, -{0x29b2, 0x0A92}, -{0x29b4, 0x4292}, -{0x29b6, 0x0192}, -{0x29b8, 0x0A94}, -{0x29ba, 0x430E}, -{0x29bc, 0x425F}, -{0x29be, 0x00C7}, -{0x29c0, 0xF35F}, -{0x29c2, 0xF37F}, -{0x29c4, 0xF21F}, -{0x29c6, 0x732A}, -{0x29c8, 0x200C}, -{0x29ca, 0xB3D2}, -{0x29cc, 0x00C7}, -{0x29ce, 0x2003}, -{0x29d0, 0xB392}, -{0x29d2, 0x80A2}, -{0x29d4, 0x2006}, -{0x29d6, 0xB3A2}, -{0x29d8, 0x732A}, -{0x29da, 0x2003}, -{0x29dc, 0x9382}, -{0x29de, 0x8096}, -{0x29e0, 0x2401}, -{0x29e2, 0x431E}, -{0x29e4, 0x4E82}, -{0x29e6, 0x80B4}, -{0x29e8, 0x930E}, -{0x29ea, 0x2002}, -{0x29ec, 0x4030}, -{0x29ee, 0xFDE4}, -{0x29f0, 0x4382}, -{0x29f2, 0x80BE}, -{0x29f4, 0x421F}, -{0x29f6, 0x732A}, -{0x29f8, 0xF31F}, -{0x29fa, 0x4F82}, -{0x29fc, 0x80A2}, -{0x29fe, 0x425F}, -{0x2a00, 0x008C}, -{0x2a02, 0x4FC2}, -{0x2a04, 0x8092}, -{0x2a06, 0x43C2}, -{0x2a08, 0x8093}, -{0x2a0a, 0x425F}, -{0x2a0c, 0x009E}, -{0x2a0e, 0x4F48}, -{0x2a10, 0x425F}, -{0x2a12, 0x009F}, -{0x2a14, 0xF37F}, -{0x2a16, 0x5F08}, -{0x2a18, 0x1108}, -{0x2a1a, 0x1108}, -{0x2a1c, 0x425F}, -{0x2a1e, 0x00B2}, -{0x2a20, 0x4F49}, -{0x2a22, 0x425F}, -{0x2a24, 0x00B3}, -{0x2a26, 0xF37F}, -{0x2a28, 0x5F09}, -{0x2a2a, 0x1109}, -{0x2a2c, 0x1109}, -{0x2a2e, 0x425F}, -{0x2a30, 0x00BA}, -{0x2a32, 0x4F4C}, -{0x2a34, 0x407A}, -{0x2a36, 0x001C}, -{0x2a38, 0x12B0}, -{0x2a3a, 0xFE8E}, -{0x2a3c, 0x934C}, -{0x2a3e, 0x25BE}, -{0x2a40, 0x403E}, -{0x2a42, 0x0080}, -{0x2a44, 0x4E0F}, -{0x2a46, 0xF37F}, -{0x2a48, 0x108F}, -{0x2a4a, 0xD03F}, -{0x2a4c, 0x008B}, -{0x2a4e, 0x4F82}, -{0x2a50, 0x0B88}, -{0x2a52, 0x0C0A}, -{0x2a54, 0x403C}, -{0x2a56, 0x0813}, -{0x2a58, 0x403D}, -{0x2a5a, 0x007F}, -{0x2a5c, 0x403F}, -{0x2a5e, 0x00BA}, -{0x2a60, 0x4F6E}, -{0x2a62, 0x90FF}, -{0x2a64, 0x0010}, -{0x2a66, 0x0000}, -{0x2a68, 0x2D13}, -{0x2a6a, 0x403C}, -{0x2a6c, 0x1005}, -{0x2a6e, 0x430D}, -{0x2a70, 0x425E}, -{0x2a72, 0x00BA}, -{0x2a74, 0x4E4F}, -{0x2a76, 0x108F}, -{0x2a78, 0xDD0F}, -{0x2a7a, 0x4F82}, -{0x2a7c, 0x0B90}, -{0x2a7e, 0x0C0A}, -{0x2a80, 0x4C82}, -{0x2a82, 0x0B8A}, -{0x2a84, 0x0C0A}, -{0x2a86, 0x425F}, -{0x2a88, 0x0C87}, -{0x2a8a, 0x4F4E}, -{0x2a8c, 0x425F}, -{0x2a8e, 0x0C88}, -{0x2a90, 0xF37F}, -{0x2a92, 0x12B0}, -{0x2a94, 0xF8C0}, -{0x2a96, 0x4F82}, -{0x2a98, 0x0C8C}, -{0x2a9a, 0x425F}, -{0x2a9c, 0x0C85}, -{0x2a9e, 0x4F4E}, -{0x2aa0, 0x425F}, -{0x2aa2, 0x0C89}, -{0x2aa4, 0xF37F}, -{0x2aa6, 0x12B0}, -{0x2aa8, 0xF8C0}, -{0x2aaa, 0x4F82}, -{0x2aac, 0x0C8A}, -{0x2aae, 0x425E}, -{0x2ab0, 0x00B7}, -{0x2ab2, 0x5E4E}, -{0x2ab4, 0x4EC2}, -{0x2ab6, 0x0CB0}, -{0x2ab8, 0x425F}, -{0x2aba, 0x00B8}, -{0x2abc, 0x5F4F}, -{0x2abe, 0x4FC2}, -{0x2ac0, 0x0CB1}, -{0x2ac2, 0x480E}, -{0x2ac4, 0x5E0E}, -{0x2ac6, 0x5E0E}, -{0x2ac8, 0x5E0E}, -{0x2aca, 0x5E0E}, -{0x2acc, 0x490F}, -{0x2ace, 0x5F0F}, -{0x2ad0, 0x5F0F}, -{0x2ad2, 0x5F0F}, -{0x2ad4, 0x5F0F}, -{0x2ad6, 0x5F0F}, -{0x2ad8, 0x5F0F}, -{0x2ada, 0x5F0F}, -{0x2adc, 0xDF0E}, -{0x2ade, 0x4E82}, -{0x2ae0, 0x0A8E}, -{0x2ae2, 0xB229}, -{0x2ae4, 0x2401}, -{0x2ae6, 0x5339}, -{0x2ae8, 0xB3E2}, -{0x2aea, 0x0080}, -{0x2aec, 0x2403}, -{0x2aee, 0x40F2}, -{0x2af0, 0x0003}, -{0x2af2, 0x00B5}, -{0x2af4, 0x40B2}, -{0x2af6, 0x1000}, -{0x2af8, 0x7500}, -{0x2afa, 0x40B2}, -{0x2afc, 0x1001}, -{0x2afe, 0x7502}, -{0x2b00, 0x40B2}, -{0x2b02, 0x0803}, -{0x2b04, 0x7504}, -{0x2b06, 0x40B2}, -{0x2b08, 0x080F}, -{0x2b0a, 0x7506}, -{0x2b0c, 0x40B2}, -{0x2b0e, 0x6003}, -{0x2b10, 0x7508}, -{0x2b12, 0x40B2}, -{0x2b14, 0x0801}, -{0x2b16, 0x750A}, -{0x2b18, 0x40B2}, -{0x2b1a, 0x0800}, -{0x2b1c, 0x750C}, -{0x2b1e, 0x40B2}, -{0x2b20, 0x1400}, -{0x2b22, 0x750E}, -{0x2b24, 0x403F}, -{0x2b26, 0x0003}, -{0x2b28, 0x12B0}, -{0x2b2a, 0xF752}, -{0x2b2c, 0x421F}, -{0x2b2e, 0x0098}, -{0x2b30, 0x821F}, -{0x2b32, 0x0092}, -{0x2b34, 0x531F}, -{0x2b36, 0xC312}, -{0x2b38, 0x100F}, -{0x2b3a, 0x4F82}, -{0x2b3c, 0x0A86}, -{0x2b3e, 0x421F}, -{0x2b40, 0x00AC}, -{0x2b42, 0x821F}, -{0x2b44, 0x00A6}, -{0x2b46, 0x531F}, -{0x2b48, 0x4F82}, -{0x2b4a, 0x0A88}, -{0x2b4c, 0xB0B2}, -{0x2b4e, 0x0010}, -{0x2b50, 0x0A84}, -{0x2b52, 0x248F}, -{0x2b54, 0x421E}, -{0x2b56, 0x068C}, -{0x2b58, 0xC312}, -{0x2b5a, 0x100E}, -{0x2b5c, 0x4E82}, -{0x2b5e, 0x0782}, -{0x2b60, 0x4292}, -{0x2b62, 0x068E}, -{0x2b64, 0x0784}, -{0x2b66, 0xB3D2}, -{0x2b68, 0x0CB6}, -{0x2b6a, 0x2418}, -{0x2b6c, 0x421A}, -{0x2b6e, 0x0CB8}, -{0x2b70, 0x430B}, -{0x2b72, 0x425F}, -{0x2b74, 0x0CBA}, -{0x2b76, 0x4F4E}, -{0x2b78, 0x430F}, -{0x2b7a, 0x4E0F}, -{0x2b7c, 0x430E}, -{0x2b7e, 0xDE0A}, -{0x2b80, 0xDF0B}, -{0x2b82, 0x421F}, -{0x2b84, 0x0CBC}, -{0x2b86, 0x4F0C}, -{0x2b88, 0x430D}, -{0x2b8a, 0x421F}, -{0x2b8c, 0x0CBE}, -{0x2b8e, 0x430E}, -{0x2b90, 0xDE0C}, -{0x2b92, 0xDF0D}, -{0x2b94, 0x12B0}, -{0x2b96, 0xFEAA}, -{0x2b98, 0x4C82}, -{0x2b9a, 0x0194}, -{0x2b9c, 0xB2A2}, -{0x2b9e, 0x0A84}, -{0x2ba0, 0x2412}, -{0x2ba2, 0x421E}, -{0x2ba4, 0x0A96}, -{0x2ba6, 0xC312}, -{0x2ba8, 0x100E}, -{0x2baa, 0x110E}, -{0x2bac, 0x110E}, -{0x2bae, 0x43C2}, -{0x2bb0, 0x0A98}, -{0x2bb2, 0x431D}, -{0x2bb4, 0x4E0F}, -{0x2bb6, 0x9F82}, -{0x2bb8, 0x0194}, -{0x2bba, 0x2850}, -{0x2bbc, 0x5E0F}, -{0x2bbe, 0x531D}, -{0x2bc0, 0x903D}, -{0x2bc2, 0x0009}, -{0x2bc4, 0x2BF8}, -{0x2bc6, 0x4292}, -{0x2bc8, 0x0084}, -{0x2bca, 0x7524}, -{0x2bcc, 0x4292}, -{0x2bce, 0x0088}, -{0x2bd0, 0x7316}, -{0x2bd2, 0x9382}, -{0x2bd4, 0x8092}, -{0x2bd6, 0x2403}, -{0x2bd8, 0x4292}, -{0x2bda, 0x008A}, -{0x2bdc, 0x7316}, -{0x2bde, 0x430E}, -{0x2be0, 0x421F}, -{0x2be2, 0x0086}, -{0x2be4, 0x822F}, -{0x2be6, 0x9F82}, -{0x2be8, 0x0084}, -{0x2bea, 0x2801}, -{0x2bec, 0x431E}, -{0x2bee, 0x4292}, -{0x2bf0, 0x0086}, -{0x2bf2, 0x7314}, -{0x2bf4, 0x93C2}, -{0x2bf6, 0x00BC}, -{0x2bf8, 0x2007}, -{0x2bfa, 0xB31E}, -{0x2bfc, 0x2405}, -{0x2bfe, 0x421F}, -{0x2c00, 0x0084}, -{0x2c02, 0x522F}, -{0x2c04, 0x4F82}, -{0x2c06, 0x7314}, -{0x2c08, 0x425F}, -{0x2c0a, 0x00BC}, -{0x2c0c, 0xF37F}, -{0x2c0e, 0xFE0F}, -{0x2c10, 0x2406}, -{0x2c12, 0x421E}, -{0x2c14, 0x0086}, -{0x2c16, 0x503E}, -{0x2c18, 0xFFFB}, -{0x2c1a, 0x4E82}, -{0x2c1c, 0x7524}, -{0x2c1e, 0x430E}, -{0x2c20, 0x421F}, -{0x2c22, 0x7524}, -{0x2c24, 0x9F82}, -{0x2c26, 0x809C}, -{0x2c28, 0x2C07}, -{0x2c2a, 0x9382}, -{0x2c2c, 0x8096}, -{0x2c2e, 0x2004}, -{0x2c30, 0x9382}, -{0x2c32, 0x8098}, -{0x2c34, 0x2001}, -{0x2c36, 0x431E}, -{0x2c38, 0x40B2}, -{0x2c3a, 0x0032}, -{0x2c3c, 0x7522}, -{0x2c3e, 0x4292}, -{0x2c40, 0x7524}, -{0x2c42, 0x809C}, -{0x2c44, 0x930E}, -{0x2c46, 0x24E6}, -{0x2c48, 0x421F}, -{0x2c4a, 0x7316}, -{0x2c4c, 0xC312}, -{0x2c4e, 0x100F}, -{0x2c50, 0x832F}, -{0x2c52, 0x4F82}, -{0x2c54, 0x7522}, -{0x2c56, 0x53B2}, -{0x2c58, 0x7524}, -{0x2c5a, 0x3CDC}, -{0x2c5c, 0x431F}, -{0x2c5e, 0x4D0E}, -{0x2c60, 0x533E}, -{0x2c62, 0x930E}, -{0x2c64, 0x2403}, -{0x2c66, 0x5F0F}, -{0x2c68, 0x831E}, -{0x2c6a, 0x23FD}, -{0x2c6c, 0x4FC2}, -{0x2c6e, 0x0A98}, -{0x2c70, 0x3FAA}, -{0x2c72, 0x4292}, -{0x2c74, 0x0A86}, -{0x2c76, 0x0782}, -{0x2c78, 0x421F}, -{0x2c7a, 0x0A88}, -{0x2c7c, 0x490E}, -{0x2c7e, 0x930E}, -{0x2c80, 0x2404}, -{0x2c82, 0xC312}, -{0x2c84, 0x100F}, -{0x2c86, 0x831E}, -{0x2c88, 0x23FC}, -{0x2c8a, 0x4F82}, -{0x2c8c, 0x0784}, -{0x2c8e, 0x3F6B}, -{0x2c90, 0x90F2}, -{0x2c92, 0x0010}, -{0x2c94, 0x00BA}, -{0x2c96, 0x2809}, -{0x2c98, 0x90F2}, -{0x2c9a, 0x0031}, -{0x2c9c, 0x00BA}, -{0x2c9e, 0x2C05}, -{0x2ca0, 0x403C}, -{0x2ca2, 0x0E05}, -{0x2ca4, 0x403D}, -{0x2ca6, 0x003C}, -{0x2ca8, 0x3EE3}, -{0x2caa, 0x90F2}, -{0x2cac, 0x0031}, -{0x2cae, 0x00BA}, -{0x2cb0, 0x280D}, -{0x2cb2, 0x90F2}, -{0x2cb4, 0x0039}, -{0x2cb6, 0x00BA}, -{0x2cb8, 0x2C09}, -{0x2cba, 0x403C}, -{0x2cbc, 0x0E09}, -{0x2cbe, 0x403D}, -{0x2cc0, 0x003C}, -{0x2cc2, 0x425E}, -{0x2cc4, 0x00BA}, -{0x2cc6, 0x507E}, -{0x2cc8, 0x0003}, -{0x2cca, 0x3ED4}, -{0x2ccc, 0x90F2}, -{0x2cce, 0x0039}, -{0x2cd0, 0x00BA}, -{0x2cd2, 0x280D}, -{0x2cd4, 0x90F2}, -{0x2cd6, 0x0041}, -{0x2cd8, 0x00BA}, -{0x2cda, 0x2C09}, -{0x2cdc, 0x403C}, -{0x2cde, 0x0C0B}, -{0x2ce0, 0x403D}, -{0x2ce2, 0x003C}, -{0x2ce4, 0x425E}, -{0x2ce6, 0x00BA}, -{0x2ce8, 0x507E}, -{0x2cea, 0x0005}, -{0x2cec, 0x3EC3}, -{0x2cee, 0x90F2}, -{0x2cf0, 0x0041}, -{0x2cf2, 0x00BA}, -{0x2cf4, 0x280D}, -{0x2cf6, 0x90F2}, -{0x2cf8, 0x0051}, -{0x2cfa, 0x00BA}, -{0x2cfc, 0x2C09}, -{0x2cfe, 0x403C}, -{0x2d00, 0x0A0F}, -{0x2d02, 0x403D}, -{0x2d04, 0x003C}, -{0x2d06, 0x425E}, -{0x2d08, 0x00BA}, -{0x2d0a, 0x507E}, -{0x2d0c, 0x0009}, -{0x2d0e, 0x3EB2}, -{0x2d10, 0x90F2}, -{0x2d12, 0x0051}, -{0x2d14, 0x00BA}, -{0x2d16, 0x280D}, -{0x2d18, 0x90F2}, -{0x2d1a, 0x0061}, -{0x2d1c, 0x00BA}, -{0x2d1e, 0x2C09}, -{0x2d20, 0x403C}, -{0x2d22, 0x0A11}, -{0x2d24, 0x403D}, -{0x2d26, 0x003C}, -{0x2d28, 0x425E}, -{0x2d2a, 0x00BA}, -{0x2d2c, 0x507E}, -{0x2d2e, 0x000B}, -{0x2d30, 0x3EA1}, -{0x2d32, 0x90F2}, -{0x2d34, 0x0061}, -{0x2d36, 0x00BA}, -{0x2d38, 0x2807}, -{0x2d3a, 0x90F2}, -{0x2d3c, 0x0075}, -{0x2d3e, 0x00BA}, -{0x2d40, 0x2C03}, -{0x2d42, 0x403C}, -{0x2d44, 0x0813}, -{0x2d46, 0x3FF0}, -{0x2d48, 0x90F2}, -{0x2d4a, 0x0075}, -{0x2d4c, 0x00BA}, -{0x2d4e, 0x280B}, -{0x2d50, 0x90F2}, -{0x2d52, 0xFF91}, -{0x2d54, 0x00BA}, -{0x2d56, 0x2C07}, -{0x2d58, 0x403C}, -{0x2d5a, 0x0813}, -{0x2d5c, 0x425E}, -{0x2d5e, 0x00BA}, -{0x2d60, 0x507E}, -{0x2d62, 0x000C}, -{0x2d64, 0x3E87}, -{0x2d66, 0x90F2}, -{0x2d68, 0xFF91}, -{0x2d6a, 0x00BA}, -{0x2d6c, 0x280B}, -{0x2d6e, 0x90F2}, -{0x2d70, 0xFFB1}, -{0x2d72, 0x00BA}, -{0x2d74, 0x2C07}, -{0x2d76, 0x403D}, -{0x2d78, 0x0060}, -{0x2d7a, 0x425E}, -{0x2d7c, 0x00BA}, -{0x2d7e, 0x507E}, -{0x2d80, 0x000D}, -{0x2d82, 0x3E78}, -{0x2d84, 0x90F2}, -{0x2d86, 0xFFB1}, -{0x2d88, 0x00BA}, -{0x2d8a, 0x280B}, -{0x2d8c, 0x90F2}, -{0x2d8e, 0xFFD1}, -{0x2d90, 0x00BA}, -{0x2d92, 0x2C07}, -{0x2d94, 0x403D}, -{0x2d96, 0x0050}, -{0x2d98, 0x425E}, -{0x2d9a, 0x00BA}, -{0x2d9c, 0x507E}, -{0x2d9e, 0x000E}, -{0x2da0, 0x3E69}, -{0x2da2, 0x403D}, -{0x2da4, 0x003C}, -{0x2da6, 0x403F}, -{0x2da8, 0x00BA}, -{0x2daa, 0x4F6E}, -{0x2dac, 0x507E}, -{0x2dae, 0x000F}, -{0x2db0, 0x90FF}, -{0x2db2, 0xFFF1}, -{0x2db4, 0x0000}, -{0x2db6, 0x2A5E}, -{0x2db8, 0x437E}, -{0x2dba, 0x3E5C}, -{0x2dbc, 0x425F}, -{0x2dbe, 0x00BA}, -{0x2dc0, 0x4F4C}, -{0x2dc2, 0x407A}, -{0x2dc4, 0x001C}, -{0x2dc6, 0x12B0}, -{0x2dc8, 0xFE8E}, -{0x2dca, 0x4E4F}, -{0x2dcc, 0xC312}, -{0x2dce, 0x104F}, -{0x2dd0, 0x114F}, -{0x2dd2, 0xF37F}, -{0x2dd4, 0x5F0F}, -{0x2dd6, 0x5F0F}, -{0x2dd8, 0x5F0F}, -{0x2dda, 0x5F0F}, -{0x2ddc, 0x403E}, -{0x2dde, 0x00F0}, -{0x2de0, 0x8F0E}, -{0x2de2, 0x3E30}, -{0x2de4, 0x421F}, -{0x2de6, 0x80BE}, -{0x2de8, 0x903F}, -{0x2dea, 0x0009}, -{0x2dec, 0x2C05}, -{0x2dee, 0x531F}, -{0x2df0, 0x4F82}, -{0x2df2, 0x80BE}, -{0x2df4, 0x4030}, -{0x2df6, 0xF9F4}, -{0x2df8, 0x421F}, -{0x2dfa, 0x80B6}, -{0x2dfc, 0x903F}, -{0x2dfe, 0x0098}, -{0x2e00, 0x2C05}, -{0x2e02, 0x531F}, -{0x2e04, 0x4F82}, -{0x2e06, 0x80B6}, -{0x2e08, 0x4030}, -{0x2e0a, 0xF9F4}, -{0x2e0c, 0x4382}, -{0x2e0e, 0x80B6}, -{0x2e10, 0x4030}, -{0x2e12, 0xF9F4}, -{0x2e14, 0x4E82}, -{0x2e16, 0x8098}, -{0x2e18, 0xD392}, -{0x2e1a, 0x7102}, -{0x2e1c, 0x4138}, -{0x2e1e, 0x4139}, -{0x2e20, 0x413A}, -{0x2e22, 0x413B}, -{0x2e24, 0x4130}, -{0x2e26, 0x0260}, -{0x2e28, 0x0000}, -{0x2e2a, 0x0C18}, -{0x2e2c, 0x0240}, -{0x2e2e, 0x0000}, -{0x2e30, 0x0260}, -{0x2e32, 0x0000}, -{0x2e34, 0x0C05}, -{0x2e36, 0x4130}, -{0x2e38, 0x4382}, -{0x2e3a, 0x7602}, -{0x2e3c, 0x4F82}, -{0x2e3e, 0x7600}, -{0x2e40, 0x0270}, -{0x2e42, 0x0000}, -{0x2e44, 0x0C07}, -{0x2e46, 0x0270}, -{0x2e48, 0x0001}, -{0x2e4a, 0x421F}, -{0x2e4c, 0x7606}, -{0x2e4e, 0x4FC2}, -{0x2e50, 0x0188}, -{0x2e52, 0x4130}, -{0x2e54, 0xDF02}, -{0x2e56, 0x3FFE}, -{0x2e58, 0x430E}, -{0x2e5a, 0x930A}, -{0x2e5c, 0x2407}, -{0x2e5e, 0xC312}, -{0x2e60, 0x100C}, -{0x2e62, 0x2801}, -{0x2e64, 0x5A0E}, -{0x2e66, 0x5A0A}, -{0x2e68, 0x930C}, -{0x2e6a, 0x23F7}, -{0x2e6c, 0x4130}, -{0x2e6e, 0x430E}, -{0x2e70, 0x430F}, -{0x2e72, 0x3C08}, -{0x2e74, 0xC312}, -{0x2e76, 0x100D}, -{0x2e78, 0x100C}, -{0x2e7a, 0x2802}, -{0x2e7c, 0x5A0E}, -{0x2e7e, 0x6B0F}, -{0x2e80, 0x5A0A}, -{0x2e82, 0x6B0B}, -{0x2e84, 0x930C}, -{0x2e86, 0x23F6}, -{0x2e88, 0x930D}, -{0x2e8a, 0x23F4}, -{0x2e8c, 0x4130}, -{0x2e8e, 0xEE4E}, -{0x2e90, 0x407B}, -{0x2e92, 0x0009}, -{0x2e94, 0x3C05}, -{0x2e96, 0x100D}, -{0x2e98, 0x6E4E}, -{0x2e9a, 0x9A4E}, -{0x2e9c, 0x2801}, -{0x2e9e, 0x8A4E}, -{0x2ea0, 0x6C4C}, -{0x2ea2, 0x6D0D}, -{0x2ea4, 0x835B}, -{0x2ea6, 0x23F7}, -{0x2ea8, 0x4130}, -{0x2eaa, 0xEF0F}, -{0x2eac, 0xEE0E}, -{0x2eae, 0x4039}, -{0x2eb0, 0x0021}, -{0x2eb2, 0x3C0A}, -{0x2eb4, 0x1008}, -{0x2eb6, 0x6E0E}, -{0x2eb8, 0x6F0F}, -{0x2eba, 0x9B0F}, -{0x2ebc, 0x2805}, -{0x2ebe, 0x2002}, -{0x2ec0, 0x9A0E}, -{0x2ec2, 0x2802}, -{0x2ec4, 0x8A0E}, -{0x2ec6, 0x7B0F}, -{0x2ec8, 0x6C0C}, -{0x2eca, 0x6D0D}, -{0x2ecc, 0x6808}, -{0x2ece, 0x8319}, -{0x2ed0, 0x23F1}, -{0x2ed2, 0x4130}, -{0x2ed4, 0x0000}, -{0x2ffe, 0xf000}, -{0x3000, 0x00AE}, -{0x3002, 0x00AE}, -{0x3004, 0x00AE}, -{0x3006, 0x00AE}, -{0x3008, 0x00AE}, -{0x4000, 0x0400}, -{0x4002, 0x0400}, -{0x4004, 0x0C04}, -{0x4006, 0x0C04}, -{0x4008, 0x0C04}, - -//--- FW End ---// - - -//--- Initial Set file ---// -{0x0B02, 0x0014}, -{0x0B04, 0x07C8}, -{0x0B06, 0x5ED7}, -{0x0B14, 0x430F}, //PLL Main Div[15:8]. Mclk 26.022Mhz / 0x430F = Pclk(87.174Mhz) -{0x0B16, 0x4A0B}, -{0x0B18, 0x0000}, -{0x0B1A, 0x1044}, - -{0x004C, 0x0100}, //tg_enable. -{0x000C, 0x0000}, -{0x0036, 0x0048}, //ramp_rst_offset -{0x0038, 0x4800}, //ramp_sig_poffset -{0x0138, 0x0104}, //pxl_drv_pwr -{0x013A, 0x0100}, //tx_idle -{0x0C00, 0x3BC7}, //BLC_ctl1. Line BLC on = 0x3b, off = 0x2A //LBLC_ctl1. [0]en_blc, [1]en_lblc_dpc, [2]en_channel_blc, [3]en_adj_pxl_dpc, [4]en_adp_dead_pxl_th -{0x0C0E, 0x0500}, //0x07 BLC display On, 0x05 BLC D off //BLC_ctl3. Frame BLC On = 0x05, off=0x04 //FBLC_ctl3. [0]en_fblc, [1]en_blc_bypass, [2]en_fblc_dpc, [5]en_fobp_dig_offset, [7]en_lobp_dpc_bypass -{0x0C10, 0x0510}, //dig_blc_offset_h -{0x0C16, 0x0000}, //fobp_dig_b_offset. red b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C18, 0x0000}, //fobp_dig_Gb_offset. Gr b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C36, 0x0100}, //r_g_sum_ctl. [0]:g_sum_en. '1'enable, '0'disable. - -//--- MIPI blank time --------------// -{0x0902, 0x4101}, //mipi_value_clk_trail. MIPI CLK mode [1]'1'cont(0x43),'0'non-cont(0x41) [6]'1'2lane(0x41), '0'1lane(0x01) -{0x090A, 0x03E4}, //mipi_vblank_delay_h. -{0x090C, 0x0020}, //mipi_hblank_short_delay_h. -{0x090E, 0x0020}, //mipi_hblank_long_delay_h. -{0x0910, 0x5D07}, //05 mipi_LPX -{0x0912, 0x061e}, //05 mipi_CLK_prepare -{0x0914, 0x0407}, //02 mipi_clk_pre -{0x0916, 0x0d0a}, //09 mipi_data_zero -{0x0918, 0x0e09}, //0c mipi_clk_post - -//--- Pixel Array Addressing ------// -{0x000E, 0x0000}, -{0x0014, 0x003F}, -{0x0010, 0x0050}, -{0x0016, 0x008F}, -{0x0012, 0x00AA}, -{0x0018, 0x0ACD}, -{0x0020, 0x0700}, -{0x0022, 0x0004}, -{0x0028, 0x000B}, -{0x0024, 0xFFFA}, -{0x002A, 0xFFFF}, -{0x0026, 0x0016}, -{0x002C, 0x07b1}, -{0x0034, 0x0700}, - -{0x0128, 0x0002}, // digital_crop_x_offset_l -{0x012A, 0x0000}, // digital_crop_y_offset_l -{0x012C, 0x0A20}, //2C}, //2592 digital_crop_image_width -{0x012E, 0x0798}, //A4}, //1944 digital_crop_image_height - -//----< Image FMT Size >--------------------// -//Image size 2592x1944 -{0x0110, 0x0A20}, //X_output_size_h -{0x0112, 0x0798}, //Y_output_size_h - -//----< Frame / Line Length >--------------// -{0x0006, 0x07c0}, //frame_length_h 1984 -{0x0008, 0x0B40}, //line_length_h 2880 -{0x000A, 0x0DB0}, -//---------------------------------------// -//--- ETC set ----// -{0x003C, 0x0000}, //fixed frame off. b[0] '1'enable, '0'disable -{0x0500, 0x0000}, //DGA_ctl. b[1]'0'OTP_color_ratio_disable, '1' OTP_color_ratio_enable, b[2]'0'data_pedestal_en, '1'data_pedestal_dis. -{0x0700, 0x0590}, //Scaler Normal -{0x001E, 0x0101}, -{0x0032, 0x0101}, -{0x0A02, 0x0100}, // Fast sleep Enable -{0x0C12, 0x0100}, // BLC Offset -{0x0116, 0x0024}, // FBLC Ratio -//----------------// - -//--- AG / DG control ----------------// -//AG -{0x003A, 0x0000}, //Analog Gain. 0x00=x1, 0x70=x8, 0xf0=x16. - -//DG -{0x0508, 0x0100}, //DG_Gr_h. 0x01=x1, 0x07=x8. -{0x050a, 0x0100}, //DG_Gb_h. 0x01=x1, 0x07=x8. -{0x050c, 0x0100}, //DG_R_h. 0x01=x1, 0x07=x8. -{0x050e, 0x0100}, //DG_B_h. 0x01=x1, 0x07=x8. -//----------------------------------// - -//-----< Exp.Time >------------------------// -// Pclk_88Mhz @ Line_length_pclk : 2880 @Exp.Time 33.33ms -{0x0002, 0x0539}, //Fine_int : 33.33ms@Pclk88mhz@Line_length2880 -{0x0004, 0x07E0}, //coarse_int : 33.33ms@Pclk88mhz@Line_length2880 - -//--- ISP enable Selection ---------------// -{0x0A04, 0x011A}, //isp_en. [9]s-gamma,[8]MIPI_en,[6]compresion10to8,[5]Scaler,[4]window,[3]DG,[2]LSC,[1]adpc,[0]tpg -//----------------------------------------// - -{0x0118, 0x0100}, //sleep Off -}; - -struct msm_camera_i2c_reg_setting sr544_init = { - sr544_init_reg, sizeof(sr544_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0118, 0x00, NULL, 100}, //sleep On - {0x0F02, 0x00, NULL, 0}, - {0x011A, 0x01, NULL, 0}, - {0x011B, 0x09, NULL, 0}, - {0x0D04, 0x01, NULL, 0}, - {0x0D00, 0x07, NULL, 0}, - {0x004C, 0x01, NULL, 0}, - {0x003E, 0x01, NULL, 0}, - {0x0118, 0x01, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/Makefile deleted file mode 100644 index 2bb2ccad6ba3..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_led_flash.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_i2c_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += adp1660.o -obj-$(CONFIG_MSMB_CAMERA) += bd7710.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_torch.o -obj-$(CONFIG_MSMB_CAMERA) += lm3642.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/adp1660.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/adp1660.c deleted file mode 100644 index 2fa4cbde8f40..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/adp1660.c +++ /dev/null @@ -1,221 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "qcom,led-flash" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver adp1660_i2c_driver; - -static struct msm_camera_i2c_reg_array adp1660_init_array[] = { - {0x01, 0x03}, - {0x02, 0x0F}, - {0x09, 0x28}, -}; - -static struct msm_camera_i2c_reg_array adp1660_off_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_release_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_low_array[] = { - {0x08, 0x04}, - {0x06, 0x28}, - {0x01, 0xBD}, - {0x0f, 0x01}, -}; - -static struct msm_camera_i2c_reg_array adp1660_high_array[] = { - {0x02, 0x4F}, - {0x06, 0x3C}, - {0x09, 0x3C}, - {0x0f, 0x01}, - {0x01, 0xBB}, -}; - -static void __exit msm_flash_adp1660_i2c_remove(void) -{ - i2c_del_driver(&adp1660_i2c_driver); - return; -} - -static const struct of_device_id adp1660_trigger_dt_match[] = { - {.compatible = "qcom,led-flash", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, adp1660_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"qcom,led-flash", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id adp1660_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_adp1660_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_adp1660_i2c_probe: id is NULL"); - id = adp1660_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver adp1660_i2c_driver = { - .id_table = adp1660_i2c_id, - .probe = msm_flash_adp1660_i2c_probe, - .remove = __exit_p(msm_flash_adp1660_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int msm_flash_adp1660_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - match = of_match_device(adp1660_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver adp1660_platform_driver = { - .probe = msm_flash_adp1660_platform_probe, - .driver = { - .name = "qcom,led-flash", - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int __init msm_flash_adp1660_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_register(&adp1660_platform_driver); - if (fctrl.pdev != NULL && rc == 0) { - pr_err("adp1660 platform_driver_register success"); - return rc; - } else if (rc != 0) { - pr_err("adp1660 platform_driver_register failed"); - return rc; - } else { - rc = i2c_add_driver(&adp1660_i2c_driver); - if (!rc) - pr_err("adp1660 i2c_add_driver success"); - } - return rc; -} - -static void __exit msm_flash_adp1660_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&adp1660_platform_driver); - else - i2c_del_driver(&adp1660_i2c_driver); -} - -static struct msm_camera_i2c_client adp1660_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting adp1660_init_setting = { - .reg_setting = adp1660_init_array, - .size = ARRAY_SIZE(adp1660_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_off_setting = { - .reg_setting = adp1660_off_array, - .size = ARRAY_SIZE(adp1660_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_release_setting = { - .reg_setting = adp1660_release_array, - .size = ARRAY_SIZE(adp1660_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_low_setting = { - .reg_setting = adp1660_low_array, - .size = ARRAY_SIZE(adp1660_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_high_setting = { - .reg_setting = adp1660_high_array, - .size = ARRAY_SIZE(adp1660_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t adp1660_regs = { - .init_setting = &adp1660_init_setting, - .off_setting = &adp1660_off_setting, - .low_setting = &adp1660_low_setting, - .high_setting = &adp1660_high_setting, - .release_setting = &adp1660_release_setting, -}; - -static struct msm_flash_fn_t adp1660_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &adp1660_i2c_client, - .reg_setting = &adp1660_regs, - .func_tbl = &adp1660_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_adp1660_init_module); -module_exit(msm_flash_adp1660_exit_module); -MODULE_DESCRIPTION("adp1660 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/bd7710.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/bd7710.c deleted file mode 100644 index 4e18537f9bf7..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/bd7710.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "rohm-flash,bd7710" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver bd7710_i2c_driver; - -static struct msm_camera_i2c_reg_array bd7710_init_array[] = { - {0x00, 0x10}, -}; - -static struct msm_camera_i2c_reg_array bd7710_off_array[] = { - {0x05, 0x00}, - {0x02, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_release_array[] = { - {0x00, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_low_array[] = { - {0x05, 0x25}, - {0x00, 0x38}, - {0x02, 0x40}, -}; - -static struct msm_camera_i2c_reg_array bd7710_high_array[] = { - {0x05, 0x25}, - {0x02, 0xBF}, -}; - -static void __exit msm_flash_bd7710_i2c_remove(void) -{ - i2c_del_driver(&bd7710_i2c_driver); - return; -} - -static const struct of_device_id bd7710_trigger_dt_match[] = { - {.compatible = "rohm-flash,bd7710", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, bd7710_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"rohm-flash,bd7710", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id bd7710_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_bd7710_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_bd7710_i2c_probe: id is NULL"); - id = bd7710_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver bd7710_i2c_driver = { - .id_table = bd7710_i2c_id, - .probe = msm_flash_bd7710_i2c_probe, - .remove = __exit_p(msm_flash_bd7710_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int msm_flash_bd7710_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - - match = of_match_device(bd7710_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver bd7710_platform_driver = { - .probe = msm_flash_bd7710_platform_probe, - .driver = { - .name = "rohm-flash,bd7710", - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int __init msm_flash_bd7710_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_register(&bd7710_platform_driver); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&bd7710_i2c_driver); -} - -static void __exit msm_flash_bd7710_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&bd7710_platform_driver); - else - i2c_del_driver(&bd7710_i2c_driver); -} - -static struct msm_camera_i2c_client bd7710_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting bd7710_init_setting = { - .reg_setting = bd7710_init_array, - .size = ARRAY_SIZE(bd7710_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_off_setting = { - .reg_setting = bd7710_off_array, - .size = ARRAY_SIZE(bd7710_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_release_setting = { - .reg_setting = bd7710_release_array, - .size = ARRAY_SIZE(bd7710_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_low_setting = { - .reg_setting = bd7710_low_array, - .size = ARRAY_SIZE(bd7710_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_high_setting = { - .reg_setting = bd7710_high_array, - .size = ARRAY_SIZE(bd7710_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t bd7710_regs = { - .init_setting = &bd7710_init_setting, - .off_setting = &bd7710_off_setting, - .low_setting = &bd7710_low_setting, - .high_setting = &bd7710_high_setting, - .release_setting = &bd7710_release_setting, -}; - -static struct msm_flash_fn_t bd7710_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &bd7710_i2c_client, - .reg_setting = &bd7710_regs, - .func_tbl = &bd7710_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_bd7710_init_module); -module_exit(msm_flash_bd7710_exit_module); -MODULE_DESCRIPTION("bd7710 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/lm3642.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/lm3642.c deleted file mode 100755 index 9a3237050fec..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/lm3642.c +++ /dev/null @@ -1,399 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include "msm_camera_io_util.h" -#include "msm_led_flash.h" - -#define FLASH_NAME "ti,lm3642" - -#define CONFIG_LM3642_DEBUG -#ifdef CONFIG_LM3642_DEBUG -#define LM3642_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define LM3642_DBG(fmt, args...) -#endif - - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver lm3642_i2c_driver; - -static struct msm_camera_i2c_reg_array lm3642_init_array[] = { - {0x0A, 0x00}, - {0x08, 0x07}, - {0x09, 0x19}, -}; - -static struct msm_camera_i2c_reg_array lm3642_off_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_release_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_low_array[] = { - {0x0A, 0x22}, -}; - -static struct msm_camera_i2c_reg_array lm3642_high_array[] = { - {0x0A, 0x23}, -}; - - -static const struct of_device_id lm3642_i2c_trigger_dt_match[] = { - {.compatible = "ti,lm3642"}, - {} -}; - -MODULE_DEVICE_TABLE(of, lm3642_i2c_trigger_dt_match); -static const struct i2c_device_id lm3642_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (value > LED_OFF) { - if(fctrl.func_tbl->flash_led_low) - fctrl.func_tbl->flash_led_low(&fctrl); - } else { - if(fctrl.func_tbl->flash_led_off) - fctrl.func_tbl->flash_led_off(&fctrl); - } -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -static int32_t msm_lm3642_torch_create_classdev(struct device *dev , - void *data) -{ - int rc; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - rc = led_classdev_register(dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; - -int msm_flash_lm3642_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return rc; -} - -int msm_flash_lm3642_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->release_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return 0; -} - -int msm_flash_lm3642_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_lm3642_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_lm3642_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} -static int msm_flash_lm3642_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - if (!id) { - pr_err("msm_flash_lm3642_i2c_probe: id is NULL"); - id = lm3642_i2c_id; - } - rc = msm_flash_i2c_probe(client, id); - - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - pr_err("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - - if (!rc) - msm_lm3642_torch_create_classdev(&(client->dev),NULL); - return rc; -} - -static int msm_flash_lm3642_i2c_remove(struct i2c_client *client) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - return rc; -} - - -static struct i2c_driver lm3642_i2c_driver = { - .id_table = lm3642_i2c_id, - .probe = msm_flash_lm3642_i2c_probe, - .remove = msm_flash_lm3642_i2c_remove, - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = lm3642_i2c_trigger_dt_match, - }, -}; - -static int __init msm_flash_lm3642_init(void) -{ - LM3642_DBG("%s entry\n", __func__); - return i2c_add_driver(&lm3642_i2c_driver); -} - -static void __exit msm_flash_lm3642_exit(void) -{ - LM3642_DBG("%s entry\n", __func__); - i2c_del_driver(&lm3642_i2c_driver); - return; -} - - -static struct msm_camera_i2c_client lm3642_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting lm3642_init_setting = { - .reg_setting = lm3642_init_array, - .size = ARRAY_SIZE(lm3642_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_off_setting = { - .reg_setting = lm3642_off_array, - .size = ARRAY_SIZE(lm3642_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_release_setting = { - .reg_setting = lm3642_release_array, - .size = ARRAY_SIZE(lm3642_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_low_setting = { - .reg_setting = lm3642_low_array, - .size = ARRAY_SIZE(lm3642_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_high_setting = { - .reg_setting = lm3642_high_array, - .size = ARRAY_SIZE(lm3642_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t lm3642_regs = { - .init_setting = &lm3642_init_setting, - .off_setting = &lm3642_off_setting, - .low_setting = &lm3642_low_setting, - .high_setting = &lm3642_high_setting, - .release_setting = &lm3642_release_setting, -}; - -static struct msm_flash_fn_t lm3642_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_lm3642_led_init, - .flash_led_release = msm_flash_lm3642_led_release, - .flash_led_off = msm_flash_lm3642_led_off, - .flash_led_low = msm_flash_lm3642_led_low, - .flash_led_high = msm_flash_lm3642_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &lm3642_i2c_client, - .reg_setting = &lm3642_regs, - .func_tbl = &lm3642_func_tbl, -}; - -module_init(msm_flash_lm3642_init); -module_exit(msm_flash_lm3642_exit); -MODULE_DESCRIPTION("lm3642 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.c deleted file mode 100644 index 58a06940e0ff..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.c +++ /dev/null @@ -1,1120 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#include "msm_flash.h" -#include "msm_camera_dt_util.h" -#include "msm_cci.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) - -DEFINE_MSM_MUTEX(msm_flash_mutex); - -static struct v4l2_file_operations msm_flash_v4l2_subdev_fops; -static struct led_trigger *torch_trigger; - -static const struct of_device_id msm_flash_dt_match[] = { - {.compatible = "qcom,camera-flash", .data = NULL}, - {} -}; - -static struct msm_flash_table msm_i2c_flash_table; -static struct msm_flash_table msm_gpio_flash_table; -static struct msm_flash_table msm_pmic_flash_table; - -static struct msm_flash_table *flash_table[] = { - &msm_i2c_flash_table, - &msm_gpio_flash_table, - &msm_pmic_flash_table -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -void msm_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (!torch_trigger) { - pr_err("No torch trigger found, can't set brightness\n"); - return; - } - - led_trigger_event(torch_trigger, value); -}; - -static struct led_classdev msm_torch_led[MAX_LED_TRIGGERS] = { - { - .name = "torch-light0", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, - { - .name = "torch-light1", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, - { - .name = "torch-light2", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, -}; - -static int32_t msm_torch_create_classdev(struct platform_device *pdev, - void *data) -{ - int32_t rc = 0; - int32_t i = 0; - struct msm_flash_ctrl_t *fctrl = - (struct msm_flash_ctrl_t *)data; - - if (!fctrl) { - pr_err("Invalid fctrl\n"); - return -EINVAL; - } - - for (i = 0; i < fctrl->torch_num_sources; i++) { - if (fctrl->torch_trigger[i]) { - torch_trigger = fctrl->torch_trigger[i]; - CDBG("%s:%d msm_torch_brightness_set for torch %d", - __func__, __LINE__, i); - msm_torch_brightness_set(&msm_torch_led[i], - LED_OFF); - - rc = led_classdev_register(&pdev->dev, - &msm_torch_led[i]); - if (rc) { - pr_err("Failed to register %d led dev. rc = %d\n", - i, rc); - return rc; - } - } else { - pr_err("Invalid fctrl->torch_trigger[%d]\n", i); - return -EINVAL; - } - } - - return 0; -}; - -static int32_t msm_flash_get_subdev_id( - struct msm_flash_ctrl_t *flash_ctrl, void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (flash_ctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = flash_ctrl->pdev->id; - else - *subdev_id = flash_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_i2c_write_table( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_camera_i2c_reg_setting_array *settings) -{ - struct msm_camera_i2c_reg_setting conf_array; - - conf_array.addr_type = settings->addr_type; - conf_array.data_type = settings->data_type; - conf_array.delay = settings->delay; - conf_array.reg_setting = settings->reg_setting_a; - conf_array.size = settings->size; - - return flash_ctrl->flash_i2c_client.i2c_func_tbl->i2c_write_table( - &flash_ctrl->flash_i2c_client, &conf_array); -} - -static int32_t msm_flash_i2c_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t rc = 0; - struct msm_flash_init_info_t *flash_init_info = - flash_data->cfg.flash_init_info; - struct msm_camera_i2c_reg_setting_array *settings = NULL; -#ifdef CONFIG_COMPAT - struct msm_sensor_power_setting_array32 *power_setting_array32 = NULL; -#endif - if (!flash_init_info || !flash_init_info->power_setting_array) { - pr_err("%s:%d failed: Null pointer\n", __func__, __LINE__); - return -EFAULT; - } - -#ifdef CONFIG_COMPAT - if (is_compat_task()) { - power_setting_array32 = kzalloc( - sizeof(struct msm_sensor_power_setting_array32), - GFP_KERNEL); - if (!power_setting_array32) { - pr_err("%s mem allocation failed %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(power_setting_array32, - (void *)flash_init_info->power_setting_array, - sizeof(struct msm_sensor_power_setting_array32))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - kfree(power_setting_array32); - return -EFAULT; - } - - flash_ctrl->power_setting_array.size = - power_setting_array32->size; - flash_ctrl->power_setting_array.size_down = - power_setting_array32->size_down; - flash_ctrl->power_setting_array.power_down_setting = - compat_ptr(power_setting_array32->power_down_setting); - flash_ctrl->power_setting_array.power_setting = - compat_ptr(power_setting_array32->power_setting); - memcpy(&flash_ctrl->power_setting_array.power_down_setting_a, - &power_setting_array32->power_down_setting_a, - sizeof(power_setting_array32->power_down_setting_a)); - memcpy(&flash_ctrl->power_setting_array.power_setting_a, - &power_setting_array32->power_setting_a, - sizeof(power_setting_array32->power_setting_a)); - } -#endif - if (copy_from_user(&flash_ctrl->power_setting_array, - (void *)flash_init_info->power_setting_array, - sizeof(struct msm_sensor_power_setting_array))) { - pr_err("%s copy_from_user failed %d\n", __func__, __LINE__); - return -EFAULT; - } - - flash_ctrl->power_info.power_setting = - flash_ctrl->power_setting_array.power_setting_a; - flash_ctrl->power_info.power_down_setting = - flash_ctrl->power_setting_array.power_down_setting_a; - flash_ctrl->power_info.power_setting_size = - flash_ctrl->power_setting_array.size; - flash_ctrl->power_info.power_down_setting_size = - flash_ctrl->power_setting_array.size_down; - - if ((flash_ctrl->power_info.power_setting_size > MAX_POWER_CONFIG) || - (flash_ctrl->power_info.power_down_setting_size > MAX_POWER_CONFIG)) { - pr_err("%s:%d invalid power setting size=%d size_down=%d\n", - __func__, __LINE__, - flash_ctrl->power_info.power_setting_size, - flash_ctrl->power_info.power_down_setting_size); - rc = -EINVAL; - goto msm_flash_i2c_init_fail; - } - - rc = msm_camera_power_up(&flash_ctrl->power_info, - flash_ctrl->flash_device_type, - &flash_ctrl->flash_i2c_client); - if (rc < 0) { - pr_err("%s msm_camera_power_up failed %d\n", - __func__, __LINE__); - goto msm_flash_i2c_init_fail; - } - - if (flash_data->cfg.flash_init_info->settings) { - settings = kzalloc(sizeof( - struct msm_camera_i2c_reg_setting_array), GFP_KERNEL); - if (!settings) { - pr_err("%s mem allocation failed %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(settings, (void *)flash_init_info->settings, - sizeof(struct msm_camera_i2c_reg_setting_array))) { - kfree(settings); - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - - rc = msm_flash_i2c_write_table(flash_ctrl, settings); - kfree(settings); - - if (rc < 0) { - pr_err("%s:%d msm_flash_i2c_write_table rc %d failed\n", - __func__, __LINE__, rc); - } - } - - return 0; - -msm_flash_i2c_init_fail: - return rc; -} - -static int32_t msm_flash_gpio_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t i = 0; - int32_t rc = 0; - - CDBG("Enter"); - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - flash_ctrl->flash_op_current[i] = LED_FULL; - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - flash_ctrl->torch_op_current[i] = LED_HALF; - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) { - if (!flash_ctrl->torch_trigger[i]) { - if (i < flash_ctrl->flash_num_sources) - flash_ctrl->torch_trigger[i] = - flash_ctrl->flash_trigger[i]; - else - flash_ctrl->torch_trigger[i] = - flash_ctrl->flash_trigger[ - flash_ctrl->flash_num_sources - 1]; - } - } - - rc = flash_ctrl->func_tbl->camera_flash_off(flash_ctrl, flash_data); - - CDBG("Exit"); - return rc; -} - -static int32_t msm_flash_i2c_release( - struct msm_flash_ctrl_t *flash_ctrl) -{ - return 0; -} - -static int32_t msm_flash_off(struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t i = 0; - - CDBG("Enter\n"); - - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - if (flash_ctrl->flash_trigger[i]) - led_trigger_event(flash_ctrl->flash_trigger[i], 0); - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - if (flash_ctrl->torch_trigger[i]) - led_trigger_event(flash_ctrl->torch_trigger[i], 0); - - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_i2c_write_setting_array( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting_array *settings = NULL; - - if (!flash_data->cfg.settings) { - pr_err("%s:%d failed: Null pointer\n", __func__, __LINE__); - return -EFAULT; - } - - settings = kzalloc(sizeof(struct msm_camera_i2c_reg_setting_array), - GFP_KERNEL); - if (!settings) { - pr_err("%s mem allocation failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(settings, (void *)flash_data->cfg.settings, - sizeof(struct msm_camera_i2c_reg_setting_array))) { - kfree(settings); - pr_err("%s copy_from_user failed %d\n", __func__, __LINE__); - return -EFAULT; - } - - rc = msm_flash_i2c_write_table(flash_ctrl, settings); - kfree(settings); - - if (rc < 0) { - pr_err("%s:%d msm_flash_i2c_write_table rc = %d failed\n", - __func__, __LINE__, rc); - } - return rc; -} - -static int32_t msm_flash_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - uint32_t i = 0; - int32_t rc = -EFAULT; - enum msm_flash_driver_type flash_driver_type = FLASH_DRIVER_DEFAULT; - - CDBG("Enter"); - - if (flash_ctrl->flash_state == MSM_CAMERA_FLASH_INIT) { - pr_err("%s:%d Invalid flash state = %d", - __func__, __LINE__, flash_ctrl->flash_state); - return 0; - } - - if (flash_data->cfg.flash_init_info->flash_driver_type == - FLASH_DRIVER_DEFAULT) { - flash_driver_type = flash_ctrl->flash_driver_type; - } else if (flash_data->cfg.flash_init_info->flash_driver_type == - flash_ctrl->flash_driver_type) { - flash_driver_type = flash_ctrl->flash_driver_type; - } - - if (flash_driver_type == FLASH_DRIVER_DEFAULT) { - pr_err("%s:%d invalid flash_driver_type", __func__, __LINE__); - return -EINVAL; - } - - for (i = 0; i < ARRAY_SIZE(flash_table); i++) { - if (flash_driver_type == flash_table[i]->flash_driver_type) { - flash_ctrl->func_tbl = &flash_table[i]->func_tbl; - rc = 0; - } - } - - if (rc < 0) { - pr_err("%s:%d failed invalid flash_driver_type %d\n", - __func__, __LINE__, - flash_data->cfg.flash_init_info->flash_driver_type); - } - - rc = flash_ctrl->func_tbl->camera_flash_init( - flash_ctrl, flash_data); - if (rc < 0) { - pr_err("%s:%d camera_flash_init failed rc = %d", - __func__, __LINE__, rc); - return rc; - } - - flash_ctrl->flash_state = MSM_CAMERA_FLASH_INIT; - - CDBG("Exit"); - return 0; -} - -#ifdef CONFIG_COMPAT -static int32_t msm_flash_init_prepare( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - return msm_flash_init(flash_ctrl, flash_data); -} -#else -static int32_t msm_flash_init_prepare( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - struct msm_flash_cfg_data_t flash_data_k; - struct msm_flash_init_info_t flash_init_info; - int32_t i = 0; - - flash_data_k.cfg_type = flash_data->cfg_type; - for (i = 0; i < MAX_LED_TRIGGERS; i++) { - flash_data_k.flash_current[i] = - flash_data->flash_current[i]; - flash_data_k.flash_duration[i] = - flash_data->flash_duration[i]; - } - - flash_data_k.cfg.flash_init_info = &flash_init_info; - if (copy_from_user(&flash_init_info, - (void *)(flash_data->cfg.flash_init_info), - sizeof(struct msm_flash_init_info_t))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - return msm_flash_init(flash_ctrl, &flash_data_k); -} -#endif - -static int32_t msm_flash_low( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - uint32_t curr = 0, max_current = 0; - int32_t i = 0; - - CDBG("Enter\n"); - /* Turn off flash triggers */ - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - led_trigger_event(flash_ctrl->flash_trigger[i], 0); - - /* Turn on flash triggers */ - for (i = 0; i < flash_ctrl->torch_num_sources; i++) { - if (flash_ctrl->torch_trigger[i]) { - max_current = flash_ctrl->torch_max_current[i]; - if (flash_data->cfg.flash_current[i] >= 0 && - flash_data->cfg.flash_current[i] < - max_current) { - curr = flash_data->cfg.flash_current[i]; - } else { - curr = flash_ctrl->torch_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr); - } - led_trigger_event(flash_ctrl->torch_trigger[i], - curr); - } - } - - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_high( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t curr = 0; - int32_t max_current = 0; - int32_t i = 0; - - /* Turn off torch triggers */ - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - led_trigger_event(flash_ctrl->torch_trigger[i], 0); - - /* Turn on flash triggers */ - for (i = 0; i < flash_ctrl->flash_num_sources; i++) { - if (flash_ctrl->flash_trigger[i]) { - max_current = flash_ctrl->flash_max_current[i]; - if (flash_data->cfg.flash_current[i] >= 0 && - flash_data->cfg.flash_current[i] < - max_current) { - curr = flash_data->cfg.flash_current[i]; - } else { - curr = flash_ctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr); - } - led_trigger_event(flash_ctrl->flash_trigger[i], - curr); - } - } - return 0; -} - -static int32_t msm_flash_release( - struct msm_flash_ctrl_t *flash_ctrl) -{ - int32_t rc = 0; - if (flash_ctrl->flash_state == MSM_CAMERA_FLASH_RELEASE) { - pr_err("%s:%d Invalid flash state = %d", - __func__, __LINE__, flash_ctrl->flash_state); - return 0; - } - - rc = flash_ctrl->func_tbl->camera_flash_off(flash_ctrl, NULL); - if (rc < 0) { - pr_err("%s:%d camera_flash_init failed rc = %d", - __func__, __LINE__, rc); - return rc; - } - flash_ctrl->flash_state = MSM_CAMERA_FLASH_RELEASE; - return 0; -} - -static int32_t msm_flash_config(struct msm_flash_ctrl_t *flash_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct msm_flash_cfg_data_t *flash_data = - (struct msm_flash_cfg_data_t *) argp; - - mutex_lock(flash_ctrl->flash_mutex); - - CDBG("Enter %s type %d\n", __func__, flash_data->cfg_type); - - switch (flash_data->cfg_type) { - case CFG_FLASH_INIT: - rc = msm_flash_init_prepare(flash_ctrl, flash_data); - break; - case CFG_FLASH_RELEASE: - rc = flash_ctrl->func_tbl->camera_flash_release( - flash_ctrl); - break; - case CFG_FLASH_OFF: - rc = flash_ctrl->func_tbl->camera_flash_off( - flash_ctrl, flash_data); - break; - case CFG_FLASH_LOW: - rc = flash_ctrl->func_tbl->camera_flash_low( - flash_ctrl, flash_data); - break; - case CFG_FLASH_HIGH: - rc = flash_ctrl->func_tbl->camera_flash_high( - flash_ctrl, flash_data); - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(flash_ctrl->flash_mutex); - - CDBG("Exit %s type %d\n", __func__, flash_data->cfg_type); - - return rc; -} - -static long msm_flash_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_flash_ctrl_t *fctrl = NULL; - void __user *argp = (void __user *)arg; - - CDBG("Enter\n"); - - if (!sd) { - pr_err("sd NULL\n"); - return -EINVAL; - } - fctrl = v4l2_get_subdevdata(sd); - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_flash_get_subdev_id(fctrl, argp); - case VIDIOC_MSM_FLASH_CFG: - return msm_flash_config(fctrl, argp); - case MSM_SD_SHUTDOWN: - *(int *)argp = MSM_CAMERA_LED_RELEASE; - return msm_flash_config(fctrl, argp); - default: - pr_err_ratelimited("invalid cmd %d\n", cmd); - return -ENOIOCTLCMD; - } - CDBG("Exit\n"); -} - -static struct v4l2_subdev_core_ops msm_flash_subdev_core_ops = { - .ioctl = msm_flash_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_flash_subdev_ops = { - .core = &msm_flash_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_flash_internal_ops; - -static int32_t msm_flash_get_gpio_dt_data(struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0, i = 0; - uint16_t *gpio_array = NULL; - int16_t gpio_array_size = 0; - struct msm_camera_gpio_conf *gconf = NULL; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size > 0) { - fctrl->power_info.gpio_conf = - kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!fctrl->power_info.gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - gconf = fctrl->power_info.gpio_conf; - - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto free_gpio_conf; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - if (((int16_t)gpio_array[i]) < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -EINVAL; - goto free_gpio_array; - } - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_gpio_array; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_cam_gpio_req_tbl; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_cam_gpio_set_tbl; - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_GPIO; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - return 0; - -free_cam_gpio_set_tbl: - kfree(gconf->cam_gpio_set_tbl); -free_cam_gpio_req_tbl: - kfree(gconf->cam_gpio_req_tbl); -free_gpio_array: - kfree(gpio_array); -free_gpio_conf: - kfree(fctrl->power_info.gpio_conf); - return rc; -} - -static int32_t msm_flash_get_pmic_source_info( - struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0; - uint32_t count = 0, i = 0; - struct device_node *flash_src_node = NULL; - struct device_node *torch_src_node = NULL; - - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl->flash_num_sources = count; - CDBG("%s:%d flash_num_sources = %d", - __func__, __LINE__, fctrl->flash_num_sources); - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "qcom,default-led-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger read failed\n"); - of_node_put(flash_src_node); - continue; - } - } - - CDBG("default trigger %s\n", - fctrl->flash_trigger_name[i]); - - /* Read operational-current */ - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl->flash_op_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - /* Read max-current */ - rc = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl->flash_max_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->flash_op_current[i]); - - led_trigger_register_simple( - fctrl->flash_trigger_name[i], - &fctrl->flash_trigger[i]); - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_PMIC; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - if (of_get_property(of_node, "qcom,torch-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl->torch_num_sources = count; - CDBG("%s:%d torch_num_sources = %d", - __func__, __LINE__, fctrl->torch_num_sources); - for (i = 0; i < count; i++) { - torch_src_node = of_parse_phandle(of_node, - "qcom,torch-source", i); - if (!torch_src_node) { - pr_err("torch_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(torch_src_node, - "qcom,default-led-trigger", - &fctrl->torch_trigger_name[i]); - if (rc < 0) { - rc = of_property_read_string(torch_src_node, - "linux,default-trigger", - &fctrl->torch_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger read failed\n"); - of_node_put(torch_src_node); - continue; - } - } - - CDBG("default trigger %s\n", - fctrl->torch_trigger_name[i]); - - /* Read operational-current */ - rc = of_property_read_u32(torch_src_node, - "qcom,current", - &fctrl->torch_op_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(torch_src_node); - continue; - } - - /* Read max-current */ - rc = of_property_read_u32(torch_src_node, - "qcom,max-current", - &fctrl->torch_max_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(torch_src_node); - continue; - } - - of_node_put(torch_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->torch_op_current[i]); - - led_trigger_register_simple( - fctrl->torch_trigger_name[i], - &fctrl->torch_trigger[i]); - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_PMIC; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - return 0; -} - -static int32_t msm_flash_get_dt_data(struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - /* Read the sub device */ - rc = of_property_read_u32(of_node, "cell-index", &fctrl->pdev->id); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - return rc; - } - - CDBG("subdev id %d\n", fctrl->subdev_id); - - fctrl->flash_driver_type = FLASH_DRIVER_DEFAULT; - - /* Read the CCI master. Use M0 if not available in the node */ - rc = of_property_read_u32(of_node, "qcom,cci-master", - &fctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, fctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - fctrl->cci_i2c_master = MASTER_0; - rc = 0; - } else { - fctrl->flash_driver_type = FLASH_DRIVER_I2C; - } - - /* Read the gpio information from device tree */ - rc = msm_flash_get_gpio_dt_data(of_node, fctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_gpio_dt_data failed rc %d\n", - __func__, __LINE__, rc); - return rc; - } - - /* Read the flash and torch source info from device tree node */ - rc = msm_flash_get_pmic_source_info(of_node, fctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_pmic_source_info failed rc %d\n", - __func__, __LINE__, rc); - return rc; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_flash_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct msm_flash_cfg_data_t32 *u32 = - (struct msm_flash_cfg_data_t32 *)arg; - struct msm_flash_cfg_data_t flash_data; - struct msm_flash_init_info_t32 flash_init_info32; - struct msm_flash_init_info_t flash_init_info; - - CDBG("Enter"); - flash_data.cfg_type = u32->cfg_type; - switch (cmd) { - case VIDIOC_MSM_FLASH_CFG32: - cmd = VIDIOC_MSM_FLASH_CFG; - switch (flash_data.cfg_type) { - case CFG_FLASH_OFF: - case CFG_FLASH_LOW: - case CFG_FLASH_HIGH: - flash_data.cfg.settings = compat_ptr(u32->cfg.settings); - break; - case CFG_FLASH_INIT: - flash_data.cfg.flash_init_info = &flash_init_info; - if (copy_from_user(&flash_init_info32, - (void *)compat_ptr(u32->cfg.flash_init_info), - sizeof(struct msm_flash_init_info_t32))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - flash_init_info.flash_driver_type = - flash_init_info32.flash_driver_type; - flash_init_info.settings = - compat_ptr(flash_init_info32.settings); - flash_init_info.power_setting_array = - compat_ptr( - flash_init_info32.power_setting_array); - break; - default: - break; - } - break; - default: - return msm_flash_subdev_ioctl(sd, cmd, arg); - } - - rc = msm_flash_subdev_ioctl(sd, cmd, &flash_data); - CDBG("Exit"); - return rc; -} - -static long msm_flash_subdev_fops_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_flash_subdev_do_ioctl); -} -#endif -static int32_t msm_flash_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_flash_ctrl_t *flash_ctrl = NULL; - struct msm_camera_cci_client *cci_client = NULL; - - CDBG("Enter"); - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - flash_ctrl = kzalloc(sizeof(struct msm_flash_ctrl_t), GFP_KERNEL); - if (!flash_ctrl) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - memset(flash_ctrl, 0, sizeof(struct msm_flash_ctrl_t)); - - flash_ctrl->pdev = pdev; - - rc = msm_flash_get_dt_data(pdev->dev.of_node, flash_ctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_dt_data failed\n", - __func__, __LINE__); - kfree(flash_ctrl); - return -EINVAL; - } - - flash_ctrl->flash_state = MSM_CAMERA_FLASH_RELEASE; - flash_ctrl->power_info.dev = &flash_ctrl->pdev->dev; - flash_ctrl->flash_device_type = MSM_CAMERA_PLATFORM_DEVICE; - flash_ctrl->flash_mutex = &msm_flash_mutex; - flash_ctrl->flash_i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - flash_ctrl->flash_i2c_client.cci_client = kzalloc( - sizeof(struct msm_camera_cci_client), GFP_KERNEL); - if (!flash_ctrl->flash_i2c_client.cci_client) { - kfree(flash_ctrl); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = flash_ctrl->flash_i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = flash_ctrl->cci_i2c_master; - - /* Initialize sub device */ - v4l2_subdev_init(&flash_ctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&flash_ctrl->msm_sd.sd, flash_ctrl); - - flash_ctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - flash_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(flash_ctrl->msm_sd.sd.name, - ARRAY_SIZE(flash_ctrl->msm_sd.sd.name), - "msm_camera_flash"); - media_entity_init(&flash_ctrl->msm_sd.sd.entity, 0, NULL, 0); - flash_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - flash_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_FLASH; - flash_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; - msm_sd_register(&flash_ctrl->msm_sd); - - CDBG("%s:%d flash sd name = %s", __func__, __LINE__, - flash_ctrl->msm_sd.sd.entity.name); - msm_flash_v4l2_subdev_fops = v4l2_subdev_fops; -#ifdef CONFIG_COMPAT - msm_flash_v4l2_subdev_fops.compat_ioctl32 = - msm_flash_subdev_fops_ioctl; -#endif - flash_ctrl->msm_sd.sd.devnode->fops = &msm_flash_v4l2_subdev_fops; - - if (flash_ctrl->flash_driver_type == FLASH_DRIVER_PMIC) - rc = msm_torch_create_classdev(pdev, flash_ctrl); - - CDBG("probe success\n"); - return rc; -} - -MODULE_DEVICE_TABLE(of, msm_flash_dt_match); - -static struct platform_driver msm_flash_platform_driver = { - .probe = msm_flash_platform_probe, - .driver = { - .name = "qcom,camera-flash", - .owner = THIS_MODULE, - .of_match_table = msm_flash_dt_match, - }, -}; - -static int __init msm_flash_init_module(void) -{ - int32_t rc = 0; - CDBG("Enter\n"); - rc = platform_driver_register(&msm_flash_platform_driver); - if (rc) - pr_err("platform probe for flash failed"); - - return rc; -} - -static void __exit msm_flash_exit_module(void) -{ - platform_driver_unregister(&msm_flash_platform_driver); - return; -} - -static struct msm_flash_table msm_pmic_flash_table = { - .flash_driver_type = FLASH_DRIVER_PMIC, - .func_tbl = { - .camera_flash_init = msm_flash_off, - .camera_flash_release = msm_flash_release, - .camera_flash_off = msm_flash_off, - .camera_flash_low = msm_flash_low, - .camera_flash_high = msm_flash_high, - }, -}; - -static struct msm_flash_table msm_gpio_flash_table = { - .flash_driver_type = FLASH_DRIVER_GPIO, - .func_tbl = { - .camera_flash_init = msm_flash_gpio_init, - .camera_flash_release = msm_flash_release, - .camera_flash_off = msm_flash_off, - .camera_flash_low = msm_flash_low, - .camera_flash_high = msm_flash_high, - }, -}; - -static struct msm_flash_table msm_i2c_flash_table = { - .flash_driver_type = FLASH_DRIVER_I2C, - .func_tbl = { - .camera_flash_init = msm_flash_i2c_init, - .camera_flash_release = msm_flash_i2c_release, - .camera_flash_off = msm_flash_i2c_write_setting_array, - .camera_flash_low = msm_flash_i2c_write_setting_array, - .camera_flash_high = msm_flash_i2c_write_setting_array, - }, -}; - -module_init(msm_flash_init_module); -module_exit(msm_flash_exit_module); -MODULE_DESCRIPTION("MSM FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.h deleted file mode 100644 index e018de4c1539..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_flash.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef MSM_FLASH_H -#define MSM_FLASH_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_sd.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -enum msm_camera_flash_state_t { - MSM_CAMERA_FLASH_INIT, - MSM_CAMERA_FLASH_RELEASE, -}; - -struct msm_flash_ctrl_t; - -struct msm_flash_func_t { - int32_t (*camera_flash_init)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_release)(struct msm_flash_ctrl_t *); - int32_t (*camera_flash_off)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_low)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_high)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); -}; - -struct msm_flash_table { - enum msm_flash_driver_type flash_driver_type; - struct msm_flash_func_t func_tbl; -}; - -struct msm_flash_reg_t { - struct msm_camera_i2c_reg_setting *init_setting; - struct msm_camera_i2c_reg_setting *off_setting; - struct msm_camera_i2c_reg_setting *release_setting; - struct msm_camera_i2c_reg_setting *low_setting; - struct msm_camera_i2c_reg_setting *high_setting; -}; - -struct msm_flash_ctrl_t { - struct msm_camera_i2c_client flash_i2c_client; - struct msm_sd_subdev msm_sd; - struct platform_device *pdev; - struct msm_flash_func_t *func_tbl; - struct msm_camera_power_ctrl_t power_info; - - /* Flash */ - uint32_t flash_num_sources; - const char *flash_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; - uint32_t flash_op_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_duration[MAX_LED_TRIGGERS]; - - /* Torch */ - uint32_t torch_num_sources; - const char *torch_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *torch_trigger[MAX_LED_TRIGGERS]; - uint32_t torch_op_current[MAX_LED_TRIGGERS]; - uint32_t torch_max_current[MAX_LED_TRIGGERS]; - - void *data; - enum msm_camera_device_type_t flash_device_type; - enum cci_i2c_master_t cci_i2c_master; - uint32_t subdev_id; - struct mutex *flash_mutex; - struct msm_sensor_power_setting_array power_setting_array; - - /* flash driver type */ - enum msm_flash_driver_type flash_driver_type; - - /* flash state */ - enum msm_camera_flash_state_t flash_state; -}; - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id); - -int msm_flash_probe(struct platform_device *pdev, const void *data); - -int32_t msm_flash_create_v4lsubdev(struct platform_device *pdev, - void *data); -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data); - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_flash_ctrl_t *fctrl, - void *arg); - -int32_t msm_led_i2c_trigger_config(struct msm_flash_ctrl_t *fctrl, - void *data); - -int msm_flash_led_init(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_release(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_off(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_low(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_high(struct msm_flash_ctrl_t *fctrl); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.c deleted file mode 100644 index 14971b053511..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include "msm_led_flash.h" -#include - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct v4l2_file_operations msm_led_flash_v4l2_subdev_fops; - -static long msm_led_flash_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_led_flash_ctrl_t *fctrl = NULL; - void __user *argp = (void __user *)arg; - if (!sd) { - pr_err("sd NULL\n"); - return -EINVAL; - } - fctrl = v4l2_get_subdevdata(sd); - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return fctrl->func_tbl->flash_get_subdev_id(fctrl, argp); - case VIDIOC_MSM_FLASH_LED_DATA_CFG: - return fctrl->func_tbl->flash_led_config(fctrl, argp); - case MSM_SD_SHUTDOWN: - *(int *)argp = MSM_CAMERA_LED_RELEASE; - return fctrl->func_tbl->flash_led_config(fctrl, argp); - default: - pr_err_ratelimited("invalid cmd %d\n", cmd); - return -ENOIOCTLCMD; - } -} - -static struct v4l2_subdev_core_ops msm_flash_subdev_core_ops = { - .ioctl = msm_led_flash_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_flash_subdev_ops = { - .core = &msm_flash_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_flash_internal_ops; - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->pdev = pdev; - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - fctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashen-gpio", 0); -#else - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led1-gpio", 0); -#endif - if (fctrl->led_irq_gpio1 < 0) { - pr_err("Fail : can't get led1-gpio\n"); - return -EINVAL; - } -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashtorch-gpio", 0); -#else - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led2-gpio", 0); -#endif - if (fctrl->led_irq_gpio2 < 0) { - pr_err("Fail : can't get led2-gpio\n"); - return -EINVAL; - } - - msm_sd_register(&fctrl->msm_sd); - - msm_led_flash_v4l2_subdev_fops = v4l2_subdev_fops; -#ifdef CONFIG_COMPAT - msm_led_flash_v4l2_subdev_fops.compat_ioctl32 = - msm_led_flash_v4l2_subdev_fops.unlocked_ioctl; -#endif - fctrl->msm_sd.sd.devnode->fops = &msm_led_flash_v4l2_subdev_fops; - - CDBG("probe success\n"); - return 0; -} - -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - msm_sd_register(&fctrl->msm_sd); - - msm_led_flash_v4l2_subdev_fops = v4l2_subdev_fops; - fctrl->msm_sd.sd.devnode->fops = &msm_led_flash_v4l2_subdev_fops; - - CDBG("probe success\n"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.h deleted file mode 100644 index 9d8f846ca8e1..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_flash.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef MSM_LED_FLASH_H -#define MSM_LED_FLASH_H - -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_sd.h" - - -struct msm_led_flash_ctrl_t; - -struct msm_flash_fn_t { - int32_t (*flash_get_subdev_id)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_config)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_init)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_release)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_off)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_low)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_high)(struct msm_led_flash_ctrl_t *); -}; - -struct msm_led_flash_reg_t { - struct msm_camera_i2c_reg_setting *init_setting; - struct msm_camera_i2c_reg_setting *off_setting; - struct msm_camera_i2c_reg_setting *release_setting; - struct msm_camera_i2c_reg_setting *low_setting; - struct msm_camera_i2c_reg_setting *high_setting; -}; - -struct msm_led_flash_ctrl_t { - struct msm_camera_i2c_client *flash_i2c_client; - struct msm_sd_subdev msm_sd; - struct platform_device *pdev; - struct msm_flash_fn_t *func_tbl; - struct msm_camera_sensor_board_info *flashdata; - struct msm_led_flash_reg_t *reg_setting; - const char *flash_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; - uint32_t flash_op_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_current[MAX_LED_TRIGGERS]; - const char *torch_trigger_name; - struct led_trigger *torch_trigger; - uint32_t torch_op_current; - uint32_t torch_max_current; - void *data; - uint32_t num_sources; - enum msm_camera_device_type_t flash_device_type; - enum cci_i2c_master_t cci_i2c_master; - enum msm_camera_led_config_t led_state; - uint32_t subdev_id; - struct msm_pinctrl_info pinctrl_info; - int led_irq_gpio1; - int led_irq_gpio2; -}; - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id); - -int msm_flash_probe(struct platform_device *pdev, const void *data); - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, - void *data); -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data); - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg); - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data); - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_i2c_trigger.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_i2c_trigger.c deleted file mode 100644 index d58f624edaac..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_i2c_trigger.c +++ /dev/null @@ -1,745 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#include "msm_led_flash.h" -#include "msm_camera_io_util.h" -#include "../msm_sensor.h" -#include "msm_led_flash.h" -#include "../cci/msm_cci.h" -#include - -#define FLASH_NAME "camera-led-flash" -#define CAM_FLASH_PINCTRL_STATE_SLEEP "cam_flash_suspend" -#define CAM_FLASH_PINCTRL_STATE_DEFAULT "cam_flash_default" -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - *subdev_id = fctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - return 0; -} - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl->func_tbl) { - pr_err("failed\n"); - return -EINVAL; - } - switch (cfg->cfgtype) { - - case MSM_CAMERA_LED_INIT: - if (fctrl->func_tbl->flash_led_init) - rc = fctrl->func_tbl->flash_led_init(fctrl); - break; - - case MSM_CAMERA_LED_RELEASE: - if (fctrl->func_tbl->flash_led_release) - rc = fctrl->func_tbl-> - flash_led_release(fctrl); - break; - - case MSM_CAMERA_LED_OFF: - if (fctrl->func_tbl->flash_led_off) - rc = fctrl->func_tbl->flash_led_off(fctrl); - break; - - case MSM_CAMERA_LED_LOW: - if (fctrl->func_tbl->flash_led_low) - rc = fctrl->func_tbl->flash_led_low(fctrl); - break; - - case MSM_CAMERA_LED_HIGH: - if (fctrl->func_tbl->flash_led_high) - rc = fctrl->func_tbl->flash_led_high(fctrl); - break; - default: - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -static int msm_flash_pinctrl_init(struct msm_led_flash_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *flash_pctrl = NULL; - flash_pctrl = &ctrl->pinctrl_info; - if (ctrl->pdev != NULL) - flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl->pdev->dev); - else - flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl-> - flash_i2c_client-> - client->dev); - if (IS_ERR_OR_NULL(flash_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_active = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_DEFAULT); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_suspend = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_SLEEP); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - if (power_info->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - power_info->gpio_conf->cam_gpiomux_conf_tbl, - power_info->gpio_conf->cam_gpiomux_conf_tbl_size); - } - - /* CCI Init */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("cci_init failed\n"); - return rc; - } - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl->pinctrl_info.use_pinctrl == true) { - CDBG("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - msleep(20); - - CDBG("before FL_RESET\n"); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - fctrl->led_state = MSM_CAMERA_LED_INIT; - return rc; -} - -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0, ret = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - - if (fctrl->led_state != MSM_CAMERA_LED_INIT) { - pr_err("%s:%d invalid led state\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_LOW); - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_LOW); - - if (fctrl->pinctrl_info.use_pinctrl == true) { - ret = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - /* CCI deInit */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_deinit failed\n"); - } - - return 0; -} - -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -static int32_t msm_led_get_dt_data(struct device_node *of_node, - struct msm_led_flash_ctrl_t *fctrl) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct device_node *flash_src_node = NULL; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - uint32_t count = 0; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl->flashdata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!fctrl->flashdata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - rc = of_property_read_u32(of_node, "cell-index", &fctrl->subdev_id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - - CDBG("subdev id %d\n", fctrl->subdev_id); - - rc = of_property_read_string(of_node, "label", - &flashdata->sensor_name); - CDBG("%s label %s, rc %d\n", __func__, - flashdata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &fctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, fctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - fctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - fctrl->pinctrl_info.use_pinctrl = false; - fctrl->pinctrl_info.use_pinctrl = of_property_read_bool(of_node, - "qcom,enable_pinctrl"); - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("failed\n"); - return -EINVAL; - } - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl->flash_trigger_name[i]); - - rc = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl->flash_op_current[i]); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - of_node_put(flash_src_node); - continue; - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->flash_op_current[i]); - - led_trigger_register_simple( - fctrl->flash_trigger_name[i], - &fctrl->flash_trigger[i]); - } - - } else { /*Handle LED Flash Ctrl by GPIO*/ - power_info->gpio_conf = - kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - gconf = power_info->gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR4; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR5; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR6; - } - } - - flashdata->slave_info = - kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!flashdata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR8; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR9; - } - fctrl->flashdata->slave_info->sensor_slave_addr = id_info[0]; - fctrl->flashdata->slave_info->sensor_id_reg_addr = id_info[1]; - fctrl->flashdata->slave_info->sensor_id = id_info[2]; - - kfree(gpio_array); - return rc; -ERROR9: - kfree(fctrl->flashdata->slave_info); -ERROR8: - kfree(fctrl->flashdata->power_info.gpio_conf->gpio_num_info); -ERROR6: - kfree(gconf->cam_gpio_set_tbl); -ERROR5: - kfree(gconf->cam_gpio_req_tbl); -ERROR4: - kfree(gconf); -ERROR1: - kfree(fctrl->flashdata); - kfree(gpio_array); - } - return rc; -} - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -#ifdef CONFIG_DEBUG_FS -static int set_led_status(void *data, u64 val) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - int rc = -1; - pr_debug("set_led_status: Enter val: %llu", val); - if (!fctrl) { - pr_err("set_led_status: fctrl is NULL"); - return rc; - } - if (!fctrl->func_tbl) { - pr_err("set_led_status: fctrl->func_tbl is NULL"); - return rc; - } - if (val == 0) { - pr_debug("set_led_status: val is disable"); - rc = msm_flash_led_off(fctrl); - } else { - pr_debug("set_led_status: val is enable"); - rc = msm_flash_led_low(fctrl); - } - - return rc; -} - -DEFINE_SIMPLE_ATTRIBUTE(ledflashdbg_fops, - NULL, set_led_status, "%llu\n"); -#endif - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = NULL; -#ifdef CONFIG_DEBUG_FS - struct dentry *dentry; -#endif - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - goto probe_failure; - } - - fctrl = (struct msm_led_flash_ctrl_t *)(id->driver_data); - if (fctrl->flash_i2c_client) - fctrl->flash_i2c_client->client = client; - /* Set device type as I2C */ - fctrl->flash_device_type = MSM_CAMERA_I2C_DEVICE; - - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", id->name); - - rc = msm_led_get_dt_data(client->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - - msm_flash_pinctrl_init(fctrl); - if (fctrl->flash_i2c_client != NULL) { - fctrl->flash_i2c_client->client = client; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - fctrl->flash_i2c_client->client->addr = - fctrl->flashdata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - - rc = msm_led_i2c_flash_create_v4lsubdev(fctrl); -#ifdef CONFIG_DEBUG_FS - dentry = debugfs_create_file("ledflash", S_IRUGO, NULL, (void *)fctrl, - &ledflashdbg_fops); - if (!dentry) - pr_err("Failed to create the debugfs ledflash file"); -#endif - CDBG("%s:%d probe success\n", __func__, __LINE__); - return 0; - -probe_failure: - CDBG("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -int msm_flash_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_cci_client *cci_client = NULL; - - if (!of_node || !fctrl) { - pr_err("%s of_node is NULL or fctrl is NULL, line %d\n",__func__,__LINE__); - rc = -EFAULT; - goto probe_failure; - } - fctrl->pdev = pdev; - - rc = msm_led_get_dt_data(pdev->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d rc = %d\n", __func__, __LINE__, rc); - rc = -EFAULT; - goto probe_failure; - } - - msm_flash_pinctrl_init(fctrl); - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", fctrl->flashdata->sensor_name); - /* Set device type as Platform*/ - fctrl->flash_device_type = MSM_CAMERA_PLATFORM_DEVICE; - - if (NULL == fctrl->flash_i2c_client) { - pr_err("%s flash_i2c_client NULL\n", - __func__); - rc = -EFAULT; - goto probe_failure; - } - - fctrl->flash_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!fctrl->flash_i2c_client->cci_client) { - pr_err("%s failed line %d kzalloc failed\n", - __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - - cci_client = fctrl->flash_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = fctrl->cci_i2c_master; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - cci_client->sid = - fctrl->flashdata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - - rc = msm_led_flash_create_v4lsubdev(pdev, fctrl); - - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - goto probe_failure1; - } - - CDBG("%s: probe success\n", __func__); - return 0; - -probe_failure1: - kfree(fctrl->flash_i2c_client->cci_client); - -probe_failure: - - pr_err("%s probe failed\n", __func__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_torch.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_torch.c deleted file mode 100644 index ff6369634541..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_torch.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_led_flash.h" - -static struct led_trigger *torch_trigger; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (!torch_trigger) { - pr_err("No torch trigger found, can't set brightness\n"); - return; - } - - led_trigger_event(torch_trigger, value); -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -int32_t msm_led_torch_create_classdev(struct platform_device *pdev, - void *data) -{ - int rc; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - - if (!fctrl || !fctrl->torch_trigger) { - pr_err("Invalid fctrl or torch trigger\n"); - return -EINVAL; - } - - torch_trigger = fctrl->torch_trigger; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - - rc = led_classdev_register(&pdev->dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_trigger.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_trigger.c deleted file mode 100644 index 113ebf121f26..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/flash/msm_led_trigger.c +++ /dev/null @@ -1,496 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#if defined(CONFIG_FLED_SM5701) -#include -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -#include -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) -#include -#endif -#ifdef CONFIG_FLED_SM5703 -#include -#endif -#include "msm_led_flash.h" - -#define FLASH_NAME "camera-led-flash" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -extern int32_t msm_led_torch_create_classdev( - struct platform_device *pdev, void *data); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -extern void rt5033_fled_strobe_critial_section_lock(struct rt_fled_info *fled_info); -extern void rt5033_fled_strobe_critial_section_unlock(struct rt_fled_info *fled_info); -extern bool assistive_light; -#endif - -#ifdef CONFIG_FLED_SM5703_EXT_GPIO -extern bool assistive_light; -extern int32_t sm5703_fled_notification(struct sm_fled_info *info); -static int led_prev_mode = 0; -#endif - -static enum flash_type flashtype; -static struct msm_led_flash_ctrl_t fctrl; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -static bool lock_state = false; -#endif - -static int32_t msm_led_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = fctrl->pdev->id; - CDBG("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - uint32_t i; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - rt_fled_info_t *fled_info = rt_fled_get_info_by_name(NULL); -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); -#endif -#if 0 - uint32_t curr_l, max_curr_l; -#endif - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl) { - pr_err("failed\n"); - return -EINVAL; - } - - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - pr_err("MSM_CAMERA_LED_OFF\n"); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - -#endif -#if defined(CONFIG_FLED_SM5701) - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - break; -#if 0 - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; -#endif - - case MSM_CAMERA_LED_LOW: - pr_err("MSM_CAMERA_LED_LOW\n"); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } -#endif -#if defined(CONFIG_FLED_SM5701) - sm5701_led_ready(MOVIE_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_MOVIE); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; -#if 0 - if (fctrl->torch_trigger) { - max_curr_l = fctrl->torch_max_current; - if (cfg->torch_current > 0 && - cfg->torch_current < max_curr_l) { - curr_l = cfg->torch_current; - } else { - curr_l = fctrl->torch_op_current; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->torch_trigger, - curr_l); - } - break; -#endif - - case MSM_CAMERA_LED_HIGH: - pr_err("MSM_CAMERA_LED_HIGH\n"); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - rt5033_fled_strobe_critial_section_lock(fled_info); - lock_state = true; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - -#endif -#if defined(CONFIG_FLED_SM5701) - sm5701_led_ready(FLASH_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_FLASH); -#else - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; -#if 0 - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) { - max_curr_l = fctrl->flash_max_current[i]; - if (cfg->flash_current[i] > 0 && - cfg->flash_current[i] < max_curr_l) { - curr_l = cfg->flash_current[i]; - } else { - curr_l = fctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->flash_trigger[i], - curr_l); - } - break; -#endif - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - CDBG("MSM_CAMERA_LED_INIT\n"); -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) - - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - } else { - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } - } -#endif -#if defined(CONFIG_FLED_SM5701) - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#endif - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; - - default: - pr_err("LED state error!\n"); - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} - -static const struct of_device_id msm_led_trigger_dt_match[] = { - {.compatible = "qcom,camera-led-flash"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_led_trigger_dt_match); - -static struct platform_driver msm_led_trigger_driver = { - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_led_trigger_dt_match, - }, -}; - -static int32_t msm_led_trigger_probe(struct platform_device *pdev) -{ - int32_t rc = 0, rc_1 = 0, i = 0; - struct device_node *of_node = pdev->dev.of_node; - struct device_node *flash_src_node = NULL; - uint32_t count = 0; - struct led_trigger *temp = NULL; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl.pdev = pdev; - fctrl.num_sources = 0; - - rc = of_property_read_u32(of_node, "cell-index", &pdev->id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - CDBG("pdev id %d\n", pdev->id); - - rc = of_property_read_u32(of_node, - "qcom,flash-type", &flashtype); - if (rc < 0) { - pr_err("flash-type: read failed\n"); - return -EINVAL; - } - - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl.num_sources = count; - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.flash_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl.flash_trigger_name[i]); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.flash_op_current[i] = LED_FULL; - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.flash_op_current[i]); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.flash_max_current[i]); - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl.flash_op_current[i]); - - led_trigger_register_simple(fctrl.flash_trigger_name[i], - &fctrl.flash_trigger[i]); - - if (flashtype == GPIO_FLASH) - if (fctrl.flash_trigger[i]) - temp = fctrl.flash_trigger[i]; - } - - /* Torch source */ - flash_src_node = of_parse_phandle(of_node, "qcom,torch-source", - 0); - if (flash_src_node) { - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.torch_trigger_name); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - goto torch_failed; - } - - CDBG("default trigger %s\n", - fctrl.torch_trigger_name); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.torch_op_current = LED_HALF; - if (temp) - fctrl.torch_trigger = temp; - else - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.torch_op_current); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.torch_max_current); - - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - goto torch_failed; - } - - CDBG("torch max_current %d\n", - fctrl.torch_op_current); - - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } -torch_failed: - of_node_put(flash_src_node); - } - } - - rc = msm_led_flash_create_v4lsubdev(pdev, &fctrl); - if (!rc) { - msm_led_torch_create_classdev(pdev, &fctrl); - } - - return rc; -} - -static int __init msm_led_trigger_add_driver(void) -{ - CDBG("called\n"); - return platform_driver_probe(&msm_led_trigger_driver, - msm_led_trigger_probe); -} - -static struct msm_flash_fn_t msm_led_trigger_func_tbl = { - .flash_get_subdev_id = msm_led_trigger_get_subdev_id, - .flash_led_config = msm_led_trigger_config, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .func_tbl = &msm_led_trigger_func_tbl, -}; -#if defined(CONFIG_FLED_SM5703) -int set_led_flash(int mode) -{ - struct msm_camera_led_cfg_t cfg; - int rc = 0; - cfg.cfgtype = mode; - - if (led_prev_mode && mode) - return -1; - - rc = msm_led_trigger_config(&fctrl, &mode); - - if (rc == 0) - led_prev_mode = mode; - - return rc; -} -EXPORT_SYMBOL(set_led_flash); -#endif -module_init(msm_led_trigger_add_driver); -MODULE_DESCRIPTION("LED TRIGGER FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0310.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0310.c deleted file mode 100644 index 1dbb45750bad..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0310.c +++ /dev/null @@ -1,1207 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define GC0310_SENSOR_NAME "gc0310" -#define PLATFORM_DRIVER_NAME "msm_camera_gc0310" -#define gc0310_obj gc0310_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(gc0310_mut); -static struct msm_sensor_ctrl_t gc0310_s_ctrl; - -static struct msm_sensor_power_setting gc0310_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = { - {0xfe, 0xf0}, - {0xfe, 0xf0}, - {0xfe, 0x00}, - {0xfc, 0x0e}, - {0xfc, 0x0e}, - {0xf2, 0x80}, - {0xf3, 0x00}, - {0xf7, 0x1f}, - {0xf8, 0x03}, - {0xf9, 0x8e}, - {0xfa, 0x11}, - - /* CISCTL reg */ - {0x00, 0x2f}, - {0x01, 0x0f}, - {0x02, 0x04}, - {0x03, 0x02}, - {0x04, 0x58}, - {0x05, 0x00}, - {0x06, 0xde}, - {0x07, 0x00}, - {0x08, 0x24}, - {0x09, 0x00}, - {0x0a, 0x00}, - {0x0b, 0x00}, - {0x0c, 0x06}, - {0x0d, 0x01}, - {0x0e, 0xe8}, - {0x0f, 0x02}, - {0x10, 0x88}, - {0x16, 0x00}, - {0x17, 0x14}, - {0x18, 0x1a}, - {0x19, 0x14}, - {0x1b, 0x48}, - {0x1e, 0x6b}, - {0x1f, 0x28}, - {0x20, 0x89}, - {0x21, 0x49}, - {0x22, 0xb0}, - {0x23, 0x04}, - {0x24, 0x16}, - {0x34, 0x20}, - - /* BLK */ - {0x26, 0x23}, - {0x28, 0xff}, - {0x29, 0x00}, - {0x33, 0x18}, - {0x37, 0x20}, - {0x47, 0x80}, - {0x4e, 0x66}, - {0xa8, 0x02}, - {0xa9, 0x80}, - - /* ISP reg */ - {0x40, 0xff}, - {0x41, 0x21}, - {0x42, 0xcf}, - {0x44, 0x02}, - {0x46, 0x06}, - {0x4a, 0x11}, - {0x4b, 0x01}, - {0x4c, 0x20}, - {0x4d, 0x05}, - {0x4f, 0x01}, - {0x50, 0x01}, - {0x55, 0x01}, - {0x56, 0xe0}, - {0x57, 0x02}, - {0x58, 0x80}, - - /* GAIN */ - {0x70, 0x50}, - {0x5a, 0x98}, - {0x5b, 0xdc}, - {0x5c, 0xfe}, - {0x77, 0x74}, - {0x78, 0x40}, - {0x79, 0x5f}, - - /* DNDD */ - {0x82, 0x0a}, - {0x83, 0x0b}, - - /* EEINTP */ - {0x8f, 0xff}, - {0x90, 0x8c}, - {0x91, 0x90}, - {0x92, 0x18}, - {0x93, 0x10}, - {0x95, 0x43}, - {0x96, 0x82}, - - /* ASDE */ - {0xfe, 0x00}, - {0x9a, 0x20}, - {0x9b, 0x80}, - {0x9c, 0x40}, - {0x9d, 0x80}, - {0xa1, 0x30}, - {0xa2, 0x32}, - {0xa4, 0x30}, - {0xa5, 0x28}, - {0xaa, 0x50}, - {0xac, 0x24}, - - /* GAMMA */ - {0xbf, 0x0d}, - {0xc0, 0x26}, - {0xc1, 0x3d}, - {0xc2, 0x52}, - {0xc3, 0x66}, - {0xc4, 0x75}, - {0xc5, 0x82}, - {0xc6, 0x99}, - {0xc7, 0xab}, - {0xc8, 0xb9}, - {0xc9, 0xc6}, - {0xca, 0xd1}, - {0xcb, 0xda}, - {0xcc, 0xe1}, - {0xcd, 0xec}, - {0xce, 0xf5}, - {0xcf, 0xfb}, - - /* YCP */ - {0xd0, 0x40}, - {0xd1, 0x30}, - {0xd2, 0x30}, - {0xd3, 0x48}, - {0xfe, 0x00}, - {0xd6, 0xf2}, - {0xd7, 0x1b}, - {0xdd, 0x71}, - {0x7c, 0x80}, - - /* AEC */ - {0xfe, 0x01}, - {0x05, 0x30}, - {0x06, 0x75}, - {0x07, 0x40}, - {0x08, 0xb0}, - {0x0a, 0xc5}, - {0x0b, 0x11}, - {0x0c, 0x00}, - {0x12, 0x52}, - {0x13, 0x30}, - {0x18, 0x95}, - {0x19, 0x95}, - {0x1e, 0x41}, - {0x1f, 0x30}, - {0x20, 0x40}, - - {0x25, 0x00}, - {0x26, 0x83}, - {0x27, 0x02}, - {0x28, 0x0c}, - {0x29, 0x03}, - {0x2a, 0x12}, - {0x2b, 0x04}, - {0x2c, 0x18}, - {0x2d, 0x0a}, - {0x2e, 0x3c}, - - {0x3c, 0x20}, - {0x3e, 0x40}, - {0x3f, 0x5c}, - {0x40, 0x7b}, - {0x41, 0xbd}, - {0x42, 0xf6}, - {0x43, 0x63}, - - {0x03, 0x60}, - - {0x44, 0x03}, - - /* AWB */ - {0x1c, 0x91}, - {0x21, 0x15}, - {0x50, 0x80}, - {0x56, 0x06}, - {0x59, 0x08}, - {0x5b, 0x02}, - {0x61, 0x8d}, - {0x62, 0xa7}, - {0x63, 0xd0}, - {0x65, 0x06}, - {0x66, 0x06}, - {0x67, 0x84}, - {0x69, 0x08}, - {0x6a, 0x50}, - {0x6b, 0x01}, - {0x6c, 0x00}, - {0x6d, 0x02}, - {0x6e, 0xf0}, - {0x6f, 0x90}, - - {0x78, 0xaf}, - {0x79, 0x70}, - {0x7a, 0x58}, - {0x7b, 0x60}, - {0x7c, 0x0c}, - {0x86, 0x00}, - {0x87, 0x00}, - {0x8b, 0x00}, - {0x8c, 0x00}, - {0x8a, 0x06}, - {0x8f, 0x00}, - - /*awb*/ - {0x90, 0x00}, - {0x91, 0x00}, - {0x92, 0xf0}, - {0x93, 0xd9}, - {0x95, 0x21}, - {0x96, 0xf0}, - {0x97, 0x3e}, - {0x98, 0x21}, - {0x9a, 0x3e}, - {0x9b, 0x21}, - {0x9c, 0x70}, - {0x9d, 0x3e}, - {0x9f, 0x00}, - {0xa0, 0x00}, - {0xa1, 0x00}, - {0xa2, 0x00}, - {0x86, 0x00}, - {0x87, 0x00}, - {0x88, 0x00}, - {0x89, 0x00}, - {0xa4, 0x00}, - {0xa5, 0x00}, - {0xa6, 0xbe}, - {0xa7, 0x9c}, - {0xa9, 0xbe}, - {0xaa, 0x9a}, - {0xab, 0xb3}, - {0xac, 0x9e}, - {0xae, 0xcb}, - {0xaf, 0xb3}, - {0xb0, 0xcf}, - {0xb1, 0xa1}, - {0xb3, 0x00}, - {0xb4, 0x00}, - {0xb5, 0x00}, - {0xb6, 0x00}, - {0x8b, 0x00}, - {0x8c, 0x00}, - {0x8d, 0x00}, - {0x8e, 0x00}, - {0x94, 0x56}, - {0x99, 0xa6}, - {0x9e, 0xaa}, - {0xa3, 0x00}, - {0x8a, 0x00}, - {0xa8, 0x50}, - {0xad, 0x55}, - {0xb2, 0x55}, - {0xb7, 0x00}, - {0x8f, 0x00}, - {0xb8, 0xdd}, - {0xb9, 0x80}, - - /*CC*/ - {0xfe, 0x01}, - {0xd0, 0x38}, - {0xd1, 0xf0}, - {0xd2, 0xfe}, - {0xd3, 0x00}, - {0xd4, 0x57}, - {0xd5, 0xfa}, - {0xd6, 0x3f}, - {0xd7, 0xf8}, - {0xd8, 0x05}, - {0xd9, 0x08}, - {0xda, 0x38}, - {0xdb, 0xe9}, - - /* LSC */ - {0xfe, 0x01}, - {0x76, 0x80}, - {0xc1, 0x3c}, - {0xc2, 0x50}, - {0xc3, 0x00}, - {0xc4, 0x4b}, - {0xc5, 0x38}, - {0xc6, 0x36}, - {0xc7, 0x24}, - {0xc8, 0x00}, - {0xc9, 0x00}, - {0xdc, 0x20}, - {0xdd, 0x10}, - {0xdf, 0x00}, - {0xde, 0x00}, - - /* Histogram */ - {0x01, 0x10}, - {0x0b, 0x31}, - {0x0e, 0x6c}, - {0x0f, 0x0f}, - {0x10, 0x6e}, - {0x12, 0xa0}, - {0x15, 0x40}, - {0x16, 0x60}, - {0x17, 0x20}, - - /* Measure Window */ - {0xcc, 0x10}, - {0xcd, 0x10}, - {0xce, 0xa0}, - {0xcf, 0xe0}, - - /* dark sun */ - {0x45, 0xf7}, - {0x46, 0xff}, - {0x47, 0x15}, - {0x48, 0x03}, - {0x4f, 0x60}, - - /* MIPI */ - {0xfe, 0x03}, - {0x01, 0x03}, - {0x02, 0x22}, - {0x03, 0x94}, - {0x04, 0x01}, - {0x05, 0x00}, - {0x06, 0x80}, - {0x10, 0x84}, - {0x11, 0x1e}, - {0x12, 0x00}, - {0x13, 0x05}, - {0x15, 0x10}, - {0x17, 0xf0}, - /* 1/24M= 42ns */ - {0x21, 0x02}, - {0x22, 0x02}, - {0x23, 0x04}, - {0x24, 0x10}, - {0x29, 0x02}, - {0x2a, 0x04}, - {0xfe, 0x00}, - -}; - -static struct msm_camera_i2c_reg_setting gc0310_recommend_setting[] = { - { - .reg_setting = gc0310_recommend_setting_list, - .size = ARRAY_SIZE(gc0310_recommend_setting_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info gc0310_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_start_settings_list[] = { - {0xfe, 0x03,}, - {0x10, 0x94,}, - {0xfe, 0x00,}, -}; - -static struct msm_camera_i2c_reg_setting gc0310_start_settings[] = { - { - .reg_setting = gc0310_start_settings_list, - .size = ARRAY_SIZE(gc0310_start_settings_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_stop_settings_list[] = { - {0xfe, 0x03,}, - {0x10, 0x84,}, - {0xfe, 0x00,}, -}; - -static struct msm_camera_i2c_reg_setting gc0310_stop_settings[] = { - { - .reg_setting = gc0310_stop_settings_list, - .size = ARRAY_SIZE(gc0310_stop_settings_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static const struct i2c_device_id gc0310_i2c_id[] = { - {GC0310_SENSOR_NAME, (kernel_ulong_t)&gc0310_s_ctrl}, - { } -}; - -static int32_t msm_gc0310_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0310_s_ctrl); -} - -static struct i2c_driver gc0310_i2c_driver = { - .id_table = gc0310_i2c_id, - .probe = msm_gc0310_i2c_probe, - .driver = { - .name = GC0310_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0310_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id gc0310_dt_match[] = { - {.compatible = "shinetech,gc0310", .data = &gc0310_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0310_dt_match); - -static int32_t gc0310_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(gc0310_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver gc0310_platform_driver = { - .driver = { - .name = "shinetech,gc0310", - .owner = THIS_MODULE, - .of_match_table = gc0310_dt_match, - }, - .probe = gc0310_platform_probe, -}; - -static int __init gc0310_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = i2c_add_driver(&gc0310_i2c_driver); - if (!rc) - return rc; - pr_err("%s:%d rc \n", __func__, __LINE__); - return platform_driver_register(&gc0310_platform_driver); -} - -static void __exit gc0310_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (gc0310_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0310_s_ctrl); - platform_driver_unregister(&gc0310_platform_driver); - } else - i2c_del_driver(&gc0310_i2c_driver); - return; -} - -int32_t gc0310_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - pr_err("%s:%d res =%d\n gc0310_recommend_setting ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_stop_settings); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_start_settings); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - pr_err("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info *sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - sensor_slave_info = kmalloc(sizeof(struct msm_camera_sensor_slave_info) - * 1, GFP_KERNEL); - - if (!sensor_slave_info) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - if (copy_from_user(sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info->slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info->slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info->addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info->power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info->power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_COMPAT -int32_t gc0310_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - pr_err("%s:%d res =%d\n gc0310_recommend_setting ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_stop_settings); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_start_settings); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - pr_err("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info *sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - sensor_slave_info = kmalloc(sizeof(struct msm_camera_sensor_slave_info) - * 1, GFP_KERNEL); - - if (!sensor_slave_info) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - if (copy_from_user(sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info->slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info->slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info->addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info->power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info->power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} -#endif - -static struct msm_sensor_fn_t gc0310_sensor_func_tbl = { - .sensor_config = gc0310_sensor_config, -#ifdef CONFIG_COMPAT - .sensor_config32 = gc0310_sensor_config32, -#endif - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t gc0310_s_ctrl = { - .sensor_i2c_client = &gc0310_sensor_i2c_client, - .power_setting_array.power_setting = gc0310_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0310_power_setting), - .msm_sensor_mutex = &gc0310_mut, - .sensor_v4l2_subdev_info = gc0310_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0310_subdev_info), - .func_tbl = &gc0310_sensor_func_tbl, -}; - -module_init(gc0310_init_module); -module_exit(gc0310_exit_module); -MODULE_DESCRIPTION("Aptina 0.3MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0339.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0339.c deleted file mode 100644 index bada8365fc4c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/gc0339.c +++ /dev/null @@ -1,704 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" - - -#define GC0339_SENSOR_NAME "gc0339" -DEFINE_MSM_MUTEX(gc0339_mut); - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl; - -static struct msm_sensor_power_setting gc0339_power_setting[] = { - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info gc0339_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_gc0339_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0339_s_ctrl); -} - -static const struct i2c_device_id gc0339_i2c_id[] = { - {GC0339_SENSOR_NAME, (kernel_ulong_t)&gc0339_s_ctrl}, - { } -}; - -static struct i2c_driver gc0339_i2c_driver = { - .id_table = gc0339_i2c_id, - .probe = msm_gc0339_i2c_probe, - .driver = { - .name = GC0339_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0339_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -int32_t gc0339_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - gpio_conf->cam_gpiomux_conf_tbl, - gpio_conf->cam_gpiomux_conf_tbl_size); - } - - rc = msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - for (index = 0; index < power_setting_array->size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= - power_info->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - power_info->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - power_info->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - pr_debug("%s:%d gpio set val %d\n", __func__, __LINE__, - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x10, MSM_CAMERA_I2C_BYTE_DATA); - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) { - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - goto power_up_failed; - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - return rc; -} - -int32_t gc0339_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x01, MSM_CAMERA_I2C_BYTE_DATA); - - for (index = (power_setting_array->size - 1); index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - CDBG("%s exit\n", __func__); - return 0; -} - -int32_t gc0339_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.addr_type == MSM_CAMERA_I2C_WORD_ADDR - || conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA - || !conf_array.size) - break; - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static struct msm_sensor_fn_t gc0339_sensor_fn_t = { - .sensor_power_up = gc0339_power_up, - .sensor_power_down = gc0339_power_down, - .sensor_match_id = gc0339_match_id, - .sensor_config = gc0339_config, -}; - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl = { - .sensor_i2c_client = &gc0339_sensor_i2c_client, - .power_setting_array.power_setting = gc0339_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0339_power_setting), - .msm_sensor_mutex = &gc0339_mut, - .sensor_v4l2_subdev_info = gc0339_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0339_subdev_info), - .func_tbl = &gc0339_sensor_fn_t, -}; - -static const struct of_device_id gc0339_dt_match[] = { - {.compatible = "shinetech,gc0339", .data = &gc0339_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0339_dt_match); - -static struct platform_driver gc0339_platform_driver = { - .driver = { - .name = "shinetech,gc0339", - .owner = THIS_MODULE, - .of_match_table = gc0339_dt_match, - }, -}; - -static int32_t gc0339_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(gc0339_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init gc0339_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&gc0339_platform_driver, - gc0339_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&gc0339_i2c_driver); -} - -static void __exit gc0339_exit_module(void) -{ - if (gc0339_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0339_s_ctrl); - platform_driver_unregister(&gc0339_platform_driver); - } else - i2c_del_driver(&gc0339_i2c_driver); - return; -} - -module_init(gc0339_init_module); -module_exit(gc0339_exit_module); -MODULE_DESCRIPTION("gc0339"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/hi256.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/hi256.c deleted file mode 100644 index e61f57a3927d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/hi256.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define HI256_SENSOR_NAME "hi256" -#define PLATFORM_DRIVER_NAME "msm_camera_hi256" - -#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(hi256_mut); -static struct msm_sensor_ctrl_t hi256_s_ctrl; - -static struct msm_sensor_power_setting hi256_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_uxga_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x0a}, - {0x22, 0x00}, - {0x23, 0x0a}, - {0x40, 0x01}, - {0x41, 0x68}, - {0x42, 0x00}, - {0x43, 0x12}, - {0x03, 0x10}, - {0x3f, 0x00}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0xfd}, - {0x03, 0x00}, - {0x10, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x0c}, - {0x31, 0x80}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_start_settings[] = { - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_stop_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, -}; - -static struct msm_camera_i2c_reg_conf hi256_recommend_settings[] = { - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - - {0x08, 0x0f}, - {0x0a, 0x00}, - - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - - {0x03, 0x00}, - {0x10, 0x13}, - {0x11, 0x90}, /* no H/V flip */ - {0x12, 0x00}, - {0x0b, 0xaa}, - {0x0c, 0xaa}, - {0x0d, 0xaa}, - {0x20, 0x00}, - {0x21, 0x06}, - {0x22, 0x00}, - {0x23, 0x05}, - {0x24, 0x04}, - {0x25, 0xb0}, - {0x26, 0x06}, - {0x27, 0x40}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x45, 0x04}, - {0x46, 0x18}, - {0x47, 0xd8}, - {0x80, 0x2e}, - {0x81, 0x7e}, - {0x82, 0x90}, - {0x83, 0x00}, - {0x84, 0x0c}, - {0x85, 0x00}, - {0x90, 0x0c}, - {0x91, 0x0c}, - {0x92, 0x78}, - {0x93, 0x70}, - {0x94, 0xff}, - {0x95, 0xff}, - {0x96, 0xdc}, - {0x97, 0xfe}, - {0x98, 0x38}, - {0xa0, 0x45}, - {0xa2, 0x45}, - {0xa4, 0x45}, - {0xa6, 0x45}, - {0xa8, 0x45}, - {0xaa, 0x45}, - {0xac, 0x45}, - {0xae, 0x45}, - {0x99, 0x43}, - {0x9a, 0x43}, - {0x9b, 0x43}, - {0x9c, 0x43}, - {0x03, 0x02}, - {0x12, 0x03}, - {0x13, 0x03}, - {0x15, 0x00}, - {0x16, 0x00}, - {0x17, 0x8C}, - {0x18, 0x4c}, - {0x19, 0x00}, - {0x1a, 0x39}, - {0x1c, 0x09}, - {0x1d, 0x40}, - {0x1e, 0x30}, - {0x1f, 0x10}, - {0x20, 0x77}, - {0x21, 0x6d}, - {0x22, 0x77}, - {0x23, 0x30}, - {0x24, 0x77}, - {0x27, 0x3c}, - {0x2b, 0x80}, - {0x2e, 0x00}, - {0x2f, 0x00}, - {0x30, 0x05}, - {0x50, 0x20}, - {0x52, 0x01}, - {0x53, 0xc1}, - {0x55, 0x1c}, - {0x56, 0x11}, - {0x58, 0x22}, - {0x59, 0x20}, - {0x5d, 0xa2}, - {0x5e, 0x5a}, - {0x60, 0x87}, - {0x61, 0x99}, - {0x62, 0x88}, - {0x63, 0x97}, - {0x64, 0x88}, - {0x65, 0x97}, - {0x67, 0x0c}, - {0x68, 0x0c}, - {0x69, 0x0c}, - {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}, - {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}, - {0xd4, 0x0c}, - {0xd5, 0x0c}, - {0xd6, 0x78}, - {0xd7, 0x70}, - {0xe0, 0xc4}, - {0xe1, 0xc4}, - {0xe2, 0xc4}, - {0xe3, 0xc4}, - {0xe4, 0x00}, - {0xe8, 0x80}, - {0xe9, 0x40}, - {0xea, 0x7f}, - {0xf0, 0xc1}, - {0xf1, 0xc1}, - {0xf2, 0xc1}, - {0xf3, 0xc1}, - {0xf4, 0xc1}, - {0x03, 0x03}, - {0x10, 0x10}, - {0x03, 0x10}, - {0x10, 0x03}, - {0x12, 0x30}, - {0x13, 0x02}, - {0x20, 0x00}, - {0x30, 0x00}, - {0x31, 0x00}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x30}, - {0x35, 0x00}, - {0x36, 0x00}, - {0x38, 0x00}, - {0x3e, 0x58}, - {0x3f, 0x00}, - {0x40, 0x80}, - {0x41, 0x00}, - {0x48, 0x95}, - {0x60, 0x67}, - {0x61, 0x88}, - {0x62, 0x90}, - {0x63, 0x50}, - {0x64, 0x41}, - {0x66, 0x42}, - {0x67, 0x20}, - {0x6a, 0x71}, - {0x6b, 0x84}, - {0x6c, 0x72}, - {0x6d, 0x83}, - {0x03, 0x11}, - {0x10, 0x7f}, - {0x11, 0x40}, - {0x12, 0x0a}, - {0x13, 0xbb}, - {0x26, 0x31}, - {0x27, 0x34}, - {0x28, 0x0f}, - {0x29, 0x10}, - {0x2b, 0x30}, - {0x2c, 0x32}, - {0x30, 0x70}, - {0x31, 0x10}, - {0x32, 0x58}, - {0x33, 0x09}, - {0x34, 0x06}, - {0x35, 0x03}, - {0x36, 0x70}, - {0x37, 0x18}, - {0x38, 0x58}, - {0x39, 0x09}, - {0x3a, 0x06}, - {0x3b, 0x03}, - {0x3c, 0x80}, - {0x3d, 0x18}, - {0x3e, 0x80}, - {0x3f, 0x0c}, - {0x40, 0x05}, - {0x41, 0x06}, - {0x42, 0x80}, - {0x43, 0x18}, - {0x44, 0x80}, - {0x45, 0x0c}, - {0x46, 0x05}, - {0x47, 0x06}, - {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, 0x18}, - {0x5b, 0x00}, - {0x5c, 0x00}, - {0x60, 0x3f}, - {0x62, 0x60}, - {0x70, 0x06}, - {0x03, 0x12}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x25, 0x00}, - {0x28, 0x00}, - {0x29, 0x00}, - {0x2a, 0x00}, - {0x30, 0x50}, - {0x31, 0x18}, - {0x32, 0x32}, - {0x33, 0x40}, - {0x34, 0x50}, - {0x35, 0x70}, - {0x36, 0xa0}, - {0x40, 0xa0}, - {0x41, 0x40}, - {0x42, 0xa0}, - {0x43, 0x90}, - {0x44, 0x90}, - {0x45, 0x80}, - {0x46, 0xb0}, - {0x47, 0x55}, - {0x48, 0xa0}, - {0x49, 0x90}, - {0x4a, 0x90}, - {0x4b, 0x80}, - {0x4c, 0xb0}, - {0x4d, 0x40}, - {0x4e, 0x90}, - {0x4f, 0x60}, - {0x50, 0xa0}, - {0x51, 0x80}, - {0x52, 0xb0}, - {0x53, 0x40}, - {0x54, 0x90}, - {0x55, 0x60}, - {0x56, 0xa0}, - {0x57, 0x80}, - {0x58, 0x90}, - {0x59, 0x40}, - {0x5a, 0xd0}, - {0x5b, 0xd0}, - {0x5c, 0xe0}, - {0x5d, 0x80}, - {0x5e, 0x88}, - {0x5f, 0x40}, - {0x60, 0xe0}, - {0x61, 0xe0}, - {0x62, 0xe0}, - {0x63, 0x80}, - {0x70, 0x15}, - {0x71, 0x01}, - {0x72, 0x18}, - {0x73, 0x01}, - {0x74, 0x25}, - {0x75, 0x15}, - {0x80, 0x20}, - {0x81, 0x40}, - {0x82, 0x65}, - {0x85, 0x1a}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x90, 0x5d}, - {0xD0, 0x0c}, - {0xD1, 0x80}, - {0xD2, 0x17}, - {0xD3, 0x00}, - {0xD4, 0x00}, - {0xD5, 0x0f}, - {0xD6, 0xff}, - {0xD7, 0xff}, - {0x3b, 0x06}, - {0x3c, 0x06}, - {0xc5, 0x00}, - {0xc6, 0x00}, - {0x03, 0x13}, - {0x10, 0xcb}, - {0x11, 0x7b}, - {0x12, 0x07}, - {0x14, 0x00}, - {0x20, 0x15}, - {0x21, 0x13}, - {0x22, 0x33}, - {0x23, 0x05}, - {0x24, 0x09}, - {0x25, 0x0a}, - {0x26, 0x18}, - {0x27, 0x30}, - {0x29, 0x12}, - {0x2a, 0x50}, - {0x2b, 0x02}, - {0x2c, 0x02}, - {0x25, 0x06}, - {0x2d, 0x0c}, - {0x2e, 0x12}, - {0x2f, 0x12}, - {0x50, 0x10}, - {0x51, 0x14}, - {0x52, 0x12}, - {0x53, 0x0c}, - {0x54, 0x0f}, - {0x55, 0x0c}, - {0x56, 0x10}, - {0x57, 0x13}, - {0x58, 0x12}, - {0x59, 0x0c}, - {0x5a, 0x0f}, - {0x5b, 0x0c}, - {0x5c, 0x25}, - {0x5d, 0x25}, - {0x5e, 0x25}, - {0x5f, 0x25}, - {0x60, 0x25}, - {0x61, 0x25}, - {0x62, 0x25}, - {0x63, 0x25}, - {0x64, 0x25}, - {0x65, 0x25}, - {0x66, 0x25}, - {0x67, 0x25}, - {0x68, 0x07}, - {0x69, 0x07}, - {0x6a, 0x07}, - {0x6b, 0x05}, - {0x6c, 0x05}, - {0x6d, 0x05}, - {0x6e, 0x07}, - {0x6f, 0x07}, - {0x70, 0x07}, - {0x71, 0x05}, - {0x72, 0x05}, - {0x73, 0x05}, - {0x80, 0x01}, - {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}, - {0x03, 0x14}, - {0x10, 0x11}, - {0x14, 0x80}, - {0x15, 0x80}, - {0x16, 0x80}, - {0x17, 0x80}, - {0x18, 0x80}, - {0x19, 0x80}, - {0x20, 0x80}, - {0x21, 0x80}, - {0x22, 0x80}, - {0x23, 0x80}, - {0x24, 0x80}, - {0x30, 0xc8}, - {0x31, 0x2b}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x90}, - {0x40, 0x32}, - {0x50, 0x21}, - {0x60, 0x19}, - {0x70, 0x21}, - {0x03, 0x15}, - {0x10, 0x0f}, - {0x14, 0x46}, - {0x15, 0x36}, - {0x16, 0x26}, - {0x17, 0x2f}, - {0x30, 0x8f}, - {0x31, 0x59}, - {0x32, 0x0a}, - {0x33, 0x15}, - {0x34, 0x5b}, - {0x35, 0x06}, - {0x36, 0x07}, - {0x37, 0x40}, - {0x38, 0x87}, - {0x40, 0x94}, - {0x41, 0x20}, - {0x42, 0x89}, - {0x43, 0x84}, - {0x44, 0x03}, - {0x45, 0x01}, - {0x46, 0x88}, - {0x47, 0x9c}, - {0x48, 0x28}, - {0x50, 0x02}, - {0x51, 0x82}, - {0x52, 0x00}, - {0x53, 0x07}, - {0x54, 0x11}, - {0x55, 0x98}, - {0x56, 0x00}, - {0x57, 0x0b}, - {0x58, 0x8b}, - {0x80, 0x03}, - {0x85, 0x40}, - {0x87, 0x02}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x8a, 0x00}, - {0x03, 0x16}, - {0x10, 0x31}, - {0x18, 0x5e}, - {0x19, 0x5d}, - {0x1a, 0x0e}, - {0x1b, 0x01}, - {0x1c, 0xdc}, - {0x1d, 0xfe}, - {0x30, 0x00}, - {0x31, 0x0a}, - {0x32, 0x1f}, - {0x33, 0x33}, - {0x34, 0x53}, - {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}, - {0x50, 0x00}, - {0x51, 0x08}, - {0x52, 0x1e}, - {0x53, 0x36}, - {0x54, 0x5a}, - {0x55, 0x75}, - {0x56, 0x8d}, - {0x57, 0xa1}, - {0x58, 0xb2}, - {0x59, 0xbe}, - {0x5a, 0xc9}, - {0x5b, 0xd2}, - {0x5c, 0xdb}, - {0x5d, 0xe3}, - {0x5e, 0xeb}, - {0x5f, 0xf0}, - {0x60, 0xf5}, - {0x61, 0xf7}, - {0x62, 0xf8}, - {0x70, 0x00}, - {0x71, 0x08}, - {0x72, 0x17}, - {0x73, 0x2f}, - {0x74, 0x53}, - {0x75, 0x6c}, - {0x76, 0x81}, - {0x77, 0x94}, - {0x78, 0xa4}, - {0x79, 0xb3}, - {0x7a, 0xc0}, - {0x7b, 0xcb}, - {0x7c, 0xd5}, - {0x7d, 0xde}, - {0x7e, 0xe6}, - {0x7f, 0xee}, - {0x80, 0xf4}, - {0x81, 0xfa}, - {0x82, 0xff}, - {0x03, 0x17}, - {0x10, 0xf7}, - {0xC4, 0x66}, - {0xC5, 0x55}, - {0x03, 0x20}, - {0x11, 0x1c}, - {0x18, 0x30}, - {0x1a, 0x08}, - {0x20, 0x05}, - {0x21, 0x30}, - {0x22, 0x10}, - {0x23, 0x00}, - {0x24, 0x00}, - {0x28, 0xe7}, - {0x29, 0x0d}, - {0x2a, 0xf0}, - {0x2b, 0x34}, - {0x30, 0x78}, - {0x2c, 0xc2}, - {0x2d, 0xff}, - {0x2e, 0x33}, - {0x30, 0x78}, - {0x32, 0x03}, - {0x33, 0x2e}, - {0x34, 0x30}, - {0x35, 0xd4}, - {0x36, 0xfe}, - {0x37, 0x32}, - {0x38, 0x04}, - {0x39, 0x22}, - {0x3a, 0xde}, - {0x3b, 0x22}, - {0x3c, 0xde}, - {0x50, 0x45}, - {0x51, 0x88}, - {0x56, 0x03}, - {0x57, 0xf7}, - {0x58, 0x14}, - {0x59, 0x88}, - {0x5a, 0x04}, - {0x60, 0xaa}, - {0x61, 0xaa}, - {0x62, 0xaa}, - {0x63, 0xaa}, - {0x64, 0xaa}, - {0x65, 0xaa}, - {0x66, 0xab}, - {0x67, 0xEa}, - {0x68, 0xab}, - {0x69, 0xEa}, - {0x6a, 0xaa}, - {0x6b, 0xaa}, - {0x6c, 0xaa}, - {0x6d, 0xaa}, - {0x6e, 0xaa}, - {0x6f, 0xaa}, - {0x70, 0x76}, - {0x71, 0x80}, - {0x76, 0x43}, - {0x77, 0x04}, - {0x78, 0x23}, - {0x79, 0x46}, - {0x7a, 0x23}, - {0x7b, 0x22}, - {0x7d, 0x23}, - {0x83, 0x01}, - {0x84, 0x5f}, - {0x85, 0x90}, - {0x86, 0x01}, - {0x87, 0x2c}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x8B, 0x75}, - {0x8C, 0x30}, - {0x8D, 0x61}, - {0x8E, 0x44}, - {0x9c, 0x08}, - {0x9d, 0x34}, - {0x9e, 0x01}, - {0x9f, 0x2c}, - {0xb0, 0x18}, - {0xb1, 0x14}, - {0xb2, 0x80}, - {0xb3, 0x18}, - {0xb4, 0x1a}, - {0xb5, 0x44}, - {0xb6, 0x2f}, - {0xb7, 0x28}, - {0xb8, 0x25}, - {0xb9, 0x22}, - {0xba, 0x21}, - {0xbb, 0x20}, - {0xbc, 0x32}, - {0xbd, 0x30}, - {0xc0, 0x10}, - {0xc1, 0x2b}, - {0xc2, 0x2b}, - {0xc3, 0x2b}, - {0xc4, 0x08}, - {0xc8, 0x40}, - {0xc9, 0x40}, - {0x03, 0x22}, - {0x10, 0xfd}, - {0x11, 0x2e}, - {0x19, 0x01}, - {0x20, 0x10}, - {0x21, 0x80}, - {0x24, 0x01}, - {0x30, 0x80}, - {0x31, 0x80}, - {0x38, 0x11}, - {0x39, 0x34}, - {0x40, 0xfa}, - {0x41, 0x44}, - {0x42, 0x43}, - {0x43, 0xf6}, - {0x44, 0x44}, - {0x45, 0x33}, - {0x46, 0x00}, - {0x50, 0xb2}, - {0x51, 0x81}, - {0x52, 0x98}, - {0x80, 0x38}, - {0x81, 0x20}, - {0x82, 0x38}, - {0x83, 0x5e}, - {0x84, 0x18}, - {0x85, 0x58}, - {0x86, 0x20}, - {0x87, 0x49}, - {0x88, 0x33}, - {0x89, 0x37}, - {0x8a, 0x2a}, - {0x8b, 0x41}, - {0x8c, 0x39}, - {0x8d, 0x34}, - {0x8e, 0x29}, - {0x8f, 0x53}, - {0x90, 0x52}, - {0x91, 0x51}, - {0x92, 0x4e}, - {0x93, 0x46}, - {0x94, 0x3d}, - {0x95, 0x34}, - {0x96, 0x2e}, - {0x97, 0x29}, - {0x98, 0x22}, - {0x99, 0x1c}, - {0x9a, 0x18}, - {0x9b, 0x77}, - {0x9c, 0x77}, - {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}, - {0xb4, 0xea}, - {0xb8, 0xa0}, - {0xb9, 0x00}, - {0x03, 0x48}, - {0x70, 0x03}, - {0x71, 0x30}, - {0x72, 0x81}, - {0x73, 0x10}, - {0x70, 0x85}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x70, 0x95}, - {0x10, 0x1c}, - {0x11, 0x10}, - {0x12, 0x00}, - {0x14, 0x00}, - {0x16, 0x04}, - {0x18, 0x80}, - {0x19, 0x00}, - {0x1a, 0xa0}, - {0x1b, 0x0d}, - {0x1c, 0x01}, - {0x1d, 0x0a}, - {0x1e, 0x07}, - {0x1f, 0x0b}, - {0x23, 0x01}, - {0x24, 0x1e}, - {0x25, 0x00}, - {0x26, 0x00}, - {0x27, 0x08}, - {0x28, 0x00}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x32, 0x13}, - {0x33, 0x0c}, - {0x34, 0x04}, - {0x35, 0x06}, - {0x36, 0x01}, - {0x37, 0x06}, - {0x39, 0x4f}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x0e, 0x03}, - {0x0e, 0x73}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct v4l2_subdev_info hi256_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_svga_settings[] = { - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x10, 0x13}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x04}, - {0x22, 0x00}, - {0x23, 0x07}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x03, 0x10}, - {0x3f, 0x02}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x03, 0x20}, - {0x88, 0x01}, - {0x89, 0x5f}, - {0x8a, 0x90}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, -}; - -static struct msm_camera_i2c_reg_conf hi256_sleep_settings[] = { - - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x02}, - {0x55, 0x10}, - - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_saturation[11][3] = { - { - {0x03, 0x10}, - {0x61, 0x1c}, - {0x62, 0x1c}, - }, - { - {0x03, 0x10}, - {0x61, 0x30}, - {0x62, 0x30}, - }, - { - {0x03, 0x10}, - {0x61, 0x44}, - {0x62, 0x44}, - }, - { - {0x03, 0x10}, - {0x61, 0x58}, - {0x62, 0x58}, - }, - { - {0x03, 0x10}, - {0x61, 0x6c}, - {0x62, 0x6c}, - }, - { - {0x03, 0x10}, - {0x61, 0x80}, - {0x62, 0x80}, - }, - { - {0x03, 0x10}, - {0x61, 0x94}, - {0x62, 0x94}, - }, - { - {0x03, 0x10}, - {0x61, 0xa8}, - {0x62, 0xa8}, - }, - { - {0x03, 0x10}, - {0x61, 0xbc}, - {0x62, 0xbc}, - }, - { - {0x03, 0x10}, - {0x61, 0xd0}, - {0x62, 0xd0}, - }, - { - {0x03, 0x10}, - {0x61, 0xe4}, - {0x62, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_contrast[11][3] = { - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x1c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x30}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x44}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x58}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x6c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x80}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x94}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xa8}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xbc}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xd0}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_sharpness[7][9] = { - { - {0x03, 0x13}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x00}, - {0x91, 0x00}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 0*/ - { - {0x03, 0x13}, - {0x20, 0x04}, - {0x21, 0x03}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x08}, - {0x91, 0x08}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 1*/ - { - {0x03, 0x13}, - {0x20, 0x08}, - {0x21, 0x07}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x32}, - {0x91, 0x32}, - {0x94, 0x04}, - {0x95, 0x0a}, - }, /* SHARPNESS LEVEL 2*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x09}, - {0x24, 0x11}, - {0x90, 0x05}, - {0x91, 0x05}, - {0x94, 0x10}, - {0x95, 0x5a}, - }, /* SHARPNESS LEVEL 3*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xaf}, - {0x91, 0xaf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 4*/ - { - {0x03, 0x13}, - {0x20, 0x20}, - {0x21, 0x20}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xdf}, - {0x91, 0xdf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 5*/ - { - {0x03, 0x13}, - {0x20, 0x25}, - {0x21, 0x25}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xff}, - {0x91, 0xff}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 6*/ -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_iso[7][3] = { - /* auto */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* auto hjt */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* iso 100 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x1B}, - }, - /* iso 200 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x35}, - }, - /* iso 400 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x65}, - }, - /* iso 800 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x95}, - }, - /* iso 1600 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0xd0}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_exposure_compensation[5][2] = { - /* -2 */ - { - {0x03, 0x10}, - {0x40, 0xa4}, - }, - /* -1 */ - { - {0x03, 0x10}, - {0x40, 0x94}, - }, - /* 0 */ - { - {0x03, 0x10}, - {0x40, 0x80}, - }, - /* 1 */ - { - {0x03, 0x10}, - {0x40, 0x14}, - }, - /* 2 */ - { - {0x03, 0x10}, - {0x40, 0x24}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_antibanding[][2] = { - /* OFF */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, - /* 50Hz */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - }, - /* 60Hz */ - { - {0x03, 0x20}, - {0x10, 0x8c}, - }, - /* AUTO */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_normal[] = { - /* normal: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0X30}, - {0x13, 0x0a}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_black_white[] = { - /* B&W: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x02}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_negative[] = { - /* Negative: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x08}, - {0x13, 0x0a}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_old_movie[] = { - /* Sepia(antique): */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x0a}, - {0x44, 0x25}, - {0x45, 0xa6}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_solarize[] = { - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x0b}, - {0x12, 0x00}, - {0x13, 0x00}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_auto[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_portrait[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_landscape[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_night[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x09}, - {0x89, 0x27}, - {0x8a, 0xc0}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_auto[] = { - /* Auto: */ - {0x03, 0x22}, - {0x11, 0x2e}, - {0x83, 0x60}, - {0x84, 0x0a}, - {0x85, 0x60}, - {0x86, 0x15}, - {0x10, 0xfd}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_sunny[] = { - /* Sunny: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x33}, - {0x82, 0x3d}, - {0x83, 0x2e}, - {0x84, 0x24}, - {0x85, 0x43}, - {0x86, 0x3d}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_cloudy[] = { - /* Cloudy: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x49}, - {0x82, 0x24}, - {0x83, 0x50}, - {0x84, 0x45}, - {0x85, 0x24}, - {0x86, 0x1E}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_office[] = { - /* Office: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x20}, - {0x82, 0x58}, - {0x83, 0x27}, - {0x84, 0x22}, - {0x85, 0x58}, - {0x86, 0x52}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_home[] = { - /* Home: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x29}, - {0x82, 0x54}, - {0x83, 0x2e}, - {0x84, 0x23}, - {0x85, 0x58}, - {0x86, 0x4f}, -}; - - -static const struct i2c_device_id hi256_i2c_id[] = { - {HI256_SENSOR_NAME, (kernel_ulong_t)&hi256_s_ctrl}, - { } -}; - -static int32_t msm_hi256_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &hi256_s_ctrl); -} - -static struct i2c_driver hi256_i2c_driver = { - .id_table = hi256_i2c_id, - .probe = msm_hi256_i2c_probe, - .driver = { - .name = HI256_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client hi256_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id hi256_dt_match[] = { - {.compatible = "shinetech,hi256", .data = &hi256_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, hi256_dt_match); - -static struct platform_driver hi256_platform_driver = { - .driver = { - .name = "shinetech,hi256", - .owner = THIS_MODULE, - .of_match_table = hi256_dt_match, - }, -}; - -static void hi256_i2c_write_table(struct msm_sensor_ctrl_t *s_ctrl, - struct msm_camera_i2c_reg_conf *table, - int num) -{ - int i = 0; - int rc = 0; - for (i = 0; i < num; ++i) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - msleep(100); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - } - table++; - } -} - -static int32_t hi256_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - hi256_i2c_write_table(s_ctrl, &hi256_sleep_settings[0], - ARRAY_SIZE(hi256_sleep_settings)); - return msm_sensor_power_down(s_ctrl); -} - -static int32_t hi256_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(hi256_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init hi256_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&hi256_platform_driver, - hi256_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&hi256_i2c_driver); -} - -static void __exit hi256_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (hi256_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&hi256_s_ctrl); - platform_driver_unregister(&hi256_platform_driver); - } else - i2c_del_driver(&hi256_i2c_driver); - return; -} - -static int32_t hi256_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: hi256 read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -static void hi256_set_stauration(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_saturation[value][0], - ARRAY_SIZE(HI256_reg_saturation[value])); -} - -static void hi256_set_contrast(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_contrast[value][0], - ARRAY_SIZE(HI256_reg_contrast[value])); -} - -static void hi256_set_sharpness(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - int val = value / 6; - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_sharpness[val][0], - ARRAY_SIZE(HI256_reg_sharpness[val])); -} - - -static void hi256_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_iso[value][0], - ARRAY_SIZE(HI256_reg_iso[value])); -} - -static void hi256_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - int val = (value + 12) / 6; - pr_debug("%s %d", __func__, val); - hi256_i2c_write_table(s_ctrl, &HI256_reg_exposure_compensation[val][0], - ARRAY_SIZE(HI256_reg_exposure_compensation[val])); -} - -static void hi256_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_EFFECT_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - break; - } - case MSM_CAMERA_EFFECT_MODE_MONO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_black_white[0], - ARRAY_SIZE(HI256_reg_effect_black_white)); - break; - } - case MSM_CAMERA_EFFECT_MODE_NEGATIVE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_negative[0], - ARRAY_SIZE(HI256_reg_effect_negative)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SEPIA: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_old_movie[0], - ARRAY_SIZE(HI256_reg_effect_old_movie)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SOLARIZE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_solarize[0], - ARRAY_SIZE(HI256_reg_effect_solarize)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - } -} - -static void hi256_set_antibanding(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_antibanding[value][0], - ARRAY_SIZE(HI256_reg_antibanding[value])); -} - -static void hi256_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_SCENE_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - break; - } - case MSM_CAMERA_SCENE_MODE_NIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_night[0], - ARRAY_SIZE(HI256_reg_scene_night)); - break; - } - case MSM_CAMERA_SCENE_MODE_LANDSCAPE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_landscape[0], - ARRAY_SIZE(HI256_reg_scene_landscape)); - break; - } - case MSM_CAMERA_SCENE_MODE_PORTRAIT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_portrait[0], - ARRAY_SIZE(HI256_reg_scene_portrait)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - } -} - -static void hi256_set_white_balance_mode(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_WB_MODE_AUTO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - break; - } - case MSM_CAMERA_WB_MODE_INCANDESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_home[0], - ARRAY_SIZE(HI256_reg_wb_home)); - break; - } - case MSM_CAMERA_WB_MODE_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_sunny[0], - ARRAY_SIZE(HI256_reg_wb_sunny)); - break; - } - case MSM_CAMERA_WB_MODE_FLUORESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_office[0], - ARRAY_SIZE(HI256_reg_wb_office)); - break; - } - case MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_cloudy[0], - ARRAY_SIZE(HI256_reg_wb_cloudy)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - } -} - -int32_t hi256_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("init setting"); - hi256_i2c_write_table(s_ctrl, - &hi256_recommend_settings[0], - ARRAY_SIZE(hi256_recommend_settings)); - CDBG("init setting X"); - break; - case CFG_SET_RESOLUTION: { - int val = 0; - if (copy_from_user(&val, - (void *)cdata->cfg.setting, sizeof(int))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (val == 0) - hi256_i2c_write_table(s_ctrl, &hi256_uxga_settings[0], - ARRAY_SIZE(hi256_uxga_settings)); - else if (val == 1) - hi256_i2c_write_table(s_ctrl, &hi256_svga_settings[0], - ARRAY_SIZE(hi256_svga_settings)); - break; - } - case CFG_SET_STOP_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_stop_settings[0], - ARRAY_SIZE(hi256_stop_settings)); - break; - case CFG_SET_START_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_start_settings[0], - ARRAY_SIZE(hi256_start_settings)); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - hi256_set_stauration(s_ctrl, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - hi256_set_contrast(s_ctrl, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - hi256_set_sharpness(s_ctrl, shp_lev); - break; - } - case CFG_SET_ISO: { - int32_t iso_lev; - if (copy_from_user(&iso_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: ISO Value is %d", __func__, iso_lev); - hi256_set_iso(s_ctrl, iso_lev); - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - int32_t ec_lev; - if (copy_from_user(&ec_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Exposure compensation Value is %d", - __func__, ec_lev); - hi256_set_exposure_compensation(s_ctrl, ec_lev); - break; - } - case CFG_SET_EFFECT: { - int32_t effect_mode; - if (copy_from_user(&effect_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Effect mode is %d", __func__, effect_mode); - hi256_set_effect(s_ctrl, effect_mode); - break; - } - case CFG_SET_ANTIBANDING: { - int32_t antibanding_mode; - if (copy_from_user(&antibanding_mode, - (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: anti-banding mode is %d", __func__, - antibanding_mode); - hi256_set_antibanding(s_ctrl, antibanding_mode); - break; - } - case CFG_SET_BESTSHOT_MODE: { - int32_t bs_mode; - if (copy_from_user(&bs_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: best shot mode is %d", __func__, bs_mode); - hi256_set_scene_mode(s_ctrl, bs_mode); - break; - } - case CFG_SET_WHITE_BALANCE: { - int32_t wb_mode; - if (copy_from_user(&wb_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: white balance is %d", __func__, wb_mode); - hi256_set_white_balance_mode(s_ctrl, wb_mode); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t hi256_sensor_func_tbl = { - .sensor_config = hi256_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = hi256_sensor_power_down, - .sensor_match_id = hi256_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t hi256_s_ctrl = { - .sensor_i2c_client = &hi256_sensor_i2c_client, - .power_setting_array.power_setting = hi256_power_setting, - .power_setting_array.size = ARRAY_SIZE(hi256_power_setting), - .msm_sensor_mutex = &hi256_mut, - .sensor_v4l2_subdev_info = hi256_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(hi256_subdev_info), - .func_tbl = &hi256_sensor_func_tbl, -}; - -module_init(hi256_init_module); -module_exit(hi256_exit_module); -MODULE_DESCRIPTION("Hi256 2MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx132.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx132.c deleted file mode 100644 index f9d057ac403c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx132.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX132_SENSOR_NAME "imx132" -DEFINE_MSM_MUTEX(imx132_mut); - -static struct msm_sensor_ctrl_t imx132_s_ctrl; - -static struct msm_sensor_power_setting imx132_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx132_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SRGGB10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx132_i2c_id[] = { - {IMX132_SENSOR_NAME, (kernel_ulong_t)&imx132_s_ctrl}, - { } -}; - -static int32_t msm_imx132_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx132_s_ctrl); -} -static struct i2c_driver imx132_i2c_driver = { - .id_table = imx132_i2c_id, - .probe = msm_imx132_i2c_probe, - .driver = { - .name = IMX132_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx132_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx132_dt_match[] = { - {.compatible = "qcom,imx132", .data = &imx132_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx132_dt_match); - -static struct platform_driver imx132_platform_driver = { - .driver = { - .name = "qcom,imx132", - .owner = THIS_MODULE, - .of_match_table = imx132_dt_match, - }, -}; - -static int32_t imx132_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx132_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx132_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx132_platform_driver, - imx132_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx132_i2c_driver); -} - -static void __exit imx132_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx132_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx132_s_ctrl); - platform_driver_unregister(&imx132_platform_driver); - } else - i2c_del_driver(&imx132_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx132_s_ctrl = { - .sensor_i2c_client = &imx132_sensor_i2c_client, - .power_setting_array.power_setting = imx132_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx132_power_setting), - .msm_sensor_mutex = &imx132_mut, - .sensor_v4l2_subdev_info = imx132_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx132_subdev_info), -}; - -module_init(imx132_init_module); -module_exit(imx132_exit_module); -MODULE_DESCRIPTION("imx132"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx134.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx134.c deleted file mode 100644 index 17a50889a88a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx134.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX134_SENSOR_NAME "imx134" -DEFINE_MSM_MUTEX(imx134_mut); - -static struct msm_sensor_ctrl_t imx134_s_ctrl; - -static struct msm_sensor_power_setting imx134_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx134_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx134_i2c_id[] = { - {IMX134_SENSOR_NAME, (kernel_ulong_t)&imx134_s_ctrl}, - { } -}; - -static int32_t msm_imx134_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx134_s_ctrl); -} - -static struct i2c_driver imx134_i2c_driver = { - .id_table = imx134_i2c_id, - .probe = msm_imx134_i2c_probe, - .driver = { - .name = IMX134_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx134_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx134_dt_match[] = { - {.compatible = "sne,imx134", .data = &imx134_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx134_dt_match); - -static struct platform_driver imx134_platform_driver = { - .driver = { - .name = "sne,imx134", - .owner = THIS_MODULE, - .of_match_table = imx134_dt_match, - }, -}; - -static int32_t imx134_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx134_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx134_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx134_platform_driver, - imx134_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx134_i2c_driver); -} - -static void __exit imx134_exit_module(void) -{ - pr_debug("%s:%d\n", __func__, __LINE__); - if (imx134_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx134_s_ctrl); - platform_driver_unregister(&imx134_platform_driver); - } else { - i2c_del_driver(&imx134_i2c_driver); - } - return; -} - -static struct msm_sensor_ctrl_t imx134_s_ctrl = { - .sensor_i2c_client = &imx134_sensor_i2c_client, - .power_setting_array.power_setting = imx134_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx134_power_setting), - .msm_sensor_mutex = &imx134_mut, - .sensor_v4l2_subdev_info = imx134_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx134_subdev_info), -}; - -module_init(imx134_init_module); -module_exit(imx134_exit_module); -MODULE_DESCRIPTION("imx134"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx135.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx135.c deleted file mode 100644 index c26e4fffbd4f..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/imx135.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX135_SENSOR_NAME "imx135" -DEFINE_MSM_MUTEX(imx135_mut); - -static struct msm_sensor_ctrl_t imx135_s_ctrl; - -static struct msm_sensor_power_setting imx135_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx135_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx135_i2c_id[] = { - {IMX135_SENSOR_NAME, (kernel_ulong_t)&imx135_s_ctrl}, - { } -}; - -static int32_t msm_imx135_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx135_s_ctrl); -} - -static struct i2c_driver imx135_i2c_driver = { - .id_table = imx135_i2c_id, - .probe = msm_imx135_i2c_probe, - .driver = { - .name = IMX135_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx135_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx135_dt_match[] = { - {.compatible = "qcom,imx135", .data = &imx135_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx135_dt_match); - -static struct platform_driver imx135_platform_driver = { - .driver = { - .name = "qcom,imx135", - .owner = THIS_MODULE, - .of_match_table = imx135_dt_match, - }, -}; - -static int32_t imx135_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx135_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx135_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx135_platform_driver, - imx135_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx135_i2c_driver); -} - -static void __exit imx135_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx135_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx135_s_ctrl); - platform_driver_unregister(&imx135_platform_driver); - } else - i2c_del_driver(&imx135_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx135_s_ctrl = { - .sensor_i2c_client = &imx135_sensor_i2c_client, - .power_setting_array.power_setting = imx135_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx135_power_setting), - .msm_sensor_mutex = &imx135_mut, - .sensor_v4l2_subdev_info = imx135_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx135_subdev_info), -}; - -module_init(imx135_init_module); -module_exit(imx135_exit_module); -MODULE_DESCRIPTION("imx135"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/Makefile deleted file mode 100644 index 0b2fa2f4f8da..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_camera_io_util.o msm_camera_cci_i2c.o msm_camera_qup_i2c.o msm_camera_i2c_mux.o msm_camera_spi.o msm_camera_dt_util.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_cci_i2c.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_cci_i2c.c deleted file mode 100644 index 293a3c511b32..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_cci_i2c.c +++ /dev/null @@ -1,602 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_cci.h" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = data_type; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char *buf = NULL; - int i; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - buf = kzalloc(num_byte, GFP_KERNEL); - if (!buf) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - cci_ctrl.status = 0; //prevent - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - kfree(buf); - return rc; -} - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array reg_conf_tbl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - CDBG("%s:%d reg addr = 0x%x data type: %d\n", - __func__, __LINE__, addr, data_type); - reg_conf_tbl.reg_addr = addr; - reg_conf_tbl.reg_data = data; - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = ®_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = 1; -#if defined(CONFIG_SR200PC20) - if (addr == 0xff){ - pr_err("delay START = %d\n", (int)data*10); - mdelay(data*10); - return 0; - } -#endif - -#if defined(CONFIG_DB8221A) - if (addr == 0xfe){ - pr_err("delay START = %d\n", (int)data*10); - msleep(data); - return 0; - } -#endif - - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint8_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl = {0}; - struct msm_camera_i2c_reg_array reg_conf_tbl[num_byte]; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - memset(reg_conf_tbl, 0, - num_byte * sizeof(struct msm_camera_i2c_reg_array)); - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - } - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BYTE_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint32_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - reg_conf_tbl = (struct msm_camera_i2c_reg_array *) - kzalloc(num_byte * sizeof(struct msm_camera_i2c_reg_array), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d failed: no memory", __func__, __LINE__); - return -ENOMEM; - } - - CDBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - memset(reg_conf_tbl, 0, - num_byte * sizeof(struct msm_camera_i2c_reg_array)); - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - CDBG("%s:%d data[%d] %x\n", __func__, __LINE__, i, - reg_conf_tbl[i].reg_data); - } - cci_ctrl.status = 0;//prevent - cci_ctrl.cmd = MSM_CCI_I2C_WRITE_BURST; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BURST_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s:%d failed: VIDIOC_MSM_CCI_CFG rc %d\n", __func__, __LINE__, - rc); - } - - rc = cci_ctrl.status; - kfree(reg_conf_tbl); - return rc; -} - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_array = NULL; - - if (!client || !write_setting) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA - && write_setting->data_type != MSM_CAMERA_I2C_BURST_DATA)) { - pr_err("[CCI]%s:%d failed data_type(%d)\n", __func__, __LINE__, write_setting->data_type); - return rc; - } - - reg_array = - (struct msm_camera_i2c_reg_array *)write_setting->reg_setting; - pr_err("%s:%d size %d addr %x\n", __func__, __LINE__, - reg_array->delay, reg_array->reg_addr); - rc = msm_camera_cci_i2c_write_burst(client, reg_array->reg_addr, - reg_array->reg_burst_data, reg_array->delay); - if (rc < 0) { - pr_err("%s:%d failed: msm_camera_cci_i2c_write_seq rc %d\n", - __func__, __LINE__, rc); - } - - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_cci_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - return rc; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -static int32_t msm_camera_cci_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - rc = msm_camera_cci_i2c_compare(client, - addr, data, data_type); - return rc; -} - -static int32_t msm_camera_cci_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_cci_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_cci_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_cci_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_cci_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_cci_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_cci_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_cci_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_cci_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd) -{ - int32_t rc = 0; - struct msm_camera_cci_ctrl cci_ctrl; - - CDBG("%s line %d\n", __func__, __LINE__); - cci_ctrl.cmd = cci_cmd; - cci_ctrl.cci_info = client->cci_client; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - return cci_ctrl.status; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.c deleted file mode 100644 index 9f9347ba1109..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.c +++ /dev/null @@ -1,1466 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include "msm_cci.h" - -#define CAM_SENSOR_PINCTRL_STATE_SLEEP "cam_suspend" -#define CAM_SENSOR_PINCTRL_STATE_DEFAULT "cam_default" -//#define CONFIG_MSM_CAMERA_DT_DEBUG -#undef CDBG -#ifdef CONFIG_MSM_CAMERA_DT_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size) -{ - uint16_t i = 0; - int j = 0; - - /* Validate input parameters */ - if (!cam_vreg || !power_setting) { - pr_err("%s:%d failed: cam_vreg %pK power_setting %pK", __func__, - __LINE__, cam_vreg, power_setting); - return -EINVAL; - } - - /* Validate size of num_vreg */ - if (num_vreg <= 0) { - pr_err("failed: num_vreg %d", num_vreg); - return -EINVAL; - } - - for (i = 0; i < power_setting_size; i++) { - if (power_setting[i].seq_type != SENSOR_VREG) - continue; - - switch (power_setting[i].seq_val) { - case CAM_VDIG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vdig")) { - CDBG("%s:%d i %d j %d cam_vdig\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VIO: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vio")) { - CDBG("%s:%d i %d j %d cam_vio\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VANA: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vana")) { - CDBG("%s:%d i %d j %d cam_vana\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VAF: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vaf")) { - CDBG("%s:%d i %d j %d cam_vaf\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - default: - pr_err("%s:%d invalid seq_val %d\n", __func__, - __LINE__, power_setting[i].seq_val); - break; - } - } - - return 0; -} - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info) -{ - int rc = 0, i = 0; - uint32_t val = 0, count = 0; - uint32_t *val_array = NULL; - struct device_node *src_node = NULL; - struct msm_sensor_info_t *sensor_info; - - sensor_info = kzalloc(sizeof(*sensor_info), GFP_KERNEL); - if (!sensor_info) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -ENOMEM; - } - for (i = 0; i < SUB_MODULE_MAX; i++) - sensor_info->subdev_id[i] = -1; - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_ACTUATOR] = val; - of_node_put(src_node); - src_node = NULL; - } - - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", 0); - if (!src_node) { - CDBG("%s:%d eeprom src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,eeprom-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,eeprom-sd-index %d, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - } else - rc = 0; - - src_node = of_parse_phandle(of_node, "qcom,led-flash-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,led flash cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_LED_FLASH] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,strobe-flash-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,strobe-flash-sd-index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_STROBE_FLASH] = val; - } else - rc = 0; - - if (of_get_property(of_node, "qcom,csiphy-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csiphy-sd-index count %d > 2\n", - __func__, count); - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csiphy-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id[SUB_MODULE_CSIPHY + i] = - val_array[i]; - CDBG("%s csiphy_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csiphy-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - if (of_get_property(of_node, "qcom,csid-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csid-sd-index count %d > 2\n", - __func__, count); - rc = -EINVAL; - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csid-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id - [SUB_MODULE_CSID + i] = val_array[i]; - CDBG("%s csid_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csid-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - *s_info = sensor_info; - return rc; -ERROR: - kfree(sensor_info); - return rc; -} - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info) -{ - int rc = 0; - uint32_t val = 0; - struct msm_actuator_info *actuator_info; - - rc = of_property_read_u32(of_node, "qcom,actuator-cam-name", &val); - CDBG("%s qcom,actuator-cam-name %d, rc %d\n", __func__, val, rc); - if (rc < 0) - return 0; - - actuator_info = kzalloc(sizeof(*actuator_info), GFP_KERNEL); - if (!actuator_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - actuator_info->cam_name = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-pwd", &val); - CDBG("%s qcom,actuator-vcm-pwd %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_pwd = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-enable", &val); - CDBG("%s qcom,actuator-vcm-enable %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_enable = val; - - *act_info = actuator_info; - return 0; -ERROR: - kfree(actuator_info); - return rc; -} - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params) -{ - int rc = 0; - uint32_t val = 0; - struct msm_camera_csi_lane_params *clp; - - clp = kzalloc(sizeof(*clp), GFP_KERNEL); - if (!clp) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *csi_lane_params = clp; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-assign", &val); - CDBG("%s qcom,csi-lane-assign 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_assign = val; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-mask", &val); - CDBG("%s qcom,csi-lane-mask 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_mask = val; - - return rc; -ERROR: - kfree(clp); - return rc; -} - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info) -{ - int rc = 0, i, j; - int count = 0; - const char *seq_name = NULL; - uint32_t *array = NULL; - struct msm_sensor_power_setting *ps; - - struct msm_sensor_power_setting *power_setting; - uint16_t *power_setting_size, size = 0; - bool need_reverse = 0; - - if (!power_info) - return -EINVAL; - - power_setting = power_info->power_setting; - power_setting_size = &power_info->power_setting_size; - - count = of_property_count_strings(of_node, "qcom,cam-power-seq-type"); - *power_setting_size = count; - - CDBG("%s qcom,cam-power-seq-type count %d\n", __func__, count); - - if (count <= 0) - return 0; - - ps = kzalloc(sizeof(*ps) * count, GFP_KERNEL); - if (!ps) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - power_setting = ps; - power_info->power_setting = ps; - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-type", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - if (!strcmp(seq_name, "sensor_vreg")) { - ps[i].seq_type = SENSOR_VREG; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_gpio")) { - ps[i].seq_type = SENSOR_GPIO; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_clk")) { - ps[i].seq_type = SENSOR_CLK; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_i2c_mux")) { - ps[i].seq_type = SENSOR_I2C_MUX; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else { - CDBG("%s: unrecognized seq-type\n", __func__); - rc = -EILSEQ; - goto ERROR1; - } - } - - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-val", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - switch (ps[i].seq_type) { - case SENSOR_VREG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(seq_name, cam_vreg[j].reg_name)) - break; - } - if (j < num_vreg) - ps[i].seq_val = j; - else - rc = -EILSEQ; - break; - case SENSOR_GPIO: - if (!strcmp(seq_name, "sensor_gpio_reset")) - ps[i].seq_val = SENSOR_GPIO_RESET; - else if (!strcmp(seq_name, "sensor_gpio_standby")) - ps[i].seq_val = SENSOR_GPIO_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vdig")) - ps[i].seq_val = SENSOR_GPIO_VDIG; - else if (!strcmp(seq_name, "sensor_gpio_vana")) - ps[i].seq_val = SENSOR_GPIO_VANA; - else - rc = -EILSEQ; - break; - case SENSOR_CLK: - if (!strcmp(seq_name, "sensor_cam_mclk")) - ps[i].seq_val = SENSOR_CAM_MCLK; - else if (!strcmp(seq_name, "sensor_cam_clk")) - ps[i].seq_val = SENSOR_CAM_CLK; - else - rc = -EILSEQ; - break; - case SENSOR_I2C_MUX: - if (!strcmp(seq_name, "none")) - ps[i].seq_val = 0; - else - rc = -EILSEQ; - break; - default: - rc = -EILSEQ; - break; - } - if (rc < 0) { - CDBG("%s: unrecognized seq-val\n", __func__); - goto ERROR1; - } - } - - array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-cfg-val", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (ps[i].seq_type == SENSOR_GPIO) { - if (array[i] == 0) - ps[i].config_val = GPIO_OUT_LOW; - else if (array[i] == 1) - ps[i].config_val = GPIO_OUT_HIGH; - } else { - ps[i].config_val = array[i]; - } - CDBG("%s power_setting[%d].config_val = %ld\n", __func__, i, - ps[i].config_val); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-delay", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - ps[i].delay = array[i]; - CDBG("%s power_setting[%d].delay = %d\n", __func__, - i, ps[i].delay); - } - kfree(array); - - size = *power_setting_size; - - if (NULL != ps && 0 != size) - need_reverse = 1; - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - memcpy(power_info->power_down_setting, - ps, sizeof(*ps) * size); - - power_info->power_down_setting_size = size; - - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } - } - return rc; -ERROR2: - kfree(array); -ERROR1: - kfree(ps); - power_setting_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-req-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-req-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_req_tbl = kzalloc(sizeof(struct gpio) * count, - GFP_KERNEL); - if (!gconf->cam_gpio_req_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_req_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio req tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_req_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_req_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_req_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_req_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_req_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_req_tbl[i].flags); - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-req-tbl-label", i, - &gconf->cam_gpio_req_tbl[i].label); - CDBG("%s cam_gpio_req_tbl[%d].label = %s\n", __func__, i, - gconf->cam_gpio_req_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_req_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_req_tbl_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-set-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-set-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_set_tbl = kzalloc(sizeof(struct msm_gpio_set_tbl) * - count, GFP_KERNEL); - if (!gconf->cam_gpio_set_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_set_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio set tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_set_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_set_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_set_tbl[i].flags); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-delay", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].delay = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].delay = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].delay); - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_set_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_set_tbl_size = 0; - return rc; -} - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, val = 0; - - gconf->gpio_num_info = kzalloc(sizeof(struct msm_camera_gpio_num_info), - GFP_KERNEL); - if (!gconf->gpio_num_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - rc = of_property_read_u32(of_node, "qcom,gpio-vio", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vio invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VIO] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vana invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VANA] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vdig", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vdig failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vdig invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VDIG] = 1; - CDBG("%s qcom,gpio-vdig %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_RESET] = 1; - CDBG("%s qcom,gpio-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_STANDBY] = 1; - CDBG("%s qcom,gpio-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY]); - } else - rc = 0; - -#if defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT)\ - || defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vana-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_VANA_POWER] = 1; - CDBG("%s qcom,gpio-ext-vana-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vio-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_CAMIO_EN] = 1; - CDBG("%s qcom,gpio-ext-vio-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN]); - } else - rc = 0; - -#endif - - rc = of_property_read_u32(of_node, "qcom,gpio-af-pwdm", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-af-pwdm failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-af-pwdm invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_AF_PWDM] = 1; - CDBG("%s qcom,gpio-af-pwdm %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-en", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-en failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-en invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_EN] = 1; - CDBG("%s qcom,gpio-flash-en %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-now", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-now failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-now invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_NOW] = 1; - CDBG("%s qcom,gpio-flash-now %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%dread qcom,gpio-flash-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_RESET] = 1; - CDBG("%s qcom,gpio-flash-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET]); - } else - rc = 0; - return rc; - -ERROR: - kfree(gconf->gpio_num_info); - gconf->gpio_num_info = NULL; - return rc; -} - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *vreg_array = NULL; - struct camera_vreg_t *vreg = NULL; - - count = of_property_count_strings(of_node, "qcom,cam-vreg-name"); - CDBG("%s qcom,cam-vreg-name count %d\n", __func__, count); - - if (!count) - return 0; - - vreg = kzalloc(sizeof(*vreg) * count, GFP_KERNEL); - if (!vreg) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *cam_vreg = vreg; - *num_vreg = count; - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-vreg-name", i, - &vreg[i].reg_name); - CDBG("%s reg_name[%d] = %s\n", __func__, i, - vreg[i].reg_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - } - - vreg_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!vreg_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-type", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].type = vreg_array[i]; - CDBG("%s cam_vreg[%d].type = %d\n", __func__, i, - vreg[i].type); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-min-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].min_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].min_voltage = %d\n", __func__, - i, vreg[i].min_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-max-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].max_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].max_voltage = %d\n", __func__, - i, vreg[i].max_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-op-mode", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].op_mode = vreg_array[i]; - CDBG("%s cam_vreg[%d].op_mode = %d\n", __func__, i, - vreg[i].op_mode); - } - - kfree(vreg_array); - return rc; -ERROR2: - kfree(vreg_array); -ERROR1: - kfree(vreg); - *num_vreg = 0; - return rc; -} - -static int msm_camera_enable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_INIT, NULL); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_CFG, (void *)&i2c_conf->i2c_mux_mode); - return 0; -} - -static int msm_camera_disable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_RELEASE, NULL); - return 0; -} - -static int msm_camera_pinctrl_init(struct msm_camera_power_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *sensor_pctrl = NULL; - - sensor_pctrl = &ctrl->pinctrl_info; - sensor_pctrl->pinctrl = devm_pinctrl_get(ctrl->dev); - if (IS_ERR_OR_NULL(sensor_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_active = - pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_suspend - = pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int rc = 0, index = 0, no_gpio = 0, ret = 0; - struct msm_sensor_power_setting *power_setting = NULL; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (ctrl->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - ctrl->gpio_conf->cam_gpiomux_conf_tbl, - ctrl->gpio_conf->cam_gpiomux_conf_tbl_size); - } - ret = msm_camera_pinctrl_init(ctrl); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - ctrl->cam_pinctrl_status = 0; - } else { - ctrl->cam_pinctrl_status = 1; - } - - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - rc = msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) - no_gpio = rc; - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - for (index = 0; index < ctrl->power_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= ctrl->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - ctrl->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - ctrl->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (no_gpio) { - pr_err("%s: request gpio failed\n", __func__); - return no_gpio; - } - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - CDBG("%s:%d gpio set val %d\n", __func__, __LINE__, - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - power_setting->config_val); -#else - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); -#endif - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_enable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - - case SENSOR_CLK: - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - 0); -#else - - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); -#endif - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if (ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - return rc; -} - -static struct msm_sensor_power_setting* -msm_camera_get_power_settings(struct msm_camera_power_ctrl_t *ctrl, - enum msm_sensor_power_seq_type_t seq_type, - uint16_t seq_val) -{ - struct msm_sensor_power_setting *power_setting, *ps = NULL; - int idx; - - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == seq_type && - power_setting->seq_val == seq_val) { - ps = power_setting; - return ps; - } - - } - return ps; -} - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int index = 0, ret = 0; - struct msm_sensor_power_setting *pd = NULL; - struct msm_sensor_power_setting *ps; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) - sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_RELEASE); - - for (index = 0; index < ctrl->power_down_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - pd = &ctrl->power_down_setting[index]; - ps = NULL; - CDBG("%s type %d\n", __func__, pd->seq_type); - switch (pd->seq_type) { - case SENSOR_CLK: - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - if (ps) - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&ps->data[0], - ctrl->clk_info_size, - 0); - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_GPIO: - if (pd->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [pd->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [pd->seq_val], - 0); - break; - case SENSOR_VREG: - if (pd->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - - if (ps) -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [pd->seq_val].regulator[0], - 0); -#else - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ps->data[0], - 0); -#endif - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - pd->seq_type); - break; - } - if (pd->delay > 20) { - msleep(pd->delay); - } else if (pd->delay) { - usleep_range(pd->delay * 1000, - (pd->delay * 1000) + 1000); - } - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - CDBG("%s exit\n", __func__); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.h deleted file mode 100644 index eb0fd246e0fe..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_dt_util.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_DT_UTIL_H__ -#define MSM_CAMERA_DT_UTIL_H__ - -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_i2c.h" - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info); - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info); - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params); - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info); - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg); - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c.h deleted file mode 100644 index 00a2a6332e78..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_CCI_I2C_H -#define MSM_CAMERA_CCI_I2C_H - -#include -#include -#include "../../include/media/msm_cam_sensor.h" - -struct msm_camera_i2c_client { - struct msm_camera_i2c_fn_t *i2c_func_tbl; - struct i2c_client *client; - struct msm_camera_cci_client *cci_client; - struct msm_camera_spi_client *spi_client; - enum msm_camera_i2c_reg_addr_type addr_type; -}; - -struct msm_camera_i2c_fn_t { - int (*i2c_read) (struct msm_camera_i2c_client *, uint32_t, uint16_t *, - enum msm_camera_i2c_data_type); - int32_t (*i2c_read_seq)(struct msm_camera_i2c_client *, uint32_t, - uint8_t *, uint32_t); - int (*i2c_write) (struct msm_camera_i2c_client *, uint32_t, uint16_t, - enum msm_camera_i2c_data_type); - int (*i2c_write_seq) (struct msm_camera_i2c_client *, uint32_t , - uint8_t *, uint32_t); - int32_t (*i2c_write_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_burst_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_seq_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_seq_reg_setting *); - int32_t (*i2c_write_table_w_microdelay) - (struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_util)(struct msm_camera_i2c_client *, uint16_t); - int32_t (*i2c_write_conf_tbl)(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - int32_t (*i2c_poll)(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); -}; - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd); - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.c deleted file mode 100644 index cd2af2c2751e..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundatation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "msm_camera_i2c_mux.h" - -/* TODO move this somewhere else */ -#define MSM_I2C_MUX_DRV_NAME "msm_cam_i2c_mux" -static int msm_i2c_mux_config(struct i2c_mux_device *mux_device, uint8_t *mode) -{ - uint32_t val; - val = msm_camera_io_r(mux_device->ctl_base); - if (*mode == MODE_DUAL) { - msm_camera_io_w(val | 0x3, mux_device->ctl_base); - } else if (*mode == MODE_L) { - msm_camera_io_w(((val | 0x2) & ~(0x1)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config left value is %d\n", val); - } else { - msm_camera_io_w(((val | 0x1) & ~(0x2)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config right value is %d\n", val); - } - return 0; -} - -static int msm_i2c_mux_init(struct i2c_mux_device *mux_device) -{ - int rc = 0, val = 0; - if (mux_device->use_count == 0) { - mux_device->ctl_base = ioremap(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem)); - if (!mux_device->ctl_base) { - rc = -ENOMEM; - return rc; - } - mux_device->rw_base = ioremap(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem)); - if (!mux_device->rw_base) { - rc = -ENOMEM; - iounmap(mux_device->ctl_base); - return rc; - } - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val | 0x200), mux_device->rw_base); - } - mux_device->use_count++; - return 0; -}; - -static int msm_i2c_mux_release(struct i2c_mux_device *mux_device) -{ - int val = 0; - mux_device->use_count--; - if (mux_device->use_count == 0) { - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val & ~0x200), mux_device->rw_base); - iounmap(mux_device->rw_base); - iounmap(mux_device->ctl_base); - } - return 0; -} - -static long msm_i2c_mux_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - mux_device = v4l2_get_subdevdata(sd); - if (mux_device == NULL) { - rc = -ENOMEM; - return rc; - } - mutex_lock(&mux_device->mutex); - switch (cmd) { - case VIDIOC_MSM_I2C_MUX_CFG: - rc = msm_i2c_mux_config(mux_device, (uint8_t *) arg); - break; - case VIDIOC_MSM_I2C_MUX_INIT: - rc = msm_i2c_mux_init(mux_device); - break; - case VIDIOC_MSM_I2C_MUX_RELEASE: - rc = msm_i2c_mux_release(mux_device); - break; - default: - rc = -ENOIOCTLCMD; - } - mutex_unlock(&mux_device->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_i2c_mux_subdev_core_ops = { - .ioctl = &msm_i2c_mux_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_i2c_mux_subdev_ops = { - .core = &msm_i2c_mux_subdev_core_ops, -}; - -static int i2c_mux_probe(struct platform_device *pdev) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - CDBG("%s: device id = %d\n", __func__, pdev->id); - mux_device = kzalloc(sizeof(struct i2c_mux_device), GFP_KERNEL); - if (!mux_device) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - v4l2_subdev_init(&mux_device->subdev, &msm_i2c_mux_subdev_ops); - v4l2_set_subdevdata(&mux_device->subdev, mux_device); - platform_set_drvdata(pdev, &mux_device->subdev); - mutex_init(&mux_device->mutex); - - mux_device->ctl_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_ctl"); - if (!mux_device->ctl_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->ctl_io = request_mem_region(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem), pdev->name); - if (!mux_device->ctl_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->rw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_rw"); - if (!mux_device->rw_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->rw_io = request_mem_region(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem), pdev->name); - if (!mux_device->rw_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->pdev = pdev; - return 0; - -i2c_mux_no_resource: - mutex_destroy(&mux_device->mutex); - kfree(mux_device); - return 0; -} - -static struct platform_driver i2c_mux_driver = { - .probe = i2c_mux_probe, - .driver = { - .name = MSM_I2C_MUX_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_camera_i2c_mux_init_module(void) -{ - return platform_driver_register(&i2c_mux_driver); -} - -static void __exit msm_camera_i2c_mux_exit_module(void) -{ - platform_driver_unregister(&i2c_mux_driver); -} - -module_init(msm_camera_i2c_mux_init_module); -module_exit(msm_camera_i2c_mux_exit_module); -MODULE_DESCRIPTION("MSM Camera I2C mux driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.h deleted file mode 100644 index 30f908b12e15..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_i2c_mux.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_I2C_MUX_H -#define MSM_I2C_MUX_H - -#include -#include - -struct i2c_mux_device { - struct platform_device *pdev; - struct v4l2_subdev subdev; - struct resource *ctl_mem; - struct resource *ctl_io; - void __iomem *ctl_base; - struct resource *rw_mem; - struct resource *rw_io; - void __iomem *rw_base; - struct mutex mutex; - unsigned use_count; -}; - -struct i2c_mux_cfg_params { - struct v4l2_subdev *subdev; - void *parms; -}; - -#define VIDIOC_MSM_I2C_MUX_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct i2c_mux_cfg_params) - -#define VIDIOC_MSM_I2C_MUX_INIT \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct v4l2_subdev*) - -#define VIDIOC_MSM_I2C_MUX_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct v4l2_subdev*) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.c deleted file mode 100644 index a59e906ab962..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.c +++ /dev/null @@ -1,638 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_io_util.h" - -#define BUFF_SIZE_128 128 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#ifdef CONFIG_MFD_RT5033_RESET_WA -#ifdef CONFIG_CAM_USE_EXT_VANA_GPIO -#define RT5033_RESET_WA_VREG_NAME ("cam_vdig") -#else -#define RT5033_RESET_WA_VREG_NAME ("cam_vana") -#endif -#endif - -void msm_camera_io_w(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - writel_relaxed((data), (addr)); -} - -void msm_camera_io_w_mb(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - wmb(); - writel_relaxed((data), (addr)); - wmb(); -} - -u32 msm_camera_io_r(void __iomem *addr) -{ - uint32_t data = readl_relaxed(addr); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -u32 msm_camera_io_r_mb(void __iomem *addr) -{ - uint32_t data; - rmb(); - data = readl_relaxed(addr); - rmb(); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -void msm_camera_io_memcpy_toio(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < len; i++) - writel_relaxed(*s++, d++); -} - -void msm_camera_io_dump(void __iomem *addr, int size) -{ - char line_str[BUFF_SIZE_128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - CDBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "0x%pK: ", p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%d ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - CDBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - CDBG("%s\n", line_str); -} - -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len); - msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4); - msm_camera_io_dump(dest_addr, len); -} - -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < (len / 4); i++) - msm_camera_io_w_mb(*s++, d++); -} - -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk) -{ - int i; - int rc = 0; - struct clk *mux_clk = NULL; - struct clk *src_clk = NULL; - - for (i = 0; i < num_clk; i++) { - if (clk_src_info[i].clk_name) { - mux_clk = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(mux_clk)) { - pr_err("%s get failed\n", - clk_info[i].clk_name); - continue; - } - src_clk = clk_get(dev, clk_src_info[i].clk_name); - if (IS_ERR(src_clk)) { - pr_err("%s get failed\n", - clk_src_info[i].clk_name); - continue; - } - clk_set_parent(mux_clk, src_clk); - } - } - return rc; -} - -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable) -{ - int i; - int rc = 0; - long clk_rate; - if (enable) { - for (i = 0; i < num_clk; i++) { - CDBG("%s enable %s\n", __func__, - clk_info[i].clk_name); - clk_ptr[i] = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(clk_ptr[i])) { - pr_err("%s get failed\n", clk_info[i].clk_name); - rc = PTR_ERR(clk_ptr[i]); - goto cam_clk_get_err; - } - if (clk_info[i].clk_rate > 0) { - rc = clk_set_rate(clk_ptr[i], - clk_info[i].clk_rate); - if (rc < 0) { - pr_err("%s set failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } else if (clk_info[i].clk_rate == INIT_RATE) { - clk_rate = clk_get_rate(clk_ptr[i]); - if (clk_rate == 0) { - clk_rate = - clk_round_rate(clk_ptr[i], 0); - if (clk_rate < 0) { - pr_err("%s round rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - rc = clk_set_rate(clk_ptr[i], - clk_rate); - if (rc < 0) { - pr_err("%s set rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } - } - rc = clk_prepare(clk_ptr[i]); - if (rc < 0) { - pr_err("%s prepare failed\n", - clk_info[i].clk_name); - goto cam_clk_prepare_err; - } - - rc = clk_enable(clk_ptr[i]); - if (rc < 0) { - pr_err("%s enable failed\n", - clk_info[i].clk_name); - goto cam_clk_enable_err; - } - if (clk_info[i].delay > 20) { - msleep(clk_info[i].delay); - } else if (clk_info[i].delay) { - usleep_range(clk_info[i].delay * 1000, - (clk_info[i].delay * 1000) + 1000); - } - } - } else { - for (i = num_clk - 1; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - CDBG("%s disable %s\n", __func__, - clk_info[i].clk_name); - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - } - return rc; - - -cam_clk_enable_err: - clk_unprepare(clk_ptr[i]); -cam_clk_prepare_err: -cam_clk_set_err: - clk_put(clk_ptr[i]); -cam_clk_get_err: - for (i--; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - return rc; -} - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config) -{ - int i = 0, j = 0; - int rc = 0; - struct camera_vreg_t *curr_vreg; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (cam_vreg == NULL) { - pr_err("%s:%d cam_vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (config) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - reg_ptr[j] = regulator_get(dev, - curr_vreg->reg_name); - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s get failed\n", - __func__, - curr_vreg->reg_name); - reg_ptr[j] = NULL; - goto vreg_get_fail; - } - if (curr_vreg->type == REG_LDO) { - rc = regulator_set_voltage( - reg_ptr[j], - curr_vreg->min_voltage, - curr_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (curr_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode( - reg_ptr[j], - curr_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s:%s set optimum mode fail\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - if (reg_ptr[j]) { - if (curr_vreg->type == REG_LDO) { - if (curr_vreg->op_mode >= 0) { - regulator_set_optimum_mode( - reg_ptr[j], 0); - } - regulator_set_voltage( - reg_ptr[j], 0, curr_vreg-> - max_voltage); - } - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - } - } - } - return 0; - -vreg_unconfig: -if (curr_vreg->type == REG_LDO) - regulator_set_optimum_mode(reg_ptr[j], 0); - -vreg_set_opt_mode_fail: -if (curr_vreg->type == REG_LDO) - regulator_set_voltage(reg_ptr[j], 0, - curr_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - -vreg_get_fail: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - goto vreg_unconfig; - } - return -ENODEV; -} - -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable) -{ - int i = 0, j = 0, rc = 0; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (enable) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s null regulator\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - rc = regulator_enable(reg_ptr[j]); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } - return rc; -disable_vreg: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - return rc; -} - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting) -{ - int rc = 0; - if (!bus_perf_client) { - pr_err("%s: Bus Client NOT Registered!!!\n", __func__); - return; - } - - switch (perf_setting) { - case S_EXIT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - msm_bus_scale_unregister_client(bus_perf_client); - break; - case S_PREVIEW: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - break; - case S_VIDEO: - rc = msm_bus_scale_client_update_request(bus_perf_client, 2); - break; - case S_CAPTURE: - rc = msm_bus_scale_client_update_request(bus_perf_client, 3); - break; - case S_ZSL: - rc = msm_bus_scale_client_update_request(bus_perf_client, 4); - break; - case S_LIVESHOT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 5); - break; - case S_DEFAULT: - break; - default: - pr_warning("%s: INVALID CASE\n", __func__); - } -} - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en) -{ - int rc = 0, i; - - if (gpio_en) { - for (i = 0; i < gpio_tbl_size; i++) { - gpio_set_value_cansleep(gpio_tbl[i].gpio, - gpio_tbl[i].flags); - usleep_range(gpio_tbl[i].delay, - gpio_tbl[i].delay + 1000); - } - } else { - for (i = gpio_tbl_size - 1; i >= 0; i--) { - if (gpio_tbl[i].flags) - gpio_set_value_cansleep(gpio_tbl[i].gpio, - GPIOF_OUT_INIT_LOW); - } - } - return rc; -} - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config) -{ - int rc = 0; -#ifdef CONFIG_MFD_RT5033_RESET_WA - int rt_rc = 0; -#endif - - if (config) { - if (!dev || !cam_vreg || !reg_ptr) { - pr_err("%s: get failed NULL parameter\n", __func__); - goto vreg_get_fail; - } - CDBG("%s enable %s\n", __func__, cam_vreg->reg_name); - if (!strncmp(cam_vreg->reg_name, "cam_vdig", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_CORE_1.2V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } else if (!strncmp(cam_vreg->reg_name, "cam_vana", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } else { - *reg_ptr = regulator_get(dev, cam_vreg->reg_name); - if (IS_ERR_OR_NULL(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - if (cam_vreg->type == REG_LDO) { - rc = regulator_set_voltage( - *reg_ptr, cam_vreg->min_voltage, - cam_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (cam_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode(*reg_ptr, - cam_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s: %s set optimum mode failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } -#ifdef CONFIG_MFD_RT5033_RESET_WA - if (!strncmp(cam_vreg->reg_name, RT5033_RESET_WA_VREG_NAME, 8)){ - rt_rc = regulator_get_status(*reg_ptr); - if((rt_rc == 2) || (rt_rc == 8)){ - BUG_ON(1); - } else { - pr_err("[RT5033] result : 0x%x\n", rt_rc); - } - } -#endif - rc = regulator_enable(*reg_ptr); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg->reg_name); - goto vreg_unconfig; - } - } else { - if (*reg_ptr) { - CDBG("%s disable %s\n", __func__, cam_vreg->reg_name); - regulator_disable(*reg_ptr); - if (cam_vreg->type == REG_LDO) { - if (cam_vreg->op_mode >= 0) - regulator_set_optimum_mode(*reg_ptr, 0); - regulator_set_voltage( - *reg_ptr, 0, cam_vreg->max_voltage); - } - regulator_put(*reg_ptr); - *reg_ptr = NULL; - } - } - return 0; - -vreg_unconfig: -if (cam_vreg->type == REG_LDO) - regulator_set_optimum_mode(*reg_ptr, 0); - -vreg_set_opt_mode_fail: -if (cam_vreg->type == REG_LDO) - regulator_set_voltage(*reg_ptr, 0, cam_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(*reg_ptr); - *reg_ptr = NULL; - -vreg_get_fail: - return -ENODEV; -} - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en) -{ - int rc = 0, i = 0, err = 0; - - if (!gpio_tbl || !size) { - pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__, - __LINE__, gpio_tbl, size); - return -EINVAL; - } - for (i = 0; i < size; i++) { - CDBG("%s:%d i %d, gpio %d dir %ld\n", __func__, __LINE__, i, - gpio_tbl[i].gpio, gpio_tbl[i].flags); - } - if (gpio_en) { - for (i = 0; i < size; i++) { - err = gpio_request_one(gpio_tbl[i].gpio, - gpio_tbl[i].flags, gpio_tbl[i].label); - if (err) { - /* - * After GPIO request fails, contine to - * apply new gpios, outout a error message - * for driver bringup debug - */ - pr_err("%s:%d gpio %d:%s request fails\n", - __func__, __LINE__, - gpio_tbl[i].gpio, gpio_tbl[i].label); - } - } - } else { - gpio_free_array(gpio_tbl, size); - } - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.h deleted file mode 100644 index 04d34092b90b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_io_util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_IO_UTIL_H -#define __MSM_CAMERA_IO_UTIL_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include "../../include/media/msm_cam_sensor.h" - -#define NO_SET_RATE -1 -#define INIT_RATE -2 - -void msm_camera_io_w(u32 data, void __iomem *addr); -void msm_camera_io_w_mb(u32 data, void __iomem *addr); -u32 msm_camera_io_r(void __iomem *addr); -u32 msm_camera_io_r_mb(void __iomem *addr); -void msm_camera_io_dump(void __iomem *addr, int size); -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk); -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable); - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config); -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable); - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting); - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en); - -void msm_camera_config_single_gpio(uint16_t gpio, unsigned long flags, - int gpio_en); - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config); - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_qup_i2c.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_qup_i2c.c deleted file mode 100644 index ea9b4bca598e..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_qup_i2c.c +++ /dev/null @@ -1,545 +0,0 @@ -/* Copyright (c) 2011, 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -static int32_t msm_camera_qup_i2c_rxdata( - struct msm_camera_i2c_client *dev_client, unsigned char *rxdata, - int data_length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msgs[] = { - { - .addr = saddr, - .flags = 0, - .len = dev_client->addr_type, - .buf = rxdata, - }, - { - .addr = saddr, - .flags = I2C_M_RD, - .len = data_length, - .buf = rxdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msgs, 2); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_rxdata failed 0x%x\n", saddr); - return rc; -} - -static int32_t msm_camera_qup_i2c_txdata( - struct msm_camera_i2c_client *dev_client, unsigned char *txdata, - int length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msg[] = { - { - .addr = saddr, - .flags = 0, - .len = length, - .buf = txdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msg, 1); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_txdata faild 0x%x\n", saddr); - return rc; -} - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, data_type); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - return rc; - } - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; - int i; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, num_byte); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - return rc; - } - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - return rc; -} - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - uint8_t len = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", - __func__, addr, data_type); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - S_I2C_DBG("Data: 0x%x\n", data); - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) { - buf[len] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - len += 1; - } else if (data_type == MSM_CAMERA_I2C_WORD_DATA) { - buf[len] = data >> BITS_PER_BYTE; - buf[len+1] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - S_I2C_DBG("Byte %d: 0x%x\n", len+1, buf[len+1]); - len += 2; - } - rc = msm_camera_qup_i2c_txdata(client, buf, len); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; - uint8_t len = 0, i = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - for (i = 0; i < num_byte; i++) { - buf[i+len] = data[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i+len, buf[i+len]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - rc = msm_camera_qup_i2c_txdata(client, buf, len+num_byte); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - CDBG("%s addr 0x%x data 0x%x\n", __func__, - reg_setting->reg_addr, reg_setting->reg_data); - - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - if (reg_setting->delay) - usleep_range(reg_setting->delay, - reg_setting->delay + 1000); - reg_setting++; - } - return rc; -} - -static int32_t msm_camera_qup_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - int i; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - for (i = 0; i < I2C_POLL_MAX_ITERATION; i++) { - rc = msm_camera_qup_i2c_compare(client, - addr, data, data_type); - if (rc == 0 || rc < 0) - break; - usleep_range(10000, 11000); - } - return rc; -} - -static int32_t msm_camera_qup_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_qup_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_qup_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_qup_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_qup_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_qup_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - pr_err("%s, E. ", __func__); - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_qup_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_qup_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_qup_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.c deleted file mode 100644 index bed6b6043816..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_spi.h" - -#undef SPIDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define SPIDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define SPIDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -static int msm_camera_spi_txfr(struct spi_device *spi, char *txbuf, - char *rxbuf, int num_byte) -{ - struct spi_transfer t; - struct spi_message m; - - memset(&t, 0, sizeof(t)); - t.tx_buf = txbuf; - t.rx_buf = rxbuf; - t.len = num_byte; - spi_message_init(&m); - spi_message_add_tail(&t, &m); - - return spi_sync(spi, &m); -} - -/** - * msm_camera_set_addr() - helper function to set transfer address - * @addr: device address - * @addr_len: the addr field length of an instruction - * @type: type (i.e. byte-length) of @addr - * @str: shifted address output, must be zeroed when passed in - * - * This helper function sets @str based on the addr field length of an - * instruction and the data length. - */ -static void msm_camera_set_addr(uint32_t addr, uint8_t addr_len, - enum msm_camera_i2c_reg_addr_type type, - char *str) -{ - int i, len; - - if (addr_len < type) - SPIDBG("%s: omitting higher bits in address\n", __func__); - - /* only support transfer MSB first for now */ - len = addr_len - type; - for (i = len; i < addr_len; i++) { - if (i >= 0) - str[i] = (addr >> (BITS_PER_BYTE * (addr_len - i - 1))) - & 0xFF; - } - -} - -/** - * msm_camera_spi_tx_helper() - wrapper for SPI transaction - * @client: io client - * @inst: inst of this transaction - * @addr: device addr following the inst - * @data: output byte array (could be NULL) - * @num_byte: size of @data - * @tx, rx: optional transfer buffer. It must be at least header - * + @num_byte long. - * - * This is the core function for SPI transaction, except for writes. It first - * checks address type, then allocates required memory for tx/rx buffers. - * It sends out , and optionally receives @num_byte of response, - * if @data is not NULL. This function does not check for wait conditions, - * and will return immediately once bus transaction finishes. - * - * This function will allocate buffers of header + @num_byte long. For - * large transfers, the allocation could fail. External buffer @tx, @rx - * should be passed in to bypass allocation. The size of buffer should be - * at least header + num_byte long. Since buffer is managed externally, - * @data will be ignored, and read results will be in @rx. - * @tx, @rx also can be used for repeated transfers to improve performance. - */ -int32_t msm_camera_spi_tx_helper(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst, uint32_t addr, uint8_t *data, - uint32_t num_byte, char *tx, char *rx) -{ - int32_t rc = -EINVAL; - struct spi_device *spi = client->spi_client->spi_master; - char *ctx = NULL, *crx = NULL; - uint32_t len, hlen; - uint8_t retries = client->spi_client->retries; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - - hlen = msm_camera_spi_get_hlen(inst); - len = hlen + num_byte; - - if (tx) - ctx = tx; - else - ctx = kzalloc(len, GFP_KERNEL); - if (!ctx) - return -ENOMEM; - - if (num_byte) { - if (rx) - crx = rx; - else - crx = kzalloc(len, GFP_KERNEL); - if (!crx) { - if (!tx) - kfree(ctx); - return -ENOMEM; - } - } else { - crx = NULL; - } - - ctx[0] = inst->opcode; - msm_camera_set_addr(addr, inst->addr_len, client->addr_type, ctx + 1); - while ((rc = msm_camera_spi_txfr(spi, ctx, crx, len)) && retries) { - retries--; - msleep(client->spi_client->retry_delay); - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - goto out; - } - if (data && num_byte && !rx) - memcpy(data, crx + hlen, num_byte); - -out: - if (!tx) - kfree(ctx); - if (!rx) - kfree(crx); - return rc; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EINVAL; - uint8_t temp[2]; - - if ((data_type != MSM_CAMERA_I2C_BYTE_DATA) - && (data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - rc = msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read, addr, &temp[0], - data_type, NULL, NULL); - if (rc < 0) - return rc; - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = temp[0]; - else - *data = (temp[0] << BITS_PER_BYTE) | temp[1]; - - SPIDBG("%s: addr 0x%x, data %u\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, data, num_byte, - NULL, NULL); -} - -/** - * msm_camera_spi_read_seq_l()- function for large SPI reads - * @client: io client - * @addr: device address to read - * @num_byte: read length - * @tx,rx: pre-allocated SPI buffer. Its size must be at least - * header + num_byte - * - * This function is used for large transactions. Instead of allocating SPI - * buffer each time, caller is responsible for pre-allocating memory buffers. - * Memory buffer must be at least header + num_byte. Header length can be - * obtained by msm_camera_spi_get_hlen(). - */ -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, NULL, num_byte, - tx, rx); -} - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.query_id, addr, data, num_byte, - NULL, NULL); -} - -static int32_t msm_camera_spi_read_status_reg( - struct msm_camera_i2c_client *client, uint8_t *status) -{ - struct msm_camera_spi_inst *rs = - &client->spi_client->cmd_tbl.read_status; - if (rs->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - return msm_camera_spi_tx_helper(client, rs, 0, status, 1, NULL, NULL); -} - -static int32_t msm_camera_spi_device_busy(struct msm_camera_i2c_client *client, - uint8_t *busy) -{ - int rc; - uint8_t st = 0; - rc = msm_camera_spi_read_status_reg(client, &st); - if (rc < 0) { - SPIDBG("%s: failed to read status reg\n", __func__); - return rc; - } - *busy = st & client->spi_client->busy_mask; - return 0; -} - -static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst) -{ - uint8_t busy; - int i, rc; - SPIDBG("%s: op 0x%x wait start\n", __func__, inst->opcode); - for (i = 0; i <= inst->delay_count; i++) { - rc = msm_camera_spi_device_busy(client, &busy); - if (rc < 0) - return rc; - if (!busy) - break; - else - msleep(inst->delay_intv); - SPIDBG("%s: op 0x%x wait\n", __func__, inst->opcode); - } - if (i > inst->delay_count) { - SPIDBG("%s: op %x timed out\n", __func__, inst->opcode); - return -ETIMEDOUT; - } - SPIDBG("%s: op %x finished\n", __func__, inst->opcode); - return 0; -} - -static int32_t msm_camera_spi_write_enable( - struct msm_camera_i2c_client *client) -{ - struct msm_camera_spi_inst *we = - &client->spi_client->cmd_tbl.write_enable; - int rc; - if (we->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - rc = msm_camera_spi_tx_helper(client, we, 0, NULL, 0, NULL, NULL); - if (rc < 0) - SPIDBG("%s: write enable failed\n", __func__); - return rc; -} - -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size) -{ - struct msm_camera_spi_inst *se = &client->spi_client->cmd_tbl.erase; - int rc = 0; - uint32_t cur; - uint32_t end = addr + size; - uint32_t erase_size = client->spi_client->erase_size; - end = addr + size; - for (cur = rounddown(addr, erase_size); cur < end; cur += erase_size) { - SPIDBG("%s: erasing 0x%x\n", __func__, cur); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - rc = msm_camera_spi_tx_helper(client, se, cur, NULL, 0, - NULL, NULL); - if (rc < 0) { - SPIDBG("%s: erase failed\n", __func__); - return rc; - } - rc = msm_camera_spi_wait(client, se); - if (rc < 0) { - SPIDBG("%s: erase timedout\n", __func__); - return rc; - } - } - return rc; -} -/** - * msm_camera_spi_page_program() - core function to perform write - * @client: need for obtaining SPI device - * @addr: address to program on device - * @data: data to write - * @len: size of data - * @tx: tx buffer, size >= header + len - * - * This function performs SPI write, and has no boundary check. Writing range - * should not cross page boundary, or data will be corrupted. Transaction is - * guaranteed to be finished when it returns. This function should never be - * used outside msm_camera_spi_write_seq(). - */ -static int32_t msm_camera_spi_page_program(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint16_t len, uint8_t *tx) -{ - int rc; - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - struct spi_device *spi = client->spi_client->spi_master; - uint8_t retries = client->spi_client->retries; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - SPIDBG("%s: addr 0x%x, size 0x%x\n", __func__, addr, len); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - memset(tx, 0, header_len); - tx[0] = pg->opcode; - msm_camera_set_addr(addr, pg->addr_len, client->addr_type, tx + 1); - memcpy(tx + header_len, data, len); - SPIDBG("%s: tx(%u): %02x %02x %02x %02x\n", __func__, - len, tx[0], tx[1], tx[2], tx[3]); - while ((rc = spi_write(spi, tx, len + header_len)) && retries) { - rc = msm_camera_spi_wait(client, pg); - msleep(client->spi_client->retry_delay); - retries--; - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - return rc; - } - rc = msm_camera_spi_wait(client, pg); - return rc; -} -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - const uint32_t page_size = client->spi_client->page_size; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - uint16_t len; - uint32_t cur_len, end; - char *tx, *pdata = data; - int rc = -EINVAL; - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - /* single page write */ - if ((addr % page_size) + num_byte <= page_size) { - len = header_len + num_byte; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - rc = msm_camera_spi_page_program(client, addr, data, - num_byte, tx); - if (rc < 0) - goto ERROR; - goto OUT; - } - /* multi page write */ - len = header_len + page_size; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - while (num_byte) { - end = min(page_size, (addr % page_size) + num_byte); - cur_len = end - (addr % page_size); - rc = msm_camera_spi_page_program(client, addr, pdata, - cur_len, tx); - if (rc < 0) - goto ERROR; - addr += cur_len; - pdata += cur_len; - num_byte -= cur_len; - } - goto OUT; -NOMEM: - SPIDBG("%s: memory allocation failed\n", __func__); - return -ENOMEM; -ERROR: - SPIDBG("%s: error write\n", __func__); -OUT: - kfree(tx); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.h deleted file mode 100644 index 0949667b3c72..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/io/msm_camera_spi.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_SPI_H -#define __MSM_CAMERA_SPI_H - -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_camera_i2c.h" - -/** - * Common SPI communication scheme - * tx: [addr][wait][write buffer] - * rx: [read buffer] - * Some inst require polling busy reg until it's done - */ -struct msm_camera_spi_inst { - uint8_t opcode; /* one-byte opcode */ - uint8_t addr_len; /* addr len in bytes */ - uint8_t dummy_len; /* setup cycles */ - uint8_t delay_intv; /* delay intv for this inst (ms) */ - uint8_t delay_count; /* total delay count for this inst */ -}; - -struct msm_camera_spi_inst_tbl { - struct msm_camera_spi_inst read; - struct msm_camera_spi_inst read_seq; - struct msm_camera_spi_inst query_id; - struct msm_camera_spi_inst page_program; - struct msm_camera_spi_inst write_enable; - struct msm_camera_spi_inst read_status; - struct msm_camera_spi_inst erase; -}; - -struct msm_camera_spi_client { - struct spi_device *spi_master; - struct msm_camera_spi_inst_tbl cmd_tbl; - uint8_t device_id; - uint8_t device_id0; - uint8_t device_id1; - uint8_t device_id2; - uint8_t mfr_id; - uint8_t mfr_id0; - uint8_t mfr_id1; - uint8_t mfr_id2; - uint8_t retry_delay; /* ms */ - uint8_t retries; /* retry times upon failure */ - uint8_t busy_mask; /* busy bit in status reg */ - uint16_t page_size; /* page size for page program */ - uint32_t erase_size; /* minimal erase size */ -}; - -static __always_inline -uint16_t msm_camera_spi_get_hlen(struct msm_camera_spi_inst *inst) -{ - return sizeof(inst->opcode) + inst->addr_len + inst->dummy_len; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx); - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.c deleted file mode 100644 index e0e283cb367f..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.c +++ /dev/null @@ -1,1622 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include -#include -#include - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static void msm_sensor_adjust_mclk(struct msm_camera_power_ctrl_t *ctrl) -{ - int idx; - struct msm_sensor_power_setting *power_setting; - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == SENSOR_CLK && - power_setting->seq_val == SENSOR_CAM_MCLK) { - if (power_setting->config_val == 24000000) { - power_setting->config_val = 23880000; - CDBG("%s MCLK request adjusted to 23.88MHz\n" - , __func__); - } - break; - } - } - - return; -} - -static int32_t msm_camera_get_power_settimgs_from_sensor_lib( - struct msm_camera_power_ctrl_t *power_info, - struct msm_sensor_power_setting_array *power_setting_array) -{ - int32_t rc = 0; - uint32_t size; - struct msm_sensor_power_setting *ps; - bool need_reverse = 0; - - if ((NULL == power_info->power_setting) || - (0 == power_info->power_setting_size)) { - - ps = power_setting_array->power_setting; - size = power_setting_array->size; - if ((NULL == ps) || (0 == size)) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -EINVAL; - goto FAILED_1; - } - - power_info->power_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FAILED_1; - } - memcpy(power_info->power_setting, - power_setting_array->power_setting, - sizeof(*ps) * size); - power_info->power_setting_size = size; - } - - ps = power_setting_array->power_down_setting; - size = power_setting_array->size_down; - if (NULL == ps || 0 == size) { - ps = power_info->power_setting; - size = power_info->power_setting_size; - need_reverse = 1; - } - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_UP; - } - memcpy(power_info->power_down_setting, - ps, - sizeof(*ps) * size); - power_info->power_down_setting_size = size; - - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } - } - - return 0; -FREE_UP: - kfree(power_info->power_setting); -FAILED_1: - return rc; -} - -static int32_t msm_sensor_get_dt_data(struct device_node *of_node, - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, i = 0, ret = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct msm_camera_sensor_board_info *sensordata = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - s_ctrl->sensordata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - rc = of_property_read_string(of_node, "qcom,sensor-name", - &sensordata->sensor_name); - CDBG("%s qcom,sensor-name %s, rc %d\n", __func__, - sensordata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, s_ctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - /* Get sensor mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - CDBG("%s:%d Default sensor mount angle\n", - __func__, __LINE__); - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Default sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = 0; - } - CDBG("%s qcom,sensor-position %d\n", __func__, - sensordata->sensor_info->position); - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Default sensor mode\n", __func__, __LINE__); - sensordata->sensor_info->modes_supported = 0; - } - CDBG("%s qcom,sensor-mode %d\n", __func__, - sensordata->sensor_info->modes_supported); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 %d\n", __func__, - s_ctrl->set_mclk_23880000); - - rc = msm_sensor_get_dt_csi_data(of_node, &sensordata->csi_lane_params); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSOR_INFO; - } - - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) - goto FREE_CSI; - - rc = msm_camera_get_dt_power_setting_data(of_node, - sensordata->power_info.cam_vreg, - sensordata->power_info.num_vreg, - &sensordata->power_info); - - - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - - rc = msm_camera_get_power_settimgs_from_sensor_lib( - &sensordata->power_info, - &s_ctrl->power_setting_array); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_PS; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_REQ_TBL; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_SET_TBL; - } - } - rc = msm_sensor_get_dt_actuator_data(of_node, - &sensordata->actuator_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_PIN_TBL; - } - - sensordata->slave_info = kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!sensordata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_ACTUATOR_INFO; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SLAVE_INFO; - } - - sensordata->slave_info->sensor_slave_addr = id_info[0]; - sensordata->slave_info->sensor_id_reg_addr = id_info[1]; - sensordata->slave_info->sensor_id = id_info[2]; - CDBG("%s:%d slave addr 0x%x sensor reg 0x%x id 0x%x\n", - __func__, __LINE__, - sensordata->slave_info->sensor_slave_addr, - sensordata->slave_info->sensor_id_reg_addr, - sensordata->slave_info->sensor_id); - - /*Optional property, don't return error if absent */ - ret = of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("%s qcom,misc_regulator %s, rc %d\n", __func__, - sensordata->misc_regulator, ret); - - kfree(gpio_array); - - return rc; - -FREE_SLAVE_INFO: - kfree(s_ctrl->sensordata->slave_info); -FREE_ACTUATOR_INFO: - kfree(s_ctrl->sensordata->actuator_info); -FREE_GPIO_PIN_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); -FREE_GPIO_SET_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); -FREE_GPIO_REQ_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(s_ctrl->sensordata->power_info.gpio_conf); -FREE_PS: - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->power_info.power_down_setting); -FREE_VREG: - kfree(s_ctrl->sensordata->power_info.cam_vreg); -FREE_CSI: - kfree(s_ctrl->sensordata->csi_lane_params); -FREE_SENSOR_INFO: - kfree(s_ctrl->sensordata->sensor_info); -FREE_SENSORDATA: - kfree(s_ctrl->sensordata); - kfree(gpio_array); - return rc; -} - -static void msm_sensor_misc_regulator( - struct msm_sensor_ctrl_t *sctrl, uint32_t enable) -{ - int32_t rc = 0; - if (enable) { - sctrl->misc_regulator = (void *)rpm_regulator_get( - &sctrl->pdev->dev, sctrl->sensordata->misc_regulator); - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode(sctrl->misc_regulator, - RPM_REGULATOR_MODE_HPM); - if (rc < 0) { - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } else { - pr_err("%s: Failed to vote for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - } - } else { - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode( - (struct rpm_regulator *)sctrl->misc_regulator, - RPM_REGULATOR_MODE_AUTO); - if (rc < 0) - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } -} - -int32_t msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (!s_ctrl->pdev && !s_ctrl->sensor_i2c_client->client) - return 0; - kfree(s_ctrl->sensordata->slave_info); - kfree(s_ctrl->sensordata->cam_slave_info); - kfree(s_ctrl->sensordata->actuator_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->csi_lane_params); - kfree(s_ctrl->sensordata->sensor_info); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(s_ctrl->sensordata); - return 0; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8610_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - struct msm_camera_power_ctrl_t *power_info; - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_i2c_client *sensor_i2c_client; - - if (!s_ctrl) { - pr_err("%s:%d failed: s_ctrl %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - power_info = &s_ctrl->sensordata->power_info; - sensor_device_type = s_ctrl->sensor_device_type; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - - if (!power_info || !sensor_i2c_client) { - pr_err("%s:%d failed: power_info %pK sensor_i2c_client %pK\n", - __func__, __LINE__, power_info, sensor_i2c_client); - return -EINVAL; - } - return msm_camera_power_down(power_info, sensor_device_type, - sensor_i2c_client); -} - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - struct msm_camera_power_ctrl_t *power_info; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; - uint32_t retry = 0; - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - power_info = &s_ctrl->sensordata->power_info; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!power_info || !sensor_i2c_client || !slave_info || - !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK %pK\n", - __func__, __LINE__, power_info, - sensor_i2c_client, slave_info, sensor_name); - return -EINVAL; - } - - CDBG("set__mclk_23880000: %d", s_ctrl->set_mclk_23880000); - if (s_ctrl->set_mclk_23880000) - msm_sensor_adjust_mclk(power_info); - - for (retry = 0; retry < 3; retry++) { - rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type, - sensor_i2c_client); - if (rc < 0) - return rc; - rc = msm_sensor_check_id(s_ctrl); - if (rc < 0) { - msm_camera_power_down(power_info, - s_ctrl->sensor_device_type, sensor_i2c_client); - msleep(20); - continue; - } else { - break; - } - } - - return rc; -} - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_WORD_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; //to pass DFMS with removing REAR cam - } - return rc; -} - -static struct msm_sensor_ctrl_t *get_sctrl(struct v4l2_subdev *sd) -{ - return container_of(container_of(sd, struct msm_sd_subdev, sd), - struct msm_sensor_ctrl_t, msm_sd); -} - -static void msm_sensor_stop_stream(struct msm_sensor_ctrl_t *s_ctrl) -{ - mutex_lock(s_ctrl->msm_sensor_mutex); - if (s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &s_ctrl->stop_setting); - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return; -} - -static int msm_sensor_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - /* TO-DO: Need to set AF status register address and expected value - We need to check the AF status in the sensor register and - set the status in the *status variable accordingly*/ - return 0; -} - -static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - void __user *argp = (void __user *)arg; - if (!s_ctrl) { - pr_err("%s s_ctrl NULL\n", __func__); - return -EBADF; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_CFG: - return s_ctrl->func_tbl->sensor_config(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_GET_AF_STATUS: - return msm_sensor_get_af_status(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_RELEASE: - msm_sensor_stop_stream(s_ctrl); - return 0; - case MSM_SD_SHUTDOWN: - return 0; - case VIDIOC_MSM_SENSOR_NATIVE_CMD: - if( s_ctrl->func_tbl->sensor_native_control != NULL ) - return s_ctrl->func_tbl->sensor_native_control(s_ctrl, argp); - else - pr_err("s_ctrl->func_tbl->sensor_native_control is NULL\n"); - - default: - return -ENOIOCTLCMD; - } -} - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - pr_err("CFG_GET_SENSOR_INFO\n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - pr_err("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int s_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - p_ctrl = &s_ctrl->sensordata->power_info; - - /* Update power up sequence */ - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (s_index = 0; s_index < - p_ctrl->power_setting_size; s_index++) { - CDBG("%s i %d power up setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_setting[s_index].seq_type, - p_ctrl->power_setting[s_index].seq_val, - p_ctrl->power_setting[s_index].config_val, - p_ctrl->power_setting[s_index].delay); - } - - /* Update power down sequence */ - if (!sensor_slave_info.power_setting_array.power_down_setting || - 0 == size) { - pr_err("%s: Missing dedicated power down sequence\n", - __func__); - break; - } - size = sensor_slave_info.power_setting_array.size_down; - - if (p_ctrl->power_down_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_down_setting); - p_ctrl->power_down_setting = tmp; - } - p_ctrl->power_down_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_down_setting, (void *) - sensor_slave_info.power_setting_array. - power_down_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_down_setting); - rc = -EFAULT; - break; - } - for (s_index = 0; s_index < - p_ctrl->power_down_setting_size; s_index++) { - CDBG("%s i %d power DOWN setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_down_setting[s_index].seq_type, - p_ctrl->power_down_setting[s_index].seq_val, - p_ctrl->power_down_setting[s_index].config_val, - p_ctrl->power_down_setting[s_index].delay); - } - - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint8_t *reg_data = NULL; - uint32_t i = 0, size = 0; - - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.data_type == MSM_CAMERA_I2C_BURST_DATA) { - CDBG("%s:%d MSM_CAMERA_I2C_BURST_DATA\n", __func__, __LINE__); - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = (void *)kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user((void *)reg_setting, - (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - size = conf_array.size; - conf_array.size = 1; - - for (i = 0; i < size; i++) { - reg_data = kzalloc(reg_setting[i].delay * - (sizeof(uint8_t)), GFP_KERNEL); - if (!reg_data) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_data, - (void *)reg_setting[i].reg_burst_data, - reg_setting[i].delay * - (sizeof(uint8_t)))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_data); - continue; - } - - reg_setting[i].reg_burst_data = reg_data; - conf_array.reg_setting = ®_setting[i]; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_burst_table( - s_ctrl->sensor_i2c_client, &conf_array); - if (rc < 0) { - pr_err("%s:%d failed i2c_write_table rc %d\n", __func__, - __LINE__, rc); - } - kfree(reg_data); - } - - kfree(reg_setting); - }else { - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - } - case CFG_SLAVE_READ_I2C: { - struct msm_camera_i2c_read_config read_config; - uint16_t local_data = 0; - uint16_t orig_slave_addr = 0, read_slave_addr = 0; - if (copy_from_user(&read_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_read_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - read_slave_addr = read_config.slave_addr; - CDBG("%s:CFG_SLAVE_READ_I2C:", __func__); - CDBG("%s:slave_addr=0x%x reg_addr=0x%x, data_type=%d\n", - __func__, read_config.slave_addr, - read_config.reg_addr, read_config.data_type); - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - read_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - read_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - read_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - read_config.reg_addr, - &local_data, read_config.data_type); - if (rc < 0) { - pr_err("%s:%d: i2c_read failed\n", __func__, __LINE__); - break; - } - if (copy_to_user((void __user *)read_config.data, - (void *)&local_data, sizeof(uint16_t))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - break; - } - case CFG_SLAVE_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_array_write_config write_config; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint16_t write_slave_addr = 0; - uint16_t orig_slave_addr = 0; - - if (copy_from_user(&write_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_array_write_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s:CFG_SLAVE_WRITE_I2C_ARRAY:", __func__); - CDBG("%s:slave_addr=0x%x, array_size=%d\n", __func__, - write_config.slave_addr, - write_config.conf_array.size); - - if (!write_config.conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(write_config.conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, - (void *)(write_config.conf_array.reg_setting), - write_config.conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - write_config.conf_array.reg_setting = reg_setting; - write_slave_addr = write_config.slave_addr; - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - write_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - write_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - write_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &(write_config.conf_array)); - if (s_ctrl->sensor_i2c_client->cci_client) { - s_ctrl->sensor_i2c_client->cci_client->sid = - orig_slave_addr; - } else if (s_ctrl->sensor_i2c_client->client) { - s_ctrl->sensor_i2c_client->client->addr = - orig_slave_addr; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_DOWN) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_up) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 1); - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_UP; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_down) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 0); - - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - - if (!stop_setting->size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - - case CFG_SET_SENSOR_OTP_CAL: { - const uint16_t otp_start = 0xa3d, otp_end = 0xa42; - uint16_t otp_cal_data[6], temp_data; - int idx = 0; - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A02, 0x0F, // Set the PAGE15 of OTP set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x01, // Set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (i = otp_start; i <= otp_end; i++) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - i, &otp_cal_data[idx++], - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C read\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_err("%s: 0x%x, 0x%x\n", __func__, i, otp_cal_data[idx - 1]); - if ((i+1)%2) { - temp_data = ((otp_cal_data[idx - 2] << 8) & 0xFF00) | - (otp_cal_data[idx - 1] & 0xFF); - // Valid check : +-50% - if (temp_data > 0x180 || temp_data < 0x80) { - pr_err("%s: range over (0x%x)\n", __func__, temp_data); - rc = -EFAULT; - break; - } - } - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x00, // Disable NVM controller - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (rc >= 0) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020E, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020F, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0210, otp_cal_data[0], // R msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0211, otp_cal_data[1], // R lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0212, otp_cal_data[4], // B msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0213, otp_cal_data[5], // B lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0214, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0215, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - } - break; - } - - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - rc = 0; - return rc; -} - -static int msm_sensor_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - mutex_lock(s_ctrl->msm_sensor_mutex); - if (!on && s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static int msm_sensor_v4l2_enum_fmt(struct v4l2_subdev *sd, - unsigned int index, enum v4l2_mbus_pixelcode *code) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - - if ((unsigned int)index >= s_ctrl->sensor_v4l2_subdev_info_size) - return -EINVAL; - - *code = s_ctrl->sensor_v4l2_subdev_info[index].code; - return 0; -} - -static struct v4l2_subdev_core_ops msm_sensor_subdev_core_ops = { - .ioctl = msm_sensor_subdev_ioctl, - .s_power = msm_sensor_power, -}; - -static struct v4l2_subdev_video_ops msm_sensor_subdev_video_ops = { - .enum_mbus_fmt = msm_sensor_v4l2_enum_fmt, -}; - -static struct v4l2_subdev_ops msm_sensor_subdev_ops = { - .core = &msm_sensor_subdev_core_ops, - .video = &msm_sensor_subdev_video_ops, -}; - -static struct msm_sensor_fn_t msm_sensor_func_tbl = { - .sensor_config = msm_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_burst_table = msm_camera_cci_i2c_write_burst_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_write_conf_tbl = msm_camera_qup_i2c_write_conf_tbl, -}; - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = - (struct msm_sensor_ctrl_t *)data; - struct msm_camera_cci_client *cci_client = NULL; - uint32_t session_id; - unsigned long mount_pos = 0; - s_ctrl->pdev = pdev; - CDBG("%s called data %pK\n", __func__, data); - CDBG("%s pdev name %s\n", __func__, pdev->id_entry->name); - if (pdev->dev.of_node) { - rc = msm_sensor_get_dt_data(pdev->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - s_ctrl->sensordata->power_info.dev = &pdev->dev; - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - /* TODO: get CCI subdev */ - cci_client = s_ctrl->sensor_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = - s_ctrl->sensordata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - kfree(cci_client); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, cam_8974_clk_info, - sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, - s_ctrl->sensordata->sensor_name); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(cci_client); - return rc; - } - - pr_info("%s %s probe succeeded\n", __func__, - s_ctrl->sensordata->sensor_name); - v4l2_subdev_init(&s_ctrl->msm_sd.sd, - s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint32_t session_id; - unsigned long mount_pos = 0; - CDBG("%s %s_i2c_probe called\n", __func__, client->name); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!client->dev.of_node) { - CDBG("msm_sensor_i2c_probe: of_node is NULL"); - s_ctrl = (struct msm_sensor_ctrl_t *)(id->driver_data); - if (!s_ctrl) { - pr_err("%s:%d sensor ctrl structure NULL\n", __func__, - __LINE__); - return -EINVAL; - } - s_ctrl->sensordata = client->dev.platform_data; - } else { - CDBG("msm_sensor_i2c_probe: of_node exisists"); - rc = msm_sensor_get_dt_data(client->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - if (s_ctrl->sensordata == NULL) { - pr_err("%s %s NULL sensor data\n", __func__, client->name); - return -EFAULT; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - if (s_ctrl->sensordata->slave_info->sensor_slave_addr) - s_ctrl->sensor_i2c_client->client->addr = - s_ctrl->sensordata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - if (!client->dev.of_node) { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8960_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8960_clk_info, sizeof(cam_8960_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8960_clk_info); - } else { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8610_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8610_clk_info, sizeof(cam_8610_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8610_clk_info); - } - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, client->name); - kfree(s_ctrl->sensordata->power_info.clk_info); - return rc; - } - - CDBG("%s %s probe succeeded\n", __func__, client->name); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", id->name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->sensor_i2c_client->client->dev, - &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - return rc; -} - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = -ENOMEM; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_cam_clk_info *clk_info = NULL; - unsigned long mount_pos = 0; - - /* Validate input parameters */ - if (!s_ctrl) { - pr_err("%s:%d failed: invalid params s_ctrl %pK\n", __func__, - __LINE__, s_ctrl); - return -EINVAL; - } - - if (!s_ctrl->sensor_i2c_client) { - pr_err("%s:%d failed: invalid params sensor_i2c_client %pK\n", - __func__, __LINE__, s_ctrl->sensor_i2c_client); - return -EINVAL; - } - - /* Initialize cci_client */ - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s:%d failed: no memory cci_client %pK\n", __func__, - __LINE__, s_ctrl->sensor_i2c_client->cci_client); - return -ENOMEM; - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = s_ctrl->sensor_i2c_client->cci_client; - - /* Get CCI subdev */ - cci_client->cci_subdev = msm_cci_get_subdev(); - - /* Update CCI / I2C function table */ - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - } else { - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) { - CDBG("%s:%d\n", __func__, __LINE__); - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - } - } - - /* Update function table driven by ioctl */ - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - - /* Update v4l2 subdev ops table */ - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - /* Initialize clock info */ - clk_info = kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!clk_info) { - pr_err("%s:%d failed no memory clk_info %pK\n", __func__, - __LINE__, clk_info); - rc = -ENOMEM; - goto FREE_CCI_CLIENT; - } - memcpy(clk_info, cam_8974_clk_info, sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info = clk_info; - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - return 0; - -FREE_CCI_CLIENT: - kfree(cci_client); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.h deleted file mode 100755 index 2f02dbab7128..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_H -#define MSM_SENSOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/soc/qcom/camera2.h" -#include "../include/media/msm_cam_sensor.h" -#include -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_sd.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -struct msm_sensor_ctrl_t; - -enum msm_sensor_state_t { - MSM_SENSOR_POWER_DOWN, - MSM_SENSOR_POWER_UP, -}; - -struct msm_sensor_fn_t { - int (*sensor_config) (struct msm_sensor_ctrl_t *, void __user *); - int (*sensor_power_down) (struct msm_sensor_ctrl_t *); - int (*sensor_power_up) (struct msm_sensor_ctrl_t *); - int (*sensor_match_id) (struct msm_sensor_ctrl_t *); - int (*sensor_native_control) (struct msm_sensor_ctrl_t *, void __user *); -}; - - -struct msm_sensor_ctrl_t { - struct platform_device *pdev; - struct mutex *msm_sensor_mutex; - - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_sensor_board_info *sensordata; - struct msm_sensor_power_setting_array power_setting_array; - struct msm_sensor_packed_cfg_t *cfg_override; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_i2c_master; - - struct msm_camera_i2c_client *sensor_i2c_client; - struct v4l2_subdev_info *sensor_v4l2_subdev_info; - uint8_t sensor_v4l2_subdev_info_size; - struct v4l2_subdev_ops *sensor_v4l2_subdev_ops; - struct msm_sensor_fn_t *func_tbl; - struct msm_camera_i2c_reg_setting stop_setting; - void *misc_regulator; - enum msm_sensor_state_t sensor_state; - uint8_t is_probe_succeed; - uint32_t id; - struct device_node *of_node; - enum msm_camera_stream_type_t camera_stream_type; - uint32_t set_mclk_23880000; -}; - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp); - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data); -int msm_sensor_update_cfg(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.c deleted file mode 100644 index c0277709741c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.c +++ /dev/null @@ -1,1288 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define SENSOR_DRIVER_I2C "camera" -/* Header file declaration */ -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#include -#include -#include -#include -#include -static char *regs_table = NULL; -static int table_size; -#endif -#if defined(CONFIG_SR130PC20) -#include "sr130pc20.h" -#endif -#if defined(CONFIG_SR200PC20) -#include "sr200pc20.h" -#endif -#if defined(CONFIG_S5K4ECGX) -#include "s5k4ecgx.h" -#endif -#if defined(CONFIG_SR030PC50) -#include "sr030pc50.h" -#endif -#if defined(CONFIG_DB8221A) -#include "db8221a.h" -#endif - -/* Logging macro */ -//#define MSM_SENSOR_DRIVER_DEBUG -#undef CDBG -#ifdef MSM_SENSOR_DRIVER_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define SENSOR_MAX_MOUNTANGLE (360) - -/* Static declaration */ -static struct msm_sensor_ctrl_t *g_sctrl[MAX_CAMERAS]; - -#if defined(CONFIG_SR130PC20) -static struct msm_sensor_fn_t sr130pc20_sensor_func_tbl = { - .sensor_config = sr130pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sr130pc20_sensor_match_id, - .sensor_native_control = sr130pc20_sensor_native_control, -}; -#endif - -#if defined(CONFIG_SR200PC20) -static struct msm_sensor_fn_t sr200pc20_sensor_func_tbl = { - .sensor_config = sr200pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr200pc20_sensor_native_control, -}; -#endif -#if defined(CONFIG_S5K4ECGX) -static struct msm_sensor_fn_t s5k4ecgx_sensor_func_tbl = { - .sensor_config = s5k4ecgx_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = s5k4ecgx_sensor_match_id, - .sensor_native_control = s5k4ecgx_sensor_native_control, -}; -#endif -#if defined(CONFIG_SR030PC50) -static struct msm_sensor_fn_t sr030pc50_sensor_func_tbl = { - .sensor_config = sr030pc50_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sr030pc50_sensor_match_id, - .sensor_native_control = sr030pc50_sensor_native_control, -}; -#endif -#if defined(CONFIG_DB8221A) -static struct msm_sensor_fn_t db8221a_sensor_func_tbl = { - .sensor_config = db8221a_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = db8221a_sensor_native_control, -}; -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); - -static int msm_sensor_platform_remove(struct platform_device *pdev) -{ - struct msm_sensor_ctrl_t *s_ctrl; - - pr_err("%s: sensor FREE\n", __func__); - - s_ctrl = g_sctrl[pdev->id]; - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - g_sctrl[pdev->id] = NULL; - - return 0; -} - - -static const struct of_device_id msm_sensor_driver_dt_match[] = { - {.compatible = "qcom,camera"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_sensor_driver_dt_match); - -static struct platform_driver msm_sensor_platform_driver = { - .driver = { - .name = "qcom,camera", - .owner = THIS_MODULE, - .of_match_table = msm_sensor_driver_dt_match, - }, - .remove = msm_sensor_platform_remove, -}; - -static struct v4l2_subdev_info msm_sensor_driver_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_sensor_driver_create_i2c_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - struct i2c_client *client = s_ctrl->sensor_i2c_client->client; - - CDBG("%s %s I2c probe succeeded\n", __func__, client->name); - rc = camera_init_v4l2(&client->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_i2c_v4l2 rc %d", rc); - return rc; - } - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_sensor_driver_create_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_v4l2 rc %d", rc); - return rc; - } - CDBG("rc %d session_id %d", rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - - /* Create /dev/v4l-subdevX device */ - v4l2_subdev_init(&s_ctrl->msm_sd.sd, s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, s_ctrl->pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - return rc; -} - -static int32_t msm_sensor_fill_eeprom_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - const char *eeprom_name; - struct device_node *src_node = NULL; - uint32_t val = 0, count = 0, eeprom_name_len; - int i; - int32_t *eeprom_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - const void *p; - - if (!s_ctrl->sensordata->eeprom_name || !of_node) - return -EINVAL; - - eeprom_name_len = strlen(s_ctrl->sensordata->eeprom_name); - if (eeprom_name_len >= MAX_SENSOR_NAME) - return -EINVAL; - - sensor_info = s_ctrl->sensordata->sensor_info; - eeprom_subdev_id = &sensor_info->subdev_id[SUB_MODULE_EEPROM]; - /* - * string for eeprom name is valid, set sudev id to -1 - * and try to found new id - */ - *eeprom_subdev_id = -1; - - if (0 == eeprom_name_len) - return 0; - - CDBG("Try to find eeprom subdev for %s\n", - s_ctrl->sensordata->eeprom_name); - p = of_get_property(of_node, "qcom,eeprom-src", &count); - if (!p || !count) - return 0; - - count /= sizeof(uint32_t); - for (i = 0; i < count; i++) { - eeprom_name = NULL; - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", i); - if (!src_node) { - pr_err("eeprom src node NULL\n"); - continue; - } - rc = of_property_read_string(src_node, "qcom,eeprom-name", - &eeprom_name); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - if (strcmp(eeprom_name, s_ctrl->sensordata->eeprom_name)) - continue; - - rc = of_property_read_u32(src_node, "cell-index", &val); - - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - - *eeprom_subdev_id = val; - CDBG("Done. Eeprom subdevice id is %d\n", val); - of_node_put(src_node); - src_node = NULL; - break; - } - - return rc; -} - -static int32_t msm_sensor_fill_actuator_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct device_node *src_node = NULL; - uint32_t val = 0, actuator_name_len; - int32_t *actuator_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - - if (!s_ctrl->sensordata->actuator_name || !of_node) - return -EINVAL; - - actuator_name_len = strlen(s_ctrl->sensordata->actuator_name); - if (actuator_name_len >= MAX_SENSOR_NAME) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is greater than max len\n"); - return -EINVAL; - } - - sensor_info = s_ctrl->sensordata->sensor_info; - actuator_subdev_id = &sensor_info->subdev_id[SUB_MODULE_ACTUATOR]; - /* - * string for actuator name is valid, set sudev id to -1 - * and try to found new id - */ - *actuator_subdev_id = -1; - - if (0 == actuator_name_len) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is zero\n"); - return 0; - } - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - pr_err("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - pr_err("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -EINVAL; - } - *actuator_subdev_id = val; - of_node_put(src_node); - src_node = NULL; - } - - return rc; -} - -static int32_t msm_sensor_fill_slave_info_init_params( - struct msm_camera_sensor_slave_info *slave_info, - struct msm_sensor_info_t *sensor_info) -{ - struct msm_sensor_init_params *sensor_init_params; - if (!slave_info || !sensor_info) - return -EINVAL; - - if (!slave_info->is_init_params_valid) - return 0; - - sensor_init_params = &slave_info->sensor_init_params; - if (INVALID_CAMERA_B != sensor_init_params->position) - sensor_info->position = - sensor_init_params->position; - - if (SENSOR_MAX_MOUNTANGLE > sensor_init_params->sensor_mount_angle) { - sensor_info->sensor_mount_angle = - sensor_init_params->sensor_mount_angle; - sensor_info->is_mount_angle_valid = 1; - } - - if (CAMERA_MODE_INVALID != sensor_init_params->modes_supported) - sensor_info->modes_supported = - sensor_init_params->modes_supported; - - return 0; -} - - -static int32_t msm_sensor_validate_slave_info( - struct msm_sensor_info_t *sensor_info) -{ - if (INVALID_CAMERA_B == sensor_info->position) { - sensor_info->position = BACK_CAMERA_B; - CDBG("%s:%d Set default sensor position\n", - __func__, __LINE__); - } - if (CAMERA_MODE_INVALID == sensor_info->modes_supported) { - sensor_info->modes_supported = CAMERA_MODE_2D_B; - CDBG("%s:%d Set default sensor modes_supported\n", - __func__, __LINE__); - } - if (SENSOR_MAX_MOUNTANGLE <= sensor_info->sensor_mount_angle) { - sensor_info->sensor_mount_angle = 0; - CDBG("%s:%d Set default sensor mount angle\n", - __func__, __LINE__); - sensor_info->is_mount_angle_valid = 1; - } - return 0; -} - -/* static function definition */ -int32_t msm_sensor_driver_probe(void *setting) -{ - int32_t rc = 0; - uint16_t i = 0, size = 0, size_down = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_camera_sensor_slave_info *slave_info = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_sensor_power_setting *power_down_setting = NULL; - struct msm_camera_slave_info *camera_info = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int c, end; - struct msm_sensor_power_setting power_down_setting_t; - unsigned long mount_pos = 0; - int probe_fail = 0; - - /* Validate input parameters */ - if (!setting) { - pr_err("failed: slave_info %pK", setting); - return -EINVAL; - } - - /* Allocate memory for slave info */ - slave_info = kzalloc(sizeof(*slave_info), GFP_KERNEL); - if (!slave_info) { - pr_err("failed: no memory slave_info %pK", slave_info); - return -ENOMEM; - } - - if (copy_from_user(slave_info, (void *)setting, sizeof(*slave_info))) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_SLAVE_INFO; - } - - /* Print slave info */ - CDBG("camera id %d", slave_info->camera_id); - CDBG("slave_addr 0x%x", slave_info->slave_addr); - CDBG("addr_type %d", slave_info->addr_type); - CDBG("sensor_id_reg_addr 0x%x", - slave_info->sensor_id_info.sensor_id_reg_addr); - CDBG("sensor_id 0x%x", slave_info->sensor_id_info.sensor_id); - CDBG("size %d", slave_info->power_setting_array.size); - CDBG("size down %d", slave_info->power_setting_array.size_down); - CDBG("sensor_name %s", slave_info->sensor_name); - - if (slave_info->is_init_params_valid) { - CDBG("position %d", - slave_info->sensor_init_params.position); - CDBG("mount %d", - slave_info->sensor_init_params.sensor_mount_angle); - } - - /* Validate camera id */ - if (slave_info->camera_id >= MAX_CAMERAS) { - pr_err("failed: invalid camera id %d max %d", - slave_info->camera_id, MAX_CAMERAS); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } - - /* Extract s_ctrl from camera id */ - s_ctrl = g_sctrl[slave_info->camera_id]; - if (!s_ctrl) { - pr_err("failed: s_ctrl %pK for camera_id %d", s_ctrl, - slave_info->camera_id); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } -#if defined(CONFIG_SR130PC20) - if(slave_info->camera_id == CAMERA_2){ - - s_ctrl->func_tbl = &sr130pc20_sensor_func_tbl ; - sr130pc20_set_default_settings(); - - } -#endif -#if defined(CONFIG_SR200PC20) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &sr200pc20_sensor_func_tbl ; - } -#endif -#if defined(CONFIG_S5K4ECGX) - if (slave_info->camera_id == CAMERA_0){ - s_ctrl->func_tbl = &s5k4ecgx_sensor_func_tbl; - } -#endif -#if defined(CONFIG_SR030PC50) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &sr030pc50_sensor_func_tbl; - } -#endif -#if defined(CONFIG_DB8221A) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &db8221a_sensor_func_tbl ; - } -#endif - CDBG("s_ctrl[%d] %pK", slave_info->camera_id, s_ctrl); - - if (s_ctrl->is_probe_succeed == 1) { - /* - * Different sensor on this camera slot has been connected - * and probe already succeeded for that sensor. Ignore this - * probe - */ - pr_err("slot %d has some other sensor", slave_info->camera_id); - rc = 0; - goto FREE_SLAVE_INFO; - } - - size = slave_info->power_setting_array.size; - /* Allocate memory for power up setting */ - power_setting = kzalloc(sizeof(*power_setting) * size, GFP_KERNEL); - if (!power_setting) { - pr_err("failed: no memory power_setting %pK", power_setting); - rc = -ENOMEM; - goto FREE_SLAVE_INFO; - } - - if (copy_from_user(power_setting, - (void *)slave_info->power_setting_array.power_setting, - sizeof(*power_setting) * size)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_SETTING; - } - - /* Print power setting */ - for (i = 0; i < size; i++) { - CDBG("UP seq_type %d seq_val %d config_val %ld delay %d", - power_setting[i].seq_type, power_setting[i].seq_val, - power_setting[i].config_val, power_setting[i].delay); - } - /*DOWN*/ - size_down = slave_info->power_setting_array.size_down; - if (!size_down) - size_down = size; - /* Allocate memory for power down setting */ - power_down_setting = - kzalloc(sizeof(*power_setting) * size_down, GFP_KERNEL); - if (!power_down_setting) { - pr_err("failed: no memory power_setting %pK", - power_down_setting); - rc = -ENOMEM; - goto FREE_POWER_SETTING; - } - - if (slave_info->power_setting_array.power_down_setting) { - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_down_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - } else { - pr_err("failed: no power_down_setting"); - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - - /*reverce*/ - end = size_down - 1; - for (c = 0; c < size_down/2; c++) { - power_down_setting_t = power_down_setting[c]; - power_down_setting[c] = power_down_setting[end]; - power_down_setting[end] = power_down_setting_t; - end--; - } - - } - - /* Print power setting */ - for (i = 0; i < size_down; i++) { - CDBG("DOWN seq_type %d seq_val %d config_val %ld delay %d", - power_down_setting[i].seq_type, - power_down_setting[i].seq_val, - power_down_setting[i].config_val, - power_down_setting[i].delay); - } - - camera_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL); - if (!camera_info) { - pr_err("failed: no memory slave_info %pK", camera_info); - goto FREE_POWER_DOWN_SETTING; - - } - - /* Fill power up setting and power up setting size */ - power_info = &s_ctrl->sensordata->power_info; - power_info->power_setting = power_setting; - power_info->power_setting_size = size; - power_info->power_down_setting = power_down_setting; - power_info->power_down_setting_size = size_down; - - s_ctrl->sensordata->slave_info = camera_info; - - /* Fill sensor slave info */ - camera_info->sensor_slave_addr = slave_info->slave_addr; - camera_info->sensor_id_reg_addr = - slave_info->sensor_id_info.sensor_id_reg_addr; - camera_info->sensor_id = slave_info->sensor_id_info.sensor_id; - - /* Fill CCI master, slave address and CCI default params */ - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - rc = -EINVAL; - goto FREE_CAMERA_INFO; - } - /* Fill sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = slave_info->addr_type; - if (s_ctrl->sensor_i2c_client->client) - s_ctrl->sensor_i2c_client->client->addr = - camera_info->sensor_slave_addr; - - cci_client = s_ctrl->sensor_i2c_client->cci_client; - if (!cci_client) { - pr_err("failed: cci_client %pK", cci_client); - goto FREE_CAMERA_INFO; - } - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = slave_info->slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->i2c_freq_mode = slave_info->i2c_freq_mode; - - /* Parse and fill vreg params for powerup settings */ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_setting, - power_info->power_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_power_setting_data rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Parse and fill vreg params for powerdown settings*/ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_down_setting, - power_info->power_down_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_fill_vreg_params for PDOWN rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Update sensor, actuator and eeprom name in - * sensor control structure */ - s_ctrl->sensordata->sensor_name = slave_info->sensor_name; - s_ctrl->sensordata->eeprom_name = slave_info->eeprom_name; - s_ctrl->sensordata->actuator_name = slave_info->actuator_name; - - /* - * Update eeporm subdevice Id by input eeprom name - */ - rc = msm_sensor_fill_eeprom_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - /* - * Update actuator subdevice Id by input actuator name - */ - rc = msm_sensor_fill_actuator_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - msm_sensor_remove_dev_node_for_eeprom(slave_info->camera_id, - s_ctrl->sensordata->sensor_info->subdev_id[SUB_MODULE_EEPROM]); - /* Power up and probe sensor */ - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s power up failed", slave_info->sensor_name); - probe_fail = rc; -// goto FREE_CAMERA_INFO; - } - - pr_err("%s probe succeeded", slave_info->sensor_name); - - /* - Set probe succeeded flag to 1 so that no other camera shall - * probed on this slot - */ - s_ctrl->is_probe_succeed = 1; - - /* - * Create /dev/videoX node, comment for now until dummy /dev/videoX - * node is created and used by HAL - */ - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) - rc = msm_sensor_driver_create_v4l_subdev(s_ctrl); - else - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - if (rc < 0) { - pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } - - memcpy(slave_info->subdev_name, s_ctrl->msm_sd.sd.entity.name, - sizeof(slave_info->subdev_name)); - slave_info->is_probe_succeed = 1; - slave_info->sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - slave_info->sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - pr_err("sensor_subdev_id = %d i = %d\n",slave_info->sensor_info.subdev_id[i], i); - } - if (copy_to_user((void __user *)setting, - (void *)slave_info, sizeof(*slave_info))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - } - - /* Power down */ - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - - rc = msm_sensor_fill_slave_info_init_params( - slave_info, - s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Fill slave info failed", slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - rc = msm_sensor_validate_slave_info(s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Validate slave info failed", - slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - /*Save sensor info*/ - s_ctrl->sensordata->cam_slave_info = slave_info; - - if(probe_fail) { - rc = probe_fail; - } - - return rc; - -CAMERA_POWER_DOWN: - s_ctrl->func_tbl->sensor_power_down(s_ctrl); -FREE_CAMERA_INFO: - kfree(camera_info); -FREE_POWER_DOWN_SETTING: - kfree(power_down_setting); -FREE_POWER_SETTING: - kfree(power_setting); -FREE_SLAVE_INFO: - kfree(slave_info); - return rc; -} - -static int32_t msm_sensor_driver_get_gpio_data( - struct msm_camera_sensor_board_info *sensordata, - struct device_node *of_node) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - - /* Validate input paramters */ - if (!sensordata || !of_node) { - pr_err("failed: invalid params sensordata %pK of_node %pK", - sensordata, of_node); - return -EINVAL; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("failed"); - return -ENOMEM; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("gpio count %d", gpio_array_size); - if (!gpio_array_size) - return 0; - - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, GFP_KERNEL); - if (!gpio_array) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("gpio_array[%d] = %d", i, gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_REQ_TBL; - } - - kfree(gpio_array); - return rc; - -FREE_GPIO_REQ_TBL: - kfree(sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(sensordata->power_info.gpio_conf); - kfree(gpio_array); - return rc; -} - -static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct msm_camera_sensor_board_info *sensordata = NULL; - struct device_node *of_node = s_ctrl->of_node; - uint32_t cell_id; - - s_ctrl->sensordata = kzalloc(sizeof(*sensordata), GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("failed: no memory"); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - /* - * Read cell index - this cell index will be the camera slot where - * this camera will be mounted - */ - rc = of_property_read_u32(of_node, "cell-index", &cell_id); - if (rc < 0) { - pr_err("failed: cell-index rc %d", rc); - goto FREE_SENSOR_DATA; - } - s_ctrl->id = cell_id; - - /* Validate cell_id */ - if (cell_id >= MAX_CAMERAS) { - pr_err("failed: invalid cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Check whether g_sctrl is already filled for this cell_id */ - if (g_sctrl[cell_id]) { - pr_err("failed: sctrl already filled for cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Read subdev info */ - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("failed"); - goto FREE_SENSOR_DATA; - } - - /* Read vreg information */ - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_vreg_data rc %d", rc); - goto FREE_SUB_MODULE_DATA; - } - - /* Read gpio information */ - rc = msm_sensor_driver_get_gpio_data(sensordata, of_node); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_get_gpio_data rc %d", rc); - goto FREE_VREG_DATA; - } - - /* Get CCI master */ - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("qcom,cci-master %d, rc %d", s_ctrl->cci_i2c_master, rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - /* Get mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Invalid sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = INVALID_CAMERA_B; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Invalid sensor mode supported\n", - __func__, __LINE__); - sensordata->sensor_info->modes_supported = CAMERA_MODE_INVALID; - } - /* Get vdd-cx regulator */ - /*Optional property, don't return error if absent */ - of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("qcom,misc_regulator %s", sensordata->misc_regulator); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 = %d\n", __func__, - s_ctrl->set_mclk_23880000); - - return rc; - -FREE_VREG_DATA: - kfree(sensordata->power_info.cam_vreg); -FREE_SUB_MODULE_DATA: - kfree(sensordata->sensor_info); -FREE_SENSOR_DATA: - kfree(sensordata); - return rc; -} - -static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - - CDBG("Enter"); - /* Validate input parameters */ - - - /* Allocate memory for sensor_i2c_client */ - s_ctrl->sensor_i2c_client = kzalloc(sizeof(*s_ctrl->sensor_i2c_client), - GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: no memory sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - return -ENOMEM; - } - - /* Allocate memory for mutex */ - s_ctrl->msm_sensor_mutex = kzalloc(sizeof(*s_ctrl->msm_sensor_mutex), - GFP_KERNEL); - if (!s_ctrl->msm_sensor_mutex) { - pr_err("failed: no memory msm_sensor_mutex %pK", - s_ctrl->msm_sensor_mutex); - goto FREE_SENSOR_I2C_CLIENT; - } - - /* Parse dt information and store in sensor control structure */ - rc = msm_sensor_driver_get_dt_data(s_ctrl); - if (rc < 0) { - pr_err("failed: rc %d", rc); - goto FREE_MUTEX; - } - - /* Initialize mutex */ - mutex_init(s_ctrl->msm_sensor_mutex); - - /* Initilize v4l2 subdev info */ - s_ctrl->sensor_v4l2_subdev_info = msm_sensor_driver_subdev_info; - s_ctrl->sensor_v4l2_subdev_info_size = - ARRAY_SIZE(msm_sensor_driver_subdev_info); - - /* Initialize default parameters */ - rc = msm_sensor_init_default_params(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_init_default_params rc %d", rc); - goto FREE_DT_DATA; - } - - /* Store sensor control structure in static database */ - g_sctrl[s_ctrl->id] = s_ctrl; - pr_err("g_sctrl[%d] %pK", s_ctrl->id, g_sctrl[s_ctrl->id]); - - return rc; - -FREE_DT_DATA: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata); -FREE_MUTEX: - kfree(s_ctrl->msm_sensor_mutex); -FREE_SENSOR_I2C_CLIENT: - kfree(s_ctrl->sensor_i2c_client); - return rc; -} - -static int32_t msm_sensor_driver_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); - return -ENOMEM; - } - - platform_set_drvdata(pdev, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->of_node = pdev->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - /* Fill platform device */ - pdev->id = s_ctrl->id; - s_ctrl->pdev = pdev; - - /* Fill device in power info */ - s_ctrl->sensordata->power_info.dev = &pdev->dev; - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int32_t msm_sensor_driver_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl; - - CDBG("\n\nEnter: msm_sensor_driver_i2c_probe"); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); - return -ENOMEM; - } - - i2c_set_clientdata(client, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - s_ctrl->of_node = client->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - - } - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int msm_sensor_driver_i2c_remove(struct i2c_client *client) -{ - struct msm_sensor_ctrl_t *s_ctrl = i2c_get_clientdata(client); - - pr_err("%s: sensor FREE\n", __func__); - - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - g_sctrl[s_ctrl->id] = NULL; - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - - return 0; -} - -static const struct i2c_device_id i2c_id[] = { - {SENSOR_DRIVER_I2C, (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_sensor_driver_i2c = { - .id_table = i2c_id, - .probe = msm_sensor_driver_i2c_probe, - .remove = msm_sensor_driver_i2c_remove, - .driver = { - .name = SENSOR_DRIVER_I2C, - }, -}; - -static int __init msm_sensor_driver_init(void) -{ - int32_t rc = 0; - - CDBG("Enter"); - rc = platform_driver_probe(&msm_sensor_platform_driver, - msm_sensor_driver_platform_probe); - if (!rc) { - CDBG("probe success"); - return rc; - } else { - CDBG("probe i2c"); - rc = i2c_add_driver(&msm_sensor_driver_i2c); - } - - return rc; -} - - -static void __exit msm_sensor_driver_exit(void) -{ - CDBG("Enter"); - platform_driver_unregister(&msm_sensor_platform_driver); - i2c_del_driver(&msm_sensor_driver_i2c); - return; -} - -#if defined CONFIG_SEC_CAMERA_TUNING -int register_table_init(char *filename) { - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return -1; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - return -1; - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - return -1; - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to if part of string compare sr352_regs_table"); - regs_table = dp; - table_size = lsize; - *((regs_table+ table_size) - 1) = '\0'; - return 0; -} - -void register_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (regs_table) { - vfree(regs_table); - regs_table = NULL; - } -} - -int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name) { - char *start, *end, *reg,reg_buf[7], data_buf[7]; - int rc,addr,value; - addr=0; - rc=0; - value=0; - - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - *(reg_buf + 4) = '\0'; - *(data_buf + 4) = '\0'; - } else { - *(reg_buf + 6) = '\0'; - *(data_buf + 6) = '\0'; - } - if(regs_table == NULL) { - pr_err("regs_table is null "); - return -1; - } - pr_err("@@@ %s",name); - start = strstr(regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf, (reg + 7), 4); - } else { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf, (reg + 9), 6); - } - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!"); - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - start = (reg + 14); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } else { - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - } - pr_err("register_read_from_sdcard end!"); - return rc; -} - -#endif - -module_init(msm_sensor_driver_init); -module_exit(msm_sensor_driver_exit); -MODULE_DESCRIPTION("msm_sensor_driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.h deleted file mode 100644 index 86df1c8c961d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_driver.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_DRIVER_H -#define MSM_SENSOR_DRIVER_H - -#include "msm_sensor.h" - -int32_t msm_sensor_driver_probe(void *setting); -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); -struct yuv_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int aeawblock; - unsigned int resolution; - unsigned int prev_resolution; -}; - -struct yuv_ctrl { - struct yuv_userset settings; - int op_mode; - int prev_mode; - int streamon; - int vtcall_mode; - int exif_iso; - int exif_shutterspeed; - int fixed_fps_val; -}; - - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.c deleted file mode 100644 index 383a2300779a..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.c +++ /dev/null @@ -1,576 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-SENSOR-INIT %s:%d " fmt "\n", __func__, __LINE__ - -/* Header files */ -#include -#include "msm_sensor_init.h" -#include "msm_sensor_driver.h" -#include "msm_sensor.h" -#include "msm_sd.h" - -/* Logging macro */ -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -struct class *camera_class = NULL; -struct device *cam_dev_back = NULL; -struct device *cam_dev_front = NULL; - -uint16_t rear_vendor_id = 0; - -static struct msm_sensor_init_t *s_init; - -/* Static function declaration */ -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg); - -/* Static structure declaration */ -static struct v4l2_subdev_core_ops msm_sensor_init_subdev_core_ops = { - .ioctl = msm_sensor_init_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_sensor_init_subdev_ops = { - .core = &msm_sensor_init_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_sensor_init_internal_ops; - -static int msm_sensor_wait_for_probe_done(struct msm_sensor_init_t *s_init) -{ - int rc; - int tm = 10000; - - if (s_init->module_init_status == 1) { - pr_err("msm_cam_get_module_init_status -2\n"); - return 0; - } - rc = wait_event_interruptible_timeout(s_init->state_wait, - (s_init->module_init_status == 1), msecs_to_jiffies(tm)); - if (rc < 0) - pr_err("%s:%d wait failed\n", __func__, __LINE__); - else if (rc == 0) - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - return rc; -} - -/* Static function definition */ -static int32_t msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, - void *arg) -{ - int32_t rc = 0; - struct sensor_init_cfg_data *cfg = (struct sensor_init_cfg_data *)arg; - - /* Validate input parameters */ - if (!s_init || !cfg) { - pr_err("failed: s_init %pK cfg %pK", s_init, cfg); - return -EINVAL; - } - - switch (cfg->cfgtype) { - case CFG_SINIT_PROBE: - mutex_lock(&s_init->imutex); - s_init->module_init_status = 0; - rc = msm_sensor_driver_probe(cfg->cfg.setting); - mutex_unlock(&s_init->imutex); - if (rc < 0) - pr_err("failed: msm_sensor_driver_probe rc %d", rc); - break; - - case CFG_SINIT_PROBE_DONE: - s_init->module_init_status = 1; - wake_up(&s_init->state_wait); - break; - - case CFG_SINIT_PROBE_WAIT_DONE: - msm_sensor_wait_for_probe_done(s_init); - break; - - default: - pr_err("default"); - break; - } - - return rc; -} - -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_sensor_init_t *s_init = v4l2_get_subdevdata(sd); - CDBG("Enter"); - - /* Validate input parameters */ - if (!s_init) { - pr_err("failed: s_init %pK", s_init); - return -EINVAL; - } - - switch (cmd) { - case VIDIOC_MSM_SENSOR_INIT_CFG: - rc = msm_sensor_driver_cmd(s_init, arg); - break; - - default: - pr_err_ratelimited("default\n"); - break; - } - - return rc; -} - - -static ssize_t back_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - -#if defined(CONFIG_IMX219) - char type[] = "SONY_IMX219\n"; -#elif defined(CONFIG_S5K4H5YB) - char type[] = "SLSI_S5K4H5YB\n"; -#elif defined(CONFIG_S5K3L2XX) - char type[] = "SLSI_S5K3L2XX\n"; -#elif defined(CONFIG_S5K4ECGX) - char type[] = "SLSI_S5K4ECGX\n"; -#elif defined(CONFIG_IMX135) - char type[] = "SONY_IMX135\n"; -#elif defined(CONFIG_SR544) - char type[] = "SILICONFILE_SR544\n"; -#elif defined(CONFIG_S5K3P3SX) - char type[] = "SLSI_S5K3P3SX\n"; -#else - char type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(type), "%s", type); -} - -static ssize_t front_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K6A3YX) - char cam_type[] = "SLSI_S5K6A3YX\n"; -#elif defined(CONFIG_S5K5E3YX) - char cam_type[] = "SLSI_S5K5E3YX\n"; -#elif defined(CONFIG_SR030PC50) - char cam_type[] = "SILICONFILE_SR030PC50\n"; -#elif defined(CONFIG_SR130PC20) - char cam_type[] = "SILICONFILE_SR130PC20\n"; -#elif defined(CONFIG_SR200PC20) - char cam_type[] = "SILICONFILE_SR200PC20\n"; -#elif defined(CONFIG_DB8221A) - char cam_type[] = "DONGBU_DB8221A\n"; -#else - char cam_type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(cam_type), "%s", cam_type); -} - -char cam_fw_ver[25] = "NULL NULL\n"; -static ssize_t back_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K4ECGX) - char cam_fw[] = "S5K4ECGX N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#else - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_ver); - return snprintf(buf, sizeof(cam_fw_ver), "%s", cam_fw_ver); -#endif -} - -static ssize_t back_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_ver, sizeof(cam_fw_ver), "%s", buf); - - return size; -} - -char cam_load_fw[25] = "NULL\n"; -static ssize_t back_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", cam_load_fw); - return snprintf(buf, sizeof(cam_load_fw), "%s", cam_load_fw); -} - -static ssize_t back_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_load_fw, sizeof(cam_load_fw), "%s\n", buf); - return size; -} - -char cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t back_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_full_ver); - return snprintf(buf, sizeof(cam_fw_full_ver), "%s", cam_fw_full_ver); -} - -static ssize_t back_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_full_ver, sizeof(cam_fw_full_ver), "%s", buf); - return size; -} - -static ssize_t rear_camera_isp_core_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char isp_core[] = "0.9000\n"; - return snprintf(buf, sizeof(isp_core), "%s", isp_core); -} -static ssize_t rear_camera_vendorid_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char vendor_id[16] = {0}; - if (rear_vendor_id) - sprintf(vendor_id, "0x0%x\n", rear_vendor_id); - else - strncpy(vendor_id, "NULL\n", sizeof(vendor_id)); - - return snprintf(buf, sizeof(vendor_id), "%s", vendor_id); -} - -char cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_user_ver); - return snprintf(buf, sizeof(cam_fw_user_ver), "%s", cam_fw_user_ver); -} - -static ssize_t back_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_user_ver, sizeof(cam_fw_user_ver), "%s", buf); - - return size; -} - -char cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_factory_ver); - return snprintf(buf, sizeof(cam_fw_factory_ver), "%s", cam_fw_factory_ver); -} - -static ssize_t back_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_factory_ver, sizeof(cam_fw_factory_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_fw_ver[25] = "S5K5E3YX N\n"; -#elif defined(CONFIG_S5K6A3YX) -char front_cam_fw_ver[25] = "S5K6A3YX N\n"; -#elif defined(CONFIG_SR030PC50) - char cam_fw[] = "SR030PC50 N\n"; -#elif defined(CONFIG_SR130PC20) - char cam_fw[] = "SR130PC20 N\n"; -#elif defined(CONFIG_SR200PC20) - char front_cam_fw_ver[25] = "SR200PC20M N\n"; -#elif defined(CONFIG_DB8221A) - char front_cam_fw_ver[25] = "DB8221A N\n"; -#else -char front_cam_fw_ver[25] = "NULL NULL\n"; -#endif -static ssize_t front_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_ver : %s\n", front_cam_fw_ver); - return snprintf(buf, sizeof(front_cam_fw_ver), "%s", front_cam_fw_ver); -} - -static ssize_t front_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_ver, sizeof(front_cam_fw_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_load_fw[25] = "S5K5E3YX\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "S5K5E3YX N N\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#else -char front_cam_load_fw[25] = "NULL\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#endif - -static DEVICE_ATTR(rear_camtype, S_IRUGO, back_camera_type_show, NULL); -static DEVICE_ATTR(rear_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_show, back_camera_firmware_store); -static DEVICE_ATTR(rear_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_user_show, back_camera_firmware_user_store); -static DEVICE_ATTR(rear_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_factory_show, back_camera_firmware_factory_store); -static DEVICE_ATTR(rear_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_load_show, back_camera_firmware_load_store); -static DEVICE_ATTR(rear_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - back_camera_firmware_full_show, back_camera_firmware_full_store); -static DEVICE_ATTR(isp_core, S_IRUGO, rear_camera_isp_core_show, NULL); -static DEVICE_ATTR(front_camtype, S_IRUGO, front_camera_type_show, NULL); -static DEVICE_ATTR(front_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_show, front_camera_firmware_store); -static DEVICE_ATTR(front_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_load_show, front_camera_firmware_load_store); - - -static DEVICE_ATTR(front_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - front_camera_firmware_full_show, front_camera_firmware_full_store); - -static DEVICE_ATTR(rear_vendorid, S_IRUGO, rear_camera_vendorid_show, NULL); - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id, int remove) -{ - if(id == CAMERA_0) { - if(remove == -1) { - device_remove_file(cam_dev_back, &dev_attr_rear_camfw_full); - pr_err("[CAM][Rear] EEPROM node removed\n"); - } - } else { - if(remove == -1) { - device_remove_file(cam_dev_front, &dev_attr_front_camfw_full); - pr_err("[CAM][Front] EEPROM node removed\n"); - } - } - return 0; -} -static int __init msm_sensor_init_module(void) -{ - struct msm_sensor_init_t *s_init = NULL; - int rc = 0; - - if (camera_class == NULL){ - camera_class = class_create(THIS_MODULE, "camera"); - if (IS_ERR(camera_class)) - pr_err("failed to create device cam_dev_rear!\n"); - } - /* Allocate memory for msm_sensor_init control structure */ - s_init = kzalloc(sizeof(struct msm_sensor_init_t), GFP_KERNEL); - if (!s_init) { - class_destroy(camera_class); - pr_err("failed: no memory s_init %pK", NULL); - return -ENOMEM; - } - - pr_err("MSM_SENSOR_INIT_MODULE %pK", NULL); - - /* Initialize mutex */ - mutex_init(&s_init->imutex); - - /* Create /dev/v4l-subdevX for msm_sensor_init */ - v4l2_subdev_init(&s_init->msm_sd.sd, &msm_sensor_init_subdev_ops); - snprintf(s_init->msm_sd.sd.name, sizeof(s_init->msm_sd.sd.name), "%s", - "msm_sensor_init"); - v4l2_set_subdevdata(&s_init->msm_sd.sd, s_init); - s_init->msm_sd.sd.internal_ops = &msm_sensor_init_internal_ops; - s_init->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - rc = media_entity_init(&s_init->msm_sd.sd.entity, 0, NULL, 0); - if (rc < 0) - goto entity_fail; - s_init->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_init->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR_INIT; - s_init->msm_sd.sd.entity.name = s_init->msm_sd.sd.name; - s_init->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - rc = msm_sd_register(&s_init->msm_sd); - if (rc < 0) - goto msm_sd_register_fail; - - cam_dev_back = device_create(camera_class, NULL, - 1, NULL, "rear"); - if (IS_ERR(cam_dev_back)) { - printk("Failed to create cam_dev_back device!\n"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_isp_core) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_isp_core.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_vendorid) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_vendorid.attr.name); - goto device_create_fail; - } - - cam_dev_front = device_create(camera_class, NULL, - 2, NULL, "front"); - if (IS_ERR(cam_dev_front)) { - printk("Failed to create cam_dev_front device!"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camfw.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - init_waitqueue_head(&s_init->state_wait); - - return 0; -device_create_fail: - msm_sd_unregister(&s_init->msm_sd); -msm_sd_register_fail: - media_entity_cleanup(&s_init->msm_sd.sd.entity); -entity_fail: - mutex_destroy(&s_init->imutex); - kfree(s_init); - class_destroy(camera_class); - return rc; -} - -static void __exit msm_sensor_exit_module(void) -{ - msm_sd_unregister(&s_init->msm_sd); - mutex_destroy(&s_init->imutex); - kfree(s_init); - return; -} - -module_init(msm_sensor_init_module); -module_exit(msm_sensor_exit_module); -MODULE_DESCRIPTION("msm_sensor_init"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.h deleted file mode 100644 index a9700ec94d43..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/msm_sensor_init.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_INIT_H -#define MSM_SENSOR_INIT_H - -#include "msm_sensor.h" - -struct msm_sensor_init_t { - struct mutex imutex; - struct msm_sd_subdev msm_sd; - int module_init_status; - wait_queue_head_t state_wait; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/mt9m114.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/mt9m114.c deleted file mode 100644 index 97feef3d945c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/mt9m114.c +++ /dev/null @@ -1,1510 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define MT9M114_SENSOR_NAME "mt9m114" -#define PLATFORM_DRIVER_NAME "msm_camera_mt9m114" -#define mt9m114_obj mt9m114_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -/* Sysctl registers */ -#define MT9M114_COMMAND_REGISTER 0x0080 -#define MT9M114_COMMAND_REGISTER_APPLY_PATCH (1 << 0) -#define MT9M114_COMMAND_REGISTER_SET_STATE (1 << 1) -#define MT9M114_COMMAND_REGISTER_REFRESH (1 << 2) -#define MT9M114_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) -#define MT9M114_COMMAND_REGISTER_OK (1 << 15) - -DEFINE_MSM_MUTEX(mt9m114_mut); -static struct msm_sensor_ctrl_t mt9m114_s_ctrl; - -static struct msm_sensor_power_setting mt9m114_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 100, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_720p_settings[] = { - {0xdc00, 0x50, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x52, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_POLL}, - - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ -}; - -static struct msm_camera_i2c_reg_conf mt9m114_recommend_settings[] = { - {0x301A, 0x0200, MSM_CAMERA_I2C_SET_WORD_MASK}, - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_enable = 1*/ - {0xC97E, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_divider_m_n = 288*/ - {0xC980, 0x0120,}, - /*cam_sysctl_pll_divider_p = 1792*/ - {0xC982, 0x0700,}, - /*output_control = 32769*/ - {0xC984, 0x8001,}, - /*mipi_timing_t_hs_zero = 3840*/ - {0xC988, 0x0F00,}, - /*mipi_timing_t_hs_exit_hs_trail = 2823*/ - {0xC98A, 0x0B07,}, - /*mipi_timing_t_clk_post_clk_pre = 3329*/ - {0xC98C, 0x0D01,}, - /*mipi_timing_t_clk_trail_clk_zero = 1821*/ - {0xC98E, 0x071D,}, - /*mipi_timing_t_lpx = 6*/ - {0xC990, 0x0006,}, - /*mipi_timing_init_timing = 2572*/ - {0xC992, 0x0A0C,}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ - - /*Sensor optimization*/ - {0x316A, 0x8270,}, - {0x316C, 0x8270,}, - {0x3ED0, 0x2305,}, - {0x3ED2, 0x77CF,}, - {0x316E, 0x8202,}, - {0x3180, 0x87FF,}, - {0x30D4, 0x6080,}, - {0xA802, 0x0008,},/*AE_TRACK_MODE*/ - {0x3E14, 0xFF39,}, - {0x0982, 0x0001,},/*ACCESS_CTL_STAT*/ - {0x098A, 0x5000,},/*PHYSICAL_ADDRESS_ACCESS*/ - {0xD000, 0x70CF,}, - {0xD002, 0xFFFF,}, - {0xD004, 0xC5D4,}, - {0xD006, 0x903A,}, - {0xD008, 0x2144,}, - {0xD00A, 0x0C00,}, - {0xD00C, 0x2186,}, - {0xD00E, 0x0FF3,}, - {0xD010, 0xB844,}, - {0xD012, 0xB948,}, - {0xD014, 0xE082,}, - {0xD016, 0x20CC,}, - {0xD018, 0x80E2,}, - {0xD01A, 0x21CC,}, - {0xD01C, 0x80A2,}, - {0xD01E, 0x21CC,}, - {0xD020, 0x80E2,}, - {0xD022, 0xF404,}, - {0xD024, 0xD801,}, - {0xD026, 0xF003,}, - {0xD028, 0xD800,}, - {0xD02A, 0x7EE0,}, - {0xD02C, 0xC0F1,}, - {0xD02E, 0x08BA,}, - {0xD030, 0x0600,}, - {0xD032, 0xC1A1,}, - {0xD034, 0x76CF,}, - {0xD036, 0xFFFF,}, - {0xD038, 0xC130,}, - {0xD03A, 0x6E04,}, - {0xD03C, 0xC040,}, - {0xD03E, 0x71CF,}, - {0xD040, 0xFFFF,}, - {0xD042, 0xC790,}, - {0xD044, 0x8103,}, - {0xD046, 0x77CF,}, - {0xD048, 0xFFFF,}, - {0xD04A, 0xC7C0,}, - {0xD04C, 0xE001,}, - {0xD04E, 0xA103,}, - {0xD050, 0xD800,}, - {0xD052, 0x0C6A,}, - {0xD054, 0x04E0,}, - {0xD056, 0xB89E,}, - {0xD058, 0x7508,}, - {0xD05A, 0x8E1C,}, - {0xD05C, 0x0809,}, - {0xD05E, 0x0191,}, - {0xD060, 0xD801,}, - {0xD062, 0xAE1D,}, - {0xD064, 0xE580,}, - {0xD066, 0x20CA,}, - {0xD068, 0x0022,}, - {0xD06A, 0x20CF,}, - {0xD06C, 0x0522,}, - {0xD06E, 0x0C5C,}, - {0xD070, 0x04E2,}, - {0xD072, 0x21CA,}, - {0xD074, 0x0062,}, - {0xD076, 0xE580,}, - {0xD078, 0xD901,}, - {0xD07A, 0x79C0,}, - {0xD07C, 0xD800,}, - {0xD07E, 0x0BE6,}, - {0xD080, 0x04E0,}, - {0xD082, 0xB89E,}, - {0xD084, 0x70CF,}, - {0xD086, 0xFFFF,}, - {0xD088, 0xC8D4,}, - {0xD08A, 0x9002,}, - {0xD08C, 0x0857,}, - {0xD08E, 0x025E,}, - {0xD090, 0xFFDC,}, - {0xD092, 0xE080,}, - {0xD094, 0x25CC,}, - {0xD096, 0x9022,}, - {0xD098, 0xF225,}, - {0xD09A, 0x1700,}, - {0xD09C, 0x108A,}, - {0xD09E, 0x73CF,}, - {0xD0A0, 0xFF00,}, - {0xD0A2, 0x3174,}, - {0xD0A4, 0x9307,}, - {0xD0A6, 0x2A04,}, - {0xD0A8, 0x103E,}, - {0xD0AA, 0x9328,}, - {0xD0AC, 0x2942,}, - {0xD0AE, 0x7140,}, - {0xD0B0, 0x2A04,}, - {0xD0B2, 0x107E,}, - {0xD0B4, 0x9349,}, - {0xD0B6, 0x2942,}, - {0xD0B8, 0x7141,}, - {0xD0BA, 0x2A04,}, - {0xD0BC, 0x10BE,}, - {0xD0BE, 0x934A,}, - {0xD0C0, 0x2942,}, - {0xD0C2, 0x714B,}, - {0xD0C4, 0x2A04,}, - {0xD0C6, 0x10BE,}, - {0xD0C8, 0x130C,}, - {0xD0CA, 0x010A,}, - {0xD0CC, 0x2942,}, - {0xD0CE, 0x7142,}, - {0xD0D0, 0x2250,}, - {0xD0D2, 0x13CA,}, - {0xD0D4, 0x1B0C,}, - {0xD0D6, 0x0284,}, - {0xD0D8, 0xB307,}, - {0xD0DA, 0xB328,}, - {0xD0DC, 0x1B12,}, - {0xD0DE, 0x02C4,}, - {0xD0E0, 0xB34A,}, - {0xD0E2, 0xED88,}, - {0xD0E4, 0x71CF,}, - {0xD0E6, 0xFF00,}, - {0xD0E8, 0x3174,}, - {0xD0EA, 0x9106,}, - {0xD0EC, 0xB88F,}, - {0xD0EE, 0xB106,}, - {0xD0F0, 0x210A,}, - {0xD0F2, 0x8340,}, - {0xD0F4, 0xC000,}, - {0xD0F6, 0x21CA,}, - {0xD0F8, 0x0062,}, - {0xD0FA, 0x20F0,}, - {0xD0FC, 0x0040,}, - {0xD0FE, 0x0B02,}, - {0xD100, 0x0320,}, - {0xD102, 0xD901,}, - {0xD104, 0x07F1,}, - {0xD106, 0x05E0,}, - {0xD108, 0xC0A1,}, - {0xD10A, 0x78E0,}, - {0xD10C, 0xC0F1,}, - {0xD10E, 0x71CF,}, - {0xD110, 0xFFFF,}, - {0xD112, 0xC7C0,}, - {0xD114, 0xD840,}, - {0xD116, 0xA900,}, - {0xD118, 0x71CF,}, - {0xD11A, 0xFFFF,}, - {0xD11C, 0xD02C,}, - {0xD11E, 0xD81E,}, - {0xD120, 0x0A5A,}, - {0xD122, 0x04E0,}, - {0xD124, 0xDA00,}, - {0xD126, 0xD800,}, - {0xD128, 0xC0D1,}, - {0xD12A, 0x7EE0,}, - {0x098E, 0x0000,}, - - {0x0982, 0x0001,}, - {0x098A, 0x5C10,}, - {0xDC10, 0xC0F1,}, - {0xDC12, 0x0CDA,}, - {0xDC14, 0x0580,}, - {0xDC16, 0x76CF,}, - {0xDC18, 0xFF00,}, - {0xDC1A, 0x2184,}, - {0xDC1C, 0x9624,}, - {0xDC1E, 0x218C,}, - {0xDC20, 0x8FC3,}, - {0xDC22, 0x75CF,}, - {0xDC24, 0xFFFF,}, - {0xDC26, 0xE058,}, - {0xDC28, 0xF686,}, - {0xDC2A, 0x1550,}, - {0xDC2C, 0x1080,}, - {0xDC2E, 0xE001,}, - {0xDC30, 0x1D50,}, - {0xDC32, 0x1002,}, - {0xDC34, 0x1552,}, - {0xDC36, 0x1100,}, - {0xDC38, 0x6038,}, - {0xDC3A, 0x1D52,}, - {0xDC3C, 0x1004,}, - {0xDC3E, 0x1540,}, - {0xDC40, 0x1080,}, - {0xDC42, 0x081B,}, - {0xDC44, 0x00D1,}, - {0xDC46, 0x8512,}, - {0xDC48, 0x1000,}, - {0xDC4A, 0x00C0,}, - {0xDC4C, 0x7822,}, - {0xDC4E, 0x2089,}, - {0xDC50, 0x0FC1,}, - {0xDC52, 0x2008,}, - {0xDC54, 0x0F81,}, - {0xDC56, 0xFFFF,}, - {0xDC58, 0xFF80,}, - {0xDC5A, 0x8512,}, - {0xDC5C, 0x1801,}, - {0xDC5E, 0x0052,}, - {0xDC60, 0xA512,}, - {0xDC62, 0x1544,}, - {0xDC64, 0x1080,}, - {0xDC66, 0xB861,}, - {0xDC68, 0x262F,}, - {0xDC6A, 0xF007,}, - {0xDC6C, 0x1D44,}, - {0xDC6E, 0x1002,}, - {0xDC70, 0x20CA,}, - {0xDC72, 0x0021,}, - {0xDC74, 0x20CF,}, - {0xDC76, 0x04E1,}, - {0xDC78, 0x0850,}, - {0xDC7A, 0x04A1,}, - {0xDC7C, 0x21CA,}, - {0xDC7E, 0x0021,}, - {0xDC80, 0x1542,}, - {0xDC82, 0x1140,}, - {0xDC84, 0x8D2C,}, - {0xDC86, 0x6038,}, - {0xDC88, 0x1D42,}, - {0xDC8A, 0x1004,}, - {0xDC8C, 0x1542,}, - {0xDC8E, 0x1140,}, - {0xDC90, 0xB601,}, - {0xDC92, 0x046D,}, - {0xDC94, 0x0580,}, - {0xDC96, 0x78E0,}, - {0xDC98, 0xD800,}, - {0xDC9A, 0xB893,}, - {0xDC9C, 0x002D,}, - {0xDC9E, 0x04A0,}, - {0xDCA0, 0xD900,}, - {0xDCA2, 0x78E0,}, - {0xDCA4, 0x72CF,}, - {0xDCA6, 0xFFFF,}, - {0xDCA8, 0xE058,}, - {0xDCAA, 0x2240,}, - {0xDCAC, 0x0340,}, - {0xDCAE, 0xA212,}, - {0xDCB0, 0x208A,}, - {0xDCB2, 0x0FFF,}, - {0xDCB4, 0x1A42,}, - {0xDCB6, 0x0004,}, - {0xDCB8, 0xD830,}, - {0xDCBA, 0x1A44,}, - {0xDCBC, 0x0002,}, - {0xDCBE, 0xD800,}, - {0xDCC0, 0x1A50,}, - {0xDCC2, 0x0002,}, - {0xDCC4, 0x1A52,}, - {0xDCC6, 0x0004,}, - {0xDCC8, 0x1242,}, - {0xDCCA, 0x0140,}, - {0xDCCC, 0x8A2C,}, - {0xDCCE, 0x6038,}, - {0xDCD0, 0x1A42,}, - {0xDCD2, 0x0004,}, - {0xDCD4, 0x1242,}, - {0xDCD6, 0x0141,}, - {0xDCD8, 0x70CF,}, - {0xDCDA, 0xFF00,}, - {0xDCDC, 0x2184,}, - {0xDCDE, 0xB021,}, - {0xDCE0, 0xD800,}, - {0xDCE2, 0xB893,}, - {0xDCE4, 0x07E5,}, - {0xDCE6, 0x0460,}, - {0xDCE8, 0xD901,}, - {0xDCEA, 0x78E0,}, - {0xDCEC, 0xC0F1,}, - {0xDCEE, 0x0BFA,}, - {0xDCF0, 0x05A0,}, - {0xDCF2, 0x216F,}, - {0xDCF4, 0x0043,}, - {0xDCF6, 0xC1A4,}, - {0xDCF8, 0x220A,}, - {0xDCFA, 0x1F80,}, - {0xDCFC, 0xFFFF,}, - {0xDCFE, 0xE058,}, - {0xDD00, 0x2240,}, - {0xDD02, 0x134F,}, - {0xDD04, 0x1A48,}, - {0xDD06, 0x13C0,}, - {0xDD08, 0x1248,}, - {0xDD0A, 0x1002,}, - {0xDD0C, 0x70CF,}, - {0xDD0E, 0x7FFF,}, - {0xDD10, 0xFFFF,}, - {0xDD12, 0xE230,}, - {0xDD14, 0xC240,}, - {0xDD16, 0xDA00,}, - {0xDD18, 0xF00C,}, - {0xDD1A, 0x1248,}, - {0xDD1C, 0x1003,}, - {0xDD1E, 0x1301,}, - {0xDD20, 0x04CB,}, - {0xDD22, 0x7261,}, - {0xDD24, 0x2108,}, - {0xDD26, 0x0081,}, - {0xDD28, 0x2009,}, - {0xDD2A, 0x0080,}, - {0xDD2C, 0x1A48,}, - {0xDD2E, 0x10C0,}, - {0xDD30, 0x1248,}, - {0xDD32, 0x100B,}, - {0xDD34, 0xC300,}, - {0xDD36, 0x0BE7,}, - {0xDD38, 0x90C4,}, - {0xDD3A, 0x2102,}, - {0xDD3C, 0x0003,}, - {0xDD3E, 0x238C,}, - {0xDD40, 0x8FC3,}, - {0xDD42, 0xF6C7,}, - {0xDD44, 0xDAFF,}, - {0xDD46, 0x1A05,}, - {0xDD48, 0x1082,}, - {0xDD4A, 0xC241,}, - {0xDD4C, 0xF005,}, - {0xDD4E, 0x7A6F,}, - {0xDD50, 0xC241,}, - {0xDD52, 0x1A05,}, - {0xDD54, 0x10C2,}, - {0xDD56, 0x2000,}, - {0xDD58, 0x8040,}, - {0xDD5A, 0xDA00,}, - {0xDD5C, 0x20C0,}, - {0xDD5E, 0x0064,}, - {0xDD60, 0x781C,}, - {0xDD62, 0xC042,}, - {0xDD64, 0x1C0E,}, - {0xDD66, 0x3082,}, - {0xDD68, 0x1A48,}, - {0xDD6A, 0x13C0,}, - {0xDD6C, 0x7548,}, - {0xDD6E, 0x7348,}, - {0xDD70, 0x7148,}, - {0xDD72, 0x7648,}, - {0xDD74, 0xF002,}, - {0xDD76, 0x7608,}, - {0xDD78, 0x1248,}, - {0xDD7A, 0x1000,}, - {0xDD7C, 0x1400,}, - {0xDD7E, 0x300B,}, - {0xDD80, 0x084D,}, - {0xDD82, 0x02C5,}, - {0xDD84, 0x1248,}, - {0xDD86, 0x1000,}, - {0xDD88, 0xE101,}, - {0xDD8A, 0x1001,}, - {0xDD8C, 0x04CB,}, - {0xDD8E, 0x1A48,}, - {0xDD90, 0x1000,}, - {0xDD92, 0x7361,}, - {0xDD94, 0x1408,}, - {0xDD96, 0x300B,}, - {0xDD98, 0x2302,}, - {0xDD9A, 0x02C0,}, - {0xDD9C, 0x780D,}, - {0xDD9E, 0x2607,}, - {0xDDA0, 0x903E,}, - {0xDDA2, 0x07D6,}, - {0xDDA4, 0xFFE3,}, - {0xDDA6, 0x792F,}, - {0xDDA8, 0x09CF,}, - {0xDDAA, 0x8152,}, - {0xDDAC, 0x1248,}, - {0xDDAE, 0x100E,}, - {0xDDB0, 0x2400,}, - {0xDDB2, 0x334B,}, - {0xDDB4, 0xE501,}, - {0xDDB6, 0x7EE2,}, - {0xDDB8, 0x0DBF,}, - {0xDDBA, 0x90F2,}, - {0xDDBC, 0x1B0C,}, - {0xDDBE, 0x1382,}, - {0xDDC0, 0xC123,}, - {0xDDC2, 0x140E,}, - {0xDDC4, 0x3080,}, - {0xDDC6, 0x7822,}, - {0xDDC8, 0x1A07,}, - {0xDDCA, 0x1002,}, - {0xDDCC, 0x124C,}, - {0xDDCE, 0x1000,}, - {0xDDD0, 0x120B,}, - {0xDDD2, 0x1081,}, - {0xDDD4, 0x1207,}, - {0xDDD6, 0x1083,}, - {0xDDD8, 0x2142,}, - {0xDDDA, 0x004B,}, - {0xDDDC, 0x781B,}, - {0xDDDE, 0x0B21,}, - {0xDDE0, 0x02E2,}, - {0xDDE2, 0x1A4C,}, - {0xDDE4, 0x1000,}, - {0xDDE6, 0xE101,}, - {0xDDE8, 0x0915,}, - {0xDDEA, 0x00C2,}, - {0xDDEC, 0xC101,}, - {0xDDEE, 0x1204,}, - {0xDDF0, 0x1083,}, - {0xDDF2, 0x090D,}, - {0xDDF4, 0x00C2,}, - {0xDDF6, 0xE001,}, - {0xDDF8, 0x1A4C,}, - {0xDDFA, 0x1000,}, - {0xDDFC, 0x1A06,}, - {0xDDFE, 0x1002,}, - {0xDE00, 0x234A,}, - {0xDE02, 0x1000,}, - {0xDE04, 0x7169,}, - {0xDE06, 0xF008,}, - {0xDE08, 0x2053,}, - {0xDE0A, 0x0003,}, - {0xDE0C, 0x6179,}, - {0xDE0E, 0x781C,}, - {0xDE10, 0x2340,}, - {0xDE12, 0x104B,}, - {0xDE14, 0x1203,}, - {0xDE16, 0x1083,}, - {0xDE18, 0x0BF1,}, - {0xDE1A, 0x90C2,}, - {0xDE1C, 0x1202,}, - {0xDE1E, 0x1080,}, - {0xDE20, 0x091D,}, - {0xDE22, 0x0004,}, - {0xDE24, 0x70CF,}, - {0xDE26, 0xFFFF,}, - {0xDE28, 0xC644,}, - {0xDE2A, 0x881B,}, - {0xDE2C, 0xE0B2,}, - {0xDE2E, 0xD83C,}, - {0xDE30, 0x20CA,}, - {0xDE32, 0x0CA2,}, - {0xDE34, 0x1A01,}, - {0xDE36, 0x1002,}, - {0xDE38, 0x1A4C,}, - {0xDE3A, 0x1080,}, - {0xDE3C, 0x02B9,}, - {0xDE3E, 0x05A0,}, - {0xDE40, 0xC0A4,}, - {0xDE42, 0x78E0,}, - {0xDE44, 0xC0F1,}, - {0xDE46, 0xFF95,}, - {0xDE48, 0xD800,}, - {0xDE4A, 0x71CF,}, - {0xDE4C, 0xFF00,}, - {0xDE4E, 0x1FE0,}, - {0xDE50, 0x19D0,}, - {0xDE52, 0x001C,}, - {0xDE54, 0x19D1,}, - {0xDE56, 0x001C,}, - {0xDE58, 0x70CF,}, - {0xDE5A, 0xFFFF,}, - {0xDE5C, 0xE058,}, - {0xDE5E, 0x901F,}, - {0xDE60, 0xB861,}, - {0xDE62, 0x19D2,}, - {0xDE64, 0x001C,}, - {0xDE66, 0xC0D1,}, - {0xDE68, 0x7EE0,}, - {0xDE6A, 0x78E0,}, - {0xDE6C, 0xC0F1,}, - {0xDE6E, 0x0A7A,}, - {0xDE70, 0x0580,}, - {0xDE72, 0x70CF,}, - {0xDE74, 0xFFFF,}, - {0xDE76, 0xC5D4,}, - {0xDE78, 0x9041,}, - {0xDE7A, 0x9023,}, - {0xDE7C, 0x75CF,}, - {0xDE7E, 0xFFFF,}, - {0xDE80, 0xE058,}, - {0xDE82, 0x7942,}, - {0xDE84, 0xB967,}, - {0xDE86, 0x7F30,}, - {0xDE88, 0xB53F,}, - {0xDE8A, 0x71CF,}, - {0xDE8C, 0xFFFF,}, - {0xDE8E, 0xC84C,}, - {0xDE90, 0x91D3,}, - {0xDE92, 0x108B,}, - {0xDE94, 0x0081,}, - {0xDE96, 0x2615,}, - {0xDE98, 0x1380,}, - {0xDE9A, 0x090F,}, - {0xDE9C, 0x0C91,}, - {0xDE9E, 0x0A8E,}, - {0xDEA0, 0x05A0,}, - {0xDEA2, 0xD906,}, - {0xDEA4, 0x7E10,}, - {0xDEA6, 0x2615,}, - {0xDEA8, 0x1380,}, - {0xDEAA, 0x0A82,}, - {0xDEAC, 0x05A0,}, - {0xDEAE, 0xD960,}, - {0xDEB0, 0x790F,}, - {0xDEB2, 0x090D,}, - {0xDEB4, 0x0133,}, - {0xDEB6, 0xAD0C,}, - {0xDEB8, 0xD904,}, - {0xDEBA, 0xAD2C,}, - {0xDEBC, 0x79EC,}, - {0xDEBE, 0x2941,}, - {0xDEC0, 0x7402,}, - {0xDEC2, 0x71CF,}, - {0xDEC4, 0xFF00,}, - {0xDEC6, 0x2184,}, - {0xDEC8, 0xB142,}, - {0xDECA, 0x1906,}, - {0xDECC, 0x0E44,}, - {0xDECE, 0xFFDE,}, - {0xDED0, 0x70C9,}, - {0xDED2, 0x0A5A,}, - {0xDED4, 0x05A0,}, - {0xDED6, 0x8D2C,}, - {0xDED8, 0xAD0B,}, - {0xDEDA, 0xD800,}, - {0xDEDC, 0xAD01,}, - {0xDEDE, 0x0219,}, - {0xDEE0, 0x05A0,}, - {0xDEE2, 0xA513,}, - {0xDEE4, 0xC0F1,}, - {0xDEE6, 0x71CF,}, - {0xDEE8, 0xFFFF,}, - {0xDEEA, 0xC644,}, - {0xDEEC, 0xA91B,}, - {0xDEEE, 0xD902,}, - {0xDEF0, 0x70CF,}, - {0xDEF2, 0xFFFF,}, - {0xDEF4, 0xC84C,}, - {0xDEF6, 0x093E,}, - {0xDEF8, 0x03A0,}, - {0xDEFA, 0xA826,}, - {0xDEFC, 0xFFDC,}, - {0xDEFE, 0xF1B5,}, - {0xDF00, 0xC0F1,}, - {0xDF02, 0x09EA,}, - {0xDF04, 0x0580,}, - {0xDF06, 0x75CF,}, - {0xDF08, 0xFFFF,}, - {0xDF0A, 0xE058,}, - {0xDF0C, 0x1540,}, - {0xDF0E, 0x1080,}, - {0xDF10, 0x08A7,}, - {0xDF12, 0x0010,}, - {0xDF14, 0x8D00,}, - {0xDF16, 0x0813,}, - {0xDF18, 0x009E,}, - {0xDF1A, 0x1540,}, - {0xDF1C, 0x1081,}, - {0xDF1E, 0xE181,}, - {0xDF20, 0x20CA,}, - {0xDF22, 0x00A1,}, - {0xDF24, 0xF24B,}, - {0xDF26, 0x1540,}, - {0xDF28, 0x1081,}, - {0xDF2A, 0x090F,}, - {0xDF2C, 0x0050,}, - {0xDF2E, 0x1540,}, - {0xDF30, 0x1081,}, - {0xDF32, 0x0927,}, - {0xDF34, 0x0091,}, - {0xDF36, 0x1550,}, - {0xDF38, 0x1081,}, - {0xDF3A, 0xDE00,}, - {0xDF3C, 0xAD2A,}, - {0xDF3E, 0x1D50,}, - {0xDF40, 0x1382,}, - {0xDF42, 0x1552,}, - {0xDF44, 0x1101,}, - {0xDF46, 0x1D52,}, - {0xDF48, 0x1384,}, - {0xDF4A, 0xB524,}, - {0xDF4C, 0x082D,}, - {0xDF4E, 0x015F,}, - {0xDF50, 0xFF55,}, - {0xDF52, 0xD803,}, - {0xDF54, 0xF033,}, - {0xDF56, 0x1540,}, - {0xDF58, 0x1081,}, - {0xDF5A, 0x0967,}, - {0xDF5C, 0x00D1,}, - {0xDF5E, 0x1550,}, - {0xDF60, 0x1081,}, - {0xDF62, 0xDE00,}, - {0xDF64, 0xAD2A,}, - {0xDF66, 0x1D50,}, - {0xDF68, 0x1382,}, - {0xDF6A, 0x1552,}, - {0xDF6C, 0x1101,}, - {0xDF6E, 0x1D52,}, - {0xDF70, 0x1384,}, - {0xDF72, 0xB524,}, - {0xDF74, 0x0811,}, - {0xDF76, 0x019E,}, - {0xDF78, 0xB8A0,}, - {0xDF7A, 0xAD00,}, - {0xDF7C, 0xFF47,}, - {0xDF7E, 0x1D40,}, - {0xDF80, 0x1382,}, - {0xDF82, 0xF01F,}, - {0xDF84, 0xFF5A,}, - {0xDF86, 0x8D01,}, - {0xDF88, 0x8D40,}, - {0xDF8A, 0xE812,}, - {0xDF8C, 0x71CF,}, - {0xDF8E, 0xFFFF,}, - {0xDF90, 0xC644,}, - {0xDF92, 0x893B,}, - {0xDF94, 0x7030,}, - {0xDF96, 0x22D1,}, - {0xDF98, 0x8062,}, - {0xDF9A, 0xF20A,}, - {0xDF9C, 0x0A0F,}, - {0xDF9E, 0x009E,}, - {0xDFA0, 0x71CF,}, - {0xDFA2, 0xFFFF,}, - {0xDFA4, 0xC84C,}, - {0xDFA6, 0x893B,}, - {0xDFA8, 0xE902,}, - {0xDFAA, 0xFFCF,}, - {0xDFAC, 0x8D00,}, - {0xDFAE, 0xB8E7,}, - {0xDFB0, 0x26CA,}, - {0xDFB2, 0x1022,}, - {0xDFB4, 0xF5E2,}, - {0xDFB6, 0xFF3C,}, - {0xDFB8, 0xD801,}, - {0xDFBA, 0x1D40,}, - {0xDFBC, 0x1002,}, - {0xDFBE, 0x0141,}, - {0xDFC0, 0x0580,}, - {0xDFC2, 0x78E0,}, - {0xDFC4, 0xC0F1,}, - {0xDFC6, 0xC5E1,}, - {0xDFC8, 0xFF34,}, - {0xDFCA, 0xDD00,}, - {0xDFCC, 0x70CF,}, - {0xDFCE, 0xFFFF,}, - {0xDFD0, 0xE090,}, - {0xDFD2, 0xA8A8,}, - {0xDFD4, 0xD800,}, - {0xDFD6, 0xB893,}, - {0xDFD8, 0x0C8A,}, - {0xDFDA, 0x0460,}, - {0xDFDC, 0xD901,}, - {0xDFDE, 0x71CF,}, - {0xDFE0, 0xFFFF,}, - {0xDFE2, 0xDC10,}, - {0xDFE4, 0xD813,}, - {0xDFE6, 0x0B96,}, - {0xDFE8, 0x0460,}, - {0xDFEA, 0x72A9,}, - {0xDFEC, 0x0119,}, - {0xDFEE, 0x0580,}, - {0xDFF0, 0xC0F1,}, - {0xDFF2, 0x71CF,}, - {0xDFF4, 0x0000,}, - {0xDFF6, 0x5BAE,}, - {0xDFF8, 0x7940,}, - {0xDFFA, 0xFF9D,}, - {0xDFFC, 0xF135,}, - {0xDFFE, 0x78E0,}, - {0xE000, 0xC0F1,}, - {0xE002, 0x70CF,}, - {0xE004, 0x0000,}, - {0xE006, 0x5CBA,}, - {0xE008, 0x7840,}, - {0xE00A, 0x70CF,}, - {0xE00C, 0xFFFF,}, - {0xE00E, 0xE058,}, - {0xE010, 0x8800,}, - {0xE012, 0x0815,}, - {0xE014, 0x001E,}, - {0xE016, 0x70CF,}, - {0xE018, 0xFFFF,}, - {0xE01A, 0xC84C,}, - {0xE01C, 0x881A,}, - {0xE01E, 0xE080,}, - {0xE020, 0x0EE0,}, - {0xE022, 0xFFC1,}, - {0xE024, 0xF121,}, - {0xE026, 0x78E0,}, - {0xE028, 0xC0F1,}, - {0xE02A, 0xD900,}, - {0xE02C, 0xF009,}, - {0xE02E, 0x70CF,}, - {0xE030, 0xFFFF,}, - {0xE032, 0xE0AC,}, - {0xE034, 0x7835,}, - {0xE036, 0x8041,}, - {0xE038, 0x8000,}, - {0xE03A, 0xE102,}, - {0xE03C, 0xA040,}, - {0xE03E, 0x09F3,}, - {0xE040, 0x8114,}, - {0xE042, 0x71CF,}, - {0xE044, 0xFFFF,}, - {0xE046, 0xE058,}, - {0xE048, 0x70CF,}, - {0xE04A, 0xFFFF,}, - {0xE04C, 0xC594,}, - {0xE04E, 0xB030,}, - {0xE050, 0xFFDD,}, - {0xE052, 0xD800,}, - {0xE054, 0xF109,}, - {0xE056, 0x0000,}, - {0xE058, 0x0300,}, - {0xE05A, 0x0204,}, - {0xE05C, 0x0700,}, - {0xE05E, 0x0000,}, - {0xE060, 0x0000,}, - {0xE062, 0x0000,}, - {0xE064, 0x0000,}, - {0xE066, 0x0000,}, - {0xE068, 0x0000,}, - {0xE06A, 0x0000,}, - {0xE06C, 0x0000,}, - {0xE06E, 0x0000,}, - {0xE070, 0x0000,}, - {0xE072, 0x0000,}, - {0xE074, 0x0000,}, - {0xE076, 0x0000,}, - {0xE078, 0x0000,}, - {0xE07A, 0x0000,}, - {0xE07C, 0x0000,}, - {0xE07E, 0x0000,}, - {0xE080, 0x0000,}, - {0xE082, 0x0000,}, - {0xE084, 0x0000,}, - {0xE086, 0x0000,}, - {0xE088, 0x0000,}, - {0xE08A, 0x0000,}, - {0xE08C, 0x0000,}, - {0xE08E, 0x0000,}, - {0xE090, 0x0000,}, - {0xE092, 0x0000,}, - {0xE094, 0x0000,}, - {0xE096, 0x0000,}, - {0xE098, 0x0000,}, - {0xE09A, 0x0000,}, - {0xE09C, 0x0000,}, - {0xE09E, 0x0000,}, - {0xE0A0, 0x0000,}, - {0xE0A2, 0x0000,}, - {0xE0A4, 0x0000,}, - {0xE0A6, 0x0000,}, - {0xE0A8, 0x0000,}, - {0xE0AA, 0x0000,}, - {0xE0AC, 0xFFFF,}, - {0xE0AE, 0xCB68,}, - {0xE0B0, 0xFFFF,}, - {0xE0B2, 0xDFF0,}, - {0xE0B4, 0xFFFF,}, - {0xE0B6, 0xCB6C,}, - {0xE0B8, 0xFFFF,}, - {0xE0BA, 0xE000,}, - {0x098E, 0x0000,}, - - /*MIPI setting for SOC1040*/ - {0x3C5A, 0x0009,}, - {0x3C44, 0x0080,},/*MIPI_CUSTOM_SHORT_PKT*/ - - /*[Tuning_settings]*/ - - /*[CCM]*/ - {0xC892, 0x0267,},/*CAM_AWB_CCM_L_0*/ - {0xC894, 0xFF1A,},/*CAM_AWB_CCM_L_1*/ - {0xC896, 0xFFB3,},/*CAM_AWB_CCM_L_2*/ - {0xC898, 0xFF80,},/*CAM_AWB_CCM_L_3*/ - {0xC89A, 0x0166,},/*CAM_AWB_CCM_L_4*/ - {0xC89C, 0x0003,},/*CAM_AWB_CCM_L_5*/ - {0xC89E, 0xFF9A,},/*CAM_AWB_CCM_L_6*/ - {0xC8A0, 0xFEB4,},/*CAM_AWB_CCM_L_7*/ - {0xC8A2, 0x024D,},/*CAM_AWB_CCM_L_8*/ - {0xC8A4, 0x01BF,},/*CAM_AWB_CCM_M_0*/ - {0xC8A6, 0xFF01,},/*CAM_AWB_CCM_M_1*/ - {0xC8A8, 0xFFF3,},/*CAM_AWB_CCM_M_2*/ - {0xC8AA, 0xFF75,},/*CAM_AWB_CCM_M_3*/ - {0xC8AC, 0x0198,},/*CAM_AWB_CCM_M_4*/ - {0xC8AE, 0xFFFD,},/*CAM_AWB_CCM_M_5*/ - {0xC8B0, 0xFF9A,},/*CAM_AWB_CCM_M_6*/ - {0xC8B2, 0xFEE7,},/*CAM_AWB_CCM_M_7*/ - {0xC8B4, 0x02A8,},/*CAM_AWB_CCM_M_8*/ - {0xC8B6, 0x01D9,},/*CAM_AWB_CCM_R_0*/ - {0xC8B8, 0xFF26,},/*CAM_AWB_CCM_R_1*/ - {0xC8BA, 0xFFF3,},/*CAM_AWB_CCM_R_2*/ - {0xC8BC, 0xFFB3,},/*CAM_AWB_CCM_R_3*/ - {0xC8BE, 0x0132,},/*CAM_AWB_CCM_R_4*/ - {0xC8C0, 0xFFE8,},/*CAM_AWB_CCM_R_5*/ - {0xC8C2, 0xFFDA,},/*CAM_AWB_CCM_R_6*/ - {0xC8C4, 0xFECD,},/*CAM_AWB_CCM_R_7*/ - {0xC8C6, 0x02C2,},/*CAM_AWB_CCM_R_8*/ - {0xC8C8, 0x0075,},/*CAM_AWB_CCM_L_RG_GAIN*/ - {0xC8CA, 0x011C,},/*CAM_AWB_CCM_L_BG_GAIN*/ - {0xC8CC, 0x009A,},/*CAM_AWB_CCM_M_RG_GAIN*/ - {0xC8CE, 0x0105,},/*CAM_AWB_CCM_M_BG_GAIN*/ - {0xC8D0, 0x00A4,},/*CAM_AWB_CCM_R_RG_GAIN*/ - {0xC8D2, 0x00AC,},/*CAM_AWB_CCM_R_BG_GAIN*/ - {0xC8D4, 0x0A8C,},/*CAM_AWB_CCM_L_CTEMP*/ - {0xC8D6, 0x0F0A,},/*CAM_AWB_CCM_M_CTEMP*/ - {0xC8D8, 0x1964,},/*CAM_AWB_CCM_R_CTEMP*/ - - /*[AWB]*/ - {0xC914, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_XSTART*/ - {0xC916, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_YSTART*/ - {0xC918, 0x04FF,},/*CAM_STAT_AWB_CLIP_WINDOW_XEND*/ - {0xC91A, 0x02CF,},/*CAM_STAT_AWB_CLIP_WINDOW_YEND*/ - {0xC904, 0x0033,},/*CAM_AWB_AWB_XSHIFT_PRE_ADJ*/ - {0xC906, 0x0040,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F2, 0x03, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_XSCALE*/ - {0xC8F3, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_YSCALE*/ - {0xC906, 0x003C,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F4, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_0*/ - {0xC8F6, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_1*/ - {0xC8F8, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_2*/ - {0xC8FA, 0xE724,},/*CAM_AWB_AWB_WEIGHTS_3*/ - {0xC8FC, 0x1583,},/*CAM_AWB_AWB_WEIGHTS_4*/ - {0xC8FE, 0x2045,},/*CAM_AWB_AWB_WEIGHTS_5*/ - {0xC900, 0x03FF,},/*CAM_AWB_AWB_WEIGHTS_6*/ - {0xC902, 0x007C,},/*CAM_AWB_AWB_WEIGHTS_7*/ - {0xC90C, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_L*/ - {0xC90D, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_L*/ - {0xC90E, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_L*/ - {0xC90F, 0x88, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_R*/ - {0xC910, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_R*/ - {0xC911, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_R*/ - - /*[Step7-CPIPE_Preference]*/ - {0xC926, 0x0020,},/*CAM_LL_START_BRIGHTNESS*/ - {0xC928, 0x009A,},/*CAM_LL_STOP_BRIGHTNESS*/ - {0xC946, 0x0070,},/*CAM_LL_START_GAIN_METRIC*/ - {0xC948, 0x00F3,},/*CAM_LL_STOP_GAIN_METRIC*/ - {0xC952, 0x0020,},/*CAM_LL_START_TARGET_LUMA_BM*/ - {0xC954, 0x009A,},/*CAM_LL_STOP_TARGET_LUMA_BM*/ - {0xC92A, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_SATURATION*/ - {0xC92B, 0x4B, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_SATURATION*/ - {0xC92C, 0x00, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DESATURATION*/ - {0xC92D, 0xFF, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_DESATURATION*/ - {0xC92E, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DEMOSAIC*/ - {0xC92F, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_GAIN*/ - {0xC930, 0x06, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_THRESH*/ - {0xC931, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_DEMOSAIC*/ - {0xC932, 0x01, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_GAIN*/ - {0xC933, 0x0C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_THRESH*/ - {0xC934, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_RED*/ - {0xC935, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_GREEN*/ - {0xC936, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_BLUE*/ - {0xC937, 0x0F, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_THRESH*/ - {0xC938, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_RED*/ - {0xC939, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_GREEN*/ - {0xC93A, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_BLUE*/ - {0xC93B, 0x32, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_THRESH*/ - {0xC93C, 0x0020,},/*CAM_LL_START_CONTRAST_BM*/ - {0xC93E, 0x009A,},/*CAM_LL_STOP_CONTRAST_BM*/ - {0xC940, 0x00DC,},/*CAM_LL_GAMMA*/ - /*CAM_LL_START_CONTRAST_GRADIENT*/ - {0xC942, 0x38, MSM_CAMERA_I2C_BYTE_DATA}, - /*CAM_LL_STOP_CONTRAST_GRADIENT*/ - {0xC943, 0x30, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC944, 0x50, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_CONTRAST_LUMA*/ - {0xC945, 0x19, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_CONTRAST_LUMA*/ - {0xC94A, 0x0230,},/*CAM_LL_START_FADE_TO_BLACK_LUMA*/ - {0xC94C, 0x0010,},/*CAM_LL_STOP_FADE_TO_BLACK_LUMA*/ - {0xC94E, 0x01CD,},/*CAM_LL_CLUSTER_DC_TH_BM*/ - {0xC950, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_CLUSTER_DC_GATE*/ - {0xC951, 0x40, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_SUMMING_SENSITIVITY*/ - /*CAM_AET_TARGET_AVERAGE_LUMA_DARK*/ - {0xC87B, 0x1B, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x0E, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AET_AEMODE*/ - {0xC890, 0x0080,},/*CAM_AET_TARGET_GAIN*/ - {0xC886, 0x0100,},/*CAM_AET_AE_MAX_VIRT_AGAIN*/ - {0xC87C, 0x005A,},/*CAM_AET_BLACK_CLIPPING_TARGET*/ - {0xB42A, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CCM_DELTA_GAIN*/ - /*AE_TRACK_AE_TRACKING_DAMPENING*/ - {0xA80A, 0x20, MSM_CAMERA_I2C_BYTE_DATA}, - {0x3C44, 0x0080,}, - {0x3C40, 0x0004, MSM_CAMERA_I2C_UNSET_WORD_MASK}, - {0xA802, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xC908, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC879, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC909, 0x01, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, - {0xA80A, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xA80B, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xAC16, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xBC02, 0x08, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, -}; - -static struct v4l2_subdev_info mt9m114_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_config_change_settings[] = { - {0xdc00, 0x28, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x31, MSM_CAMERA_I2C_BYTE_DATA}, -}; - -static const struct i2c_device_id mt9m114_i2c_id[] = { - {MT9M114_SENSOR_NAME, (kernel_ulong_t)&mt9m114_s_ctrl}, - { } -}; - -static int32_t msm_mt9m114_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &mt9m114_s_ctrl); -} - -static struct i2c_driver mt9m114_i2c_driver = { - .id_table = mt9m114_i2c_id, - .probe = msm_mt9m114_i2c_probe, - .driver = { - .name = MT9M114_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client mt9m114_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id mt9m114_dt_match[] = { - {.compatible = "qcom,mt9m114", .data = &mt9m114_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, mt9m114_dt_match); - -static struct platform_driver mt9m114_platform_driver = { - .driver = { - .name = "qcom,mt9m114", - .owner = THIS_MODULE, - .of_match_table = mt9m114_dt_match, - }, -}; - -static int32_t mt9m114_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(mt9m114_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init mt9m114_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&mt9m114_platform_driver, - mt9m114_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&mt9m114_i2c_driver); -} - -static void __exit mt9m114_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (mt9m114_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&mt9m114_s_ctrl); - platform_driver_unregister(&mt9m114_platform_driver); - } else - i2c_del_driver(&mt9m114_i2c_driver); - return; -} - -int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_recommend_settings, - ARRAY_SIZE(mt9m114_recommend_settings), - MSM_CAMERA_I2C_WORD_DATA); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_RESOLUTION: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_720p_settings, - ARRAY_SIZE(mt9m114_720p_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_STOP_STREAM: - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - break; - } - case CFG_SET_AUTOFOCUS: { - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - } - case CFG_CANCEL_AUTOFOCUS: { - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t mt9m114_sensor_func_tbl = { - .sensor_config = mt9m114_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t mt9m114_s_ctrl = { - .sensor_i2c_client = &mt9m114_sensor_i2c_client, - .power_setting_array.power_setting = mt9m114_power_setting, - .power_setting_array.size = ARRAY_SIZE(mt9m114_power_setting), - .msm_sensor_mutex = &mt9m114_mut, - .sensor_v4l2_subdev_info = mt9m114_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(mt9m114_subdev_info), - .func_tbl = &mt9m114_sensor_func_tbl, -}; - -module_init(mt9m114_init_module); -module_exit(mt9m114_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/Makefile b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/Makefile deleted file mode 100644 index 12863bab345e..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_fortuna/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_ois.o diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.c deleted file mode 100644 index aed7b394b2c6..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.c +++ /dev/null @@ -1,758 +0,0 @@ -/* Copyright (c) 2014 - 2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_sd.h" -#include "msm_ois.h" -#include "msm_cci.h" - -DEFINE_MSM_MUTEX(msm_ois_mutex); -/*#define MSM_OIS_DEBUG*/ -#undef CDBG -#ifdef MSM_OIS_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define MAX_POLL_COUNT 100 - -static struct v4l2_file_operations msm_ois_v4l2_subdev_fops; -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *o_ctrl); -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *o_ctrl); - -static struct i2c_driver msm_ois_i2c_driver; - -static int32_t msm_ois_write_settings(struct msm_ois_ctrl_t *o_ctrl, - uint16_t size, struct reg_settings_ois_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - struct msm_camera_i2c_seq_reg_array reg_setting; - CDBG("Enter\n"); - - for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_OIS_WRITE: { - switch (settings[i].data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &o_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - settings[i].data_type); - break; - case MSM_CAMERA_I2C_DWORD_DATA: - reg_setting.reg_addr = settings[i].reg_addr; - reg_setting.reg_data[0] = (uint8_t) - ((settings[i].reg_data & - 0xFF000000) >> 24); - reg_setting.reg_data[1] = (uint8_t) - ((settings[i].reg_data & - 0x00FF0000) >> 16); - reg_setting.reg_data[2] = (uint8_t) - ((settings[i].reg_data & - 0x0000FF00) >> 8); - reg_setting.reg_data[3] = (uint8_t) - (settings[i].reg_data & 0x000000FF); - reg_setting.reg_data_size = 4; - rc = o_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_seq(&o_ctrl->i2c_client, - reg_setting.reg_addr, - reg_setting.reg_data, - reg_setting.reg_data_size); - if (rc < 0) - return rc; - break; - - default: - pr_err("Unsupport data type: %d\n", - settings[i].data_type); - break; - } - } - break; - - case MSM_OIS_POLL: { - int32_t poll_count = 0; - switch (settings[i].data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - do { - rc = o_ctrl->i2c_client.i2c_func_tbl - ->i2c_poll(&o_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - settings[i].data_type); - - if (poll_count++ > MAX_POLL_COUNT) { - pr_err("MSM_OIS_POLL failed"); - break; - } - } while (rc != 0); - break; - - default: - pr_err("Unsupport data type: %d\n", - settings[i].data_type); - break; - } - } - } - - if (settings[i].delay > 20) - msleep(settings[i].delay); - else if (0 != settings[i].delay) - usleep_range(settings[i].delay * 1000, - (settings[i].delay * 1000) + 1000); - - if (rc < 0) - break; - } - - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_vreg_control(struct msm_ois_ctrl_t *o_ctrl, - int config) -{ - int rc = 0, i, cnt; - struct msm_ois_vreg *vreg_cfg; - - vreg_cfg = &o_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt) - return 0; - - if (cnt >= MSM_OIS_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - rc = msm_camera_config_single_vreg(&(o_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - } - return rc; -} - -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *o_ctrl) -{ - int32_t rc = 0; - CDBG("Enter\n"); - if (o_ctrl->ois_state != OIS_POWER_DOWN) { - - rc = msm_ois_vreg_control(o_ctrl, 0); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - o_ctrl->i2c_tbl_index = 0; - o_ctrl->ois_state = OIS_POWER_DOWN; - } - CDBG("Exit\n"); - return rc; -} - -static int msm_ois_init(struct msm_ois_ctrl_t *o_ctrl) -{ - int rc = 0; - CDBG("Enter\n"); - - if (!o_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &o_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_control(struct msm_ois_ctrl_t *o_ctrl, - struct msm_ois_set_info_t *set_info) -{ - struct reg_settings_ois_t *settings = NULL; - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - CDBG("Enter\n"); - - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = o_ctrl->i2c_client.cci_client; - cci_client->sid = - set_info->ois_params.i2c_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->cci_i2c_master = o_ctrl->cci_master; - } else { - o_ctrl->i2c_client.client->addr = - set_info->ois_params.i2c_addr; - } - o_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - - if (set_info->ois_params.setting_size > 0 && - set_info->ois_params.setting_size - < MAX_OIS_REG_SETTINGS) { - settings = kmalloc( - sizeof(struct reg_settings_ois_t) * - (set_info->ois_params.setting_size), - GFP_KERNEL); - if (settings == NULL) { - pr_err("Error allocating memory\n"); - return -EFAULT; - } - if (copy_from_user(settings, - (void *)set_info->ois_params.settings, - set_info->ois_params.setting_size * - sizeof(struct reg_settings_ois_t))) { - kfree(settings); - pr_err("Error copying\n"); - return -EFAULT; - } - - rc = msm_ois_write_settings(o_ctrl, - set_info->ois_params.setting_size, - settings); - kfree(settings); - if (rc < 0) { - pr_err("Error\n"); - return -EFAULT; - } - } - - CDBG("Exit\n"); - - return rc; -} - - -static int32_t msm_ois_config(struct msm_ois_ctrl_t *o_ctrl, - void __user *argp) -{ - struct msm_ois_cfg_data *cdata = - (struct msm_ois_cfg_data *)argp; - int32_t rc = 0; - mutex_lock(o_ctrl->ois_mutex); - CDBG("Enter\n"); - CDBG("%s type %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_OIS_INIT: - rc = msm_ois_init(o_ctrl); - if (rc < 0) - pr_err("msm_ois_init failed %d\n", rc); - break; - case CFG_OIS_POWERDOWN: - rc = msm_ois_power_down(o_ctrl); - if (rc < 0) - pr_err("msm_ois_power_down failed %d\n", rc); - break; - case CFG_OIS_POWERUP: - rc = msm_ois_power_up(o_ctrl); - if (rc < 0) - pr_err("Failed ois power up%d\n", rc); - break; - case CFG_OIS_CONTROL: - rc = msm_ois_control(o_ctrl, &cdata->cfg.set_info); - if (rc < 0) - pr_err("Failed ois control%d\n", rc); - break; - case CFG_OIS_I2C_WRITE_SEQ_TABLE: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - -#ifdef CONFIG_COMPAT - if (is_compat_task()) { - memcpy(&conf_array, - (void *)cdata->cfg.settings, - sizeof(struct msm_camera_i2c_seq_reg_setting)); - } else -#endif - if (copy_from_user(&conf_array, - (void *)cdata->cfg.settings, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = o_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_seq_table(&o_ctrl->i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - default: - break; - } - mutex_unlock(o_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_get_subdev_id(struct msm_ois_ctrl_t *o_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = o_ctrl->pdev->id; - else - *subdev_id = o_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq = msm_camera_qup_i2c_write_seq, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_ois_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - if (!o_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &o_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_ois_internal_ops = { - .close = msm_ois_close, -}; - -static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("Enter\n"); - CDBG("%s:%d o_ctrl %pK argp %pK\n", __func__, __LINE__, o_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_ois_get_subdev_id(o_ctrl, argp); - case VIDIOC_MSM_OIS_CFG: - return msm_ois_config(o_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_ois_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *o_ctrl) -{ - int rc = 0; - CDBG("%s called\n", __func__); - - rc = msm_ois_vreg_control(o_ctrl, 1); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - o_ctrl->ois_state = OIS_POWER_UP; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(o_ctrl->ois_mutex); - if (on) - rc = msm_ois_power_up(o_ctrl); - else - rc = msm_ois_power_down(o_ctrl); - mutex_unlock(o_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ois_subdev_core_ops = { - .ioctl = msm_ois_subdev_ioctl, - .s_power = msm_ois_power, -}; - -static struct v4l2_subdev_ops msm_ois_subdev_ops = { - .core = &msm_ois_subdev_core_ops, -}; - -static const struct i2c_device_id msm_ois_i2c_id[] = { - {"qcom,ois", (kernel_ulong_t)NULL}, - { } -}; - -static int32_t msm_ois_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_ois_ctrl_t *ois_ctrl_t = NULL; - CDBG("Enter\n"); - - if (client == NULL) { - pr_err("msm_ois_i2c_probe: client is null\n"); - return -EINVAL; - } - - ois_ctrl_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!ois_ctrl_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - rc = -EINVAL; - goto probe_failure; - } - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &ois_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", ois_ctrl_t->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto probe_failure; - } - - ois_ctrl_t->i2c_driver = &msm_ois_i2c_driver; - ois_ctrl_t->i2c_client.client = client; - /* Set device type as I2C */ - ois_ctrl_t->ois_device_type = MSM_CAMERA_I2C_DEVICE; - ois_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - - /* Assign name for sub device */ - snprintf(ois_ctrl_t->msm_sd.sd.name, sizeof(ois_ctrl_t->msm_sd.sd.name), - "%s", ois_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&ois_ctrl_t->msm_sd.sd, - ois_ctrl_t->i2c_client.client, - ois_ctrl_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&ois_ctrl_t->msm_sd.sd, ois_ctrl_t); - ois_ctrl_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - ois_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&ois_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - ois_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ois_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - ois_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&ois_ctrl_t->msm_sd); - ois_ctrl_t->ois_state = OIS_POWER_DOWN; - pr_info("msm_ois_i2c_probe: succeeded\n"); - CDBG("Exit\n"); - -probe_failure: - kfree(ois_ctrl_t); - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_ois_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - long rc = 0; - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct msm_ois_cfg_data32 *u32 = - (struct msm_ois_cfg_data32 *)arg; - struct msm_ois_cfg_data ois_data; - void *parg = arg; - struct msm_camera_i2c_seq_reg_setting settings; - struct msm_camera_i2c_seq_reg_setting32 settings32; - - ois_data.cfgtype = u32->cfgtype; - - switch (cmd) { - case VIDIOC_MSM_OIS_CFG32: - cmd = VIDIOC_MSM_OIS_CFG; - - switch (u32->cfgtype) { - case CFG_OIS_CONTROL: - ois_data.cfg.set_info.ois_params.setting_size = - u32->cfg.set_info.ois_params.setting_size; - ois_data.cfg.set_info.ois_params.i2c_addr = - u32->cfg.set_info.ois_params.i2c_addr; - ois_data.cfg.set_info.ois_params.i2c_addr_type = - u32->cfg.set_info.ois_params.i2c_addr_type; - ois_data.cfg.set_info.ois_params.i2c_data_type = - u32->cfg.set_info.ois_params.i2c_data_type; - ois_data.cfg.set_info.ois_params.settings = - compat_ptr(u32->cfg.set_info.ois_params. - settings); - parg = &ois_data; - break; - case CFG_OIS_I2C_WRITE_SEQ_TABLE: - if (copy_from_user(&settings32, - (void *)compat_ptr(u32->cfg.settings), - sizeof( - struct msm_camera_i2c_seq_reg_setting32))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - settings.addr_type = settings32.addr_type; - settings.delay = settings32.delay; - settings.size = settings32.size; - settings.reg_setting = - compat_ptr(settings32.reg_setting); - - ois_data.cfgtype = u32->cfgtype; - ois_data.cfg.settings = &settings; - parg = &ois_data; - break; - default: - parg = &ois_data; - break; - } - } - rc = msm_ois_subdev_ioctl(sd, cmd, parg); - - return rc; -} - -static long msm_ois_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_ois_subdev_do_ioctl); -} -#endif - -static int32_t msm_ois_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_ois_ctrl_t *msm_ois_t = NULL; - struct msm_ois_vreg *vreg_cfg; - CDBG("Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_ois_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!msm_ois_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_ois_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_ois_t->cci_master, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_ois_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_ois_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - msm_ois_t->ois_mutex = &msm_ois_mutex; - - /* Set platform device handle */ - msm_ois_t->pdev = pdev; - /* Set device type as platform device */ - msm_ois_t->ois_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_ois_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_ois_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_ois_t->i2c_client.cci_client) { - kfree(msm_ois_t->vreg_cfg.cam_vreg); - kfree(msm_ois_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = msm_ois_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_ois_t->msm_sd.sd, - msm_ois_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_ois_t->msm_sd.sd, msm_ois_t); - msm_ois_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - msm_ois_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_ois_t->msm_sd.sd.name, - ARRAY_SIZE(msm_ois_t->msm_sd.sd.name), "msm_ois"); - media_entity_init(&msm_ois_t->msm_sd.sd.entity, 0, NULL, 0); - msm_ois_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_ois_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - msm_ois_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&msm_ois_t->msm_sd); - msm_ois_t->ois_state = OIS_POWER_DOWN; - msm_ois_v4l2_subdev_fops = v4l2_subdev_fops; -#ifdef CONFIG_COMPAT - msm_ois_v4l2_subdev_fops.compat_ioctl32 = - msm_ois_subdev_fops_ioctl; -#endif - msm_ois_t->msm_sd.sd.devnode->fops = - &msm_ois_v4l2_subdev_fops; - - CDBG("Exit\n"); - return rc; -} - -static const struct of_device_id msm_ois_i2c_dt_match[] = { - {.compatible = "qcom,ois"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ois_i2c_dt_match); - -static struct i2c_driver msm_ois_i2c_driver = { - .id_table = msm_ois_i2c_id, - .probe = msm_ois_i2c_probe, - .remove = __exit_p(msm_ois_i2c_remove), - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_i2c_dt_match, - }, -}; - -static const struct of_device_id msm_ois_dt_match[] = { - {.compatible = "qcom,ois", .data = NULL}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ois_dt_match); - -static struct platform_driver msm_ois_platform_driver = { - .probe = msm_ois_platform_probe, - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -static int __init msm_ois_init_module(void) -{ - int32_t rc = 0; - CDBG("Enter\n"); - rc = platform_driver_register(&msm_ois_platform_driver); - if (!rc) - return rc; - CDBG("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&msm_ois_i2c_driver); -} - -static void __exit msm_ois_exit_module(void) -{ - platform_driver_unregister(&msm_ois_platform_driver); - i2c_del_driver(&msm_ois_i2c_driver); - return; -} - -module_init(msm_ois_init_module); -module_exit(msm_ois_exit_module); -MODULE_DESCRIPTION("MSM OIS"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.h deleted file mode 100644 index a9d41c4dc607..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ois/msm_ois.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_OIS_H -#define MSM_OIS_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_OIS_MAX_VREGS (10) - -struct msm_ois_ctrl_t; - -enum msm_ois_state_t { - OIS_POWER_UP, - OIS_POWER_DOWN, -}; - -struct msm_ois_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_OIS_MAX_VREGS]; - int num_vreg; -}; - -struct msm_ois_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t ois_device_type; - struct msm_sd_subdev msm_sd; - struct mutex *ois_mutex; - enum msm_camera_i2c_data_type i2c_data_type; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *ois_v4l2_subdev_ops; - void *user_data; - uint16_t i2c_tbl_index; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_ois_state_t ois_state; - struct msm_ois_vreg vreg_cfg; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov12830.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov12830.c deleted file mode 100644 index fb6d548f1f22..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov12830.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV12830_SENSOR_NAME "ov12830" -DEFINE_MSM_MUTEX(ov12830_mut); - -static struct msm_sensor_ctrl_t ov12830_s_ctrl; - -static struct msm_sensor_power_setting ov12830_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov12830_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov12830_i2c_id[] = { - {OV12830_SENSOR_NAME, - (kernel_ulong_t)&ov12830_s_ctrl}, - { } -}; - -static int msm_ov12830_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov12830_s_ctrl); -} - -static struct i2c_driver ov12830_i2c_driver = { - .id_table = ov12830_i2c_id, - .probe = msm_ov12830_i2c_probe, - .driver = { - .name = OV12830_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov12830_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov12830_dt_match[] = { - {.compatible = "qcom,ov12830", - .data = &ov12830_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov12830_dt_match); - -static struct platform_driver ov12830_platform_driver = { - .driver = { - .name = "qcom,ov12830", - .owner = THIS_MODULE, - .of_match_table = ov12830_dt_match, - }, -}; - -static int32_t ov12830_platform_probe - (struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov12830_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov12830_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov12830_platform_driver, - ov12830_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov12830_i2c_driver); -} - -static void __exit ov12830_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov12830_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov12830_s_ctrl); - platform_driver_unregister - (&ov12830_platform_driver); - } else { - i2c_del_driver(&ov12830_i2c_driver); - } -} - -static struct msm_sensor_ctrl_t ov12830_s_ctrl = { - .sensor_i2c_client = &ov12830_sensor_i2c_client, - .power_setting_array.power_setting = ov12830_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov12830_power_setting), - .msm_sensor_mutex = &ov12830_mut, - .sensor_v4l2_subdev_info = ov12830_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov12830_subdev_info), -}; - -module_init(ov12830_init_module); -module_exit(ov12830_exit_module); -MODULE_DESCRIPTION("ov12830"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov2720.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov2720.c deleted file mode 100644 index 397564b3ef62..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov2720.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV2720_SENSOR_NAME "ov2720" -DEFINE_MSM_MUTEX(ov2720_mut); - -static struct msm_sensor_ctrl_t ov2720_s_ctrl; - -static struct msm_sensor_power_setting ov2720_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov2720_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov2720_i2c_id[] = { - {OV2720_SENSOR_NAME, (kernel_ulong_t)&ov2720_s_ctrl}, - { } -}; - -static int32_t msm_ov2720_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov2720_s_ctrl); -} - -static struct i2c_driver ov2720_i2c_driver = { - .id_table = ov2720_i2c_id, - .probe = msm_ov2720_i2c_probe, - .driver = { - .name = OV2720_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov2720_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov2720_dt_match[] = { - {.compatible = "qcom,ov2720", .data = &ov2720_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov2720_dt_match); - -static struct platform_driver ov2720_platform_driver = { - .driver = { - .name = "qcom,ov2720", - .owner = THIS_MODULE, - .of_match_table = ov2720_dt_match, - }, -}; - -static int32_t ov2720_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov2720_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov2720_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov2720_platform_driver, - ov2720_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov2720_i2c_driver); -} - -static void __exit ov2720_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov2720_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov2720_s_ctrl); - platform_driver_unregister(&ov2720_platform_driver); - } else - i2c_del_driver(&ov2720_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov2720_s_ctrl = { - .sensor_i2c_client = &ov2720_sensor_i2c_client, - .power_setting_array.power_setting = ov2720_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov2720_power_setting), - .msm_sensor_mutex = &ov2720_mut, - .sensor_v4l2_subdev_info = ov2720_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov2720_subdev_info), -}; - -module_init(ov2720_init_module); -module_exit(ov2720_exit_module); -MODULE_DESCRIPTION("ov2720"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5645.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5645.c deleted file mode 100755 index 7b84d8392571..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5645.c +++ /dev/null @@ -1,958 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define OV5645_SENSOR_NAME "ov5645" -#define PLATFORM_DRIVER_NAME "msm_camera_ov5645" -#define ov5645_obj ov5645_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(ov5645_mut); -static struct msm_sensor_ctrl_t ov5645_s_ctrl; - -static struct msm_sensor_power_setting ov5645_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_sxga_settings[] = { - {0x3612, 0xa9,}, - {0x3614, 0x50,}, - {0x3618, 0x00,}, - {0x3034, 0x18,}, - {0x3035, 0x21,}, - {0x3036, 0x70,}, - {0x3600, 0x09,}, - {0x3601, 0x43,}, - {0x3708, 0x66,}, - {0x370c, 0xc3,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x06,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9d,}, - {0x3808, 0x05,}, - {0x3809, 0x00,}, - {0x380a, 0x03,}, - {0x380b, 0xc0,}, - {0x380c, 0x07,}, - {0x380d, 0x68,}, - {0x380e, 0x03,}, - {0x380f, 0xd8,}, - {0x3813, 0x06,}, - {0x3814, 0x31,}, - {0x3815, 0x31,}, - {0x3820, 0x47,}, - {0x3a02, 0x03,}, - {0x3a03, 0xd8,}, - {0x3a08, 0x01,}, - {0x3a09, 0xf8,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0xa4,}, - {0x3a0e, 0x02,}, - {0x3a0d, 0x02,}, - {0x3a14, 0x03,}, - {0x3a15, 0xd8,}, - {0x3a18, 0x00,}, - {0x4004, 0x02,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_full_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x00,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9f,}, - {0x3808, 0x0a,}, - {0x3809, 0x20,}, - {0x380a, 0x07,}, - {0x380b, 0x98,}, - {0x380c, 0x0b,}, - {0x380d, 0x1c,}, - {0x380e, 0x07,}, - {0x380f, 0xb0,}, - {0x3813, 0x06,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x07,}, - {0x3a03, 0xb0,}, - {0x3a08, 0x01,}, - {0x3a09, 0x27,}, - {0x3a0a, 0x00,}, - {0x3a0b, 0xf6,}, - {0x3a0e, 0x06,}, - {0x3a0d, 0x08,}, - {0x3a14, 0x07,}, - {0x3a15, 0xb0,}, - {0x3a18, 0x01,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4837, 0x0b,}, - {0x4202, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_1080P_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x01,}, - {0x3801, 0x50,}, - {0x3802, 0x01,}, - {0x3803, 0xb2,}, - {0x3804, 0x08,}, - {0x3805, 0xef,}, - {0x3806, 0x05,}, - {0x3807, 0xf1,}, - {0x3808, 0x07,}, - {0x3809, 0x80,}, - {0x380a, 0x04,}, - {0x380b, 0x38,}, - {0x380c, 0x09,}, - {0x380d, 0xc4,}, - {0x380e, 0x04,}, - {0x380f, 0x60,}, - {0x3813, 0x04,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x04,}, - {0x3a03, 0x60,}, - {0x3a08, 0x01,}, - {0x3a09, 0x50,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0x18,}, - {0x3a0e, 0x03,}, - {0x3a0d, 0x04,}, - {0x3a14, 0x04,}, - {0x3a15, 0x60,}, - {0x3a18, 0x00,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - {0x4837, 0x0b,}, -}; - - -static struct msm_camera_i2c_reg_conf ov5645_recommend_settings[] = { - {0x3103, 0x11,}, - {0x3008, 0x82,}, - {0x3008, 0x42,}, - {0x3103, 0x03,}, - {0x3503, 0x07,}, - {0x3002, 0x1c,}, - {0x3006, 0xc3,}, - {0x300e, 0x45,}, - {0x3017, 0x00,}, - {0x3018, 0x00,}, - {0x302e, 0x0b,}, - {0x3037, 0x13,}, - {0x3108, 0x01,}, - {0x3611, 0x06,}, - {0x3500, 0x00,}, - {0x3501, 0x01,}, - {0x3502, 0x00,}, - {0x350a, 0x00,}, - {0x350b, 0x3f,}, - {0x3620, 0x33,}, - {0x3621, 0xe0,}, - {0x3622, 0x01,}, - {0x3630, 0x2e,}, - {0x3631, 0x00,}, - {0x3632, 0x32,}, - {0x3633, 0x52,}, - {0x3634, 0x70,}, - {0x3635, 0x13,}, - {0x3636, 0x03,}, - {0x3703, 0x5a,}, - {0x3704, 0xa0,}, - {0x3705, 0x1a,}, - {0x3709, 0x12,}, - {0x370b, 0x61,}, - {0x370f, 0x10,}, - {0x3715, 0x78,}, - {0x3717, 0x01,}, - {0x371b, 0x20,}, - {0x3731, 0x12,}, - {0x3901, 0x0a,}, - {0x3905, 0x02,}, - {0x3906, 0x10,}, - {0x3719, 0x86,}, - {0x3810, 0x00,}, - {0x3811, 0x10,}, - {0x3812, 0x00,}, - {0x3821, 0x01,}, - {0x3824, 0x01,}, - {0x3826, 0x03,}, - {0x3828, 0x08,}, - {0x3a19, 0xf8,}, - {0x3c01, 0x34,}, - {0x3c04, 0x28,}, - {0x3c05, 0x98,}, - {0x3c07, 0x07,}, - {0x3c09, 0xc2,}, - {0x3c0a, 0x9c,}, - {0x3c0b, 0x40,}, - {0x3c01, 0x34,}, - {0x4001, 0x02,}, - {0x4514, 0x00,}, - {0x4520, 0xb0,}, - {0x460b, 0x37,}, - {0x460c, 0x20,}, - {0x4818, 0x01,}, - {0x481d, 0xf0,}, - {0x481f, 0x50,}, - {0x4823, 0x70,}, - {0x4831, 0x14,}, - {0x5000, 0xa7,}, - {0x5001, 0x83,}, - {0x501d, 0x00,}, - {0x501f, 0x00,}, - {0x503d, 0x00,}, - {0x505c, 0x30,}, - {0x5181, 0x59,}, - {0x5183, 0x00,}, - {0x5191, 0xf0,}, - {0x5192, 0x03,}, - {0x5684, 0x10,}, - {0x5685, 0xa0,}, - {0x5686, 0x0c,}, - {0x5687, 0x78,}, - {0x5a00, 0x08,}, - {0x5a21, 0x00,}, - {0x5a24, 0x00,}, - {0x3008, 0x02,}, - {0x3503, 0x00,}, - {0x5180, 0xff,}, - {0x5181, 0xf2,}, - {0x5182, 0x00,}, - {0x5183, 0x14,}, - {0x5184, 0x25,}, - {0x5185, 0x24,}, - {0x5186, 0x09,}, - {0x5187, 0x09,}, - {0x5188, 0x0a,}, - {0x5189, 0x75,}, - {0x518a, 0x52,}, - {0x518b, 0xea,}, - {0x518c, 0xa8,}, - {0x518d, 0x42,}, - {0x518e, 0x38,}, - {0x518f, 0x56,}, - {0x5190, 0x42,}, - {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, 0x08,}, - {0x5384, 0x0a,}, - {0x5385, 0x7e,}, - {0x5386, 0x88,}, - {0x5387, 0x7c,}, - {0x5388, 0x6c,}, - {0x5389, 0x10,}, - {0x538a, 0x01,}, - {0x538b, 0x98,}, - {0x5300, 0x08,}, - {0x5301, 0x30,}, - {0x5302, 0x10,}, - {0x5303, 0x00,}, - {0x5304, 0x08,}, - {0x5305, 0x30,}, - {0x5306, 0x08,}, - {0x5307, 0x16,}, - {0x5309, 0x08,}, - {0x530a, 0x30,}, - {0x530b, 0x04,}, - {0x530c, 0x06,}, - {0x5480, 0x01,}, - {0x5481, 0x08,}, - {0x5482, 0x14,}, - {0x5483, 0x28,}, - {0x5484, 0x51,}, - {0x5485, 0x65,}, - {0x5486, 0x71,}, - {0x5487, 0x7d,}, - {0x5488, 0x87,}, - {0x5489, 0x91,}, - {0x548a, 0x9a,}, - {0x548b, 0xaa,}, - {0x548c, 0xb8,}, - {0x548d, 0xcd,}, - {0x548e, 0xdd,}, - {0x548f, 0xea,}, - {0x5490, 0x1d,}, - {0x5580, 0x02,}, - {0x5583, 0x40,}, - {0x5584, 0x10,}, - {0x5589, 0x10,}, - {0x558a, 0x00,}, - {0x558b, 0xf8,}, - {0x5800, 0x3f,}, - {0x5801, 0x16,}, - {0x5802, 0x0e,}, - {0x5803, 0x0d,}, - {0x5804, 0x17,}, - {0x5805, 0x3f,}, - {0x5806, 0x0b,}, - {0x5807, 0x06,}, - {0x5808, 0x04,}, - {0x5809, 0x04,}, - {0x580a, 0x06,}, - {0x580b, 0x0b,}, - {0x580c, 0x09,}, - {0x580d, 0x03,}, - {0x580e, 0x00,}, - {0x580f, 0x00,}, - {0x5810, 0x03,}, - {0x5811, 0x08,}, - {0x5812, 0x0a,}, - {0x5813, 0x03,}, - {0x5814, 0x00,}, - {0x5815, 0x00,}, - {0x5816, 0x04,}, - {0x5817, 0x09,}, - {0x5818, 0x0f,}, - {0x5819, 0x08,}, - {0x581a, 0x06,}, - {0x581b, 0x06,}, - {0x581c, 0x08,}, - {0x581d, 0x0c,}, - {0x581e, 0x3f,}, - {0x581f, 0x1e,}, - {0x5820, 0x12,}, - {0x5821, 0x13,}, - {0x5822, 0x21,}, - {0x5823, 0x3f,}, - {0x5824, 0x68,}, - {0x5825, 0x28,}, - {0x5826, 0x2c,}, - {0x5827, 0x28,}, - {0x5828, 0x08,}, - {0x5829, 0x48,}, - {0x582a, 0x64,}, - {0x582b, 0x62,}, - {0x582c, 0x64,}, - {0x582d, 0x28,}, - {0x582e, 0x46,}, - {0x582f, 0x62,}, - {0x5830, 0x60,}, - {0x5831, 0x62,}, - {0x5832, 0x26,}, - {0x5833, 0x48,}, - {0x5834, 0x66,}, - {0x5835, 0x44,}, - {0x5836, 0x64,}, - {0x5837, 0x28,}, - {0x5838, 0x66,}, - {0x5839, 0x48,}, - {0x583a, 0x2c,}, - {0x583b, 0x28,}, - {0x583c, 0x26,}, - {0x583d, 0xae,}, - {0x5025, 0x00,}, - {0x3a0f, 0x30,}, - {0x3a10, 0x28,}, - {0x3a1b, 0x30,}, - {0x3a1e, 0x26,}, - {0x3a11, 0x60,}, - {0x3a1f, 0x14,}, - {0x0601, 0x02,}, - {0x3008, 0x42,}, - -}; - -static struct v4l2_subdev_info ov5645_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov5645_start_settings[] = { - {0x3008, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_stop_settings[] = { - {0x3008, 0x42,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_enable_aec_settings[] = { - {0x3503, 0x00,}, - {0x3406, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_disable_aec_settings[] = { - {0x3503, 0x07,}, - {0x3406, 0x01,}, -}; - -static const struct i2c_device_id ov5645_i2c_id[] = { - {OV5645_SENSOR_NAME, (kernel_ulong_t)&ov5645_s_ctrl}, - { } -}; - -static int32_t msm_ov5645_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5645_s_ctrl); -} - -static struct i2c_driver ov5645_i2c_driver = { - .id_table = ov5645_i2c_id, - .probe = msm_ov5645_i2c_probe, - .driver = { - .name = OV5645_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5645_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov5645_dt_match[] = { - {.compatible = "ovti,ov5645", .data = &ov5645_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5645_dt_match); - -static int32_t ov5645_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(ov5645_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver ov5645_platform_driver = { - .driver = { - .name = "ovti,ov5645", - .owner = THIS_MODULE, - .of_match_table = ov5645_dt_match, - }, - .probe = ov5645_platform_probe, -}; - -static int __init ov5645_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_register(&ov5645_platform_driver); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov5645_i2c_driver); -} - -static void __exit ov5645_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (ov5645_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5645_s_ctrl); - platform_driver_unregister(&ov5645_platform_driver); - } else - i2c_del_driver(&ov5645_i2c_driver); - return; -} - -int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_recommend_settings, - ARRAY_SIZE(ov5645_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_full_settings, - ARRAY_SIZE(ov5645_full_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov5645_full_settings ", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_QTR) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_sxga_settings, - ARRAY_SIZE(ov5645_sxga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_sxga_settings\n", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_2) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - ov5645_1080P_settings, - ARRAY_SIZE(ov5645_1080P_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_1080P_settings\n", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_stop_settings, - ARRAY_SIZE(ov5645_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - if (s_ctrl->camera_stream_type != MSM_CAMERA_STREAM_SNAPSHOT) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_enable_aec_settings, - ARRAY_SIZE(ov5645_enable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } else { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_disable_aec_settings, - ARRAY_SIZE(ov5645_disable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_start_settings, - ARRAY_SIZE(ov5645_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x sensor addr type %d sensor reg %x\n" - "sensor id %x\n", __func__, - sensor_slave_info.slave_addr, - sensor_slave_info.addr_type, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t ov5645_sensor_func_tbl = { - .sensor_config = ov5645_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t ov5645_s_ctrl = { - .sensor_i2c_client = &ov5645_sensor_i2c_client, - .power_setting_array.power_setting = ov5645_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov5645_power_setting), - .msm_sensor_mutex = &ov5645_mut, - .sensor_v4l2_subdev_info = ov5645_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov5645_subdev_info), - .func_tbl = &ov5645_sensor_func_tbl, -}; - -module_init(ov5645_init_module); -module_exit(ov5645_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5648.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5648.c deleted file mode 100644 index 99224684a131..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov5648.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV5648_SENSOR_NAME "ov5648" -DEFINE_MSM_MUTEX(ov5648_mut); - -static struct msm_sensor_ctrl_t ov5648_s_ctrl; - -static struct msm_sensor_power_setting ov5648_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov5648_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov5648_i2c_id[] = { - {OV5648_SENSOR_NAME, - (kernel_ulong_t)&ov5648_s_ctrl}, - { } -}; - -static int32_t msm_ov5648_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5648_s_ctrl); -} - -static struct i2c_driver ov5648_i2c_driver = { - .id_table = ov5648_i2c_id, - .probe = msm_ov5648_i2c_probe, - .driver = { - .name = OV5648_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5648_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov5648_s_ctrl = { - .sensor_i2c_client = &ov5648_sensor_i2c_client, - .power_setting_array.power_setting = ov5648_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov5648_power_setting), - .msm_sensor_mutex = &ov5648_mut, - .sensor_v4l2_subdev_info = ov5648_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov5648_subdev_info), -}; - -static const struct of_device_id ov5648_dt_match[] = { - { - .compatible = "ovti,ov5648", - .data = &ov5648_s_ctrl - }, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5648_dt_match); - -static struct platform_driver ov5648_platform_driver = { - .driver = { - .name = "ovti,ov5648", - .owner = THIS_MODULE, - .of_match_table = ov5648_dt_match, - }, -}; - -static int32_t ov5648_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov5648_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov5648_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov5648_platform_driver, - ov5648_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov5648_i2c_driver); -} - -static void __exit ov5648_exit_module(void) -{ - if (ov5648_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5648_s_ctrl); - platform_driver_unregister(&ov5648_platform_driver); - } else - i2c_del_driver(&ov5648_i2c_driver); - return; -} - -module_init(ov5648_init_module); -module_exit(ov5648_exit_module); -MODULE_DESCRIPTION("ov5648"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov7695.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov7695.c deleted file mode 100644 index a9fbec0eae0e..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov7695.c +++ /dev/null @@ -1,793 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define OV7695_SENSOR_NAME "ov7695" -#define PLATFORM_DRIVER_NAME "msm_camera_ov7695" -#define ov7695_obj ov7695_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(ov7695_mut); -static struct msm_sensor_ctrl_t ov7695_s_ctrl; - -static struct msm_sensor_power_setting ov7695_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov7695_vga_settings[] = { - {0x3630, 0x79,}, -}; - -static struct msm_camera_i2c_reg_conf ov7695_recommend_settings[] = { - {0x0103, 0x01,}, - {0x0100, 0x01,}, - {0x3620, 0x2f,}, - {0x3623, 0x12,}, - {0x3718, 0x88,}, - {0x3703, 0x80,}, - {0x3712, 0x40,}, - {0x3706, 0x40,}, - {0x3631, 0x44,}, - {0x3632, 0x05,}, - {0x3013, 0xd0,}, - {0x3705, 0x1d,}, - {0x3713, 0x0e,}, - {0x3012, 0x0a,}, - {0x3717, 0x18,}, - {0x3621, 0x47,}, - {0x0309, 0x24,}, - {0x3820, 0x90,}, - {0x4803, 0x08,}, - {0x0101, 0x01,}, - {0x5100, 0x01,}, - {0x4500, 0x24,}, - {0x5301, 0x05,}, - {0x5302, 0x0c,}, - {0x5303, 0x1c,}, - {0x5304, 0x2a,}, - {0x5305, 0x39,}, - {0x5306, 0x45,}, - {0x5307, 0x52,}, - {0x5308, 0x5d,}, - {0x5309, 0x68,}, - {0x530a, 0x7f,}, - {0x530b, 0x91,}, - {0x530c, 0xa5,}, - {0x530d, 0xc6,}, - {0x530e, 0xde,}, - {0x530f, 0xef,}, - {0x5310, 0x16,}, - {0x520a, 0x74,}, //f4 - {0x520b, 0x64,}, //f4 - {0x520c, 0xd4,}, //f4 - {0x5504, 0x08,}, - {0x5505, 0x48,}, - {0x5506, 0x07,}, - {0x5507, 0x0b,}, - {0x3a18, 0x01,}, - {0x3a19, 0x00,}, - {0x3503, 0x03,}, - {0x3500, 0x00,}, - {0x3501, 0x21,}, - {0x3502, 0x00,}, - {0x350a, 0x00,}, - {0x350b, 0x00,}, - {0x4008, 0x02,}, - {0x4009, 0x09,}, - {0x3002, 0x09,}, - {0x3024, 0x00,}, - {0x3503, 0x00,}, - {0x0101, 0x01,}, - {0x5002, 0x48,}, - {0x5910, 0x00,}, - {0x3a0f, 0x58,}, - {0x3a10, 0x50,}, - {0x3a1b, 0x5a,}, - {0x3a1e, 0x4e,}, - {0x3a11, 0xa0,}, - {0x3a1f, 0x28,}, - {0x3a18, 0x00,}, - {0x3a19, 0xf8,}, - {0x3503, 0x00,}, - {0x3a0d, 0x04,}, - {0x5000, 0xff,}, - {0x5001, 0x3f,}, - {0x5100, 0x1 ,}, //01 - {0x5101, 0x25,}, //48 - {0x5102, 0x0 ,}, //00 - {0x5103, 0xf3,}, //f8 - {0x5104, 0x7f,}, //04 - {0x5105, 0x5 ,}, //00 - {0x5106, 0xff,}, //00 - {0x5107, 0xf ,}, //00 - {0x5108, 0x1 ,}, //01 - {0x5109, 0x1f,}, //48 - {0x510a, 0x0 ,}, //00 - {0x510b, 0xde,}, //f8 - {0x510c, 0x56,}, //03 - {0x510d, 0x5 ,}, //00 - {0x510e, 0xff,}, //00 - {0x510f, 0xf ,}, //00 - {0x5110, 0x1 ,}, //01 - {0x5111, 0x23,}, //48 - {0x5112, 0x0 ,}, //00 - {0x5113, 0xe3,}, //f8 - {0x5114, 0x5c,}, //03 - {0x5115, 0x5 ,}, //00 - {0x5116, 0xff,}, //00 - {0x5117, 0xf ,}, //00 - {0x520a, 0x74,}, //f4 - {0x520b, 0x64,}, //f4 - {0x520c, 0xd4,}, //f4 - {0x5004, 0x41,}, - {0x5006, 0x41,}, - {0x5301, 0x05,}, - {0x5302, 0x0c,}, - {0x5303, 0x1c,}, - {0x5304, 0x2a,}, - {0x5305, 0x39,}, - {0x5306, 0x45,}, - {0x5307, 0x53,}, - {0x5308, 0x5d,}, - {0x5309, 0x68,}, - {0x530a, 0x7f,}, - {0x530b, 0x91,}, - {0x530c, 0xa5,}, - {0x530d, 0xc6,}, - {0x530e, 0xde,}, - {0x530f, 0xef,}, - {0x5310, 0x16,}, - {0x5003, 0x80,}, - {0x5500, 0x08,}, - {0x5501, 0x48,}, - {0x5502, 0x18,}, - {0x5503, 0x04,}, - {0x5504, 0x08,}, - {0x5505, 0x48,}, - {0x5506, 0x02,}, - {0x5507, 0x16,}, - {0x5508, 0x2d,}, - {0x5509, 0x08,}, - {0x550a, 0x48,}, - {0x550b, 0x06,}, - {0x550c, 0x04,}, - {0x550d, 0x01,}, - {0x5800, 0x02,}, - {0x5803, 0x2e,}, - {0x5804, 0x20,}, - {0x5600, 0x00,}, - {0x5601, 0x2c,}, - {0x5602, 0x5a,}, - {0x5603, 0x06,}, - {0x5604, 0x1c,}, - {0x5605, 0x65,}, - {0x5606, 0x81,}, - {0x5607, 0x9f,}, - {0x5608, 0x8a,}, - {0x5609, 0x15,}, - {0x560a, 0x01,}, - {0x560b, 0x9c,}, - {0x3811, 0x07,}, - {0x3813, 0x06,}, - {0x3630, 0x79,}, -}; - -static struct v4l2_subdev_info ov7695_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov7695_start_settings[] = { - {0x301a, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf ov7695_stop_settings[] = { - {0x301a, 0xf4}, -}; - -static const struct i2c_device_id ov7695_i2c_id[] = { - {OV7695_SENSOR_NAME, (kernel_ulong_t)&ov7695_s_ctrl}, - { } -}; - -static int32_t msm_ov7695_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov7695_s_ctrl); -} - -static struct i2c_driver ov7695_i2c_driver = { - .id_table = ov7695_i2c_id, - .probe = msm_ov7695_i2c_probe, - .driver = { - .name = OV7695_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov7695_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov7695_dt_match[] = { - {.compatible = "ovti,ov7695", .data = &ov7695_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov7695_dt_match); - -static int32_t ov7695_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(ov7695_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver ov7695_platform_driver = { - .driver = { - .name = "ovti,ov7695", - .owner = THIS_MODULE, - .of_match_table = ov7695_dt_match, - }, - .probe = ov7695_platform_probe, -}; - -static int __init ov7695_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_register(&ov7695_platform_driver); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov7695_i2c_driver); -} - -static void __exit ov7695_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (ov7695_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov7695_s_ctrl); - platform_driver_unregister(&ov7695_platform_driver); - } else - i2c_del_driver(&ov7695_i2c_driver); - return; -} - -int32_t ov7695_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.subdev_intf[i] = - s_ctrl->sensordata->sensor_info->subdev_intf[i]; - } - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_recommend_settings, - ARRAY_SIZE(ov7695_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_vga_settings, - ARRAY_SIZE(ov7695_vga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov7695_vga_settings ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_stop_settings, - ARRAY_SIZE(ov7695_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_start_settings, - ARRAY_SIZE(ov7695_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = - MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_COMPAT -int32_t ov7695_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.subdev_intf[i] = - s_ctrl->sensordata->sensor_info->subdev_intf[i]; - } - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_recommend_settings, - ARRAY_SIZE(ov7695_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_vga_settings, - ARRAY_SIZE(ov7695_vga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov7695_vga_settings ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_stop_settings, - ARRAY_SIZE(ov7695_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_start_settings, - ARRAY_SIZE(ov7695_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting32 conf_array32; - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array32, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(struct msm_camera_i2c_reg_setting32))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - conf_array.addr_type = conf_array32.addr_type; - conf_array.data_type = conf_array32.data_type; - conf_array.delay = conf_array32.delay; - conf_array.size = conf_array32.size; - conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = - MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - pr_err("Invalid cfgtype func %s line %d cfgtype = %d\n", - __func__, __LINE__, (int32_t)cdata->cfgtype); - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} -#endif - -static struct msm_sensor_fn_t ov7695_sensor_func_tbl = { - .sensor_config = ov7695_sensor_config, -#ifdef CONFIG_COMPAT - .sensor_config32 = ov7695_sensor_config32, -#endif - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t ov7695_s_ctrl = { - .sensor_i2c_client = &ov7695_sensor_i2c_client, - .power_setting_array.power_setting = ov7695_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov7695_power_setting), - .msm_sensor_mutex = &ov7695_mut, - .sensor_v4l2_subdev_info = ov7695_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov7695_subdev_info), - .func_tbl = &ov7695_sensor_func_tbl, -}; - -module_init(ov7695_init_module); -module_exit(ov7695_exit_module); -MODULE_DESCRIPTION("Aptina 0.3MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8825.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8825.c deleted file mode 100644 index e17c94e85b50..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8825.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8825_SENSOR_NAME "ov8825" -DEFINE_MSM_MUTEX(ov8825_mut); - -static struct msm_sensor_ctrl_t ov8825_s_ctrl; - -static struct msm_sensor_power_setting ov8825_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8825_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8825_i2c_id[] = { - {OV8825_SENSOR_NAME, (kernel_ulong_t)&ov8825_s_ctrl}, - { } -}; - -static int32_t msm_ov8825_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8825_s_ctrl); -} - -static struct i2c_driver ov8825_i2c_driver = { - .id_table = ov8825_i2c_id, - .probe = msm_ov8825_i2c_probe, - .driver = { - .name = OV8825_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8825_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8825_dt_match[] = { - {.compatible = "qcom,ov8825", .data = &ov8825_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8825_dt_match); - -static struct platform_driver ov8825_platform_driver = { - .driver = { - .name = "qcom,ov8825", - .owner = THIS_MODULE, - .of_match_table = ov8825_dt_match, - }, -}; - -static int32_t ov8825_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8825_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8825_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8825_platform_driver, - ov8825_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8825_i2c_driver); -} - -static void __exit ov8825_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8825_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8825_s_ctrl); - platform_driver_unregister(&ov8825_platform_driver); - } else - i2c_del_driver(&ov8825_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8825_s_ctrl = { - .sensor_i2c_client = &ov8825_sensor_i2c_client, - .power_setting_array.power_setting = ov8825_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8825_power_setting), - .msm_sensor_mutex = &ov8825_mut, - .sensor_v4l2_subdev_info = ov8825_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8825_subdev_info), -}; - -module_init(ov8825_init_module); -module_exit(ov8825_exit_module); -MODULE_DESCRIPTION("ov8825"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8865.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8865.c deleted file mode 100644 index 6d788f592b17..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov8865.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8865_SENSOR_NAME "ov8865" -DEFINE_MSM_MUTEX(ov8865_mut); - -static struct msm_sensor_ctrl_t ov8865_s_ctrl; - -static struct msm_sensor_power_setting ov8865_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8865_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8865_i2c_id[] = { - {OV8865_SENSOR_NAME, (kernel_ulong_t)&ov8865_s_ctrl}, - { } -}; - -static int32_t msm_ov8865_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8865_s_ctrl); -} - -static struct i2c_driver ov8865_i2c_driver = { - .id_table = ov8865_i2c_id, - .probe = msm_ov8865_i2c_probe, - .driver = { - .name = OV8865_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8865_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8865_dt_match[] = { - {.compatible = "ovti,ov8865", .data = &ov8865_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8865_dt_match); - -static struct platform_driver ov8865_platform_driver = { - .driver = { - .name = "ovti,ov8865", - .owner = THIS_MODULE, - .of_match_table = ov8865_dt_match, - }, -}; - -static int32_t ov8865_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8865_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8865_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8865_platform_driver, - ov8865_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8865_i2c_driver); -} - -static void __exit ov8865_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8865_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8865_s_ctrl); - platform_driver_unregister(&ov8865_platform_driver); - } else - i2c_del_driver(&ov8865_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8865_s_ctrl = { - .sensor_i2c_client = &ov8865_sensor_i2c_client, - .power_setting_array.power_setting = ov8865_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8865_power_setting), - .msm_sensor_mutex = &ov8865_mut, - .sensor_v4l2_subdev_info = ov8865_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8865_subdev_info), -}; - -module_init(ov8865_init_module); -module_exit(ov8865_exit_module); -MODULE_DESCRIPTION("ov8865"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov9724.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov9724.c deleted file mode 100644 index 99bf03ab1aa0..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/ov9724.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV9724_SENSOR_NAME "ov9724" -DEFINE_MSM_MUTEX(ov9724_mut); - -static struct msm_sensor_ctrl_t ov9724_s_ctrl; - -static struct msm_sensor_power_setting ov9724_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov9724_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_ov9724_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov9724_s_ctrl); -} - -static const struct i2c_device_id ov9724_i2c_id[] = { - {OV9724_SENSOR_NAME, (kernel_ulong_t)&ov9724_s_ctrl}, - { } -}; - -static struct i2c_driver ov9724_i2c_driver = { - .id_table = ov9724_i2c_id, - .probe = msm_ov9724_i2c_probe, - .driver = { - .name = OV9724_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov9724_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov9724_s_ctrl = { - .sensor_i2c_client = &ov9724_sensor_i2c_client, - .power_setting_array.power_setting = ov9724_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov9724_power_setting), - .msm_sensor_mutex = &ov9724_mut, - .sensor_v4l2_subdev_info = ov9724_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov9724_subdev_info), -}; - -static const struct of_device_id ov9724_dt_match[] = { - {.compatible = "qcom,ov9724", .data = &ov9724_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov9724_dt_match); - -static struct platform_driver ov9724_platform_driver = { - .driver = { - .name = "qcom,ov9724", - .owner = THIS_MODULE, - .of_match_table = ov9724_dt_match, - }, -}; - -static int32_t ov9724_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov9724_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov9724_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov9724_platform_driver, - ov9724_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov9724_i2c_driver); -} - -static void __exit ov9724_exit_module(void) -{ - if (ov9724_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov9724_s_ctrl); - platform_driver_unregister(&ov9724_platform_driver); - } else - i2c_del_driver(&ov9724_i2c_driver); - return; -} - -module_init(ov9724_init_module); -module_exit(ov9724_exit_module); -MODULE_DESCRIPTION("ov9724"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k3l1yx.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k3l1yx.c deleted file mode 100644 index 225e81d94cdb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k3l1yx.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define S5K3L1YX_SENSOR_NAME "s5k3l1yx" -DEFINE_MSM_MUTEX(s5k3l1yx_mut); - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl; - -static struct msm_sensor_power_setting s5k3l1yx_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info s5k3l1yx_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k3l1yx_i2c_id[] = { - {S5K3L1YX_SENSOR_NAME, (kernel_ulong_t)&s5k3l1yx_s_ctrl}, - { } -}; - -static int32_t msm_s5k3l1yx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k3l1yx_s_ctrl); -} - -static struct i2c_driver s5k3l1yx_i2c_driver = { - .id_table = s5k3l1yx_i2c_id, - .probe = msm_s5k3l1yx_i2c_probe, - .driver = { - .name = S5K3L1YX_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k3l1yx_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k3l1yx_dt_match[] = { - {.compatible = "qcom,s5k3l1yx", .data = &s5k3l1yx_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k3l1yx_dt_match); - -static struct platform_driver s5k3l1yx_platform_driver = { - .driver = { - .name = "qcom,s5k3l1yx", - .owner = THIS_MODULE, - .of_match_table = s5k3l1yx_dt_match, - }, -}; - -static int32_t s5k3l1yx_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k3l1yx_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k3l1yx_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k3l1yx_platform_driver, - s5k3l1yx_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k3l1yx_i2c_driver); -} - -static void __exit s5k3l1yx_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k3l1yx_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k3l1yx_s_ctrl); - platform_driver_unregister(&s5k3l1yx_platform_driver); - } else - i2c_del_driver(&s5k3l1yx_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl = { - .sensor_i2c_client = &s5k3l1yx_sensor_i2c_client, - .power_setting_array.power_setting = s5k3l1yx_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k3l1yx_power_setting), - .msm_sensor_mutex = &s5k3l1yx_mut, - .sensor_v4l2_subdev_info = s5k3l1yx_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k3l1yx_subdev_info), -}; - -module_init(s5k3l1yx_init_module); -module_exit(s5k3l1yx_exit_module); -MODULE_DESCRIPTION("s5k3l1yx"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4e1.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4e1.c deleted file mode 100644 index 5c70df2dec56..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4e1.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define s5k4e1_SENSOR_NAME "s5k4e1" -DEFINE_MSM_MUTEX(s5k4e1_mut); - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl; - -static struct msm_sensor_power_setting s5k4e1_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info s5k4e1_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SGRBG10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k4e1_i2c_id[] = { - {s5k4e1_SENSOR_NAME, (kernel_ulong_t)&s5k4e1_s_ctrl}, - { } -}; - -static int32_t msm_s5k4e1_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k4e1_s_ctrl); -} - -static struct i2c_driver s5k4e1_i2c_driver = { - .id_table = s5k4e1_i2c_id, - .probe = msm_s5k4e1_i2c_probe, - .driver = { - .name = s5k4e1_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k4e1_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k4e1_dt_match[] = { - {.compatible = "shinetech,s5k4e1", .data = &s5k4e1_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k4e1_dt_match); - -static struct platform_driver s5k4e1_platform_driver = { - .driver = { - .name = "shinetech,s5k4e1", - .owner = THIS_MODULE, - .of_match_table = s5k4e1_dt_match, - }, -}; - -static int32_t s5k4e1_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k4e1_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k4e1_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k4e1_platform_driver, - s5k4e1_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k4e1_i2c_driver); -} - -static void __exit s5k4e1_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k4e1_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k4e1_s_ctrl); - platform_driver_unregister(&s5k4e1_platform_driver); - } else - i2c_del_driver(&s5k4e1_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl = { - .sensor_i2c_client = &s5k4e1_sensor_i2c_client, - .power_setting_array.power_setting = s5k4e1_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k4e1_power_setting), - .msm_sensor_mutex = &s5k4e1_mut, - .sensor_v4l2_subdev_info = s5k4e1_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k4e1_subdev_info), -}; - -module_init(s5k4e1_init_module); -module_exit(s5k4e1_exit_module); -MODULE_DESCRIPTION("s5k4e1"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx.h deleted file mode 100755 index 99f074fd6786..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __S5K4ECGX_H__ -#define __S5K4ECGX_H__ - -#include "msm_sensor.h" - -#undef DEBUG_LEVEL_HIGH -#undef CDBG - -#define DEBUG_LEVEL_HIGH -#ifdef DEBUG_LEVEL_HIGH -#define CDBG(fmt, args...) printk("[S5K4ECGX] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -#define LOW_LIGHT_LEVEL 0x40 -#define BURST_MODE_BUFFER_MAX_SIZE 128 -#define BURST_REG 0x0F12 - -struct s5k4ecgx_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int resolution; - unsigned int ae_awb_lock; - unsigned int focus_mode; - unsigned int flash_mode; - unsigned int lowLight; - unsigned int is_touchaf; - unsigned int is_preflash; -}; - -struct s5k4ecgx_ctrl { - struct s5k4ecgx_userset settings; - unsigned int op_mode; - unsigned int prev_mode; - unsigned int streamon; - unsigned int exif_iso; - unsigned int exif_shutterspeed ; -}; - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -extern int set_led_flash(int mode); - -#endif //__S5K4ECGX_H__ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs.h deleted file mode 100755 index d1ab9f0e273d..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs.h +++ /dev/null @@ -1,6065 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0092,},//adlc_enable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA}, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable}, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0006,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x000C,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0402,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0600,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x05E0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0390,}, -{0x0F12, 0x03B0,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039E,}, -{0x0F12, 0x0338,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x02FE,}, -{0x0F12, 0x0352,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x031E,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x02E8,}, -{0x0F12, 0x023A,}, -{0x0F12, 0x02A4,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x0272,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0256,}, -{0x0F12, 0x01F6,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x01E6,}, -{0x0F12, 0x0236,}, -{0x0F12, 0x01CA,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x01AA,}, -{0x0F12, 0x020C,}, -{0x0F12, 0x019E,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x0126,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0264,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x025A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0006,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x3A98,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: 60Hz 5F:50Hz */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, - {0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0200,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0414,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x3718,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2A36,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x2A36,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000}, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232D,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x212B,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1E26,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame}, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //Hsize : 640 1280 1024 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight//Vsize : 480 960 768 -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0920,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0348,},//_ccm_oscar_iSaturation [7:0] AFIT - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0AC0,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x5018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x0414,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x3718,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x2A36,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x2A36,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x232D,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x1D22,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x212B,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x0C0C,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x1E26,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x0A0A,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x0C0F,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x0808,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ -/* FOR HD CAMCORDER */ - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x01E0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - - -#endif - diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs_gte.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs_gte.h deleted file mode 100755 index 741c485f22ea..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_regs_gte.h +++ /dev/null @@ -1,6236 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0082,},//Fadlc_disable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0010,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x0020,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0802,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x0024,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x002C,}, -{0x0F12, 0x002E,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0088,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00B8,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00C8,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0580,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x07B0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0370,}, -{0x0F12, 0x03AC,}, -{0x0F12, 0x0314,}, -{0x0F12, 0x03AE,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x0396,}, -{0x0F12, 0x0298,}, -{0x0F12, 0x0368,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x0336,}, -{0x0F12, 0x0254,}, -{0x0F12, 0x0306,}, -{0x0F12, 0x023C,}, -{0x0F12, 0x02DC,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x02BA,}, -{0x0F12, 0x0210,}, -{0x0F12, 0x02A0,}, -{0x0F12, 0x01FC,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x01EE,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x01E0,}, -{0x0F12, 0x025E,}, -{0x0F12, 0x01D8,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x01CC,}, -{0x0F12, 0x0238,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x01F0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x011A,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0218,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0007,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: Auto 5F:Manual */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, -{0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0252,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0420,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0990,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, //default -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x005C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0012,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001A,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0022,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0032,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003F,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0059,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0066,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0350,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset init */ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},//afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0A78,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -//{0x002A, 0x18AC,}, -//{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -//{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -//{0x0F12, 0x07dc,},/*senHal_uMinColsBin */ -//{0x0F12, 0x05c0,},/*senHal_uMinColsNoBin */ - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0250,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x0A1A,}, -{0x0F12, 0x2318,}, - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x040F,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0004,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x2318,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x3141,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x3140,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x2832,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x272C,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x2630,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x1616,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x232B,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x1414,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x1114,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x1212,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -#if 0 -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -#endif -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xF132,}, -{0x0F12, 0x0006,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0000,}, // 110404 AE haunting -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_15[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02B4,}, -{0x0F12, 0x0012,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //029Ah:15fps -{0x0F12, 0x029A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - -/* -* S5E4ECGX sensor has a known issue of non-performance in 60 Hz. -* Make the setting same as 50Hz -*/ -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_60hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_50hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_640_480[]= -{ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //senHal_uMinColsBin -{0x0F12, 0x06C8,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, //REG_0TC_PCFG_usWidth //640 -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usHeight //480 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_720[]={ -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, - -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x07DC,}, /*senHal_uMinColsBin */ -{0x0F12, 0x05C0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, /*REG_TC_GP_PrevReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_GP_PrevReqInputHeight //1536 */ -{0x0F12, 0x0010,}, /*REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2*/ -{0x0F12, 0x00FC,}, /*REG_TC_GP_PrevInputHeightOfs/(1944-1536)/2*/ -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, /*REG_TC_PZOOM_PrevZoomReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_PZOOM_PrevZoomReqInputHeight //1536 */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x02D0,}, /*REG_0TC_PCFG_usHeight //720 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_960[]={ -{0xFCFC, 0xD000,}, - -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, - -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x03C0,}, /*REG_0TC_PCFG_usHeight //960 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_stop_stream[]={ -{0x0028, 0x7000,}, -{0x002A, 0x023E,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /*REG_TC_GP_EnablePreviewChanged */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_yuv.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_yuv.c deleted file mode 100755 index 7c835256b9f8..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/s5k4ecgx_yuv.c +++ /dev/null @@ -1,1553 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -//#define NO_BURST // Enable no burst mode for Tunning - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#define NO_BURST // Enable no burst mode for Tunning -#endif -#include "s5k4ecgx.h" - -#if defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "s5k4ecgx_regs_gte.h" -#else -#include "s5k4ecgx_regs.h" -#endif -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" -#ifdef CONFIG_LOAD_FILE -#define S5K4ECGX_WRITE_LIST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#elif defined(NO_BURST) - -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) S5K4ECGX_WRITE_LIST(A) - - -#else -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_sensor_burst_write(s_ctrl, A, ARRAY_SIZE(A)); \ -CDBG("REGSEQ *** BURST %s", #A) -#endif -#define S5K4ECGX_WRITE_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) - -#define S5K4ECGX_READ_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include -static char *s5k4ecgx_regs_table; -static int s5k4ecgx_regs_table_size; -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void s5k4ecgx_regs_table_init(char *filename); -void s5k4ecgx_regs_table_exit(void); -#endif - -static struct s5k4ecgx_ctrl s5k4ecgx_ctrl; - -#if 0 -extern uint16_t rear_vendor_id; -#endif - -#define set_led_flash(x) do{}while(0) - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - const char *sensor_name = NULL; - struct msm_camera_slave_info *slave_info = NULL; - struct msm_camera_i2c_client *sensor_i2c_client = NULL; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; - - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - - - printk("%s:%d sensor[%s] sid = 0x%X sensorid = 0x%X DATA TYPE = %d\n E", - __func__, __LINE__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - printk(" ---------*****************------------------------------\n"); - - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0x0012, 0x0001, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0x007A, 0x0000, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0xA000, 0x0004, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0xA062, 0x4000, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0xA002, 0x0006, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - if (sensor_i2c_client->i2c_func_tbl->i2c_write( - sensor_i2c_client,0xA000, 0x0001, MSM_CAMERA_I2C_WORD_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - } - printk(" ---------*****************------------------------------\n"); - usleep(100); - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, 0xA006 /*slave_info->sensor_id_reg_addr*/, - &chipid, data_type); - - pr_err("%s: line %d chipid received after i2c read = 0x%X\n", - __func__, __LINE__, chipid); - - pr_err("rc == %d \n", rc); - printk("%s: read id: %x expected id: %x\n", __func__, chipid, - slave_info->sensor_id); -/* if (chipid) - rear_vendor_id = chipid; -*/ - if (chipid != slave_info->sensor_id) { - pr_err("s5k4ecgx_sensor_match_id chip id doesnot match\n"); - } - return 0; -} - -#if 1 -int32_t s5k4ecgx_sensor_burst_write(struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size) -{ - int i; - int idx = 0; - int burst_flag = 0; - int err = -EINVAL; - uint16_t subaddr; - uint16_t value; - static uint8_t burst_data[BURST_MODE_BUFFER_MAX_SIZE * 2] = {0}; - - // burst write related variables - struct msm_camera_i2c_reg_array burst_reg_setting = { 0 ,}; - struct msm_camera_i2c_reg_setting conf_array = { - .reg_setting = (void * ) &burst_reg_setting, - .size = 1, - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, - .data_type = MSM_CAMERA_I2C_BURST_DATA, - }; - - CDBG("E"); - - // read the register settings array - for (i = 0; i < size; ++i) { - if (idx >= BURST_MODE_BUFFER_MAX_SIZE) { - burst_flag = 0; - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.delay = idx * 2; - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", __func__, __LINE__); - goto on_error; - } - } - - // the register address - subaddr = reg_settings[i].reg_addr; - - // the register value - value = reg_settings[i].reg_data; - - if (burst_flag == 0) { - if ( (subaddr == BURST_REG) && \ - (reg_settings[i+1].reg_addr == BURST_REG)) { - //burst mode start - burst_flag = 1; - burst_reg_setting.reg_addr = subaddr; - /* MSB has to go 1st for I2C write */ - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - continue; - } - - // write the register setting - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client, subaddr, \ - value, MSM_CAMERA_I2C_WORD_DATA); - - } else if (burst_flag == 1) { - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - if ((subaddr == BURST_REG) && (i + 1 >= size || \ - (reg_settings[i+1].reg_addr != BURST_REG))) { - // burst mode end. - burst_flag = 0; - - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.delay = idx * 2; - - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", \ - __func__, __LINE__); - goto on_error; - } - } - } - } - -on_error: - if (unlikely(err < 0)) { - pr_err("[%s:%d] register set failed\n", __func__, __LINE__); - } - CDBG("X"); - return err; -} -#endif - -int32_t s5k4ecgx_set_ae_awb(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - if (mode) { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 0) { - CDBG("AWB_AE_LOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_lock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 1; - } - } else { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 1) { - CDBG("AWB_AE_UNLOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_unlock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 0; - } - } - - return 0; -} - - -int32_t s5k4ecgx_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - - -void s5k4ecgx_set_exposure_camcorder(struct msm_sensor_ctrl_t *s_ctrl,unsigned int mode) -{ - - CDBG("CAMSET CAMCORDER -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - break; - } - -} - -int32_t s5k4ecgx_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- effect is %d", mode); - - switch (mode) { - case CAMERA_EFFECT_OFF: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Normal); - break; - - case CAMERA_EFFECT_MONO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Mono); - break; - - case CAMERA_EFFECT_NEGATIVE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Negative); - break; - - case CAMERA_EFFECT_SEPIA: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Sepia); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- scene is %d", mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Default); - - switch (mode) { - case CAMERA_SCENE_AUTO: - break; - - case CAMERA_SCENE_LANDSCAPE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Landscape); - break; - - case CAMERA_SCENE_DAWN: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Duskdawn); - break; - - case CAMERA_SCENE_BEACH: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Beach_Snow); - break; - - case CAMERA_SCENE_SUNSET: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sunset); - break; - - case CAMERA_SCENE_NIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Nightshot); - break; - - case CAMERA_SCENE_PORTRAIT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Portrait); - break; - - case CAMERA_SCENE_AGAINST_LIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Backlight); - break; - - case CAMERA_SCENE_SPORT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sports); - break; - - case CAMERA_SCENE_FALL: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fall_Color); - break; - - case CAMERA_SCENE_TEXT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Text); - /*S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_1); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_2); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_3); - msleep(100);*/ - break; - - case CAMERA_SCENE_CANDLE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Candle_Light); - break; - - case CAMERA_SCENE_FIRE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fireworks); - break; - - case CAMERA_SCENE_PARTY: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Party_Indoor); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - uint16_t value = 0; - CDBG("CAMSET -- WB is %d", mode); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x04E6); - S5K4ECGX_READ_ADDR(0x0F12, &value); - - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, 0x04E6); - - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - - value |= (0x1 << 3); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Auto); - break; - - case CAMERA_WHITE_BALANCE_INCANDESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Tungsten); - break; - - case CAMERA_WHITE_BALANCE_FLUORESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Fluorescent); - break; - - case CAMERA_WHITE_BALANCE_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Sunny); - break; - - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- metering is %d", mode); - - switch (mode) { - case CAMERA_CENTER_WEIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Center); - break; - - case CAMERA_AVERAGE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Matrix); - break; - - case CAMERA_SPOT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Spot); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - uint16_t value = 0; - CDBG("CAMSET -- iso is %d", mode); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x04E6); - S5K4ECGX_READ_ADDR(0x0F12, &value); - - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, 0x04E6); - - switch (mode) { - case CAMERA_ISO_MODE_AUTO: - value |= (0x1 << 5); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_Auto); - break; - case CAMERA_ISO_MODE_50: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_50); - break; - case CAMERA_ISO_MODE_100: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_100); - break; - case CAMERA_ISO_MODE_200: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_200); - break; - case CAMERA_ISO_MODE_400: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_400); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_get_light_level(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short cur_lux = 0; - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C18); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR( 0x0F12,&msb); - cur_lux = (msb << 16) | lsb; - return cur_lux; -} - -int32_t s5k4ecgx_get_flash_status(void) -{ - int flash_status = 0; - if ( ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) && (s5k4ecgx_ctrl.settings.lowLight) ) - || (s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_ON)){ - flash_status = 1; - } - CDBG("flash_status = %d", flash_status); - return flash_status; -} - -void s5k4ecgx_check_ae_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short ae_stable = 0; - int ae_count = 0; - - while (ae_count++ < 7) { - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C74); - S5K4ECGX_READ_ADDR(0x0F12, &ae_stable); - if (ae_stable == 0x01) { - CDBG("ae_stabel count[%d]\n", ae_count); - break; - } - msleep(30); - } - if (ae_count > 7) { - CDBG("AE NOT STABLE"); - } -} - -int32_t s5k4ecgx_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- focus mode is %d", mode); - - switch (mode) { - case CAMERA_AF_OCR: - case CAMERA_AF_MACRO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_macro_af); - break; - case CAMERA_AF_AUTO: - default: - CDBG("default mode is auto\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_normal_af); - } - return rc; -} - -int32_t s5k4ecgx_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos) -{ - int32_t rc = SENSOR_AF_CANCEL; - CDBG("CAMSET -- set_af_status %d, init_pos =%d", status, initial_pos); - if (status == SENSOR_AF_START) { - unsigned int cur_lux = 0; - CDBG("S5K4ECGX_AF_START"); - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("AF light level = %d", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 1; - } else { - CDBG("NORMAL LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - s5k4ecgx_ctrl.settings.is_preflash = 1; - CDBG("Turn on the pre-flash\n"); - set_led_flash(MSM_CAMERA_LED_LOW); - rc = SENSOR_AF_PRE_FLASH_ON; - } else { - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - } - - } else if ( (status == SENSOR_AF_PRE_FLASH_OFF) ) { - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - else { - if (s5k4ecgx_ctrl.settings.is_touchaf == 1) { - CDBG("unlock AE/AWB in Autofocus Finish\n"); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - } - rc = SENSOR_AF_PRE_FLASH_OFF; - } else if (status == SENSOR_AF_PRE_FLASH_AE_STABLE && - s5k4ecgx_ctrl.settings.is_preflash == 1) { - - s5k4ecgx_check_ae_stable(s_ctrl); - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - - } else { - - CDBG("S5K4ECGX_AF_ABORT\n"); - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - rc = SENSOR_AF_CANCEL; - } - - return rc; -} - -int32_t s5k4ecgx_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, int is_search_status) -{ - unsigned short af_status = 0; - CDBG("is_search_status %d", is_search_status); - switch (is_search_status) { - case 0: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2EEE); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("1st AF status : %x\n", af_status); - break; - case 1: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2207); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("2nd AF status : %d", af_status); - break; - default: - CDBG("unexpected mode is coming from HAL"); - break; - } - CDBG("return_af_status = %d", af_status); - return af_status; -} - -int32_t s5k4ecgx_touchaf_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, - unsigned int addr, unsigned int value) -{ - S5K4ECGX_WRITE_ADDR(0xFCFC, 0xD000); - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, addr); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - return 0; -} - -int32_t s5k4ecgx_set_touchaf_pos(struct msm_sensor_ctrl_t *s_ctrl, - int x, int y) -{ - static unsigned short inWindowWidth = 288; - static unsigned short inWindowHeight = 216; - static unsigned short outWindowWidth = 640; - static unsigned short outWindowHeight = 400; - - unsigned short previewWidth; - unsigned short previewHeight; - - CDBG("s5k4ecgx_set_touchaf_pos (%d, %d)",x, y); - - // set preview size - previewWidth = 640; - previewHeight = 480; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x02A0); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowHeight); - CDBG("[i2c read] inWindowWidth = %d, inWindowHeight = %d\n", inWindowWidth, inWindowHeight); - - inWindowWidth = inWindowWidth * previewWidth / 1024; - inWindowHeight = inWindowHeight * previewHeight / 1024; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x0298); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowHeight); - CDBG("[i2c read] outWindowWidth = %d, outWindowHeight = %d\n", outWindowWidth, outWindowHeight); - - - outWindowWidth = outWindowWidth * previewWidth / 1024; - outWindowHeight = outWindowHeight * previewHeight / 1024; - - if (x < inWindowWidth/2) - x = inWindowWidth/2+1; - else if (x > previewWidth - inWindowWidth/2) - x = previewWidth - inWindowWidth/2 -1; - if (y < inWindowHeight/2) - y = inWindowHeight/2+1; - else if (y > previewHeight - inWindowHeight/2) - y = previewHeight - inWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029C, (x - inWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029E, (y - inWindowHeight/2) * 1024 / previewHeight); - - if (x < outWindowWidth/2) - x = outWindowWidth/2+1; - else if (x > previewWidth - outWindowWidth/2) - x = previewWidth - outWindowWidth/2 -1; - if (y < outWindowHeight/2) - y = outWindowHeight/2+1; - else if (y > previewHeight - outWindowHeight/2) - y = previewHeight - outWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0294, (x - outWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0296, (y - outWindowHeight/2) * 1024 / previewHeight); - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x02A4, 0x0001); - - return 0; -} - -int32_t s5k4ecgx_wait_preview_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured == 0x0100 && try <= 50); - - - if (is_captured == 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - - CDBG("try[%d]\n", try); - - return 0; -} - -int32_t s5k4ecgx_wait_capture_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured != 0x0100 && try <= 50); - - - if (is_captured != 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - CDBG("try[%d]\n", try); - - return 0; -} - -int32_t s5k4ecgx_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short analog_gain; - unsigned short digital_gain; - unsigned int iso_value; - unsigned int temp; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC0); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR(0x0F12, &msb); - - temp = ((msb << 16) + lsb); - if ( temp != 0) - s5k4ecgx_ctrl.exif_shutterspeed = 400000 / temp; - else - s5k4ecgx_ctrl.exif_shutterspeed = 0; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC4); - S5K4ECGX_READ_ADDR(0x0F12, &analog_gain); - S5K4ECGX_READ_ADDR(0x0F12, &digital_gain); - - iso_value =(unsigned int) ( analog_gain * digital_gain ) / 256 / 2; - if (iso_value < 0xD0) - s5k4ecgx_ctrl.exif_iso = 50; - else if(iso_value < 0x1A0) - s5k4ecgx_ctrl.exif_iso = 100; - else if(iso_value < 0x374) - s5k4ecgx_ctrl.exif_iso = 200; - else - s5k4ecgx_ctrl.exif_iso = 400; - - CDBG("shutter_speed = %d, ISO = %d, iso_value = 0x%x", - s5k4ecgx_ctrl.exif_shutterspeed, s5k4ecgx_ctrl.exif_iso, iso_value); - return 0; -} - - -int32_t s5k4ecgx_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = s5k4ecgx_ctrl.exif_iso; - exif_info->value_3 = s5k4ecgx_ctrl.exif_shutterspeed; - return 0; -} - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO \n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_init("/data/s5k4ecgx_regs.h"); - pr_err("/data/s5k4ecgx_yuv.h inside CFG_SET_INIT_SETTING\n"); -#endif - rc = S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_init_regs); - break; - case CFG_SET_RESOLUTION: - s5k4ecgx_ctrl.settings.resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d\n " , s5k4ecgx_ctrl.settings.resolution); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - if (s5k4ecgx_get_flash_status()) { - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else if ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) - && (!s5k4ecgx_ctrl.settings.lowLight)) { - unsigned short cur_lux; - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("light level = %d\n", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX\n"); - s5k4ecgx_ctrl.settings.lowLight = 1; - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_snapshot_regs); - s5k4ecgx_wait_capture_stable(s_ctrl); - s5k4ecgx_set_exif(s_ctrl); - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_CAPTURE){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - } - s5k4ecgx_wait_preview_stable(s_ctrl); - } - - break; - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM\n"); - if(s5k4ecgx_get_flash_status() ){ - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - } - - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.settings.is_preflash == 1) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - if(s5k4ecgx_ctrl.settings.scenemode == CAMERA_SCENE_AUTO){ - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - } - - break; - case CFG_SET_START_STREAM: - CDBG("CFG_SET_START_STREAM"); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - set_led_flash(MSM_CAMERA_LED_LOW); - msleep(380); - s5k4ecgx_check_ae_stable(s_ctrl); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_30); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder); - s5k4ecgx_set_exposure_camcorder(s_ctrl,s5k4ecgx_ctrl.settings.exposure); - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - CDBG("prev_mode = %d\n", s5k4ecgx_ctrl.prev_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if ((s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_RECORDING)) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_auto); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder_disable); - s5k4ecgx_set_exposure_camcorder(s_ctrl,s5k4ecgx_ctrl.settings.exposure); - } - - if (s5k4ecgx_ctrl.streamon == 0) { - s5k4ecgx_set_exposure_compensation(s_ctrl, - s5k4ecgx_ctrl.settings.exposure); - - s5k4ecgx_set_white_balance(s_ctrl, - s5k4ecgx_ctrl.settings.wb); - - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - } - - s5k4ecgx_ctrl.streamon = 1; - } - - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - CDBG("CFG_SET_SLAVE_INFO \n"); - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - CDBG("CFG_SET_SLAVE_INFO EXIT \n"); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP \n"); - s5k4ecgx_ctrl.streamon = 0; - s5k4ecgx_ctrl.op_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.prev_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - s5k4ecgx_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - s5k4ecgx_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - s5k4ecgx_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - s5k4ecgx_ctrl.settings.effect = CAMERA_EFFECT_OFF; - s5k4ecgx_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - s5k4ecgx_ctrl.settings.flash_mode = CAMERA_FLASH_OFF; - s5k4ecgx_ctrl.settings.lowLight = 0; - s5k4ecgx_ctrl.settings.is_touchaf = 0; - s5k4ecgx_ctrl.settings.is_preflash = 0; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN \n"); - - /* Actuator softlanding */ - if(s5k4ecgx_ctrl.settings.focus_mode == CAMERA_AF_MACRO){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_normal_af); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_focus_mode_auto); - msleep(100); - /* Required for 3rd Party Tourch Light Mode */ - set_led_flash(MSM_CAMERA_LED_OFF); - - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; - -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING \n"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - - - - -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - /*pr_err("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3);*/ - switch (cam_info->mode) { - case EXT_CAM_EV: - s5k4ecgx_ctrl.settings.exposure = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_exposure_compensation(s_ctrl, s5k4ecgx_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - s5k4ecgx_ctrl.settings.wb = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_white_balance(s_ctrl, s5k4ecgx_ctrl.settings.wb); - break; - case EXT_CAM_METERING: - s5k4ecgx_ctrl.settings.metering = (cam_info->value_1); - s5k4ecgx_set_metering(s_ctrl, s5k4ecgx_ctrl.settings.metering); - break; - case EXT_CAM_ISO: - s5k4ecgx_ctrl.settings.iso = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - break; - case EXT_CAM_EFFECT: - s5k4ecgx_ctrl.settings.effect = (cam_info->value_1); - s5k4ecgx_set_effect(s_ctrl, s5k4ecgx_ctrl.settings.effect); - break; - case EXT_CAM_SCENE_MODE: - s5k4ecgx_ctrl.settings.scenemode = (cam_info->value_1); - s5k4ecgx_set_scene_mode(s_ctrl, s5k4ecgx_ctrl.settings.scenemode); - break; - case EXT_CAM_SENSOR_MODE: - s5k4ecgx_ctrl.prev_mode = s5k4ecgx_ctrl.op_mode; - s5k4ecgx_ctrl.op_mode = (cam_info->value_1); - CDBG("EXT_CAM_SENSOR_MODE = %d", s5k4ecgx_ctrl.op_mode); - break; - case EXT_CAM_FOCUS: - s5k4ecgx_ctrl.settings.focus_mode = (cam_info->value_1); - /*CDBG("EXT_CAM_FOCUS focus mode = %d\n ", s5k4ecgx_ctrl.settings.focus_mode);*/ - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - break; - case EXT_CAM_SET_AF_STATUS: - /*CDBG("EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2);*/ - cam_info->value_1 = s5k4ecgx_set_af_status(s_ctrl, cam_info->value_1, - cam_info->value_2); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_SET_TOUCHAF_POS: - /*CDBG("EXT_CAM_SET_TOUCHAF_POS: %d : %d", cam_info->value_1, cam_info->value_2);*/ - if(cam_info->value_1 !=0 && cam_info->value_2 != 0) { - s5k4ecgx_set_touchaf_pos(s_ctrl, cam_info->value_1, cam_info->value_2); - s5k4ecgx_ctrl.settings.is_touchaf = 1; - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_reset_touchaf); - s5k4ecgx_ctrl.settings.is_touchaf = 0; - } - break; - case EXT_CAM_GET_AF_STATUS: - /*CDBG("EXT_CAM_GET_AF_STATUS: %d\n", cam_info->value_1);*/ - cam_info->value_1 = s5k4ecgx_get_af_status(s_ctrl, cam_info->value_1); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_FLASH_MODE: - /*CDBG("EXT_CAM_FLASH_MODE = %d\n", (cam_info->value_1));*/ - s5k4ecgx_ctrl.settings.flash_mode = (cam_info->value_1); - if((cam_info->value_1) == CAMERA_FLASH_TORCH) { - set_led_flash(MSM_CAMERA_LED_LOW); - } else { - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_SET_FLASH: - CDBG("EXT_CAM_SET_FLASH = %d\n", (cam_info->value_1)); - if( cam_info->value_1 && s5k4ecgx_get_flash_status() ){ - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_EXIF: - s5k4ecgx_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB = %d\n", (cam_info->value_1)); - s5k4ecgx_set_ae_awb(s_ctrl, cam_info->value_1); - break; - - case EXT_CAM_CONTRAST: - CDBG("EXT_CAM_CONTRAST isn't supported \n"); - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_LOAD_FILE -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[7], data_buf1[7]; - *(reg_buf + 6) = '\0'; - *(data_buf1 + 6) = '\0'; - printk("PHANI.....Inside Modified Tuning s5k4ecgx_regs_from_sd_tunning\n"); - if (settings != NULL){ - pr_err("s5k4ecgx_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(s5k4ecgx_regs_table == NULL) { - pr_err("s5k4ecgx_regs_table is null "); - return -1; - } - pr_err("@@@ %s \n",name); - start = strstr(s5k4ecgx_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf1, (reg + 9), 6); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error in reg_buf .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error in data_buf1 .Please Align contents of the Header file!!"); - if (reg) - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - pr_err("delay = %d\n", (int)value); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - pr_err("s5k4ecgx_regs_from_sd_tunning end!"); - return rc; -} -void s5k4ecgx_regs_table_exit(void) -{ - printk("%s %d", __func__, __LINE__); - if (s5k4ecgx_regs_table) { - vfree(s5k4ecgx_regs_table); - s5k4ecgx_regs_table = NULL; - } -} -void s5k4ecgx_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - filp_close(filp, current->files); - set_fs(fs); - pr_err("coming to if part of string compare s5k4ecgx_regs_table"); - s5k4ecgx_regs_table = dp; - s5k4ecgx_regs_table_size = lsize; - *((s5k4ecgx_regs_table + s5k4ecgx_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sp1628.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sp1628.c deleted file mode 100644 index 6cd06582fb36..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sp1628.c +++ /dev/null @@ -1,992 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -#define CONFIG_MSMB_CAMERA_DEBUG - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define SP1628_SENSOR_NAME "sp1628" -DEFINE_MSM_MUTEX(sp1628_mut); - -static struct msm_sensor_ctrl_t sp1628_s_ctrl; - -static struct msm_sensor_power_setting sp1628_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 5, - }, -}; - -static struct msm_camera_i2c_reg_conf sp1628_start_settings[] = { - {0x92, 0x81}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_stop_settings[] = { - {0x92, 0x01}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_recommend_settings[] = { - {0xfd, 0x00,}, - {0x91, 0x00,}, - {0x92, 0x81,}, - {0x98, 0x2a,}, - {0x96, 0xd0,}, /* c0*/ - {0x97, 0x02,}, /* 03*/ - {0x2f, 0x20,}, /* 24M*3=72M*/ - {0x0b, 0x48,}, /* analog*/ - {0x30, 0x80,}, /* 00*/ - {0x0c, 0x66,}, /* analog*/ - {0x0d, 0x12,}, - {0x13, 0x0f,}, /* 10*/ - {0x14, 0x00,}, - {0x12, 0x00,}, - {0x6b, 0x10,}, /* 11*/ - {0x6c, 0x00,}, - {0x6d, 0x00,}, - {0x6e, 0x00,}, - {0x6f, 0x10,}, /* 11*/ - {0x73, 0x11,}, /* 12*/ - {0x7a, 0x10,}, /* 11*/ - {0x15, 0x17,}, /* 18*/ - {0x71, 0x18,}, /* 19*/ - {0x76, 0x18,}, /* 19*/ - {0x29, 0x08,}, - {0x18, 0x01,}, - {0x19, 0x10,}, - {0x1a, 0xc3,}, /* c1*/ - {0x1b, 0x6f,}, - {0x1d, 0x11,}, /* 01*/ - {0x1e, 0x00,}, /* 1e*/ - {0x1f, 0x80,}, - {0x20, 0x7f,}, - {0x22, 0x3c,}, /* 1b*/ - {0x25, 0xff,}, - {0x2b, 0x88,}, - {0x2c, 0x85,}, - {0x2d, 0x00,}, - {0x2e, 0x80,}, - {0x27, 0x38,}, - {0x28, 0x03,}, - {0x70, 0x1a,}, - {0x72, 0x18,}, /* 1a*/ - {0x74, 0x18,}, - {0x75, 0x18,}, - {0x77, 0x16,}, /* 18*/ - {0x7f, 0x19,}, - {0x31, 0x11,}, /* 720P, no mirror/flip */ - {0xfd, 0x01,}, - {0x5d, 0x11,}, /* position*/ - {0x5f, 0x00,}, - {0x36, 0x08,}, - {0x2f, 0xff,}, - {0xfb, 0x25,}, /* blacklevl*/ - {0x48, 0x00,}, /* dp*/ - {0x49, 0x99,}, - {0xf2, 0x0A,}, - {0xfd, 0x02,}, /* AE*/ - {0x52, 0x34,}, - {0x53, 0x02,}, - {0x54, 0x0c,}, - {0x55, 0x08,}, - {0x86, 0x0c,}, - {0x87, 0x10,}, - {0x8b, 0x10,}, - - /* 12-30 50Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x05,}, - {0x04, 0x64,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x02,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xe6,}, - {0xf8, 0xc1,}, - {0x02, 0x08,}, - {0x03, 0x01,}, - {0x06, 0xe6,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x30,}, - {0xbf, 0x07,}, - {0xd0, 0x30,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x30,}, - {0xfd, 0x00,}, - - /* 12-30 60Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x04,}, - {0x04, 0x80,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x01,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xc0,}, - {0xf8, 0xc1,}, - {0x02, 0x0a,}, - {0x03, 0x01,}, - {0x06, 0xc0,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x80,}, - {0xbf, 0x07,}, - {0xd0, 0x80,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x80,}, - {0xfd, 0x00,}, - - {0xfd, 0x01,}, /* fix status*/ - {0x5a, 0x38,}, /* DP_gain*/ - {0xfd, 0x02,}, - {0xba, 0x30,}, /* mean_dummy_low*/ - {0xbb, 0x50,}, /* mean_low_dummy*/ - {0xbc, 0xc0,}, /* rpc_heq_low*/ - {0xbd, 0xa0,}, /* rpc_heq_dummy*/ - {0xb8, 0x80,}, /* mean_nr_dummy*/ - {0xb9, 0x90,}, /* mean_dummy_nr*/ - {0xfd, 0x01,}, /* rpc*/ - {0xe0, 0x54,}, - {0xe1, 0x40,}, - {0xe2, 0x38,}, - {0xe3, 0x34,}, - {0xe4, 0x34,}, - {0xe5, 0x30,}, - {0xe6, 0x30,}, - {0xe7, 0x2e,}, - {0xe8, 0x2e,}, - {0xe9, 0x2e,}, - {0xea, 0x2c,}, - {0xf3, 0x2c,}, - {0xf4, 0x2c,}, - {0xfd, 0x01,}, /* min gain*/ - {0x04, 0xc0,}, /* rpc_max_indr*/ - {0x05, 0x2c,}, /* rpc_min_indr*/ - {0x0a, 0xc0,}, /* rpc_max_outdr*/ - {0x0b, 0x2c,}, /* rpc_min_outdr*/ - {0xfd, 0x01,}, /* ae target*/ - {0xeb, 0x78,}, - {0xec, 0x78,}, - {0xed, 0x05,}, - {0xee, 0x0a,}, - {0xfd, 0x01,}, /* lsc*/ - {0x26, 0x30,}, - {0x27, 0xdc,}, - {0x28, 0x05,}, - {0x29, 0x08,}, - {0x2a, 0x00,}, - {0x2b, 0x03,}, - {0x2c, 0x00,}, - {0x2d, 0x2f,}, - {0xfd, 0x01,}, /* RGainf*/ - {0xa1, 0x37,}, /* left*/ - {0xa2, 0x26,}, /* right*/ - {0xa3, 0x32,}, /* up*/ - {0xa4, 0x2b,}, /* down*/ - {0xad, 0x0f,}, /* lu*/ - {0xae, 0x0a,}, /* ru*/ - {0xaf, 0x0a,}, /* ld*/ - {0xb0, 0x0a,}, /* rd*/ - {0x18, 0x2f,}, /* left*/ - {0x19, 0x30,}, /* right*/ - {0x1a, 0x32,}, /* up*/ - {0x1b, 0x30,}, /* down*/ - {0xbf, 0xa5,}, /* lu*/ - {0xc0, 0x12,}, /* ru*/ - {0xc1, 0x08,}, /* ld*/ - {0xfa, 0x00,}, /* rd*/ - {0xa5, 0x35,}, /* GGain*/ - {0xa6, 0x24,}, - {0xa7, 0x2e,}, - {0xa8, 0x25,}, - {0xb1, 0x00,}, - {0xb2, 0x04,}, - {0xb3, 0x00,}, - {0xb4, 0x00,}, - {0x1c, 0x24,}, - {0x1d, 0x23,}, - {0x1e, 0x2c,}, - {0xb9, 0x25,}, - {0x21, 0xa0,}, - {0x22, 0x13,}, - {0x23, 0x1c,}, - {0x24, 0x0d,}, - {0xa9, 0x2f,}, /* BGain*/ - {0xaa, 0x24,}, - {0xab, 0x2d,}, - {0xac, 0x24,}, - {0xb5, 0x00,}, - {0xb6, 0x00,}, - {0xb7, 0x00,}, - {0xb8, 0x00,}, - {0xba, 0x22,}, - {0xbc, 0x24,}, - {0xbd, 0x31,}, - {0xbe, 0x24,}, - {0x25, 0xa0,}, - {0x45, 0x08,}, - {0x46, 0x12,}, - {0x47, 0x09,}, - {0xfd, 0x01,}, /* awb*/ - {0x32, 0x15,}, - {0xfd, 0x02,}, - {0x26, 0xc9,}, - {0x27, 0x8b,}, - {0x1b, 0x80,}, - {0x1a, 0x80,}, - {0x18, 0x27,}, - {0x19, 0x26,}, - {0x2a, 0x01,}, - {0x2b, 0x10,}, - {0x28, 0xf8,}, - {0x29, 0x08,}, - - /* d65*/ - {0x66, 0x35,}, - {0x67, 0x60,}, - {0x68, 0xb0,}, - {0x69, 0xe0,}, - {0x6a, 0xa5,}, - - /* indoor*/ - {0x7c, 0x38,}, - {0x7d, 0x58,}, - {0x7e, 0xdb,}, - {0x7f, 0x13,}, - {0x80, 0xa6,}, - - /* cwftl84*/ - {0x70, 0x18,}, /* 2f*/ - {0x71, 0x4a,}, - {0x72, 0x08,}, - {0x73, 0x32,}, /* 24*/ - {0x74, 0xaa,}, - - /* tl84--F*/ - {0x6b, 0x02,}, /* 18*/ - {0x6c, 0x2a,}, /* 34*/ - {0x6d, 0x1e,}, /* 17*/ - {0x6e, 0x49,}, /* 32*/ - {0x6f, 0xaa,}, - - /* f--H*/ - {0x61, 0xea,}, /* 02*/ - {0x62, 0xf8,}, /* 2a*/ - {0x63, 0x4f,}, /* 1e*/ - {0x64, 0x5f,}, /* 49*/ - {0x65, 0x5a,}, /* aa*/ - - {0x75, 0x80,}, - {0x76, 0x09,}, - {0x77, 0x02,}, - {0x24, 0x25,}, - {0x0e, 0x16,}, - {0x3b, 0x09,}, - {0xfd, 0x02,}, /* sharp*/ - {0xde, 0x0f,}, - {0xd2, 0x0c,}, /* control black-white edge; 0 - bolder, f - thinner*/ - {0xd3, 0x0a,}, - {0xd4, 0x08,}, - {0xd5, 0x08,}, - {0xd7, 0x10,}, /* outline judgement*/ - {0xd8, 0x1d,}, - {0xd9, 0x32,}, - {0xda, 0x48,}, - {0xdb, 0x08,}, - {0xe8, 0x38,}, /* outline strength*/ - {0xe9, 0x38,}, - {0xea, 0x38,}, /* 30*/ - {0xeb, 0x38,}, /* 2*/ - {0xec, 0x60,}, - {0xed, 0x40,}, - {0xee, 0x38,}, /* 30*/ - {0xef, 0x38,}, /* 20*/ - {0xf3, 0x00,}, /* sharpness level of flat area*/ - {0xf4, 0x00,}, - {0xf5, 0x00,}, - {0xf6, 0x00,}, - {0xfd, 0x02,}, /* skin sharpen*/ - {0xdc, 0x04,}, /* skin de-sharpen*/ - {0x05, 0x6f,}, - {0x09, 0x10,}, - {0xfd, 0x01,}, /* dns*/ - {0x64, 0x22,}, /* 0 - max, 8 - min*/ - {0x65, 0x22,}, - {0x86, 0x20,}, /* threshold, 0 - min*/ - {0x87, 0x20,}, - {0x88, 0x20,}, - {0x89, 0x20,}, - {0x6d, 0x0f,}, - {0x6e, 0x0f,}, - {0x6f, 0x10,}, - {0x70, 0x10,}, - {0x71, 0x0d,}, - {0x72, 0x23,}, - {0x73, 0x23,}, /* 28*/ - {0x74, 0x23,}, /* 2a*/ - {0x75, 0x46,}, /* [7:4] strength of flat area, - [3:0]strength of un-flat area; - 0-max, 8-min*/ - {0x76, 0x36,}, - {0x77, 0x36,}, /* 25*/ - {0x78, 0x36,}, /* 12*/ - {0x81, 0x1d,}, /* 2x*/ - {0x82, 0x2b,}, /* 4x*/ - {0x83, 0x2b,}, /* 50; 8x*/ - {0x84, 0x2b,}, /* 80; 16x*/ - {0x85, 0x0a,}, /* 12/8reg0x81*/ - {0xfd, 0x01,}, /* gamma*/ - {0x8b, 0x00,}, /* 00; 00; 00;*/ - {0x8c, 0x0d,}, /* 02; 0b; 0b;*/ - {0x8d, 0x1f,}, /* 0a; 19; 17;*/ - {0x8e, 0x2d,}, /* 13; 2a; 27;*/ - {0x8f, 0x3a,}, /* 1d; 37; 35;*/ - {0x90, 0x4b,}, /* 30; 4b; 51;*/ - {0x91, 0x59,}, /* 40; 5e; 64;*/ - {0x92, 0x64,}, /* 4e; 6c; 74;*/ - {0x93, 0x70,}, /* 5a; 78; 80;*/ - {0x94, 0x83,}, /* 71; 92; 92;*/ - {0x95, 0x92,}, /* 85; a6; a2;*/ - {0x96, 0xa1,}, /* 96; b5; af;*/ - {0x97, 0xae,}, /* a6; bf; bb;*/ - {0x98, 0xba,}, /* b3; ca; c6;*/ - {0x99, 0xc4,}, /* c0; d2; d0;*/ - {0x9a, 0xcf,}, /* cb; d9; d9;*/ - {0x9b, 0xdb,}, /* d5; e1; e0;*/ - {0x9c, 0xe5,}, /* df; e8; e8;*/ - {0x9d, 0xec,}, /* e9; ee; ee;*/ - {0x9e, 0xf3,}, /* f2; f4; f4;*/ - {0x9f, 0xfa,}, /* fa; fa; fa;*/ - {0xa0, 0xff,}, /* ff; ff; ff;*/ - {0xfd, 0x02,}, /* CCM*/ - {0x15, 0xc8,}, /* b>th ab*/ - {0x16, 0x95,}, /* rdev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init sp1628_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&sp1628_platform_driver, - sp1628_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&sp1628_i2c_driver); -} - -static void __exit sp1628_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sp1628_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&sp1628_s_ctrl); - platform_driver_unregister(&sp1628_platform_driver); - } else - i2c_del_driver(&sp1628_i2c_driver); - return; -} - -int32_t sp1628_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* Write Recommend settings */ - pr_err("%s, sensor write init setting!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_recommend_settings, - ARRAY_SIZE(sp1628_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_RESOLUTION: - break; - case CFG_SET_STOP_STREAM: - pr_err("%s, sensor stop stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_stop_settings, - ARRAY_SIZE(sp1628_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - pr_err("%s, sensor start stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_start_settings, - ARRAY_SIZE(sp1628_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *)sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - - break; - } - case CFG_SET_CONTRAST: { - - break; - } - case CFG_SET_SHARPNESS: { - - break; - } - case CFG_SET_ISO: { - - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - - break; - } - case CFG_SET_EFFECT: { - - break; - } - case CFG_SET_ANTIBANDING: { - - break; - } - case CFG_SET_BESTSHOT_MODE: { - - break; - } - case CFG_SET_WHITE_BALANCE: { - - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int32_t sp1628_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - CDBG("%s, E. calling i2c_read:, i2c_addr:%d, id_reg_addr:%d", - __func__, - s_ctrl->sensordata->slave_info->sensor_slave_addr, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr); - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0x02, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x16:\n", __func__, chipid); - if (chipid != 0x16) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0xa0, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x28:\n", __func__, chipid); - if (chipid != 0x28) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - return rc; -} - - -static struct msm_sensor_fn_t sp1628_sensor_func_tbl = { - .sensor_config = sp1628_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sp1628_match_id, -}; - -static struct msm_sensor_ctrl_t sp1628_s_ctrl = { - .sensor_i2c_client = &sp1628_sensor_i2c_client, - .power_setting_array.power_setting = sp1628_power_setting, - .power_setting_array.size = ARRAY_SIZE(sp1628_power_setting), - .msm_sensor_mutex = &sp1628_mut, - .sensor_v4l2_subdev_info = sp1628_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(sp1628_subdev_info), - .func_tbl = &sp1628_sensor_func_tbl, -}; - -module_init(sp1628_init_module); -module_exit(sp1628_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50.h deleted file mode 100755 index a41f14a4ee02..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __SR030PC50_H__ -#define __SR030PC50_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef DEBUG_LEVEL_HIGH -#undef CDBG - -#define DEBUG_LEVEL_HIGH -#ifdef DEBUG_LEVEL_HIGH -#define CDBG(fmt, args...) printk("[SR030PC50] %s : %d : " fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr030pc50_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr030pc50_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int sr030pc50_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); -#endif //__SR030PC50_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_regs.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_regs.h deleted file mode 100755 index dd6e5ff09fbb..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_regs.h +++ /dev/null @@ -1,1097 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __SR030PC50_REGS_H__ -#define __SR030PC50_REGS_H__ - -static struct msm_camera_i2c_reg_conf sr030pc50_init_regs[]= { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x01, 0x73,}, -{0x01, 0x71,}, - - -// PLL Setting -{0x03, 0x00,}, - -{0x08, 0x0f,}, //Parallel NO Output_PAD Out -{0x10, 0x00,}, -{0x11, 0x90,}, -{0x12, 0x00,}, -{0x14, 0x88,}, - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0xc0, 0x95,}, -{0xc1, 0x18,}, -{0xc2, 0x91,}, -{0xc3, 0x00,}, -{0xc4, 0x01,}, - -{0x03, 0x20,}, //page 20 -{0x10, 0x1c,}, //ae off -{0x03, 0x22,}, //page 22 -{0x10, 0x7b,}, //awb off - -{0x03, 0x00,}, -{0x12, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, - -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 154 -{0x43, 0x9a,}, - -//BLC -{0x80, 0x2e,}, //don't touch -{0x81, 0x7e,}, //don't touch -{0x82, 0x90,}, //don't touch -{0x83, 0x30,}, //don't touch -{0x84, 0x2c,}, //don't touch -{0x85, 0x4b,}, //don't touch -{0x86, 0x01,}, //don't touch -{0x88, 0x47,}, //don't touch -//0x89 48,//BLC hold - -{0x90, 0x0c,}, //BLC_TIME_TH_ON -{0x91, 0x0c,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x98, 0x38,}, //don't touch -{0x99, 0x40,}, //Out BLC -{0xa0, 0x02,}, //Dark BLC -{0xa8, 0x42,}, //Normal BLC 44 - -//Page 2 Last Update 12_01_20 -{0x03, 0x02,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x13, 0x40,}, -{0x14, 0x04,}, -{0x18, 0x1c,}, -{0x19, 0x00,}, //01 -{0x1a, 0x00,}, -{0x1b, 0x08,}, -{0x1c, 0x9c,}, -{0x1d, 0x03,}, -{0x20, 0x33,}, -{0x21, 0x77,}, -{0x22, 0xa7,}, -{0x23, 0x32,}, -{0x24, 0x33,}, -{0x2b, 0x40,}, -{0x2d, 0x32,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x3c,}, -{0x35, 0x0d,}, -{0x3b, 0x60,}, //80 - -//timi ng control 1 // //don't touch -{0x50, 0x21,}, -{0x51, 0x1c,}, -{0x52, 0xaa,}, -{0x53, 0x5a,}, -{0x54, 0x30,}, -{0x55, 0x10,}, -{0x56, 0x0c,}, -{0x58, 0x00,}, -{0x59, 0x0f,}, - -//timi ng control 2 // //don't touch -{0x60, 0x34,}, -{0x61, 0x3a,}, -{0x62, 0x34,}, -{0x63, 0x39,}, -{0x64, 0x34,}, -{0x65, 0x39,}, -{0x72, 0x35,}, -{0x73, 0x38,}, -{0x74, 0x35,}, -{0x75, 0x38,}, -{0x80, 0x02,}, -{0x81, 0x2e,}, -{0x82, 0x0d,}, -{0x83, 0x10,}, -{0x84, 0x0d,}, -{0x85, 0x10,}, -{0x92, 0x1d,}, -{0x93, 0x20,}, -{0x94, 0x1d,}, -{0x95, 0x20,}, -{0xa0, 0x03,}, -{0xa1, 0x2d,}, -{0xa4, 0x2d,}, -{0xa5, 0x03,}, -{0xa8, 0x12,}, -{0xa9, 0x1b,}, -{0xaa, 0x22,}, -{0xab, 0x2b,}, -{0xac, 0x10,}, -{0xad, 0x0e,}, -{0xb8, 0x33,}, -{0xb9, 0x35,}, -{0xbc, 0x0c,}, -{0xbd, 0x0e,}, -{0xc0, 0x3a,}, -{0xc1, 0x3f,}, -{0xc2, 0x3a,}, -{0xc3, 0x3f,}, -{0xc4, 0x3a,}, -{0xc5, 0x3e,}, -{0xc6, 0x3a,}, -{0xc7, 0x3e,}, -{0xc8, 0x3a,}, -{0xc9, 0x3e,}, -{0xca, 0x3a,}, -{0xcb, 0x3e,}, -{0xcc, 0x3b,}, -{0xcd, 0x3d,}, -{0xce, 0x3b,}, -{0xcf, 0x3d,}, -{0xd0, 0x33,}, -{0xd1, 0x3f,}, - -//Page 10 -{0x03, 0x10,}, -{0x10, 0x01,}, //03, //ISPCTL1, YUV ORDER(FIX) -{0x11, 0x43,}, -{0x12, 0x30,}, //Y offet, dy offseet enable -{0x40, 0x80,}, -{0x41, 0x00,}, //00 DYOFS 00->10 _100318 -{0x48, 0x88,}, //Contrast 88->84 _100318 -{0x50, 0x48,}, //AGBRT - -{0x60, 0x01,}, //7f //7c -{0x61, 0x00,}, //Use default -{0x62, 0x7c,}, //80 SATB_B (1.4x) -{0x63, 0x80,}, //80 SATR_R (1.2x) -{0x64, 0x48,}, //AGSAT -{0x66, 0x90,}, //wht_th2 -{0x67, 0x36,}, //wht_gain Dark (0.4x), Normal (0.75x) - -{0x80, 0x00,}, - -//Page 11 -//LPF -{0x03, 0x11,}, -{0x10, 0x25,}, -{0x11, 0x07,}, -{0x20, 0x00,}, -{0x21, 0x60,}, -{0x23, 0x0a,}, -{0x60, 0x12,}, -{0x61, 0x85,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, - -{0x67, 0x70,}, -{0x68, 0x24,}, -{0x69, 0x04,}, - -//Page 12 -//2D -{0x03, 0x12,}, -{0x40, 0xd3,}, -{0x41, 0x09,}, -{0x50, 0x16,}, -{0x51, 0x24,}, -{0x70, 0x1f,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x12,}, -{0x75, 0x12,}, -{0x76, 0x20,}, -{0x77, 0x80,}, -{0x78, 0x88,}, -{0x79, 0x18,}, - -////// ///////////////// -{0x90, 0x3d,}, -{0x91, 0x34,}, -{0x99, 0x28,}, -{0x9c, 0x05,}, //14 For defect -{0x9d, 0x08,}, //15 For defect -{0x9e, 0x28,}, -{0x9f, 0x28,}, - -{0xb0, 0x7d,}, //75 White Defect -{0xb5, 0x44,}, -{0xb6, 0x82,}, -{0xb7, 0x52,}, -{0xb8, 0x44,}, -{0xb9, 0x15,}, -////// ///////////////// - -//Edge -{0x03, 0x13,}, -{0x10, 0x01,}, -{0x11, 0x89,}, -{0x12, 0x14,}, -{0x13, 0x19,}, -{0x14, 0x08,}, -{0x20, 0x03,}, -{0x21, 0x05,}, -{0x23, 0x25,}, -{0x24, 0x21,}, -{0x25, 0x08,}, -{0x26, 0x40,}, -{0x27, 0x00,}, -{0x28, 0x08,}, -{0x29, 0x50,}, -{0x2a, 0xe0,}, -{0x2b, 0x10,}, -{0x2c, 0x28,}, -{0x2d, 0x40,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x11,}, -{0x80, 0x05,}, -{0x81, 0x07,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x00,}, -{0x93, 0x30,}, -{0x94, 0x30,}, -{0x95, 0x10,}, - -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x22, 0x58,}, -{0x23, 0x45,}, -{0x24, 0x44,}, - -{0x27, 0x58,}, -{0x28, 0x80,}, -{0x29, 0x58,}, -{0x2a, 0x80,}, -{0x2b, 0x58,}, -{0x2c, 0x80,}, - -//15pa ge////////////////////////// -{0x03, 0x15,}, -{0x10, 0x03,}, - -{0x14, 0x52,}, -{0x16, 0x3a,}, -{0x17, 0x2f,}, - -//CMC -{0x30, 0xf1,}, -{0x31, 0x71,}, -{0x32, 0x00,}, -{0x33, 0x1f,}, -{0x34, 0xe1,}, -{0x35, 0x42,}, -{0x36, 0x01,}, -{0x37, 0x31,}, -{0x38, 0x72,}, -//CMC OFS -{0x40, 0x90,}, -{0x41, 0x82,}, -{0x42, 0x12,}, -{0x43, 0x86,}, -{0x44, 0x92,}, -{0x45, 0x18,}, -{0x46, 0x84,}, -{0x47, 0x02,}, -{0x48, 0x02,}, - -{0x03, 0x16,}, -{0x10, 0x01,}, -{0x30, 0x00,}, -{0x31, 0x06,}, -{0x32, 0x21,}, -{0x33, 0x36,}, -{0x34, 0x58,}, -{0x35, 0x75,}, -{0x36, 0x8e,}, -{0x37, 0xa3,}, -{0x38, 0xb4,}, -{0x39, 0xc3,}, -{0x3a, 0xcf,}, -{0x3b, 0xe2,}, -{0x3c, 0xf0,}, -{0x3d, 0xf9,}, -{0x3e, 0xff,}, - -//Page 17 AE -{0x03, 0x17,}, -{0xc4, 0x3c,}, -{0xc5, 0x32,}, - -//Page 20 AE -{0x03, 0x20,}, -{0x10, 0x1c,}, -{0x11, 0x04,}, - -{0x20, 0x01,}, -{0x28, 0x27,}, -{0x29, 0xa1,}, - -{0x2a, 0xf0,}, -{0x2b, 0xf4,}, -{0x2c, 0x2b,}, - -{0x30, 0xf8,}, - -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, //23->22 _10_04_06 hhzin -{0x3c, 0xde,}, - -{0x60, 0x70,}, -{0x61, 0x20,}, - -{0x62, 0x70,}, -{0x63, 0x20,}, - -{0x68, 0x28,}, -{0x69, 0x79,}, -{0x6a, 0x2c,}, -{0x6b, 0xc4,}, - -{0x70, 0x34,},//Y Targe 32 - -{0x76, 0x11,}, //Unlock bnd1 -{0x77, 0x72,}, //Unlock bnd2 02->a2 _10_04_06 hhzin - -{0x78, 0x12,}, //Yth 1 -{0x79, 0x26,}, //Yth 2 26->27 _10_04_06 hhzin -{0x7a, 0x23,}, //Yth 3 - -{0x7c, 0x17,}, //1c->1d _10_04_06 hhzin -{0x7d, 0x22,}, - -//50Hz -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x86, 0x00,}, //EXPMin 8125.00 fps -{0x87, 0xc8,}, - -//60Hz _8fps -{0x88, 0x03,}, //EXP Max 8.00 fps -{0x89, 0x17,}, -{0x8a, 0x04,}, - -//50Hz _8fps -{0xa0, 0x02,}, //EXP Max(100Hz) 8.33 fps -{0xa1, 0xf7,}, -{0xa2, 0x60,}, - -{0x8B, 0x3f,}, //EXP100 -{0x8C, 0x48,}, -{0x8D, 0x34,}, //EXP120 -{0x8E, 0xbc,}, - -{0x98, 0x8C,}, -{0x99, 0x23,}, - -{0x9c, 0x04,}, //EXP Limit 1354.17 fps -{0x9d, 0xb0,}, -{0x9e, 0x00,}, //EXP Unit -{0x9f, 0xc8,}, - -{0xb0, 0x1d,}, -{0xb1, 0x14,}, -{0xb2, 0x98,}, -{0xb3, 0x17,}, -{0xb4, 0x17,}, -{0xb5, 0x3e,}, -{0xb6, 0x2b,}, -{0xb7, 0x24,}, -{0xb8, 0x21,}, -{0xb9, 0x1f,}, -{0xba, 0x1e,}, -{0xbb, 0x1d,}, -{0xbc, 0x1c,}, -{0xbd, 0x1b,}, - -{0xc0, 0x1a,}, -{0xc3, 0x48,}, -{0xc4, 0x48,}, - -//Page 22 AWB -{0x03, 0x22,}, -{0x10, 0xe2,}, -{0x11, 0x2e,}, -{0x20, 0x41,}, -{0x21, 0x40,}, -{0x24, 0xfe,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x12,}, -{0x39, 0x33,}, -{0x40, 0xf3,}, -{0x41, 0x43,}, -{0x42, 0x33,}, -{0x43, 0xf3,}, -{0x44, 0x88,}, -{0x45, 0x66,}, -{0x46, 0x08,}, -{0x47, 0x63,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, - -{0x83, 0x5a,}, -{0x84, 0x24,}, -{0x85, 0x55,}, -{0x86, 0x24,}, - -{0x87, 0x44,}, -{0x88, 0x33,}, -{0x89, 0x3e,}, -{0x8a, 0x34,}, - -{0x8b, 0x03,}, -{0x8d, 0x22,}, -{0x8e, 0x21,}, - -{0x8f, 0x63,}, -{0x90, 0x62,}, -{0x91, 0x5e,}, -{0x92, 0x5a,}, -{0x93, 0x50,}, -{0x94, 0x42,}, -{0x95, 0x3b,}, -{0x96, 0x34,}, -{0x97, 0x2d,}, -{0x98, 0x2b,}, -{0x99, 0x29,}, -{0x9a, 0x27,}, -{0x9b, 0x0b,}, -{0xb4, 0xbf,}, - -////// /////////////////////// Page 48 -{0x03, 0x48,}, -{0x10, 0x05,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x16, 0xc4,}, -{0x17, 0x00,}, -{0x19, 0x00,}, -{0x1a, 0x06,}, -{0x1c, 0x02,}, -{0x1d, 0x04,}, -{0x1e, 0x07,}, -{0x1f, 0x04,}, -{0x20, 0x00,}, -{0x21, 0xb8,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x06,}, -{0x34, 0x01,}, -{0x35, 0x02,}, -{0x36, 0x01,}, -{0x37, 0x03,}, -{0x38, 0x00,}, -{0x39, 0x4a,}, -{0x3c, 0x00,}, -{0x3d, 0xfa,}, -{0x3f, 0x10,}, -{0x40, 0x00,}, -{0x41, 0x20,}, -{0x42, 0x00,}, - -{0x03, 0x22,}, -{0x10, 0xfb,}, - -{0x03, 0x20,}, -{0x10, 0x9c,}, - -{0x01, 0x70,}, -{0xff, 0x0f,}, //15ms -{0xff, 0x14,}, //200ms -}; -//========================================================== -// EFFECT(6) -//========================================================== -static struct msm_camera_i2c_reg_conf sr030pc50_effect_normal_regs[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x03, 0x13,}, -{0x10, 0x3b,}, -{0x20, 0x02,}, -}; -static struct msm_camera_i2c_reg_conf sr030pc50_effect_negative_regs[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x03, 0x13,}, -{0x10, 0x3b,}, -{0x20, 0x02,}, -}; -static struct msm_camera_i2c_reg_conf sr030pc50_effect_sepia_regs[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, -{0x03, 0x13,}, -{0x10, 0x3b,}, -{0x20, 0x02,}, -}; -static struct msm_camera_i2c_reg_conf sr030pc50_effect_mono_regs[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x13,}, -{0x10, 0x3b,}, -{0x20, 0x02,}, -}; - - -//========================================================== -// WB(5) -START -//========================================================== - - -static struct msm_camera_i2c_reg_conf sr030pc50_wb_auto_regs[] = { -{0x03, 0x22,}, -{0x10, 0xe2,}, -{0x11, 0x2e,}, -{0x80, 0x3d,}, //3a //3c -{0x81, 0x20,}, -{0x82, 0x40,}, -{0x83, 0x5a,}, //RMAX -{0x84, 0x20,}, //(0216_kjh20>>23) RMIN -{0x85, 0x56,}, //(0216_kjh5c>>5a) BMAX //51 -{0x86, 0x24,}, //BMIN //20 -{0x10, 0xfb,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_wb_daylight_regs[] = { -{0x03, 0x22,}, //MWB Sunny -{0x10, 0x7b,}, -{0x11, 0x26,}, -{0x80, 0x3f,}, //52 R Gain -{0x81, 0x20,}, //G Gain -{0x82, 0x30,}, //B Gain -{0x83, 0x3a,}, //R Max //41 -{0x84, 0x3a,}, //R Min -{0x85, 0x38,}, //B Max -{0x86, 0x2a,}, //B Min //2f -{0x10, 0xfb,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_wb_cloudy_regs[] = { -{0x03, 0x22,}, //MWB Cloudy -{0x10, 0x7b,}, -{0x11, 0x26,}, -{0x80, 0x4f,}, //R Gain -{0x81, 0x20,}, //G Gain -{0x82, 0x25,}, //B Gain -{0x83, 0x53,}, //R Max -{0x84, 0x48,}, //R Min -{0x85, 0x35,}, //B Max -{0x86, 0x2b,}, //B Min -{0x10, 0xfb,}, -}; -static struct msm_camera_i2c_reg_conf sr030pc50_wb_incandescent_regs[] = { -{0x03, 0x22,}, -{0x10, 0x7b,}, -{0x11, 0x26,}, -{0x80, 0x20,}, -{0x81, 0x20,}, -{0x82, 0x57,}, -{0x83, 0x21,}, -{0x84, 0x1d,}, -{0x85, 0x59,}, -{0x86, 0x56,}, -{0x10, 0xfb,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_wb_fluorescent_regs[] = { -{0x03, 0x22,}, -{0x10, 0x7b,}, -{0x11, 0x26,}, -{0x80, 0x42,}, -{0x81, 0x20,}, -{0x82, 0x51,}, -{0x83, 0x4a,}, -{0x84, 0x3a,}, -{0x85, 0x55,}, -{0x86, 0x45,}, -{0x10, 0xfb,}, -}; - -//========================================================== -// WB(5) --END -//========================================================== - - -//========================================================== -// BRIGHTNES(9) - START -//========================================================== - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_minus_4_regs[] = { -{0x03, 0x10,}, -{0x40, 0xD0,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_minus_3_regs[] = { -{0x03, 0x10,}, -{0x40, 0xB0,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_minus_2_regs[] = { -{0x03, 0x10,}, -{0x40, 0xA0,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_minus_1_regs[] = { -{0x03, 0x10,}, -{0x40, 0x90,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_default_regs[] = { - {0x03, 0x10,}, - {0x40, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_plus_1_regs[] = { -{0x03, 0x10,}, -{0x40, 0x10,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_plus_2_regs[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_plus_3_regs[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_ev_plus_4_regs[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; -// ========================================================== -// BRIGHTNES(9) - END -//========================================================== - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_auto_normal_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, //sleep - -{0x03, 0x00,}, -{0x11, 0x90,}, //fixed fps disable -{0x42, 0x00,}, //Vblank 154 -{0x43, 0x9a,}, - -{0x90, 0x0c,}, //BLC_TIME_TH_ON -{0x91, 0x0c,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, -{0x10, 0x1c,}, //ae off -{0x2a, 0xf0,}, //antibanding -{0x2b, 0xf4,}, -{0x30, 0xf8,}, - -{0x88, 0x03,}, //EXP Max(120Hz) 8.00 fps -{0x89, 0x17,}, -{0x8a, 0x04,}, - -{0xa0, 0x02,}, //EXP Max(100Hz) 8.33 fps -{0xa1, 0xf7,}, -{0xa2, 0x60,}, - -{0xb2, 0x98,}, - -{0x03, 0x20,}, -{0x10, 0x9c,}, //ae on - -{0x03, 0x00,}, -{0x01, 0x70,}, - -{0xff, 0x28,}, //delay 400ms -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_auto_dark_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, //sleep - -{0x03, 0x00,}, -{0x11, 0x90,}, //fixed fps disable -{0x42, 0x00,}, //Vblank 154 -{0x43, 0x9a,}, - -{0x90, 0x0c,}, //BLC_TIME_TH_ON -{0x91, 0x0c,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, -{0x10, 0x1c,}, //ae off -{0x2a, 0xf0,}, //antibanding -{0x2b, 0xf4,}, -{0x30, 0xf8,}, - -{0x83, 0x02,}, //exp normal 8.33fps -{0x84, 0xf7,}, -{0x85, 0x60,}, - -{0x88, 0x03,}, //EXP Max(120Hz) 8.00 fps -{0x89, 0x17,}, -{0x8a, 0x04,}, - -{0xa0, 0x02,}, //EXP Max(100Hz) 8.33 fps -{0xa1, 0xf7,}, -{0xa2, 0x60,}, - -{0xb2, 0x98,}, - -{0x03, 0x20,}, -{0x10, 0x9c,}, //ae on - -{0x03, 0x00,}, -{0x01, 0x70,}, - -{0xff, 0x50,}, //delay 800ms -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_5_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x14,}, //BLC_TIME_TH_ON -{0x91, 0x14,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x03,}, //EXP Max(120Hz) 6.32 fps -{0x89, 0xf4,}, -{0x8a, 0x80,}, - -{0xa0, 0x03,}, //EXP Max(100Hz) 6.25 fps -{0xa1, 0xf4,}, -{0xa2, 0x80,}, - -{0x91, 0x04,}, //EXP Fix 5.00 fps -{0x92, 0xf5,}, -{0x93, 0x88,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_7_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x0e,}, //BLC_TIME_TH_ON -{0x91, 0x0e,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x03,}, //EXP Max(120Hz) 7.50 fps -{0x89, 0x75,}, -{0x8a, 0xf0,}, - -{0xa0, 0x03,}, //EXP Max(100Hz) 7.14 fps -{0xa1, 0x75,}, -{0xa2, 0xf0,}, - - -{0x91, 0x03,}, //EXP Fix 7.00 fps -{0x92, 0x8a,}, -{0x93, 0xa4,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_10_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x0a,}, //BLC_TIME_TH_ON -{0x91, 0x0a,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x02,}, //EXP Max(120Hz) 12.00 fps -{0x89, 0x39,}, -{0x8a, 0x88,}, - -{0xa0, 0x02,}, //EXP Max(100Hz) 11.11 fps -{0xa1, 0x39,}, -{0xa2, 0x88,}, - -{0x91, 0x02,}, //EXP Fix 10.00 fps -{0x92, 0x7a,}, -{0x93, 0xc4,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_15_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x06,}, //BLC_TIME_TH_ON -{0x91, 0x06,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x01,}, //EXP Max(120Hz) 17.14 fps -{0x89, 0x7b,}, -{0x8a, 0xb0,}, - -{0xa0, 0x01,}, //EXP Max(100Hz) 16.67 fps -{0xa1, 0x7b,}, -{0xa2, 0xb0,}, - -{0x91, 0x01,}, //EXP Fix 15.00 fps -{0x92, 0xa7,}, -{0x93, 0x0c,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -{0xff, 0x28,}, //delay 400ms -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_20_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x05,}, //BLC_TIME_TH_ON -{0x91, 0x05,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x00,}, //EXP Max(120Hz) 30.00 fps -{0x89, 0xfd,}, -{0x8a, 0x20,}, - -{0xa0, 0x00,}, //EXP Max(100Hz) 25.00 fps -{0xa1, 0xfd,}, -{0xa2, 0x20,}, - -{0x91, 0x01,}, //EXP Fix 20.00 fps -{0x92, 0x3d,}, -{0x93, 0x30,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -{0xff, 0x28,}, //delay 400ms -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_25_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x04,}, //BLC_TIME_TH_ON -{0x91, 0x04,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x00,}, //EXP Max(120Hz) 40.00 fps -{0x89, 0xbd,}, -{0x8a, 0xd8,}, - -{0xa0, 0x00,}, //EXP Max(100Hz) 33.33 fps -{0xa1, 0xbd,}, -{0xa2, 0xd8,}, - - -{0x91, 0x00,}, //EXP Fix 25.00 fps -{0x92, 0xfd,}, -{0x93, 0xe8,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -{0xff, 0x28,}, //delay 400ms -}; - -static struct msm_camera_i2c_reg_conf sr030pc50_fps_30_regs[] = { -{0x03, 0x00,}, -{0x01, 0x71,}, -{0x11, 0x90,}, -{0x40, 0x00,}, //Hblank 144 -{0x41, 0x90,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, - -{0x90, 0x04,}, //BLC_TIME_TH_ON -{0x91, 0x04,}, //BLC_TIME_TH_OFF -{0x92, 0x90,}, //BLC_AG_TH_ON -{0x93, 0x88,}, //BLC_AG_TH_OFF - -{0x03, 0x20,}, //Page 20 -{0x10, 0x1c,}, - -{0x2a, 0x90,}, -{0x2b, 0xf5,}, -{0x30, 0xf8,}, - -{0x83, 0x00,}, //EXP Normal 33.33 fps -{0x84, 0xbd,}, -{0x85, 0xd8,}, - -{0x88, 0x00,}, //EXP Max(120Hz) 40.00 fps -{0x89, 0xbd,}, -{0x8a, 0xd8,}, - -{0xa0, 0x00,}, //EXP Max(100Hz) 33.33 fps -{0xa1, 0xbd,}, -{0xa2, 0xd8,}, - -{0x91, 0x00,}, //EXP Fix 30.04 fps -{0x92, 0xd3,}, -{0x93, 0x54,}, - -{0x10, 0x9c,}, -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x01, 0x70,}, -{0xff, 0x28,}, //delay 400ms -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_yuv.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_yuv.c deleted file mode 100755 index e54d9e9b0099..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr030pc50_yuv.c +++ /dev/null @@ -1,834 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "sr030pc50.h" -#include "sr030pc50_regs.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#endif -#ifdef CONFIG_LOAD_FILE -#define SR030PC50_WRT_LIST(A) \ - sr030pc50_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR030PC50_WRT_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); \ - CDBG("REGSEQ *** %s", #A) -#endif -#define SR030PC50_WRITE_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_BYTE_DATA) - -#define SR030PC50_READ_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_BYTE_DATA) - -static struct yuv_ctrl sr030pc50_ctrl; -//static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr030pc50_regs_table; -static int sr030pc50_regs_table_size; -int sr030pc50_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr030pc50_regs_table_init(char *filename); -void sr030pc50_regs_table_exit(void); -#endif - -// maximum number of chipid and slaveid pairs -// please change accordingly when you add more pairs -#define MAX_NUM_PAIRS 1 - -// Set of chipid and slaveid pairs not including the latest. -// Order: Latest but one to the oldest -// The latest values will be in the sensor lib file -// index 0 - chipid -// index 1 - slaveid -static uint16_t ids[MAX_NUM_PAIRS][2] = {{0xC1,0x40},}; -int sr030pc50_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t i; - uint16_t chipid = 0; - const char *sensor_name = NULL; - struct msm_camera_slave_info *slave_info = NULL; - struct msm_camera_i2c_client *sensor_i2c_client = NULL; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n",__func__, __LINE__, - sensor_i2c_client, slave_info,sensor_name); - return -EINVAL; - } - - printk("%s:%d sensor[%s] sid = 0x%X sensorid = 0x%X DATA TYPE = %d\n E", - __func__, __LINE__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - msleep(50); - sensor_i2c_client->i2c_func_tbl->i2c_read(sensor_i2c_client, - slave_info->sensor_id_reg_addr, - &chipid, data_type); - printk("%s chipid read[%x] expected[%x]\n", __func__, chipid, slave_info->sensor_id); - - if(chipid!=slave_info->sensor_id){ - pr_err("[SR030PC50] %s: chipid read=%x did not match with chipid=%x", - __func__, chipid, slave_info->sensor_id); - - for( i=0; icci_client->sid = ids[i][1] >> 1; - sensor_i2c_client->i2c_func_tbl->i2c_read(sensor_i2c_client, - slave_info->sensor_id_reg_addr, - &chipid, data_type); - if(chipid == ids[i][0]){ - break; - } - pr_err("%s: chipid read=%x did not match with chipid=%x", - __func__, chipid, ids[i][0]); - } - } - - CDBG("%s sensor_name =%s slaveid = 0x%X sensorid = 0x%X DATA TYPE = %d\n", - __func__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - return 0; -} - - -int32_t sr030pc50_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_minus_4_regs); - break; - - case CAMERA_EV_M3: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_minus_3_regs); - break; - - case CAMERA_EV_M2: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_minus_2_regs); - break; - - case CAMERA_EV_M1: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_minus_1_regs); - break; - - case CAMERA_EV_DEFAULT: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_default_regs); - break; - - case CAMERA_EV_P1: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_plus_1_regs); - break; - - case CAMERA_EV_P2: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_plus_2_regs); - break; - - case CAMERA_EV_P3: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_plus_3_regs); - break; - - case CAMERA_EV_P4: - rc = SR030PC50_WRT_LIST(sr030pc50_ev_plus_4_regs); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} -int32_t sr030pc50_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR030PC50_WRT_LIST(sr030pc50_wb_auto_regs); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR030PC50_WRT_LIST(sr030pc50_wb_incandescent_regs); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR030PC50_WRT_LIST(sr030pc50_wb_fluorescent_regs); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR030PC50_WRT_LIST(sr030pc50_wb_daylight_regs); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR030PC50_WRT_LIST(sr030pc50_wb_cloudy_regs); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - return rc; -} -/* -int32_t sr030pc50_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl) -{ - - if (sr030pc50_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr030pc50_ctrl.vtcall_mode == 1) { - SR030PC50_WRT_LIST(sr030pc50_Preview); - CDBG("VT Init Settings"); - }else { - SR030PC50_WRT_LIST(sr030pc50_init_regs); - CDBG("Init settings"); - } - SR030PC50_WRT_LIST(sr030pc50_stop_stream); - CDBG("Stop Stream Settings"); - } - - return 0; -} -*/ -int32_t sr030pc50_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- resolution is %d ", mode); - //SR030PC50_WRT_LIST(sr030pc50_fps_auto_normal_regs); - - return rc; -} - -int32_t sr030pc50_set_fps(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- fps is %d ", mode); - switch (mode) { - case 0: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_auto_normal_regs); - break; - case 5: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_5_regs); - break; - case 7: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_7_regs); - break; - case 10: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_10_regs); - break; - case 15: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_15_regs); - break; - case 20: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_20_regs); - break; - case 25: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_25_regs); - break; - case 30: - rc = SR030PC50_WRT_LIST(sr030pc50_fps_30_regs); - break; - default: - CDBG("%s: Setting %d is invalid ", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr030pc50_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- effect is %d ", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - rc = SR030PC50_WRT_LIST(sr030pc50_effect_normal_regs); - break; - - case CAMERA_EFFECT_MONO: - rc = SR030PC50_WRT_LIST(sr030pc50_effect_mono_regs); - break; - - case CAMERA_EFFECT_NEGATIVE: - rc = SR030PC50_WRT_LIST(sr030pc50_effect_negative_regs); - break; - - case CAMERA_EFFECT_SEPIA: - rc = SR030PC50_WRT_LIST(sr030pc50_effect_sepia_regs); - break; - default: - CDBG("%s: Setting %d is invalid ", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr030pc50_get_exposure(struct msm_sensor_ctrl_t *s_ctrl, \ - unsigned int *Expmax, unsigned int *Exptime) -{ - int rc=0; - unsigned short read_value1 = 0; - unsigned short read_value2 = 0; - unsigned short read_value3 = 0; - unsigned short read_value4 = 0; - - rc = SR030PC50_WRITE_ADDR(0x03, 0x20); - rc = SR030PC50_READ_ADDR(0x10, &read_value1); - if(read_value1 & 0x10) { - rc = SR030PC50_READ_ADDR(0xA0, &read_value2); - rc = SR030PC50_READ_ADDR(0xA1, &read_value3); - rc = SR030PC50_READ_ADDR(0xA2, &read_value4); - *Expmax = (read_value2 << 16) | (read_value3 << 8) | read_value4; - CDBG("read_value = 0x%2x, 0x%2x, 0x%2x : Expmax = 0x%8x", read_value2, read_value3, read_value4, *Expmax); - } else { - rc = SR030PC50_READ_ADDR(0x88, &read_value2); - rc = SR030PC50_READ_ADDR(0x89, &read_value3); - rc = SR030PC50_READ_ADDR(0x8A, &read_value4); - *Expmax = (read_value2 << 16) | (read_value3 << 8) | read_value4; - CDBG("read_value = 0x%2x, 0x%2x, 0x%2x : Expmax = 0x%8x", read_value2, read_value3, read_value4, *Expmax); - } - rc = SR030PC50_READ_ADDR(0x80, &read_value2); - rc = SR030PC50_READ_ADDR(0x81, &read_value3); - rc = SR030PC50_READ_ADDR(0x81, &read_value4); - *Exptime = (read_value2 << 16) | (read_value3 << 8) | read_value4; - CDBG("read_value = 0x%2x, 0x%2x, 0x%2x : Exptime = 0x%8x", read_value2, read_value3, read_value4, *Exptime); - return rc; -} - -int32_t sr030pc50_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - uint16_t gain_value = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x80, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x81, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x82, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr030pc50_ctrl.exif_shutterspeed = 24000000 / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xb0, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - gain_value =((read_value4 * 1000) / 32) + 500; - if (gain_value < 1250) - sr030pc50_ctrl.exif_iso= 50; - else if (gain_value < 1750) - sr030pc50_ctrl.exif_iso = 100; - else if (gain_value < 2500) - sr030pc50_ctrl.exif_iso = 200; - else if (gain_value < 3750) - sr030pc50_ctrl.exif_iso = 400; - else if (gain_value < 5500) - sr030pc50_ctrl.exif_iso = 800; - else - sr030pc50_ctrl.exif_iso = 1600; - - pr_info("sr030pc50_set_exif: ISO = %d shutter speed = %d",sr030pc50_ctrl.exif_iso,sr030pc50_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr030pc50_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr030pc50_ctrl.exif_iso; - exif_info->value_3 = sr030pc50_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr030pc50_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO "); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", - cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - pr_err("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr030pc50_init_regs "); - sr030pc50_ctrl.vtcall_mode = 0; -#ifdef CONFIG_LOAD_FILE - sr030pc50_regs_table_init("/data/sr030pc50_regs.h"); - pr_err("/data/sr030pc50_regs.h inside CFG_SET_INIT_SETTING\n"); -#endif - rc = SR030PC50_WRT_LIST(sr030pc50_init_regs); - break; - case CFG_SET_RESOLUTION: - resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , resolution); - break; - case CFG_SET_STOP_STREAM: - CDBG(" CFG_SET_STOP_STREAM writing stop stream registers: sr030pc50_stop_stream "); - if(sr030pc50_ctrl.streamon == 1){ - //SR030PC50_WRT_LIST(sr030pc50_stop_stream); - sr030pc50_ctrl.streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM writing start stream registers: sr030pc50_start_stream start "); - if (sr030pc50_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - sr030pc50_set_exif(s_ctrl); - } else if (sr030pc50_ctrl.op_mode == CAMERA_MODE_RECORDING ){ - sr030pc50_set_fps(s_ctrl, 25); - } else { - if (sr030pc50_ctrl.prev_mode == CAMERA_MODE_INIT ) { - CDBG("Init preview"); - sr030pc50_set_effect( s_ctrl , sr030pc50_ctrl.settings.effect); - sr030pc50_set_exposure_compensation( s_ctrl , sr030pc50_ctrl.settings.exposure ); - } else if (sr030pc50_ctrl.prev_mode == CAMERA_MODE_RECORDING ){ - unsigned int Expmax = 0; - unsigned int Exptime = 0; - CDBG("Return preview after Recording"); - sr030pc50_get_exposure(s_ctrl, &Expmax, &Exptime); - CDBG("Expmax = %d, Exptime = %d", Expmax, Exptime); - if (Exptime < Expmax) { - sr030pc50_set_fps(s_ctrl, 0); - } else { - SR030PC50_WRT_LIST(sr030pc50_fps_auto_dark_regs); - } - } else { - CDBG("Return preview after capture"); - } - } - sr030pc50_ctrl.streamon = 1; - CDBG("CFG_SET_START_STREAM : sr030pc50_start_stream rc = %d", rc); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP \n"); - sr030pc50_ctrl.streamon = 0; - sr030pc50_ctrl.op_mode = CAMERA_MODE_INIT; - sr030pc50_ctrl.prev_mode = CAMERA_MODE_INIT; - sr030pc50_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr030pc50_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr030pc50_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr030pc50_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr030pc50_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr030pc50_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN \n"); - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_LOAD_FILE - sr030pc50_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING \n"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - - -int32_t sr030pc50_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("cam_info values = %d : %d : %d : %d : %d\n", - cam_info->mode, cam_info->address, cam_info->value_1, - cam_info->value_2 , cam_info->value_3); - switch (cam_info->mode) { - case EXT_CAM_EV: - sr030pc50_ctrl.settings.exposure = cam_info->value_1; - if(sr030pc50_ctrl.streamon == 1) - sr030pc50_set_exposure_compensation(s_ctrl, sr030pc50_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr030pc50_ctrl.settings.wb = cam_info->value_1; - if(sr030pc50_ctrl.streamon == 1) - rc = sr030pc50_set_white_balance(s_ctrl, sr030pc50_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr030pc50_ctrl.settings.effect = cam_info->value_1; - if(sr030pc50_ctrl.streamon == 1) - sr030pc50_set_effect(s_ctrl, sr030pc50_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr030pc50_ctrl.prev_mode = sr030pc50_ctrl.op_mode; - sr030pc50_ctrl.op_mode = cam_info->value_1; - CDBG("EXT_CAM_SENSOR_MODE = %d", sr030pc50_ctrl.op_mode); - case EXT_CAM_EXIF: - sr030pc50_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_VT_MODE: - CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1); - sr030pc50_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_LOAD_FILE -void sr030pc50_regs_table_exit(void) -{ - printk("%s %d", __func__, __LINE__); - if (sr030pc50_regs_table) { - vfree(sr030pc50_regs_table); - sr030pc50_regs_table = NULL; - } -} - -int sr030pc50_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - printk("PHANI.....Inside Modified Tuning sr030pc50_regs_from_sd_tunning \n"); - if (settings != NULL){ - pr_err("sr030pc50_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(sr030pc50_regs_table == NULL) { - pr_err("sr030pc50_regs_table is null "); - return -1; - } - start = strstr(sr030pc50_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error"); - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error"); - if (reg) - start = (reg + 14); - if (addr == 0xff){ - usleep_range(value * 10, (value* 10) + 10); - pr_err("delay = %d\n", (int)value*10); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr030pc50_regs_from_sd_tunning end!"); - return rc; -} -void sr030pc50_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld\n",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - filp_close(filp, current->files); - set_fs(fs); - pr_err("coming to else part of string compare sr030pc50_regs_table"); - sr030pc50_regs_table = dp; - sr030pc50_regs_table_size = lsize; - *((sr030pc50_regs_table + sr030pc50_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20.h deleted file mode 100755 index 864de85c0f3c..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - #ifndef __SR130PC20_H__ -#define __SR130PC20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef SR130PC20_DEBUG -#undef CDBG - -#define SR130PC20_DEBUG -#ifdef SR130PC20_DEBUG -#define CDBG(fmt, args...) printk("[SR130PC20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -void sr130pc20_set_default_settings(void); -int sr130pc20_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); -#endif //__SR130PC20_H__ diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_regs.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_regs.h deleted file mode 100755 index 6f375d54b145..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_regs.h +++ /dev/null @@ -1,3001 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -static struct msm_camera_i2c_reg_conf sr130pc20_Snapshot[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0xd0, 0x05,}, /*Pll off*/ -{0x03, 0x22,}, -{0x10, 0x7d,}, /*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x00,}, -{0x03, 0x02,}, -{0x2f, 0xaa,}, -{0x03, 0x11,}, -{0x5b, 0x00,}, /*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, -{0x03, 0x13,}, -{0x10, 0xc5,}, -{0x80, 0xc1,}, /*Sharpness 2D On[0xc1] Off[0xc0]*/ -{0x03, 0x18,}, -{0x14, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,}, /*pll on*/ -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0d,}, /* 0c:90ns , 0b:110ns */ -{0x1e, 0x0f,}, -{0x1f, 0x0a,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x0a,}, -{0x31, 0x00,}, -{0x32, 0x0d,}, -{0x33, 0x0b,}, -{0x34, 0x02,}, -{0x35, 0x04,}, -{0x36, 0x01,}, -{0x37, 0x09,}, -{0x03, 0x00,}, -{0x01, 0x00,}, /*sleep off*/ -{0xff, 0x03,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Init_Reg[] = { -{0x03, 0x00,}, /*0Page*/ -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/wreset*/ -{0x01, 0x01,}, /*sleep*/ - -{0x0B, 0xAA,}, -{0x0C, 0xAA,}, -{0x0D, 0xAA,}, - -{0x08, 0x00,}, /*Don'ttouch*/ -{0x09, 0x37,}, /*Don'ttouch*/ -{0x0a, 0x33,}, /*Don'ttouch*//*PLLSetting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x93,}, /*xyflip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank150*/ -{0x43, 0x96,}, /*---------------BLC*/ -{0x80, 0x08,}, /*Don'ttouch*/ -{0x81, 0x97,}, /*Don'ttouch*/ -{0x82, 0x90,}, /*Don'ttouch*/ -{0x83, 0x30,}, /*Don'ttouch*/ -{0x84, 0xcc,}, /*Don'ttouch*/ -{0x85, 0x00,}, /*Don'ttouch*/ -{0x86, 0xd4,}, /*Don'ttouch*/ -{0x87, 0x0f,}, /*Don'ttouch*/ -{0x88, 0x34,}, /*Don'ttouch*/ -{0x90, 0x0c,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0c,}, /*BLC_TIME_TH_OFF*/ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202*/ -{0x98, 0x38,}, /*Don'ttouch*//*DarkBLC*/ -{0xa0, 0x01,}, /*20100309*/ -{0xa2, 0x01,}, /*20100309*/ -{0xa4, 0x01,}, /*20100309*/ -{0xa6, 0x01,}, /*20100309*//*NormalBLC*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, /*OutBLC*/ -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, /*2Page*/ -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don'ttouch*/ -{0x14, 0x00,}, /*Don'ttouch*/ -{0x15, 0x00,}, /*Don'ttouch*/ -{0x18, 0x4C,}, /*Don'ttouch*/ -{0x19, 0x00,}, /*Don'ttouch*/ -{0x1A, 0x39,}, /*Don'ttouch*/ -{0x1B, 0x00,}, /*Don'ttouch*/ -{0x1C, 0x1a,}, /*Don'ttouch*/ -{0x1D, 0x14,}, /*Don'ttouch*/ -{0x1E, 0x30,}, /*Don'ttouch*/ -{0x1F, 0x10,}, /*Don'ttouch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /*20120517modify*/ -{0x61, 0xa4,}, /*20120517modify*/ -{0x62, 0x94,}, /*20120517modify*/ -{0x63, 0xa3,}, /*20120517modify*/ -{0x64, 0x94,}, /*20120517modify*/ -{0x65, 0xa3,}, /*20120517modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /*20120517modify*/ -{0x73, 0xa2,}, /*20120517modify*/ -{0x74, 0x95,}, /*20120517modify*/ -{0x75, 0xa2,}, /*20120517modify*/ -{0x76, 0x95,}, /*20120517modify*/ -{0x77, 0xa2,}, /*20120517modify*/ -{0x7C, 0x92,}, /*20120517modify*/ -{0x7D, 0xff,}, /*20120517modify*/ -{0x80, 0x01,}, /*20120517modify*/ -{0x81, 0x8a,}, /*20120517modify*/ -{0x82, 0x1e,}, /*20120517modify*/ -{0x83, 0x36,}, /*20120517modify*/ -{0x84, 0x89,}, /*20120517modify*/ -{0x85, 0x8b,}, /*20120517modify*/ -{0x86, 0x89,}, /*20120517modify*/ -{0x87, 0x8b,}, /*20120517modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /*20120517modify*/ -{0x93, 0x6a,}, /*20120517modify*/ -{0x94, 0x89,}, /*20120517modify*/ -{0x95, 0x8b,}, /*20120517modify*/ -{0x96, 0x89,}, /*20120517modify*/ -{0x97, 0x8b,}, /*20120517modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /*20120517modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /*20120517modify*/ -{0xA4, 0x86,}, /*20120517modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /*20120517modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /*20120517modify*/ -{0xA9, 0x94,}, /*20120517modify*/ -{0xAA, 0x92,}, /*20120517modify*/ -{0xAB, 0x94,}, /*20120517modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /*20120517modify*/ -{0xB1, 0xae,}, /*20120517modify*/ -{0xB2, 0xa4,}, /*20120517modify*/ -{0xB3, 0xae,}, /*20120517modify*/ -{0xB4, 0xa6,}, /*20120517modify*/ -{0xB5, 0xac,}, /*20120517modify*/ -{0xB6, 0xa6,}, /*20120517modify*/ -{0xB7, 0xac,}, /*20120517modify*/ -{0xB8, 0xa6,}, /*20120517modify*/ -{0xB9, 0xab,}, /*20120517modify*/ -{0xBA, 0xa6,}, /*20120517modify*/ -{0xBB, 0xab,}, /*20120517modify*/ -{0xBC, 0xa6,}, /*20120517modify*/ -{0xBD, 0xab,}, /*20120517modify*/ -{0xBE, 0xa6,}, /*20120517modify*/ -{0xBF, 0xab,}, /*20120517modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /*20120517modify*/ -{0xc9, 0x50,}, /*20120517modify*/ -{0xca, 0x38,}, /*20120517modify*/ -{0xcb, 0x50,}, /*20120517modify*/ -{0xcc, 0x6c,}, /*20120517modify*/ -{0xcd, 0x84,}, /*20120517modify*/ -{0xce, 0x6c,}, /*20120517modify*/ -{0xcf, 0x84,}, /*20120517modify*/ -{0xdc, 0x00,}, /*Added*/ -{0xdd, 0xaf,}, /*Added*/ -{0xde, 0x00,}, /*Added*/ -{0xdf, 0x90,}, /*Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, /*DCDC*/ -{0xd4, 0x0c,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0c,}, /*DCDC_TIME_TH_OFF*/ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /*clockinversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, /*----------------------------------------------*/ -{0x03, 0x10,}, /*page10*/ -{0x10, 0x01,}, /*Ycbcr422_bitOrder:YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*yoffset[4],dif_offset[5]*/ -{0x13, 0x02,}, /*contrasteffetenable:0x02*/ -{0x34, 0x00,}, /*hidden10->00100209*/ -{0x37, 0x01,}, /*yc2dpowersave*/ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Yoffset*/ -{0x48, 0x80,}, -{0x53, 0x00,}, /*dif_offsetoption*/ -{0x55, 0x30,}, /*dif_offsetoptiondiff_offsetmax*/ -{0x60, 0x4f,}, /*outcolorsaten[7]|autocolordecrementen[1]/{|man,0xua,}lcolorsaten[0]*/ -{0x61, 0x83,}, /*bluesaturation_C0*/ -{0x62, 0x80,}, /*redsaturation_B0*/ -{0x63, 0xff,}, /*autodecresmentonAGth*/ -{0x64, 0xc0,}, /*autodecresmentonDGth*/ -{0x66, 0xe4,}, /*Outdoorsaturationstep137fpsapplyoutth*/ -{0x67, 0x03,}, /*OutdoorsaturationB/R*/ -{0x76, 0x01,}, /*ADD20121031*/ -{0x79, 0x04,}, /*ADD20121031*//*Hi163*//*PAGE10START*/ -{0x03, 0x10,}, -{0x80, 0x00,}, /*dsshin-->colorenhance*/ -{0xf5, 0x00,}, /*dsshin-->hblankoption*/ -{0x03, 0x11,}, /*page11D_LPF*/ -{0x10, 0x3f,}, /*B[6]:BlueEnDlpfon[4:0]Skyoveroff:0x7f->3f*/ -{0x11, 0x20,}, /*UniformFullGbGr/OV-Nr*/ -{0x12, 0x80,}, /*BlueMaxOptblueskymaxfilteroptoinrate:00xc0->80*/ -{0x13, 0xb8,}, /*dark2[7]|ratio[6:4]|dark3[3]|dark3maxfilterratio[2:0]*/ -{0x30, 0xba,}, /*Outdoor2Hth*/ -{0x31, 0x10,}, /*Outdoor2Lth*/ -{0x32, 0x50,}, /*Outdoor2gainratio*/ -{0x33, 0x1d,}, /*Outdoor2Hlum*/ -{0x34, 0x20,}, /*Outdoor2Mlum*/ -{0x35, 0x1f,}, /*Outdoor2Llum*/ -{0x36, 0xb0,}, /*Outdoor1Hth*/ -{0x37, 0x18,}, /*Outdoor1Lth*/ -{0x38, 0x50,}, /*Outdoor1gainratio0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1Hlum0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1Mlum0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1Llum0x08->20*/ -{0x3c, 0x3f,}, /*indoorHth*/ -{0x3d, 0x16,}, /*indoorLth*/ -{0x3e, 0x30,}, /*indoorgainratio0x446a*/ -{0x3f, 0x1a,}, /*indoorHlum0x1218*/ -{0x40, 0x60,}, /*indoorMlum0x181c*/ -{0x41, 0x1a,}, /*indoorLlum0x183e*/ -{0x42, 0x98,}, /*dark1Hth*/ -{0x43, 0x28,}, /*dark1Lth*/ -{0x44, 0x65,}, /*dark1gainratio*/ -{0x45, 0x16,}, /*dark1Hlum0x38->0x28*/ -{0x46, 0x30,}, /*dark1Mlum0x27->0x17*/ -{0x47, 0x34,}, /*dark1Llum0x20->0x1a*/ -{0x48, 0x90,}, /*dark2Hth*/ -{0x49, 0x2a,}, /*dark2Lth*/ -{0x4a, 0x65,}, /*dark2gainratio*/ -{0x4b, 0x18,}, /*dark2Hlum*/ -{0x4c, 0x31,}, /*dark2Mlum*/ -{0x4d, 0x36,}, /*dark2Llum*/ -{0x4e, 0x80,}, /*dark3Hth*/ -{0x4f, 0x30,}, /*dark3Lth*/ -{0x50, 0x65,}, /*dark3gainratio*/ -{0x51, 0x19,}, /*dark3Hlum*/ -{0x52, 0x31,}, /*dark3Mlum*/ -{0x53, 0x36,}, /*dark3Llum*/ -{0x5a, 0x3f,}, /*blueskymodeout1/2enable0x27->3f*/ -{0x5b, 0x00,}, /*Impulsepixelenabledark123,in,out123::mustbe0x07*/ -{0x5c, 0x9f,}, /*Indoormaxfilterrate[7:5]|Uncertainonoff[4:0]0x1f->0x9f*/ -{0x60, 0x3f,}, /*GbGrallenable*/ -{0x62, 0x0f,}, /*GbGroffset*/ -{0x65, 0x0c,}, /*OutdoorGbGrrateH100%M25%L100%*/ -{0x66, 0x0c,}, /*IndoorGbGrrateH100%M25%L100%*/ -{0x67, 0x00,}, /*darkGbGrrateH/M/L100%*/ -{0x70, 0x0c,}, /*AbberationOn/OffB[1]:OutdoorB[0]:Indoor07>>c*/ -{0x75, 0xa0,}, /*Outdoor2AbberationLuminancelvl*/ -{0x7d, 0xb4,}, /*IndoorAbberationLuminancelvl*/ -{0x96, 0x08,}, /*indoor/Dark1edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1centerGvalue*/ -{0x98, 0xf5,}, /*slopeindoor::left/rightgraphpolarity,slope*/ -{0x99, 0x2a,}, /*indooruncertainratiocontrol*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*//*DPC_CTRL*/ -{0x03, 0x12,}, /*PreviewDPCoff[0x5c]on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /*0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Textureregion(mostdetail)*/ -{0x31, 0xa0,}, /*STDuniform1mostblurregion*/ -{0x32, 0xb0,}, /*STDuniform22ndblur*/ -{0x33, 0xc0,}, /*STDuniform33rdblur*/ -{0x34, 0xd0,}, /*STDnormalnoise14thblur*/ -{0x35, 0xe0,}, /*STDnormalnoise25thblur*/ -{0x36, 0xff,}, /*STDnormalnoise36thblur*/ -{0x40, 0x83,}, /*Outdoor2Hth*/ -{0x41, 0x20,}, /*Outdoor2Lth*/ -{0x42, 0x08,}, /*Outdoor2Hluminance*/ -{0x43, 0x10,}, /*Outdoor2Mluminance*/ -{0x44, 0x10,}, /*Outdoor2lluminance*/ -{0x45, 0x50,}, /*Outdoor2ratio*/ -{0x46, 0x83,}, /*Outdoor1Hth*/ -{0x47, 0x20,}, /*Outdoor1Lth*/ -{0x48, 0x08,}, /*Outdoor1Hluminance*/ -{0x49, 0x10,}, /*Outdoor1Mluminance*/ -{0x4a, 0x10,}, /*Outdoor1Lluminance*/ -{0x4b, 0x50,}, /*Outdoor1ratio*/ -{0x4c, 0x80,}, /*IndoorHth*/ -{0x4d, 0x48,}, /*IndoorLth*/ -{0x4e, 0x30,}, /*indoorHlum*/ -{0x4f, 0x30,}, /*indoorMlum*/ -{0x50, 0x12,}, /*indoorLlum*/ -{0x51, 0x70,}, /*indoorratio0x10->0x45*/ -{0x52, 0xa8,}, /*dark1Hth*/ -{0x53, 0x30,}, /*dark1Lth*/ -{0x54, 0x28,}, /*dark1Hlum*/ -{0x55, 0x3e,}, /*dark1Mlum*/ -{0x56, 0x67,}, /*dark1Llum*/ -{0x57, 0x6a,}, /*dark1ratio*/ -{0x58, 0xa0,}, /*dark2Hth*/ -{0x59, 0x40,}, /*dark2Lth*/ -{0x5a, 0x28,}, /*dark2Hlum*/ -{0x5b, 0x3f,}, /*dark2Mlum*/ -{0x5c, 0x68,}, /*dark2Llum*/ -{0x5d, 0x70,}, /*dark2ratio*/ -{0x5e, 0xa0,}, /*dark3Hth*/ -{0x5f, 0x40,}, /*dark3Lth*/ -{0x60, 0x29,}, /*dark3Hlum*/ -{0x61, 0x3f,}, /*dark3Mlum*/ -{0x62, 0x69,}, /*dark3Llum*/ -{0x63, 0x6a,}, /*dark3ratio*//*C-filter(Out2&Out1)*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, /*C-filter(Indoor&Dark3)*/ -{0x72, 0x10,}, -{0x73, 0x0a,}, /*C-filter(Dark2&Dark1)*/ -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*PreviewDPCoff[0x5c]on[0x5d]*//*DPC-Dark1,2,3*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*//*BlueDet..*/ -{0xc5, 0x58,}, /*BlueRange2010.8.250x40->23*/ -{0xc6, 0x20,}, /*GreenRange2010.8.250x3b->20*/ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview17,full67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview0f,full02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*previewff,full18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, /*interpolatedwithaverage*/ -{0xdb, 0x38,}, /*resolutionissue0x00->0x18->0x38*/ -{0xd9, 0x04,}, /*strong_edgedetectratio*/ -{0xe0, 0x01,}, /*strong_edgedetectratio*/ -{0x03, 0x13,}, /*page13sharpness1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*addedoption1.3M*/ -{0x18, 0x30,}, /*addedoption1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clipth1*/ -{0x24, 0x1a,}, /*hi_clipth2*/ -{0x25, 0x06,}, /*lowclipth*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*timeth*/ -{0x2a, 0x30,}, /*pgath*/ -{0x2b, 0x03,}, /*lpfout2*/ -{0x2c, 0x03,}, /*lpfout1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, /*1DEdge*/ -{0x50, 0x0a,}, /*out2hinega*/ -{0x53, 0x07,}, /*hipos*/ -{0x51, 0x0c,}, /*minega*/ -{0x54, 0x07,}, /*mipos*/ -{0x52, 0x0b,}, /*lonega*/ -{0x55, 0x08,}, /*lopos*/ -{0x56, 0x0a,}, /*out1hinega*/ -{0x59, 0x07,}, /*hipos*/ -{0x57, 0x0c,}, /*minega*/ -{0x5a, 0x07,}, /*mipos*/ -{0x58, 0x0b,}, /*lonega*/ -{0x5b, 0x08,}, /*lopos*//*IndoorEdge*/ -{0x5c, 0x08,}, /*indoorhinega*/ -{0x5f, 0x07,}, /*hipos*/ -{0x5d, 0x14,}, -{0x60, 0x12,}, -{0x5e, 0x0a,}, -{0x61, 0x08,}, /*lowpos*/ -{0x62, 0x08,}, /*dark1hinega*/ -{0x65, 0x06,}, /*hipos*/ -{0x63, 0x08,}, /*midnega*/ -{0x66, 0x06,}, /*midpos*/ -{0x64, 0x08,}, /*lownega*/ -{0x67, 0x06,}, /*lowpos*/ -{0x68, 0x07,}, /*dark2hinega*/ -{0x6b, 0x05,}, /*hipos*/ -{0x69, 0x07,}, /*midnega*/ -{0x6c, 0x05,}, /*midpos*/ -{0x6a, 0x07,}, /*lownega*/ -{0x6d, 0x05,}, /*lowpos*/ -{0x6e, 0x0a,}, /*dark3hinega*/ -{0x71, 0x09,}, /*hipos*/ -{0x6f, 0x0a,}, /*midnega*/ -{0x72, 0x09,}, /*midpos*/ -{0x70, 0x0a,}, /*lownega*/ -{0x73, 0x09,}, /*lowpos*//*2DY*/ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2dlclpout2nega*/ -{0xa1, 0x03,}, /*2dlclpout2pos*/ -{0xa2, 0x02,}, /*2dlclpout1nega*/ -{0xa3, 0x03,}, /*2dlclpout1pos*/ -{0xa4, 0x03,}, /*2dlclpinnega*/ -{0xa5, 0x04,}, /*2dlclpinpos*/ -{0xa6, 0x07,}, /*2dlclpdark1nega*/ -{0xa7, 0x08,}, /*2dlclpdark1pos*/ -{0xa8, 0x07,}, /*2dlclpdark2nega*/ -{0xa9, 0x08,}, /*2dlclpdark2pos*/ -{0xaa, 0x07,}, /*2dlclpdark3nega*/ -{0xab, 0x08,}, /*2dlclpdark3pos*/ -{0xb0, 0x10,}, /*out2HNe*/ -{0xb3, 0x10,}, /*HPo*/ -{0xb1, 0x1e,}, /*MNe*/ -{0xb4, 0x1e,}, /*MPo*/ -{0xb2, 0x1f,}, /*LNe*/ -{0xb5, 0x1e,}, /*LPo*/ -{0xb6, 0x10,}, /*out1HNe*/ -{0xb9, 0x10,}, /*HPo*/ -{0xb7, 0x1e,}, /*MNe*/ -{0xba, 0x1e,}, /*MPo*/ -{0xb8, 0x1f,}, /*LNe*/ -{0xbb, 0x1e,}, /*LPo*/ -{0xbc, 0x20,}, /*indoorHNe*/ -{0xbf, 0x1e,}, /*HPo*/ -{0xbd, 0x25,}, /*MNe*/ -{0xc0, 0x23,}, /*MPo*/ -{0xbe, 0x24,}, /*LNe*/ -{0xc1, 0x22,}, /*LPo*/ -{0xc2, 0x23,}, /*dark1HNe*/ -{0xc5, 0x23,}, /*HPo*/ -{0xc3, 0x29,}, /*MNe*/ -{0xc6, 0x29,}, /*MPo*/ -{0xc4, 0x25,}, /*LNe*/ -{0xc7, 0x25,}, /*LPo*/ -{0xc8, 0x1c,}, /*dark2HNe*/ -{0xcb, 0x1c,}, /*HPo*/ -{0xc9, 0x25,}, /*MNe*/ -{0xcc, 0x25,}, /*MPo*/ -{0xca, 0x23,}, /*LNe*/ -{0xcd, 0x23,}, /*LPo*/ -{0xce, 0x1c,}, /*dark3HNe*/ -{0xd1, 0x1c,}, /*HPo*/ -{0xcf, 0x25,}, /*MNe*/ -{0xd2, 0x25,}, /*MPo*/ -{0xd0, 0x23,}, /*LNe*/ -{0xd3, 0x23,}, /*LPo*//*PAGE14START*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /*GX*/ -{0x15, 0x80,}, /*GY*/ -{0x16, 0x80,}, /*RX*/ -{0x17, 0x80,}, /*RY*/ -{0x18, 0x80,}, /*BX*/ -{0x19, 0x80,}, /*BY*/ -{0x20, 0x60,}, /*XCenter*/ -{0x21, 0x80,}, /*YCenter*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x56,}, /*Rmin'sset4e*/ -{0x41, 0x3a,}, /*Gr*/ -{0x42, 0x37,}, /*B*/ -{0x43, 0x3a,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*//*GMAIndoor*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x35,}, -{0x34, 0x5a,}, -{0x35, 0x7c,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, /*RGMAOutdoor*/ -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, /*BGMADark*/ -{0x70, 0x03,}, -{0x71, 0x11,}, -{0x72, 0x1f,}, -{0x73, 0x37,}, -{0x74, 0x52,}, -{0x75, 0x6c,}, -{0x76, 0x85,}, -{0x77, 0x9a,}, -{0x78, 0xad,}, -{0x79, 0xbd,}, -{0x7a, 0xcb,}, -{0x7b, 0xd6,}, -{0x7c, 0xe0,}, -{0x7d, 0xe8,}, -{0x7e, 0xef,}, -{0x7f, 0xf4,}, -{0x80, 0xf8,}, -{0x81, 0xfb,}, -{0x82, 0xfe,}, -{0x03, 0x24,}, /*Resolcontrol*/ -{0x60, 0xc5,}, /*edgeevenframe|16bitresol|whiteedgecnt|sceneresolenable*/ -{0x61, 0x04,}, /*evenframeupdate*/ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edgeth2H*/ -{0x67, 0x00,}, /*edgeth2L*/ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flatcenterGb/Gr*/ -{0x74, 0x02,}, /*detslopeen|gausianfilter*/ -{0x75, 0x0d,}, /*1Dnegativegaindet09*/ -{0x76, 0x0d,}, /*1Dpostivegaindet08*/ -{0x77, 0x10,}, /*1Dhclp2det*/ -{0x78, 0x08,}, /*outdoorflatthreshold*/ -{0x79, 0x10,}, /*indoorflatthreshold*/ -{0x81, 0xdf,}, /*detgaincontroler*/ -{0x86, 0x90,}, /*2Dnegativegaindet*/ -{0x87, 0x90,}, /*2Dpostivegaindet*/ -{0x96, 0x2a,}, /*2Dhclp2det*/ -{0x03, 0x12,}, /*0x12page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, /*PAGE18START*/ -{0x03, 0x18,}, -{0x14, 0x00,}, /*PAGE20START*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,}, /*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /*add20120223*/ -{0x29, 0x0d,}, /*20100305ad->0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /*add20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xff,}, /*fe*/ -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x1a,}, -{0x57, 0x80,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /*6c*/ -{0x71, 0x82,}, /*82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /*24*/ -{0x79, 0x23,}, /*YTarget70=>25,72=>26*/ -{0x7a, 0x23,}, /*23*/ -{0x7b, 0x22,}, /*22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, //EXPMin 8125.00 fps -{0x87, 0x90,}, -{0x88, 0x06,}, //EXP Max(120Hz) 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0xa5, 0x05,}, //EXP Max(100Hz) 8.33 fps -{0xa6, 0xee,}, -{0xa7, 0xc0,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0x90,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x9c, 0x09,}, //EXP Limit 1354.17 fps -{0x9d, 0x60,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /*aeenable*//*PAGE20END*//*AE_Weight*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, /*PAGE22START*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /*LowOn*/ -{0x20, 0x30,}, /*forwbspeed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /*fortracking20120314*/ -{0x30, 0x80,}, /*20120224test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /*33*/ -{0x42, 0x22,}, /*22*/ -{0x43, 0xf3,}, /*f6*/ -{0x44, 0x54,}, /*44*/ -{0x45, 0x22,}, /*33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /*3a*/ -{0x83, 0x56,}, /*RMax*/ -{0x84, 0x20,}, /*RMin*/ -{0x85, 0x52,}, /*BMax*/ -{0x86, 0x20,}, /*BMin*/ -{0x87, 0x45,}, -{0x88, 0x3a,}, -{0x89, 0x33,}, -{0x8a, 0x2c,}, -{0x8b, 0x42,}, -{0x8c, 0x3d,}, -{0x8d, 0x30,}, -{0x8e, 0x2c,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /*1500fps*/ -{0xa5, 0x44,}, /*700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /*lowtempRgain*/ -{0xb0, 0x28,}, /*lowtempRgain*/ -{0xb1, 0x00,}, /*0x20->0x000405modify*/ -{0xb4, 0xbf,}, /*fortracking20120314*/ -{0xb8, 0xa1,}, /*a2:b-2,R+2b4B-3,R+4lowtempb0a1SpecAWBAmodify*/ -{0xb9, 0x00,}, /*PAGE22END*//*PAGE48(MiPi1600x1200)*/ -{0x03, 0x00,}, /*PLLSetting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, /*MIPITXSetting*/ -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x01,}, -}; - -#if 0 - -static struct msm_camera_i2c_reg_conf sr130pc20_VT_Init_Reg[] = { -{0x03, 0x00,}, /*0Page*/ -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/wreset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,}, /*Don'ttouch*/ -{0x09, 0x37,}, /*Don'ttouch*/ -{0x0a, 0x33,}, /*Don'ttouch*//*PLLSetting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x94,}, /*xyflip*/ -{0x12, 0x00,}, /*Synctypedefault:0x00PCLK[2]0falling,1rising*/ -{0x14, 0x88,}, /*---------------windowing*/ -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank20*/ -{0x43, 0x14,}, /*---------------BLC*/ -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -{0x80, 0x08,}, /*Don'ttouch*/ -{0x81, 0x97,}, /*Don'ttouch*/ -{0x82, 0x90,}, /*Don'ttouch*/ -{0x83, 0x30,}, /*Don'ttouch*/ -{0x84, 0xcc,}, /*Don'ttouch*/ -{0x85, 0x00,}, /*Don'ttouch*/ -{0x86, 0xd4,}, /*Don'ttouch*/ -{0x87, 0x0f,}, /*Don'ttouch*/ -{0x88, 0x34,}, /*Don'ttouch*/ -{0x90, 0x09,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x09,}, /*BLC_TIME_TH_OFF*/ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202*/ -{0x98, 0x38,}, /*Don'ttouch*//*DarkBLC*/ -{0xa0, 0x01,}, /*20100309*/ -{0xa2, 0x01,}, /*20100309*/ -{0xa4, 0x01,}, /*20100309*/ -{0xa6, 0x01,}, /*20100309*//*NormalBLC*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, /*OutBLC*/ -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, /*2Page*/ -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don'ttouch*/ -{0x14, 0x00,}, /*Don'ttouch*/ -{0x15, 0x00,}, /*Don'ttouch*/ -{0x18, 0x4C,}, /*Don'ttouch*/ -{0x19, 0x00,}, /*Don'ttouch*/ -{0x1A, 0x39,}, /*Don'ttouch*/ -{0x1B, 0x00,}, /*Don'ttouch*/ -{0x1C, 0x1a,}, /*Don'ttouch*/ -{0x1D, 0x14,}, /*Don'ttouch*/ -{0x1E, 0x30,}, /*Don'ttouch*/ -{0x1F, 0x10,}, /*Don'ttouch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /*20120517modify*/ -{0x61, 0xa4,}, /*20120517modify*/ -{0x62, 0x94,}, /*20120517modify*/ -{0x63, 0xa3,}, /*20120517modify*/ -{0x64, 0x94,}, /*20120517modify*/ -{0x65, 0xa3,}, /*20120517modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /*20120517modify*/ -{0x73, 0xa2,}, /*20120517modify*/ -{0x74, 0x95,}, /*20120517modify*/ -{0x75, 0xa2,}, /*20120517modify*/ -{0x76, 0x95,}, /*20120517modify*/ -{0x77, 0xa2,}, /*20120517modify*/ -{0x7C, 0x92,}, /*20120517modify*/ -{0x7D, 0xff,}, /*20120517modify*/ -{0x80, 0x01,}, /*20120517modify*/ -{0x81, 0x8a,}, /*20120517modify*/ -{0x82, 0x1e,}, /*20120517modify*/ -{0x83, 0x36,}, /*20120517modify*/ -{0x84, 0x89,}, /*20120517modify*/ -{0x85, 0x8b,}, /*20120517modify*/ -{0x86, 0x89,}, /*20120517modify*/ -{0x87, 0x8b,}, /*20120517modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /*20120517modify*/ -{0x93, 0x6a,}, /*20120517modify*/ -{0x94, 0x89,}, /*20120517modify*/ -{0x95, 0x8b,}, /*20120517modify*/ -{0x96, 0x89,}, /*20120517modify*/ -{0x97, 0x8b,}, /*20120517modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /*20120517modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /*20120517modify*/ -{0xA4, 0x86,}, /*20120517modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /*20120517modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /*20120517modify*/ -{0xA9, 0x94,}, /*20120517modify*/ -{0xAA, 0x92,}, /*20120517modify*/ -{0xAB, 0x94,}, /*20120517modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /*20120517modify*/ -{0xB1, 0xae,}, /*20120517modify*/ -{0xB2, 0xa4,}, /*20120517modify*/ -{0xB3, 0xae,}, /*20120517modify*/ -{0xB4, 0xa6,}, /*20120517modify*/ -{0xB5, 0xac,}, /*20120517modify*/ -{0xB6, 0xa6,}, /*20120517modify*/ -{0xB7, 0xac,}, /*20120517modify*/ -{0xB8, 0xa6,}, /*20120517modify*/ -{0xB9, 0xab,}, /*20120517modify*/ -{0xBA, 0xa6,}, /*20120517modify*/ -{0xBB, 0xab,}, /*20120517modify*/ -{0xBC, 0xa6,}, /*20120517modify*/ -{0xBD, 0xab,}, /*20120517modify*/ -{0xBE, 0xa6,}, /*20120517modify*/ -{0xBF, 0xab,}, /*20120517modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /*20120517modify*/ -{0xc9, 0x50,}, /*20120517modify*/ -{0xca, 0x38,}, /*20120517modify*/ -{0xcb, 0x50,}, /*20120517modify*/ -{0xcc, 0x6c,}, /*20120517modify*/ -{0xcd, 0x84,}, /*20120517modify*/ -{0xce, 0x6c,}, /*20120517modify*/ -{0xcf, 0x84,}, /*20120517modify*/ -{0xdc, 0x00,}, /*Added*/ -{0xdd, 0xaf,}, /*Added*/ -{0xde, 0x00,}, /*Added*/ -{0xdf, 0x90,}, /*Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, /*DCDC*/ -{0xd4, 0x09,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x09,}, /*DCDC_TIME_TH_OFF*/ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /*clockinversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, /*----------------------------------------------*/ -{0x03, 0x10,}, /*page10*/ -{0x10, 0x01,}, /*Ycbcr422_bitOrder:YUYV*/ -{0x12, 0x30,}, /*yoffset[4],dif_offset[5]*/ -{0x13, 0x02,}, /*contrasteffetenable:0x02*/ -{0x34, 0x00,}, /*hidden10->00100209*/ -{0x37, 0x01,}, /*yc2dpowersave*/ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Yoffset*/ -{0x41, 0x38,}, -{0x48, 0x80,}, /*Contrast(Y=constrast*(Y-128)+128)*//*86*/ -{0x50, 0xf0,}, -{0x53, 0x00,}, /*dif_offsetoption*/ -{0x55, 0x30,}, /*dif_offsetoptiondiff_offsetmax*/ -{0x60, 0x03,}, /*outcolorsaten[7]|autocolordecrementen[1]/|manualcolorsaten[0]*/ -{0x61, 0x83,}, /*bluesaturation_C0*/ -{0x62, 0x80,}, /*redsaturation_B0*/ -{0x63, 0xff,}, /*autodecresmentonAGth*/ -{0x64, 0xff,}, /*autodecresmentonDGth*/ -{0x66, 0xe4,}, /*Outdoorsaturationstep137fpsapplyoutth*/ -{0x67, 0x00,}, /*OutdoorsaturationB/R*/ -{0x76, 0x01,}, /*ADD20121031*/ -{0x79, 0x04,}, /*ADD20121031*//*Hi163*//*PAGE10START*/ -{0x03, 0x10,}, -{0x80, 0x00,}, /*dsshin-->colorenhance*/ -{0xf5, 0x00,}, /*dsshin-->hblankoption*/ -{0x03, 0x11,}, /*page11D_LPF*/ -{0x10, 0x3f,}, /*B[6]:BlueEnDlpfon[4:0]Skyoveroff:0x7f->3f*/ -{0x11, 0x20,}, /*UniformFullGbGr/OV-Nr*/ -{0x12, 0x80,}, /*BlueMaxOptblueskymaxfilteroptoinrate:00xc0->80*/ -{0x13, 0xb8,}, /*dark2[7]|dark2maxfilterratio[6:4]|dark3[3]|dark3maxfilterratio[2:0]*/ -{0x30, 0xba,}, /*Outdoor2Hth*/ -{0x31, 0x10,}, /*Outdoor2Lth*/ -{0x32, 0x50,}, /*Outdoor2gainratio*/ -{0x33, 0x1d,}, /*Outdoor2Hlum*/ -{0x34, 0x20,}, /*Outdoor2Mlum*/ -{0x35, 0x1f,}, /*Outdoor2Llum*/ -{0x36, 0xb0,}, /*Outdoor1Hth*/ -{0x37, 0x18,}, /*Outdoor1Lth*/ -{0x38, 0x50,}, /*Outdoor1gainratio0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1Hlum0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1Mlum0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1Llum0x08->20*/ -{0x3c, 0x3f,}, /*indoorHth*/ -{0x3d, 0x16,}, /*indoorLth*/ -{0x3e, 0x30,}, /*indoorgainratio0x446a*/ -{0x3f, 0x1a,}, /*indoorHlum0x1218*/ -{0x40, 0x60,}, /*indoorMlum0x181c*/ -{0x41, 0x1a,}, /*indoorLlum0x183e*/ -{0x42, 0x98,}, /*dark1Hth*/ -{0x43, 0x28,}, /*dark1Lth*/ -{0x44, 0x65,}, /*dark1gainratio*/ -{0x45, 0x16,}, /*dark1Hlum0x38->0x28*/ -{0x46, 0x30,}, /*dark1Mlum0x27->0x17*/ -{0x47, 0x34,}, /*dark1Llum0x20->0x1a*/ -{0x48, 0x90,}, /*dark2Hth*/ -{0x49, 0x2a,}, /*dark2Lth*/ -{0x4a, 0x65,}, /*dark2gainratio*/ -{0x4b, 0x18,}, /*dark2Hlum*/ -{0x4c, 0x31,}, /*dark2Mlum*/ -{0x4d, 0x36,}, /*dark2Llum*/ -{0x4e, 0x80,}, /*dark3Hth*/ -{0x4f, 0x30,}, /*dark3Lth*/ -{0x50, 0x65,}, /*dark3gainratio*/ -{0x51, 0x19,}, /*dark3Hlum*/ -{0x52, 0x31,}, /*dark3Mlum*/ -{0x53, 0x36,}, /*dark3Llum*/ -{0x5a, 0x3f,}, /*blueskymodeout1/2enable0x27->3f*/ -{0x5b, 0x00,}, /*Impulsepixelenabledark123,in,out123::mustbe0x07fixsettinguse!*/ -{0x5c, 0x9f,}, /*Indoormaxfilterrate[7:5]|Uncertainonoff[4:0]0x1f->0x9f*/ -{0x60, 0x3f,}, /*GbGrallenable*/ -{0x62, 0x0f,}, /*GbGroffset*/ -{0x65, 0x0c,}, /*OutdoorGbGrrateH100%M25%L100%*/ -{0x66, 0x0c,}, /*IndoorGbGrrateH100%M25%L100%*/ -{0x67, 0x00,}, /*darkGbGrrateH/M/L100%*/ -{0x70, 0x0c,}, /*AbberationOn/OffB[1]:OutdoorB[0]:Indoor07>>c*/ -{0x75, 0xa0,}, /*Outdoor2AbberationLuminancelvl*/ -{0x7d, 0xb4,}, /*IndoorAbberationLuminancelvl*/ -{0x96, 0x08,}, /*indoor/Dark1edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1centerGvalue*/ -{0x98, 0xf5,}, /*slopeindoor::left/rightgraphpolarity,slope*/ -{0x99, 0x2a,}, /*indooruncertainratiocontrol*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*//*DPC_CTRL*/ -{0x03, 0x12,}, /*PreviewDPCoff[0x5c]on[0x5d]*/ -{0x20, 0x0e,}, -{0x21, 0x0e,}, -{0x25, 0x00,}, /*0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Textureregion(mostdetail)*/ -{0x31, 0xa0,}, /*STDuniform1mostblurregion*/ -{0x32, 0xb0,}, /*STDuniform22ndblur*/ -{0x33, 0xc0,}, /*STDuniform33rdblur*/ -{0x34, 0xd0,}, /*STDnormalnoise14thblur*/ -{0x35, 0xe0,}, /*STDnormalnoise25thblur*/ -{0x36, 0xff,}, /*STDnormalnoise36thblur*/ -{0x40, 0x83,}, /*Outdoor2Hth*/ -{0x41, 0x20,}, /*Outdoor2Lth*/ -{0x42, 0x08,}, /*Outdoor2Hluminance*/ -{0x43, 0x10,}, /*Outdoor2Mluminance*/ -{0x44, 0x10,}, /*Outdoor2lluminance*/ -{0x45, 0x50,}, /*Outdoor2ratio*/ -{0x46, 0x83,}, /*Outdoor1Hth*/ -{0x47, 0x20,}, /*Outdoor1Lth*/ -{0x48, 0x08,}, /*Outdoor1Hluminance*/ -{0x49, 0x10,}, /*Outdoor1Mluminance*/ -{0x4a, 0x10,}, /*Outdoor1Lluminance*/ -{0x4b, 0x50,}, /*Outdoor1ratio*/ -{0x4c, 0x80,}, /*IndoorHth*/ -{0x4d, 0x48,}, /*IndoorLth*/ -{0x4e, 0x30,}, /*indoorHlum*/ -{0x4f, 0x30,}, /*indoorMlum*/ -{0x50, 0x12,}, /*indoorLlum*/ -{0x51, 0x70,}, /*indoorratio0x10->0x45*/ -{0x52, 0xa8,}, /*dark1Hth*/ -{0x53, 0x30,}, /*dark1Lth*/ -{0x54, 0x28,}, /*dark1Hlum*/ -{0x55, 0x3e,}, /*dark1Mlum*/ -{0x56, 0x67,}, /*dark1Llum*/ -{0x57, 0x6a,}, /*dark1ratio*/ -{0x58, 0xa0,}, /*dark2Hth*/ -{0x59, 0x40,}, /*dark2Lth*/ -{0x5a, 0x28,}, /*dark2Hlum*/ -{0x5b, 0x3f,}, /*dark2Mlum*/ -{0x5c, 0x68,}, /*dark2Llum*/ -{0x5d, 0x70,}, /*dark2ratio*/ -{0x5e, 0xa0,}, /*dark3Hth*/ -{0x5f, 0x40,}, /*dark3Lth*/ -{0x60, 0x29,}, /*dark3Hlum*/ -{0x61, 0x3f,}, /*dark3Mlum*/ -{0x62, 0x69,}, /*dark3Llum*/ -{0x63, 0x6a,}, /*dark3ratio*//*C-filter(Out2&Out1)*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, /*C-filter(Indoor&Dark3)*/ -{0x72, 0x10,}, -{0x73, 0x0a,}, /*C-filter(Dark2&Dark1)*/ -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*PreviewDPCoff[0x5c]on[0x5d]*//*DPC-Dark1,2,3*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*//*BlueDet..*/ -{0xc5, 0x58,}, /*BlueRange2010.8.250x40->23*/ -{0xc6, 0x20,}, /*GreenRange2010.8.250x3b->20*/ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview17,full67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview0f,full02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*previewff,full18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, /*interpolatedwithaverage*/ -{0xdb, 0x38,}, /*resolutionissue0x00->0x18->0x38*/ -{0xd9, 0x04,}, /*strong_edgedetectratio*/ -{0xe0, 0x01,}, /*strong_edgedetectratio*/ -{0x03, 0x13,}, /*page13sharpness1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*addedoption1.3M*/ -{0x18, 0x30,}, /*addedoption1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clipth1*/ -{0x24, 0x1a,}, /*hi_clipth2*/ -{0x25, 0x06,}, /*lowclipth*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*timeth*/ -{0x2a, 0x30,}, /*pgath*/ -{0x2b, 0x03,}, /*lpfout2*/ -{0x2c, 0x03,}, /*lpfout1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, /*1DEdge*/ -{0x50, 0x0a,}, /*out2hinega*/ -{0x53, 0x07,}, /*hipos*/ -{0x51, 0x0c,}, /*minega*/ -{0x54, 0x07,}, /*mipos*/ -{0x52, 0x0b,}, /*lonega*/ -{0x55, 0x08,}, /*lopos*/ -{0x56, 0x0a,}, /*out1hinega*/ -{0x59, 0x07,}, /*hipos*/ -{0x57, 0x0c,}, /*minega*/ -{0x5a, 0x07,}, /*mipos*/ -{0x58, 0x0b,}, /*lonega*/ -{0x5b, 0x08,}, /*lopos*//*IndoorEdge*/ -{0x5c, 0x08,}, /*indoorhinega*/ -{0x5f, 0x07,}, /*hipos*/ -{0x5d, 0x14,}, /*midnega,11*/ -{0x60, 0x12,}, /*midpos,0*/ -{0x5e, 0x0a,}, /*lownega*/ -{0x61, 0x08,}, /*lowpos*/ -{0x62, 0x08,}, /*dark1hinega*/ -{0x65, 0x06,}, /*hipos*/ -{0x63, 0x08,}, /*midnega*/ -{0x66, 0x06,}, /*midpos*/ -{0x64, 0x08,}, /*lownega*/ -{0x67, 0x06,}, /*lowpos*/ -{0x68, 0x07,}, /*dark2hinega*/ -{0x6b, 0x05,}, /*hipos*/ -{0x69, 0x07,}, /*midnega*/ -{0x6c, 0x05,}, /*midpos*/ -{0x6a, 0x07,}, /*lownega*/ -{0x6d, 0x05,}, /*lowpos*/ -{0x6e, 0x0a,}, /*dark3hinega*/ -{0x71, 0x09,}, /*hipos*/ -{0x6f, 0x0a,}, /*midnega*/ -{0x72, 0x09,}, /*midpos*/ -{0x70, 0x0a,}, /*lownega*/ -{0x73, 0x09,}, /*lowpos*//*2DY*/ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2dlclpout2nega*/ -{0xa1, 0x03,}, /*2dlclpout2pos*/ -{0xa2, 0x02,}, /*2dlclpout1nega*/ -{0xa3, 0x03,}, /*2dlclpout1pos*/ -{0xa4, 0x03,}, /*2dlclpinnega*/ -{0xa5, 0x04,}, /*2dlclpinpos*/ -{0xa6, 0x07,}, /*2dlclpdark1nega*/ -{0xa7, 0x08,}, /*2dlclpdark1pos*/ -{0xa8, 0x07,}, /*2dlclpdark2nega*/ -{0xa9, 0x08,}, /*2dlclpdark2pos*/ -{0xaa, 0x07,}, /*2dlclpdark3nega*/ -{0xab, 0x08,}, /*2dlclpdark3pos*/ -{0xb0, 0x10,}, /*out2HNe*/ -{0xb3, 0x10,}, /*HPo*/ -{0xb1, 0x1e,}, /*MNe*/ -{0xb4, 0x1e,}, /*MPo*/ -{0xb2, 0x1f,}, /*LNe*/ -{0xb5, 0x1e,}, /*LPo*/ -{0xb6, 0x10,}, /*out1HNe*/ -{0xb9, 0x10,}, /*HPo*/ -{0xb7, 0x1e,}, /*MNe*/ -{0xba, 0x1e,}, /*MPo*/ -{0xb8, 0x1f,}, /*LNe*/ -{0xbb, 0x1e,}, /*LPo*/ -{0xbc, 0x20,}, /*indoorHNe*/ -{0xbf, 0x1e,}, /*HPo*/ -{0xbd, 0x25,}, /*MNe*/ -{0xc0, 0x23,}, /*MPo*/ -{0xbe, 0x24,}, /*LNe*/ -{0xc1, 0x22,}, /*LPo*/ -{0xc2, 0x23,}, /*dark1HNe*/ -{0xc5, 0x23,}, /*HPo*/ -{0xc3, 0x29,}, /*MNe*/ -{0xc6, 0x29,}, /*MPo*/ -{0xc4, 0x25,}, /*LNe*/ -{0xc7, 0x25,}, /*LPo*/ -{0xc8, 0x1c,}, /*dark2HNe*/ -{0xcb, 0x1c,}, /*HPo*/ -{0xc9, 0x25,}, /*MNe*/ -{0xcc, 0x25,}, /*MPo*/ -{0xca, 0x23,}, /*LNe*/ -{0xcd, 0x23,}, /*LPo*/ -{0xce, 0x1c,}, /*dark3HNe*/ -{0xd1, 0x1c,}, /*HPo*/ -{0xcf, 0x25,}, /*MNe*/ -{0xd2, 0x25,}, /*MPo*/ -{0xd0, 0x23,}, /*LNe*/ -{0xd3, 0x23,}, /*LPo*//*PAGE14START*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /*GX*/ -{0x15, 0x80,}, /*GY*/ -{0x16, 0x80,}, /*RX*/ -{0x17, 0x80,}, /*RY*/ -{0x18, 0x80,}, /*BX*/ -{0x19, 0x80,}, /*BY*/ -{0x20, 0x60,}, /*XCenter*/ -{0x21, 0x80,}, /*YCenter*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x56,}, /*Rmin'sset4e*/ -{0x41, 0x3a,}, /*Gr*/ -{0x42, 0x37,}, /*B*/ -{0x43, 0x3a,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*//*GMA,Indoor*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x35,}, -{0x34, 0x5a,}, -{0x35, 0x7c,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, /*RGMA,Outdoor*/ -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, /*BGMADark*/ -{0x70, 0x00,}, -{0x71, 0x07,}, -{0x72, 0x1a,}, -{0x73, 0x35,}, -{0x74, 0x5a,}, -{0x75, 0x7c,}, -{0x76, 0x96,}, -{0x77, 0xa9,}, -{0x78, 0xb7,}, -{0x79, 0xc6,}, -{0x7a, 0xd2,}, -{0x7b, 0xdc,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resolcontrol*/ -{0x60, 0xc5,}, /*edgeevenframe|16bitresol|whiteedgecnt|sceneresolenable*/ -{0x61, 0x04,}, /*evenframeupdate*/ -{0x64, 0x08,}, /*0x6435,edgeth1H*/ -{0x65, 0x00,}, /*edgeth1L*/ -{0x66, 0x26,}, /*edgeth2H*/ -{0x67, 0x00,}, /*edgeth2L*/ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flatcenterGb/Gr*/ -{0x74, 0x02,}, /*detslopeen|gausianfilter*/ -{0x75, 0x0d,}, /*1Dnegativegaindet09*/ -{0x76, 0x0d,}, /*1Dpostivegaindet08*/ -{0x77, 0x10,}, /*1Dhclp2det*/ -{0x78, 0x08,}, /*outdoorflatthreshold*/ -{0x79, 0x10,}, /*indoorflatthreshold*/ -{0x81, 0xdf,}, /*detgaincontroler*/ -{0x86, 0x90,}, /*2Dnegativegaindet*/ -{0x87, 0x90,}, /*2Dpostivegaindet*/ -{0x96, 0x2a,}, /*2Dhclp2det*/ -{0x03, 0x12,}, /*0x12page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, /*PAGE20START*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,}, /*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /*add20120223*/ -{0x29, 0x0d,}, /*20100305ad->0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /*add20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x1a,}, -{0x57, 0x80,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x40,}, /*6c*/ -{0x71, 0x82,}, /*82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x91,}, -{0x78, 0x22,}, /*24*/ -{0x79, 0x2b,}, /*YTarget70=>25,72=>26*/ -{0x7a, 0x23,}, /*23*/ -{0x7b, 0x22,}, /*22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, //EXPMin 8125.00 fps -{0x87, 0x90,}, -{0x88, 0x04,}, //EXP Max 60hz 12.00 fps -{0x89, 0x1e,}, -{0x8a, 0xb0,}, -{0xa5, 0x04,}, //EXP Max 50hz 11.11 fps -{0xa6, 0x73,}, -{0xa7, 0x10,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0x90,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x91, 0x04,}, //EXP Fix 10.00 fps -{0x92, 0xf5,}, -{0x93, 0x88,}, -{0x9c, 0x0a,}, //EXP Limit 1250.00 fps -{0x9d, 0x28,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /*aeenable*//*PAGE20END*//*AE_Weight*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, /*PAGE22START*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /*LowOn*/ -{0x20, 0x30,}, /*forwbspeed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /*fortracking20120314*/ -{0x30, 0x80,}, /*20120224test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /*33*/ -{0x42, 0x22,}, /*22*/ -{0x43, 0xf3,}, /*f6*/ -{0x44, 0x54,}, /*44*/ -{0x45, 0x22,}, /*33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /*3a*/ -{0x83, 0x56,}, /*RMax*/ -{0x84, 0x20,}, /*RMin*/ -{0x85, 0x54,}, /*BMax*/ -{0x86, 0x20,}, /*BMin*/ -{0x87, 0x46,}, -{0x88, 0x36,}, -{0x89, 0x3a,}, -{0x8a, 0x2f,}, -{0x8b, 0x3d,}, -{0x8c, 0x37,}, -{0x8d, 0x35,}, -{0x8e, 0x32,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /*1500fps*/ -{0xa5, 0x44,}, /*700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /*lowtempRgain*/ -{0xb0, 0x28,}, /*lowtempRgain*/ -{0xb1, 0x00,}, /*0x20->0x000405modify*/ -{0xb4, 0xbf,}, /*fortracking20120314*/ -{0xb8, 0xa1,}, /*a2:b-2,R+2b4B-3,R+4lowtempb0a1SpecAWBAmodify*/ -{0xb9, 0x00,}, /*PAGE22END*//*PAGE48(MiPi1600x1200)*/ -{0x03, 0x00,}, /*PLLSetting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, /*MIPITXSetting*/ -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x28,}, /*400ms Delay*/ - -}; - -#endif - -static struct msm_camera_i2c_reg_conf sr130pc20_camcorder_mode[] = { -/*0 Page*/ -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,},/*Don't touch*/ -{0x09, 0x37,},/*Don't touch*/ -{0x0a, 0x33,},/*Don't touch*/ -/*PLL Setting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x97,}, /*xy flip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 150*/ -{0x43, 0x96,}, -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -/*--------------- BLC*/ -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe0,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -/*Dark BLC*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -/*Normal BLC*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -/*Out BLC*/ -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -/*2 Page*/ -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,},/*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,},/*Don't touch*/ -{0x1F, 0x10,},/*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, -/*DCDC */ -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe0,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x41, 0x0a,}, -{0x48, 0x80,}, /*Contrast (Y = constrast * (Y - 128) + 128)/86 */ -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x07,}, /*out color sat en[7] | auto color decrement en[1] | manual color sat en[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0x80,}, /*auto decresment on AG th*/ -{0x64, 0xff,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x13,}, /*Outdoor saturation B/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -/* Hi 163 */ -/* PAGE 10 START*/ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -/*DPC_CTRL*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -/*C-filter(Out2&Out1)*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -/*C-filter(Indoor&Dark3)*/ -{0x72, 0x10,}, -{0x73, 0x0a,}, -/*C-filter(Dark2&Dark1)*/ -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -/*DPC-Dark1,2,3*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -/*Blue Det..*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 {0x40, 0x->2}3 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,},/*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,},/*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,},/*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -/*interpolated with average*/ -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M */ -{0x18, 0x30,}, /*added option 1.3M */ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -/*1D Edge*/ -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -/*Indoor Edge*/ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, /* mid nega */ -{0x60, 0x12,}, /* mid pos */ -{0x5e, 0x0a,}, /* low nega */ -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ - /* 2DY*/ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -/* PAGE 14 START*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x60,}, /*R min's set 4e*/ -{0x41, 0x44,}, /*Gr*/ -{0x42, 0x3e,}, /*B*/ -{0x43, 0x44,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -/*CMC*/ -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x37,}, -{0x34, 0x5c,}, -{0x35, 0x7d,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x07,}, -{0x71, 0x1a,}, -{0x72, 0x2d,}, -{0x73, 0x46,}, -{0x74, 0x6a,}, -{0x75, 0x86,}, -{0x76, 0x9c,}, -{0x77, 0xad,}, -{0x78, 0xbc,}, -{0x79, 0xc9,}, -{0x7a, 0xd4,}, -{0x7b, 0xde,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -/* PAGE 20 START*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,},/*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x19,}, -{0x57, 0x81,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x23,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, //EXPMin 8125.00 fps -{0x87, 0x90,}, -{0x88, 0x01,}, //EXP Max 60hz 30.00 fps -{0x89, 0xa5,}, -{0x8a, 0xe0,}, -{0xa5, 0x01,}, //EXP Max 50hz 25.00 fps -{0xa6, 0xfa,}, -{0xa7, 0x40,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0x90,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x91, 0x01,}, //EXP Fix 25.00 fps -{0x92, 0xfd,}, -{0x93, 0x60,}, -{0x9c, 0x08,}, //EXP Limit 1477.27 fps -{0x9d, 0x98,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -/* PAGE 20 END*/ -/*AE_Weight*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -/* PAGE 22 START*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe3,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x53,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x45,}, -{0x88, 0x3a,}, -{0x89, 0x33,}, -{0x8a, 0x2c,}, -{0x8b, 0x42,}, -{0x8c, 0x3d,}, -{0x8d, 0x30,}, -{0x8e, 0x2c,}, -{0x8f, 0x5d,}, -{0x90, 0x5a,}, -{0x91, 0x56,}, -{0x92, 0x50,}, -{0x93, 0x48,}, -{0x94, 0x3f,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xb1,}, /* a2: b-2, R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -/* PAGE 22 END*/ -/* PAGE 48 (MiPi 1600x1200)*/ -{0x03, 0x00,}, -/* PLL Setting */ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, /*20ms Delay*/ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Preview[] = { -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll Off*/ -{0x03, 0x20,}, -{0x10, 0x1c,},/*AE off (0x0c:60Hz 0x1c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x11,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x17,}, -{0xd5, 0x0f,}, -{0xd7, 0xff,}, -{0x03, 0x13,}, -{0x10, 0xc4,}, -{0x80, 0xc0,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x10, 0x9c,}, /*AE ON (0x8c:60Hz 0x9c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, /*AWB ON*/ -{0x03, 0x00,}, /*Page 0 PLL on*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x32,}, -}; - - -static struct msm_camera_i2c_reg_conf sr130pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_none[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x13, 0x02,}, -{0x40, 0x80,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_gray[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_sepia[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x70,}, /*Cb constant */ -{0x45, 0x98,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_negative[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*0x03 default */ -{0x12, 0x38,}, /*0x30 default */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -/* WhiteBalance Mode */ -static struct msm_camera_i2c_reg_conf sr130pc20_wb_auto[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x52,}, -{0x86, 0x20,}, -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_sunny[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x38,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x35,}, /*b gain */ -{0x83, 0x3b,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x38,}, /*b gain max */ -{0x86, 0x31,}, /*b gain min */ -{0x10, 0xeb,}, - -}; - - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_cloudy[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x50,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x28,}, /*b gain */ -{0x83, 0x52,}, /*r gain max */ -{0x84, 0x4c,}, /*r gain min */ -{0x85, 0x2c,}, /*b gain max */ -{0x86, 0x22,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_fluorescent[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x37,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x48,}, /*b gain */ -{0x83, 0x39,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x4a,}, /*b gain max */ -{0x86, 0x45,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_tungsten[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x21,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x4f,}, /*b gain */ -{0x83, 0x27,}, /*r gain max */ -{0x84, 0x1b,}, /*r gain min */ -{0x85, 0x59,}, /*b gain max */ -{0x86, 0x50,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xB0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xA0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0x90,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x10,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_yuv.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_yuv.c deleted file mode 100755 index d7c3b8dc4d9b..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr130pc20_yuv.c +++ /dev/null @@ -1,782 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#endif - -#include "sr130pc20.h" -#include "sr130pc20_regs.h" - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifdef CONFIG_LOAD_FILE -#define SR130PC20_WRITE_LIST(A) \ - sr130pc20_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR130PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ ****** %s", #A) -#endif - -static struct yuv_ctrl sr130pc20_ctrl; -//static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr130pc20_regs_table; -static int sr130pc20_regs_table_size; -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr130pc20_regs_table_init(char *filename); -void sr130pc20_regs_table_exit(void); -#endif - -// maximum number of chipid and slaveid pairs -// please change accordingly when you add more pairs -#define MAX_NUM_PAIRS 1 - -// Set of chipid and slaveid pairs not including the latest. -// Order: Latest but one to the oldest -// The latest values will be in the sensor lib file -// index 0 - chipid -// index 1 - slaveid -static uint16_t ids[MAX_NUM_PAIRS][2] = {{0xC1,0x40},}; - -int sr130pc20_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t i; - uint16_t chipid = 0; - const char *sensor_name = NULL; - struct msm_camera_slave_info *slave_info = NULL; - struct msm_camera_i2c_client *sensor_i2c_client = NULL; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n",__func__, __LINE__, - sensor_i2c_client, slave_info,sensor_name); - return -EINVAL; - } - - printk("%s:%d sensor[%s] sid = 0x%X sensorid = 0x%X DATA TYPE = %d\n E", - __func__, __LINE__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - msleep(50); - sensor_i2c_client->i2c_func_tbl->i2c_read(sensor_i2c_client, - slave_info->sensor_id_reg_addr, - &chipid, data_type); - printk("%s chipid read[%x] expected[%x]\n", __func__, chipid, slave_info->sensor_id); - - if(chipid!=slave_info->sensor_id){ - pr_err("[SR130PC20] %s: chipid read=%x did not match with chipid=%x", - __func__, chipid, slave_info->sensor_id); - - for( i=0; icci_client->sid = ids[i][1] >> 1; - sensor_i2c_client->i2c_func_tbl->i2c_read(sensor_i2c_client, - slave_info->sensor_id_reg_addr, - &chipid, data_type); - if(chipid == ids[i][0]){ - break; - } - pr_err("%s: chipid read=%x did not match with chipid=%x", - __func__, chipid, ids[i][0]); - } - } - - CDBG("%s sensor_name =%s slaveid = 0x%X sensorid = 0x%X DATA TYPE = %d\n", - __func__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - return 0; -} - -int32_t sr130pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M4); - break; - case CAMERA_EV_M3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M3); - break; - case CAMERA_EV_M2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M2); - break; - case CAMERA_EV_M1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - //CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_default); - break; - case CAMERA_EV_P1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P1); - break; - case CAMERA_EV_P2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P2); - break; - case CAMERA_EV_P3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P3); - break; - case CAMERA_EV_P4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P4); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_tungsten); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_sunny); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr130pc20_ctrl.vtcall_mode == 1) { - SR130PC20_WRITE_LIST(sr130pc20_Preview); - CDBG("VT Init Settings"); - }else { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - CDBG("Init settings"); - } - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - CDBG("Stop Stream Settings"); - } - return 0; -} - -int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - rc = SR130PC20_WRITE_LIST(sr130pc20_Snapshot); - break; - default: - rc = SR130PC20_WRITE_LIST(sr130pc20_Preview); - pr_err("%s: Setting %d is sr130pc20_Preview\n", __func__, mode); - } - return rc; -} - -int32_t sr130pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_none); - break; - case CAMERA_EFFECT_MONO: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr130pc20_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr130pc20_ctrl.exif_iso; - exif_info->value_3 = sr130pc20_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr130pc20_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - uint16_t gain_value = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x80, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x81, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x82, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr130pc20_ctrl.exif_shutterspeed = 24000000 / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xb0, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - gain_value =((read_value4 * 1000) / 32) + 500; - if (gain_value < 1250) - sr130pc20_ctrl.exif_iso= 50; - else if (gain_value < 1750) - sr130pc20_ctrl.exif_iso = 100; - else if (gain_value < 2500) - sr130pc20_ctrl.exif_iso = 200; - else if (gain_value < 3750) - sr130pc20_ctrl.exif_iso = 400; - else if (gain_value < 5500) - sr130pc20_ctrl.exif_iso = 800; - else - sr130pc20_ctrl.exif_iso = 1600; - - pr_info("sr130pc20_set_exif: ISO = %d shutter speed = %d",sr130pc20_ctrl.exif_iso,sr130pc20_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", - cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - pr_err("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr130pc20_Init_Reg"); - sr130pc20_ctrl.vtcall_mode = 0; -#ifdef CONFIG_LOAD_FILE /* this call should be always called first */ - sr130pc20_regs_table_init("/data/sr130pc20_regs.h"); - pr_err("/data/sr130pc20_regs.h inside CFG_SET_INIT_SETTING"); -#endif - break; - case CFG_SET_RESOLUTION: - sr130pc20_set_Init_reg(s_ctrl); - resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , resolution); - break; - case CFG_SET_STOP_STREAM: - CDBG(" CFG_SET_STOP_STREAM writing stop stream registers: sr130pc20_stop_stream"); - if(sr130pc20_ctrl.streamon == 1){ - rc = SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - sr130pc20_ctrl.streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM writing start stream registers: sr130pc20_start_stream start"); - switch(sr130pc20_ctrl.op_mode) { - case CAMERA_MODE_PREVIEW: - { - CDBG(" CFG_SET_START_STREAM: Preview"); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_RECORDING) { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - } - if(sr130pc20_ctrl.prev_mode != CAMERA_MODE_CAPTURE) { - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - } - sr130pc20_set_resolution(s_ctrl , resolution ); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - msleep(200); - } - } - break; - case CAMERA_MODE_CAPTURE: - { - sr130pc20_set_resolution(s_ctrl , resolution ); - sr130pc20_set_exif(s_ctrl); - } - break; - case CAMERA_MODE_RECORDING: - { - SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode); - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - } - break; - } - sr130pc20_ctrl.streamon = 1; - CDBG("CFG_SET_START_STREAM : sr130pc20_start_stream rc = %d", rc); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("i %d power setting %d %d %ld %d", - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAYn"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP"); - sr130pc20_ctrl.streamon = 0; - sr130pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr130pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN"); - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; - #ifdef CONFIG_LOAD_FILE - sr130pc20_regs_table_exit(); - #endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - - -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("cam_info values = %d : %d : %d : %d : %d\n", - cam_info->mode, cam_info->address, cam_info->value_1, - cam_info->value_2 , cam_info->value_3); - switch (cam_info->mode) { - case EXT_CAM_EV: - sr130pc20_ctrl.settings.exposure = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_exposure_compensation(s_ctrl, sr130pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr130pc20_ctrl.settings.wb = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_white_balance(s_ctrl, sr130pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr130pc20_ctrl.settings.effect = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_effect(s_ctrl, sr130pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr130pc20_ctrl.prev_mode = sr130pc20_ctrl.op_mode; - sr130pc20_ctrl.op_mode = cam_info->value_1; - pr_err("EXT_CAM_SENSOR_MODE = %d", sr130pc20_ctrl.op_mode); - case EXT_CAM_EXIF: - sr130pc20_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_VT_MODE: - CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1); - sr130pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB = %d\n", (cam_info->value_1)); - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -void sr130pc20_set_default_settings(void) -{ - sr130pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr130pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr130pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr130pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr130pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr130pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; -} - -#ifdef CONFIG_LOAD_FILE -void sr130pc20_regs_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sr130pc20_regs_table) { - vfree(sr130pc20_regs_table); - sr130pc20_regs_table = NULL; - } -} - -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - - if (settings != NULL){ - pr_err("sr130pc20_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(sr130pc20_regs_table == NULL) { - pr_err("sr130pc20_regs_table is null "); - return -1; - } - start = strstr(sr130pc20_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error"); - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error"); - if (reg) - start = (reg + 14); - if (addr == 0xff){ - usleep_range(value * 10, (value* 10) + 10); - pr_err("delay = %d\n", (int)value*10); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr130pc20_regs_from_sd_tunning end!"); - return rc; -} - -void sr130pc20_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld\n",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to else part of string compare sr130pc20_regs_table"); - sr130pc20_regs_table = dp; - sr130pc20_regs_table_size = lsize; - *((sr130pc20_regs_table + sr130pc20_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20.h deleted file mode 100755 index 7a22c0b1b4ec..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __sr200pc20_H__ -#define __sr200pc20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef sr200pc20_DEBUG -#undef CDBG -#define sr200pc20_DEBUG -#ifdef sr200pc20_DEBUG -#define CDBG(fmt, args...) printk("[sr200pc20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.c b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.c deleted file mode 100755 index d487933142b3..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.c +++ /dev/null @@ -1,697 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "sr200pc20.h" -#if defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "sr200pc20_yuv_gte.h" -#else -#include "sr200pc20_yuv.h" -#endif - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define SR200PC20_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define SR200PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl sr200pc20_ctrl; -static exif_data_t sr200pc20_exif; - -bool init_setting_write = FALSE; - -#if defined CONFIG_SEC_CAMERA_TUNING -#if defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_gte.h" -#else -#define FILENAME "/data/sr200pc20_yuv.h" -#endif -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif -static int32_t streamon = 0; -static int32_t recording = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -static int sr200pc20_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 read_value3 = 0; - int OPCLK = 26000000; - int rc = 0; - - /* Exposure Time */ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x80,&read_value1,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x81,&read_value2,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x82,&read_value3,MSM_CAMERA_I2C_BYTE_DATA); - if(read_value1 == 0 && read_value2 == 0 && read_value3 == 0) - { - pr_err("%s::%d read_value1=%d read_value2=%d read_value3=%d " - ,__func__,__LINE__,read_value1,read_value2,read_value3); - rc = -EFAULT; - } - else - { - sr200pc20_exif.shutterspeed = OPCLK / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - CDBG("Exposure time = %d", sr200pc20_exif.shutterspeed); - } - return rc; -} - -static int sr200pc20_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value4 = 0; - unsigned short gain_value; - - /* ISO*/ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0xb0,&read_value4,MSM_CAMERA_I2C_BYTE_DATA); - - gain_value = (read_value4 / 32) * 1000 +500; - if (gain_value < 1140) - sr200pc20_exif.iso = 50; - else if (gain_value < 2140) - sr200pc20_exif.iso = 100; - else if (gain_value < 2640) - sr200pc20_exif.iso = 200; - else if (gain_value < 7520) - sr200pc20_exif.iso = 400; - else - sr200pc20_exif.iso = 800; - - CDBG("ISO = %d", sr200pc20_exif.iso); - - return 0; -} - -void sr200pc20_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - CDBG("E"); - - /*Exif data*/ - sr200pc20_exif_shutter_speed(s_ctrl); - sr200pc20_exif_iso(s_ctrl); - CDBG("exp_time : %d -- iso_value : %d",sr200pc20_exif.shutterspeed, sr200pc20_exif.iso); - return; -} - -int32_t sr200pc20_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr200pc20_exif.iso; - exif_info->value_3 = sr200pc20_exif.shutterspeed; - return 0; -} - -int32_t sr200pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M4); - break; - case CAMERA_EV_M3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M3); - break; - case CAMERA_EV_M2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M2); - break; - case CAMERA_EV_M1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - SR200PC20_WRITE_LIST(sr200pc20_brightness_default); - break; - case CAMERA_EV_P1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P1); - break; - case CAMERA_EV_P2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P2); - break; - case CAMERA_EV_P3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P3); - break; - case CAMERA_EV_P4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P4); - break; - default: - CDBG("Setting %d is invalid", mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - SR200PC20_WRITE_LIST(sr200pc20_WB_Auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - SR200PC20_WRITE_LIST(sr200pc20_Capture); - sr200pc20_get_exif(s_ctrl); - break; - default: -#if 0 - if (init_setting_write) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - init_setting_write = FALSE; - } -#endif - if (mode == MSM_SENSOR_RES_QTR) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_60hz); - } - } -#if 0 - else if (mode == MSM_SENSOR_RES_2) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#endif - //rc = msm_sensor_driver_WRT_LIST(s_ctrl,sr200pc20_800x600_Preview); - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc=0; - } - return rc; -} - -int32_t sr200pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Normal); - break; - case CAMERA_EFFECT_MONO: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Gray); - break; - case CAMERA_EFFECT_NEGATIVE: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Negative); - break; - case CAMERA_EFFECT_SEPIA: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - sr200pc20_ctrl.vtcall_mode = 0; -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune) { - register_table_init(FILENAME); - pr_err("/data/sr200pc20_yuv.h inside CFG_SET_INIT_SETTING"); - } -#endif - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr200pc20_Init_Reg \n"); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - - break; - case CFG_SET_RESOLUTION: - resolution = *((int32_t *)cdata->cfg.setting); - if (sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr200pc20_ctrl.vtcall_mode) { - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_50Hz); - } else { - pr_err("%s : %d 60Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - break; - }else { -#if 0 - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } -#endif - CDBG("Init settings"); - } - } - CDBG("CFG_SET_RESOLUTION *** res = %d" , resolution); - if( sr200pc20_ctrl.op_mode == CAMERA_MODE_RECORDING ) { - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_50hz); - } else { - pr_err("%s : %d 60Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_60hz); - } -#if 0 - CDBG("CFG_SET_RESOLUTION recording START recording =1 *** res = %d" , resolution); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - -#endif - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - recording = 1; - }else{ - if(recording == 1){ - CDBG("CFG_SET_RESOLUTION recording STOP recording =1 *** res = %d" , resolution); - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - recording = 0; - }else if( sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT ){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } else{ - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - SR200PC20_WRITE_LIST(sr200pc20_stop_stream); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); -#if 0 - if( sr200pc20_ctrl.op_mode != CAMERA_MODE_CAPTURE){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - } -#endif - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - streamon = 0; - sr200pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr200pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr200pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr200pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr200pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr200pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_exit(); - } -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - /* CDBG("cam_info values = %d : %d : %d : %d : %d", cam_info->mode, cam_info->address,\ - cam_info->value_1, cam_info->value_2 , cam_info->value_3); */ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr200pc20_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_exposure_compensation(s_ctrl, sr200pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr200pc20_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_white_balance(s_ctrl, sr200pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr200pc20_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_effect(s_ctrl, sr200pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr200pc20_ctrl.prev_mode = sr200pc20_ctrl.op_mode; - sr200pc20_ctrl.op_mode = cam_info->value_1; - /*CDBG("EXT_CAM_SENSOR_MODE = %d", sr200pc20_ctrl.op_mode);*/ - break; - case EXT_CAM_EXIF: - sr200pc20_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - /*CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1);*/ - sr200pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.h deleted file mode 100755 index ba58a5cedad4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv.h +++ /dev/null @@ -1,9650 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler 0ff */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x68,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xe0,}, /* Threshold Dyoffset f0 - > e0 */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 7.14 fps -{0x89, 0xf1,}, -{0x8a, 0x58,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800 x 600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, /* BLC_TIME_TH_ON */ -{0x91, 0x11,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x11,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xe0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x07,}, //EXP Max 7.06 fps -{0x89, 0x00,}, -{0x8a, 0xf8,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x10,}, -{0x1e, 0x08,}, -{0x1f, 0x05,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial tart */ -/* PAGE 0 SART */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 2011092904 -> {0x02, 0x */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 2011092914 -> {0x0a, 0x */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, 0x c}ontinuous -> {0x00, 0x n}ot Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv_gte.h b/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv_gte.h deleted file mode 100755 index 69cc3b3638a4..000000000000 --- a/drivers/media/platform/msm/camera_v2_fortuna/sensor/sr200pc20_yuv_gte.h +++ /dev/null @@ -1,13048 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[] = { -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{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, 0x08,}, //BLC_TIME_TH_ON -{0x91, 0x08,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, //DCDC_TIME_TH_ON -{0xd5, 0x08,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x02,}, //EXP Max 17.14 fps -{0x89, 0xe2,}, -{0x8a, 0x48,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x91, 0x03,}, //EXP Fix 15.01 fps -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2x */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.33 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 404 -{0x41, 0x94,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, //BLC_TIME_TH_ON -{0x91, 0x11,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, //DCDC_TIME_TH_ON -{0xd5, 0x11,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, //EXPMin 6360.08 fps -{0x87, 0xff,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xc0,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0xcb,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x73,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 530.01 fps -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ -{0x14, 0x00,}, - - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x04,}, /* 0x03->0x04 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x03,}, /* BLC_TIME_TH_ON */ -{0x91, 0x03,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x03,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x03,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -{0x03, 0x11,}, -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x09,}, -{0x34, 0x06,}, -{0x35, 0x03,}, -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, -{0x03, 0x13,}, -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/Kconfig b/drivers/media/platform/msm/camera_v2_j5/Kconfig deleted file mode 100644 index cc8e01b44c9c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/Kconfig +++ /dev/null @@ -1,341 +0,0 @@ -config MSM_CAMERA_SENSOR - bool "Qualcomm MSM camera sensor support" - depends on MSMB_CAMERA - ---help--- - This flag enables support for Camera Sensor. - The sensor driver is capable of providing real time - data for camera support. The driver support V4L2 - subdev APIs. - -config MSM_CPP - bool "Qualcomm MSM Camera Post Processing Engine support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Post-processing Engine - The Post processing engine is capable of scaling - and cropping image. The driver support V4L2 subdev - APIs. - -config MSM_CCI - bool "Qualcomm MSM Camera Control Interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Control Interface driver only - for those platforms that have hardware support. This driver - is responsible for handling I2C read and write on the I2C - bus. It is also responsible for synchronization with - GPIO and data frames. - -config MSM_CSI20_HEADER - bool "Qualcomm MSM CSI 2.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8960, - 8930 and 8064 platforms. - -config MSM_CSI22_HEADER - bool "Qualcomm MSM CSI 2.2 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.2 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8610 - platform. - -config MSM_CSI30_HEADER - bool "Qualcomm MSM CSI 3.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - 8064 platforms. - -config MSM_CSI31_HEADER - bool "Qualcomm MSM CSI 3.1 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - APQ8084 platform. - -config MSM_CSIPHY - bool "Qualcomm MSM Camera Serial Interface Physical receiver support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface - Physical receiver. It deserializes packets and - supports detection of packet start and stop - signalling. - -config MSM_CSID - bool "Qualcomm MSM Camera Serial Interface decoder support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface decoder. - It supports lane merging and decoding of packets - based on cid which is mapped to a virtual channel - and datatype. - -config MSM_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_OTP - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data - -config MSM_ISPIF - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of CSID can be routed to of of pixel or raw - data interface in VFE. - -config MSM_ISPIF_V1 - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of MSM_CSI22_HEADER can be routed to of pixel - or raw data interface in VFE. - -config IMX134 - bool "Sensor IMX134 (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - Sony 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - HFR @60fps and @120fps, - Video HDR support. - -config CAMERA_SYSFS_V2 - bool "CAMERA SYS" - depends on MSMB_CAMERA - ---help--- - CAMERA SYS. - -config IMX132 - bool "Sensor IMX132 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - Sony 2 MP Bayer Sensor with auto focus, uses - 2 mipi lanes, preview config = 1920 x 1080 at 30 fps, - snapshot config = 1920 x 1080 at 30 fps, - Video HDR support. - -config IMX219 - bool "Sensor IMX219 (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - Sony 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps. - -config OV9724 - bool "Sensor OV9724 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config HI256 - bool "Hynix hi256 (YUV 2MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV5648 - bool "Sensor OV5648 (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 5 MP Bayer Sensor, only use 1 mipi lane, - preview set to 1296*972 at 30 fps, - snapshot set to 2592*1944 at 12 fps, - This sensor driver does not support auto focus. - -config MT9M114 - bool "Sensor MT9M114 (YUV 1.26MP)" - depends on MSMB_CAMERA - ---help--- - MT9M114 is Aptina YUV sensor. It supports 1.26 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. -config OV5645 - bool "Sensor OV5645 (YUV 5.0MP)" - depends on MSMB_CAMERA - ---help--- - OV5645 is Omnivision YUV sensor. It supports 5.0 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. - -config SR200PC20 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 2.0MP sensor, - Front sensor. -config SR544 - bool "Sensor for back camera" - depends on MSMB_CAMERA - default n - ---help--- - 5MP sensor - Rear sensor - -config SP1628 - bool "Sensor SP1628 (YUV 720P)" - depends on MSMB_CAMERA - ---help--- - SP1628 is SuperPix YUV sensor. It supports 720P preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like mono. - -config GC0339 - bool "Sensor GC0339 (BAYER .3M)" - depends on MSMB_CAMERA - ---help--- - gc0339 is a Galaxycore .3 MP Bayer Sensor. - It supports 1 or 2 mipi lanes. - Preview and snapshot resolution shall be 640*480 at 30 fps, - It does not support auto focus. - -config OV8825 - bool "OmniVision OV8825 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV8865 - bool "OmniVision OV8865 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 30 fps. - Max fps is 30fps at 3264 * 2448, 60fps at 1632 * 1224 - -config s5k4e1 - bool "Sensor s5k4e1 (BAYER 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP Bayer Sensor. It uses 2 mipi lanes, - supports 720P preview at 30 fps - and QSXGA snapshot at 15 fps. - This sensor driver does not support auto focus. - -config S5K8B1YX - bool "Sensor S5K8B1YX (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - LSI 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config S5K6A3YX - bool "Sensor S5K6A3YX (BAYER 1.9M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 2 MP Bayer Sensor, supports 2 mipi lanes, - -config S5K4H5YB - bool "Sensor S5K4H5YB (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - -config S5K3L2XX - bool "Sensor S5K3L2XX (BAYER 13M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 13MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K5E3YX - bool "Sensor S5K5E3YX (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config OV12830 - bool "OmniVision OV12830 (BAYER 12MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 12.8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 2112 * 1500 at 30 fps, - snapshot config = 4224 * 3000 at 15 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config MSM_V4L2_VIDEO_OVERLAY_DEVICE - tristate "Qualcomm MSM V4l2 video overlay device" - ---help--- - Enables support for the MSM V4L2 video - overlay driver. This allows video rendering - apps to render overlaid video using Video4Linux2 - APIs, by using /dev/videoX device - -config MSMB_JPEG - tristate "Qualcomm MSM Jpeg Encoder Engine support" - depends on MSMB_CAMERA && (ARCH_MSM8974 || ARCH_MSM8226 || ARCH_APQ8084 || ARCH_MSM8916 || ARCH_MSM) - ---help--- - Enable support for Jpeg Encoder/Decoder - Engine for 8974. - This module serves as the common driver - for the JPEG 1.0 encoder and decoder. - -config MSM_GEMINI - tristate "Qualcomm MSM Gemini JPEG engine support" - depends on MSMB_CAMERA && (ARCH_MSM7X30 || ARCH_MSM8X60 || ARCH_MSM8960) - ---help--- - Enables support for the Gemini JPEG encoder engine for 8x60. - -config SEC_CAMERA_TUNING - bool "Generic Tuning Concept" - ---help--- - Enable support for Tuning in eng Binary - -config CAM_USE_EXT_VANA_GPIO - bool "Samsung EXT_VANA_GPIO" - depends on MSMB_CAMERA - ---help--- - Board use external LDO controlled by GPIO. - -config CAM_USE_GPIO_I2C - bool "Samsung GPIO_I2C" - depends on MSMB_CAMERA - ---help--- - Board use controlled by GPIO. - diff --git a/drivers/media/platform/msm/camera_v2_j5/Makefile b/drivers/media/platform/msm/camera_v2_j5/Makefile deleted file mode 100644 index 732cb9a46137..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/codecs -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/isps -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/pproc -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/jpeg_10 - -obj-$(CONFIG_MSMB_CAMERA) += msm.o -obj-$(CONFIG_MSMB_CAMERA) += cam_dummy.o -obj-$(CONFIG_MSMB_CAMERA) += camera/ -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2/ -obj-$(CONFIG_MSMB_CAMERA) += sensor/ -obj-$(CONFIG_MSMB_CAMERA) += pproc/ -obj-$(CONFIG_MSMB_CAMERA) += isp/ -obj-$(CONFIG_MSMB_CAMERA) += ispif/ -obj-$(CONFIG_MSMB_JPEG) += jpeg_10/ -obj-$(CONFIG_MSMB_CAMERA) += msm_buf_mgr/ diff --git a/drivers/media/platform/msm/camera_v2_j5/cam_dummy.c b/drivers/media/platform/msm/camera_v2_j5/cam_dummy.c deleted file mode 100755 index 7c2a73a20f0b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/cam_dummy.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" - -static struct v4l2_device *msm_v4l2_dev; -/* static struct msm_cam_dummy_queue cam_dummy_queue; */ - -#if defined CONFIG_SEC_CAMERA_TUNING -int rear_tune; -int front_tune; -#endif - -static int msm_open_cam_dummy(struct file *fp) -{ - int rc; - - pr_err("%s: E\n", __func__); - rc = msm_cam_get_module_init_status(); - pr_err("%s: X %d\n", __func__, rc); - return rc; -} - -#if !defined CONFIG_SEC_CAMERA_TUNING -static long msm_ioctl_cam_dummy(struct file *fp, unsigned int cmd, - unsigned long arg) -{ - return 0; -} -#endif -static int msm_close_cam_dummy(struct file *f) -{ - return 0; -} - -static struct v4l2_file_operations msm_fops_config = { - .owner = THIS_MODULE, - .open = msm_open_cam_dummy, - .release = msm_close_cam_dummy, -#if defined CONFIG_SEC_CAMERA_TUNING - .ioctl = video_ioctl2, -#else - .unlocked_ioctl = msm_ioctl_cam_dummy, -#endif -}; - -static const struct of_device_id cam_dummy_dt_match[] = { - {.compatible = "qcom,cam_dummy",}, - {} -}; - -MODULE_DEVICE_TABLE(of, cam_dummy_dt_match); - -static struct platform_driver cam_dummy_platform_driver = { - .driver = { - .name = "qcom,cam_dummy", - .owner = THIS_MODULE, - .of_match_table = cam_dummy_dt_match, - }, -}; - -#if defined CONFIG_SEC_CAMERA_TUNING -static int msm_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - pr_err("%s TUNING CTRL : ctrl->value %d",__func__,ctrl->value); - if(ctrl->id >= V4L2_CID_PRIVATE_BASE) - { - switch (ctrl->value){ - case NORMAL_MODE : - rear_tune = 0; - front_tune = 0; - pr_err("%s TUNING CTRL : Setting Normal Binary",__func__); - break; - case REAR_TUNING : - rear_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear Tuning Binary",__func__); - break; - case FRONT_TUNING : - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Front Tuning Binary",__func__); - break; - case REAR_FRONT_TUNING : - rear_tune = 1; - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear and Front Tuning Binary",__func__); - break; - } - } - return rc; -} - -static const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = { - .vidioc_s_ctrl = msm_v4l2_s_ctrl, -}; -#endif - -static int32_t cam_dummy_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - struct msm_video_device *pvdev; - - /* init_waitqueue_head(&cam_dummy_queue.state_wait);*/ - pr_err("%s:%d\n", __func__, __LINE__); - match = of_match_device(cam_dummy_dt_match, &pdev->dev); - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CAMERA_DUMMY_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-camdummy", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops_config; -#if defined CONFIG_SEC_CAMERA_TUNING - pvdev->vdev->ioctl_ops = &msm_v4l2_ioctl_ops; -#endif - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static int __init cam_dummy_init_module(void) -{ - int32_t rc = 0; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&cam_dummy_platform_driver, - cam_dummy_platform_probe); - pr_err("%s:%d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static void __exit cam_dummy_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - platform_driver_unregister(&cam_dummy_platform_driver); - return; -} - -module_init(cam_dummy_init_module); -module_exit(cam_dummy_exit_module); -MODULE_DESCRIPTION("cam_dummy"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_j5/camera/Makefile b/drivers/media/platform/msm/camera_v2_j5/camera/Makefile deleted file mode 100644 index 95d899eff42e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/camera/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += camera.o diff --git a/drivers/media/platform/msm/camera_v2_j5/camera/camera.c b/drivers/media/platform/msm/camera_v2_j5/camera/camera.c deleted file mode 100644 index 742fab50359b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/camera/camera.c +++ /dev/null @@ -1,813 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "camera.h" -#include "msm.h" -#include "msm_vb2.h" - -#define fh_to_private(__fh) \ - container_of(__fh, struct camera_v4l2_private, fh) - -struct camera_v4l2_private { - struct v4l2_fh fh; - unsigned int stream_id; - unsigned int is_vb2_valid; /*0 if no vb2 buffers on stream, else 1*/ - struct vb2_queue vb2_q; -}; - -static void camera_pack_event(struct file *filep, int evt_id, - int command, int value, struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - /* always MSM_CAMERA_V4L2_EVENT_TYPE */ - event->type = MSM_CAMERA_V4L2_EVENT_TYPE; - event->id = evt_id; - event_data->command = command; - event_data->session_id = pvdev->vdev->num; - event_data->stream_id = sp->stream_id; - event_data->arg_value = value; -} - -static int camera_check_event_status(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - if (event_data->status > MSM_CAMERA_ERR_EVT_BASE) { - pr_err("%s : event_data status out of bounds\n", - __func__); - pr_err("%s : Line %d event_data->status 0X%x\n", - __func__, __LINE__, event_data->status); - return -EFAULT; - } - - return 0; -} - -static int camera_v4l2_querycap(struct file *filep, void *fh, - struct v4l2_capability *cap) -{ - int rc; - struct v4l2_event event; - - /* can use cap->driver to make differentiation */ - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_QUERY_CAP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - - return rc; -} - -static int camera_v4l2_s_crop(struct file *filep, void *fh, - const struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_crop(struct file *filep, void *fh, - struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_queryctrl(struct file *filep, void *fh, - struct v4l2_queryctrl *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->type == V4L2_CTRL_TYPE_MENU) { - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - ctrl->id, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, ctrl->id, -1, - &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data; - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, ctrl->id, - ctrl->value, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - event_data = (struct msm_v4l2_event_data *)event.u.data; - ctrl->value = event_data->ret_value; - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_reqbufs(struct file *filep, void *fh, - struct v4l2_requestbuffers *req) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_reqbufs(&sp->vb2_q, req); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_querybuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - return 0; -} - -static int camera_v4l2_qbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_qbuf(&sp->vb2_q, pb); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_dqbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_dqbuf(&sp->vb2_q, pb, filep->f_flags & O_NONBLOCK); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_streamon(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = vb2_streamon(&sp->vb2_q, buf_type); - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_ON, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - return rc; -} - -static int camera_v4l2_streamoff(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_OFF, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - vb2_streamoff(&sp->vb2_q, buf_type); - return rc; -} - -static int camera_v4l2_g_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = -EINVAL; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - struct v4l2_event event; - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = 0; - int i = 0; - struct v4l2_event event; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_v4l2_format_data *user_fmt; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - if (WARN_ON(!sp->vb2_q.drv_priv)) - return -ENOMEM; - - memcpy(sp->vb2_q.drv_priv, pfmt->fmt.raw_data, - sizeof(struct msm_v4l2_format_data)); - user_fmt = (struct msm_v4l2_format_data *)sp->vb2_q.drv_priv; - - pr_debug("%s: num planes :%c\n", __func__, - user_fmt->num_planes); - /*num_planes need to bound checked, otherwise for loop - can execute forever */ - if (WARN_ON(user_fmt->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - for (i = 0; i < user_fmt->num_planes; i++) - pr_debug("%s: plane size[%d]\n", __func__, - user_fmt->plane_sizes[i]); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - if (rc < 0) - return rc; - - sp->is_vb2_valid = 1; - } - - return rc; - -} - -static int camera_v4l2_try_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - return 0; -} - - -static int camera_v4l2_g_parm(struct file *filep, void *fh, - struct v4l2_streamparm *a) -{ - /* TODO */ - return 0; -} - -static int camera_v4l2_s_parm(struct file *filep, void *fh, - struct v4l2_streamparm *parm) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_NEW_STREAM, -1, &event); - - rc = msm_create_stream(event_data->session_id, - event_data->stream_id, &sp->vb2_q); - if (rc < 0) - return rc; - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - goto error; - - rc = camera_check_event_status(&event); - if (rc < 0) - goto error; - - /* use stream_id as stream index */ - parm->parm.capture.extendedmode = sp->stream_id; - - return rc; - -error: - msm_delete_stream(event_data->session_id, - event_data->stream_id); - return rc; -} - -static int camera_v4l2_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_subscribe(&sp->fh, sub, 5, NULL); - - return rc; -} - -static int camera_v4l2_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_unsubscribe(&sp->fh, sub); - - return rc; -} - -static const struct v4l2_ioctl_ops camera_v4l2_ioctl_ops = { - .vidioc_querycap = camera_v4l2_querycap, - .vidioc_s_crop = camera_v4l2_s_crop, - .vidioc_g_crop = camera_v4l2_g_crop, - .vidioc_queryctrl = camera_v4l2_queryctrl, - .vidioc_g_ctrl = camera_v4l2_g_ctrl, - .vidioc_s_ctrl = camera_v4l2_s_ctrl, - .vidioc_reqbufs = camera_v4l2_reqbufs, - .vidioc_querybuf = camera_v4l2_querybuf, - .vidioc_qbuf = camera_v4l2_qbuf, - .vidioc_dqbuf = camera_v4l2_dqbuf, - .vidioc_streamon = camera_v4l2_streamon, - .vidioc_streamoff = camera_v4l2_streamoff, - .vidioc_g_fmt_vid_cap_mplane = camera_v4l2_g_fmt_vid_cap_mplane, - .vidioc_s_fmt_vid_cap_mplane = camera_v4l2_s_fmt_vid_cap_mplane, - .vidioc_try_fmt_vid_cap_mplane = camera_v4l2_try_fmt_vid_cap_mplane, - - /* Stream type-dependent parameter ioctls */ - .vidioc_g_parm = camera_v4l2_g_parm, - .vidioc_s_parm = camera_v4l2_s_parm, - - /* event subscribe/unsubscribe */ - .vidioc_subscribe_event = camera_v4l2_subscribe_event, - .vidioc_unsubscribe_event = camera_v4l2_unsubscribe_event, -}; - -static int camera_v4l2_fh_open(struct file *filep) -{ - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp; - unsigned int stream_id; - - sp = kzalloc(sizeof(*sp), GFP_KERNEL); - if (!sp) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - filep->private_data = &sp->fh; - - /* stream_id = open id */ - stream_id = atomic_read(&pvdev->opened); - sp->stream_id = find_first_zero_bit( - &stream_id, MSM_CAMERA_STREAM_CNT_BITS); - pr_debug("%s: Found stream_id=%d\n", __func__, sp->stream_id); - - v4l2_fh_init(&sp->fh, pvdev->vdev); - v4l2_fh_add(&sp->fh); - - return 0; -} - -static int camera_v4l2_fh_release(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - if (sp) { - v4l2_fh_del(&sp->fh); - v4l2_fh_exit(&sp->fh); - } - - kzfree(sp); - return 0; -} - -static int camera_v4l2_vb2_q_init(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - struct vb2_queue *q = &sp->vb2_q; - - memset(q, 0, sizeof(struct vb2_queue)); - - /* free up this buffer when stream is done */ - q->drv_priv = - kzalloc(sizeof(struct msm_v4l2_format_data), GFP_KERNEL); - if (!q->drv_priv) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - q->mem_ops = msm_vb2_get_q_mem_ops(); - q->ops = msm_vb2_get_q_ops(); - - /* default queue type */ - q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - q->io_modes = VB2_USERPTR; - q->io_flags = 0; - q->buf_struct_size = sizeof(struct msm_vb2_buffer); - q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - return vb2_queue_init(q); -} - -static void camera_v4l2_vb2_q_release(struct file *filep) -{ - struct camera_v4l2_private *sp = filep->private_data; - - kzfree(sp->vb2_q.drv_priv); - vb2_queue_release(&sp->vb2_q); -} - -static int camera_v4l2_open(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int opn_idx, idx; - BUG_ON(!pvdev); - - rc = camera_v4l2_fh_open(filep); - if (rc < 0) { - pr_err("%s : camera_v4l2_fh_open failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto fh_open_fail; - } - - opn_idx = atomic_read(&pvdev->opened); - idx = opn_idx; - /* every stream has a vb2 queue */ - rc = camera_v4l2_vb2_q_init(filep); - if (rc < 0) { - pr_err("%s : vb2 queue init fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto vb2_q_fail; - } - - if (!atomic_read(&pvdev->opened)) { - pm_stay_awake(&pvdev->vdev->dev); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* Disable power collapse latency */ - msm_pm_qos_update_request(CAMERA_DISABLE_PC_LATENCY); -#endif - - /* create a new session when first opened */ - rc = msm_create_session(pvdev->vdev->num, pvdev->vdev); - if (rc < 0) { - pr_err("%s : session creation failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed\n", - __func__); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto command_ack_q_fail; - } - - camera_pack_event(filep, MSM_CAMERA_NEW_SESSION, 0, -1, &event); - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) { - pr_err("%s : posting of NEW_SESSION event failed\n", - __func__); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto post_fail; - } - - rc = camera_check_event_status(&event); - if (rc < 0) { - pr_err("%s : checking event status fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto post_fail; - } - } else { - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - } - pr_debug("%s: Open stream_id=%d\n", __func__, - find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - idx |= (1 << find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - atomic_cmpxchg(&pvdev->opened, opn_idx, idx); - return rc; - -post_fail: - msm_delete_command_ack_q(pvdev->vdev->num, 0); -command_ack_q_fail: - msm_destroy_session(pvdev->vdev->num); -session_fail: - pm_relax(&pvdev->vdev->dev); - camera_v4l2_vb2_q_release(filep); -vb2_q_fail: - camera_v4l2_fh_release(filep); -fh_open_fail: - return rc; -} - -static unsigned int camera_v4l2_poll(struct file *filep, - struct poll_table_struct *wait) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - if (sp->is_vb2_valid == 1) - rc = vb2_poll(&sp->vb2_q, filep, wait); - - poll_wait(filep, &sp->fh.wait, wait); - if (v4l2_event_pending(&sp->fh)) - rc |= POLLPRI; - - return rc; -} - -static int camera_v4l2_close(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - unsigned int opn_idx, mask; - BUG_ON(!pvdev); - - opn_idx = atomic_read(&pvdev->opened); - pr_debug("%s: close stream_id=%d\n", __func__, sp->stream_id); - mask = (1 << sp->stream_id); - opn_idx &= ~mask; - atomic_set(&pvdev->opened, opn_idx); - - if (atomic_read(&pvdev->opened) == 0) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - - camera_pack_event(filep, MSM_CAMERA_DEL_SESSION, 0, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, 0); - - /* This should take care of both normal close - * and application crashes */ - msm_destroy_session(pvdev->vdev->num); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* Enable power collapse latency */ - msm_pm_qos_update_request(CAMERA_ENABLE_PC_LATENCY); -#endif - - pm_relax(&pvdev->vdev->dev); - } else { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, - sp->stream_id); - - msm_delete_stream(pvdev->vdev->num, sp->stream_id); - } - - camera_v4l2_vb2_q_release(filep); - camera_v4l2_fh_release(filep); - - return rc; -} - -#ifdef CONFIG_COMPAT -long camera_v4l2_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return -ENOIOCTLCMD; -} -#endif -static struct v4l2_file_operations camera_v4l2_fops = { - .owner = THIS_MODULE, - .open = camera_v4l2_open, - .poll = camera_v4l2_poll, - .release = camera_v4l2_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = camera_v4l2_compat_ioctl, -#endif -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session) -{ - struct msm_video_device *pvdev; - struct v4l2_device *v4l2_dev; - int rc = 0; - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto init_end; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - - v4l2_dev = kzalloc(sizeof(struct v4l2_device), GFP_KERNEL); - if (WARN_ON(!v4l2_dev)) { - rc = -ENOMEM; - goto v4l2_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(v4l2_dev->mdev->model, MSM_CAMERA_NAME, - sizeof(v4l2_dev->mdev->model)); - - v4l2_dev->mdev->dev = dev; - - rc = media_device_register(v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - rc = media_entity_init(&pvdev->vdev->entity, 0, NULL, 0); - if (WARN_ON(rc < 0)) - goto entity_fail; - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - v4l2_dev->notify = NULL; - pvdev->vdev->v4l2_dev = v4l2_dev; - - rc = v4l2_device_register(dev, pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-sensor", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &camera_v4l2_fops; - pvdev->vdev->ioctl_ops = &camera_v4l2_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto video_register_fail; -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - *session = pvdev->vdev->num; - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - device_init_wakeup(&pvdev->vdev->dev, 1); - goto init_end; - -video_register_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(v4l2_dev->mdev); -media_fail: - kzfree(v4l2_dev->mdev); -mdev_fail: -#endif - kzfree(v4l2_dev); -v4l2_fail: - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -init_end: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/camera/camera.h b/drivers/media/platform/msm/camera_v2_j5/camera/camera.h deleted file mode 100644 index ac860a4f87d6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/camera/camera.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _CAMERA_H -#define _CAMERA_H - -enum stream_state { - START_STREAM = 0, - STOP_STREAM, -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session); - -#endif /*_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_cam_sensor.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msm_cam_sensor.h deleted file mode 100755 index aef2f9f237c2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_cam_sensor.h +++ /dev/null @@ -1,970 +0,0 @@ -#ifndef __LINUX_MSM_CAM_SENSOR_H -#define __LINUX_MSM_CAM_SENSOR_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -#define I2C_SEQ_REG_SETTING_MAX 5 -#define I2C_SEQ_REG_DATA_MAX 256 -#define MAX_CID 16 - -#define MSM_SENSOR_MCLK_8HZ 8000000 -#define MSM_SENSOR_MCLK_16HZ 16000000 -#define MSM_SENSOR_MCLK_24HZ 24000000 - -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define MAX_SENSOR_NAME 32 - -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 50 -#define MAX_ACTUATOR_REG_TBL_SIZE 50 -#define MAX_ACTUATOR_AF_TOTAL_STEPS 1024 - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define MSM_ACTUATOR_MOVE_SIGNED_FAR -1 -#define MSM_ACTUATOR_MOVE_SIGNED_NEAR 1 - -#define MAX_EEPROM_NAME 32 - -#define MAX_AF_ITERATIONS 3 -#define MAX_NUMBER_OF_STEPS 47 - -#define MAX_LED_TRIGGERS 3 - -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_EXIF 9 -//Focus related enums -#define EXT_CAM_AF 11 -#define EXT_CAM_FOCUS 12 -#define EXT_CAM_SET_TOUCHAF_POS 13 -#define EXT_CAM_SET_AF_STATUS 14 -#define EXT_CAM_GET_AF_STATUS 15 -#define EXT_CAM_GET_AF_RESULT 16 -#define EXT_CAM_SET_AF_STOP 17 -#define EXT_CAM_FLASH_MODE 18 -#define EXT_CAM_SET_FLASH 19 -#define EXT_CAM_VT_MODE 20 - - -//************************************* Native functionalities for YUV sensor added -#define EXT_CAM_EV 1 -#define EXT_CAM_WB 2 -#define EXT_CAM_METERING 3 -#define EXT_CAM_ISO 4 -#define EXT_CAM_EFFECT 5 -#define EXT_CAM_SCENE_MODE 6 -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_CONTRAST 8 -#define EXT_CAM_EXIF 9 -#define EXT_CAM_SET_AE_AWB 10 - -//Exposure Compensation -#define CAMERA_EV_M4 0 -#define CAMERA_EV_M3 1 -#define CAMERA_EV_M2 2 -#define CAMERA_EV_M1 3 -#define CAMERA_EV_DEFAULT 4 -#define CAMERA_EV_P1 5 -#define CAMERA_EV_P2 6 -#define CAMERA_EV_P3 7 -#define CAMERA_EV_P4 8 - -//White Balance -#define CAMERA_WHITE_BALANCE_OFF 0 -#define CAMERA_WHITE_BALANCE_AUTO 1 -#define CAMERA_WHITE_BALANCE_INCANDESCENT 2 -#define CAMERA_WHITE_BALANCE_FLUORESCENT 3 -#define CAMERA_WHITE_BALANCE_DAYLIGHT 5 -#define CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT 6 - -//Metering -#define CAMERA_AVERAGE 0 -#define CAMERA_CENTER_WEIGHT 1 -#define CAMERA_SPOT 2 - -//ISO -#define CAMERA_ISO_MODE_AUTO 0 -#define CAMERA_ISO_MODE_50 1 -#define CAMERA_ISO_MODE_100 2 -#define CAMERA_ISO_MODE_200 3 -#define CAMERA_ISO_MODE_400 4 -#define CAMERA_ISO_MODE_800 5 - -//Effect -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#define CAMERA_EFFECT_WASHED 12 -#define CAMERA_EFFECT_VINTAGE_WARM 13 -#define CAMERA_EFFECT_VINTAGE_COLD 14 -#define CAMERA_EFFECT_POINT_COLOR_1 15 -#define CAMERA_EFFECT_POINT_COLOR_2 16 -#define CAMERA_EFFECT_POINT_COLOR_3 17 -#define CAMERA_EFFECT_POINT_COLOR_4 18 -#define CAMERA_EFFECT_CARTOONIZE 19 -#define CAMERA_EFFECT_MAX 20 - -//scene mode -#define CAMERA_SCENE_AUTO 0 -#define CAMERA_SCENE_LANDSCAPE 3 -#define CAMERA_SCENE_NIGHT 6 -#define CAMERA_SCENE_BEACH 7 -#define CAMERA_SCENE_PORTRAIT 8 -#define CAMERA_SCENE_SPORT 9 -#define CAMERA_SCENE_FIRE 11 -#define CAMERA_SCENE_SUNSET 12 -#define CAMERA_SCENE_PARTY 13 -#define CAMERA_SCENE_CANDLE 14 -#define CAMERA_SCENE_AGAINST_LIGHT 16 -#define CAMERA_SCENE_FALL 17 -#define CAMERA_SCENE_TEXT 19 -#define CAMERA_SCENE_DAWN 21 //need to check - - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -#define CAMERA_MODE_INIT 0 -#define CAMERA_MODE_PREVIEW 1 -#define CAMERA_MODE_CAPTURE 2 -#define CAMERA_MODE_RECORDING 3 - -//Flash modes -#define CAMERA_FLASH_OFF 0 -#define CAMERA_FLASH_ON 2 -#define CAMERA_FLASH_AUTO 1 -#define CAMERA_FLASH_TORCH 3 - -//AF modes -#define CAMERA_AF_AUTO 0 -#define CAMERA_AF_MACRO 2 -#define CAMERA_AF_OCR 3 - -enum flash_type { -#if !defined(CONFIG_FLED_SM5701) - LED_FLASH = 1, -#endif - STROBE_FLASH, - GPIO_FLASH -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_BURST_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_VT_RESET, - SENSOR_GPIO_VT_STANDBY, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VANA_VT, - CAM_VIO_VT, - CAM_VAF, - CAM_VREG_MAX, -}; - -#if defined (CONFIG_CAMERA_SYSFS_V2) -enum msm_camera_cam_info_isp { - CAM_INFO_ISP_TYPE_INTERNAL = 0, - CAM_INFO_ISP_TYPE_EXTERNAL, - CAM_INFO_ISP_TYPE_SOC, -}; - -enum msm_camera_cam_info_cal_mem { - CAM_INFO_CAL_MEM_TYPE_NONE = 0, - CAM_INFO_CAL_MEM_TYPE_FROM, - CAM_INFO_CAL_MEM_TYPE_EEPROM, - CAM_INFO_CAL_MEM_TYPE_OTP, -}; - -enum msm_camera_cam_info_read_ver { - CAM_INFO_READ_VER_SYSFS = 0, - CAM_INFO_READ_VER_CAMON, -}; - -enum msm_camera_cam_info_core_voltage { - CAM_INFO_CORE_VOLT_NONE = 0, - CAM_INFO_CORE_VOLT_USE, -}; - -enum msm_camera_cam_info_upgrade { - CAM_INFO_FW_UPGRADE_NONE = 0, - CAM_INFO_FW_UPGRADE_SYSFS, - CAM_INFO_FW_UPGRADE_CAMON, -}; - -enum msm_camera_cam_info_companion { - CAM_INFO_COMPANION_NONE = 0, - CAM_INFO_COMPANION_USE, -}; - -enum msm_camera_cam_info_ois { - CAM_INFO_OIS_NONE = 0, - CAM_INFO_OIS_USE, -}; -#endif - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_RES_8, - MSM_SENSOR_RES_9, - MSM_SENSOR_RES_10, - MSM_SENSOR_RES_11, - MSM_SENSOR_RES_12, - MSM_SENSOR_RES_13, - MSM_SENSOR_INVALID_RES, -}; - -enum msm_camera_stream_type_t { - MSM_CAMERA_STREAM_PREVIEW, - MSM_CAMERA_STREAM_SNAPSHOT, - MSM_CAMERA_STREAM_VIDEO, - MSM_CAMERA_STREAM_INVALID, -}; - -enum sensor_sub_module_t { - SUB_MODULE_SENSOR, - SUB_MODULE_CHROMATIX, - SUB_MODULE_ACTUATOR, - SUB_MODULE_EEPROM, - SUB_MODULE_LED_FLASH, - SUB_MODULE_STROBE_FLASH, - SUB_MODULE_CSID, - SUB_MODULE_CSID_3D, - SUB_MODULE_CSIPHY, - SUB_MODULE_CSIPHY_3D, - SUB_MODULE_MAX, -}; - -enum { - MSM_CAMERA_EFFECT_MODE_OFF, - MSM_CAMERA_EFFECT_MODE_MONO, - MSM_CAMERA_EFFECT_MODE_NEGATIVE, - MSM_CAMERA_EFFECT_MODE_SOLARIZE, - MSM_CAMERA_EFFECT_MODE_SEPIA, - MSM_CAMERA_EFFECT_MODE_POSTERIZE, - MSM_CAMERA_EFFECT_MODE_WHITEBOARD, - MSM_CAMERA_EFFECT_MODE_BLACKBOARD, - MSM_CAMERA_EFFECT_MODE_AQUA, - MSM_CAMERA_EFFECT_MODE_EMBOSS, - MSM_CAMERA_EFFECT_MODE_SKETCH, - MSM_CAMERA_EFFECT_MODE_NEON, - MSM_CAMERA_EFFECT_MODE_MAX -}; - -enum { - MSM_CAMERA_WB_MODE_AUTO, - MSM_CAMERA_WB_MODE_CUSTOM, - MSM_CAMERA_WB_MODE_INCANDESCENT, - MSM_CAMERA_WB_MODE_FLUORESCENT, - MSM_CAMERA_WB_MODE_WARM_FLUORESCENT, - MSM_CAMERA_WB_MODE_DAYLIGHT, - MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT, - MSM_CAMERA_WB_MODE_TWILIGHT, - MSM_CAMERA_WB_MODE_SHADE, - MSM_CAMERA_WB_MODE_OFF, - MSM_CAMERA_WB_MODE_MAX -}; - -enum { - MSM_CAMERA_SCENE_MODE_OFF, - MSM_CAMERA_SCENE_MODE_AUTO, - MSM_CAMERA_SCENE_MODE_LANDSCAPE, - MSM_CAMERA_SCENE_MODE_SNOW, - MSM_CAMERA_SCENE_MODE_BEACH, - MSM_CAMERA_SCENE_MODE_SUNSET, - MSM_CAMERA_SCENE_MODE_NIGHT, - MSM_CAMERA_SCENE_MODE_PORTRAIT, - MSM_CAMERA_SCENE_MODE_BACKLIGHT, - MSM_CAMERA_SCENE_MODE_SPORTS, - MSM_CAMERA_SCENE_MODE_ANTISHAKE, - MSM_CAMERA_SCENE_MODE_FLOWERS, - MSM_CAMERA_SCENE_MODE_CANDLELIGHT, - MSM_CAMERA_SCENE_MODE_FIREWORKS, - MSM_CAMERA_SCENE_MODE_PARTY, - MSM_CAMERA_SCENE_MODE_NIGHT_PORTRAIT, - MSM_CAMERA_SCENE_MODE_THEATRE, - MSM_CAMERA_SCENE_MODE_ACTION, - MSM_CAMERA_SCENE_MODE_AR, - MSM_CAMERA_SCENE_MODE_FACE_PRIORITY, - MSM_CAMERA_SCENE_MODE_BARCODE, - MSM_CAMERA_SCENE_MODE_HDR, - MSM_CAMERA_SCENE_MODE_MAX -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, - CSID_RELEASE, -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, - CSIPHY_RELEASE, -}; - -enum camera_vreg_type { - REG_LDO, - REG_VS, - REG_GPIO, -}; - -enum sensor_af_e { - SENSOR_AF_CANCEL = 1, - SENSOR_AF_START, - SENSOR_AF_PRE_FLASH_ON, - SENSOR_AF_PRE_FLASH_OFF, - SENSOR_AF_PRE_FLASH_AE_STABLE, -}; - -struct msm_sensor_gpio_config { -enum msm_sensor_power_seq_gpio_t gpio_name; -uint8_t config_val; -}; - -enum sensor_af_t { - SENSOR_AF_FOCUSSED, - SENSOR_AF_NOT_FOCUSSED, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum cci_i2c_master_t { - MASTER_0, - MASTER_1, - MASTER_MAX, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -struct msm_sensor_info_t { - char sensor_name[MAX_SENSOR_NAME]; - uint32_t session_id; - int32_t subdev_id[SUB_MODULE_MAX]; - uint8_t is_mount_angle_valid; - uint32_t sensor_mount_angle; - int modes_supported; - enum camb_position_t position; -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint8_t *reg_burst_data; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_camera_i2c_array_write_config { - struct msm_camera_i2c_reg_setting conf_array; - uint16_t slave_addr; -}; - -struct msm_camera_i2c_read_config { - uint16_t slave_addr; - uint16_t reg_addr; - enum msm_camera_i2c_data_type data_type; - uint16_t *data; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -struct msm_camera_csi_lane_params { - uint16_t csi_lane_assign; - uint16_t csi_lane_mask; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct camera_vreg_t { - const char *reg_name; - enum camera_vreg_type type; - int min_voltage; - int max_voltage; - int op_mode; - uint32_t delay; -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - void *regulator[1]; -#endif -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_probe_succeed; - char subdev_name[32]; - struct msm_sensor_info_t sensor_info; -}; - -struct sensorb_cfg_data { - int cfgtype; - int flicker_type; - union { - struct msm_sensor_info_t sensor_info; - struct msm_sensor_init_params sensor_init_params; - void *setting; - } cfg; -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - union { - struct msm_camera_csiphy_params *csiphy_params; - struct msm_camera_csi_lane_params *csi_lane_params; - } cfg; -}; - -enum eeprom_cfg_type_t { - CFG_EEPROM_GET_INFO, - CFG_EEPROM_GET_CAL_DATA, - CFG_EEPROM_READ_CAL_DATA, - CFG_EEPROM_READ_DATA, - CFG_EEPROM_READ_COMPRESSED_DATA, - CFG_EEPROM_WRITE_DATA, - CFG_EEPROM_GET_ERASESIZE, - CFG_EEPROM_ERASE, - CFG_EEPROM_POWER_ON, - CFG_EEPROM_POWER_OFF, - CFG_EEPROM_READ_DATA_FROM_HW, - CFG_EEPROM_GET_MM_INFO, - CFG_EEPROM_GET_FW_VERSION_INFO, -}; - -struct eeprom_get_t { - uint32_t num_bytes; -}; - -struct eeprom_read_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t comp_size; -}; - -struct eeprom_write_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t *write_size; - uint8_t compress; -}; - -struct eeprom_erase_t { - uint32_t num_bytes; - uint32_t addr; -}; - -struct eeprom_get_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_size; -}; - -struct msm_eeprom_cfg_data { - enum eeprom_cfg_type_t cfgtype; - uint8_t is_supported; - union { - char eeprom_name[MAX_EEPROM_NAME]; - struct eeprom_get_t get_data; - struct eeprom_read_t read_data; - struct eeprom_write_t write_data; - struct eeprom_erase_t erase_data; - struct eeprom_get_cmm_t get_cmm_data; - } cfg; -}; - -enum msm_sensor_cfg_type_t { - CFG_SET_SLAVE_INFO, - CFG_SLAVE_READ_I2C, - CFG_WRITE_I2C_ARRAY, - CFG_SLAVE_WRITE_I2C_ARRAY, - CFG_WRITE_I2C_SEQ_ARRAY, - CFG_POWER_UP, - CFG_POWER_DOWN, - CFG_SET_STOP_STREAM_SETTING, - CFG_GET_SENSOR_INFO, - CFG_GET_SENSOR_INIT_PARAMS, - CFG_SET_INIT_SETTING, - CFG_SET_RESOLUTION, - CFG_SET_STOP_STREAM, - CFG_SET_START_STREAM, - CFG_SET_GPIO_STATE, - CFG_SET_SENSOR_OTP_CAL, // Randy 10.08 - CFG_SET_SATURATION, - CFG_SET_CONTRAST, - CFG_SET_SHARPNESS, - CFG_SET_ISO, - CFG_SET_EXPOSURE_COMPENSATION, - CFG_SET_ANTIBANDING, - CFG_SET_BESTSHOT_MODE, - CFG_SET_EFFECT, - CFG_SET_WHITE_BALANCE, - CFG_SET_AUTOFOCUS, - CFG_CANCEL_AUTOFOCUS, - CFG_SET_STREAM_TYPE, -}; - -enum msm_actuator_cfg_type_t { - CFG_GET_ACTUATOR_INFO, - CFG_SET_ACTUATOR_INFO, - CFG_SET_DEFAULT_FOCUS, - CFG_MOVE_FOCUS, - CFG_SET_POSITION, - CFG_ACTUATOR_POWERDOWN, - CFG_ACTUATOR_POWERUP, - CFG_SET_ACTUATOR_SW_LANDING, - CFG_ACTUATOR_INIT, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HALL_EFFECT, - ACTUATOR_HVCM, - ACTUATOR_DW9804, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct msm_actuator_move_params_t { - int8_t dir; - int8_t sign_dir; - int16_t dest_step_pos; - int32_t num_steps; - uint16_t curr_lens_pos; - struct damping_params_t *ringing_params; -}; - -struct msm_actuator_tuning_params_t { - int16_t initial_code; - uint16_t pwd_step; - uint16_t region_size; - uint32_t total_steps; - struct region_params_t *region_params; -}; - -struct msm_actuator_params_t { - enum actuator_type act_type; - uint8_t reg_tbl_size; - uint16_t data_size; - uint16_t init_setting_size; - uint32_t i2c_addr; - enum msm_actuator_addr_type i2c_addr_type; - enum msm_actuator_data_type i2c_data_type; - struct msm_actuator_reg_params_t *reg_tbl_params; - struct reg_settings_t *init_settings; -}; - -struct msm_actuator_set_info_t { - struct msm_actuator_params_t actuator_params; - struct msm_actuator_tuning_params_t af_tuning_params; -}; - -struct msm_actuator_get_info_t { - uint32_t focal_length_num; - uint32_t focal_length_den; - uint32_t f_number_num; - uint32_t f_number_den; - uint32_t f_pix_num; - uint32_t f_pix_den; - uint32_t total_f_dist_num; - uint32_t total_f_dist_den; - uint32_t hor_view_angle_num; - uint32_t hor_view_angle_den; - uint32_t ver_view_angle_num; - uint32_t ver_view_angle_den; -}; - -enum af_camera_name { - ACTUATOR_MAIN_CAM_0, - ACTUATOR_MAIN_CAM_1, - ACTUATOR_MAIN_CAM_2, - ACTUATOR_MAIN_CAM_3, - ACTUATOR_MAIN_CAM_4, - ACTUATOR_MAIN_CAM_5, - ACTUATOR_WEB_CAM_0, - ACTUATOR_WEB_CAM_1, - ACTUATOR_WEB_CAM_2, -}; - - -struct msm_actuator_set_position_t { - uint16_t number_of_steps; - uint16_t pos[MAX_NUMBER_OF_STEPS]; - uint16_t delay[MAX_NUMBER_OF_STEPS]; -}; - -struct msm_actuator_cfg_data { - int cfgtype; - uint8_t is_af_supported; - union { - struct msm_actuator_move_params_t move; - struct msm_actuator_set_info_t set_info; - struct msm_actuator_get_info_t get_info; - struct msm_actuator_set_position_t setpos; - enum af_camera_name cam_name; - } cfg; -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, - MSM_ACTUATOR_WRITE_DAC_SEQ, -}; - -enum msm_actuator_init_focus_type{ - MSM_ACTUATOR_INIT_FOCUS_DELAY = 0xDD, - MSM_ACTUATOR_INIT_FOCUS_READ_STATUS = 0xDC, -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -enum msm_camera_led_config_t { - MSM_CAMERA_LED_OFF, - MSM_CAMERA_LED_LOW, - MSM_CAMERA_LED_HIGH, - MSM_CAMERA_LED_INIT, - MSM_CAMERA_LED_RELEASE, -}; - -struct msm_camera_led_cfg_t { - enum msm_camera_led_config_t cfgtype; - uint32_t torch_current; - uint32_t flash_current[MAX_LED_TRIGGERS]; -}; - -/* sensor init structures and enums */ -enum msm_sensor_init_cfg_type_t { - CFG_SINIT_PROBE, - CFG_SINIT_PROBE_DONE, - CFG_SINIT_PROBE_WAIT_DONE, -}; - -struct sensor_init_cfg_data { - enum msm_sensor_init_cfg_type_t cfgtype; - union { - void *setting; - } cfg; -}; - -struct ioctl_native_cmd { - unsigned short mode; - unsigned short address; - unsigned short value_1; - unsigned short value_2; - unsigned short value_3; -}; - -typedef struct -{ - unsigned short iso; - unsigned short shutterspeed; - unsigned short isFlashOn; -} exif_data_t; - -enum msm_cam_flicker_type { - MSM_CAM_FLICKER_50HZ, - MSM_CAM_FLICKER_60HZ, -}; - -#define VIDIOC_MSM_SENSOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data) - -#define VIDIOC_MSM_SENSOR_RELEASE \ - _IO('V', BASE_VIDIOC_PRIVATE + 2) - -#define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t) - -#define VIDIOC_MSM_CSIPHY_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data) - -#define VIDIOC_MSM_CSID_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data) - -#define VIDIOC_MSM_ACTUATOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data) - -#define VIDIOC_MSM_FLASH_LED_DATA_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t) - -#define VIDIOC_MSM_EEPROM_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data) - -#define VIDIOC_MSM_SENSOR_GET_AF_STATUS \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, uint32_t) - -#define VIDIOC_MSM_SENSOR_INIT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data) - -#define VIDIOC_MSM_SENSOR_NATIVE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct ioctl_native_cmd) - -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camera.h deleted file mode 100644 index 58214e4685cb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camera.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __LINUX_MSM_CAMERA_H -#define __LINUX_MSM_CAMERA_H - -#include -#include - -#endif /* __LINUX_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camsensor_sdk.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camsensor_sdk.h deleted file mode 100644 index b01f3116dae3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msm_camsensor_sdk.h +++ /dev/null @@ -1,311 +0,0 @@ -#ifndef __LINUX_MSM_CAMSENSOR_SDK_H -#define __LINUX_MSM_CAMSENSOR_SDK_H - -#include - -#define KVERSION 0x1 - -#define MAX_POWER_CONFIG 12 -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 -#define MAX_CID 16 -#define I2C_SEQ_REG_DATA_MAX 256 -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#define MAX_ACTUATOR_REG_TBL_SIZE 8 -#define MAX_ACTUATOR_REGION 5 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define MAX_ACTUATOR_INIT_SET 12 -#define MAX_I2C_REG_SET 12 - -#define MAX_NAME_SIZE 32 -#define MAX_FLASH_NUM 8 - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, - SENSOR_I2C, -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_DWORD_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_CUSTOM1, - SENSOR_GPIO_CUSTOM2, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VAF, - CAM_V_CUSTOM1, - CAM_V_CUSTOM2, - CAM_VREG_MAX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HVCM, -}; - -enum msm_flash_driver_type { - FLASH_DRIVER_PMIC, - FLASH_DRIVER_I2C, - FLASH_DRIVER_GPIO, - FLASH_DRIVER_DEFAULT -}; - -enum msm_flash_cfg_type_t { - CFG_FLASH_INIT, - CFG_FLASH_RELEASE, - CFG_FLASH_OFF, - CFG_FLASH_LOW, - CFG_FLASH_HIGH, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting power_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting power_down_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - char ois_name[32]; - char flash_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_flash_supported; -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID]; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - uint32_t csi_clk; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; - uint32_t csiphy_clk; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting_array { - struct msm_camera_i2c_reg_array reg_setting_a[MAX_I2C_REG_SET]; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_camera.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_camera.h deleted file mode 100644 index 7f19a88af73b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_camera.h +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef __LINUX_MSMB_CAMERA_H -#define __LINUX_MSMB_CAMERA_H - -#include -#include -#include - -#define MSM_CAM_V4L2_IOCTL_NOTIFY \ - _IOW('V', BASE_VIDIOC_PRIVATE + 30, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_META \ - _IOW('V', BASE_VIDIOC_PRIVATE + 31, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_CMD_ACK \ - _IOW('V', BASE_VIDIOC_PRIVATE + 32, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR \ - _IOW('V', BASE_VIDIOC_PRIVATE + 33, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS \ - _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event) - -#define QCAMERA_DEVICE_GROUP_ID 1 -#define QCAMERA_VNODE_GROUP_ID 2 -#define MSM_CAMERA_NAME "msm_camera" -#define MSM_CONFIGURATION_NAME "msm_config" -#define MSM_CAMERA_DUMMY_NAME "msm_cam_dummy" - -#define MSM_CAMERA_SUBDEV_CSIPHY 0 -#define MSM_CAMERA_SUBDEV_CSID 1 -#define MSM_CAMERA_SUBDEV_ISPIF 2 -#define MSM_CAMERA_SUBDEV_VFE 3 -#define MSM_CAMERA_SUBDEV_AXI 4 -#define MSM_CAMERA_SUBDEV_VPE 5 -#define MSM_CAMERA_SUBDEV_SENSOR 6 -#define MSM_CAMERA_SUBDEV_ACTUATOR 7 -#define MSM_CAMERA_SUBDEV_EEPROM 8 -#define MSM_CAMERA_SUBDEV_CPP 9 -#define MSM_CAMERA_SUBDEV_CCI 10 -#define MSM_CAMERA_SUBDEV_LED_FLASH 11 -#define MSM_CAMERA_SUBDEV_STROBE_FLASH 12 -#define MSM_CAMERA_SUBDEV_BUF_MNGR 13 -#define MSM_CAMERA_SUBDEV_SENSOR_INIT 14 - -#define MSM_MAX_CAMERA_SENSORS 5 - -/* The below macro is defined to put an upper limit on maximum - * number of buffer requested per stream. In case of extremely - * large value for number of buffer due to data structure corruption - * we return error to avoid integer overflow. This value may be - * configured in future*/ -#define MSM_CAMERA_MAX_STREAM_BUF 40 - -/* featur base */ -#define MSM_CAMERA_FEATURE_BASE 0x00010000 -#define MSM_CAMERA_FEATURE_SHUTDOWN (MSM_CAMERA_FEATURE_BASE + 1) - -#define MSM_CAMERA_STATUS_BASE 0x00020000 -#define MSM_CAMERA_STATUS_FAIL (MSM_CAMERA_STATUS_BASE + 1) -#define MSM_CAMERA_STATUS_SUCCESS (MSM_CAMERA_STATUS_BASE + 2) - -/* event type */ -#define MSM_CAMERA_V4L2_EVENT_TYPE (V4L2_EVENT_PRIVATE_START + 0x00002000) - -/* event id */ -#define MSM_CAMERA_EVENT_MIN 0 -#define MSM_CAMERA_NEW_SESSION (MSM_CAMERA_EVENT_MIN + 1) -#define MSM_CAMERA_DEL_SESSION (MSM_CAMERA_EVENT_MIN + 2) -#define MSM_CAMERA_SET_PARM (MSM_CAMERA_EVENT_MIN + 3) -#define MSM_CAMERA_GET_PARM (MSM_CAMERA_EVENT_MIN + 4) -#define MSM_CAMERA_MAPPING_CFG (MSM_CAMERA_EVENT_MIN + 5) -#define MSM_CAMERA_MAPPING_SES (MSM_CAMERA_EVENT_MIN + 6) -#define MSM_CAMERA_MSM_NOTIFY (MSM_CAMERA_EVENT_MIN + 7) -#define MSM_CAMERA_EVENT_MAX (MSM_CAMERA_EVENT_MIN + 8) - -/* data.command */ -#define MSM_CAMERA_PRIV_S_CROP (V4L2_CID_PRIVATE_BASE + 1) -#define MSM_CAMERA_PRIV_G_CROP (V4L2_CID_PRIVATE_BASE + 2) -#define MSM_CAMERA_PRIV_G_FMT (V4L2_CID_PRIVATE_BASE + 3) -#define MSM_CAMERA_PRIV_S_FMT (V4L2_CID_PRIVATE_BASE + 4) -#define MSM_CAMERA_PRIV_TRY_FMT (V4L2_CID_PRIVATE_BASE + 5) -#define MSM_CAMERA_PRIV_METADATA (V4L2_CID_PRIVATE_BASE + 6) -#define MSM_CAMERA_PRIV_QUERY_CAP (V4L2_CID_PRIVATE_BASE + 7) -#define MSM_CAMERA_PRIV_STREAM_ON (V4L2_CID_PRIVATE_BASE + 8) -#define MSM_CAMERA_PRIV_STREAM_OFF (V4L2_CID_PRIVATE_BASE + 9) -#define MSM_CAMERA_PRIV_NEW_STREAM (V4L2_CID_PRIVATE_BASE + 10) -#define MSM_CAMERA_PRIV_DEL_STREAM (V4L2_CID_PRIVATE_BASE + 11) -#define MSM_CAMERA_PRIV_SHUTDOWN (V4L2_CID_PRIVATE_BASE + 12) -#define MSM_CAMERA_PRIV_STREAM_INFO_SYNC \ - (V4L2_CID_PRIVATE_BASE + 13) - -/* data.status - success */ -#define MSM_CAMERA_CMD_SUCESS 0x00000001 -#define MSM_CAMERA_BUF_MAP_SUCESS 0x00000002 - -/* data.status - error */ -#define MSM_CAMERA_ERR_EVT_BASE 0x00010000 -#define MSM_CAMERA_ERR_CMD_FAIL (MSM_CAMERA_ERR_EVT_BASE + 1) -#define MSM_CAMERA_ERR_MAPPING (MSM_CAMERA_ERR_EVT_BASE + 2) - -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 16 elements */ -struct msm_v4l2_event_data { - /*word 0*/ - unsigned int command; - /*word 1*/ - unsigned int status; - /*word 2*/ - unsigned int session_id; - /*word 3*/ - unsigned int stream_id; - /*word 4*/ - unsigned int map_op; - /*word 5*/ - unsigned int map_buf_idx; - /*word 6*/ - unsigned int notify; - /*word 7*/ - unsigned int arg_value; - /*word 8*/ - unsigned int ret_value; - /*word 9*/ - unsigned int v4l2_event_type; - /*word 10*/ - unsigned int v4l2_event_id; - /*word 11*/ - unsigned int nop5; - /*word 12*/ - unsigned int nop6; - /*word 13*/ - unsigned int nop7; - /*word 14*/ - unsigned int nop8; - /*word 15*/ - unsigned int nop9; -}; - -/* map to v4l2_format.fmt.raw_data */ -struct msm_v4l2_format_data { - enum v4l2_buf_type type; - unsigned int width; - unsigned int height; - unsigned int pixelformat; /* FOURCC */ - unsigned char num_planes; - unsigned int plane_sizes[VIDEO_MAX_PLANES]; -}; - -/* MSM Four-character-code (FOURCC) */ -#define msm_v4l2_fourcc(a, b, c, d)\ - ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) |\ - ((__u32)(d) << 24)) - -/* Composite stats */ -#define MSM_V4L2_PIX_FMT_STATS_COMB v4l2_fourcc('S', 'T', 'C', 'M') -/* AEC stats */ -#define MSM_V4L2_PIX_FMT_STATS_AE v4l2_fourcc('S', 'T', 'A', 'E') -/* AF stats */ -#define MSM_V4L2_PIX_FMT_STATS_AF v4l2_fourcc('S', 'T', 'A', 'F') -/* AWB stats */ -#define MSM_V4L2_PIX_FMT_STATS_AWB v4l2_fourcc('S', 'T', 'W', 'B') -/* IHIST stats */ -#define MSM_V4L2_PIX_FMT_STATS_IHST v4l2_fourcc('I', 'H', 'S', 'T') -/* Column count stats */ -#define MSM_V4L2_PIX_FMT_STATS_CS v4l2_fourcc('S', 'T', 'C', 'S') -/* Row count stats */ -#define MSM_V4L2_PIX_FMT_STATS_RS v4l2_fourcc('S', 'T', 'R', 'S') -/* Bayer Grid stats */ -#define MSM_V4L2_PIX_FMT_STATS_BG v4l2_fourcc('S', 'T', 'B', 'G') -/* Bayer focus stats */ -#define MSM_V4L2_PIX_FMT_STATS_BF v4l2_fourcc('S', 'T', 'B', 'F') -/* Bayer hist stats */ -#define MSM_V4L2_PIX_FMT_STATS_BHST v4l2_fourcc('B', 'H', 'S', 'T') - -enum smmu_attach_mode { - NON_SECURE_MODE, - SECURE_MODE, - MAX_PROTECTION_MODE, -}; - -struct msm_camera_smmu_attach_type { - enum smmu_attach_mode attach; -}; - -#endif /* __LINUX_MSMB_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_isp.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_isp.h deleted file mode 100644 index af9fae4e11cd..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_isp.h +++ /dev/null @@ -1,489 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSMB_ISP__ -#define __MSMB_ISP__ - -#include - -#define MAX_PLANES_PER_STREAM 3 -#define MAX_NUM_STREAM 7 - -#define ISP_VERSION_44 44 -#define ISP_VERSION_40 40 -#define ISP_VERSION_32 32 -#define ISP_NATIVE_BUF_BIT (0x10000 << 0) -#define ISP0_BIT (0x10000 << 1) -#define ISP1_BIT (0x10000 << 2) -#define ISP_META_CHANNEL_BIT (0x10000 << 3) -#define ISP_SCRATCH_BUF_BIT (0x10000 << 4) -#define ISP_STATS_STREAM_BIT 0x80000000 - -struct msm_vfe_cfg_cmd_list; - -#define MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR 0xCACFC - -enum ISP_START_PIXEL_PATTERN { - ISP_BAYER_RGRGRG, - ISP_BAYER_GRGRGR, - ISP_BAYER_BGBGBG, - ISP_BAYER_GBGBGB, - ISP_YUV_YCbYCr, - ISP_YUV_YCrYCb, - ISP_YUV_CbYCrY, - ISP_YUV_CrYCbY, - ISP_PIX_PATTERN_MAX -}; - -enum msm_vfe_plane_fmt { - Y_PLANE, - CB_PLANE, - CR_PLANE, - CRCB_PLANE, - CBCR_PLANE, - VFE_PLANE_FMT_MAX -}; - -enum msm_vfe_input_src { - VFE_PIX_0, - VFE_RAW_0, - VFE_RAW_1, - VFE_RAW_2, - VFE_SRC_MAX, -}; - -enum msm_vfe_axi_stream_src { - PIX_ENCODER, - PIX_VIEWFINDER, - CAMIF_RAW, - IDEAL_RAW, - RDI_INTF_0, - RDI_INTF_1, - RDI_INTF_2, - VFE_AXI_SRC_MAX -}; - -enum msm_vfe_frame_skip_pattern { - NO_SKIP, - EVERY_2FRAME, - EVERY_3FRAME, - EVERY_4FRAME, - EVERY_5FRAME, - EVERY_6FRAME, - EVERY_7FRAME, - EVERY_8FRAME, - EVERY_16FRAME, - EVERY_32FRAME, - SKIP_ALL, - MAX_SKIP, -}; - -enum msm_vfe_camif_input { - CAMIF_DISABLED, - CAMIF_PAD_REG_INPUT, - CAMIF_MIDDI_INPUT, - CAMIF_MIPI_INPUT, -}; - -struct msm_vfe_camif_cfg { - uint32_t lines_per_frame; - uint32_t pixels_per_line; - uint32_t first_pixel; - uint32_t last_pixel; - uint32_t first_line; - uint32_t last_line; - uint32_t epoch_line0; - uint32_t epoch_line1; - enum msm_vfe_camif_input camif_input; -}; - -enum msm_vfe_inputmux { - CAMIF, - TESTGEN, - EXTERNAL_READ, -}; - -enum msm_vfe_stats_composite_group { - STATS_COMPOSITE_GRP_NONE, - STATS_COMPOSITE_GRP_1, - STATS_COMPOSITE_GRP_2, - STATS_COMPOSITE_GRP_MAX, -}; - -struct msm_vfe_pix_cfg { - struct msm_vfe_camif_cfg camif_cfg; - enum msm_vfe_inputmux input_mux; - enum ISP_START_PIXEL_PATTERN pixel_pattern; - uint32_t input_format; -}; - -struct msm_vfe_rdi_cfg { - uint8_t cid; - uint8_t frame_based; -}; - -struct msm_vfe_input_cfg { - union { - struct msm_vfe_pix_cfg pix_cfg; - struct msm_vfe_rdi_cfg rdi_cfg; - } d; - enum msm_vfe_input_src input_src; - uint32_t input_pix_clk; -}; - -struct msm_vfe_axi_plane_cfg { - uint32_t output_width; /*Include padding*/ - uint32_t output_height; - uint32_t output_stride; - uint32_t output_scan_lines; - uint32_t output_plane_format; /*Y/Cb/Cr/CbCr*/ - uint32_t plane_addr_offset; - uint8_t csid_src; /*RDI 0-2*/ - uint8_t rdi_cid;/*CID 1-16*/ -}; - -struct msm_vfe_axi_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - uint32_t vt_enable; - uint32_t output_format;/*Planar/RAW/Misc*/ - enum msm_vfe_axi_stream_src stream_src; /*CAMIF/IDEAL/RDIs*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - - uint32_t burst_count; - uint32_t hfr_mode; - uint8_t frame_base; - - uint32_t init_frame_drop; /*MAX 31 Frames*/ - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - uint8_t buf_divert; /* if TRUE no vb2 buf done. */ - /*Return values*/ - uint32_t axi_stream_handle; - uint32_t burst_len; -}; - -struct msm_vfe_axi_stream_release_cmd { - uint32_t stream_handle; -}; - -enum msm_vfe_axi_stream_cmd { - STOP_STREAM, - START_STREAM, - STOP_IMMEDIATELY, -}; - -struct msm_vfe_axi_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MAX_NUM_STREAM]; - enum msm_vfe_axi_stream_cmd cmd; -}; - -enum msm_vfe_axi_stream_update_type { - AXI_STREAM_UPDATE_INVALID, - ENABLE_STREAM_BUF_DIVERT, - DISABLE_STREAM_BUF_DIVERT, - UPDATE_STREAM_FRAMEDROP_PATTERN, - UPDATE_STREAM_AXI_CONFIG, - UPDATE_STREAM_REQUEST_FRAMES, -}; - -struct msm_vfe_axi_stream_cfg_update_info { - uint32_t stream_handle; - uint32_t output_format; - uint32_t request_frm_num; - enum msm_vfe_frame_skip_pattern skip_pattern; - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; -}; - -struct msm_vfe_axi_halt_cmd { - uint32_t stop_camif; //Boolean whether stop camif is to be done - uint32_t overflow_detected; -}; - -struct msm_vfe_axi_reset_cmd { - uint32_t blocking; //Boolean whether stop camif is to be done - unsigned long frame_id; -}; - -struct msm_vfe_axi_restart_cmd { - uint32_t enable_camif; //Boolean whether stop camif is to be done -}; - -struct msm_vfe_axi_stream_update_cmd { - uint32_t num_streams; - enum msm_vfe_axi_stream_update_type update_type; - struct msm_vfe_axi_stream_cfg_update_info update_info[MAX_NUM_STREAM]; -}; - -enum msm_isp_stats_type { - MSM_ISP_STATS_AEC, /* legacy based AEC */ - MSM_ISP_STATS_AF, /* legacy based AF */ - MSM_ISP_STATS_AWB, /* legacy based AWB */ - MSM_ISP_STATS_RS, /* legacy based RS */ - MSM_ISP_STATS_CS, /* legacy based CS */ - MSM_ISP_STATS_IHIST, /* legacy based HIST */ - MSM_ISP_STATS_SKIN, /* legacy based SKIN */ - MSM_ISP_STATS_BG, /* Bayer Grids */ - MSM_ISP_STATS_BF, /* Bayer Focus */ - MSM_ISP_STATS_BE, /* Bayer Exposure*/ - MSM_ISP_STATS_BHIST, /* Bayer Hist */ - MSM_ISP_STATS_BF_SCALE, /* Bayer Focus scale */ - MSM_ISP_STATS_MAX /* MAX */ -}; - -struct msm_vfe_stats_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - enum msm_isp_stats_type stats_type; - uint32_t composite_flag; - uint32_t framedrop_pattern; - uint32_t irq_subsample_pattern; - uint32_t buffer_offset; - uint32_t stream_handle; -}; - -struct msm_vfe_stats_stream_release_cmd { - uint32_t stream_handle; -}; -struct msm_vfe_stats_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MSM_ISP_STATS_MAX]; - uint8_t enable; - uint32_t stats_burst_len; -}; - -enum msm_vfe_reg_cfg_type { - VFE_WRITE, - VFE_WRITE_MB, - VFE_READ, - VFE_CFG_MASK, - VFE_WRITE_DMI_16BIT, - VFE_WRITE_DMI_32BIT, - VFE_WRITE_DMI_64BIT, - VFE_READ_DMI_16BIT, - VFE_READ_DMI_32BIT, - VFE_READ_DMI_64BIT, - GET_MAX_CLK_RATE, - GET_ISP_ID, - VFE_HW_UPDATE_LOCK, - VFE_HW_UPDATE_UNLOCK, - SET_WM_UB_SIZE, -}; - -struct msm_vfe_cfg_cmd2 { - uint16_t num_cfg; - uint16_t cmd_len; - uint32_t frame_id; - void __user *cfg_data; - void __user *cfg_cmd; -}; - -struct msm_vfe_cfg_cmd_list { - struct msm_vfe_cfg_cmd2 cfg_cmd; - struct msm_vfe_cfg_cmd_list *next; - uint32_t next_size; -}; - -struct msm_vfe_reg_rw_info { - uint32_t reg_offset; - uint32_t cmd_data_offset; - uint32_t len; -}; - -struct msm_vfe_reg_mask_info { - uint32_t reg_offset; - uint32_t mask; - uint32_t val; -}; - -struct msm_vfe_reg_dmi_info { - uint32_t hi_tbl_offset; /*Optional*/ - uint32_t lo_tbl_offset; /*Required*/ - uint32_t len; -}; - -struct msm_vfe_reg_cfg_cmd { - union { - struct msm_vfe_reg_rw_info rw_info; - struct msm_vfe_reg_mask_info mask_info; - struct msm_vfe_reg_dmi_info dmi_info; - } u; - - enum msm_vfe_reg_cfg_type cmd_type; -}; - -enum msm_isp_buf_type { - ISP_PRIVATE_BUF, - ISP_SHARE_BUF, - MAX_ISP_BUF_TYPE, -}; - -struct msm_isp_buf_request { - uint32_t session_id; - uint32_t stream_id; - uint8_t num_buf; - uint32_t handle; - enum msm_isp_buf_type buf_type; -}; - -struct msm_isp_qbuf_info { - uint32_t handle; - int32_t buf_idx; - /*Only used for prepare buffer*/ - struct v4l2_buffer buffer; - /*Only used for diverted buffer*/ - uint32_t dirty_buf; -}; - -struct msm_vfe_axi_src_state { - enum msm_vfe_input_src input_src; - uint32_t src_active; -}; - -enum msm_isp_event_idx { - ISP_REG_UPDATE = 0, - ISP_EPOCH_0 = 1, - ISP_EPOCH_1 = 2, - ISP_START_ACK = 3, - ISP_STOP_ACK = 4, - ISP_IRQ_VIOLATION = 5, - ISP_WM_BUS_OVERFLOW = 6, - ISP_STATS_OVERFLOW = 7, - ISP_CAMIF_ERROR = 8, - ISP_BUF_DONE = 9, - ISP_FE_RD_DONE = 10, - ISP_EVENT_MAX = 11 -}; - -#define ISP_EVENT_OFFSET 8 -#define ISP_EVENT_BASE (V4L2_EVENT_PRIVATE_START) -#define ISP_BUF_EVENT_BASE (ISP_EVENT_BASE + (1 << ISP_EVENT_OFFSET)) -#define ISP_STATS_EVENT_BASE (ISP_EVENT_BASE + (2 << ISP_EVENT_OFFSET)) -#define ISP_CAMIF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET)) -#define ISP_STREAM_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET)) -#define ISP_EVENT_REG_UPDATE (ISP_EVENT_BASE + ISP_REG_UPDATE) -#define ISP_EVENT_EPOCH_0 (ISP_EVENT_BASE + ISP_EPOCH_0) -#define ISP_EVENT_EPOCH_1 (ISP_EVENT_BASE + ISP_EPOCH_1) -#define ISP_EVENT_START_ACK (ISP_EVENT_BASE + ISP_START_ACK) -#define ISP_EVENT_STOP_ACK (ISP_EVENT_BASE + ISP_STOP_ACK) -#define ISP_EVENT_IRQ_VIOLATION (ISP_EVENT_BASE + ISP_IRQ_VIOLATION) -#define ISP_EVENT_WM_BUS_OVERFLOW (ISP_EVENT_BASE + ISP_WM_BUS_OVERFLOW) -#define ISP_EVENT_STATS_OVERFLOW (ISP_EVENT_BASE + ISP_STATS_OVERFLOW) -#define ISP_EVENT_CAMIF_ERROR (ISP_EVENT_BASE + ISP_CAMIF_ERROR) -#define ISP_EVENT_SOF (ISP_CAMIF_EVENT_BASE) -#define ISP_EVENT_EOF (ISP_CAMIF_EVENT_BASE + 1) -#define ISP_EVENT_BUF_DONE (ISP_EVENT_BASE + ISP_BUF_DONE) -#define ISP_EVENT_BUF_DIVERT (ISP_BUF_EVENT_BASE) -#define ISP_EVENT_STATS_NOTIFY (ISP_STATS_EVENT_BASE) -#define ISP_EVENT_COMP_STATS_NOTIFY (ISP_EVENT_STATS_NOTIFY + MSM_ISP_STATS_MAX) -#define ISP_EVENT_FE_READ_DONE (ISP_EVENT_BASE + ISP_FE_RD_DONE) -#define ISP_EVENT_STREAM_UPDATE_DONE (ISP_STREAM_EVENT_BASE) -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 64 bytes */ - -struct msm_isp_buf_event { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; - uint32_t output_format; - int8_t buf_idx; -}; -struct msm_isp_stats_event { - uint32_t stats_mask; /* 4 bytes */ - uint8_t stats_buf_idxs[MSM_ISP_STATS_MAX]; /* 11 bytes */ -}; - -struct msm_isp_stream_ack { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; -}; - -struct msm_isp_event_data { - /*Wall clock except for buffer divert events - *which use monotonic clock - */ - struct timeval timestamp; - /* Monotonic timestamp since bootup */ - struct timeval mono_timestamp; - enum msm_vfe_input_src input_intf; - uint32_t frame_id; - union { - struct msm_isp_stats_event stats; - struct msm_isp_buf_event buf_done; - } u; /* union can have max 52 bytes */ -}; - -#define V4L2_PIX_FMT_QBGGR8 v4l2_fourcc('Q', 'B', 'G', '8') -#define V4L2_PIX_FMT_QGBRG8 v4l2_fourcc('Q', 'G', 'B', '8') -#define V4L2_PIX_FMT_QGRBG8 v4l2_fourcc('Q', 'G', 'R', '8') -#define V4L2_PIX_FMT_QRGGB8 v4l2_fourcc('Q', 'R', 'G', '8') -#define V4L2_PIX_FMT_QBGGR10 v4l2_fourcc('Q', 'B', 'G', '0') -#define V4L2_PIX_FMT_QGBRG10 v4l2_fourcc('Q', 'G', 'B', '0') -#define V4L2_PIX_FMT_QGRBG10 v4l2_fourcc('Q', 'G', 'R', '0') -#define V4L2_PIX_FMT_QRGGB10 v4l2_fourcc('Q', 'R', 'G', '0') -#define V4L2_PIX_FMT_QBGGR12 v4l2_fourcc('Q', 'B', 'G', '2') -#define V4L2_PIX_FMT_QGBRG12 v4l2_fourcc('Q', 'G', 'B', '2') -#define V4L2_PIX_FMT_QGRBG12 v4l2_fourcc('Q', 'G', 'R', '2') -#define V4L2_PIX_FMT_QRGGB12 v4l2_fourcc('Q', 'R', 'G', '2') -#define V4L2_PIX_FMT_NV14 v4l2_fourcc('N', 'V', '1', '4') -#define V4L2_PIX_FMT_NV41 v4l2_fourcc('N', 'V', '4', '1') -#define V4L2_PIX_FMT_META v4l2_fourcc('Q', 'M', 'E', 'T') - -#define VIDIOC_MSM_VFE_REG_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2) - -#define VIDIOC_MSM_ISP_REQUEST_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+1, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_ENQUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+2, struct msm_isp_qbuf_info) - -#define VIDIOC_MSM_ISP_RELEASE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+3, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_REQUEST_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+4, struct msm_vfe_axi_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+5, struct msm_vfe_axi_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+6, struct msm_vfe_axi_stream_release_cmd) - -#define VIDIOC_MSM_ISP_INPUT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+7, struct msm_vfe_input_cfg) - -#define VIDIOC_MSM_ISP_SET_SRC_STATE \ - _IOWR('V', BASE_VIDIOC_PRIVATE+8, struct msm_vfe_axi_src_state) - -#define VIDIOC_MSM_ISP_REQUEST_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+9, \ - struct msm_vfe_stats_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+10, struct msm_vfe_stats_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+11, \ - struct msm_vfe_stats_stream_release_cmd) - -#define VIDIOC_MSM_ISP_REG_UPDATE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE+12, enum msm_vfe_input_src) - -#define VIDIOC_MSM_ISP_UPDATE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+13, struct msm_vfe_axi_stream_update_cmd) - -#define VIDIOC_MSM_VFE_REG_LIST_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+14, struct msm_vfe_cfg_cmd_list) - -#endif /* __MSMB_ISP__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_ispif.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_ispif.h deleted file mode 100644 index 641723731ac0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_ispif.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef MSM_CAM_ISPIF_H -#define MSM_CAM_ISPIF_H - -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V3 0x30000000 - -enum msm_ispif_vfe_intf { - VFE0, - VFE1, - VFE_MAX -}; -#define VFE0_MASK (1 << VFE0) -#define VFE1_MASK (1 << VFE1) - -enum msm_ispif_intftype { - PIX0, - RDI0, - PIX1, - RDI1, - RDI2, - INTF_MAX -}; -#define MAX_PARAM_ENTRIES (INTF_MAX * 2) -#define MAX_CID_CH 8 - -#define PIX0_MASK (1 << PIX0) -#define PIX1_MASK (1 << PIX1) -#define RDI0_MASK (1 << RDI0) -#define RDI1_MASK (1 << RDI1) -#define RDI2_MASK (1 << RDI2) - - -enum msm_ispif_vc { - VC0, - VC1, - VC2, - VC3, - VC_MAX -}; - -enum msm_ispif_cid { - CID0, - CID1, - CID2, - CID3, - CID4, - CID5, - CID6, - CID7, - CID8, - CID9, - CID10, - CID11, - CID12, - CID13, - CID14, - CID15, - CID_MAX -}; - -enum msm_ispif_csid { - CSID0, - CSID1, - CSID2, - CSID3, - CSID_MAX -}; - -struct msm_ispif_params_entry { - enum msm_ispif_vfe_intf vfe_intf; - enum msm_ispif_intftype intftype; - int num_cids; - enum msm_ispif_cid cids[3]; - enum msm_ispif_csid csid; - int crop_enable; - uint16_t crop_start_pixel; - uint16_t crop_end_pixel; -}; - -struct msm_ispif_param_data { - uint32_t num; - struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES]; -}; - -struct msm_isp_info { - uint32_t max_resolution; - uint32_t id; - uint32_t ver; -}; - -struct msm_ispif_vfe_info { - int num_vfe; - struct msm_isp_info info[VFE_MAX]; -}; - -enum ispif_cfg_type_t { - ISPIF_CLK_ENABLE, - ISPIF_CLK_DISABLE, - ISPIF_INIT, - ISPIF_CFG, - ISPIF_START_FRAME_BOUNDARY, - ISPIF_STOP_FRAME_BOUNDARY, - ISPIF_STOP_IMMEDIATELY, - ISPIF_RELEASE, - ISPIF_ENABLE_REG_DUMP, - ISPIF_SET_VFE_INFO, -}; - -struct ispif_cfg_data { - enum ispif_cfg_type_t cfg_type; - union { - int reg_dump; /* ISPIF_ENABLE_REG_DUMP */ - uint32_t csid_version; /* ISPIF_INIT */ - struct msm_ispif_vfe_info vfe_info; /* ISPIF_SET_VFE_INFO */ - struct msm_ispif_param_data params; /* CFG, START, STOP */ - }; -}; - -#define VIDIOC_MSM_ISPIF_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data) - -#endif /* MSM_CAM_ISPIF_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_pproc.h b/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_pproc.h deleted file mode 100644 index fd76f554af19..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/media/msmb_pproc.h +++ /dev/null @@ -1,361 +0,0 @@ -#ifndef __MSMB_PPROC_H -#define __MSMB_PPROC_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES VIDEO_MAX_PLANES - -#define MAX_NUM_CPP_STRIPS 8 -#define MSM_CPP_MAX_NUM_PLANES 3 -#define MSM_CPP_MAX_FRAME_LENGTH 1024 -#define MSM_CPP_MAX_FW_NAME_LEN 32 -#define MAX_FREQ_TBL 10 - - -enum msm_cpp_frame_type { - MSM_CPP_OFFLINE_FRAME, - MSM_CPP_REALTIME_FRAME, -}; - -enum msm_vpe_frame_type { - MSM_VPE_OFFLINE_FRAME, - MSM_VPE_REALTIME_FRAME, -}; - -struct msm_cpp_frame_strip_info { - int scale_v_en; - int scale_h_en; - - int upscale_v_en; - int upscale_h_en; - - int src_start_x; - int src_end_x; - int src_start_y; - int src_end_y; - - /* Padding is required for upscaler because it does not - * pad internally like other blocks, also needed for rotation - * rotation expects all the blocks in the stripe to be the same size - * Padding is done such that all the extra padded pixels - * are on the right and bottom - */ - int pad_bottom; - int pad_top; - int pad_right; - int pad_left; - - int v_init_phase; - int h_init_phase; - int h_phase_step; - int v_phase_step; - - int prescale_crop_width_first_pixel; - int prescale_crop_width_last_pixel; - int prescale_crop_height_first_line; - int prescale_crop_height_last_line; - - int postscale_crop_height_first_line; - int postscale_crop_height_last_line; - int postscale_crop_width_first_pixel; - int postscale_crop_width_last_pixel; - - int dst_start_x; - int dst_end_x; - int dst_start_y; - int dst_end_y; - - int bytes_per_pixel; - unsigned int source_address; - unsigned int destination_address; - unsigned int compl_destination_address; - unsigned int src_stride; - unsigned int dst_stride; - int rotate_270; - int horizontal_flip; - int vertical_flip; - int scale_output_width; - int scale_output_height; - int prescale_crop_en; - int postscale_crop_en; -}; - -struct msm_cpp_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; - uint32_t identity; -}; - -struct msm_cpp_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_cpp_buffer_info_t *buffer_info; -}; - -struct msm_cpp_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - struct msm_cpp_frame_strip_info *strip_info; - uint32_t msg_len; - uint32_t *cpp_cmd_msg; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - struct timeval in_time, out_time; - void *cookie; - int32_t *status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; -}; - -struct cpp_hw_info { - uint32_t cpp_hw_version; - uint32_t cpp_hw_caps; - unsigned long freq_tbl[MAX_FREQ_TBL]; - uint32_t freq_tbl_count; -}; - -struct msm_vpe_frame_strip_info { - uint32_t src_w; - uint32_t src_h; - uint32_t dst_w; - uint32_t dst_h; - uint32_t src_x; - uint32_t src_y; - uint32_t phase_step_x; - uint32_t phase_step_y; - uint32_t phase_init_x; - uint32_t phase_init_y; -}; - -struct msm_vpe_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; -}; - -struct msm_vpe_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_vpe_buffer_info_t *buffer_info; -}; - -struct msm_vpe_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_vpe_frame_type frame_type; - struct msm_vpe_frame_strip_info strip_info; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - unsigned long src_phyaddr; - unsigned long dest_phyaddr; - unsigned long src_chroma_plane_offset; - unsigned long dest_chroma_plane_offset; - struct timeval in_time, out_time; - void *cookie; - - struct msm_vpe_buffer_info_t input_buffer_info; - struct msm_vpe_buffer_info_t output_buffer_info; -}; - -struct msm_pproc_queue_buf_info { - struct msm_buf_mngr_info buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t) - - -#define VIDIOC_MSM_VPE_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t) - -#define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0) -#define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1) - -struct msm_camera_v4l2_ioctl_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - void __user *ioctl_ptr; -}; - -#ifdef CONFIG_COMPAT -struct msm_cpp_frame_info32_t { - int32_t frame_id; - struct compat_timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - compat_caddr_t strip_info; - uint32_t msg_len; - compat_uint_t cpp_cmd_msg; - int src_fd; - int dst_fd; - struct compat_timeval in_time, out_time; - compat_caddr_t cookie; - compat_int_t status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; - struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2]; -}; - -struct msm_cpp_stream_buff_info32_t { - uint32_t identity; - uint32_t num_buffs; - compat_caddr_t buffer_info; -}; - -struct msm_pproc_queue_buf_info32_t { - struct msm_buf_mngr_info32_t buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl32_t) - -struct msm_camera_v4l2_ioctl32_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - compat_caddr_t ioctl_ptr; -}; -#endif - -#endif /* __MSMB_PPROC_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/include/soc/qcom/camera2.h b/drivers/media/platform/msm/camera_v2_j5/include/soc/qcom/camera2.h deleted file mode 100644 index 371fec8c1359..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/soc/qcom/camera2.h +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __CAMERA2_H__ -#define __CAMERA2_H__ - -#include "../../../include/media/msm_cam_sensor.h" -#include - -enum msm_camera_device_type_t { - MSM_CAMERA_I2C_DEVICE, - MSM_CAMERA_PLATFORM_DEVICE, - MSM_CAMERA_SPI_DEVICE, -}; - -enum msm_bus_perf_setting { - S_INIT, - S_PREVIEW, - S_VIDEO, - S_CAPTURE, - S_ZSL, - S_STEREO_VIDEO, - S_STEREO_CAPTURE, - S_DEFAULT, - S_LIVESHOT, - S_DUAL, - S_EXIT -}; - -struct msm_camera_slave_info { - uint16_t sensor_slave_addr; - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_cam_clk_info { - const char *clk_name; - long clk_rate; - uint32_t delay; -}; - -struct msm_pinctrl_info { - struct pinctrl *pinctrl; - struct pinctrl_state *gpio_state_active; - struct pinctrl_state *gpio_state_suspend; - bool use_pinctrl; -}; - -struct msm_cam_clk_setting { - struct msm_cam_clk_info *clk_info; - uint16_t num_clk_info; - uint8_t enable; -}; - -struct v4l2_subdev_info { - enum v4l2_mbus_pixelcode code; - enum v4l2_colorspace colorspace; - uint16_t fmt; - uint16_t order; -}; - -struct msm_camera_power_ctrl_t { - struct device *dev; - struct msm_sensor_power_setting *power_setting; - uint16_t power_setting_size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t power_down_setting_size; - struct msm_camera_gpio_conf *gpio_conf; - struct camera_vreg_t *cam_vreg; - int num_vreg; - struct msm_camera_i2c_conf *i2c_conf; - struct msm_cam_clk_info *clk_info; - struct msm_pinctrl_info pinctrl_info; - uint8_t cam_pinctrl_status; - uint16_t clk_info_size; -}; - -struct msm_camera_sensor_board_info { - const char *sensor_name; - const char *eeprom_name; - const char *actuator_name; - struct msm_camera_slave_info *slave_info; - struct msm_camera_csi_lane_params *csi_lane_params; - struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; - struct msm_actuator_info *actuator_info; - struct msm_sensor_info_t *sensor_info; - const char *misc_regulator; - struct msm_camera_power_ctrl_t power_info; - struct msm_camera_sensor_slave_info *cam_slave_info; -}; - -enum msm_camera_i2c_cmd_type { - MSM_CAMERA_I2C_CMD_WRITE, - MSM_CAMERA_I2C_CMD_POLL, -}; - -struct msm_camera_i2c_reg_conf { - uint16_t reg_addr; - uint16_t reg_data; - enum msm_camera_i2c_data_type dt; - enum msm_camera_i2c_cmd_type cmd_type; - int16_t mask; -}; - -struct msm_camera_i2c_conf_array { - struct msm_camera_i2c_reg_conf *conf; - uint16_t size; - uint16_t delay; - enum msm_camera_i2c_data_type data_type; -}; - -struct eeprom_map_t { - uint32_t valid_size; - uint32_t addr; - uint32_t addr_t; - uint32_t data; - uint32_t data_t; - uint32_t delay; -}; - -struct eeprom_slave_add_t { - uint32_t addr; -}; - -struct msm_eeprom_memory_map_t { - struct eeprom_map_t page; - struct eeprom_map_t pageen; - struct eeprom_map_t poll; - struct eeprom_map_t mem; - struct eeprom_slave_add_t saddr; -}; - -struct msm_eeprom_memory_block_t { - struct msm_eeprom_memory_map_t *map; - uint32_t num_map; /* number of map blocks */ - uint8_t *mapdata; - uint32_t num_data; /* size of total mapdata */ -}; - -struct msm_eeprom_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_offset; - uint32_t cmm_size; -}; - -struct msm_eeprom_board_info { - const char *eeprom_name; - uint16_t i2c_slaveaddr; - struct msm_camera_power_ctrl_t power_info; - struct msm_eeprom_cmm_t cmm_data; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/include/uapi/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_j5/include/uapi/media/msm_camera.h deleted file mode 100644 index 458e1baf8e3a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/include/uapi/media/msm_camera.h +++ /dev/null @@ -1,2280 +0,0 @@ -/* Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __UAPI_MSM_CAMERA_H -#define __UAPI_MSM_CAMERA_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include -#ifdef MSM_CAMERA_GCC -#include -#else -#include -#endif - -#include - -#define BIT(nr) (1UL << (nr)) - -#define MSM_CAM_IOCTL_MAGIC 'm' - -#define MAX_SERVER_PAYLOAD_LENGTH 8192 - -#define MSM_CAM_IOCTL_GET_SENSOR_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *) - -#define MSM_CAM_IOCTL_REGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *) - -#define MSM_CAM_IOCTL_UNREGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned) - -#define MSM_CAM_IOCTL_CTRL_COMMAND \ - _IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_STATS \ - _IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *) - -#define MSM_CAM_IOCTL_GETFRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *) - -#define MSM_CAM_IOCTL_ENABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_CTRL_CMD_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_CMD \ - _IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *) - -#define MSM_CAM_IOCTL_DISABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PAD_REG_RESET2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_VFE_APPS_RESET \ - _IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *) - -#define MSM_CAM_IOCTL_AXI_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_PICTURE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_frame *) - -#define MSM_CAM_IOCTL_SET_CROP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *) - -#define MSM_CAM_IOCTL_PICT_PP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *) - -#define MSM_CAM_IOCTL_PICT_PP_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *) - -#define MSM_CAM_IOCTL_SENSOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_FLASH_LED_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 23) - -#define MSM_CAM_IOCTL_CTRL_COMMAND_2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_AF_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 25, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_AF_CTRL_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 26, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_CONFIG_VPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 27, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_AXI_VPE_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 28, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 29, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CHARGE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 30, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 31) - -#define MSM_CAM_IOCTL_FLASH_CTRL \ - _IOW(MSM_CAM_IOCTL_MAGIC, 32, struct flash_ctrl_data *) - -#define MSM_CAM_IOCTL_ERROR_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 33, uint32_t *) - -#define MSM_CAM_IOCTL_ABORT_CAPTURE \ - _IO(MSM_CAM_IOCTL_MAGIC, 34) - -#define MSM_CAM_IOCTL_SET_FD_ROI \ - _IOW(MSM_CAM_IOCTL_MAGIC, 35, struct fd_roi_info *) - -#define MSM_CAM_IOCTL_GET_CAMERA_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 36, struct msm_camera_info *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_PIC_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 37) - -#define MSM_CAM_IOCTL_RELEASE_PIC_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 38, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PUT_ST_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 39, struct msm_camera_st_frame *) - -#define MSM_CAM_IOCTL_V4L2_EVT_NOTIFY \ - _IOW(MSM_CAM_IOCTL_MAGIC, 40, struct v4l2_event_and_payload) - -#define MSM_CAM_IOCTL_SET_MEM_MAP_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 41, struct msm_mem_map_info *) - -#define MSM_CAM_IOCTL_ACTUATOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 42, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_MCTL_POST_PROC \ - _IOW(MSM_CAM_IOCTL_MAGIC, 43, struct msm_mctl_post_proc_cmd *) - -#define MSM_CAM_IOCTL_RESERVE_FREE_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 44, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_RELEASE_FREE_FRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 45, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_PICT_PP_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 46, struct msm_pp_frame *) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_S_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 47, struct v4l2_control) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_QUERY_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 48, struct v4l2_queryctrl) - -#define MSM_CAM_IOCTL_GET_KERNEL_SYSTEM_TIME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 49, struct timeval *) - -#define MSM_CAM_IOCTL_SET_VFE_OUTPUT_TYPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 50, uint32_t *) - -#define MSM_CAM_IOCTL_MCTL_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 51, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_GET_ACTUATOR_INFO \ - _IOW(MSM_CAM_IOCTL_MAGIC, 52, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_EEPROM_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 53, struct msm_eeprom_cfg_data *) - -#define MSM_CAM_IOCTL_ISPIF_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 54, struct ispif_cfg_data *) - -#define MSM_CAM_IOCTL_STATS_REQBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 55, struct msm_stats_reqbuf *) - -#define MSM_CAM_IOCTL_STATS_ENQUEUEBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 56, struct msm_stats_buf_info *) - -#define MSM_CAM_IOCTL_STATS_FLUSH_BUFQ \ - _IOR(MSM_CAM_IOCTL_MAGIC, 57, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_SET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 58, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_UNSET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 59, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_GET_INST_HANDLE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 60, uint32_t *) - -#define MSM_CAM_IOCTL_STATS_UNREG_BUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 61, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_CSIC_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 62, struct csic_cfg_data *) - -#define MSM_CAM_IOCTL_CSID_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 63, struct csid_cfg_data *) - -#define MSM_CAM_IOCTL_CSIPHY_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 64, struct csiphy_cfg_data *) - -#define MSM_CAM_IOCTL_OEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 65, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_AXI_INIT \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 66, uint8_t *) - -#define MSM_CAM_IOCTL_AXI_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 67) - -struct v4l2_event_and_payload { - struct v4l2_event evt; - uint32_t payload_length; - uint32_t transaction_id; - void *payload; -}; - -struct msm_stats_reqbuf { - int num_buf; /* how many buffers requested */ - int stats_type; /* stats type */ -}; - -struct msm_stats_flush_bufq { - int stats_type; /* enum msm_stats_enum_type */ -}; - -struct msm_mctl_pp_cmd { - int32_t id; - uint16_t length; - void *value; -}; - -struct msm_mctl_post_proc_cmd { - int32_t type; - struct msm_mctl_pp_cmd cmd; -}; - -#define MSM_CAMERA_LED_OFF 0 -#define MSM_CAMERA_LED_LOW 1 -#define MSM_CAMERA_LED_HIGH 2 -#define MSM_CAMERA_LED_INIT 3 -#define MSM_CAMERA_LED_RELEASE 4 - -#define MSM_CAMERA_STROBE_FLASH_NONE 0 -#define MSM_CAMERA_STROBE_FLASH_XENON 1 - -#define MSM_MAX_CAMERA_SENSORS 5 -#define MAX_SENSOR_NAME 32 -#define MAX_CAM_NAME_SIZE 32 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 12 -#define MAX_ACTUATOR_TYPE_SIZE 32 -#define MAX_ACTUATOR_REG_TBL_SIZE 8 - - -#define MSM_MAX_CAMERA_CONFIGS 2 - -#define PP_SNAP 0x01 -#define PP_RAW_SNAP ((0x01)<<1) -#define PP_PREV ((0x01)<<2) -#define PP_THUMB ((0x01)<<3) -#define PP_MASK (PP_SNAP|PP_RAW_SNAP|PP_PREV|PP_THUMB) - -#define MSM_CAM_CTRL_CMD_DONE 0 -#define MSM_CAM_SENSOR_VFE_CMD 1 - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES 8 - -/***************************************************** - * structure - *****************************************************/ - -/* define five type of structures for userspace <==> kernel - * space communication: - * command 1 - 2 are from userspace ==> kernel - * command 3 - 4 are from kernel ==> userspace - * - * 1. control command: control command(from control thread), - * control status (from config thread); - */ -struct msm_ctrl_cmd { - uint16_t type; - uint16_t length; - void *value; - uint16_t status; - uint32_t timeout_ms; - int resp_fd; /* FIXME: to be used by the kernel, pass-through for now */ - int vnode_id; /* video dev id. Can we overload resp_fd? */ - int queue_idx; - uint32_t evt_id; - uint32_t stream_type; /* used to pass value to qcamera server */ - int config_ident; /*used as identifier for config node*/ -}; - -struct msm_cam_evt_msg { - unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */ - unsigned short msg_id; - unsigned int len; /* size in, number of bytes out */ - uint32_t frame_id; - void *data; - struct timespec timestamp; -}; - -struct msm_pp_frame_sp { - /* phy addr of the buffer */ - unsigned long phy_addr; - uint32_t y_off; - uint32_t cbcr_off; - /* buffer length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame_mp { - /* phy addr of the plane */ - unsigned long phy_addr; - /* offset of plane data */ - uint32_t data_offset; - /* plane length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame { - uint32_t handle; /* stores vb cookie */ - uint32_t frame_id; - unsigned short buf_idx; - int path; - unsigned short image_type; - unsigned short num_planes; /* 1 for sp */ - struct timeval timestamp; - union { - struct msm_pp_frame_sp sp; - struct msm_pp_frame_mp mp[MAX_PLANES]; - }; - int node_type; - uint32_t inst_handle; -}; - -struct msm_pp_crop { - uint32_t src_x; - uint32_t src_y; - uint32_t src_w; - uint32_t src_h; - uint32_t dst_x; - uint32_t dst_y; - uint32_t dst_w; - uint32_t dst_h; - uint8_t update_flag; -}; - -struct msm_mctl_pp_frame_cmd { - uint32_t cookie; - uint8_t vpe_output_action; - struct msm_pp_frame src_frame; - struct msm_pp_frame dest_frame; - struct msm_pp_crop crop; - int path; -}; - -struct msm_cam_evt_divert_frame { - unsigned short image_mode; - unsigned short op_mode; - unsigned short inst_idx; - unsigned short node_idx; - struct msm_pp_frame frame; - int do_pp; -}; - -struct msm_mctl_pp_cmd_ack_event { - uint32_t cmd; /* VPE_CMD_ZOOM? */ - int status; /* 0 done, < 0 err */ - uint32_t cookie; /* daemon's cookie */ -}; - -struct msm_mctl_pp_event_info { - int32_t event; - union { - struct msm_mctl_pp_cmd_ack_event ack; - }; -}; - -struct msm_isp_event_ctrl { - unsigned short resptype; - union { - struct msm_cam_evt_msg isp_msg; - struct msm_ctrl_cmd ctrl; - struct msm_cam_evt_divert_frame div_frame; - struct msm_mctl_pp_event_info pp_event_info; - } isp_data; -}; - -#define MSM_CAM_RESP_CTRL 0 -#define MSM_CAM_RESP_STAT_EVT_MSG 1 -#define MSM_CAM_RESP_STEREO_OP_1 2 -#define MSM_CAM_RESP_STEREO_OP_2 3 -#define MSM_CAM_RESP_V4L2 4 -#define MSM_CAM_RESP_DIV_FRAME_EVT_MSG 5 -#define MSM_CAM_RESP_DONE_EVENT 6 -#define MSM_CAM_RESP_MCTL_PP_EVENT 7 -#define MSM_CAM_RESP_MAX 8 - -#define MSM_CAM_APP_NOTIFY_EVENT 0 -#define MSM_CAM_APP_NOTIFY_ERROR_EVENT 1 - -/* this one is used to send ctrl/status up to config thread */ - -struct msm_stats_event_ctrl { - /* 0 - ctrl_cmd from control thread, - * 1 - stats/event kernel, - * 2 - V4L control or read request */ - int resptype; - int timeout_ms; - struct msm_ctrl_cmd ctrl_cmd; - /* struct vfe_event_t stats_event; */ - struct msm_cam_evt_msg stats_event; -}; - -/* 2. config command: config command(from config thread); */ -struct msm_camera_cfg_cmd { - /* what to config: - * 1 - sensor config, 2 - vfe config */ - uint16_t cfg_type; - - /* sensor config type */ - uint16_t cmd_type; - uint16_t queue; - uint16_t length; - void *value; -}; - -#define CMD_GENERAL 0 -#define CMD_AXI_CFG_OUT1 1 -#define CMD_AXI_CFG_SNAP_O1_AND_O2 2 -#define CMD_AXI_CFG_OUT2 3 -#define CMD_PICT_T_AXI_CFG 4 -#define CMD_PICT_M_AXI_CFG 5 -#define CMD_RAW_PICT_AXI_CFG 6 - -#define CMD_FRAME_BUF_RELEASE 7 -#define CMD_PREV_BUF_CFG 8 -#define CMD_SNAP_BUF_RELEASE 9 -#define CMD_SNAP_BUF_CFG 10 -#define CMD_STATS_DISABLE 11 -#define CMD_STATS_AEC_AWB_ENABLE 12 -#define CMD_STATS_AF_ENABLE 13 -#define CMD_STATS_AEC_ENABLE 14 -#define CMD_STATS_AWB_ENABLE 15 -#define CMD_STATS_ENABLE 16 - -#define CMD_STATS_AXI_CFG 17 -#define CMD_STATS_AEC_AXI_CFG 18 -#define CMD_STATS_AF_AXI_CFG 19 -#define CMD_STATS_AWB_AXI_CFG 20 -#define CMD_STATS_RS_AXI_CFG 21 -#define CMD_STATS_CS_AXI_CFG 22 -#define CMD_STATS_IHIST_AXI_CFG 23 -#define CMD_STATS_SKIN_AXI_CFG 24 - -#define CMD_STATS_BUF_RELEASE 25 -#define CMD_STATS_AEC_BUF_RELEASE 26 -#define CMD_STATS_AF_BUF_RELEASE 27 -#define CMD_STATS_AWB_BUF_RELEASE 28 -#define CMD_STATS_RS_BUF_RELEASE 29 -#define CMD_STATS_CS_BUF_RELEASE 30 -#define CMD_STATS_IHIST_BUF_RELEASE 31 -#define CMD_STATS_SKIN_BUF_RELEASE 32 - -#define UPDATE_STATS_INVALID 33 -#define CMD_AXI_CFG_SNAP_GEMINI 34 -#define CMD_AXI_CFG_SNAP 35 -#define CMD_AXI_CFG_PREVIEW 36 -#define CMD_AXI_CFG_VIDEO 37 - -#define CMD_STATS_IHIST_ENABLE 38 -#define CMD_STATS_RS_ENABLE 39 -#define CMD_STATS_CS_ENABLE 40 -#define CMD_VPE 41 -#define CMD_AXI_CFG_VPE 42 -#define CMD_AXI_CFG_ZSL 43 -#define CMD_AXI_CFG_SNAP_VPE 44 -#define CMD_AXI_CFG_SNAP_THUMB_VPE 45 - -#define CMD_CONFIG_PING_ADDR 46 -#define CMD_CONFIG_PONG_ADDR 47 -#define CMD_CONFIG_FREE_BUF_ADDR 48 -#define CMD_AXI_CFG_ZSL_ALL_CHNLS 49 -#define CMD_AXI_CFG_VIDEO_ALL_CHNLS 50 -#define CMD_VFE_BUFFER_RELEASE 51 -#define CMD_VFE_PROCESS_IRQ 52 -#define CMD_STATS_BG_ENABLE 53 -#define CMD_STATS_BF_ENABLE 54 -#define CMD_STATS_BHIST_ENABLE 55 -#define CMD_STATS_BG_BUF_RELEASE 56 -#define CMD_STATS_BF_BUF_RELEASE 57 -#define CMD_STATS_BHIST_BUF_RELEASE 58 -#define CMD_VFE_PIX_SOF_COUNT_UPDATE 59 -#define CMD_VFE_COUNT_PIX_SOF_ENABLE 60 -#define CMD_STATS_BE_ENABLE 61 -#define CMD_STATS_BE_BUF_RELEASE 62 - -#define CMD_AXI_CFG_PRIM BIT(8) -#define CMD_AXI_CFG_PRIM_ALL_CHNLS BIT(9) -#define CMD_AXI_CFG_SEC BIT(10) -#define CMD_AXI_CFG_SEC_ALL_CHNLS BIT(11) -#define CMD_AXI_CFG_TERT1 BIT(12) -#define CMD_AXI_CFG_TERT2 BIT(13) - -#define CMD_AXI_START 0xE1 -#define CMD_AXI_STOP 0xE2 -#define CMD_AXI_RESET 0xE3 -#define CMD_AXI_ABORT 0xE4 - - - -#define AXI_CMD_PREVIEW BIT(0) -#define AXI_CMD_CAPTURE BIT(1) -#define AXI_CMD_RECORD BIT(2) -#define AXI_CMD_ZSL BIT(3) -#define AXI_CMD_RAW_CAPTURE BIT(4) -#define AXI_CMD_LIVESHOT BIT(5) - -/* vfe config command: config command(from config thread)*/ -struct msm_vfe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -struct msm_vpe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -#define MAX_CAMERA_ENABLE_NAME_LEN 32 -struct camera_enable_cmd { - char name[MAX_CAMERA_ENABLE_NAME_LEN]; -}; - -#define MSM_PMEM_OUTPUT1 0 -#define MSM_PMEM_OUTPUT2 1 -#define MSM_PMEM_OUTPUT1_OUTPUT2 2 -#define MSM_PMEM_THUMBNAIL 3 -#define MSM_PMEM_MAINIMG 4 -#define MSM_PMEM_RAW_MAINIMG 5 -#define MSM_PMEM_AEC_AWB 6 -#define MSM_PMEM_AF 7 -#define MSM_PMEM_AEC 8 -#define MSM_PMEM_AWB 9 -#define MSM_PMEM_RS 10 -#define MSM_PMEM_CS 11 -#define MSM_PMEM_IHIST 12 -#define MSM_PMEM_SKIN 13 -#define MSM_PMEM_VIDEO 14 -#define MSM_PMEM_PREVIEW 15 -#define MSM_PMEM_VIDEO_VPE 16 -#define MSM_PMEM_C2D 17 -#define MSM_PMEM_MAINIMG_VPE 18 -#define MSM_PMEM_THUMBNAIL_VPE 19 -#define MSM_PMEM_BAYER_GRID 20 -#define MSM_PMEM_BAYER_FOCUS 21 -#define MSM_PMEM_BAYER_HIST 22 -#define MSM_PMEM_BAYER_EXPOSURE 23 -#define MSM_PMEM_MAX 24 - -#define STAT_AEAW 0 -#define STAT_AEC 1 -#define STAT_AF 2 -#define STAT_AWB 3 -#define STAT_RS 4 -#define STAT_CS 5 -#define STAT_IHIST 6 -#define STAT_SKIN 7 -#define STAT_BG 8 -#define STAT_BF 9 -#define STAT_BE 10 -#define STAT_BHIST 11 -#define STAT_MAX 12 - -#define FRAME_PREVIEW_OUTPUT1 0 -#define FRAME_PREVIEW_OUTPUT2 1 -#define FRAME_SNAPSHOT 2 -#define FRAME_THUMBNAIL 3 -#define FRAME_RAW_SNAPSHOT 4 -#define FRAME_MAX 5 - -enum msm_stats_enum_type { - MSM_STATS_TYPE_AEC, /* legacy based AEC */ - MSM_STATS_TYPE_AF, /* legacy based AF */ - MSM_STATS_TYPE_AWB, /* legacy based AWB */ - MSM_STATS_TYPE_RS, /* legacy based RS */ - MSM_STATS_TYPE_CS, /* legacy based CS */ - MSM_STATS_TYPE_IHIST, /* legacy based HIST */ - MSM_STATS_TYPE_SKIN, /* legacy based SKIN */ - MSM_STATS_TYPE_BG, /* Bayer Grids */ - MSM_STATS_TYPE_BF, /* Bayer Focus */ - MSM_STATS_TYPE_BE, /* Bayer Exposure*/ - MSM_STATS_TYPE_BHIST, /* Bayer Hist */ - MSM_STATS_TYPE_AE_AW, /* legacy stats for vfe 2.x*/ - MSM_STATS_TYPE_COMP, /* Composite stats */ - MSM_STATS_TYPE_MAX /* MAX */ -}; - -struct msm_stats_buf_info { - int type; /* msm_stats_enum_type */ - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; - int buf_idx; -}; - -struct msm_pmem_info { - int type; - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; -}; - -struct outputCfg { - uint32_t height; - uint32_t width; - - uint32_t window_height_firstline; - uint32_t window_height_lastline; -}; - -#define VIDEO_NODE 0 -#define MCTL_NODE 1 - -#define OUTPUT_1 0 -#define OUTPUT_2 1 -#define OUTPUT_1_AND_2 2 /* snapshot only */ -#define OUTPUT_1_AND_3 3 /* video */ -#define CAMIF_TO_AXI_VIA_OUTPUT_2 4 -#define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 5 -#define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6 -#define OUTPUT_1_2_AND_3 7 -#define OUTPUT_ALL_CHNLS 8 -#define OUTPUT_VIDEO_ALL_CHNLS 9 -#define OUTPUT_ZSL_ALL_CHNLS 10 -#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_ZSL_ALL_CHNLS - -#define OUTPUT_PRIM BIT(8) -#define OUTPUT_PRIM_ALL_CHNLS BIT(9) -#define OUTPUT_SEC BIT(10) -#define OUTPUT_SEC_ALL_CHNLS BIT(11) -#define OUTPUT_TERT1 BIT(12) -#define OUTPUT_TERT2 BIT(13) - - - -#define MSM_FRAME_PREV_1 0 -#define MSM_FRAME_PREV_2 1 -#define MSM_FRAME_ENC 2 - -#define OUTPUT_TYPE_P BIT(0) -#define OUTPUT_TYPE_T BIT(1) -#define OUTPUT_TYPE_S BIT(2) -#define OUTPUT_TYPE_V BIT(3) -#define OUTPUT_TYPE_L BIT(4) -#define OUTPUT_TYPE_ST_L BIT(5) -#define OUTPUT_TYPE_ST_R BIT(6) -#define OUTPUT_TYPE_ST_D BIT(7) -#define OUTPUT_TYPE_R BIT(8) -#define OUTPUT_TYPE_R1 BIT(9) -#define OUTPUT_TYPE_SAEC BIT(10) -#define OUTPUT_TYPE_SAFC BIT(11) -#define OUTPUT_TYPE_SAWB BIT(12) -#define OUTPUT_TYPE_IHST BIT(13) -#define OUTPUT_TYPE_CSTA BIT(14) - -struct fd_roi_info { - void *info; - int info_len; -}; - -struct msm_mem_map_info { - uint32_t cookie; - uint32_t length; - uint32_t mem_type; -}; - -#define MSM_MEM_MMAP 0 -#define MSM_MEM_USERPTR 1 -#define MSM_PLANE_MAX 8 -#define MSM_PLANE_Y 0 -#define MSM_PLANE_UV 1 - -struct msm_frame { - struct timespec ts; - int path; - int type; - unsigned long buffer; - uint32_t phy_offset; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - int fd; - - void *cropinfo; - int croplen; - uint32_t error_code; - struct fd_roi_info roi_info; - uint32_t frame_id; - int stcam_quality_ind; - uint32_t stcam_conv_value; - - struct ion_allocation_data ion_alloc; - struct ion_fd_data fd_data; - int ion_dev_fd; -}; - -enum msm_st_frame_packing { - SIDE_BY_SIDE_HALF, - SIDE_BY_SIDE_FULL, - TOP_DOWN_HALF, - TOP_DOWN_FULL, -}; - -struct msm_st_crop { - uint32_t in_w; - uint32_t in_h; - uint32_t out_w; - uint32_t out_h; -}; - -struct msm_st_half { - uint32_t buf_p0_off; - uint32_t buf_p1_off; - uint32_t buf_p0_stride; - uint32_t buf_p1_stride; - uint32_t pix_x_off; - uint32_t pix_y_off; - struct msm_st_crop stCropInfo; -}; - -struct msm_st_frame { - struct msm_frame buf_info; - int type; - enum msm_st_frame_packing packing; - struct msm_st_half L; - struct msm_st_half R; - int frame_id; -}; - -#define MSM_CAMERA_ERR_MASK (0xFFFFFFFF & 1) - -struct stats_buff { - unsigned long buff; - int fd; -}; - -struct msm_stats_buf { - uint8_t awb_ymin; - struct stats_buff aec; - struct stats_buff awb; - struct stats_buff af; - struct stats_buff be; - struct stats_buff ihist; - struct stats_buff rs; - struct stats_buff cs; - struct stats_buff skin; - int type; - uint32_t status_bits; - unsigned long buffer; - int fd; - int length; - struct ion_handle *handle; - uint32_t frame_id; - int buf_idx; -}; -#define MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT 0 -/* video capture mode in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_PREVIEW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+1) -/* extendedmode for video recording in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_VIDEO \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+2) -/* extendedmode for the full size main image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_MAIN (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+3) -/* extendedmode for the thumb nail image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_THUMBNAIL \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+4) -/* ISP_PIX_OUTPUT1: no pp, directly send output1 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+5) -/* ISP_PIX_OUTPUT2: no pp, directly send output2 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+6) -/* raw image type */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RAW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+7) -/* RDI dump */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+8) -/* RDI dump 1 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+9) -/* RDI dump 2 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+10) -#define MSM_V4L2_EXT_CAPTURE_MODE_AEC \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+11) -#define MSM_V4L2_EXT_CAPTURE_MODE_AWB \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+12) -#define MSM_V4L2_EXT_CAPTURE_MODE_AF \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+13) -#define MSM_V4L2_EXT_CAPTURE_MODE_IHIST \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+14) -#define MSM_V4L2_EXT_CAPTURE_MODE_CS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+15) -#define MSM_V4L2_EXT_CAPTURE_MODE_RS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+16) -#define MSM_V4L2_EXT_CAPTURE_MODE_CSTA \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+17) -#define MSM_V4L2_EXT_CAPTURE_MODE_V2X_LIVESHOT \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+18) -#define MSM_V4L2_EXT_CAPTURE_MODE_MAX (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+19) - - -#define MSM_V4L2_PID_MOTION_ISO V4L2_CID_PRIVATE_BASE -#define MSM_V4L2_PID_EFFECT (V4L2_CID_PRIVATE_BASE+1) -#define MSM_V4L2_PID_HJR (V4L2_CID_PRIVATE_BASE+2) -#define MSM_V4L2_PID_LED_MODE (V4L2_CID_PRIVATE_BASE+3) -#define MSM_V4L2_PID_PREP_SNAPSHOT (V4L2_CID_PRIVATE_BASE+4) -#define MSM_V4L2_PID_EXP_METERING (V4L2_CID_PRIVATE_BASE+5) -#define MSM_V4L2_PID_ISO (V4L2_CID_PRIVATE_BASE+6) -#define MSM_V4L2_PID_CAM_MODE (V4L2_CID_PRIVATE_BASE+7) -#define MSM_V4L2_PID_LUMA_ADAPTATION (V4L2_CID_PRIVATE_BASE+8) -#define MSM_V4L2_PID_BEST_SHOT (V4L2_CID_PRIVATE_BASE+9) -#define MSM_V4L2_PID_FOCUS_MODE (V4L2_CID_PRIVATE_BASE+10) -#define MSM_V4L2_PID_BL_DETECTION (V4L2_CID_PRIVATE_BASE+11) -#define MSM_V4L2_PID_SNOW_DETECTION (V4L2_CID_PRIVATE_BASE+12) -#define MSM_V4L2_PID_CTRL_CMD (V4L2_CID_PRIVATE_BASE+13) -#define MSM_V4L2_PID_EVT_SUB_INFO (V4L2_CID_PRIVATE_BASE+14) -#define MSM_V4L2_PID_STROBE_FLASH (V4L2_CID_PRIVATE_BASE+15) -#define MSM_V4L2_PID_INST_HANDLE (V4L2_CID_PRIVATE_BASE+16) -#define MSM_V4L2_PID_MMAP_INST (V4L2_CID_PRIVATE_BASE+17) -#define MSM_V4L2_PID_PP_PLANE_INFO (V4L2_CID_PRIVATE_BASE+18) -#define MSM_V4L2_PID_MAX MSM_V4L2_PID_PP_PLANE_INFO - -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_DEFAULT 0 -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_PREVIEW (MSM_V4L2_CAM_OP_DEFAULT+1) -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_VIDEO (MSM_V4L2_CAM_OP_DEFAULT+2) -/* camera operation mode for standard shapshot - two frame output queues */ -#define MSM_V4L2_CAM_OP_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+3) -/* camera operation mode for zsl shapshot - three output queues */ -#define MSM_V4L2_CAM_OP_ZSL (MSM_V4L2_CAM_OP_DEFAULT+4) -/* camera operation mode for raw snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_RAW (MSM_V4L2_CAM_OP_DEFAULT+5) -/* camera operation mode for jpeg snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_JPEG_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+6) - - -#define MSM_V4L2_VID_CAP_TYPE 0 -#define MSM_V4L2_STREAM_ON 1 -#define MSM_V4L2_STREAM_OFF 2 -#define MSM_V4L2_SNAPSHOT 3 -#define MSM_V4L2_QUERY_CTRL 4 -#define MSM_V4L2_GET_CTRL 5 -#define MSM_V4L2_SET_CTRL 6 -#define MSM_V4L2_QUERY 7 -#define MSM_V4L2_GET_CROP 8 -#define MSM_V4L2_SET_CROP 9 -#define MSM_V4L2_OPEN 10 -#define MSM_V4L2_CLOSE 11 -#define MSM_V4L2_SET_CTRL_CMD 12 -#define MSM_V4L2_EVT_SUB_MASK 13 -#define MSM_V4L2_PRIVATE_CMD 14 -#define MSM_V4L2_MAX 15 -#define V4L2_CAMERA_EXIT 43 - -struct crop_info { - void *info; - int len; -}; - -struct msm_postproc { - int ftnum; - struct msm_frame fthumnail; - int fmnum; - struct msm_frame fmain; -}; - -struct msm_snapshot_pp_status { - void *status; -}; - -#define CFG_SET_MODE 0 -#define CFG_SET_EFFECT 1 -#define CFG_START 2 -#define CFG_PWR_UP 3 -#define CFG_PWR_DOWN 4 -#define CFG_WRITE_EXPOSURE_GAIN 5 -#define CFG_SET_DEFAULT_FOCUS 6 -#define CFG_MOVE_FOCUS 7 -#define CFG_REGISTER_TO_REAL_GAIN 8 -#define CFG_REAL_TO_REGISTER_GAIN 9 -#define CFG_SET_FPS 10 -#define CFG_SET_PICT_FPS 11 -#define CFG_SET_BRIGHTNESS 12 -#define CFG_SET_CONTRAST 13 -#define CFG_SET_ZOOM 14 -#define CFG_SET_EXPOSURE_MODE 15 -#define CFG_SET_WB 16 -#define CFG_SET_ANTIBANDING 17 -#define CFG_SET_EXP_GAIN 18 -#define CFG_SET_PICT_EXP_GAIN 19 -#define CFG_SET_LENS_SHADING 20 -#define CFG_GET_PICT_FPS 21 -#define CFG_GET_PREV_L_PF 22 -#define CFG_GET_PREV_P_PL 23 -#define CFG_GET_PICT_L_PF 24 -#define CFG_GET_PICT_P_PL 25 -#define CFG_GET_AF_MAX_STEPS 26 -#define CFG_GET_PICT_MAX_EXP_LC 27 -#define CFG_SEND_WB_INFO 28 -#define CFG_SENSOR_INIT 29 -#define CFG_GET_3D_CALI_DATA 30 -#define CFG_GET_CALIB_DATA 31 -#define CFG_GET_OUTPUT_INFO 32 -#define CFG_GET_EEPROM_INFO 33 -#define CFG_GET_EEPROM_DATA 34 -#define CFG_SET_ACTUATOR_INFO 35 -#define CFG_GET_ACTUATOR_INFO 36 -/* TBD: QRD */ -#define CFG_SET_SATURATION 37 -#define CFG_SET_SHARPNESS 38 -#define CFG_SET_TOUCHAEC 39 -#define CFG_SET_AUTO_FOCUS 40 -#define CFG_SET_AUTOFLASH 41 -#define CFG_SET_EXPOSURE_COMPENSATION 42 -#define CFG_SET_ISO 43 -#define CFG_START_STREAM 44 -#define CFG_STOP_STREAM 45 -#define CFG_GET_CSI_PARAMS 46 -#define CFG_POWER_UP 47 -#define CFG_POWER_DOWN 48 -#define CFG_WRITE_I2C_ARRAY 49 -#define CFG_READ_I2C_ARRAY 50 -#define CFG_PCLK_CHANGE 51 -#define CFG_CONFIG_VREG_ARRAY 52 -#define CFG_CONFIG_CLK_ARRAY 53 -#define CFG_GPIO_OP 54 -#define CFG_MAX 55 - - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define SENSOR_PREVIEW_MODE 0 -#define SENSOR_SNAPSHOT_MODE 1 -#define SENSOR_RAW_SNAPSHOT_MODE 2 -#define SENSOR_HFR_60FPS_MODE 3 -#define SENSOR_HFR_90FPS_MODE 4 -#define SENSOR_HFR_120FPS_MODE 5 - -#define SENSOR_QTR_SIZE 0 -#define SENSOR_FULL_SIZE 1 -#define SENSOR_QVGA_SIZE 2 -#define SENSOR_INVALID_SIZE 3 - -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#define CAMERA_EFFECT_FADED 12 -#define CAMERA_EFFECT_VINTAGECOOL 13 -#define CAMERA_EFFECT_VINTAGEWARM 14 -#define CAMERA_EFFECT_ACCENT_BLUE 15 -#define CAMERA_EFFECT_ACCENT_GREEN 16 -#define CAMERA_EFFECT_ACCENT_ORANGE 17 -#define CAMERA_EFFECT_MAX 18 - -/* QRD */ -#define CAMERA_EFFECT_BW 10 -#define CAMERA_EFFECT_BLUISH 12 -#define CAMERA_EFFECT_REDDISH 13 -#define CAMERA_EFFECT_GREENISH 14 - -/* QRD */ -#define CAMERA_ANTIBANDING_OFF 0 -#define CAMERA_ANTIBANDING_50HZ 2 -#define CAMERA_ANTIBANDING_60HZ 1 -#define CAMERA_ANTIBANDING_AUTO 3 - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - -#define CAMERA_BRIGHTNESS_LV0 0 -#define CAMERA_BRIGHTNESS_LV1 1 -#define CAMERA_BRIGHTNESS_LV2 2 -#define CAMERA_BRIGHTNESS_LV3 3 -#define CAMERA_BRIGHTNESS_LV4 4 -#define CAMERA_BRIGHTNESS_LV5 5 -#define CAMERA_BRIGHTNESS_LV6 6 -#define CAMERA_BRIGHTNESS_LV7 7 -#define CAMERA_BRIGHTNESS_LV8 8 - - -#define CAMERA_SATURATION_LV0 0 -#define CAMERA_SATURATION_LV1 1 -#define CAMERA_SATURATION_LV2 2 -#define CAMERA_SATURATION_LV3 3 -#define CAMERA_SATURATION_LV4 4 -#define CAMERA_SATURATION_LV5 5 -#define CAMERA_SATURATION_LV6 6 -#define CAMERA_SATURATION_LV7 7 -#define CAMERA_SATURATION_LV8 8 - -#define CAMERA_SHARPNESS_LV0 0 -#define CAMERA_SHARPNESS_LV1 3 -#define CAMERA_SHARPNESS_LV2 6 -#define CAMERA_SHARPNESS_LV3 9 -#define CAMERA_SHARPNESS_LV4 12 -#define CAMERA_SHARPNESS_LV5 15 -#define CAMERA_SHARPNESS_LV6 18 -#define CAMERA_SHARPNESS_LV7 21 -#define CAMERA_SHARPNESS_LV8 24 -#define CAMERA_SHARPNESS_LV9 27 -#define CAMERA_SHARPNESS_LV10 30 - -#define CAMERA_SETAE_AVERAGE 0 -#define CAMERA_SETAE_CENWEIGHT 1 - -#define CAMERA_WB_AUTO 1 /* This list must match aeecamera.h */ -#define CAMERA_WB_CUSTOM 2 -#define CAMERA_WB_INCANDESCENT 3 -#define CAMERA_WB_FLUORESCENT 4 -#define CAMERA_WB_DAYLIGHT 5 -#define CAMERA_WB_CLOUDY_DAYLIGHT 6 -#define CAMERA_WB_TWILIGHT 7 -#define CAMERA_WB_SHADE 8 - -#define CAMERA_EXPOSURE_COMPENSATION_LV0 12 -#define CAMERA_EXPOSURE_COMPENSATION_LV1 6 -#define CAMERA_EXPOSURE_COMPENSATION_LV2 0 -#define CAMERA_EXPOSURE_COMPENSATION_LV3 -6 -#define CAMERA_EXPOSURE_COMPENSATION_LV4 -12 - -enum msm_v4l2_saturation_level { - MSM_V4L2_SATURATION_L0, - MSM_V4L2_SATURATION_L1, - MSM_V4L2_SATURATION_L2, - MSM_V4L2_SATURATION_L3, - MSM_V4L2_SATURATION_L4, - MSM_V4L2_SATURATION_L5, - MSM_V4L2_SATURATION_L6, - MSM_V4L2_SATURATION_L7, - MSM_V4L2_SATURATION_L8, - MSM_V4L2_SATURATION_L9, - MSM_V4L2_SATURATION_L10, -}; - -enum msm_v4l2_contrast_level { - MSM_V4L2_CONTRAST_L0, - MSM_V4L2_CONTRAST_L1, - MSM_V4L2_CONTRAST_L2, - MSM_V4L2_CONTRAST_L3, - MSM_V4L2_CONTRAST_L4, - MSM_V4L2_CONTRAST_L5, - MSM_V4L2_CONTRAST_L6, - MSM_V4L2_CONTRAST_L7, - MSM_V4L2_CONTRAST_L8, - MSM_V4L2_CONTRAST_L9, - MSM_V4L2_CONTRAST_L10, -}; - - -enum msm_v4l2_exposure_level { - MSM_V4L2_EXPOSURE_N2, - MSM_V4L2_EXPOSURE_N1, - MSM_V4L2_EXPOSURE_D, - MSM_V4L2_EXPOSURE_P1, - MSM_V4L2_EXPOSURE_P2, -}; - -enum msm_v4l2_sharpness_level { - MSM_V4L2_SHARPNESS_L0, - MSM_V4L2_SHARPNESS_L1, - MSM_V4L2_SHARPNESS_L2, - MSM_V4L2_SHARPNESS_L3, - MSM_V4L2_SHARPNESS_L4, - MSM_V4L2_SHARPNESS_L5, - MSM_V4L2_SHARPNESS_L6, -}; - -enum msm_v4l2_expo_metering_mode { - MSM_V4L2_EXP_FRAME_AVERAGE, - MSM_V4L2_EXP_CENTER_WEIGHTED, - MSM_V4L2_EXP_SPOT_METERING, -}; - -enum msm_v4l2_iso_mode { - MSM_V4L2_ISO_AUTO = 0, - MSM_V4L2_ISO_DEBLUR, - MSM_V4L2_ISO_100, - MSM_V4L2_ISO_200, - MSM_V4L2_ISO_400, - MSM_V4L2_ISO_800, - MSM_V4L2_ISO_1600, -}; - -enum msm_v4l2_wb_mode { - MSM_V4L2_WB_OFF, - MSM_V4L2_WB_AUTO , - MSM_V4L2_WB_CUSTOM, - MSM_V4L2_WB_INCANDESCENT, - MSM_V4L2_WB_FLUORESCENT, - MSM_V4L2_WB_DAYLIGHT, - MSM_V4L2_WB_CLOUDY_DAYLIGHT, -}; - -enum msm_v4l2_special_effect { - MSM_V4L2_EFFECT_OFF, - MSM_V4L2_EFFECT_MONO, - MSM_V4L2_EFFECT_NEGATIVE, - MSM_V4L2_EFFECT_SOLARIZE, - MSM_V4L2_EFFECT_SEPIA, - MSM_V4L2_EFFECT_POSTERAIZE, - MSM_V4L2_EFFECT_WHITEBOARD, - MSM_V4L2_EFFECT_BLACKBOARD, - MSM_V4L2_EFFECT_AQUA, - MSM_V4L2_EFFECT_EMBOSS, - MSM_V4L2_EFFECT_SKETCH, - MSM_V4L2_EFFECT_NEON, - MSM_V4L2_EFFECT_MAX, -}; - -enum msm_v4l2_power_line_frequency { - MSM_V4L2_POWER_LINE_OFF, - MSM_V4L2_POWER_LINE_60HZ, - MSM_V4L2_POWER_LINE_50HZ, - MSM_V4L2_POWER_LINE_AUTO, -}; - -#define CAMERA_ISO_TYPE_AUTO 0 -#define CAMEAR_ISO_TYPE_HJR 1 -#define CAMEAR_ISO_TYPE_100 2 -#define CAMERA_ISO_TYPE_200 3 -#define CAMERA_ISO_TYPE_400 4 -#define CAMEAR_ISO_TYPE_800 5 -#define CAMERA_ISO_TYPE_1600 6 - -struct sensor_pict_fps { - uint16_t prevfps; - uint16_t pictfps; -}; - -struct exp_gain_cfg { - uint16_t gain; - uint32_t line; -}; - -struct focus_cfg { - int32_t steps; - int dir; -}; - -struct fps_cfg { - uint16_t f_mult; - uint16_t fps_div; - uint32_t pict_fps_div; -}; -struct wb_info_cfg { - uint16_t red_gain; - uint16_t green_gain; - uint16_t blue_gain; -}; -struct sensor_3d_exp_cfg { - uint16_t gain; - uint32_t line; - uint16_t r_gain; - uint16_t b_gain; - uint16_t gr_gain; - uint16_t gb_gain; - uint16_t gain_adjust; -}; -struct sensor_3d_cali_data_t{ - unsigned char left_p_matrix[3][4][8]; - unsigned char right_p_matrix[3][4][8]; - unsigned char square_len[8]; - unsigned char focal_len[8]; - unsigned char pixel_pitch[8]; - uint16_t left_r; - uint16_t left_b; - uint16_t left_gb; - uint16_t left_af_far; - uint16_t left_af_mid; - uint16_t left_af_short; - uint16_t left_af_5um; - uint16_t left_af_50up; - uint16_t left_af_50down; - uint16_t right_r; - uint16_t right_b; - uint16_t right_gb; - uint16_t right_af_far; - uint16_t right_af_mid; - uint16_t right_af_short; - uint16_t right_af_5um; - uint16_t right_af_50up; - uint16_t right_af_50down; -}; -struct sensor_init_cfg { - uint8_t prev_res; - uint8_t pict_res; -}; - -struct sensor_calib_data { - /* Color Related Measurements */ - uint16_t r_over_g; - uint16_t b_over_g; - uint16_t gr_over_gb; - - /* Lens Related Measurements */ - uint16_t macro_2_inf; - uint16_t inf_2_macro; - uint16_t stroke_amt; - uint16_t af_pos_1m; - uint16_t af_pos_inf; -}; - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_INVALID_RES, -}; - -struct msm_sensor_output_info_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; - uint32_t vt_pixel_clk; - uint32_t op_pixel_clk; - uint16_t binning_factor; -}; - -struct sensor_output_info_t { - struct msm_sensor_output_info_t *output_info; - uint16_t num_info; -}; - -struct msm_sensor_exp_gain_info_t { - uint16_t coarse_int_time_addr; - uint16_t global_gain_addr; - uint16_t vert_offset; -}; - -struct msm_sensor_output_reg_addr_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; -}; - -struct sensor_driver_params_type { - struct msm_camera_i2c_reg_setting *init_settings; - uint16_t init_settings_size; - struct msm_camera_i2c_reg_setting *mode_settings; - uint16_t mode_settings_size; - struct msm_sensor_output_reg_addr_t *sensor_output_reg_addr; - struct msm_camera_i2c_reg_setting *start_settings; - struct msm_camera_i2c_reg_setting *stop_settings; - struct msm_camera_i2c_reg_setting *groupon_settings; - struct msm_camera_i2c_reg_setting *groupoff_settings; - struct msm_sensor_exp_gain_info_t *sensor_exp_gain_info; - struct msm_sensor_output_info_t *output_info; -}; - -struct mirror_flip { - int32_t x_mirror; - int32_t y_flip; -}; - -struct cord { - uint32_t x; - uint32_t y; -}; - -struct msm_eeprom_data_t { - void *eeprom_data; - uint16_t index; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -enum msm_camera_csi_data_format { - CSI_8BIT, - CSI_10BIT, - CSI_12BIT, -}; - -struct msm_camera_csi_params { - enum msm_camera_csi_data_format data_format; - uint8_t lane_cnt; - uint8_t lane_assign; - uint8_t settle_cnt; - uint8_t dpcm_scheme; -}; - -enum csic_cfg_type_t { - CSIC_INIT, - CSIC_CFG, -}; - -struct csic_cfg_data { - enum csic_cfg_type_t cfgtype; - struct msm_camera_csi_params *csic_params; -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - struct msm_camera_csiphy_params *csiphy_params; -}; - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define ISPIF_STREAM(intf, action, vfe) (((intf)<> 24) : 0xFF) - -#define CLR_IMG_MODE(handle) (handle &= 0xFF00FFFF) -#define SET_IMG_MODE(handle, data) \ - (handle |= ((0x1 << 23) | ((data & 0x7F) << 16))) -#define GET_IMG_MODE(handle) \ - ((handle & 0x800000) ? ((handle & 0x7F0000) >> 16) : 0xFF) - -#define CLR_MCTLPP_INST_IDX(handle) (handle &= 0xFFFF00FF) -#define SET_MCTLPP_INST_IDX(handle, data) \ - (handle |= ((0x1 << 15) | ((data & 0x7F) << 8))) -#define GET_MCTLPP_INST_IDX(handle) \ - ((handle & 0x8000) ? ((handle & 0x7F00) >> 8) : 0xFF) - -#define CLR_VIDEO_INST_IDX(handle) (handle &= 0xFFFFFF00) -#define GET_VIDEO_INST_IDX(handle) \ - ((handle & 0x80) ? (handle & 0x7F) : 0xFF) -#define SET_VIDEO_INST_IDX(handle, data) \ - (handle |= (0x1 << 7) | (data & 0x7F)) - -#endif /* __UAPI_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/Makefile b/drivers/media/platform/msm/camera_v2_j5/isp/Makefile deleted file mode 100644 index 8300d3bef6a4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_isp.o msm_buf_mgr.o msm_isp_util.o msm_isp_axi_util.o msm_isp_stats_util.o -obj-$(CONFIG_MSMB_CAMERA) += msm_isp44.o msm_isp40.o msm_isp32.o diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.c deleted file mode 100644 index ad115100babb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.c +++ /dev/null @@ -1,962 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include "../include/media/msm_camera.h" -#include - -#include - -#include "msm.h" -#include "msm_buf_mgr.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_isp_bufq *msm_isp_get_bufq( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - uint32_t bufq_index = bufq_handle & 0xFF; - if (bufq_index > buf_mgr->num_buf_q) - return bufq; - - bufq = &buf_mgr->bufq[bufq_index]; - if (bufq->bufq_handle == bufq_handle) - return bufq; - - return NULL; -} - -static struct msm_isp_buffer *msm_isp_get_buf_ptr( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return buf_info; - } - - if (bufq->num_bufs <= buf_index) { - pr_err("%s: Invalid buf index\n", __func__); - return buf_info; - } - buf_info = &bufq->bufs[buf_index]; - return buf_info; -} - -static uint32_t msm_isp_get_buf_handle( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - if ((buf_mgr->buf_handle_cnt << 8) == 0) - buf_mgr->buf_handle_cnt++; - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) - return 0; - } - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].bufq_handle == 0) { - memset(&buf_mgr->bufq[i], - 0, sizeof(struct msm_isp_bufq)); - buf_mgr->bufq[i].bufq_handle = - (++buf_mgr->buf_handle_cnt) << 8 | i; - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_free_buf_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = - msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) - return -EINVAL; - memset(bufq, 0, sizeof(struct msm_isp_bufq)); - return 0; -} - -static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info, - struct v4l2_buffer *v4l2_buf) -{ - int i, rc = -1; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < v4l2_buf->length; i++) { - mapped_info = &buf_info->mapped_info[i]; - mapped_info->handle = - ion_import_dma_buf(buf_mgr->client, - v4l2_buf->m.planes[i].m.userptr); - if (IS_ERR_OR_NULL(mapped_info->handle)) { - pr_err("%s: buf has null/error ION handle %pK\n", - __func__, mapped_info->handle); - goto ion_map_error; - } - if (ion_map_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0, SZ_4K, - 0, &(mapped_info->paddr), - &(mapped_info->len), 0, 0) < 0) { - rc = -EINVAL; - pr_err("%s: cannot map address", __func__); - ion_free(buf_mgr->client, mapped_info->handle); - goto ion_map_error; - } - mapped_info->paddr += v4l2_buf->m.planes[i].data_offset; - CDBG("%s: plane: %d addr:%lu\n", - __func__, i, mapped_info->paddr); - - buf_pending = kzalloc(sizeof(struct buffer_cmd), GFP_ATOMIC); - if (!buf_pending) { - pr_err("No free memory for buf_pending\n"); - return rc; - } - - buf_pending->mapped_info = mapped_info; - list_add_tail(&buf_pending->list, &buf_mgr->buffer_q); - } - buf_info->num_planes = v4l2_buf->length; - return 0; -ion_map_error: - for (--i; i >= 0; i--) { - mapped_info = &buf_info->mapped_info[i]; - ion_unmap_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - } - return rc; -} - -static void msm_isp_unprepare_v4l2_buf( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info) -{ - int i; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < buf_info->num_planes; i++) { - mapped_info = &buf_info->mapped_info[i]; - - list_for_each_entry(buf_pending, &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - - if (buf_pending->mapped_info == mapped_info) { - ion_unmap_iommu(buf_mgr->client, - mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - - list_del_init(&buf_pending->list); - kfree(buf_pending); - break; - } - } - } - return; -} - -static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info, struct vb2_buffer *vb2_buf) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - struct v4l2_buffer *buf = NULL; - struct v4l2_plane *plane = NULL; - - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("Invalid buffer prepare\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_info->bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - rc = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - - if (buf_info->state != MSM_ISP_BUFFER_STATE_INITIALIZED) { - pr_err("%s: Invalid buffer state: %d\n", - __func__, buf_info->state); - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (vb2_buf) { - buf = &vb2_buf->v4l2_buf; - buf_info->vb2_buf = vb2_buf; - } else { - buf = &info->buffer; - plane = - kzalloc(sizeof(struct v4l2_plane) * buf->length, - GFP_KERNEL); - if (!plane) { - pr_err("%s: Cannot alloc plane: %d\n", - __func__, buf_info->state); - return rc; - } - if (copy_from_user(plane, - (void __user *)(buf->m.planes), - sizeof(struct v4l2_plane) * buf->length)) { - kfree(plane); - return rc; - } - buf->m.planes = plane; - } - - rc = msm_isp_prepare_v4l2_buf(buf_mgr, buf_info, buf); - if (rc < 0) { - pr_err("%s: Prepare buffer error\n", __func__); - kfree(plane); - return rc; - } - spin_lock_irqsave(&bufq->bufq_lock, flags); - buf_info->state = MSM_ISP_BUFFER_STATE_PREPARED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - kfree(plane); - return rc; -} - -static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, - uint32_t buf_handle) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - bufq = msm_isp_get_bufq(buf_mgr, buf_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, buf_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (buf_info->state == MSM_ISP_BUFFER_STATE_UNUSED || - buf_info->state == - MSM_ISP_BUFFER_STATE_INITIALIZED) - continue; - - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } - msm_isp_unprepare_v4l2_buf(buf_mgr, buf_info); - } - return 0; -} - -static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_buffer *temp_buf_info; - struct msm_isp_bufq *bufq = NULL; - struct vb2_buffer *vb2_buf = NULL; - struct buffer_cmd *buf_pending = NULL; - struct msm_isp_buffer_mapped_info *mped_info_tmp1; - struct msm_isp_buffer_mapped_info *mped_info_tmp2; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (!bufq->bufq_handle) { - pr_err("%s: Invalid bufq handle\n", __func__); - return rc; - } - - *buf_info = NULL; - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - list_for_each_entry(temp_buf_info, - &bufq->share_head, share_list) { - if (!temp_buf_info->buf_used[id]) { - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count++; - if (temp_buf_info->buf_get_count == - bufq->buf_client_count) - list_del_init( - &temp_buf_info->share_list); - if (temp_buf_info->buf_reuse_flag) { - kfree(temp_buf_info); - } else { - *buf_info = temp_buf_info; - rc = 0; - } - spin_unlock_irqrestore( - &bufq->bufq_lock, flags); - return rc; - } - } - } - - switch (BUF_SRC(bufq->stream_id)) { - case MSM_ISP_BUFFER_SRC_NATIVE: - list_for_each_entry(temp_buf_info, &bufq->head, list) { - if (temp_buf_info->state == - MSM_ISP_BUFFER_STATE_QUEUED) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &temp_buf_info->mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - /* found one buf */ - list_del_init( - &temp_buf_info->list); - *buf_info = temp_buf_info; - break; - } - } - break; - } - } - break; - case MSM_ISP_BUFFER_SRC_HAL: - vb2_buf = buf_mgr->vb2_ops->get_buf( - bufq->session_id, bufq->stream_id); - if (vb2_buf) { - if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &bufq->bufs[vb2_buf->v4l2_buf.index] - .mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - *buf_info = - &bufq->bufs[vb2_buf->v4l2_buf.index]; - (*buf_info)->vb2_buf = vb2_buf; - break; - } - } - } else { - pr_err("%s: Incorrect buf index %d\n", - __func__, vb2_buf->v4l2_buf.index); - rc = -EINVAL; - } - } - break; - case MSM_ISP_BUFFER_SRC_SCRATCH: - /* In scratch buf case we have only on buffer in queue. - * We return every time same buffer. */ - *buf_info = list_entry(bufq->head.next, typeof(**buf_info), - list); - break; - default: - pr_err("%s: Incorrect buf source.\n", __func__); - rc = -EINVAL; - return rc; - } - - if (!(*buf_info)) { - if (bufq->buf_type == ISP_SHARE_BUF) { - temp_buf_info = kzalloc( - sizeof(struct msm_isp_buffer), GFP_ATOMIC); - if (temp_buf_info) { - temp_buf_info->buf_reuse_flag = 1; - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count = 1; - list_add_tail(&temp_buf_info->share_list, - &bufq->share_head); - } else - rc = -ENOMEM; - } - } else { - (*buf_info)->state = MSM_ISP_BUFFER_STATE_DEQUEUED; - if (bufq->buf_type == ISP_SHARE_BUF) { - memset((*buf_info)->buf_used, 0, - sizeof(uint8_t) * bufq->buf_client_count); - (*buf_info)->buf_used[id] = 1; - (*buf_info)->buf_get_count = 1; - (*buf_info)->buf_put_count = 0; - (*buf_info)->buf_reuse_flag = 0; - list_add_tail(&(*buf_info)->share_list, - &bufq->share_head); - } - rc = 0; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; -} - -static int msm_isp_put_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - switch (buf_info->state) { - case MSM_ISP_BUFFER_STATE_PREPARED: - if (MSM_ISP_BUFFER_SRC_SCRATCH == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - case MSM_ISP_BUFFER_STATE_DEQUEUED: - case MSM_ISP_BUFFER_STATE_DIVERTED: - if (MSM_ISP_BUFFER_SRC_NATIVE == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - else if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_DISPATCHED: - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_QUEUED: - rc = 0; - break; - default: - pr_err("%s: incorrect state = %d", - __func__, buf_info->state); - break; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return rc; -} - -static int msm_isp_buf_done(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - enum msm_isp_buffer_state state; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - state = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (state == MSM_ISP_BUFFER_STATE_DEQUEUED || - state == MSM_ISP_BUFFER_STATE_DIVERTED) { - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - buf_info->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - buf_info->vb2_buf->v4l2_buf.timestamp = *tv; - buf_info->vb2_buf->v4l2_buf.sequence = frame_id; - buf_info->vb2_buf->v4l2_buf.reserved = output_format; - buf_mgr->vb2_ops->buf_done(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } else { - rc = msm_isp_put_buf(buf_mgr, buf_info->bufq_handle, - buf_info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - - return 0; -} - -static int msm_isp_flush_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type) -{ - int rc = -1, i; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - continue; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (flush_type == MSM_ISP_BUFFER_FLUSH_DIVERTED && - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } else if (flush_type == MSM_ISP_BUFFER_FLUSH_ALL && - (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED || - buf_info->state == MSM_ISP_BUFFER_STATE_DISPATCHED)) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - } - return 0; -} - -static int msm_isp_buf_divert(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED) { - buf_info->state = MSM_ISP_BUFFER_STATE_DIVERTED; - buf_info->tv = tv; - buf_info->frame_id = frame_id; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return 0; -} - -static int msm_isp_buf_enqueue(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info) -{ - int rc = -1, buf_state; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - buf_state = msm_isp_buf_prepare(buf_mgr, info, NULL); - if (buf_state < 0) { - pr_err("%s: Buf prepare failed\n", __func__); - return -EINVAL; - } - - if (buf_state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (info->dirty_buf) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (BUF_SRC(bufq->stream_id)) - pr_err("%s: Invalid native buffer state\n", - __func__); - else - rc = msm_isp_buf_done(buf_mgr, - info->handle, info->buf_idx, - buf_info->tv, buf_info->frame_id, 0); - } - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (MSM_ISP_BUFFER_SRC_HAL != BUF_SRC(bufq->stream_id)) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - return rc; -} - -static int msm_isp_get_bufq_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) { - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_get_buf_src(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src) -{ - struct msm_isp_bufq *bufq = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return -EINVAL; - } - *buf_src = BUF_SRC(bufq->stream_id); - - return 0; -} - -static int msm_isp_request_bufq(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - CDBG("%s: E\n", __func__); - - if (!buf_request->num_buf || buf_request->num_buf > VIDEO_MAX_FRAME) { - pr_err("Invalid buffer request\n"); - return rc; - } - - buf_request->handle = msm_isp_get_buf_handle(buf_mgr, - buf_request->session_id, buf_request->stream_id); - if (!buf_request->handle) { - pr_err("Invalid buffer handle\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_request->handle); - if (!bufq) { - pr_err("Invalid buffer queue\n"); - return rc; - } - - bufq->bufs = kzalloc(sizeof(struct msm_isp_buffer) * - buf_request->num_buf, GFP_KERNEL); - if (!bufq->bufs) { - pr_err("No free memory for buf info\n"); - msm_isp_free_buf_handle(buf_mgr, buf_request->handle); - return rc; - } - - spin_lock_init(&bufq->bufq_lock); - bufq->bufq_handle = buf_request->handle; - bufq->session_id = buf_request->session_id; - bufq->stream_id = buf_request->stream_id; - bufq->num_bufs = buf_request->num_buf; - bufq->buf_type = buf_request->buf_type; - if (bufq->buf_type == ISP_SHARE_BUF) - bufq->buf_client_count = ISP_SHARE_BUF_CLIENT; - INIT_LIST_HEAD(&bufq->head); - INIT_LIST_HEAD(&bufq->share_head); - for (i = 0; i < buf_request->num_buf; i++) { - bufq->bufs[i].state = MSM_ISP_BUFFER_STATE_INITIALIZED; - bufq->bufs[i].bufq_handle = bufq->bufq_handle; - bufq->bufs[i].buf_idx = i; - } - - return 0; -} - -static int msm_isp_release_bufq(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - int rc = -1; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq release\n"); - return rc; - } - - msm_isp_buf_unprepare(buf_mgr, bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq_handle); - return 0; -} - -static void msm_isp_release_all_bufq( - struct msm_isp_buf_mgr *buf_mgr) -{ - struct msm_isp_bufq *bufq = NULL; - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - bufq = &buf_mgr->bufq[i]; - if (!bufq->bufq_handle) - continue; - msm_isp_buf_unprepare(buf_mgr, bufq->bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq->bufq_handle); - } -} - -static void msm_isp_register_ctx(struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx) -{ - int i; - buf_mgr->num_iommu_ctx = num_iommu_ctx; - for (i = 0; i < num_iommu_ctx; i++) - buf_mgr->iommu_ctx[i] = iommu_ctx[i]; -} - -static int msm_isp_attach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int rc, i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { - rc = iommu_attach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); - if (rc) { - pr_err("%s: Iommu attach error\n", __func__); - return -EINVAL; - } - } - return 0; -} - -static void msm_isp_detach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) - iommu_detach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); -} - -static int msm_isp_init_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q) -{ - int rc = -1; - if (buf_mgr->open_count++) - return 0; - - if (!num_buf_q) { - pr_err("Invalid buffer queue number\n"); - return rc; - } - CDBG("%s: E\n", __func__); - - msm_isp_attach_ctx(buf_mgr); - INIT_LIST_HEAD(&buf_mgr->buffer_q); - buf_mgr->num_buf_q = num_buf_q; - buf_mgr->bufq = - kzalloc(sizeof(struct msm_isp_bufq) * num_buf_q, - GFP_KERNEL); - if (!buf_mgr->bufq) { - pr_err("Bufq malloc error\n"); - goto bufq_error; - } - buf_mgr->client = msm_ion_client_create(ctx_name); - buf_mgr->buf_handle_cnt = 0; - return 0; -bufq_error: - return rc; -} - -static int msm_isp_deinit_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr) -{ - if (--buf_mgr->open_count) - return 0; - msm_isp_release_all_bufq(buf_mgr); - ion_client_destroy(buf_mgr->client); - kfree(buf_mgr->bufq); - buf_mgr->num_buf_q = 0; - msm_isp_detach_ctx(buf_mgr); - return 0; -} - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg) -{ - switch (cmd) { - case VIDIOC_MSM_ISP_REQUEST_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->request_buf(buf_mgr, buf_req); - break; - } - case VIDIOC_MSM_ISP_ENQUEUE_BUF: { - struct msm_isp_qbuf_info *qbuf_info = arg; - buf_mgr->ops->enqueue_buf(buf_mgr, qbuf_info); - break; - } - case VIDIOC_MSM_ISP_RELEASE_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->release_buf(buf_mgr, buf_req->handle); - break; - } - } - return 0; -} - -static struct msm_isp_buf_ops isp_buf_ops = { - .request_buf = msm_isp_request_bufq, - .enqueue_buf = msm_isp_buf_enqueue, - .release_buf = msm_isp_release_bufq, - .get_bufq_handle = msm_isp_get_bufq_handle, - .get_buf_src = msm_isp_get_buf_src, - .get_buf = msm_isp_get_buf, - .put_buf = msm_isp_put_buf, - .flush_buf = msm_isp_flush_buf, - .buf_done = msm_isp_buf_done, - .buf_divert = msm_isp_buf_divert, - .register_ctx = msm_isp_register_ctx, - .buf_mgr_init = msm_isp_init_isp_buf_mgr, - .buf_mgr_deinit = msm_isp_deinit_isp_buf_mgr, -}; - -int msm_isp_create_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, - struct msm_iova_layout *iova_layout) -{ - int rc = 0; - if (buf_mgr->init_done) - return rc; - - buf_mgr->iommu_domain_num = msm_register_domain(iova_layout); - if (buf_mgr->iommu_domain_num < 0) { - pr_err("%s: Invalid iommu domain number\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->iommu_domain = msm_get_iommu_domain( - buf_mgr->iommu_domain_num); - if (!buf_mgr->iommu_domain) { - pr_err("%s: Invalid iommu domain\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->ops = &isp_buf_ops; - buf_mgr->vb2_ops = vb2_ops; - buf_mgr->init_done = 1; - buf_mgr->open_count = 0; - return 0; -iommu_domain_error: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.h deleted file mode 100644 index b98067e44151..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_buf_mgr.h +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_ISP_BUF_H_ -#define _MSM_ISP_BUF_H_ - -#include "../include/media/msmb_isp.h" -#include -#include "msm_sd.h" - -/* Buffer type could be userspace / HAL. - * Userspase could provide native or scratch buffer. */ -#define BUF_SRC(id) ( \ - (id & ISP_SCRATCH_BUF_BIT) ? MSM_ISP_BUFFER_SRC_SCRATCH : \ - (id & ISP_NATIVE_BUF_BIT) ? MSM_ISP_BUFFER_SRC_NATIVE : \ - MSM_ISP_BUFFER_SRC_HAL) - -#define ISP_SHARE_BUF_CLIENT 2 - -struct msm_isp_buf_mgr; - -enum msm_isp_buffer_src_t { - MSM_ISP_BUFFER_SRC_HAL, - MSM_ISP_BUFFER_SRC_NATIVE, - MSM_ISP_BUFFER_SRC_SCRATCH, - MSM_ISP_BUFFER_SRC_MAX, -}; - -enum msm_isp_buffer_state { - MSM_ISP_BUFFER_STATE_UNUSED, /* not used */ - MSM_ISP_BUFFER_STATE_INITIALIZED, /* REQBUF done */ - MSM_ISP_BUFFER_STATE_PREPARED, /* BUF mapped */ - MSM_ISP_BUFFER_STATE_QUEUED, /* buf queued */ - MSM_ISP_BUFFER_STATE_DEQUEUED, /* in use in VFE */ - MSM_ISP_BUFFER_STATE_DIVERTED, /* Sent to other hardware*/ - MSM_ISP_BUFFER_STATE_DISPATCHED, /* Sent to HAL*/ -}; - -enum msm_isp_buffer_flush_t { - MSM_ISP_BUFFER_FLUSH_DIVERTED, - MSM_ISP_BUFFER_FLUSH_ALL, -}; - -struct msm_isp_buffer_mapped_info { - unsigned long len; - dma_addr_t paddr; - struct ion_handle *handle; -}; - -struct buffer_cmd { - struct list_head list; - struct msm_isp_buffer_mapped_info *mapped_info; -}; - -struct msm_isp_buffer { - /*Common Data structure*/ - int num_planes; - struct msm_isp_buffer_mapped_info mapped_info[VIDEO_MAX_PLANES]; - int buf_idx; - uint32_t bufq_handle; - uint32_t frame_id; - struct timeval *tv; - - /*Native buffer*/ - struct list_head list; - enum msm_isp_buffer_state state; - - /*Vb2 buffer data*/ - struct vb2_buffer *vb2_buf; - - /*Share buffer cache state*/ - struct list_head share_list; - uint8_t buf_used[ISP_SHARE_BUF_CLIENT]; - uint8_t buf_get_count; - uint8_t buf_put_count; - uint8_t buf_reuse_flag; -}; - -struct msm_isp_bufq { - uint32_t session_id; - uint32_t stream_id; - uint32_t num_bufs; - uint32_t bufq_handle; - enum msm_isp_buf_type buf_type; - struct msm_isp_buffer *bufs; - spinlock_t bufq_lock; - - /*Native buffer queue*/ - struct list_head head; - /*Share buffer cache queue*/ - struct list_head share_head; - uint8_t buf_client_count; -}; - -struct msm_isp_buf_ops { - int (*request_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request); - - int (*enqueue_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info); - - int (*release_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle); - - int (*get_bufq_handle) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id); - - int (*get_buf_src) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src); - - int (*get_buf) (struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info); - - int (*put_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index); - - int (*flush_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type); - - int (*buf_done) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format); - int (*buf_divert) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id); - void (*register_ctx) (struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx); - int (*buf_mgr_init) (struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q); - int (*buf_mgr_deinit) (struct msm_isp_buf_mgr *buf_mgr); -}; - -struct msm_isp_buf_mgr { - int init_done; - uint32_t open_count; - spinlock_t lock; - uint16_t num_buf_q; - struct msm_isp_bufq *bufq; - - struct ion_client *client; - struct msm_isp_buf_ops *ops; - uint32_t buf_handle_cnt; - - struct msm_sd_req_vb2_q *vb2_ops; - - /*IOMMU specific*/ - int iommu_domain_num; - struct iommu_domain *iommu_domain; - - int num_iommu_ctx; - struct device *iommu_ctx[2]; - struct list_head buffer_q; -}; - -int msm_isp_create_isp_buf_mgr(struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, struct msm_iova_layout *iova_layout); - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg); - -#endif /* _MSM_ISP_BUF_H_ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.c deleted file mode 100644 index f2586f872f80..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.c +++ /dev/null @@ -1,317 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_isp.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_sd.h" -#include "msm_isp44.h" -#include "msm_isp40.h" -#include "msm_isp32.h" - -static struct msm_sd_req_vb2_q vfe_vb2_ops; - -static const struct of_device_id msm_vfe_dt_match[] = { - { - .compatible = "qcom,vfe44", - .data = &vfe44_hw_info, - }, - { - .compatible = "qcom,vfe40", - .data = &vfe40_hw_info, - }, - { - .compatible = "qcom,vfe32", - .data = &vfe32_hw_info, - }, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_vfe_dt_match); - -static const struct platform_device_id msm_vfe_dev_id[] = { - {"msm_vfe32", (kernel_ulong_t) &vfe32_hw_info}, - {} -}; - -#define MAX_OVERFLOW_COUNTERS 15 -#define OVERFLOW_LENGTH 512 -#define OVERFLOW_BUFFER_LENGTH 32 -static struct msm_isp_buf_mgr vfe_buf_mgr; -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats); -static char *stats_str[MAX_OVERFLOW_COUNTERS] = { - "imgmaster0_overflow_cnt", - "imgmaster1_overflow_cnt", - "imgmaster2_overflow_cnt", - "imgmaster3_overflow_cnt", - "imgmaster4_overflow_cnt", - "imgmaster5_overflow_cnt", - "imgmaster6_overflow_cnt", - "be_overflow_cnt", - "bg_overflow_cnt", - "bf_overflow_cnt", - "awb_overflow_cnt", - "rs_overflow_cnt", - "cs_overflow_cnt", - "ihist_overflow_cnt", - "skinbhist_overflow_cnt", -}; - -static int vfe_debugfs_statistics_open(struct inode *inode, struct file *file) -{ - file->private_data = inode->i_private; - return 0; -} - -static ssize_t vfe_debugfs_statistics_read(struct file *t_file, char *t_char, - size_t t_size_t, loff_t *t_loff_t) -{ - int i; - char name[OVERFLOW_LENGTH] = {0}; - int *ptr; - char buffer[OVERFLOW_BUFFER_LENGTH] = {0}; - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - ptr = (int *)stats; - - for (i = 0; i < MAX_OVERFLOW_COUNTERS; i++) { - strlcat(name, stats_str[i], sizeof(name)); - strlcat(name, " ", sizeof(name)); - snprintf(buffer, sizeof(buffer), "%d", ptr[i]); - strlcat(name, buffer, sizeof(name)); - strlcat(name, "\r\n", sizeof(name)); - } - return simple_read_from_buffer(t_char, t_size_t, - t_loff_t, name, strlen(name)); -} - -static ssize_t vfe_debugfs_statistics_write(struct file *t_file, - const char *t_char, size_t t_size_t, loff_t *t_loff_t) -{ - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - memset(stats, 0, sizeof(struct msm_isp_statistics)); - - return sizeof(struct msm_isp_statistics); -} - -static const struct file_operations vfe_debugfs_error = { - .open = vfe_debugfs_statistics_open, - .read = vfe_debugfs_statistics_read, - .write = vfe_debugfs_statistics_write, -}; - -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_isp", NULL); - if (!debugfs_base) - return -ENOMEM; - if (!debugfs_create_file("stats", S_IRUGO | S_IWUSR, debugfs_base, - stats, &vfe_debugfs_error)) - return -ENOMEM; - return 0; -} -static long msm_isp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } -} - -static long msm_isp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_isp_subdev_do_ioctl); -} - -static struct v4l2_file_operations msm_isp_v4l2_subdev_fops = { -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_isp_subdev_fops_ioctl, -#endif - .unlocked_ioctl = msm_isp_subdev_fops_ioctl -}; - -static int vfe_probe(struct platform_device *pdev) -{ - struct vfe_device *vfe_dev; - /*struct msm_cam_subdev_info sd_info;*/ - const struct of_device_id *match_dev; - int rc = 0; - - struct msm_iova_partition vfe_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vfe_layout = { - .partitions = &vfe_partition, - .npartitions = 1, - .client_name = "vfe", - .domain_flags = 0, - }; - - vfe_dev = kzalloc(sizeof(struct vfe_device), GFP_KERNEL); - if (!vfe_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - vfe_dev->stats = kzalloc(sizeof(struct msm_isp_statistics), GFP_KERNEL); - if (!vfe_dev->stats) { - pr_err("%s: no enough memory\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - match_dev = of_match_device(msm_vfe_dt_match, &pdev->dev); - if (!match_dev) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - vfe_dev->hw_info = - (struct msm_vfe_hardware_info *) match_dev->data; - } else { - vfe_dev->hw_info = (struct msm_vfe_hardware_info *) - platform_get_device_id(pdev)->driver_data; - } - - if (!vfe_dev->hw_info) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - ISP_DBG("%s: device id = %d\n", __func__, pdev->id); - - vfe_dev->pdev = pdev; - rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); - if (rc < 0) { - pr_err("%s: failed to get platform resources\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - - INIT_LIST_HEAD(&vfe_dev->tasklet_q); - tasklet_init(&vfe_dev->vfe_tasklet, - msm_isp_do_tasklet, (unsigned long)vfe_dev); - - v4l2_subdev_init(&vfe_dev->subdev.sd, vfe_dev->hw_info->subdev_ops); - vfe_dev->subdev.sd.internal_ops = - vfe_dev->hw_info->subdev_internal_ops; - snprintf(vfe_dev->subdev.sd.name, - ARRAY_SIZE(vfe_dev->subdev.sd.name), - "vfe"); - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vfe_dev->subdev.sd, vfe_dev); - platform_set_drvdata(pdev, &vfe_dev->subdev.sd); - mutex_init(&vfe_dev->realtime_mutex); - mutex_init(&vfe_dev->core_mutex); - spin_lock_init(&vfe_dev->tasklet_lock); - spin_lock_init(&vfe_dev->shared_data_lock); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spin_lock_init(&vfe_dev->sof_lock); -#endif - media_entity_init(&vfe_dev->subdev.sd.entity, 0, NULL, 0); - vfe_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vfe_dev->subdev.sd.entity.group_id = MSM_CAMERA_SUBDEV_VFE; - vfe_dev->subdev.sd.entity.name = pdev->name; - vfe_dev->subdev.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x2; - rc = msm_sd_register(&vfe_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - kfree(vfe_dev); - goto end; - } - - msm_isp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_isp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_isp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_isp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vfe_dev->subdev.sd.devnode->fops = &msm_isp_v4l2_subdev_fops; - - vfe_dev->buf_mgr = &vfe_buf_mgr; - v4l2_subdev_notify(&vfe_dev->subdev.sd, - MSM_SD_NOTIFY_REQ_CB, &vfe_vb2_ops); - rc = msm_isp_create_isp_buf_mgr(vfe_dev->buf_mgr, - &vfe_vb2_ops, &vfe_layout); - if (rc < 0) { - pr_err("%s: Unable to create buffer manager\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - msm_isp_enable_debugfs(vfe_dev->stats); - vfe_dev->buf_mgr->ops->register_ctx(vfe_dev->buf_mgr, - &vfe_dev->iommu_ctx[0], vfe_dev->hw_info->num_iommu_ctx); - vfe_dev->vfe_open_cnt = 0; -end: - return rc; -} - -static struct platform_driver vfe_driver = { - .probe = vfe_probe, - .driver = { - .name = "msm_vfe", - .owner = THIS_MODULE, - .of_match_table = msm_vfe_dt_match, - }, - .id_table = msm_vfe_dev_id, -}; - -static int __init msm_vfe_init_module(void) -{ - return platform_driver_register(&vfe_driver); -} - -static void __exit msm_vfe_exit_module(void) -{ - platform_driver_unregister(&vfe_driver); -} - -module_init(msm_vfe_init_module); -module_exit(msm_vfe_exit_module); -MODULE_DESCRIPTION("MSM VFE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.h deleted file mode 100644 index cb16d8d93c22..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp.h +++ /dev/null @@ -1,541 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VFE_H__ -#define __MSM_VFE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_isp.h" -#include -#include -#include "msm_buf_mgr.h" - -#define VFE40_8974V1_VERSION 0x10000018 -#define VFE40_8974V2_VERSION 0x1001001A -#define VFE40_8974V3_VERSION 0x1001001B -#define VFE40_8x26_VERSION 0x20000013 -#define VFE40_8x26V2_VERSION 0x20010014 -#define VFE40_8916_VERSION 0x10030000 -#define VFE40_8939_VERSION 0x10040000 - -#define MAX_IOMMU_CTX 2 -#define MAX_NUM_WM 7 -#define MAX_NUM_RDI 3 -#define MAX_NUM_RDI_MASTER 3 -#define MAX_NUM_COMPOSITE_MASK 4 -#define MAX_NUM_STATS_COMP_MASK 2 -#define MAX_INIT_FRAME_DROP 31 -#define ISP_Q2 (1 << 2) - -#define AVTIMER_MSW_PHY_ADDR 0xFE05300C -#define AVTIMER_LSW_PHY_ADDR 0xFE053008 -#define AVTIMER_MSW_PHY_ADDR_8916 0x7706010 -#define AVTIMER_LSW_PHY_ADDR_8916 0x770600C -#define AVTIMER_MODE_CTL_PHY_ADDR_8916 0x7706040 -/*AVTimer h/w is configured to generate 27Mhz ticks*/ -#define AVTIMER_TICK_SCALER_8916 27 -#define AVTIMER_ITERATION_CTR 16 - -#define VFE_PING_FLAG 0xFFFFFFFF -#define VFE_PONG_FLAG 0x0 - -#define VFE_MAX_CFG_TIMEOUT 3000 -#define VFE_CLK_INFO_MAX 16 -#define STATS_COMP_BIT_MASK 0xFF0000 - -struct vfe_device; -struct msm_vfe_axi_stream; -struct msm_vfe_stats_stream; - -struct vfe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum msm_isp_pack_fmt { - QCOM, - MIPI, - DPCM6, - DPCM8, - PLAIN8, - PLAIN16, - MAX_ISP_PACK_FMT, -}; - -enum msm_isp_camif_update_state { - NO_UPDATE, - ENABLE_CAMIF, - DISABLE_CAMIF, - DISABLE_CAMIF_IMMEDIATELY -}; - -enum msm_isp_reset_type { - ISP_RST_HARD, - ISP_RST_SOFT, - ISP_RST_MAX -}; - -struct msm_isp_timestamp { - /*Monotonic clock for v4l2 buffer*/ - struct timeval buf_time; - /*Monotonic clock for VT */ - struct timeval vt_time; - /*Wall clock for userspace event*/ - struct timeval event_time; -}; - -struct msm_vfe_irq_ops { - void (*read_irq_status) (struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1); - void (*process_reg_update) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_epoch_irq)(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_reset_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_halt_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_camif_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_axi_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_stats_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -}; - -struct msm_vfe_axi_ops { - void (*reload_wm) (struct vfe_device *vfe_dev, - uint32_t reload_mask); - void (*enable_wm) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable); - int32_t (*cfg_io_format) (struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, - uint32_t io_format); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); - long (*halt) (struct vfe_device *vfe_dev, uint32_t blocking); -}; - -struct msm_vfe_core_ops { - void (*reg_update) (struct vfe_device *vfe_dev, uint32_t input_src); - long (*reset_hw) (struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, - uint32_t blocking); - int (*init_hw) (struct vfe_device *vfe_dev); - void (*init_hw_reg) (struct vfe_device *vfe_dev); - void (*release_hw) (struct vfe_device *vfe_dev); - void (*cfg_camif) (struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg); - void (*update_camif_state) (struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state); - void (*cfg_rdi_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src); - int (*get_platform_data) (struct vfe_device *vfe_dev); - void (*get_error_mask) (uint32_t *error_mask0, uint32_t *error_mask1); - void (*process_error_status) (struct vfe_device *vfe_dev); - void (*get_overflow_mask) (uint32_t *overflow_mask); - void (*get_irq_mask) (struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask); - void (*restore_irq_mask) (struct vfe_device *vfe_dev); - void (*get_halt_restart_mask) (uint32_t *irq0_mask, - uint32_t *irq1_mask); - void (*init_vbif_counters) (struct vfe_device *vfe_dev); - void (*vbif_clear_counters) (struct vfe_device *vfe_dev); - void (*vbif_read_counters) (struct vfe_device *vfe_dev); -}; -struct msm_vfe_stats_ops { - int (*get_stats_idx) (enum msm_isp_stats_type stats_type); - int (*check_streams) (struct msm_vfe_stats_stream *stream_info); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*enable_module) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_frame_id) (struct vfe_device *vfe_dev); - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); -}; - -struct msm_vfe_ops { - struct msm_vfe_irq_ops irq_ops; - struct msm_vfe_axi_ops axi_ops; - struct msm_vfe_core_ops core_ops; - struct msm_vfe_stats_ops stats_ops; -}; - -struct msm_vfe_hardware_info { - int num_iommu_ctx; - int vfe_clk_idx; - struct msm_vfe_ops vfe_ops; - struct msm_vfe_axi_hardware_info *axi_hw_info; - struct msm_vfe_stats_hardware_info *stats_hw_info; - struct v4l2_subdev_internal_ops *subdev_internal_ops; - struct v4l2_subdev_ops *subdev_ops; - uint32_t dmi_reg_offset; -}; - -struct msm_vfe_axi_hardware_info { - uint8_t num_wm; - uint8_t num_rdi; - uint8_t num_rdi_master; - uint8_t num_comp_mask; - uint32_t min_wm_ub; -}; - -enum msm_vfe_axi_state { - AVALIABLE, - INACTIVE, - ACTIVE, - PAUSED, - START_PENDING, - STOP_PENDING, - PAUSE_PENDING, - RESUME_PENDING, - STARTING, - STOPPING, - PAUSING, - RESUMING, -}; - -enum msm_vfe_axi_cfg_update_state { - NO_AXI_CFG_UPDATE, - APPLYING_UPDATE_RESUME, - UPDATE_REQUESTED, -}; - -#define VFE_NO_DROP 0xFFFFFFFF -#define VFE_DROP_EVERY_2FRAME 0x55555555 -#define VFE_DROP_EVERY_4FRAME 0x11111111 -#define VFE_DROP_EVERY_8FRAME 0x01010101 -#define VFE_DROP_EVERY_16FRAME 0x00010001 -#define VFE_DROP_EVERY_32FRAME 0x00000001 - -enum msm_vfe_axi_stream_type { - CONTINUOUS_STREAM, - BURST_STREAM, -}; - -struct msm_vfe_axi_stream { - uint32_t frame_id; - enum msm_vfe_axi_state state; - enum msm_vfe_axi_stream_src stream_src; - uint8_t num_planes; - uint8_t wm[MAX_PLANES_PER_STREAM]; - uint32_t output_format;/*Planar/RAW/Misc*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - uint8_t comp_mask_index; - struct msm_isp_buffer *buf[2]; - uint32_t session_id; - uint32_t stream_id; - uint32_t bufq_handle; - uint32_t bufq_scratch_handle; - uint32_t stream_handle; - uint32_t request_frm_num; - uint8_t buf_divert; - enum msm_vfe_axi_stream_type stream_type; - uint32_t vt_enable; - uint32_t frame_based; - uint32_t framedrop_period; - uint32_t framedrop_pattern; - uint32_t num_burst_capture;/*number of frame to capture*/ - uint32_t init_frame_drop; - uint32_t burst_frame_count;/*number of sof before burst stop*/ - uint8_t framedrop_update; - spinlock_t lock; - - /*Bandwidth calculation info*/ - uint32_t max_width; - /*Based on format plane size in Q2. e.g NV12 = 1.5*/ - uint32_t format_factor; - uint32_t bandwidth; - - /*Run time update variables*/ - uint32_t runtime_init_frame_drop; - uint32_t runtime_burst_frame_count;/*number of sof before burst stop*/ - uint32_t runtime_num_burst_capture; - uint8_t runtime_framedrop_update; - uint32_t runtime_output_format; - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - -}; - -enum msm_vfe_overflow_state { - NO_OVERFLOW, - OVERFLOW_DETECTED, - HALT_REQUESTED, - RESTART_REQUESTED, -}; - -struct msm_vfe_axi_composite_info { - uint32_t stream_handle; - uint32_t stream_composite_mask; -}; - -struct msm_vfe_src_info { - uint32_t frame_id; - uint8_t active; - uint8_t pix_stream_count; - uint8_t raw_stream_count; - enum msm_vfe_inputmux input_mux; - uint32_t width; - long pixel_clock; - uint32_t session_id; - uint32_t input_format;/*V4L2 pix format with bayer pattern*/ - uint32_t last_updt_frm_id; -}; - -enum msm_wm_ub_cfg_type { - MSM_WM_UB_CFG_DEFAULT, - MSM_WM_UB_EQUAL_SLICING, - MSM_WM_UB_CFG_MAX_NUM -}; -#define MAX_SESSIONS 5 -struct msm_vfe_axi_shared_data { - struct msm_vfe_axi_hardware_info *hw_info; - struct msm_vfe_axi_stream stream_info[MAX_NUM_STREAM]; - uint32_t free_wm[MAX_NUM_WM]; - uint32_t wm_image_size[MAX_NUM_WM]; - enum msm_wm_ub_cfg_type wm_ub_cfg_policy; - uint8_t num_used_wm; - uint8_t num_active_stream; - struct msm_vfe_axi_composite_info - composite_info[MAX_NUM_COMPOSITE_MASK]; - uint8_t num_used_composite_mask; - uint32_t stream_update; - atomic_t axi_cfg_update; - enum msm_isp_camif_update_state pipeline_update; - struct msm_vfe_src_info src_info[VFE_SRC_MAX]; - uint16_t stream_handle_cnt; - uint16_t current_frame_src_mask[MAX_SESSIONS]; - uint16_t session_frame_src_mask[MAX_SESSIONS]; - unsigned int frame_id[MAX_SESSIONS]; - uint32_t event_mask; - uint32_t burst_len; -}; - -struct msm_vfe_stats_hardware_info { - uint32_t stats_capability_mask; - uint8_t *stats_ping_pong_offset; - uint8_t num_stats_type; - uint8_t num_stats_comp_mask; -}; - -enum msm_vfe_stats_state { - STATS_AVALIABLE, - STATS_INACTIVE, - STATS_ACTIVE, - STATS_START_PENDING, - STATS_STOP_PENDING, - STATS_STARTING, - STATS_STOPPING, -}; - -struct msm_vfe_stats_stream { - uint32_t session_id; - uint32_t stream_id; - uint32_t stream_handle; - uint32_t composite_flag; - enum msm_isp_stats_type stats_type; - enum msm_vfe_stats_state state; - uint32_t framedrop_pattern; - uint32_t framedrop_period; - uint32_t irq_subsample_pattern; - - uint32_t buffer_offset; - struct msm_isp_buffer *buf[2]; - uint32_t bufq_handle; -}; - -struct msm_vfe_stats_shared_data { - struct msm_vfe_stats_stream stream_info[MSM_ISP_STATS_MAX]; - uint8_t num_active_stream; - atomic_t stats_comp_mask[MAX_NUM_STATS_COMP_MASK]; - uint16_t stream_handle_cnt; - atomic_t stats_update; - uint32_t stats_mask; - uint32_t stats_burst_len; -}; - -struct msm_vfe_tasklet_queue_cmd { - struct list_head list; - uint32_t vfeInterruptStatus0; - uint32_t vfeInterruptStatus1; - struct msm_isp_timestamp ts; - uint8_t cmd_used; -}; - -#define MSM_VFE_TASKLETQ_SIZE 200 - -struct msm_vfe_error_info { - atomic_t overflow_state; - uint32_t overflow_recover_irq_mask0; - uint32_t overflow_recover_irq_mask1; - uint32_t error_mask0; - uint32_t error_mask1; - uint32_t violation_status; - uint32_t camif_status; - uint32_t stream_framedrop_count[MAX_NUM_STREAM]; - uint32_t stats_framedrop_count[MSM_ISP_STATS_MAX]; - uint32_t info_dump_frame_count; - uint32_t error_count; -}; - -struct msm_isp_statistics { - int32_t imagemaster0_overflow; - int32_t imagemaster1_overflow; - int32_t imagemaster2_overflow; - int32_t imagemaster3_overflow; - int32_t imagemaster4_overflow; - int32_t imagemaster5_overflow; - int32_t imagemaster6_overflow; - int32_t be_overflow; - int32_t bg_overflow; - int32_t bf_overflow; - int32_t awb_overflow; - int32_t rs_overflow; - int32_t cs_overflow; - int32_t ihist_overflow; - int32_t skinbhist_overflow; -}; - -struct msm_vbif_cntrs { - int previous_write_val; - int vfe_total_iter; - int fb_err_lvl; - int total_vbif_cnt_2; -}; - -struct vfe_device { - struct platform_device *pdev; - struct msm_sd_subdev subdev; - struct resource *vfe_irq; - struct resource *vfe_mem; - struct resource *vfe_vbif_mem; - struct resource *vfe_io; - struct resource *vfe_vbif_io; - void __iomem *vfe_base; - void __iomem *vfe_vbif_base; - - struct device *iommu_ctx[MAX_IOMMU_CTX]; - - struct regulator *fs_vfe; - struct clk **vfe_clk; - uint32_t num_clk; - - uint32_t bus_perf_client; - - struct completion reset_complete; - struct completion halt_complete; - struct completion stream_config_complete; - struct completion stats_config_complete; - struct mutex realtime_mutex; - struct mutex core_mutex; - - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - spinlock_t shared_data_lock; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spinlock_t sof_lock; -#endif - struct list_head tasklet_q; - struct tasklet_struct vfe_tasklet; - struct msm_vfe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VFE_TASKLETQ_SIZE]; - uint32_t vfe_hw_version; - struct msm_vfe_hardware_info *hw_info; - struct msm_vfe_axi_shared_data axi_data; - struct msm_vfe_stats_shared_data stats_data; - struct msm_vfe_error_info error_info; - struct msm_isp_buf_mgr *buf_mgr; - int dump_reg; - int vfe_clk_idx; - uint32_t vfe_open_cnt; - uint8_t vt_enable; - void __iomem *p_avtimer_msw; - void __iomem *p_avtimer_lsw; - void __iomem *p_avtimer_ctl; - uint8_t avtimer_scaler; - uint8_t ignore_error; - struct msm_isp_statistics *stats; - struct msm_vbif_cntrs vbif_cntrs; - uint32_t vfe_ub_size; - uint32_t frame_id; - uint32_t eof_event_occur; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.c deleted file mode 100644 index e8fd4f0bc4fc..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.c +++ /dev/null @@ -1,1350 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp32.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#define VFE32_BURST_LEN 2 -#define VFE32_UB_SIZE 1024 -#define VFE32_EQUAL_SLICE_UB 194 -#define VFE32_AXI_SLICE_UB 792 -#define VFE32_WM_BASE(idx) (0x4C + 0x18 * idx) -#define VFE32_RDI_BASE(idx) (idx ? 0x734 + 0x4 * (idx - 1) : 0x06FC) -#define VFE32_XBAR_BASE(idx) (0x40 + 0x4 * (idx / 4)) -#define VFE32_XBAR_SHIFT(idx) ((idx % 4) * 8) -#define VFE32_PING_PONG_BASE(wm, ping_pong) \ - (VFE32_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13}; - -#define VFE32_NUM_STATS_TYPE 7 -#define VFE32_STATS_BASE(idx) (0xF4 + 0xC * idx) -#define VFE32_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE32_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE32_CLK_IDX 0 -#define MSM_ISP32_TOTAL_WM_UB 792 -/*792 double word*/ - -static struct msm_cam_clk_info msm_vfe32_1_clk_info[] = { - /*vfe32 clock info for B-family: 8610 */ - {"vfe_clk_src", 266670000}, - {"vfe_clk", -1}, - {"vfe_ahb_clk", -1}, - {"csi_vfe_clk", -1}, - {"bus_clk", -1}, -}; - -static struct msm_cam_clk_info msm_vfe32_2_clk_info[] = { - /*vfe32 clock info for A-family: 8960 */ - {"vfe_clk", 266667000}, - {"vfe_pclk", -1}, - {"csi_vfe_clk", -1}, -}; - -static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - vfe_dev->vfe_clk_idx = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe32_1_clk_info, - vfe_dev->vfe_clk, ARRAY_SIZE(msm_vfe32_1_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 1); - if (rc < 0) - goto clk_enable_failed; - else - vfe_dev->vfe_clk_idx = 2; - } else - vfe_dev->vfe_clk_idx = 1; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe32_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_base); - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe32_init_hardware_reg(struct vfe_device *vfe_dev) -{ - /* CGC_OVERRIDE */ - msm_camera_io_w(0x07FFFFFF, vfe_dev->vfe_base + 0xC); - /* BUS_CFG */ - msm_camera_io_w(0x00000009, vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(0x01000025, vfe_dev->vfe_base + 0x1C); - msm_camera_io_w_mb(0x1CFFFFFF, vfe_dev->vfe_base + 0x20); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(0x1FFFFFFF, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x0, vfe_dev->vfe_base+0x6FC); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(1)); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(2)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(0)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(4)); - -} - -static void msm_vfe32_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & BIT(23)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe32_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 24)) { - msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - } -} - -static void msm_vfe32_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x18)) - return; - if (irq_status0 & (1 << 3)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe32_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x1F)) - return; - - if (irq_status0 & BIT(0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } -} - -static void msm_vfe32_process_violation_status(struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & BIT(0)) - pr_err("%s: black violation\n", __func__); - if (violation_status & BIT(1)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & BIT(2)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & BIT(3)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & BIT(4)) - pr_err("%s: crop violation\n", __func__); - if (violation_status & BIT(5)) - pr_err("%s: scale violation\n", __func__); - if (violation_status & BIT(6)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & BIT(7)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & BIT(8)) - pr_err("%s: matrix violation\n", __func__); - if (violation_status & BIT(9)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & BIT(10)) - pr_err("%s: la violation\n", __func__); - if (violation_status & BIT(11)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & BIT(12)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & BIT(13)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & BIT(14)) - pr_err("%s: asf violation\n", __func__); - if (violation_status & BIT(15)) - pr_err("%s: scale y violation\n", __func__); - if (violation_status & BIT(16)) - pr_err("%s: scale cbcr violation\n", __func__); - if (violation_status & BIT(17)) - pr_err("%s: chroma subsample violation\n", __func__); - if (violation_status & BIT(18)) - pr_err("%s: framedrop enc y violation\n", __func__); - if (violation_status & BIT(19)) - pr_err("%s: framedrop enc cbcr violation\n", __func__); - if (violation_status & BIT(20)) - pr_err("%s: framedrop view y violation\n", __func__); - if (violation_status & BIT(21)) - pr_err("%s: framedrop view cbcr violation\n", __func__); - if (violation_status & BIT(22)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & BIT(23)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & BIT(24)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe32_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & BIT(0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & BIT(1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & BIT(2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & BIT(3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & BIT(4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & BIT(5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & BIT(6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & BIT(7)) { - pr_err("%s: violation\n", __func__); - msm_vfe32_process_violation_status(vfe_dev); - } - if (error_status1 & BIT(8)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err("%s: image master 0 bus overflow\n", __func__); - } - if (error_status1 & BIT(9)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err("%s: image master 1 bus overflow\n", __func__); - } - if (error_status1 & BIT(10)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err("%s: image master 2 bus overflow\n", __func__); - } - if (error_status1 & BIT(11)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err("%s: image master 3 bus overflow\n", __func__); - } - if (error_status1 & BIT(12)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err("%s: image master 4 bus overflow\n", __func__); - } - if (error_status1 & BIT(13)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err("%s: image master 5 bus overflow\n", __func__); - } - if (error_status1 & BIT(14)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err("%s: image master 6 bus overflow\n", __func__); - } - if (error_status1 & BIT(15)) { - vfe_dev->stats->bg_overflow++; - pr_err("%s: status ae/bg bus overflow\n", __func__); - } - if (error_status1 & BIT(16)) { - vfe_dev->stats->bf_overflow++; - pr_err("%s: status af/bf bus overflow\n", __func__); - } - if (error_status1 & BIT(17)) { - vfe_dev->stats->awb_overflow++; - pr_err("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & BIT(18)) { - vfe_dev->stats->rs_overflow++; - pr_err("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & BIT(19)) { - vfe_dev->stats->cs_overflow++; - pr_err("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & BIT(20)) { - vfe_dev->stats->ihist_overflow++; - pr_err("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & BIT(21)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err("%s: status skin bhist bus overflow\n", __func__); - } - if (error_status1 & BIT(22)) - pr_err("%s: axi error\n", __func__); -} - -static void msm_vfe32_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(*irq_status1, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x18); - - if (*irq_status1 & BIT(0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x204); - - if (*irq_status1 & BIT(7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x7B4); -} - -static void msm_vfe32_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0x20) && !(irq_status1 & 0x1C000000)) - return; - - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status1 & BIT(26)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status1 & BIT(27)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status1 & BIT(28)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || atomic_read(&vfe_dev->stats_data.stats_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - return; -} - -static void msm_vfe32_reg_update( - struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x260); -} - -static uint32_t msm_vfe32_reset_values[ISP_RST_MAX] = { - 0x3FF, /* ISP_RST_HARD reset everything */ - 0x3EF /* ISP_RST_SOFT same as HARD RESET */ -}; - -static long msm_vfe32_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe32_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0x4); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x3EF, vfe_dev->vfe_base + 0x4); - } - return rc; -} - -static void msm_vfe32_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - if (!vfe_dev->pdev->dev.of_node) { - /*vfe32 A-family: 8960*/ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x38); - } else { - /*vfe32 B-family: 8610*/ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x1C800000, vfe_dev->vfe_base + 0x20); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x9AAAAAAA , vfe_dev->vfe_base + 0x600); - msm_camera_io_w(reload_mask, vfe_dev->vfe_base + 0x38); - } -} - -static void msm_vfe32_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); -} - -static void msm_vfe32_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x504); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x508); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x514); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x518); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x520); - } - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x260); -} - -static void msm_vfe32_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x520); - } -} - -static int32_t msm_vfe32_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_fmt = 0, pack_reg = 0; - uint32_t io_format_reg; - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x6F8); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x6F8); - return 0; -} - -static void msm_vfe32_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x14); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, - vfe_dev->vfe_base + 0x1EC); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x1F0); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x1F4); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x6FC); - val &= 0xFFFFFFFC; - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x6FC); -} - -static void msm_vfe32_update_camif_state( - struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - val |= 0x19; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x1C); - msm_camera_io_w_mb(0xA, vfe_dev->vfe_base + 0x200); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x1E4); - bus_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x1E4); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x1E0); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe32_cfg_rdi_reg(struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - -} - -static void msm_vfe32_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } - return; -} - -static void msm_vfe32_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - /* FRAME BASED */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - return; -} - -static void msm_vfe32_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 5; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 3; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= BIT(1); /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x60; - break; - case IDEAL_RAW: - xbar_cfg = 0x80; - break; - case RDI_INTF_0: - xbar_cfg = 0xA0; - break; - case RDI_INTF_1: - xbar_cfg = 0xC0; - break; - case RDI_INTF_2: - xbar_cfg = 0xE0; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - } - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - return; -} - -static void msm_vfe32_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); -} - -static void msm_vfe32_cfg_axi_ub_equal_default(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint32_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP32_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (uint64_t)(axi_data->wm_image_size[i] * - prop_size); - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | - (wm_ub_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += wm_ub_size; - } else { - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE32_WM_BASE(i) + 0xC); - } - } -} - -static void msm_vfe32_cfg_axi_ub_equal_slicing(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t final_ub_slice_size; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (ub_offset + VFE32_EQUAL_SLICE_UB > VFE32_AXI_SLICE_UB) { - final_ub_slice_size = VFE32_AXI_SLICE_UB - ub_offset; - msm_camera_io_w(ub_offset << 16 | - (final_ub_slice_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += final_ub_slice_size; - } else { - msm_camera_io_w(ub_offset << 16 | - (VFE32_EQUAL_SLICE_UB - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += VFE32_EQUAL_SLICE_UB; - } - } -} - -static void msm_vfe32_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe32_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe32_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe32_update_ping_pong_addr(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe32_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - uint32_t halt_mask; - uint32_t axi_busy_flag = false; - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1D8); - if (blocking) { - axi_busy_flag = true; - } - while (axi_busy_flag) { - if (msm_camera_io_r( - vfe_dev->vfe_base + 0x1DC) & 0x1) - axi_busy_flag = false; - } - msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); - halt_mask &= 0xFEFFFFFF; - /* Disable AXI IRQ */ - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x20); - return 0; -} - -static uint32_t msm_vfe32_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 6) & 0x7F; -} - -static uint32_t msm_vfe32_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 21) & 0x7; -} - -static uint32_t msm_vfe32_get_pingpong_status(struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x180); -} - -static int msm_vfe32_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_AEC: - case MSM_ISP_STATS_BG: - return 0; - case MSM_ISP_STATS_AF: - case MSM_ISP_STATS_BF: - return 1; - case MSM_ISP_STATS_AWB: - return 2; - case MSM_ISP_STATS_RS: - return 3; - case MSM_ISP_STATS_CS: - return 4; - case MSM_ISP_STATS_IHIST: - return 5; - case MSM_ISP_STATS_SKIN: - case MSM_ISP_STATS_BHIST: - return 6; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe32_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe32_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - return; -} - -static void msm_vfe32_stats_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(STATS_IDX(stream_info->stream_handle) + 13); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~(BIT(STATS_IDX(stream_info->stream_handle) + 13)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_cfg_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_clear_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE32_UB_SIZE; - uint32_t ub_size[VFE32_NUM_STATS_TYPE] = { - 107, /*MSM_ISP_STATS_BG*/ - 92, /*MSM_ISP_STATS_BF*/ - 2, /*MSM_ISP_STATS_AWB*/ - 7, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 2, /*MSM_ISP_STATS_IHIST*/ - 7, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE32_STATS_BASE(i) + 0x8); - } - return; -} - -static void msm_vfe32_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - module_cfg_mask |= 1 << (5 + i); - break; - case 5: - module_cfg_mask |= 1 << 16; - break; - case 6: - module_cfg_mask |= 1 << 19; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x10); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x10); -} - -static void msm_vfe32_stats_update_ping_pong_addr(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe32_stats_get_wm_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 13) & 0x7F; -} - -static void msm_vfe32_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x002FFF7E; -} - -static void msm_vfe32_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x1C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = 0x0; - *irq1_mask = 0x01800000; -} - -static uint32_t msm_vfe32_stats_get_comp_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 24) & 0x1; -} - -static uint32_t msm_vfe32_stats_get_frame_id(struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe_imgwr"); - else - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe_misc"); - else - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[1]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe32_get_error_mask(uint32_t *error_mask0, - uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x007FFFFF; -} - -struct msm_vfe_axi_hardware_info msm_vfe32_axi_hw_info = { - .num_wm = 5, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe32_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_AEC | 1 << MSM_ISP_STATS_BG | - 1 << MSM_ISP_STATS_AF | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_SKIN | 1 << MSM_ISP_STATS_BHIST, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE32_NUM_STATS_TYPE, - .num_stats_comp_mask = 0, -}; - -static struct v4l2_subdev_core_ops msm_vfe32_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe32_subdev_ops = { - .core = &msm_vfe32_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe32_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe32_hw_info = { - .num_iommu_ctx = 2, - .vfe_clk_idx = VFE32_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe32_read_irq_status, - .process_camif_irq = msm_vfe32_process_camif_irq, - .process_reset_irq = msm_vfe32_process_reset_irq, - .process_halt_irq = msm_vfe32_process_halt_irq, - .process_reg_update = msm_vfe32_process_reg_update, - .process_epoch_irq = msm_vfe32_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe32_axi_reload_wm, - .enable_wm = msm_vfe32_axi_enable_wm, - .cfg_io_format = msm_vfe32_cfg_io_format, - .cfg_comp_mask = msm_vfe32_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe32_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe32_cfg_framedrop, - .clear_framedrop = msm_vfe32_clear_framedrop, - .cfg_wm_reg = msm_vfe32_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe32_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe32_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe32_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe32_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_get_comp_mask, - .get_wm_mask = msm_vfe32_get_wm_mask, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - .halt = msm_vfe32_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe32_reg_update, - .cfg_camif = msm_vfe32_cfg_camif, - .update_camif_state = msm_vfe32_update_camif_state, - .cfg_rdi_reg = msm_vfe32_cfg_rdi_reg, - .reset_hw = msm_vfe32_reset_hardware, - .init_hw = msm_vfe32_init_hardware, - .init_hw_reg = msm_vfe32_init_hardware_reg, - .release_hw = msm_vfe32_release_hardware, - .get_platform_data = msm_vfe32_get_platform_data, - .get_error_mask = msm_vfe32_get_error_mask, - .get_overflow_mask = msm_vfe32_get_overflow_mask, - .get_irq_mask = msm_vfe32_get_irq_mask, - .restore_irq_mask = msm_vfe32_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe32_get_halt_restart_mask, - .process_error_status = msm_vfe32_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe32_get_stats_idx, - .check_streams = msm_vfe32_stats_check_streams, - .cfg_comp_mask = msm_vfe32_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe32_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_stats_clear_wm_reg, - .cfg_ub = msm_vfe32_stats_cfg_ub, - .enable_module = msm_vfe32_stats_enable_module, - .update_ping_pong_addr = - msm_vfe32_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_stats_get_comp_mask, - .get_wm_mask = msm_vfe32_stats_get_wm_mask, - .get_frame_id = msm_vfe32_stats_get_frame_id, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x5A0, - .axi_hw_info = &msm_vfe32_axi_hw_info, - .stats_hw_info = &msm_vfe32_stats_hw_info, - .subdev_ops = &msm_vfe32_subdev_ops, - .subdev_internal_ops = &msm_vfe32_internal_ops, -}; -EXPORT_SYMBOL(vfe32_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.h deleted file mode 100644 index 05350486271d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp32.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP32_H__ -#define __MSM_ISP32_H__ - -extern struct msm_vfe_hardware_info vfe32_hw_info; -#endif /* __MSM_ISP32_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.c deleted file mode 100644 index fbebeadda9e4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.c +++ /dev/null @@ -1,1862 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_isp40.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define VFE40_BURST_LEN 1 -#define VFE40_BURST_LEN_8916_VERSION 2 -#define VFE40_STATS_BURST_LEN 1 -#define VFE40_STATS_BURST_LEN_8916_VERSION 2 -#define VFE40_UB_SIZE 1536 /* 1536 * 128 bits = 24KB */ -#define VFE40_UB_SIZE_8916 2048 /* 2048 * 128 bits = 32KB */ -#define VFE40_EQUAL_SLICE_UB 190 /* (UB_SIZE - STATS SIZE)/6 */ -#define VFE40_EQUAL_SLICE_UB_8916 276 -#define VFE40_TOTAL_WM_UB 1144 /* UB_SIZE - STATS SIZE */ -#define VFE40_TOTAL_WM_UB_8916 1656 - - -/* STATS_SIZE (BE + BG + BF+ RS + CS + IHIST + BHIST ) = 392 */ -#define VFE40_STATS_SIZE 392 -#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE40_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE40_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE40_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE40_PING_PONG_BASE(wm, ping_pong) \ - (VFE40_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 8, 9, 10, 11, 12, 13, 14, 15}; - -#define VFE40_NUM_STATS_TYPE 8 -#define VFE40_STATS_BASE(idx) (0x168 + 0x18 * idx) -#define VFE40_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE40_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE40_VBIF_CLKON 0x4 -#define VFE40_VBIF_FIXED_SORT_EN 0x30 -#define VFE40_VBIF_FIXED_SORT_SEL0 0x34 -#define VFE40_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE40_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE40_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE40_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE40_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE40_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE40_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE40_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE40_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE40_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE40_VBIF_ARB_CTL 0xF0 -#define VFE40_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE40_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE40_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE40_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE40_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE40_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE40_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE40_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE40_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE40_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE40_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE40_CLK_IDX 1 -/*Iterations for averaging outstanding writes counts*/ -#define MAX_NUM_FRAMES 10 -/* Maximum outstanding writes to avoid image master bus -overflows*/ -#define MAX_OUT_WRITES_LEVEL 4000000 - -static struct msm_cam_clk_info msm_vfe40_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe40_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE40_8974V1_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26V2_VERSION) { - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0002AAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8974V2_VERSION || - vfe_dev->vfe_hw_version == VFE40_8974V3_VERSION) { - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION || - vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe40_init_vbif_parms_8974_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10010110, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_OCMEM_OUT_MAX_BURST); - msm_camera_io_w(0x00000030, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000001, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8974_v2(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8x26(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x000000FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x00FF00FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - return; -} - -static void msm_vfe40_init_vbif_parms_8939(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x00000fff, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_EN); - msm_camera_io_w(0x00555000, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_SEL0); - return; -} - -static void msm_vfe40_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8974V1_VERSION: - msm_vfe40_init_vbif_parms_8974_v1(vfe_dev); - break; - case VFE40_8974V2_VERSION: - case VFE40_8974V3_VERSION: - msm_vfe40_init_vbif_parms_8974_v2(vfe_dev); - break; - case VFE40_8x26_VERSION: - case VFE40_8x26V2_VERSION: - msm_vfe40_init_vbif_parms_8x26(vfe_dev); - break; - case VFE40_8916_VERSION: - /*Reset hardware values are correct vbif values. - So no need to set*/ - break; - case VFE40_8939_VERSION: - msm_vfe40_init_vbif_parms_8939(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } - -} - -static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, - &msm_vfe40_clk_info[0]); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe40_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe40_init_hardware_reg(struct vfe_device *vfe_dev) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - msm_vfe40_init_qos_parms(vfe_dev); - msm_vfe40_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0x3FFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - /* Enable EPOCH IRQ for 100 frame lines*/ - irq_mask |= BIT(3); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x64, vfe_dev->vfe_base + 0x318); - msm_camera_io_w(vfe_dev->stats_data.stats_mask, - vfe_dev->vfe_base + 0x44); - -} - -static void msm_vfe40_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe40_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe40_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int cnt; - - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - cnt = vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count; - if (cnt > 0 && vfe_dev->axi_data.src_info[VFE_PIX_0].pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) { - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->hw_info->vfe_ops.core_ops. - vbif_read_counters(vfe_dev); - } - } -} - -static void msm_vfe40_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & (1 << 0)) - pr_err("%s: camif violation\n", __func__); - if (violation_status & (1 << 1)) - pr_err("%s: black violation\n", __func__); - if (violation_status & (1 << 2)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & (1 << 3)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & (1 << 4)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & (1 << 5)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & (1 << 6)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & (1 << 7)) - pr_err("%s: color correct violation\n", __func__); - if (violation_status & (1 << 8)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & (1 << 9)) - pr_err("%s: la violation\n", __func__); - if (violation_status & (1 << 10)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & (1 << 11)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & (1 << 12)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & (1 << 13)) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status & (1 << 14)) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status & (1 << 15)) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status & (1 << 16)) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status & (1 << 17)) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status & (1 << 18)) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status & (1 << 19)) - pr_err("%s: asf enc violation\n", __func__); - if (violation_status & (1 << 20)) - pr_err("%s: asf view violation\n", __func__); - if (violation_status & (1 << 21)) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status & (1 << 22)) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status & (1 << 23)) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status & (1 << 24)) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status & (1 << 25)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & (1 << 26)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & (1 << 27)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe40_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err_ratelimited("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err_ratelimited("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err_ratelimited("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err_ratelimited("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err_ratelimited("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err_ratelimited("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err_ratelimited("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err_ratelimited("%s: violation\n", __func__); - msm_vfe40_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err_ratelimited("%s: image master 0 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 10)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err_ratelimited("%s: image master 1 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 11)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err_ratelimited("%s: image master 2 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 12)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err_ratelimited("%s: image master 3 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 13)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err_ratelimited("%s: image master 4 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 14)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err_ratelimited("%s: image master 5 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 15)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err_ratelimited("%s: image master 6 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 16)) { - vfe_dev->stats->be_overflow++; - pr_err_ratelimited("%s: status be bus overflow\n", __func__); - } - if (error_status1 & (1 << 17)) { - vfe_dev->stats->bg_overflow++; - pr_err_ratelimited("%s: status bg bus overflow\n", __func__); - } - if (error_status1 & (1 << 18)) { - vfe_dev->stats->bf_overflow++; - pr_err_ratelimited("%s: status bf bus overflow\n", __func__); - } - if (error_status1 & (1 << 19)) { - vfe_dev->stats->awb_overflow++; - pr_err_ratelimited("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & (1 << 20)) { - vfe_dev->stats->rs_overflow++; - pr_err_ratelimited("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & (1 << 21)) { - vfe_dev->stats->cs_overflow++; - pr_err_ratelimited("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & (1 << 22)) { - vfe_dev->stats->ihist_overflow++; - pr_err_ratelimited("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & (1 << 23)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err_ratelimited("%s: status skin bhist bus overflow\n", - __func__); - } -} - -static void msm_vfe40_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - /* - * Ignore composite 2/3 irq which is used for dual VFE only - */ - - if (*irq_status0 & 0x6000000) - *irq_status0 &= ~(0x18000000); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x18000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x18000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - return; -} - -static void msm_vfe40_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); -} - -static uint32_t msm_vfe40_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - - -static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe40_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(1000)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe40_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe40_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); -} - -static void msm_vfe40_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - - /* - * For dual VFE, composite 2/3 interrupt is used to trigger - * microcontroller to update certain VFE registers - */ - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask |= BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask |= BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask &= ~BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask &= ~BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_init_vbif_cntrs(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - - msm_camera_io_w(0x15, vfe_dev->vfe_vbif_base + 0x340); - msm_camera_io_w(0x40, vfe_dev->vfe_vbif_base + 0x344); - msm_camera_io_w(0x78, vfe_dev->vfe_vbif_base + 0x348); - - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - break; - default: - break; - } -} - -void msm_vfe40_vbif_clear_cnt(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - break; - default: - break; - } -} - -void msm_vfe40_vbif_read_cnt_epoch(struct vfe_device *vfe_dev) -{ - uint32_t vbif_cnt_0_l = 0; - uint32_t vbif_cnt_1_l = 0; - uint32_t vbif_cnt_2_l = 0; - struct msm_vbif_cntrs *vbif_cntrs = &vfe_dev->vbif_cntrs; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - - if (vfe_dev->axi_data.frame_id[session_id]%2 > 0) { - /*Disable counters before reading*/ - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x308); - /*Read counters*/ - vbif_cnt_0_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x360); - vbif_cnt_1_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x364); - vbif_cnt_2_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x368); - /*clear counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - /*Enable counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - - vbif_cntrs->total_vbif_cnt_2 += vbif_cnt_2_l; - vbif_cntrs->vfe_total_iter++; - - ISP_DBG("%s: VBIF cntr0 = %d, cntr1 = %d, cntr 2 = %d", - __func__, vbif_cnt_0_l, vbif_cnt_1_l, vbif_cnt_2_l); - - if ((vbif_cnt_2_l > 0) & (vbif_cntrs->previous_write_val > 0)) { - if ((vbif_cnt_2_l > (10 * - vbif_cntrs->previous_write_val)) - | (vbif_cnt_2_l > MAX_OUT_WRITES_LEVEL)) - vbif_cntrs->fb_err_lvl = 3; - else if (vbif_cnt_2_l > (5 * - vbif_cntrs->previous_write_val)) - vbif_cntrs->fb_err_lvl = 2; - else if (vbif_cnt_2_l > (2 * - (vbif_cntrs->previous_write_val))) - vbif_cntrs->fb_err_lvl = 1; - else - vbif_cntrs->fb_err_lvl = 0; - } - if ((vbif_cntrs->previous_write_val == 0) & - (vbif_cnt_2_l > 0)) { - vbif_cntrs->previous_write_val = vbif_cnt_2_l; - } - - if (vbif_cntrs->vfe_total_iter == MAX_NUM_FRAMES) { - vbif_cntrs->previous_write_val = - (vbif_cntrs->total_vbif_cnt_2)/MAX_NUM_FRAMES; - vbif_cntrs->vfe_total_iter = 0; - vbif_cntrs->total_vbif_cnt_2 = 0; - } - } -} - -static void msm_vfe40_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe40_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe40_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - val |= 0xF7; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x318); - - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x2F4); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe40_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); -} - -static void msm_vfe40_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t burst_len; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - burst_len = VFE40_BURST_LEN_8916_VERSION; - else - burst_len = VFE40_BURST_LEN; - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ - return; -} - -static void msm_vfe40_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); - return; -} - -static void msm_vfe40_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - return; -} - -static void msm_vfe40_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); -} - -static void msm_vfe40_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t total_wm_ub; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - total_wm_ub = VFE40_TOTAL_WM_UB_8916; - else - total_wm_ub = VFE40_TOTAL_WM_UB; - - prop_size = total_wm_ub - - axi_data->hw_info->min_wm_ub * num_used_wms; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - uint64_t delta = 0; - uint64_t temp = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(temp, total_image_size); - delta = temp; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe40_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t equal_slice_ub; - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - equal_slice_ub = VFE40_EQUAL_SLICE_UB_8916; - else - equal_slice_ub = VFE40_EQUAL_SLICE_UB; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (equal_slice_ub - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += equal_slice_ub; - } -} - -static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe40_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe40_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - long rc = 0; - /* Keep only restart mask and halt mask*/ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x28); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x2C); - /* Clear IRQ Status*/ - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - if (blocking) { - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } - return rc; -} - -static uint32_t msm_vfe40_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static void msm_vfe40_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x00FFFE7E; -} - -static void msm_vfe40_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x28); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} - -static uint32_t msm_vfe40_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe40_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe40_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return 0; - case MSM_ISP_STATS_BG: - return 1; - case MSM_ISP_STATS_BF: - return 2; - case MSM_ISP_STATS_AWB: - return 3; - case MSM_ISP_STATS_RS: - return 4; - case MSM_ISP_STATS_CS: - return 5; - case MSM_ISP_STATS_IHIST: - return 6; - case MSM_ISP_STATS_BHIST: - return 7; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe40_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - stats_mask = stats_mask & 0xFF; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - stats_comp = &stats_data->stats_comp_mask[i]; - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (stats_mask << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - stats_mask)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(stats_mask << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - vfe_dev->stats_data.stats_mask = reg_mask; - return; - } -} - -static void msm_vfe40_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 16); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 16)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t ub_offset = vfe_dev->vfe_ub_size; - uint32_t stats_burst_len = stats_data->stats_burst_len; - - uint32_t ub_size[VFE40_NUM_STATS_TYPE] = { - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION; - ub_offset = VFE40_UB_SIZE_8916; - } else { - stats_burst_len = VFE40_STATS_BURST_LEN; - ub_offset = VFE40_UB_SIZE; - } - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(stats_burst_len << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE40_STATS_BASE(i) + 0xC); - } -} - -static void msm_vfe40_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - module_cfg_mask |= 1 << (5 + i); - break; - case 6: - module_cfg_mask |= 1 << 15; - break; - case 7: - module_cfg_mask |= 1 << 18; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); -} - -static void msm_vfe40_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe40_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 16) & 0xFF; -} - -static uint32_t msm_vfe40_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe40_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe40_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x00FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe40_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE40_NUM_STATS_TYPE, - .num_stats_comp_mask = 2, -}; - -static struct v4l2_subdev_core_ops msm_vfe40_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe40_subdev_ops = { - .core = &msm_vfe40_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe40_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe40_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE40_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe40_read_irq_status, - .process_camif_irq = msm_vfe40_process_camif_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_halt_irq = msm_vfe40_process_halt_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_reg_update = msm_vfe40_process_reg_update, - .process_epoch_irq = msm_vfe40_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe40_axi_reload_wm, - .enable_wm = msm_vfe40_axi_enable_wm, - .cfg_io_format = msm_vfe40_cfg_io_format, - .cfg_comp_mask = msm_vfe40_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe40_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe40_cfg_framedrop, - .clear_framedrop = msm_vfe40_clear_framedrop, - .cfg_wm_reg = msm_vfe40_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe40_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe40_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe40_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe40_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_get_comp_mask, - .get_wm_mask = msm_vfe40_get_wm_mask, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - .halt = msm_vfe40_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe40_reg_update, - .cfg_camif = msm_vfe40_cfg_camif, - .update_camif_state = msm_vfe40_update_camif_state, - .cfg_rdi_reg = msm_vfe40_cfg_rdi_reg, - .reset_hw = msm_vfe40_reset_hardware, - .init_hw = msm_vfe40_init_hardware, - .init_hw_reg = msm_vfe40_init_hardware_reg, - .release_hw = msm_vfe40_release_hardware, - .get_platform_data = msm_vfe40_get_platform_data, - .get_error_mask = msm_vfe40_get_error_mask, - .get_overflow_mask = msm_vfe40_get_overflow_mask, - .get_irq_mask = msm_vfe40_get_irq_mask, - .restore_irq_mask = msm_vfe40_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe40_get_halt_restart_mask, - .process_error_status = msm_vfe40_process_error_status, - .init_vbif_counters = msm_vfe40_init_vbif_cntrs, - .vbif_clear_counters = msm_vfe40_vbif_clear_cnt, - .vbif_read_counters = msm_vfe40_vbif_read_cnt_epoch, - }, - .stats_ops = { - .get_stats_idx = msm_vfe40_get_stats_idx, - .check_streams = msm_vfe40_stats_check_streams, - .cfg_comp_mask = msm_vfe40_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe40_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_stats_clear_wm_reg, - .cfg_ub = msm_vfe40_stats_cfg_ub, - .enable_module = msm_vfe40_stats_enable_module, - .update_ping_pong_addr = - msm_vfe40_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_stats_get_comp_mask, - .get_wm_mask = msm_vfe40_stats_get_wm_mask, - .get_frame_id = msm_vfe40_stats_get_frame_id, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe40_axi_hw_info, - .stats_hw_info = &msm_vfe40_stats_hw_info, - .subdev_ops = &msm_vfe40_subdev_ops, - .subdev_internal_ops = &msm_vfe40_internal_ops, -}; -EXPORT_SYMBOL(vfe40_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.h deleted file mode 100644 index e9b151816a37..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp40.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP40_H__ -#define __MSM_ISP40_H__ - -extern struct msm_vfe_hardware_info vfe40_hw_info; -#endif /* __MSM_ISP40_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.c deleted file mode 100644 index fe0b1db4858a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.c +++ /dev/null @@ -1,1509 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp44.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_AWB 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE44_8084V1_VERSION 0x4000000A - -#define VFE44_BURST_LEN 3 -#define VFE44_STATS_BURST_LEN 2 -#define VFE44_UB_SIZE 2048 -#define VFE44_EQUAL_SLICE_UB 228 -#define VFE44_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE44_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE44_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE44_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE44_PING_PONG_BASE(wm, ping_pong) \ - (VFE44_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13, 14, 15}; - -#define SHIFT_BF_SCALE_BIT 1 -#define VFE44_NUM_STATS_COMP 2 -#define VFE44_NUM_STATS_TYPE 9 -#define VFE44_STATS_BASE(idx) \ - ((idx) == STATS_IDX_BF_SCALE ? 0xA0C : (0x168 + 0x18 * (idx-1))) -#define VFE44_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE44_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE44_VBIF_CLKON 0x4 -#define VFE44_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE44_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE44_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE44_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE44_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE44_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE44_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE44_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE44_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE44_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE44_VBIF_ARB_CTL 0xF0 -#define VFE44_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE44_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE44_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE44_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE44_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE44_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE44_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE44_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE44_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE44_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE44_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE44_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe44_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe44_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE44_8084V1_VERSION) { - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe44_init_vbif_parms_8084_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE44_VBIF_CLKON); - msm_camera_io_w(0x00100000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x00001000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10100000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00101000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x3, - vfe_vbif_base + VFE44_VBIF_ROUND_ROBIN_QOS_ARB); -} - -static void msm_vfe44_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE44_8084V1_VERSION: - msm_vfe44_init_vbif_parms_8084_v1(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - break; - } - -} - -static int msm_vfe44_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe44_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe44_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe44_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe44_init_qos_parms(vfe_dev); - msm_vfe44_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0xFBFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); -} - -static void msm_vfe44_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe44_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe44_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe44_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe44_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status == 0) - pr_err("%s: camif violation\n", __func__); - if (violation_status == 1) - pr_err("%s: black violation\n", __func__); - if (violation_status == 2) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status == 3) - pr_err("%s: demux violation\n", __func__); - if (violation_status == 4) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status == 5) - pr_err("%s: wb violation\n", __func__); - if (violation_status == 6) - pr_err("%s: clf violation\n", __func__); - if (violation_status == 7) - pr_err("%s: color correct violation\n", __func__); - if (violation_status == 8) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status == 9) - pr_err("%s: la violation\n", __func__); - if (violation_status == 10) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status == 11) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status == 12) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status == 13) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status == 14) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status == 15) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status == 16) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status == 17) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status == 18) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status == 21) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status == 22) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status == 23) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status == 24) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status == 25) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status == 26) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status == 27) - pr_err("%s: realign buf cr violation\n", __func__); - if (violation_status == 28) - pr_err("%s: ltm violation\n", __func__); - if (violation_status == 29) - pr_err("%s: ltm cov violation\n", __func__); - if (violation_status == 30) - pr_err("%s: abf violation\n", __func__); - if (violation_status == 31) - pr_err("%s: bpc violation\n", __func__); -} - -static void msm_vfe44_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe44_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status awb bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe44_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x10000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x10000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - return; -} -static void msm_vfe44_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); -} -static uint32_t msm_vfe44_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - -static long msm_vfe44_reset_hardware(struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe44_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe44_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe44_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); -} - -static void msm_vfe44_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe44_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - val |= 0xF5; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x200, vfe_dev->vfe_base + 0x318); - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x2, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe44_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); -} - -static void msm_vfe44_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe44_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe44_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -static void msm_vfe44_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -#define MSM_ISP44_TOTAL_WM_UB 1203 - -static void msm_vfe44_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP44_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (axi_data->wm_image_size[i] * - prop_size)/total_image_size; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe44_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (VFE44_EQUAL_SLICE_UB - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += VFE44_EQUAL_SLICE_UB; - } -} - -static void msm_vfe44_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe44_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe44_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe44_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) -{ - uint32_t halt_mask; - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - halt_mask |= (1 << 8); - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x2C); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - return wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); -} - -static uint32_t msm_vfe44_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe44_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe44_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe44_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return STATS_IDX_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_AWB: - return STATS_IDX_AWB; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe44_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe44_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_sub((1 << STATS_IDX_BF_SCALE), - stats_comp); - - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - mask_bf_scale)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(mask_bf_scale << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - return; - } -} - -static void msm_vfe44_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE44_UB_SIZE; - uint32_t ub_size[VFE44_NUM_STATS_TYPE] = { - 128, /*MSM_ISP_STATS_BF_SCALE*/ - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE44_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE44_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe44_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_BE: - case STATS_IDX_BG: - case STATS_IDX_BF: - case STATS_IDX_AWB: - case STATS_IDX_RS: - case STATS_IDX_CS: - module_cfg_mask |= 1 << (4 + i); - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 15; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 18; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 2; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x888); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x888); -} - -static void msm_vfe44_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe44_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe44_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe44_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe44_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe44_axi_hw_info = { - .num_wm = 5, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe44_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE44_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE44_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe44_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe44_subdev_ops = { - .core = &msm_vfe44_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe44_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe44_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE44_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe44_read_irq_status, - .process_camif_irq = msm_vfe44_process_camif_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_halt_irq = msm_vfe44_process_halt_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_reg_update = msm_vfe44_process_reg_update, - .process_epoch_irq = msm_vfe44_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe44_axi_reload_wm, - .enable_wm = msm_vfe44_axi_enable_wm, - .cfg_io_format = msm_vfe44_cfg_io_format, - .cfg_comp_mask = msm_vfe44_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe44_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe44_cfg_framedrop, - .clear_framedrop = msm_vfe44_clear_framedrop, - .cfg_wm_reg = msm_vfe44_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe44_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe44_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe44_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe44_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_get_comp_mask, - .get_wm_mask = msm_vfe44_get_wm_mask, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - .halt = msm_vfe44_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe44_reg_update, - .cfg_camif = msm_vfe44_cfg_camif, - .update_camif_state = msm_vfe44_update_camif_state, - .cfg_rdi_reg = msm_vfe44_cfg_rdi_reg, - .reset_hw = msm_vfe44_reset_hardware, - .init_hw = msm_vfe44_init_hardware, - .init_hw_reg = msm_vfe44_init_hardware_reg, - .release_hw = msm_vfe44_release_hardware, - .get_platform_data = msm_vfe44_get_platform_data, - .get_error_mask = msm_vfe44_get_error_mask, - .process_error_status = msm_vfe44_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe44_get_stats_idx, - .check_streams = msm_vfe44_stats_check_streams, - .cfg_comp_mask = msm_vfe44_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe44_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_stats_clear_wm_reg, - .cfg_ub = msm_vfe44_stats_cfg_ub, - .enable_module = msm_vfe44_stats_enable_module, - .update_ping_pong_addr = - msm_vfe44_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_stats_get_comp_mask, - .get_wm_mask = msm_vfe44_stats_get_wm_mask, - .get_frame_id = msm_vfe44_stats_get_frame_id, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe44_axi_hw_info, - .stats_hw_info = &msm_vfe44_stats_hw_info, - .subdev_ops = &msm_vfe44_subdev_ops, - .subdev_internal_ops = &msm_vfe44_internal_ops, -}; -EXPORT_SYMBOL(vfe44_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.h deleted file mode 100644 index 7bd630d4ef4d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp44.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP44_H__ -#define __MSM_ISP44_H__ - -extern struct msm_vfe_hardware_info vfe44_hw_info; -#endif /* __MSM_ISP44_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.c deleted file mode 100644 index 23083e53c362..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.c +++ /dev/null @@ -1,1915 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_camera_io_util.h" - -#define SRC_TO_INTF(src) \ - ((src < RDI_INTF_0) ? VFE_PIX_0 : \ - (VFE_RAW_0 + src - RDI_INTF_0)) - -#define HANDLE_TO_IDX(handle) (handle & 0xFF) - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MIN_IB 1700000000 - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int i, rc = -1; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == AVALIABLE) - break; - } - - if (i == MAX_NUM_STREAM) { - pr_err("%s: No free stream\n", __func__); - return rc; - } - - if ((axi_data->stream_handle_cnt << 8) == 0) - axi_data->stream_handle_cnt++; - - stream_cfg_cmd->axi_stream_handle = - (++axi_data->stream_handle_cnt) << 8 | i; - - memset(&axi_data->stream_info[i], 0, - sizeof(struct msm_vfe_axi_stream)); - spin_lock_init(&axi_data->stream_info[i].lock); - axi_data->stream_info[i].session_id = stream_cfg_cmd->session_id; - axi_data->stream_info[i].stream_id = stream_cfg_cmd->stream_id; - axi_data->stream_info[i].buf_divert = stream_cfg_cmd->buf_divert; - axi_data->stream_info[i].state = INACTIVE; - axi_data->stream_info[i].stream_handle = - stream_cfg_cmd->axi_stream_handle; - return 0; -} - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx) -{ - if (axi_data->stream_info[stream_idx].state != AVALIABLE) { - axi_data->stream_info[stream_idx].state = AVALIABLE; - axi_data->stream_info[stream_idx].stream_handle = 0; - } else { - pr_err("%s: stream does not exist\n", __func__); - } -} - -int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int rc = -1, i; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid axi_stream_handle\n", __func__); - return rc; - } - switch (stream_cfg_cmd->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - stream_info->num_planes = 1; - stream_info->format_factor = ISP_Q2; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - stream_info->num_planes = 2; - stream_info->format_factor = 1.5 * ISP_Q2; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - return rc; - } - - if (axi_data->hw_info->num_wm - axi_data->num_used_wm < - stream_info->num_planes) { - pr_err("%s: No free write masters\n", __func__); - return rc; - } - - if ((stream_info->num_planes > 1) && - (axi_data->hw_info->num_comp_mask - - axi_data->num_used_composite_mask < 1)) { - pr_err("%s: No free composite mask\n", __func__); - return rc; - } - - if (stream_cfg_cmd->init_frame_drop >= MAX_INIT_FRAME_DROP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - if (stream_cfg_cmd->frame_skip_pattern >= MAX_SKIP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - for (i = 0; i < stream_info->num_planes; i++) { - stream_info->plane_cfg[i] = stream_cfg_cmd->plane_cfg[i]; - stream_info->max_width = max(stream_info->max_width, - stream_cfg_cmd->plane_cfg[i].output_width); - } - - stream_info->output_format = stream_cfg_cmd->output_format; - stream_info->runtime_output_format = stream_info->output_format; - stream_info->stream_src = stream_cfg_cmd->stream_src; - stream_info->frame_based = stream_cfg_cmd->frame_base; - return 0; -} - -static uint32_t msm_isp_axi_get_plane_size( - struct msm_vfe_axi_stream *stream_info, int plane_idx) -{ - uint32_t size = 0; - struct msm_vfe_axi_plane_cfg *plane_cfg = stream_info->plane_cfg; - switch (stream_info->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - break; - } - return size; -} - -void msm_isp_axi_reserve_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - for (i = 0; i < stream_info->num_planes; i++) { - for (j = 0; j < axi_data->hw_info->num_wm; j++) { - if (!axi_data->free_wm[j]) { - axi_data->free_wm[j] = - stream_info->stream_handle; - axi_data->wm_image_size[j] = - msm_isp_axi_get_plane_size( - stream_info, i); - axi_data->num_used_wm++; - break; - } - } - stream_info->wm[i] = j; - } -} - -void msm_isp_axi_free_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) { - axi_data->free_wm[stream_info->wm[i]] = 0; - axi_data->num_used_wm--; - } -} - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - uint8_t comp_mask = 0; - for (i = 0; i < stream_info->num_planes; i++) - comp_mask |= 1 << stream_info->wm[i]; - - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - if (!axi_data->composite_info[i].stream_handle) { - axi_data->composite_info[i].stream_handle = - stream_info->stream_handle; - axi_data->composite_info[i]. - stream_composite_mask = comp_mask; - axi_data->num_used_composite_mask++; - break; - } - } - stream_info->comp_mask_index = i; - return; -} - -void msm_isp_axi_free_comp_mask(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - axi_data->composite_info[stream_info->comp_mask_index]. - stream_composite_mask = 0; - axi_data->composite_info[stream_info->comp_mask_index]. - stream_handle = 0; - axi_data->num_used_composite_mask--; -} - -int msm_isp_axi_get_bufq_handles( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - - if (stream_info->stream_id & ISP_SCRATCH_BUF_BIT) { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id & ~ISP_SCRATCH_BUF_BIT); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - - stream_info->bufq_scratch_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_scratch_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } else { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } - return rc; -} - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int rc = 0, i; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - enum msm_vfe_axi_state valid_state = - (stream_cfg_cmd->cmd == START_STREAM) ? INACTIVE : ACTIVE; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state != valid_state) { - if ((stream_info->state == PAUSING || - stream_info->state == PAUSED || - stream_info->state == RESUME_PENDING || - stream_info->state == RESUMING) && - (stream_cfg_cmd->cmd == STOP_STREAM || - stream_cfg_cmd->cmd == STOP_IMMEDIATELY)) { - stream_info->state = ACTIVE; - } else { - pr_err("%s: Invalid stream state: %d\n", - __func__, stream_info->state); - spin_unlock_irqrestore( - &stream_info->lock, flags); - rc = -EINVAL; - break; - } - } - spin_unlock_irqrestore(&stream_info->lock, flags); - - if (stream_cfg_cmd->cmd == START_STREAM) { - rc = msm_isp_axi_get_bufq_handles(vfe_dev, stream_info); - if (rc) - break; - } - } - return rc; -} - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - - if (stream_info->runtime_framedrop_update) { - stream_info->runtime_init_frame_drop--; - if (stream_info->runtime_init_frame_drop == 0) { - stream_info->runtime_framedrop_update = 0; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - } - } - if (stream_info->stream_type == BURST_STREAM) { - stream_info->runtime_burst_frame_count--; - if (stream_info->runtime_burst_frame_count == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - } - } - } -} - -static void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - stream_info->runtime_init_frame_drop = stream_info->init_frame_drop; - stream_info->runtime_burst_frame_count = - stream_info->burst_frame_count; - stream_info->runtime_num_burst_capture = - stream_info->num_burst_capture; - stream_info->runtime_framedrop_update = stream_info->framedrop_update; - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(vfe_dev, stream_info); -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -void msm_isp_sof_notify(struct vfe_device *vfe_dev, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data sof_event; - uint32_t session_id; - unsigned long flags; - uint16_t session_mask = 0; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - session_mask = vfe_dev->axi_data.session_frame_src_mask[session_id]; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - - if (!(session_mask & (1 << frame_src))) { - /*pr_err("%s: Ignoring the Sof for the source INTF %d\n", - __func__, (1 << frame_src));*/ - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - /*pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - session_mask, - session_id);*/ - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - session_mask)) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - sof_event.input_intf = session_mask; - sof_event.frame_id = vfe_dev->axi_data.frame_id[session_id]; - sof_event.timestamp = ts->event_time; - sof_event.mono_timestamp = ts->buf_time; - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, - ISP_EVENT_SOF + frame_src, &sof_event); - /*pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]);*/ - } -} -#else -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data event_data; - uint32_t session_id; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - if (!(vfe_dev->axi_data.session_frame_src_mask[session_id] - & (1 << frame_src))) { - pr_err("%s: Ignoring the Sof for the sourece INTF %d\n", - __func__, (1 << frame_src)); - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - vfe_dev->axi_data.session_frame_src_mask[session_id], - session_id); - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - vfe_dev->axi_data.session_frame_src_mask[session_id])) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - switch (event_type) { - case ISP_EVENT_SOF: - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - break; - default: - break; - } - event_data.input_intf = vfe_dev->axi_data.session_frame_src_mask[session_id]; - event_data.frame_id = vfe_dev->axi_data.frame_id[session_id]; - event_data.timestamp = ts->event_time; - event_data.mono_timestamp = ts->buf_time; - - //pr_err("%s: AAAAA SOF frame id = %u\n", - // __func__, vfe_dev->axi_data.frame_id[session_id]); - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); - pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]); - } -} - -#endif - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - uint32_t framedrop_period = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid stream handle",__func__); - return; - } - - framedrop_period = msm_isp_get_framedrop_period( - stream_cfg_cmd->frame_skip_pattern); - - stream_info->frame_skip_pattern = - stream_cfg_cmd->frame_skip_pattern; - if (stream_cfg_cmd->frame_skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (stream_cfg_cmd->init_frame_drop < framedrop_period) { - stream_info->framedrop_pattern <<= - stream_cfg_cmd->init_frame_drop; - stream_info->init_frame_drop = 0; - stream_info->framedrop_update = 0; - } else { - stream_info->init_frame_drop = stream_cfg_cmd->init_frame_drop; - stream_info->framedrop_update = 1; - } - - if (stream_cfg_cmd->burst_count > 0) { - stream_info->stream_type = BURST_STREAM; - stream_info->num_burst_capture = - stream_cfg_cmd->burst_count; - stream_info->burst_frame_count = - stream_cfg_cmd->init_frame_drop + - (stream_cfg_cmd->burst_count - 1) * - framedrop_period + 1; - } else { - stream_info->stream_type = CONTINUOUS_STREAM; - stream_info->burst_frame_count = 0; - stream_info->num_burst_capture = 0; - } -} - -void msm_isp_calculate_bandwidth( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src < RDI_INTF_0) { - stream_info->bandwidth = - (axi_data->src_info[VFE_PIX_0].pixel_clock / - axi_data->src_info[VFE_PIX_0].width) * - stream_info->max_width; - stream_info->bandwidth = stream_info->bandwidth * - stream_info->format_factor / ISP_Q2; - } else { - int rdi = SRC_TO_INTF(stream_info->stream_src); - stream_info->bandwidth = axi_data->src_info[rdi].pixel_clock; - } -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_start_avtimer(void) -{ - avcs_core_open(); - avcs_core_disable_power_collapse(1); -} -#else -void msm_isp_start_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - uint32_t io_format = 0, avtimer_scaler = 0; - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - rc = msm_isp_axi_create_stream( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - rc = msm_isp_validate_axi_request( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: Request validation failed\n", __func__); - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)); - return rc; - } - stream_info = &vfe_dev->axi_data. - stream_info[HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - msm_isp_axi_reserve_wm(&vfe_dev->axi_data, stream_info); - - if (stream_info->stream_src < RDI_INTF_0) { - io_format = vfe_dev->axi_data.src_info[VFE_PIX_0].input_format; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - if (stream_info->stream_src == CAMIF_RAW && - io_format != stream_info->output_format) - pr_warn("%s: Overriding input format\n", - __func__); - - io_format = stream_info->output_format; - } - rc = vfe_dev->hw_info->vfe_ops.axi_ops.cfg_io_format( - vfe_dev, stream_info->stream_src, io_format); - if (rc) { - pr_err("%s: cfg io format failed\n", __func__); - msm_isp_axi_free_wm(&vfe_dev->axi_data, - stream_info); - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX( - stream_cfg_cmd->axi_stream_handle)); - return rc; - } - } - - msm_isp_calculate_framedrop(&vfe_dev->axi_data, stream_cfg_cmd); - stream_info->vt_enable = stream_cfg_cmd->vt_enable; - axi_data->burst_len = stream_cfg_cmd->burst_len; - - if (stream_info->vt_enable) { - vfe_dev->vt_enable = stream_info->vt_enable; - msm_isp_start_avtimer(); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_ctl = - ioremap(AVTIMER_MODE_CTL_PHY_ADDR_8916, 4); - if (vfe_dev->p_avtimer_ctl) { - avtimer_scaler = - msm_camera_io_r(vfe_dev->p_avtimer_ctl); - /*If bit 2 is set, it indicates AVTimer - ticks are scaled*/ - if (avtimer_scaler & 0x00000002) - vfe_dev->avtimer_scaler = - AVTIMER_TICK_SCALER_8916; - } - } else { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR, 4); - } - } - if (stream_info->num_planes > 1) { - msm_isp_axi_reserve_comp_mask( - &vfe_dev->axi_data, stream_info); - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_comp_mask(vfe_dev, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_xbar_reg(vfe_dev, stream_info, i); - } - return rc; -} - -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_axi_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_release_cmd->stream_handle)]; - struct msm_vfe_axi_stream_cfg_cmd stream_cfg; - - if (stream_info->state == AVALIABLE) { - pr_err("%s: Stream already released\n", __func__); - return -EINVAL; - } else if (stream_info->state != INACTIVE) { - stream_cfg.cmd = STOP_STREAM; - stream_cfg.num_streams = 1; - stream_cfg.stream_handle[0] = stream_release_cmd->stream_handle; - msm_isp_cfg_axi_stream(vfe_dev, (void *) &stream_cfg); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_xbar_reg(vfe_dev, stream_info, i); - } - - if (stream_info->num_planes > 1) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_comp_mask(vfe_dev, stream_info); - msm_isp_axi_free_comp_mask(&vfe_dev->axi_data, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - } - - vfe_dev->hw_info->vfe_ops.axi_ops.clear_framedrop(vfe_dev, stream_info); - msm_isp_axi_free_wm(axi_data, stream_info); - - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX(stream_release_cmd->stream_handle)); - - return rc; -} - -static void msm_isp_axi_stream_enable_cfg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - if (stream_info->state == INACTIVE) - return; - for (i = 0; i < stream_info->num_planes; i++) { - if (stream_info->state == START_PENDING || - stream_info->state == RESUME_PENDING) - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 1); - else { - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 0); - /* Issue a reg update for Raw Snapshot Case - * since we dont have reg update ack - */ - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - } - - if (stream_info->state == START_PENDING) - axi_data->num_active_stream++; - else if (stream_info->state == STOP_PENDING) - axi_data->num_active_stream--; -} - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || - axi_data->stream_info[i].state == - STOP_PENDING) { - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == - START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || - axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == STARTING ? - ACTIVE : INACTIVE; - } - } - - if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF || - (vfe_dev->axi_data.pipeline_update == - DISABLE_CAMIF_IMMEDIATELY)) { - vfe_dev->hw_info->vfe_ops.stats_ops. - enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } - - vfe_dev->axi_data.stream_update--; - if (vfe_dev->axi_data.stream_update == 0) - complete(&vfe_dev->stream_config_complete); -} - -static void msm_isp_reload_ping_pong_offset(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - uint32_t flag; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - flag = i ? VFE_PONG_FLAG : VFE_PING_FLAG; - for (j = 0; j < stream_info->num_planes; j++) { - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[j], flag, - buf->mapped_info[j].paddr + - stream_info->plane_cfg[j].plane_addr_offset); - } - } -} - -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev) -{ - int i, j; - uint32_t update_state; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->stream_type == BURST_STREAM || - stream_info->state == AVALIABLE) - continue; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state == PAUSING) { - /*AXI Stopped, apply update*/ - stream_info->state = PAUSED; - msm_isp_reload_ping_pong_offset(vfe_dev, stream_info); - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - /*Resume AXI*/ - stream_info->state = RESUME_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - stream_info->state = RESUMING; - } else if (stream_info->state == RESUMING) { - stream_info->runtime_output_format = - stream_info->output_format; - stream_info->state = ACTIVE; - } - spin_unlock_irqrestore(&stream_info->lock, flags); - } - - update_state = atomic_dec_return(&axi_data->axi_cfg_update); -} - -static void msm_isp_cfg_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf = stream_info->buf[0]; - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - VFE_PONG_FLAG, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - stream_info->buf[1] = buf; -} - -static void msm_isp_get_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - uint32_t pingpong_bit = 0, i; - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - for (i = 0; i < stream_info->num_planes; i++) { - if (pingpong_bit != - (~(pingpong_status >> stream_info->wm[i]) & 0x1)) { - pr_warn("%s: Write master ping pong mismatch. Status: 0x%x\n", - __func__, pingpong_status); - } - } - *done_buf = stream_info->buf[pingpong_bit]; -} - -static int msm_isp_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status) -{ - int i, rc = -1; - struct msm_isp_buffer *buf = NULL; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = 0; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - if (stream_idx >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream_idx",__func__); - return rc; - } - if (stream_info->bufq_scratch_handle && !stream_info->request_frm_num) - bufq_handle = stream_info->bufq_scratch_handle; - else - bufq_handle = stream_info->bufq_handle; - - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - - if (rc < 0) { - vfe_dev->error_info.stream_framedrop_count[stream_idx]++; - return rc; - } - - if (stream_info->bufq_scratch_handle && - bufq_handle == stream_info->bufq_handle) - stream_info->request_frm_num--; - - if (buf->num_planes != stream_info->num_planes) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - pingpong_status, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -static inline void msm_isp_get_vt_tstamp(struct vfe_device *vfe_dev, - struct msm_isp_timestamp *time_stamp) -{ - uint32_t avtimer_msw_1st = 0, avtimer_lsw = 0; - uint32_t avtimer_msw_2nd = 0; - uint64_t av_timer_tick = 0; - - if (!vfe_dev->p_avtimer_msw || !vfe_dev->p_avtimer_lsw) { - pr_err("%s: ioremap failed\n", __func__); - return; - } - - do { - avtimer_msw_1st = msm_camera_io_r(vfe_dev->p_avtimer_msw); - avtimer_lsw = msm_camera_io_r(vfe_dev->p_avtimer_lsw); - avtimer_msw_2nd = msm_camera_io_r(vfe_dev->p_avtimer_msw); - } while (avtimer_msw_1st != avtimer_msw_2nd); - av_timer_tick = ((uint64_t)avtimer_msw_1st << 32) | avtimer_lsw; - do_div(av_timer_tick, vfe_dev->avtimer_scaler); - avtimer_lsw = do_div(av_timer_tick, USEC_PER_SEC); - time_stamp->vt_time.tv_sec = (uint32_t)(av_timer_tick); - time_stamp->vt_time.tv_usec = avtimer_lsw; -} - -static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, struct msm_isp_buffer *buf, - struct msm_isp_timestamp *ts) -{ - int rc; - struct msm_isp_event_data buf_event; - struct timeval *time_stamp; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - uint32_t session_id = vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)].session_id; - uint32_t frame_id = vfe_dev->axi_data.frame_id[session_id]; - uint32_t buf_src; - memset(&buf_event, 0, sizeof(buf_event)); - - if (buf && ts) { - if (vfe_dev->vt_enable) { - msm_isp_get_vt_tstamp(vfe_dev, ts); - time_stamp = &ts->vt_time; - } - else - time_stamp = &ts->buf_time; - - rc = vfe_dev->buf_mgr->ops->get_buf_src(vfe_dev->buf_mgr, - buf->bufq_handle, &buf_src); - if (stream_info->buf_divert && rc == 0 && - buf_src != MSM_ISP_BUFFER_SRC_SCRATCH) { - rc = vfe_dev->buf_mgr->ops->buf_divert(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id); - /* Buf divert return value represent whether the buf - * can be diverted. A positive return value means - * other ISP hardware is still processing the frame. - */ - if (rc == 0) { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = *time_stamp; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.handle = - stream_info->bufq_handle; - buf_event.u.buf_done.buf_idx = buf->buf_idx; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DIVERT + stream_idx, - &buf_event); - } - } else { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = ts->buf_time; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DONE, &buf_event); - vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id, - stream_info->runtime_output_format); - } - } -} - -static enum msm_isp_camif_update_state - msm_isp_get_camif_update_state(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint8_t pix_stream_cnt = 0, cur_pix_stream_cnt; - cur_pix_stream_cnt = - axi_data->src_info[VFE_PIX_0].pix_stream_count + - axi_data->src_info[VFE_PIX_0].raw_stream_count; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - pix_stream_cnt++; - } - - if (pix_stream_cnt) { - if (cur_pix_stream_cnt == 0 && pix_stream_cnt && - stream_cfg_cmd->cmd == START_STREAM) - return ENABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_STREAM) - return DISABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_IMMEDIATELY) - return DISABLE_CAMIF_IMMEDIATELY; - } - return NO_UPDATE; -} - -static void msm_isp_update_camif_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src >= RDI_INTF_0) - continue; - if (stream_info->stream_src == PIX_ENCODER || - stream_info->stream_src == PIX_VIEWFINDER || - stream_info->stream_src == IDEAL_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count--; - } else if (stream_info->stream_src == CAMIF_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count--; - } - } -} - -static void msm_isp_update_rdi_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - continue; - if (stream_info->stream_src == RDI_INTF_0) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_1) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_2) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count--; - } - - } -} - -uint8_t msm_isp_get_curr_stream_cnt( - struct vfe_device *vfe_dev) -{ - uint8_t curr_stream_cnt = 0; - curr_stream_cnt = vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count; - - return curr_stream_cnt; -} - -void msm_camera_io_dump_2(void __iomem *addr, int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - ISP_DBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - ISP_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - ISP_DBG("%s\n", line_str); -} - -/*Factor in Q2 format*/ -#define ISP_DEFAULT_FORMAT_FACTOR 6 -#define ISP_BUS_UTILIZATION_FACTOR 6 -static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) -{ - int i, rc = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; - uint32_t num_pix_streams = 0; - uint32_t num_rdi_streams = 0; - uint32_t total_streams = 0; - uint64_t total_bandwidth = 0; - uint64_t ib_total_bandwidth = 0; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state == ACTIVE || - stream_info->state == START_PENDING) { - if (stream_info->stream_src < RDI_INTF_0) { - total_pix_bandwidth += stream_info->bandwidth; - num_pix_streams++; - } else { - total_rdi_bandwidth += stream_info->bandwidth; - num_rdi_streams++; - } - } - } - if (num_pix_streams > 0) - total_pix_bandwidth = total_pix_bandwidth / - num_pix_streams * (num_pix_streams - 1) + - ((unsigned long)axi_data->src_info[VFE_PIX_0]. - pixel_clock) * ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2; - total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; - total_streams = num_pix_streams + num_rdi_streams; - if (total_streams == 1) { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2 - MSM_ISP_MIN_IB; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - (total_bandwidth - MSM_ISP_MIN_AB) , ib_total_bandwidth); - } - else { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - total_bandwidth, ib_total_bandwidth); - } - if (rc < 0) - pr_err("%s: update failed\n", __func__); - - return rc; -} - -static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state camif_update) -{ - int rc; - unsigned long flags; - spin_lock_irqsave(&vfe_dev->shared_data_lock, flags); - init_completion(&vfe_dev->stream_config_complete); - vfe_dev->axi_data.pipeline_update = camif_update; - vfe_dev->axi_data.stream_update = 2; - spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags); - rc = wait_for_completion_timeout( - &vfe_dev->stream_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_init_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - /*Set address for both PING & PONG register */ - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", - __func__); - return rc; - } - - /* For burst stream of one capture, only one buffer - * is allocated. Duplicate ping buffer address to pong - * buffer to ensure hardware write to a valid address - */ - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture <= 1) { - msm_isp_cfg_pong_address(vfe_dev, stream_info); - } else { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", - __func__); - return rc; - } - } - return rc; -} - -static void msm_isp_deinit_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < 2; i++) { - struct msm_isp_buffer *buf; - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -static void msm_isp_get_stream_wm_mask( - struct msm_vfe_axi_stream *stream_info, - uint32_t *wm_reload_mask) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) - *wm_reload_mask |= (1 << stream_info->wm[i]); -} - -static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t src_state, wait_for_complete = 0; - uint32_t wm_reload_mask = 0x0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - stream_info->frame_id = 0; - src_state = axi_data->src_info[ - SRC_TO_INTF(stream_info->stream_src)].active; - - msm_isp_calculate_bandwidth(axi_data, stream_info); - msm_isp_reset_framedrop(vfe_dev, stream_info); - msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); - rc = msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])); - return rc; - } - - stream_info->state = START_PENDING; - if (src_state) { - wait_for_complete = 1; - } else { - if (vfe_dev->dump_reg) - msm_camera_io_dump_2(vfe_dev->vfe_base, 0x900); - - /*Configure AXI start bits to start immediately*/ - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = ACTIVE; - } - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].session_id = - stream_info->session_id; - vfe_dev->axi_data. - session_frame_src_mask[stream_info->session_id] |= - (1 << SRC_TO_INTF(stream_info->stream_src)); - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].frame_id = 0; - } - msm_isp_update_stream_bandwidth(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, wm_reload_mask); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - - vfe_dev->hw_info->vfe_ops.core_ops.init_vbif_counters(vfe_dev); - - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - if (camif_update == ENABLE_CAMIF) { - vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id = 0; - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, camif_update); - } - if (vfe_dev->axi_data.src_info[VFE_RAW_0].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_0].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_1].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_1].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_2].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_2].frame_id = 0; - - if (wait_for_complete) - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - - return rc; -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - unsigned long flags; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM || - stream_cfg_cmd->num_streams == 0) - return -EINVAL; - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (cur_stream_cnt > 0) - wait_for_complete = 1; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count + vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count) >= 1) - skip_session_mask_update = 1; - else - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - } - - if (wait_for_complete) { - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } else { - pr_err("%s: Stop Immediately! stream_id=%d\n", __func__, - stream_info->stream_id); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - - if (cur_stream_cnt == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#else -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - /* We dont get reg update IRQ for raw snapshot - * so frame skip cant be ocnfigured - */ - wait_for_complete = 1; - } else if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture == 0) { - /* Configure AXI writemasters to stop immediately - * since for burst case, write masters already skip - * all frames. - */ - if (stream_info->stream_src == RDI_INTF_0 || - stream_info->stream_src == RDI_INTF_1 || - stream_info->stream_src == RDI_INTF_2) - wait_for_complete = 1; - else { - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - } - } else { - wait_for_complete = 1; - } - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count <= 1) && (vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count <= 1)) { - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - if (stream_info->stream_type == - BURST_STREAM) - skip_session_mask_update = 1; - } - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - - } - if (wait_for_complete) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#endif - - -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - enum msm_isp_camif_update_state camif_update; - - rc = msm_isp_axi_check_stream_state(vfe_dev, stream_cfg_cmd); - if (rc < 0) { - pr_err("%s: Invalid stream state\n", __func__); - return rc; - } - - if (axi_data->num_active_stream == 0) { - /*Configure UB*/ - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_ub(vfe_dev); - } - camif_update = msm_isp_get_camif_update_state(vfe_dev, stream_cfg_cmd); - - if (stream_cfg_cmd->cmd == START_STREAM) - rc = msm_isp_start_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - else - rc = msm_isp_stop_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - - if (rc < 0) - pr_err("%s: start/stop stream failed\n", __func__); - return rc; -} - -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i, j; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream_update_cmd *update_cmd = arg; - struct msm_vfe_axi_stream_cfg_update_info *update_info; - - if (update_cmd->update_type == UPDATE_STREAM_AXI_CONFIG && - atomic_read(&axi_data->axi_cfg_update)) { - pr_err("%s: AXI stream config updating\n", __func__); - return -EBUSY; - } - - /*num_stream is uint32 and update_info[] bound by MAX_NUM_STREAM*/ - if (update_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - /*check array reference bounds*/ - if (HANDLE_TO_IDX(update_info->stream_handle) - > MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - if (stream_info->state != ACTIVE && - stream_info->state != INACTIVE) { - pr_err("%s: Invalid stream state\n", __func__); - return -EINVAL; - } - if (stream_info->state == ACTIVE && - stream_info->stream_type == BURST_STREAM && - (1 != update_cmd->num_streams || - UPDATE_STREAM_FRAMEDROP_PATTERN != - update_cmd->update_type)) { - pr_err("%s: Cannot update active burst stream\n", - __func__); - return -EINVAL; - } - } - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - - switch (update_cmd->update_type) { - case ENABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 1; - break; - case DISABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 0; - vfe_dev->buf_mgr->ops->flush_buf(vfe_dev->buf_mgr, - stream_info->bufq_handle, - MSM_ISP_BUFFER_FLUSH_DIVERTED); - break; - case UPDATE_STREAM_FRAMEDROP_PATTERN: { - uint32_t framedrop_period = - msm_isp_get_framedrop_period( - update_info->skip_pattern); - stream_info->runtime_init_frame_drop = 0; - if (update_info->skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - break; - } - case UPDATE_STREAM_AXI_CONFIG: { - for (j = 0; j < stream_info->num_planes; j++) { - stream_info->plane_cfg[j] = - update_info->plane_cfg[j]; - } - stream_info->output_format = update_info->output_format; - if (stream_info->state == ACTIVE) { - stream_info->state = PAUSE_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = PAUSING; - atomic_set(&axi_data->axi_cfg_update, - UPDATE_REQUESTED); - } else { - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - stream_info->runtime_output_format = - stream_info->output_format; - } - break; - } - case UPDATE_STREAM_REQUEST_FRAMES: { - stream_info->request_frm_num += - update_info->request_frm_num; - break; - } - default: - pr_err("%s: Invalid update type\n", __func__); - return -EINVAL; - } - } - return rc; -} - -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, rc = 0; - struct msm_isp_buffer *done_buf = NULL; - uint32_t comp_mask = 0, wm_mask = 0; - uint32_t pingpong_status, stream_idx; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_composite_info *comp_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t frame_id = 0; - - comp_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_comp_mask(irq_status0, irq_status1); - wm_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(comp_mask || wm_mask)) - return; - - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - pingpong_status = - vfe_dev->hw_info->vfe_ops.axi_ops.get_pingpong_status(vfe_dev); - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - rc = 0; - comp_info = &axi_data->composite_info[i]; - if (comp_mask & (1 << i)) { - if (!comp_info->stream_handle) { - pr_err("%s: Invalid handle for composite irq\n", - __func__); - } else { - stream_idx = - HANDLE_TO_IDX(comp_info->stream_handle); - stream_info = - &axi_data->stream_info[stream_idx]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, - stream_info->frame_id); - return; - } - stream_info->frame_id = frame_id; - - if (stream_info->stream_type == BURST_STREAM) - stream_info-> - runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == - CONTINUOUS_STREAM || - stream_info-> - runtime_num_burst_capture >= 1) { - rc = msm_isp_cfg_ping_pong_address( - vfe_dev, stream_info, - pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - wm_mask &= ~(comp_info->stream_composite_mask); - } - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (wm_mask & (1 << i)) { - if (!axi_data->free_wm[i]) { - pr_err("%s: Invalid handle for wm irq\n", - __func__); - continue; - } - stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]); - stream_info = &axi_data->stream_info[stream_idx]; - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, stream_info->frame_id); - return; - } - - if (stream_info->stream_type == BURST_STREAM) - stream_info->runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == CONTINUOUS_STREAM || - stream_info->runtime_num_burst_capture > 1) { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - return; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.h deleted file mode 100644 index 8ef7583af592..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_axi_util.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_AXI_UTIL_H__ -#define __MSM_ISP_AXI_UTIL_H__ - -#include "msm_isp.h" - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx); - -int msm_isp_validate_axi_request( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_reserve_wm( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd); - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev); - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev); - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev); -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts); -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -uint8_t msm_isp_get_curr_stream_cnt(struct vfe_device *vfe_dev); -#endif -#endif /* __MSM_ISP_AXI_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.c deleted file mode 100644 index 50b1940fc34c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.c +++ /dev/null @@ -1,575 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_stats_util.h" - -static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - int rc = -1; - struct msm_isp_buffer *buf; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = stream_info->bufq_handle; - uint32_t stats_pingpong_offset; - - if (STATS_IDX(stream_info->stream_handle) >= - vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, - STATS_IDX(stream_info->stream_handle)); - return -EINVAL; - } - - stats_pingpong_offset = - vfe_dev->hw_info->stats_hw_info->stats_ping_pong_offset[ - STATS_IDX(stream_info->stream_handle)]; - - pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - if (rc < 0) { - vfe_dev->error_info.stats_framedrop_count[ - STATS_IDX(stream_info->stream_handle)]++; - return rc; - } - - if (buf->num_planes != 1) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - vfe_dev->hw_info->vfe_ops.stats_ops.update_ping_pong_addr( - vfe_dev, stream_info, - pingpong_status, buf->mapped_info[0].paddr + - stream_info->buffer_offset); - - if (stream_info->buf[pingpong_bit] && done_buf) - *done_buf = stream_info->buf[pingpong_bit]; - - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, j, rc; - struct msm_isp_event_data buf_event; - struct msm_isp_stats_event *stats_event = &buf_event.u.stats; - struct msm_isp_buffer *done_buf; - struct msm_vfe_stats_stream *stream_info = NULL; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t pingpong_status; - uint32_t comp_stats_type_mask = 0, atomic_stats_mask = 0; - uint32_t stats_comp_mask = 0, stats_irq_mask = 0; - uint32_t num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - stats_comp_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_comp_mask(irq_status0, irq_status1); - stats_irq_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(stats_comp_mask || stats_irq_mask)) - return; - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - - /* - * If any of composite mask is set, clear irq bits from mask, - * they will be restored by comp mask - */ - if (stats_comp_mask) { - for (j = 0; j < num_stats_comp_mask; j++) { - stats_irq_mask &= ~atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - } - } - - for (j = 0; j < num_stats_comp_mask; j++) { - atomic_stats_mask = atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - if (!stats_comp_mask) { - stats_irq_mask &= ~atomic_stats_mask; - } else { - /* restore irq bits from composite mask */ - if (stats_comp_mask & (1 << j)) - stats_irq_mask |= atomic_stats_mask; - } - /* if no irq bits set from this composite mask continue*/ - if (!stats_irq_mask) - continue; - memset(&buf_event, 0, sizeof(struct msm_isp_event_data)); - buf_event.timestamp = ts->event_time; - buf_event.frame_id = - vfe_dev->axi_data.frame_id[session_id]; - buf_event.input_intf = VFE_PIX_0; - pingpong_status = vfe_dev->hw_info-> - vfe_ops.stats_ops.get_pingpong_status(vfe_dev); - - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; - i++) { - if (!(stats_irq_mask & (1 << i))) - continue; - stream_info = &vfe_dev->stats_data.stream_info[i]; - done_buf = NULL; - msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status, &done_buf); - if (done_buf) { - rc = vfe_dev->buf_mgr->ops->buf_divert( - vfe_dev->buf_mgr, done_buf->bufq_handle, - done_buf->buf_idx, &ts->buf_time, - vfe_dev->axi_data. - frame_id[session_id]); - if (rc != 0) - continue; - - stats_event->stats_buf_idxs - [stream_info->stats_type] = - done_buf->buf_idx; - if (!stream_info->composite_flag) { - stats_event->stats_mask = - 1 << stream_info->stats_type; - ISP_DBG("%s: stats frameid: 0x%x %d\n", - __func__, buf_event.frame_id, - stream_info->stats_type); - msm_isp_send_event(vfe_dev, - ISP_EVENT_STATS_NOTIFY + - stream_info->stats_type, - &buf_event); - } else { - comp_stats_type_mask |= - 1 << stream_info->stats_type; - } - } - stats_irq_mask &= ~(1 << i); - } - - if (comp_stats_type_mask) { - ISP_DBG("%s: comp_stats frameid: 0x%x, 0x%x\n", - __func__, buf_event.frame_id, - comp_stats_type_mask); - stats_event->stats_mask = comp_stats_type_mask; - msm_isp_send_event(vfe_dev, - ISP_EVENT_COMP_STATS_NOTIFY, &buf_event); - comp_stats_type_mask = 0; - } - } -} - -int msm_isp_stats_create_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd) -{ - int rc = -1; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t stats_idx; - - if (!(vfe_dev->hw_info->stats_hw_info->stats_capability_mask & - (1 << stream_req_cmd->stats_type))) { - pr_err("%s: Stats type not supported\n", __func__); - return rc; - } - - stats_idx = vfe_dev->hw_info->vfe_ops.stats_ops. - get_stats_idx(stream_req_cmd->stats_type); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state != STATS_AVALIABLE) { - pr_err("%s: Stats already requested\n", __func__); - return rc; - } - - if (stream_req_cmd->framedrop_pattern >= MAX_SKIP) { - pr_err("%s: Invalid framedrop pattern\n", __func__); - return rc; - } - - if (stream_req_cmd->irq_subsample_pattern >= MAX_SKIP) { - pr_err("%s: Invalid irq subsample pattern\n", __func__); - return rc; - } - - stream_info->session_id = stream_req_cmd->session_id; - stream_info->stream_id = stream_req_cmd->stream_id; - stream_info->composite_flag = stream_req_cmd->composite_flag; - stream_info->stats_type = stream_req_cmd->stats_type; - stream_info->buffer_offset = stream_req_cmd->buffer_offset; - stream_info->framedrop_pattern = stream_req_cmd->framedrop_pattern; - stream_info->irq_subsample_pattern = - stream_req_cmd->irq_subsample_pattern; - stream_info->state = STATS_INACTIVE; - - if ((vfe_dev->stats_data.stream_handle_cnt << 8) == 0) - vfe_dev->stats_data.stream_handle_cnt++; - - stream_req_cmd->stream_handle = - (++vfe_dev->stats_data.stream_handle_cnt) << 8 | stats_idx; - - stream_info->stream_handle = stream_req_cmd->stream_handle; - return 0; -} - -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd = arg; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t framedrop_period; - uint32_t stats_idx; - - rc = msm_isp_stats_create_stream(vfe_dev, stream_req_cmd); - if (rc < 0) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - stats_idx = STATS_IDX(stream_req_cmd->stream_handle); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - - framedrop_period = msm_isp_get_framedrop_period( - stream_req_cmd->framedrop_pattern); - - if (stream_req_cmd->framedrop_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg(vfe_dev, stream_info); - return rc; -} - -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_cfg_cmd stream_cfg_cmd; - struct msm_vfe_stats_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - int stats_idx = STATS_IDX(stream_release_cmd->stream_handle); - struct msm_vfe_stats_stream *stream_info = NULL; - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state == STATS_AVALIABLE) { - pr_err("%s: stream already release\n", __func__); - return rc; - } else if (stream_info->state != STATS_INACTIVE) { - stream_cfg_cmd.enable = 0; - stream_cfg_cmd.num_streams = 1; - stream_cfg_cmd.stream_handle[0] = - stream_release_cmd->stream_handle; - rc = msm_isp_cfg_stats_stream(vfe_dev, &stream_cfg_cmd); - } - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.clear_wm_reg(vfe_dev, stream_info); - memset(stream_info, 0, sizeof(struct msm_vfe_stats_stream)); - return 0; -} - -static int msm_isp_init_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int rc = 0; - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: no buf configured for stream: 0x%x\n", - __func__, stream_info->stream_handle); - return -EINVAL; - } - - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", __func__); - return rc; - } - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", __func__); - return rc; - } - return rc; -} - -static void msm_isp_deinit_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev) -{ - int i; - uint32_t stats_mask = 0, comp_stats_mask = 0; - uint32_t enable = 0; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; i++) { - if (stats_data->stream_info[i].state == STATS_START_PENDING || - stats_data->stream_info[i].state == - STATS_STOP_PENDING) { - stats_mask |= i; - enable = stats_data->stream_info[i].state == - STATS_START_PENDING ? 1 : 0; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_START_PENDING ? - STATS_STARTING : STATS_STOPPING; - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, BIT(i), enable); - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, BIT(i), enable); - } else if (stats_data->stream_info[i].state == STATS_STARTING || - stats_data->stream_info[i].state == STATS_STOPPING) { - if (stats_data->stream_info[i].composite_flag) - comp_stats_mask |= i; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_STARTING ? STATS_ACTIVE : STATS_INACTIVE; - } - } - atomic_sub(1, &stats_data->stats_update); - if (!atomic_read(&stats_data->stats_update)) - complete(&vfe_dev->stats_config_complete); -} - -static int msm_isp_stats_wait_for_cfg_done(struct vfe_device *vfe_dev) -{ - int rc; - init_completion(&vfe_dev->stats_config_complete); - atomic_set(&vfe_dev->stats_data.stats_update, 2); - rc = wait_for_completion_timeout( - &vfe_dev->stats_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - rc = vfe_dev->hw_info->vfe_ops.stats_ops.check_streams( - stats_data->stream_info); - if (rc < 0) - return rc; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - rc = msm_isp_init_stats_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, idx); - return rc; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_START_PENDING; - else - stream_info->state = STATS_ACTIVE; - - stats_data->num_active_stream++; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - - } - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 1); - } - } - return rc; -} - -static int msm_isp_stop_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_STOP_PENDING; - else - stream_info->state = STATS_INACTIVE; - - stats_data->num_active_stream--; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 0); - } - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - msm_isp_deinit_stats_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} - -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - stats_data->stats_burst_len = stream_cfg_cmd->stats_burst_len; - - if (vfe_dev->stats_data.num_active_stream == 0) - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev); - - if (stream_cfg_cmd->enable) - rc = msm_isp_start_stats_stream(vfe_dev, stream_cfg_cmd); - else - rc = msm_isp_stop_stats_stream(vfe_dev, stream_cfg_cmd); - - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.h deleted file mode 100644 index 7b4c4b4eb0dc..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_stats_util.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_STATS_UTIL_H__ -#define __MSM_ISP_STATS_UTIL_H__ - -#include "msm_isp.h" -#define STATS_IDX(idx) (idx & 0xFF) - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev); -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg); -#endif /* __MSM_ISP_STATS_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.c deleted file mode 100644 index 459b272cb15a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.c +++ /dev/null @@ -1,1661 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include - -#include "msm.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_camera_io_util.h" - -#define MAX_ISP_V4l2_EVENTS 100 -static DEFINE_MUTEX(bandwidth_mgr_mutex); -static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr; - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MSM_MIN_REQ_VFE_CPP_BW 1700000000 - -#define VFE40_8974V2_VERSION 0x1001001A - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_BOOST -#endif - -#ifdef CAMERA_BOOST -#define MBYTE (1ULL << 20) - -#define BW_MBPS(_bw) \ -{ \ - .vectors = &(struct msm_bus_vectors){ \ - .src = 1, \ - .dst = 512, \ - .ib = (_bw) * MBYTE, \ - .ab = 0, \ - }, \ - .num_paths = 1, \ -} - -static struct msm_bus_paths bw_level_tbl[] = { - [0] = BW_MBPS(381), /* At least 50 MHz on bus. */ - [1] = BW_MBPS(4066), /* At least 533 MHz on bus. */ -}; - -static struct msm_bus_scale_pdata bus_client_pdata = { - .usecase = bw_level_tbl, - .num_usecases = ARRAY_SIZE(bw_level_tbl), - .active_only = 1, - .name = "Camera_boost", -}; - -static u32 bus_client; -#endif - -static struct msm_bus_vectors msm_isp_init_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_isp_ping_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_vectors msm_isp_pong_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_paths msm_isp_bus_client_config[] = { - { - ARRAY_SIZE(msm_isp_init_vectors), - msm_isp_init_vectors, - }, - { - ARRAY_SIZE(msm_isp_ping_vectors), - msm_isp_ping_vectors, - }, - { - ARRAY_SIZE(msm_isp_pong_vectors), - msm_isp_pong_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_isp_bus_client_pdata = { - msm_isp_bus_client_config, - ARRAY_SIZE(msm_isp_bus_client_config), - .name = "msm_camera_isp", -}; - -static void msm_isp_print_fourcc_error(const char *origin, - uint32_t fourcc_format) -{ - int i; - char text[5]; - text[4] = '\0'; - for (i = 0; i < 4; i++) { - text[i] = (char)(((fourcc_format) >> (i * 8)) & 0xFF); - if ((text[i] < '0') || (text[i] > 'z')) { - pr_err("%s: Invalid output format %d (unprintable)\n", - origin, fourcc_format); - return; - } - } - pr_err("%s: Invalid output format %s\n", - origin, text); - return; -} - -#ifdef CONFIG_COMPAT -struct msm_vfe_cfg_cmd2_32 { - uint16_t num_cfg; - uint16_t cmd_len; - compat_caddr_t cfg_data; - compat_caddr_t cfg_cmd; -}; - -#define VIDIOC_MSM_VFE_REG_CFG_COMPAT \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2_32) -#endif /* CONFIG_COMPAT */ - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client) -{ - int rc = 0; - mutex_lock(&bandwidth_mgr_mutex); - isp_bandwidth_mgr.client_info[client].active = 1; - if (isp_bandwidth_mgr.use_count++) { - mutex_unlock(&bandwidth_mgr_mutex); - return rc; - } - isp_bandwidth_mgr.bus_client = - msm_bus_scale_register_client(&msm_isp_bus_client_pdata); - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s: client register failed\n", __func__); - mutex_unlock(&bandwidth_mgr_mutex); - return -EINVAL; - } - - isp_bandwidth_mgr.bus_vector_active_idx = 1; - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - -#ifdef CAMERA_BOOST - if (!bus_client) { - bus_client = msm_bus_scale_register_client(&bus_client_pdata); - msm_bus_scale_client_update_request(bus_client, 1); - } -#endif - - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib) -{ - int i; - struct msm_bus_paths *path; - mutex_lock(&bandwidth_mgr_mutex); - if (!isp_bandwidth_mgr.use_count || - !isp_bandwidth_mgr.bus_client) { - pr_err("%s:error bandwidth manager inactive use_cnt:%d bus_clnt:%d\n", - __func__, isp_bandwidth_mgr.use_count, - isp_bandwidth_mgr.bus_client); - return -EINVAL; - } - - isp_bandwidth_mgr.client_info[client].ab = ab; - isp_bandwidth_mgr.client_info[client].ib = ib; - ALT_VECTOR_IDX(isp_bandwidth_mgr.bus_vector_active_idx); - path = - &(msm_isp_bus_client_pdata.usecase[ - isp_bandwidth_mgr.bus_vector_active_idx]); - path->vectors[0].ab = MSM_ISP_MIN_AB; - path->vectors[0].ib = MSM_ISP_MIN_IB; - for (i = 0; i < MAX_ISP_CLIENT; i++) { - if (isp_bandwidth_mgr.client_info[i].active) { - path->vectors[0].ab += - isp_bandwidth_mgr.client_info[i].ab; - path->vectors[0].ib += - isp_bandwidth_mgr.client_info[i].ib; - } - } - /* All the clients combined i.e. VFE + CPP should use at least - minimum recommended bandwidth */ - if (path->vectors[0].ib < MSM_MIN_REQ_VFE_CPP_BW) - path->vectors[0].ib = MSM_MIN_REQ_VFE_CPP_BW; - msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client) -{ - mutex_lock(&bandwidth_mgr_mutex); - memset(&isp_bandwidth_mgr.client_info[client], 0, - sizeof(struct msm_isp_bandwidth_info)); - if (--isp_bandwidth_mgr.use_count) { - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s:%d error: bus client invalid\n", __func__, __LINE__); - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, 0); - msm_bus_scale_unregister_client(isp_bandwidth_mgr.bus_client); - -#ifdef CAMERA_BOOST - msm_bus_scale_client_update_request(bus_client, 0); - msm_bus_scale_unregister_client(bus_client); - bus_client = 0; -#endif - - isp_bandwidth_mgr.bus_client = 0; - mutex_unlock(&bandwidth_mgr_mutex); -} - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern) -{ - switch (frame_skip_pattern) { - case NO_SKIP: - case EVERY_2FRAME: - case EVERY_3FRAME: - case EVERY_4FRAME: - case EVERY_5FRAME: - case EVERY_6FRAME: - case EVERY_7FRAME: - case EVERY_8FRAME: - return frame_skip_pattern + 1; - case EVERY_16FRAME: - return 16; - break; - case EVERY_32FRAME: - return 32; - break; - case SKIP_ALL: - return 1; - default: - return 1; - } - return 1; -} - -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info) -{ - uint32_t count; - int i, rc; - uint32_t rates[VFE_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - ISP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > VFE_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - VFE_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(vfe_clk_info[i].clk_name)); - ISP_DBG("clock-names[%d] = %s\n", i, vfe_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - vfe_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - ISP_DBG("clk_rate[%d] = %ld\n", i, vfe_clk_info[i].clk_rate); - } - vfe_dev->num_clk = count; - return 0; -} - -static inline void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp) -{ - struct timespec ts; - ktime_get_ts(&ts); - time_stamp->buf_time.tv_sec = ts.tv_sec; - time_stamp->buf_time.tv_usec = ts.tv_nsec/1000; - do_gettimeofday(&(time_stamp->event_time)); -} - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - rc = v4l2_event_subscribe(fh, sub, MAX_ISP_V4l2_EVENTS, NULL); - if (rc == 0) { - if (sub->type == V4L2_EVENT_ALL) { - int i; - - vfe_dev->axi_data.event_mask = 0; - for (i = 0; i < ISP_EVENT_MAX; i++) - vfe_dev->axi_data.event_mask |= (1 << i); - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask |= (1 << event_idx); - } - } - return rc; -} - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - - rc = v4l2_event_unsubscribe(fh, sub); - if (sub->type == V4L2_EVENT_ALL) { - vfe_dev->axi_data.event_mask = 0; - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask &= ~(1 << event_idx); - } - return rc; -} - -static int msm_isp_get_max_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int clk_idx = 0; - unsigned long max_value = ~0; - long round_rate = 0; - - if (!vfe_dev || !rate) { - pr_err("%s:%d failed: vfe_dev %pK rate %pK\n", __func__, __LINE__, - vfe_dev, rate); - return -EINVAL; - } - - *rate = 0; - if (!vfe_dev->hw_info) { - pr_err("%s:%d failed: vfe_dev->hw_info %pK\n", __func__, - __LINE__, vfe_dev->hw_info); - return -EINVAL; - } - - clk_idx = vfe_dev->hw_info->vfe_clk_idx; - if (clk_idx >= vfe_dev->num_clk) { - pr_err("%s:%d failed: clk_idx %d max array size %d\n", - __func__, __LINE__, clk_idx, - vfe_dev->num_clk); - return -EINVAL; - } - - round_rate = clk_round_rate(vfe_dev->vfe_clk[clk_idx], max_value); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return -EINVAL; - } - - *rate = round_rate; - return 0; -} - -static int msm_isp_set_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int rc = 0; - int clk_idx = vfe_dev->hw_info->vfe_clk_idx; - long round_rate = - clk_round_rate(vfe_dev->vfe_clk[clk_idx], *rate); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return round_rate; - } - - rc = clk_set_rate(vfe_dev->vfe_clk[clk_idx], round_rate); - if (rc < 0) { - pr_err("%s: Vfe set rate error\n", __func__); - return rc; - } - *rate = round_rate; - return 0; -} - -int msm_isp_cfg_pix(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - pr_err("%s: pixel path is active\n", __func__); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux = - input_cfg->d.pix_cfg.input_mux; - vfe_dev->axi_data.src_info[VFE_PIX_0].width = - input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; - - rc = msm_isp_set_clk_rate(vfe_dev, - &vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock); - if (rc < 0) { - pr_err("%s: clock set rate failed\n", __func__); - return rc; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = - input_cfg->d.pix_cfg.input_format; - - vfe_dev->hw_info->vfe_ops.core_ops.cfg_camif( - vfe_dev, &input_cfg->d.pix_cfg); - return rc; -} - -int msm_isp_cfg_rdi(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[input_cfg->input_src].active) { - pr_err("%s: RAW%d path is active\n", __func__, - input_cfg->input_src - VFE_RAW_0); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[input_cfg->input_src].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->hw_info->vfe_ops.core_ops.cfg_rdi_reg( - vfe_dev, &input_cfg->d.rdi_cfg, input_cfg->input_src); - return rc; -} - -int msm_isp_cfg_input(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_input_cfg *input_cfg = arg; - - switch (input_cfg->input_src) { - case VFE_PIX_0: - rc = msm_isp_cfg_pix(vfe_dev, input_cfg); - break; - case VFE_RAW_0: - case VFE_RAW_1: - case VFE_RAW_2: - rc = msm_isp_cfg_rdi(vfe_dev, input_cfg); - break; - default: - pr_err("%s: Invalid input source\n", __func__); - rc = -EINVAL; - } - return rc; -} - -static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - - /* use real time mutex for hard real-time ioctls such as - * buffer operations and register updates. - * Use core mutex for other ioctls that could take - * longer time to complete such as start/stop ISP streams - * which blocks until the hardware start/stop streaming - */ - ISP_DBG("%s cmd: %d\n", __func__, _IOC_TYPE(cmd)); - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_VFE_REG_LIST_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd_list(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_BUF: - case VIDIOC_MSM_ISP_ENQUEUE_BUF: - case VIDIOC_MSM_ISP_RELEASE_BUF: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_buf_cmd(vfe_dev->buf_mgr, cmd, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_INPUT_CFG: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_input(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_REG_UPDATE_CMD: - if (arg) { - enum msm_vfe_input_src frame_src = *((enum msm_vfe_input_src *)arg); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << frame_src)); - } - break; - case VIDIOC_MSM_ISP_SET_SRC_STATE: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_set_src_state(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_REQUEST_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_UPDATE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_update_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case MSM_SD_SHUTDOWN: - while (vfe_dev->vfe_open_cnt != 0) - msm_isp_close_node(sd, NULL); - break; - - default: - pr_err_ratelimited("%s: Invalid ISP command\n", __func__); - rc = -EINVAL; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_isp_ioctl_compat(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - void __user *up; - if (is_compat_task()) { - up = compat_ptr((unsigned long)arg); - arg = up; - } - - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG_COMPAT: { - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - struct msm_vfe_cfg_cmd2 proc_cmd; - struct msm_vfe_cfg_cmd2_32 *proc_cmd_ptr32; - mutex_lock(&vfe_dev->realtime_mutex); - proc_cmd_ptr32 = (struct msm_vfe_cfg_cmd2_32 *) - compat_ptr((unsigned long)arg); - proc_cmd.num_cfg = proc_cmd_ptr32->num_cfg; - proc_cmd.cmd_len = proc_cmd_ptr32->cmd_len; - proc_cmd.cfg_data = compat_ptr(proc_cmd_ptr32->cfg_data); - proc_cmd.cfg_cmd = compat_ptr(proc_cmd_ptr32->cfg_cmd); - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - default: - return msm_isp_ioctl_unlocked(sd, cmd, arg); - } - - return rc; -} - -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_compat(sd, cmd, arg); -} -#else /* CONFIG_COMPAT */ -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_unlocked(sd, cmd, arg); -} -#endif /* CONFIG_COMPAT */ - -static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd, - uint32_t *cfg_data, uint32_t cmd_len) -{ - if (!vfe_dev || !reg_cfg_cmd) { - pr_err("%s:%d failed: vfe_dev %pK reg_cfg_cmd %pK\n", __func__, - __LINE__, vfe_dev, reg_cfg_cmd); - return -EINVAL; - } - if ((reg_cfg_cmd->cmd_type != VFE_CFG_MASK) && - (!cfg_data || !cmd_len)) { - pr_err("%s:%d failed: cmd type %d cfg_data %pK cmd_len %d\n", - __func__, __LINE__, reg_cfg_cmd->cmd_type, cfg_data, - cmd_len); - return -EINVAL; - } - - /* Validate input parameters */ - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: - case VFE_READ: - case VFE_WRITE_MB: { - if ((reg_cfg_cmd->u.rw_info.reg_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.reg_offset + - reg_cfg_cmd->u.rw_info.len) > - resource_size(vfe_dev->vfe_mem))) { - pr_err("%s:%d reg_offset %d len %d res %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.reg_offset, - reg_cfg_cmd->u.rw_info.len, - (uint32_t)resource_size(vfe_dev->vfe_mem)); - return -EINVAL; - } - - if ((reg_cfg_cmd->u.rw_info.cmd_data_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.cmd_data_offset + - reg_cfg_cmd->u.rw_info.len) > cmd_len)) { - pr_err("%s:%d cmd_data_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.cmd_data_offset, - reg_cfg_cmd->u.rw_info.len, cmd_len); - return -EINVAL; - } - break; - } - - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT || - reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - if ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset <= - reg_cfg_cmd->u.dmi_info.lo_tbl_offset) || - (reg_cfg_cmd->u.dmi_info.hi_tbl_offset - - reg_cfg_cmd->u.dmi_info.lo_tbl_offset != - (sizeof(uint32_t)))) { - pr_err("%s:%d hi %d lo %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset); - return -EINVAL; - } - if (reg_cfg_cmd->u.dmi_info.len <= sizeof(uint32_t)) { - pr_err("%s:%d len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.len); - return -EINVAL; - } - if (((UINT_MAX - - reg_cfg_cmd->u.dmi_info.hi_tbl_offset) < - (reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t))) || - ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset + - reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t)) > cmd_len)) { - pr_err("%s:%d hi_tbl_offset %d len %d cmd %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - } - if ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset > - (UINT_MAX - reg_cfg_cmd->u.dmi_info.len)) || - ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset + - reg_cfg_cmd->u.dmi_info.len) > cmd_len)) { - pr_err("%s:%d lo_tbl_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.lo_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - break; - } - - default: - break; - } - - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: { - msm_camera_io_memcpy(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_WRITE_MB: { - msm_camera_io_memcpy_mb(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_CFG_MASK: { - uint32_t temp; - if ((UINT_MAX - sizeof(temp) < - reg_cfg_cmd->u.mask_info.reg_offset) || - (resource_size(vfe_dev->vfe_mem) < - reg_cfg_cmd->u.mask_info.reg_offset + - sizeof(temp))) { - pr_err("%s: VFE_CFG_MASK: Invalid length\n", __func__); - return -EINVAL; - } - temp = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - - temp &= ~reg_cfg_cmd->u.mask_info.mask; - temp |= reg_cfg_cmd->u.mask_info.val; - msm_camera_io_w(temp, vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - break; - } - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = *lo_tbl_ptr++; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_16BIT) { - lo_val1 = lo_val & 0x0000FFFF; - lo_val = (lo_val & 0xFFFF0000)>>16; - msm_camera_io_w(lo_val1, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } else if (reg_cfg_cmd->cmd_type == - VFE_WRITE_DMI_64BIT) { - lo_tbl_ptr++; - hi_val = *hi_tbl_ptr; - hi_tbl_ptr = hi_tbl_ptr + 2; - msm_camera_io_w(hi_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - } - msm_camera_io_w(lo_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } - break; - } - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_16BIT) { - lo_val1 = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - lo_val |= lo_val1 << 16; - } - *lo_tbl_ptr++ = lo_val; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - *hi_tbl_ptr = hi_val; - hi_tbl_ptr += 2; - lo_tbl_ptr++; - } - } - break; - } - case VFE_HW_UPDATE_LOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t update_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id; - if (vfe_dev->axi_data.frame_id[session_id] != *cfg_data - || update_id == *cfg_data) { - pr_err("hw update lock failed,acquire id %u\n", - *cfg_data); - pr_err("hw update lock failed,current id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - pr_err("hw update lock failed,last id %u\n", - update_id); - return -EINVAL; - } - break; - } - case VFE_HW_UPDATE_UNLOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - if (vfe_dev->axi_data.frame_id[session_id] - != *cfg_data) { - pr_err("hw update across frame boundary,begin id %u\n", - *cfg_data); - pr_err("hw update across frame boundary,end id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - } - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id = - vfe_dev->axi_data.frame_id[session_id]; - break; - } - case VFE_READ: { - int i; - uint32_t *data_ptr = cfg_data + - reg_cfg_cmd->u.rw_info.cmd_data_offset/4; - for (i = 0; i < reg_cfg_cmd->u.rw_info.len/4; i++) { - if ((data_ptr < cfg_data) || - (UINT_MAX / sizeof(*data_ptr) < - (data_ptr - cfg_data)) || - (sizeof(*data_ptr) * (data_ptr - cfg_data) >= - cmd_len)) - return -EINVAL; - *data_ptr++ = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset); - reg_cfg_cmd->u.rw_info.reg_offset += 4; - } - break; - } - case GET_MAX_CLK_RATE: { - int rc = 0; - - if (cmd_len < sizeof(unsigned long)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(unsigned long)); - return -EINVAL; - } - rc = msm_isp_get_max_clk_rate(vfe_dev, - (unsigned long *)cfg_data); - if (rc < 0) { - pr_err("%s:%d failed: rc %d\n", __func__, __LINE__, rc); - return -EINVAL; - } - break; - } - case GET_ISP_ID: { - uint32_t *isp_id = NULL; - - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %u\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - - isp_id = (uint32_t *)cfg_data; - *isp_id = vfe_dev->pdev->id; - break; - } - case SET_WM_UB_SIZE: { - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - vfe_dev->vfe_ub_size = *cfg_data; - break; - } - } - return 0; -} - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_cfg_cmd2 *proc_cmd = arg; - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd; - uint32_t *cfg_data = NULL; - - if (!proc_cmd->num_cfg) { - pr_err("%s: Passed num_cfg as 0\n", __func__); - return -EINVAL; - } - - reg_cfg_cmd = kzalloc(sizeof(struct msm_vfe_reg_cfg_cmd)* - proc_cmd->num_cfg, GFP_KERNEL); - if (!reg_cfg_cmd) { - pr_err("%s: reg_cfg alloc failed\n", __func__); - rc = -ENOMEM; - goto reg_cfg_failed; - } - - if (copy_from_user(reg_cfg_cmd, - (void __user *)(proc_cmd->cfg_cmd), - sizeof(struct msm_vfe_reg_cfg_cmd) * proc_cmd->num_cfg)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - - if (proc_cmd->cmd_len > 0) { - cfg_data = kzalloc(proc_cmd->cmd_len, GFP_KERNEL); - if (!cfg_data) { - pr_err("%s: cfg_data alloc failed\n", __func__); - rc = -ENOMEM; - goto cfg_data_failed; - } - - if (copy_from_user(cfg_data, - (void __user *)(proc_cmd->cfg_data), - proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - } - - //pr_err("%s: platform_id=%u, kernel_id=%u\n", __func__,proc_cmd->frame_id, vfe_dev->frame_id); - if( (vfe_dev->frame_id == proc_cmd->frame_id && vfe_dev->eof_event_occur != 1) - || proc_cmd->frame_id == 0) { - for (i = 0; i < proc_cmd->num_cfg; i++) - msm_isp_send_hw_cmd(vfe_dev, ®_cfg_cmd[i], cfg_data, proc_cmd->cmd_len); - } else{ - rc = MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR; - pr_err("%s: skip hw update, platform_id=%u, kernel_id=%u, eof_event_occur=%u\n", - __func__,proc_cmd->frame_id, vfe_dev->frame_id, vfe_dev->eof_event_occur); - } - - if (copy_to_user(proc_cmd->cfg_data, - cfg_data, proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - -copy_cmd_failed: - kfree(cfg_data); -cfg_data_failed: - kfree(reg_cfg_cmd); -reg_cfg_failed: - return rc; -} - -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_cfg_cmd_list *proc_cmd = - (struct msm_vfe_cfg_cmd_list *)arg; - struct msm_vfe_cfg_cmd_list cmd, cmd_next; - - if (!vfe_dev || !arg) { - pr_err("%s:%d failed: vfe_dev %pK arg %pK", __func__, __LINE__, - vfe_dev, arg); - return -EINVAL; - } - - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd->cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = *proc_cmd; - - while (cmd.next) { - if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list)) { - pr_err("%s:%d failed: next size %u != expected %zu\n", - __func__, __LINE__, cmd.next_size, - sizeof(struct msm_vfe_cfg_cmd_list)); - break; - } - if (copy_from_user(&cmd_next, (void __user *)cmd.next, - sizeof(struct msm_vfe_cfg_cmd_list))) { - rc = -EFAULT; - continue; - } - - rc = msm_isp_proc_cmd(vfe_dev, &cmd_next.cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = cmd_next; - } - return rc; -} - -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t event_type, - struct msm_isp_event_data *event_data) -{ - struct v4l2_event isp_event; - memset(&isp_event, 0, sizeof(struct v4l2_event)); - isp_event.id = 0; - isp_event.type = event_type; - memcpy(&isp_event.u.data[0], event_data, - sizeof(struct msm_isp_event_data)); - v4l2_event_queue(vfe_dev->subdev.sd.devnode, &isp_event); - return 0; -} - -#define CAL_WORD(width, M, N) ((width * M + N - 1) / N) - -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line) -{ - int val = -1; - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - val = CAL_WORD(pixel_per_line, 5, 32); - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - val = CAL_WORD(pixel_per_line, 3, 16); - break; - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - val = CAL_WORD(pixel_per_line, 1, 6); - break; - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - val = CAL_WORD(pixel_per_line, 1, 5); - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - val = CAL_WORD(pixel_per_line, 2, 8); - break; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return val; -} - -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - return MIPI; - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - return QCOM; - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return -EINVAL; -} - -int msm_isp_get_bit_per_pixel(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_Y4: - return 4; - case V4L2_PIX_FMT_Y6: - return 6; - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_YVU410: - case V4L2_PIX_FMT_YVU420: - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YYUV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_YUV422P: - case V4L2_PIX_FMT_YUV411P: - case V4L2_PIX_FMT_Y41P: - case V4L2_PIX_FMT_YUV444: - case V4L2_PIX_FMT_YUV555: - case V4L2_PIX_FMT_YUV565: - case V4L2_PIX_FMT_YUV32: - case V4L2_PIX_FMT_YUV410: - case V4L2_PIX_FMT_YUV420: - case V4L2_PIX_FMT_GREY: - case V4L2_PIX_FMT_PAL8: - case V4L2_PIX_FMT_UV8: - case MSM_V4L2_PIX_FMT_META: - return 8; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_Y10: - case V4L2_PIX_FMT_Y10BPACK: - return 10; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_Y12: - return 12; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - case V4L2_PIX_FMT_Y16: - return 16; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); -#if defined(CONFIG_SR200PC20) - return 8; -#else - return -EINVAL; -#endif - } -} - -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev) -{ - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - error_info->info_dump_frame_count++; - if (error_info->info_dump_frame_count == 0) - error_info->info_dump_frame_count++; -} - -void msm_isp_process_error_info(struct vfe_device *vfe_dev) -{ - int i; - uint8_t num_stats_type = - vfe_dev->hw_info->stats_hw_info->num_stats_type; - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - static DEFINE_RATELIMIT_STATE(rs, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - static DEFINE_RATELIMIT_STATE(rs_stats, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - - if (error_info->error_count == 1 || - !(error_info->info_dump_frame_count % 100)) { - vfe_dev->hw_info->vfe_ops.core_ops. - process_error_status(vfe_dev); - error_info->error_mask0 = 0; - error_info->error_mask1 = 0; - error_info->camif_status = 0; - error_info->violation_status = 0; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (error_info->stream_framedrop_count[i] != 0 && - __ratelimit(&rs)) { - pr_err("%s: Stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stream_framedrop_count[i]); - error_info->stream_framedrop_count[i] = 0; - } - } - for (i = 0; i < num_stats_type; i++) { - if (error_info->stats_framedrop_count[i] != 0 && - __ratelimit(&rs_stats)) { - pr_err("%s: Stats stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stats_framedrop_count[i]); - error_info->stats_framedrop_count[i] = 0; - } - } - } -} - -static inline void msm_isp_update_error_info(struct vfe_device *vfe_dev, - uint32_t error_mask0, uint32_t error_mask1) -{ - vfe_dev->error_info.error_mask0 |= error_mask0; - vfe_dev->error_info.error_mask1 |= error_mask1; - vfe_dev->error_info.error_count++; -} - -static inline void msm_isp_process_overflow_irq( - struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - uint32_t overflow_mask; - uint32_t halt_restart_mask0, halt_restart_mask1; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - uint8_t cur_stream_cnt = 0; -#endif - /*Mask out all other irqs if recovery is started*/ - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - *irq_status0 &= halt_restart_mask0; - *irq_status1 &= halt_restart_mask1; - return; - } - - /*Check if any overflow bit is set*/ - vfe_dev->hw_info->vfe_ops.core_ops. - get_overflow_mask(&overflow_mask); - overflow_mask &= *irq_status1; - if (overflow_mask) { -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - /* When immediate stop is issued during streamoff and - AXI bridge is halted, if write masters are still - active, then it's possible to get overflow Irq - because WM is still writing pixels into UB, but UB - has no way to write into bus. Since everything is - being stopped anyway, skip the overflow recovery */ - return; - } -#endif - pr_err("%s: Bus overflow detected: 0x%x\n", - __func__, overflow_mask); - atomic_set(&vfe_dev->error_info.overflow_state, - OVERFLOW_DETECTED); - pr_err("%s: Start bus overflow recovery\n", __func__); - /*Store current IRQ mask*/ - vfe_dev->hw_info->vfe_ops.core_ops.get_irq_mask(vfe_dev, - &vfe_dev->error_info.overflow_recover_irq_mask0, - &vfe_dev->error_info.overflow_recover_irq_mask1); - /*Stop CAMIF Immediately*/ - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - /*Halt the hardware & Clear all other IRQ mask*/ - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, HALT_REQUESTED); - *irq_status0 = 0; - *irq_status1 = 0; - } -} - -static inline void msm_isp_reset_burst_count( - struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_stream_request_cmd framedrop_info; - memset(&framedrop_info, 0, sizeof(struct msm_vfe_axi_stream_request_cmd)); - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - if (stream_info->stream_type == BURST_STREAM && - stream_info->num_burst_capture != 0) { - framedrop_info.axi_stream_handle = i; - framedrop_info.burst_count = - stream_info->num_burst_capture; - framedrop_info.frame_skip_pattern = - stream_info->frame_skip_pattern; - framedrop_info.init_frame_drop = 0; - msm_isp_calculate_framedrop(&vfe_dev->axi_data, - &framedrop_info); - } - } -} - -static void msm_isp_process_overflow_recovery( - struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - uint32_t halt_restart_mask0, halt_restart_mask1; - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - irq_status0 &= halt_restart_mask0; - irq_status1 &= halt_restart_mask1; - if (irq_status0 == 0 && irq_status1 == 0) - return; - - switch (atomic_read(&vfe_dev->error_info.overflow_state)) { - case HALT_REQUESTED: { - pr_err("%s: Halt done, Restart Pending\n", __func__); - /*Reset the hardware*/ - vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_SOFT, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, - RESTART_REQUESTED); - } - break; - case RESTART_REQUESTED: { - pr_err("%s: Restart done, Resuming\n", __func__); - /*Reset the burst stream frame drop pattern, in the - *case where bus overflow happens during the burstshot, - *the framedrop pattern might be updated after reg update - *to skip all the frames after the burst shot. The burst shot - *might not be completed due to the overflow, so the framedrop - *pattern need to change back to the original settings in order - *to recovr from overflow. - */ - msm_isp_reset_burst_count(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0xFFFFFFFF); - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - break; - case NO_OVERFLOW: - case OVERFLOW_DETECTED: - default: - break; - } -} - -irqreturn_t msm_isp_process_irq(int irq_num, void *data) -{ - unsigned long flags; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - uint32_t irq_status0, irq_status1; - uint32_t error_mask0, error_mask1; - - vfe_dev->hw_info->vfe_ops.irq_ops. - read_irq_status(vfe_dev, &irq_status0, &irq_status1); - if ((irq_status0 == 0) && (irq_status1 == 0)) { - pr_err_ratelimited("%s: irq_status0 & 1 are both 0\n", - __func__); - return IRQ_HANDLED; - } - msm_isp_process_overflow_irq(vfe_dev, - &irq_status0, &irq_status1); - vfe_dev->hw_info->vfe_ops.core_ops. - get_error_mask(&error_mask0, &error_mask1); - error_mask0 &= irq_status0; - error_mask1 &= irq_status1; - irq_status0 &= ~error_mask0; - irq_status1 &= ~error_mask1; - if (!vfe_dev->ignore_error && - ((error_mask0 != 0) || (error_mask1 != 0))) - msm_isp_update_error_info(vfe_dev, error_mask0, error_mask1); - - if ((irq_status0 == 0) && (irq_status1 == 0) && - (!(((error_mask0 != 0) || (error_mask1 != 0)) && - vfe_dev->error_info.error_count == 1))) { - ISP_DBG("%s: irq status 0 and 1 = 0, also error irq hadnled!\n", - __func__); - return IRQ_HANDLED; - } - - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = &vfe_dev->tasklet_queue_cmd[vfe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err_ratelimited("%s: Tasklet queue overflow: %d\n", - __func__, vfe_dev->pdev->id); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vfe_dev->irq_cnt); - } - queue_cmd->vfeInterruptStatus0 = irq_status0; - queue_cmd->vfeInterruptStatus1 = irq_status1; - msm_isp_get_timestamp(&queue_cmd->ts); - queue_cmd->cmd_used = 1; - vfe_dev->taskletq_idx = - (vfe_dev->taskletq_idx + 1) % MSM_VFE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vfe_dev->tasklet_q); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - tasklet_schedule(&vfe_dev->vfe_tasklet); - return IRQ_HANDLED; -} - -void msm_isp_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - struct msm_vfe_irq_ops *irq_ops = &vfe_dev->hw_info->vfe_ops.irq_ops; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct msm_isp_timestamp ts; - uint32_t irq_status0, irq_status1; - while (atomic_read(&vfe_dev->irq_cnt)) { - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vfe_dev->tasklet_q, - struct msm_vfe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vfe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vfe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status0 = queue_cmd->vfeInterruptStatus0; - irq_status1 = queue_cmd->vfeInterruptStatus1; - ts = queue_cmd->ts; - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - pr_err_ratelimited("There is Overflow, kicking up recovery !!!!"); - msm_isp_process_overflow_recovery(vfe_dev, - irq_status0, irq_status1); - continue; - } - ISP_DBG("%s: status0: 0x%x status1: 0x%x\n", - __func__, irq_status0, irq_status1); - irq_ops->process_reset_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_halt_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_camif_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_axi_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_stats_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_reg_update(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_epoch_irq(vfe_dev, - irq_status0, irq_status1, &ts); - msm_isp_process_error_info(vfe_dev); - } -} - -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg) -{ - struct msm_vfe_axi_src_state *src_state = arg; - if (src_state->input_src >= VFE_SRC_MAX) - return -EINVAL; - vfe_dev->axi_data.src_info[src_state->input_src].active = - src_state->src_active; - return 0; -} - -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - long rc; - ISP_DBG("%s\n", __func__); - - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (vfe_dev->vfe_open_cnt++) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) { - pr_err("%s: init hardware failed\n", __func__); - vfe_dev->vfe_open_cnt--; - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EBUSY; - } - - rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_HARD, 1); - if (rc <= 0) { - pr_err("%s: reset timeout\n", __func__); - vfe_dev->vfe_open_cnt--; - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - vfe_dev->vfe_hw_version = msm_camera_io_r(vfe_dev->vfe_base); - ISP_DBG("%s: HW Version: 0x%x\n", __func__, vfe_dev->vfe_hw_version); - - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - - vfe_dev->buf_mgr->ops->buf_mgr_init(vfe_dev->buf_mgr, "msm_isp", 28); - - memset(&vfe_dev->axi_data, 0, sizeof(struct msm_vfe_axi_shared_data)); - memset(&vfe_dev->stats_data, 0, - sizeof(struct msm_vfe_stats_shared_data)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - vfe_dev->axi_data.hw_info = vfe_dev->hw_info->axi_hw_info; - vfe_dev->taskletq_idx = 0; - vfe_dev->vt_enable = 0; - vfe_dev->p_avtimer_lsw = NULL; - vfe_dev->p_avtimer_msw = NULL; - vfe_dev->p_avtimer_ctl = NULL; - vfe_dev->avtimer_scaler = 1; /*No scaling*/ - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_end_avtimer(void) -{ - avcs_core_disable_power_collapse(0); -} -#else -void msm_isp_end_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - long rc; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - ISP_DBG("%s\n", __func__); - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (!vfe_dev->vfe_open_cnt) { - pr_err("%s invalid state open cnt %d\n", __func__, - vfe_dev->vfe_open_cnt); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - - if (--vfe_dev->vfe_open_cnt) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - if (rc <= 0) - pr_err("%s: halt timeout rc=%ld\n", __func__, rc); - - vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr); - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - if (vfe_dev->vt_enable) { - iounmap(vfe_dev->p_avtimer_lsw); - iounmap(vfe_dev->p_avtimer_msw); - iounmap(vfe_dev->p_avtimer_ctl); - msm_isp_end_avtimer(); - vfe_dev->vt_enable = 0; - vfe_dev->avtimer_scaler = 1; - } - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.h b/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.h deleted file mode 100644 index da1a968d8be6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/isp/msm_isp_util.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_UTIL_H__ -#define __MSM_ISP_UTIL_H__ - -#include "msm_isp.h" -#include "../include/soc/qcom/camera2.h" - -/* #define CONFIG_MSM_ISP_DBG 1 */ - -#ifdef CONFIG_MSM_ISP_DBG -#define ISP_DBG(fmt, args...) printk(fmt, ##args) -#else -#define ISP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define ALT_VECTOR_IDX(x) {x = 3 - x; } -struct msm_isp_bandwidth_info { - uint32_t active; - uint64_t ab; - uint64_t ib; -}; - -enum msm_isp_hw_client { - ISP_VFE0, - ISP_VFE1, - ISP_CPP, - MAX_ISP_CLIENT, -}; - -struct msm_isp_bandwidth_mgr { - uint32_t bus_client; - uint32_t bus_vector_active_idx; - uint32_t use_count; - struct msm_isp_bandwidth_info client_info[MAX_ISP_CLIENT]; -}; - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern); - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client); -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib); -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client); - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg); -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t type, struct msm_isp_event_data *event_data); -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line); -int msm_isp_get_bit_per_pixel(uint32_t output_format); -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format); -irqreturn_t msm_isp_process_irq(int irq_num, void *data); -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg); -void msm_isp_do_tasklet(unsigned long data); -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev); -void msm_isp_process_error_info(struct vfe_device *vfe_dev); -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -long msm_isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg); -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg); -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info); - -#endif /* __MSM_ISP_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/ispif/Makefile b/drivers/media/platform/msm/camera_v2_j5/ispif/Makefile deleted file mode 100644 index 640aefc8c653..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/ispif/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_ispif.o diff --git a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.c b/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.c deleted file mode 100644 index a277c8209c9b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.c +++ /dev/null @@ -1,1368 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_isp.h" - -#include "msm_ispif.h" -#include "msm.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" - -#ifdef CONFIG_MSM_ISPIF_V1 -#include "msm_ispif_hwreg_v1.h" -#else -#include "msm_ispif_hwreg_v2.h" -#endif - -#define V4L2_IDENT_ISPIF 50001 -#define MSM_ISPIF_DRV_NAME "msm_ispif" - -#define ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY 0x00 -#define ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY 0x01 -#define ISPIF_INTF_CMD_DISABLE_IMMEDIATELY 0x02 - -#define ISPIF_TIMEOUT_SLEEP_US 1000 -#define ISPIF_TIMEOUT_ALL_US 1000000 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static void msm_ispif_io_dump_reg(struct ispif_device *ispif) -{ - if (!ispif->enb_dump_reg) - return; - msm_camera_io_dump(ispif->base, 0x250); -} - - -static inline int msm_ispif_is_intf_valid(uint32_t csid_version, - enum msm_ispif_vfe_intf intf_type) -{ - return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) || - (intf_type >= VFE_MAX)) ? false : true; -} - -static struct msm_cam_clk_info ispif_8626_reset_clk_info[] = { - {"ispif_ahb_clk", NO_SET_RATE}, - {"camss_top_ahb_clk", NO_SET_RATE}, - {"csi0_ahb_clk", NO_SET_RATE}, - {"csi0_src_clk", NO_SET_RATE}, - {"csi0_phy_clk", NO_SET_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_ahb_clk", NO_SET_RATE}, - {"csi1_src_clk", NO_SET_RATE}, - {"csi1_phy_clk", NO_SET_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"camss_vfe_vfe_clk", NO_SET_RATE}, - {"camss_csi_vfe_clk", NO_SET_RATE}, -}; - -static struct msm_cam_clk_info ispif_8974_ahb_clk_info[ISPIF_CLK_INFO_MAX]; - -static struct msm_cam_clk_info ispif_8974_reset_clk_info[] = { - {"csi0_src_clk", INIT_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_src_clk", INIT_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"csi2_src_clk", INIT_RATE}, - {"csi2_clk", NO_SET_RATE}, - {"csi2_pix_clk", NO_SET_RATE}, - {"csi2_rdi_clk", NO_SET_RATE}, - {"csi3_src_clk", INIT_RATE}, - {"csi3_clk", NO_SET_RATE}, - {"csi3_pix_clk", NO_SET_RATE}, - {"csi3_rdi_clk", NO_SET_RATE}, - {"vfe0_clk_src", INIT_RATE}, - {"camss_vfe_vfe0_clk", NO_SET_RATE}, - {"camss_csi_vfe0_clk", NO_SET_RATE}, - {"vfe1_clk_src", INIT_RATE}, - {"camss_vfe_vfe1_clk", NO_SET_RATE}, - {"camss_csi_vfe1_clk", NO_SET_RATE}, -}; - -static int msm_ispif_reset_hw(struct ispif_device *ispif) -{ - int rc = 0; - long timeout = 0; - struct clk *reset_clk[ARRAY_SIZE(ispif_8974_reset_clk_info)]; - struct clk *reset_clk1[ARRAY_SIZE(ispif_8626_reset_clk_info)]; - ispif->clk_idx = 0; - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 1); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } else { - /* This is set when device is 8x26 */ - ispif->clk_idx = 2; - } - } else { - /* This is set when device is 8974 */ - ispif->clk_idx = 1; - } - - init_completion(&ispif->reset_complete[VFE0]); - if (ispif->hw_num_isps > 1) - init_completion(&ispif->reset_complete[VFE1]); - - /* initiate reset of ISPIF */ - msm_camera_io_w(ISPIF_RST_CMD_MASK, - ispif->base + ISPIF_RST_CMD_ADDR); - if (ispif->hw_num_isps > 1) - msm_camera_io_w(ISPIF_RST_CMD_1_MASK, - ispif->base + ISPIF_RST_CMD_1_ADDR); - - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE0], msecs_to_jiffies(500)); - CDBG("%s: VFE0 done\n", __func__); - - if (timeout <= 0) { - pr_err("%s: VFE0 reset wait timeout\n", __func__); - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) - pr_err("%s: VFE0 reset wait timeout\n", - __func__); - } - return -ETIMEDOUT; - } - - if (ispif->hw_num_isps > 1) { - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE1], - msecs_to_jiffies(500)); - CDBG("%s: VFE1 done\n", __func__); - if (timeout <= 0) { - pr_err("%s: VFE1 reset wait timeout\n", __func__); - msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - return -ETIMEDOUT; - } - } - - if (ispif->clk_idx == 1) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - if (ispif->clk_idx == 2) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - return rc; -} - -int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[ISPIF_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CDBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - count = ISPIF_AHB_CLK_INFO; - if (count > ISPIF_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - ISPIF_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(ispif_8974_ahb_clk_info[i].clk_name)); - CDBG("clock-names[%d] = %s\n", - i, ispif_8974_ahb_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - ispif_8974_ahb_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - CDBG("clk_rate[%d] = %ld\n", i, - ispif_8974_ahb_clk_info[i].clk_rate); - } - ispif_dev->num_clk = count; - return 0; -} - -static int msm_ispif_clk_ahb_enable(struct ispif_device *ispif, int enable) -{ - int rc = 0; - - if (ispif->csid_version < CSID_VERSION_V30) { - /* Older ISPIF versiond don't need ahb clokc */ - return 0; - } - - rc = msm_ispif_get_ahb_clk_info(ispif, ispif->pdev); - if (rc < 0) { - pr_err("%s: msm_isp_get_clk_info() failed", __func__); - return -EFAULT; - } - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_ahb_clk_info, ispif->ahb_clk, - ispif->num_clk, enable); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } - - return rc; -} - -static int msm_ispif_reset(struct ispif_device *ispif) -{ - int rc = 0; - int i; - - BUG_ON(!ispif); - - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - for (i = 0; i < ispif->vfe_info.num_vfe; i++) { - - msm_camera_io_w(1 << PIX0_LINE_BUF_EN_BIT, - ispif->base + ISPIF_VFE_m_CTRL_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_1(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_2(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(i)); - - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_INPUT_SEL(i)); - - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(i)); - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(i)); - pr_debug("%s: base %lx", __func__, (unsigned long)ispif->base); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 2)); - - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 1)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static int msm_ispif_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_ISPIF; - chip->revision = 0; - return 0; -} - -static void msm_ispif_sel_csid_core(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_INPUT_SEL(vfe_intf)); - switch (intftype) { - case PIX0: - data &= ~(BIT(1) | BIT(0)); - data |= csid; - break; - case RDI0: - data &= ~(BIT(5) | BIT(4)); - data |= (csid << 4); - break; - case PIX1: - data &= ~(BIT(9) | BIT(8)); - data |= (csid << 8); - break; - case RDI1: - data &= ~(BIT(13) | BIT(12)); - data |= (csid << 12); - break; - case RDI2: - data &= ~(BIT(21) | BIT(20)); - data |= (csid << 20); - break; - } - - msm_camera_io_w_mb(data, ispif->base + - ISPIF_VFE_m_INPUT_SEL(vfe_intf)); -} - -static void msm_ispif_enable_crop(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf, uint16_t start_pixel, - uint16_t end_pixel) -{ - uint32_t data; - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - data |= (1 << (intftype + 7)); - if (intftype == PIX0) - data |= 1 << PIX0_LINE_BUF_EN_BIT; - msm_camera_io_w(data, - ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - - if (intftype == PIX0) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 0)); - else if (intftype == PIX1) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 1)); - else { - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } -} - -static void msm_ispif_enable_intf_cids(struct ispif_device *ispif, - uint8_t intftype, uint16_t cid_mask, uint8_t vfe_intf, uint8_t enable) -{ - uint32_t intf_addr, data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - switch (intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } - - data = msm_camera_io_r(ispif->base + intf_addr); - if (enable) - data |= cid_mask; - else - data &= ~cid_mask; - msm_camera_io_w_mb(data, ispif->base + intf_addr); -} - -static int msm_ispif_validate_intf_status(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf) -{ - int rc = 0; - uint32_t data = 0; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0)); - break; - case RDI0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0)); - break; - case PIX1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI2: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2)); - break; - } - if ((data & 0xf) != 0xf) - rc = -EBUSY; - return rc; -} - -static void msm_ispif_select_clk_mux(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data = 0; - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf << (vfe_intf * 8)); - data |= (csid << (vfe_intf * 8)); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI0: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (vfe_intf * 12)); - data |= (csid << (vfe_intf * 12)); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case PIX1: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf0 << (vfe_intf * 8)); - data |= (csid << (4 + (vfe_intf * 8))); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI1: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (4 + (vfe_intf * 12))); - data |= (csid << (4 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case RDI2: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (8 + (vfe_intf * 12))); - data |= (csid << (8 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - } - CDBG("%s intftype %d data %x\n", __func__, intftype, data); - mb(); - return; -} - -static uint16_t msm_ispif_get_cids_mask_from_cfg( - struct msm_ispif_params_entry *entry) -{ - int i; - uint16_t cids_mask = 0; - - BUG_ON(!entry); - - for (i = 0; i < entry->num_cids; i++) - cids_mask |= (1 << entry->cids[i]); - - return cids_mask; -} - -static int msm_ispif_config(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0, i = 0; - uint16_t cid_mask; - enum msm_ispif_intftype intftype; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, - vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - msm_camera_io_w_mb(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - } - - for (i = 0; i < params->num; i++) { - intftype = params->entries[i].intftype; - - vfe_intf = params->entries[i].vfe_intf; - - CDBG("%s intftype %x, vfe_intf %d, csid %d\n", __func__, - intftype, vfe_intf, params->entries[i].csid); - - if ((intftype >= INTF_MAX) || - (vfe_intf >= ispif->vfe_info.num_vfe) || - (ispif->csid_version <= CSID_VERSION_V22 && - (vfe_intf > VFE0))) { - pr_err("%s: VFEID %d and CSID version %d mismatch\n", - __func__, vfe_intf, ispif->csid_version); - return -EINVAL; - } - - if (ispif->csid_version >= CSID_VERSION_V30) - msm_ispif_select_clk_mux(ispif, intftype, - params->entries[i].csid, vfe_intf); - - rc = msm_ispif_validate_intf_status(ispif, intftype, vfe_intf); - if (rc) { - pr_err("%s:validate_intf_status failed, rc = %d\n", - __func__, rc); - return rc; - } - - msm_ispif_sel_csid_core(ispif, intftype, - params->entries[i].csid, vfe_intf); - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, intftype, - cid_mask, vfe_intf, 1); - if (params->entries[i].crop_enable) - msm_ispif_enable_crop(ispif, intftype, vfe_intf, - params->entries[i].crop_start_pixel, - params->entries[i].crop_end_pixel); - } - - for (vfe_intf = 0; vfe_intf < 2; vfe_intf++) { - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(vfe_intf)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static void msm_ispif_intf_cmd(struct ispif_device *ispif, uint32_t cmd_bits, - struct msm_ispif_param_data *params) -{ - uint8_t vc; - int i, k; - enum msm_ispif_intftype intf_type; - enum msm_ispif_cid cid; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - if (params->entries[i].num_cids > MAX_CID_CH) { - pr_err("%s: out of range of cid_num %d\n", - __func__, params->entries[i].num_cids); - return; - } - } - - for (i = 0; i < params->num; i++) { - intf_type = params->entries[i].intftype; - vfe_intf = params->entries[i].vfe_intf; - for (k = 0; k < params->entries[i].num_cids; k++) { - cid = params->entries[i].cids[k]; - vc = cid / 4; - if (intf_type == RDI2) { - /* zero out two bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 &= - ~(0x3 << (vc * 2 + 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 |= - (cmd_bits << (vc * 2 + 8)); - } else { - /* zero 2 bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd &= - ~(0x3 << (vc * 2 + intf_type * 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd |= - (cmd_bits << (vc * 2 + intf_type * 8)); - } - } - - /* cmd for PIX0, PIX1, RDI0, RDI1 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(vfe_intf)); - - /* cmd for RDI2 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd1 != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd1, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(vfe_intf)); - } -} - -static int msm_ispif_stop_immediately(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_DISABLE_IMMEDIATELY, params); - - /* after stop the interface we need to unmask the CID enable bits */ - for (i = 0; i < params->num; i++) { - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, params->entries[i].vfe_intf, 0); - } - - return rc; -} - -static int msm_ispif_start_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0; - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY, params); - - return rc; -} - -static int msm_ispif_stop_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - uint32_t intf_addr; - enum msm_ispif_vfe_intf vfe_intf; - uint32_t stop_flag = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - if (!msm_ispif_is_intf_valid(ispif->csid_version, - params->entries[i].vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - rc = -EINVAL; - goto end; - } - } - - msm_ispif_intf_cmd(ispif, - ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY, params); - - for (i = 0; i < params->num; i++) { - cid_mask = - msm_ispif_get_cids_mask_from_cfg(¶ms->entries[i]); - vfe_intf = params->entries[i].vfe_intf; - - switch (params->entries[i].intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, - params->entries[i].intftype); - rc = -EPERM; - goto end; - } - - rc = readl_poll_timeout(ispif->base + intf_addr, stop_flag, - (stop_flag & 0xF) == 0xF, - ISPIF_TIMEOUT_SLEEP_US, - ISPIF_TIMEOUT_ALL_US); - if (rc < 0) - goto end; - - /* disable CIDs in CID_MASK register */ - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, vfe_intf, 0); - } - -end: - return rc; -} - -static void ispif_process_irq(struct ispif_device *ispif, - struct ispif_irq_status *out, enum msm_ispif_vfe_intf vfe_id) -{ - BUG_ON(!ispif); - BUG_ON(!out); - - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_PIX_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[PIX0]++; - } - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_RDI0_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI0]++; - } - if (out[vfe_id].ispifIrqStatus1 & - ISPIF_IRQ_STATUS_RDI1_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI1]++; - } - if (out[vfe_id].ispifIrqStatus2 & - ISPIF_IRQ_STATUS_RDI2_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI2]++; - } -} - -static inline void msm_ispif_read_irq_status(struct ispif_irq_status *out, - void *data) -{ - struct ispif_device *ispif = (struct ispif_device *)data; - - BUG_ON(!ispif); - BUG_ON(!out); - - out[VFE0].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE0)); - - out[VFE0].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE0)); - - out[VFE0].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE0)); - msm_camera_io_w_mb(out[VFE0].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE0)); - - if (ispif->vfe_info.num_vfe > 1) { - out[VFE1].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE1)); - - out[VFE1].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE1)); - - out[VFE1].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE1)); - msm_camera_io_w_mb(out[VFE1].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE1)); - } - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - if (out[VFE0].ispifIrqStatus0 & ISPIF_IRQ_STATUS_MASK) { - if (out[VFE0].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE0]); - - if (out[VFE0].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 pix0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi1 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE0); - } - if (ispif->hw_num_isps > 1) { - if (out[VFE1].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE1]); - - if (out[VFE1].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 pix0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi1 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE1); - } -} - -static irqreturn_t msm_io_ispif_irq(int irq_num, void *data) -{ - struct ispif_irq_status irq[VFE_MAX]; - - msm_ispif_read_irq_status(irq, data); - return IRQ_HANDLED; -} - -static int msm_ispif_set_vfe_info(struct ispif_device *ispif, - struct msm_ispif_vfe_info *vfe_info) -{ - memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info)); - - return 0; -} - -static int msm_ispif_init(struct ispif_device *ispif, - uint32_t csid_version) -{ - int rc = 0; - - BUG_ON(!ispif); - - if (ispif->ispif_state == ISPIF_POWER_UP) { - pr_err("%s: ispif already initted state = %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - /* can we set to zero? */ - ispif->applied_intf_cmd[VFE0].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE0].intf_cmd1 = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd1 = 0xFFFFFFFF; - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - - ispif->csid_version = csid_version; - - if (ispif->csid_version >= CSID_VERSION_V30) { - if (!ispif->clk_mux_mem || !ispif->clk_mux_io) { - pr_err("%s csi clk mux mem %pK io %pK\n", __func__, - ispif->clk_mux_mem, ispif->clk_mux_io); - rc = -ENOMEM; - return rc; - } - ispif->clk_mux_base = ioremap(ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem)); - if (!ispif->clk_mux_base) { - pr_err("%s: clk_mux_mem ioremap failed\n", __func__); - rc = -ENOMEM; - return rc; - } - } - - ispif->base = ioremap(ispif->mem->start, - resource_size(ispif->mem)); - if (!ispif->base) { - rc = -ENOMEM; - pr_err("%s: nomem\n", __func__); - goto end; - } - rc = request_irq(ispif->irq->start, msm_io_ispif_irq, - IRQF_TRIGGER_RISING, "ispif", ispif); - if (rc) { - pr_err("%s: request_irq error = %d\n", __func__, rc); - goto error_irq; - } - - rc = msm_ispif_clk_ahb_enable(ispif, 1); - if (rc) { - pr_err("%s: ahb_clk enable failed", __func__); - goto error_ahb; - } - - msm_ispif_reset_hw(ispif); - - rc = msm_ispif_reset(ispif); - if (rc == 0) { - ispif->ispif_state = ISPIF_POWER_UP; - CDBG("%s: power up done\n", __func__); - goto end; - } - -error_ahb: - free_irq(ispif->irq->start, ispif); -error_irq: - iounmap(ispif->base); - -end: - return rc; -} - -static void msm_ispif_release(struct ispif_device *ispif) -{ - BUG_ON(!ispif); - - if (!ispif->base) { - pr_err("%s: ispif base is NULL\n", __func__); - return; - } - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - return; - } - - /* make sure no streaming going on */ - msm_ispif_reset(ispif); - - msm_ispif_clk_ahb_enable(ispif, 0); - - free_irq(ispif->irq->start, ispif); - - iounmap(ispif->base); - - iounmap(ispif->clk_mux_base); - - ispif->ispif_state = ISPIF_POWER_DOWN; -} - -static long msm_ispif_cmd(struct v4l2_subdev *sd, void *arg) -{ - long rc = 0; - struct ispif_cfg_data *pcdata = (struct ispif_cfg_data *)arg; - struct ispif_device *ispif = - (struct ispif_device *)v4l2_get_subdevdata(sd); - - BUG_ON(!sd); - BUG_ON(!pcdata); - - mutex_lock(&ispif->mutex); - switch (pcdata->cfg_type) { - case ISPIF_ENABLE_REG_DUMP: - ispif->enb_dump_reg = pcdata->reg_dump; /* save dump config */ - break; - case ISPIF_INIT: - rc = msm_ispif_init(ispif, pcdata->csid_version); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_CFG: - rc = msm_ispif_config(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_START_FRAME_BOUNDARY: - rc = msm_ispif_start_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_FRAME_BOUNDARY: - rc = msm_ispif_stop_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_IMMEDIATELY: - rc = msm_ispif_stop_immediately(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_RELEASE: - msm_ispif_release(ispif); - break; - case ISPIF_SET_VFE_INFO: - rc = msm_ispif_set_vfe_info(ispif, &pcdata->vfe_info); - break; - default: - pr_err("%s: invalid cfg_type\n", __func__); - rc = -EINVAL; - break; - } - mutex_unlock(&ispif->mutex); - return rc; -} -static struct v4l2_file_operations msm_ispif_v4l2_subdev_fops; - -static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ -#ifdef CONFIG_COMPAT - void __user *up; - if (is_compat_task()) { - up = (void __user *)compat_ptr((unsigned long)arg); - arg = up; - } -#endif - - switch (cmd) { - case VIDIOC_MSM_ISPIF_CFG: - return msm_ispif_cmd(sd, arg); - case MSM_SD_SHUTDOWN: { - struct ispif_device *ispif = - (struct ispif_device *)v4l2_get_subdevdata(sd); - if (ispif && ispif->base) - msm_ispif_release(ispif); - return 0; - } - default: - pr_err_ratelimited("%s: invalid cmd 0x%x received\n", - __func__, cmd); - return -ENOIOCTLCMD; - } -} - -static long msm_ispif_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - return msm_ispif_subdev_ioctl(sd, cmd, arg); -} - -static long msm_ispif_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_ispif_subdev_do_ioctl); -} - -static int ispif_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - mutex_lock(&ispif->mutex); - /* mem remap is done in init when the clock is on */ - ispif->open_cnt++; - mutex_unlock(&ispif->mutex); - return 0; -} - -static int ispif_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - if (!ispif) { - pr_err("%s: invalid input\n", __func__); - return -EINVAL; - } - - mutex_lock(&ispif->mutex); - if (ispif->open_cnt == 0) { - pr_err("%s: Invalid close\n", __func__); - rc = -ENODEV; - goto end; - } - ispif->open_cnt--; - if (ispif->open_cnt == 0) - msm_ispif_release(ispif); -end: - mutex_unlock(&ispif->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ispif_subdev_core_ops = { - .g_chip_ident = &msm_ispif_subdev_g_chip_ident, - .ioctl = &msm_ispif_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_ispif_subdev_ops = { - .core = &msm_ispif_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_ispif_internal_ops = { - .open = ispif_open_node, - .close = ispif_close_node, -}; - -static int ispif_probe(struct platform_device *pdev) -{ - int rc; - struct ispif_device *ispif; - - ispif = kzalloc(sizeof(struct ispif_device), GFP_KERNEL); - if (!ispif) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,num-isps", &ispif->hw_num_isps); - if (rc) - /* backward compatibility */ - ispif->hw_num_isps = 1; - /* not an error condition */ - rc = 0; - } - - mutex_init(&ispif->mutex); - ispif->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "ispif"); - if (!ispif->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "ispif"); - if (!ispif->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->io = request_mem_region(ispif->mem->start, - resource_size(ispif->mem), pdev->name); - if (!ispif->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto error; - } - ispif->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csi_clk_mux"); - if (ispif->clk_mux_mem) { - ispif->clk_mux_io = request_mem_region( - ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem), - ispif->clk_mux_mem->name); - if (!ispif->clk_mux_io) - pr_err("%s: no valid csi_mux region\n", __func__); - } - - v4l2_subdev_init(&ispif->msm_sd.sd, &msm_ispif_subdev_ops); - ispif->msm_sd.sd.internal_ops = &msm_ispif_internal_ops; - ispif->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - - snprintf(ispif->msm_sd.sd.name, - ARRAY_SIZE(ispif->msm_sd.sd.name), MSM_ISPIF_DRV_NAME); - v4l2_set_subdevdata(&ispif->msm_sd.sd, ispif); - - platform_set_drvdata(pdev, &ispif->msm_sd.sd); - - media_entity_init(&ispif->msm_sd.sd.entity, 0, NULL, 0); - ispif->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ispif->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ISPIF; - ispif->msm_sd.sd.entity.name = pdev->name; - ispif->msm_sd.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x1; - rc = msm_sd_register(&ispif->msm_sd); - if (rc) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto error; - } - msm_ispif_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_ispif_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_ispif_v4l2_subdev_fops.unlocked_ioctl = msm_ispif_subdev_fops_ioctl; - msm_ispif_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_ispif_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; -#ifdef CONFIG_COMPAT - msm_ispif_v4l2_subdev_fops.compat_ioctl32 = msm_ispif_subdev_fops_ioctl; -#endif - - ispif->pdev = pdev; - ispif->ispif_state = ISPIF_POWER_DOWN; - ispif->open_cnt = 0; - return 0; - -error: - mutex_destroy(&ispif->mutex); - kfree(ispif); - return rc; -} - -static const struct of_device_id msm_ispif_dt_match[] = { - {.compatible = "qcom,ispif"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ispif_dt_match); - -static struct platform_driver ispif_driver = { - .probe = ispif_probe, - .driver = { - .name = MSM_ISPIF_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_ispif_dt_match, - }, -}; - -static int __init msm_ispif_init_module(void) -{ - return platform_driver_register(&ispif_driver); -} - -static void __exit msm_ispif_exit_module(void) -{ - platform_driver_unregister(&ispif_driver); -} - -module_init(msm_ispif_init_module); -module_exit(msm_ispif_exit_module); -MODULE_DESCRIPTION("MSM ISP Interface driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.h b/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.h deleted file mode 100755 index 180b0ce5a445..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_ISPIF_H -#define MSM_ISPIF_H - -#include -#include -#include -#include "../include/media/msmb_ispif.h" -#include "msm_sd.h" - -#define ISPIF_CLK_INFO_MAX 16 -#define ISPIF_AHB_CLK_INFO 2 - -struct ispif_irq_status { - uint32_t ispifIrqStatus0; - uint32_t ispifIrqStatus1; - uint32_t ispifIrqStatus2; -}; - -enum msm_ispif_state_t { - ISPIF_POWER_UP, - ISPIF_POWER_DOWN, -}; -struct ispif_sof_count { - uint32_t sof_cnt[INTF_MAX]; -}; - -struct ispif_intf_cmd { - uint32_t intf_cmd; - uint32_t intf_cmd1; -}; - -struct ispif_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint8_t start_ack_pending; - uint32_t csid_version; - int enb_dump_reg; - uint32_t open_cnt; - struct ispif_sof_count sof_count[VFE_MAX]; - struct ispif_intf_cmd applied_intf_cmd[VFE_MAX]; - enum msm_ispif_state_t ispif_state; - struct msm_ispif_vfe_info vfe_info; - struct clk *ahb_clk[ISPIF_CLK_INFO_MAX]; - struct completion reset_complete[VFE_MAX]; - uint32_t hw_num_isps; - uint32_t num_clk; - uint32_t clk_idx; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v1.h b/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v1.h deleted file mode 100644 index 91af7cb2c4fb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v1.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V1_H__ -#define __MSM_ISPIF_HWREG_V1_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x0000 -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x0124 -#define PIX0_LINE_BUF_EN_BIT 0 - -#define ISPIF_VFE(m) (0x0) - -#define ISPIF_VFE_m_CTRL_0(m) (0x0008 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x0100 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x010C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x0118 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x0108 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x0114 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x0120 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x0104 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x0110 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x011C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x000C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x0004 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x0030 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x0010 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x0014 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x20) : 0) \ - + 8*(n)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x0290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x001C + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x0020 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x0024 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x0028 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x34) : 0) \ - + 8*(n)) - -/* Defines for compatibility with newer ISPIF versions */ -#define ISPIF_RST_CMD_1_ADDR (0x0000) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x0000 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x0000 + ISPIF_VFE(m)) - - - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define RDI_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define AHB_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define PIX_1_CLK_DOMAIN_RST BIT(26) -#define RDI_2_CLK_DOMAIN_RST BIT(25) -#define RDI_2_MISR_RST_STB BIT(20) -#define RDI_2_VFE_RST_STB BIT(19) -#define RDI_2_CSID_RST_STB BIT(18) -#define RDI_1_MISR_RST_STB BIT(14) -#define RDI_1_VFE_RST_STB BIT(13) -#define RDI_1_CSID_RST_STB BIT(12) -#define PIX_1_VFE_RST_STB BIT(10) -#define PIX_1_CSID_RST_STB BIT(9) -#define RDI_0_MISR_RST_STB BIT(8) -#define RDI_0_VFE_RST_STB BIT(7) -#define RDI_0_CSID_RST_STB BIT(6) -#define PIX_0_MISR_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE1C77FF -#define ISPIF_RST_CMD_1_MASK 0xFFFFFFFF /* undefined */ - -/* irq_mask_0 */ -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RESET_DONE_IRQ BIT(27) -/* irq_mask_1 */ -#define PIX_INTF_1_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -/* irq_mask_2 */ -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x000249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x000249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x000001 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA -#endif /* __MSM_ISPIF_HWREG_V1_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v2.h b/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v2.h deleted file mode 100644 index 3cc21a7dce6d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/ispif/msm_ispif_hwreg_v2.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V2_H__ -#define __MSM_ISPIF_HWREG_V2_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x008 -#define ISPIF_RST_CMD_1_ADDR 0x00C -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x01C -#define PIX0_LINE_BUF_EN_BIT 6 - -#define ISPIF_VFE(m) ((m) * 0x200) - -#define ISPIF_VFE_m_CTRL_0(m) (0x200 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x208 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x20C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x210 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x21C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x220 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x224 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x230 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x234 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x238 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x244 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x248 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x24C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x254 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x264 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x278 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x288 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x28C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x298 + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x29C + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x2C0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x2D0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x2E4 + ISPIF_VFE(m)) - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define PIX_1_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define RDI_2_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define RDI_CLK_DOMAIN_RST BIT(26) -#define AHB_CLK_DOMAIN_RST BIT(25) -#define RDI_2_VFE_RST_STB BIT(12) -#define RDI_2_CSID_RST_STB BIT(11) -#define RDI_1_VFE_RST_STB BIT(10) -#define RDI_1_CSID_RST_STB BIT(9) -#define RDI_0_VFE_RST_STB BIT(8) -#define RDI_0_CSID_RST_STB BIT(7) -#define PIX_1_VFE_RST_STB BIT(6) -#define PIX_1_CSID_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE0F1FFF -#define ISPIF_RST_CMD_1_MASK 0xFC0F1FF9 - -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) -#define RESET_DONE_IRQ BIT(27) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x1 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA - -#endif /* __MSM_ISPIF_HWREG_V2_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/Makefile b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/Makefile deleted file mode 100644 index d5902d87a6a7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) - -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/jpeg_10 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io - -obj-$(CONFIG_MSMB_JPEG) += msm_jpeg_dev.o msm_jpeg_sync.o msm_jpeg_core.o msm_jpeg_hw.o msm_jpeg_platform.o diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_common.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_common.h deleted file mode 100644 index 634becafc575..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_common.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_COMMON_H -#define MSM_JPEG_COMMON_H - -#ifdef MSM_JPEG_DEBUG -#define JPEG_DBG(fmt, args...) pr_info(fmt, ##args) -#else -#define JPEG_DBG(fmt, args...) do { } while (0) -#endif - -#define JPEG_PR_ERR pr_err -#define JPEG_DBG_HIGH pr_debug - -enum JPEG_MODE { - JPEG_MODE_DISABLE, - JPEG_MODE_OFFLINE, - JPEG_MODE_REALTIME, - JPEG_MODE_REALTIME_ROTATION -}; - -enum JPEG_ROTATION { - JPEG_ROTATION_0, - JPEG_ROTATION_90, - JPEG_ROTATION_180, - JPEG_ROTATION_270 -}; - -#endif /* MSM_JPEG_COMMON_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.c b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.c deleted file mode 100644 index 52011346fb80..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.c +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (c) 2012-2013,The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size) { - unsigned long flags; - int rc = 0; - int tm = 500; /*500ms*/ - JPEG_DBG("%s:%d] reset", __func__, __LINE__); - memset(&pgmn_dev->fe_pingpong_buf, 0, - sizeof(pgmn_dev->fe_pingpong_buf)); - pgmn_dev->fe_pingpong_buf.is_fe = 1; - memset(&pgmn_dev->we_pingpong_buf, 0, - sizeof(pgmn_dev->we_pingpong_buf)); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - msm_jpeg_hw_reset(base, size); - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - rc = wait_event_interruptible_timeout( - pgmn_dev->reset_wait, - pgmn_dev->reset_done_ack, - msecs_to_jiffies(tm)); - - if (!pgmn_dev->reset_done_ack) { - JPEG_DBG("%s: reset ACK failed %d", __func__, rc); - return -EBUSY; - } - - JPEG_DBG("%s: reset_done_ack rc %d", __func__, rc); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - pgmn_dev->state = MSM_JPEG_RESET; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - - return 0; -} - -void msm_jpeg_core_release(struct msm_jpeg_device *pgmn_dev, - int domain_num) { - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf_status[i] && - pgmn_dev->release_buf) - msm_jpeg_platform_p2v(pgmn_dev, - pgmn_dev->we_pingpong_buf.buf[i].file, - &pgmn_dev->we_pingpong_buf.buf[i].handle, - domain_num); - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } -} - -void msm_jpeg_core_init(struct msm_jpeg_device *pgmn_dev) -{ - init_waitqueue_head(&pgmn_dev->reset_wait); - spin_lock_init(&pgmn_dev->reset_lock); -} - -int msm_jpeg_core_fe_start(struct msm_jpeg_device *pgmn_dev) -{ - msm_jpeg_hw_fe_start(pgmn_dev->base); - return 0; -} - -/* fetch engine */ -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) -{ - if (0 == buf->cbcr_len) - buf->cbcr_buffer_addr = 0x0; - JPEG_DBG("%s:%d] 0x%08x %d 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, buf->y_len, - (int) buf->cbcr_buffer_addr, buf->cbcr_len); - return msm_jpeg_hw_pingpong_update(&pgmn_dev->fe_pingpong_buf, buf, - pgmn_dev->base); -} - -void *msm_jpeg_core_fe_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->fe_pingpong_buf); -} - -/* write engine */ -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) { - JPEG_DBG("%s:%d] 0x%08x 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, (int) buf->cbcr_buffer_addr, - buf->y_len); - pgmn_dev->we_pingpong_buf.buf[0] = *buf; - pgmn_dev->we_pingpong_buf.buf_status[0] = 1; - msm_jpeg_hw_we_buffer_update( - &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); - - return 0; -} - -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf) -{ - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf[i].y_buffer_addr - == buf->y_buffer_addr) - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } - return 0; -} - -void *msm_jpeg_core_we_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->we_pingpong_buf); -} - -void *msm_jpeg_core_framedone_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - struct msm_jpeg_hw_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - buf_p = msm_jpeg_hw_pingpong_active_buffer( - &pgmn_dev->we_pingpong_buf); - if (buf_p && !pgmn_dev->decode_flag) { - buf_p->framedone_len = - msm_jpeg_hw_encode_output_size(pgmn_dev->base); - JPEG_DBG("%s:%d] framedone_len %d\n", __func__, __LINE__, - buf_p->framedone_len); - } - - return buf_p; -} - -void *msm_jpeg_core_reset_ack_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - /* @todo return the status back to msm_jpeg_core_reset */ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return NULL; -} - -void *msm_jpeg_core_err_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_PR_ERR("%s: Error %x\n", __func__, jpeg_irq_status); - return NULL; -} - -static int (*msm_jpeg_irq_handler) (int, void *, void *); - -void msm_jpeg_core_return_buffers(struct msm_jpeg_device *pgmn_dev, - int jpeg_irq_status) -{ - void *data = NULL; - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - pgmn_dev, data); - data = msm_jpeg_core_we_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_WE, - pgmn_dev, data); -} - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context) -{ - void *data = NULL; - unsigned long flags; - int jpeg_irq_status; - struct msm_jpeg_device *pgmn_dev = (struct msm_jpeg_device *)context; - - JPEG_DBG("%s:%d] irq_num = %d\n", __func__, __LINE__, irq_num); - - jpeg_irq_status = msm_jpeg_hw_irq_get_status(pgmn_dev->base); - - JPEG_DBG("%s:%d] jpeg_irq_status = %0x\n", __func__, __LINE__, - jpeg_irq_status); - - /*For reset and framedone IRQs, clear all bits*/ - if (pgmn_dev->state == MSM_JPEG_IDLE) { - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else if (jpeg_irq_status & 0x10000000) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - } else if (jpeg_irq_status & 0x1) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - } else { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - jpeg_irq_status, pgmn_dev->base); - } - - if (msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status)) { - /* send fe ping pong irq */ - JPEG_DBG_HIGH("%s:%d] Session done\n", __func__, __LINE__); - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - context, data); - data = msm_jpeg_core_framedone_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_FRAMEDONE, - context, data); - pgmn_dev->state = MSM_JPEG_INIT; - } - if (msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status)) { - data = msm_jpeg_core_reset_ack_irq(jpeg_irq_status, - pgmn_dev); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 1; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - wake_up(&pgmn_dev->reset_wait); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_RESET_ACK, - context, data); - } - - /* Unexpected/unintended HW interrupt */ - if (msm_jpeg_hw_irq_is_err(jpeg_irq_status)) { - if (pgmn_dev->state != MSM_JPEG_EXECUTING) { - /*Clear all the bits and ignore the IRQ*/ - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else { - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - msm_jpeg_core_return_buffers(pgmn_dev, jpeg_irq_status); - data = msm_jpeg_core_err_irq(jpeg_irq_status, pgmn_dev); - if (msm_jpeg_irq_handler) { - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_ERR, - context, data); - } - } - } - - return IRQ_HANDLED; -} - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)) -{ - msm_jpeg_irq_handler = irq_handler; -} - -void msm_jpeg_core_irq_remove(void) -{ - msm_jpeg_irq_handler = NULL; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.h deleted file mode 100644 index 212eaff91d88..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_core.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_CORE_H -#define MSM_JPEG_CORE_H - -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_sync.h" - -#define msm_jpeg_core_buf msm_jpeg_hw_buf - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context); - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)); -void msm_jpeg_core_irq_remove(void); - -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf); - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size); -int msm_jpeg_core_fe_start(struct msm_jpeg_device *); - -void msm_jpeg_core_release(struct msm_jpeg_device *, int); -void msm_jpeg_core_init(struct msm_jpeg_device *); -#endif /* MSM_JPEG_CORE_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_dev.c b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_dev.c deleted file mode 100644 index 34273d90b8c4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_dev.c +++ /dev/null @@ -1,315 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" - -#define MSM_JPEG_NAME "jpeg" -#define DEV_NAME_LEN 10 - -static int msm_jpeg_open(struct inode *inode, struct file *filp) -{ - int rc = 0; - - struct msm_jpeg_device *pgmn_dev = container_of(inode->i_cdev, - struct msm_jpeg_device, cdev); - filp->private_data = pgmn_dev; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_open(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - - return rc; -} - -static int msm_jpeg_release(struct inode *inode, struct file *filp) -{ - int rc; - - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG(KERN_INFO "%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_release(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - return rc; -} -#ifdef CONFIG_COMPAT -static long msm_jpeg_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_compat_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} -#endif -static long msm_jpeg_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} - -static const struct file_operations msm_jpeg_fops = { - .owner = THIS_MODULE, - .open = msm_jpeg_open, - .release = msm_jpeg_release, - .unlocked_ioctl = msm_jpeg_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_jpeg_compat_ioctl, -#endif -}; - - -int msm_jpeg_subdev_init(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - - JPEG_DBG("%s:%d: jpeg_sd=0x%x pgmn_dev=0x%x\n", - __func__, __LINE__, (uint32_t)jpeg_sd, (uint32_t)pgmn_dev); - rc = __msm_jpeg_open(pgmn_dev); - JPEG_DBG("%s:%d: rc=%d\n", - __func__, __LINE__, rc); - return rc; -} - -static long msm_jpeg_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)sd->host_priv; - - JPEG_DBG("%s: cmd=%d\n", __func__, cmd); - - JPEG_DBG("%s: pgmn_dev 0x%x", __func__, (uint32_t)pgmn_dev); - - JPEG_DBG("%s: Calling __msm_jpeg_ioctl\n", __func__); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, (unsigned long)arg); - pr_debug("%s: X\n", __func__); - return rc; -} - -void msm_jpeg_subdev_release(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - JPEG_DBG("%s:pgmn_dev=0x%x", __func__, (uint32_t)pgmn_dev); - rc = __msm_jpeg_release(pgmn_dev); - JPEG_DBG("%s:rc=%d", __func__, rc); -} - -static const struct v4l2_subdev_core_ops msm_jpeg_subdev_core_ops = { - .ioctl = msm_jpeg_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_jpeg_subdev_ops = { - .core = &msm_jpeg_subdev_core_ops, -}; - -static int msm_jpeg_init_dev(struct platform_device *pdev) -{ - int rc = -1; - struct device *dev; - struct msm_jpeg_device *msm_jpeg_device_p; - char devname[DEV_NAME_LEN]; - - msm_jpeg_device_p = kzalloc(sizeof(struct msm_jpeg_device), GFP_ATOMIC); - if (!msm_jpeg_device_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - msm_jpeg_device_p->pdev = pdev; - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - - snprintf(devname, sizeof(devname), "%s%d", MSM_JPEG_NAME, pdev->id); - - rc = __msm_jpeg_init(msm_jpeg_device_p); - if (rc < -1) { - JPEG_PR_ERR("%s: initialization failed\n", __func__); - goto fail; - } - - v4l2_subdev_init(&msm_jpeg_device_p->subdev, &msm_jpeg_subdev_ops); - v4l2_set_subdev_hostdata(&msm_jpeg_device_p->subdev, msm_jpeg_device_p); - JPEG_DBG("%s: msm_jpeg_device_p 0x%x", __func__, - (uint32_t)msm_jpeg_device_p); - - rc = alloc_chrdev_region(&msm_jpeg_device_p->msm_jpeg_devno, 0, 1, - devname); - if (rc < 0) { - JPEG_PR_ERR("%s: failed to allocate chrdev\n", __func__); - goto fail_1; - } - - if (!msm_jpeg_device_p->msm_jpeg_class) { - msm_jpeg_device_p->msm_jpeg_class = - class_create(THIS_MODULE, devname); - if (IS_ERR(msm_jpeg_device_p->msm_jpeg_class)) { - rc = PTR_ERR(msm_jpeg_device_p->msm_jpeg_class); - JPEG_PR_ERR("%s: create device class failed\n", - __func__); - goto fail_2; - } - } - - dev = device_create(msm_jpeg_device_p->msm_jpeg_class, NULL, - MKDEV(MAJOR(msm_jpeg_device_p->msm_jpeg_devno), - MINOR(msm_jpeg_device_p->msm_jpeg_devno)), NULL, - "%s%d", MSM_JPEG_NAME, pdev->id); - if (IS_ERR(dev)) { - JPEG_PR_ERR("%s: error creating device\n", __func__); - rc = -ENODEV; - goto fail_3; - } - - cdev_init(&msm_jpeg_device_p->cdev, &msm_jpeg_fops); - msm_jpeg_device_p->cdev.owner = THIS_MODULE; - msm_jpeg_device_p->cdev.ops = - (const struct file_operations *) &msm_jpeg_fops; - rc = cdev_add(&msm_jpeg_device_p->cdev, - msm_jpeg_device_p->msm_jpeg_devno, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: error adding cdev\n", __func__); - rc = -ENODEV; - goto fail_4; - } - - platform_set_drvdata(pdev, &msm_jpeg_device_p); - - JPEG_DBG("%s %s%d: success\n", __func__, MSM_JPEG_NAME, pdev->id); - - return rc; - -fail_4: - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - -fail_3: - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - -fail_2: - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - -fail_1: - __msm_jpeg_exit(msm_jpeg_device_p); - return rc; - -fail: - kfree(msm_jpeg_device_p); - return rc; - -} - -static void msm_jpeg_exit(struct msm_jpeg_device *msm_jpeg_device_p) -{ - cdev_del(&msm_jpeg_device_p->cdev); - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - - __msm_jpeg_exit(msm_jpeg_device_p); -} - -static int __msm_jpeg_probe(struct platform_device *pdev) -{ - return msm_jpeg_init_dev(pdev); -} - -static int __msm_jpeg_remove(struct platform_device *pdev) -{ - struct msm_jpeg_device *msm_jpegd_device_p; - - msm_jpegd_device_p = platform_get_drvdata(pdev); - if (msm_jpegd_device_p) - msm_jpeg_exit(msm_jpegd_device_p); - - return 0; -} - -static const struct of_device_id msm_jpeg_dt_match[] = { - {.compatible = "qcom,jpeg"}, - {}, -}; - -MODULE_DEVICE_TABLE(of, msm_jpeg_dt_match); - -static struct platform_driver msm_jpeg_driver = { - .probe = __msm_jpeg_probe, - .remove = __msm_jpeg_remove, - .driver = { - .name = "msm_jpeg", - .owner = THIS_MODULE, - .of_match_table = msm_jpeg_dt_match, - }, -}; - -static int __init msm_jpeg_driver_init(void) -{ - int rc; - rc = platform_driver_register(&msm_jpeg_driver); - return rc; -} - -static void __exit msm_jpeg_driver_exit(void) -{ - platform_driver_unregister(&msm_jpeg_driver); -} - -MODULE_DESCRIPTION("msm jpeg jpeg driver"); - -module_init(msm_jpeg_driver_init); -module_exit(msm_jpeg_driver_exit); diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.c b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.c deleted file mode 100644 index 95c0e9e84748..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.c +++ /dev/null @@ -1,416 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_common.h" - -#include - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *base) -{ - int buf_free_index = -1; - - if (!pingpong_hw->buf_status[0]) { - buf_free_index = 0; - } else if (!pingpong_hw->buf_status[1]) { - buf_free_index = 1; - } else { - JPEG_PR_ERR("%s:%d: pingpong buffer busy\n", - __func__, __LINE__); - return -EBUSY; - } - - pingpong_hw->buf[buf_free_index] = *buf; - pingpong_hw->buf_status[buf_free_index] = 1; - - if (pingpong_hw->is_fe) { - /* it is fe */ - msm_jpeg_hw_fe_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } else { - /* it is we */ - msm_jpeg_hw_we_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } - return 0; -} - -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) { - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - pingpong_hw->buf_status[pingpong_hw->buf_active_index] = 0; - } - - pingpong_hw->buf_active_index = !pingpong_hw->buf_active_index; - - return (void *) buf_p; -} - -void *msm_jpeg_hw_pingpong_active_buffer( - struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - - return (void *) buf_p; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_get_status[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, JPEG_IRQ_STATUS_ADDR, - JPEG_IRQ_STATUS_BMSK, {0} }, -}; - -int msm_jpeg_hw_irq_get_status(void *base) -{ - uint32_t n_irq_status = 0; - n_irq_status = msm_jpeg_hw_read(&hw_cmd_irq_get_status[0], base); - return n_irq_status; -} - -struct msm_jpeg_hw_cmd hw_cmd_encode_output_size[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK, {0} } , -}; - -long msm_jpeg_hw_encode_output_size(void *base) -{ - uint32_t encode_output_size = 0; - - encode_output_size = msm_jpeg_hw_read(&hw_cmd_encode_output_size[0], - base); - - return encode_output_size; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_clear[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_CLEAR_BMSK, {JPEG_IRQ_CLEAR_ALL} }, -}; - -void msm_jpeg_hw_irq_clear(uint32_t mask, uint32_t data, void *base) -{ - JPEG_DBG("%s:%d] mask %0x data %0x", __func__, __LINE__, mask, data); - hw_cmd_irq_clear[0].mask = mask; - hw_cmd_irq_clear[0].data = data; - msm_jpeg_hw_write(&hw_cmd_irq_clear[0], base); -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_CMD_CLEAR_WRITE_PLN_QUEUES} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_OFFSET_ADDR, - JPEG_PLN0_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_PNTR_ADDR, - JPEG_PLN0_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_PNTR_ADDR, - JPEG_PLN1_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_PNTR_ADDR, - JPEG_PLN2_RD_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_fe_ping_update[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->y_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->pln2_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_start[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_OFFLINE_CMD_START} }, -}; - -void msm_jpeg_hw_fe_start(void *base) -{ - msm_jpeg_hw_write(&hw_cmd_fe_start[0], base); - - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_we_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_decode_status(void *base) -{ - uint32_t data; - data = readl_relaxed(base + JPEG_DECODE_MCUS_DECODED_STATUS); - JPEG_DBG_HIGH("Decode MCUs decode status %u", data); - data = readl_relaxed(base + JPEG_DECODE_BITS_CONSUMED_STATUS); - JPEG_DBG_HIGH("Decode bits consumed status %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_Y_STATE); - JPEG_DBG_HIGH("Decode prediction Y state %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_C_STATE); - JPEG_DBG_HIGH("Decode prediction C state %u", data); - data = readl_relaxed(base + JPEG_DECODE_RSM_STATE); - JPEG_DBG_HIGH("Decode prediction RSM state %u", data); -} - - -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_we_ping_update[0]; - hw_cmd_p->data = p_input->y_buffer_addr; - JPEG_DBG_HIGH("%s Output pln0 buffer address is %x\n", __func__, - p_input->y_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - JPEG_DBG_HIGH("%s Output pln1 buffer address is %x\n", __func__, - p_input->cbcr_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->pln2_addr; - JPEG_DBG_HIGH("%s Output pln2 buffer address is %x\n", __func__, - p_input->pln2_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_reset[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_DISABLE_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_CLEAR_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_RESET_CMD_ADDR, - JPEG_RESET_CMD_RMSK, {JPEG_RESET_DEFAULT} }, -}; - -void msm_jpeg_hw_reset(void *base, int size) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - hw_cmd_p = &hw_cmd_reset[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p, base); - wmb(); - - return; -} - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - data = readl_relaxed(paddr); - data &= hw_cmd_p->mask; - - return data; -} - -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t old_data, new_data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - if (hw_cmd_p->mask == 0xffffffff) { - old_data = 0; - } else { - old_data = readl_relaxed(paddr); - old_data &= ~hw_cmd_p->mask; - } - - new_data = hw_cmd_p->data & hw_cmd_p->mask; - new_data |= old_data; - writel_relaxed(new_data, paddr); -} - -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us, - void *base) -{ - int tm = hw_cmd_p->n; - uint32_t data; - uint32_t wait_data = hw_cmd_p->data & hw_cmd_p->mask; - - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data != wait_data) { - while (tm) { - udelay(m_us); - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data == wait_data) - break; - tm--; - } - } - hw_cmd_p->data = data; - return tm; -} - -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us) -{ - int tm = hw_cmd_p->n; - while (tm) { - udelay(m_us); - tm--; - } -} - -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *hw_cmd_p, uint32_t m_cmds, - uint32_t max_size, void *base) -{ - int is_copy_to_user = 0; - uint32_t data; - - while (m_cmds--) { - if (hw_cmd_p->offset >= max_size) { - JPEG_PR_ERR("%s:%d] %d exceed hw region %d\n", __func__, - __LINE__, hw_cmd_p->offset, max_size); - return -EFAULT; - } - if (hw_cmd_p->offset & 0x3) { - JPEG_PR_ERR("%s:%d] %d Invalid alignment\n", __func__, - __LINE__, hw_cmd_p->offset); - return -EFAULT; - } - - switch (hw_cmd_p->type) { - case MSM_JPEG_HW_CMD_TYPE_READ: - hw_cmd_p->data = msm_jpeg_hw_read(hw_cmd_p, base); - is_copy_to_user = 1; - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE: - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE_OR: - data = msm_jpeg_hw_read(hw_cmd_p, base); - hw_cmd_p->data = (hw_cmd_p->data & hw_cmd_p->mask) | - data; - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_MWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1000, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1); - break; - - case MSM_JPEG_HW_CMD_TYPE_MDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1000); - break; - - default: - JPEG_PR_ERR("wrong hw command type\n"); - break; - } - - hw_cmd_p++; - } - return is_copy_to_user; -} - -void msm_jpeg_io_dump(void *base, int size) -{ - char line_str[128], *p_str; - void __iomem *addr = (void __iomem *)base; - int i; - u32 *p = (u32 *) addr; - u32 data; - JPEG_DBG_HIGH("%s:%d] %pK %d", __func__, __LINE__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08lx: ", (unsigned long)p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - JPEG_DBG_HIGH("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - JPEG_DBG_HIGH("%s\n", line_str); -} - diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.h deleted file mode 100644 index c3c5bd77231c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_H -#define MSM_JPEG_HW_H - -#include -#include "msm_jpeg_hw_reg.h" -#include -#include - -struct msm_jpeg_hw_buf { - struct msm_jpeg_buf vbuf; - struct file *file; - uint32_t framedone_len; - uint32_t y_buffer_addr; - uint32_t y_len; - uint32_t cbcr_buffer_addr; - uint32_t cbcr_len; - uint32_t num_of_mcu_rows; - struct ion_handle *handle; - uint32_t pln2_addr; - uint32_t pln2_len; -}; - -struct msm_jpeg_hw_pingpong { - uint8_t is_fe; /* 1: fe; 0: we */ - struct msm_jpeg_hw_buf buf[2]; - int buf_status[2]; - int buf_active_index; -}; - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *); -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw); -void *msm_jpeg_hw_pingpong_active_buffer(struct msm_jpeg_hw_pingpong - *pingpong_hw); - -void msm_jpeg_hw_irq_clear(uint32_t, uint32_t, void *); -int msm_jpeg_hw_irq_get_status(void *); -long msm_jpeg_hw_encode_output_size(void *); -#define MSM_JPEG_HW_MASK_COMP_FRAMEDONE \ - MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK -#define MSM_JPEG_HW_MASK_COMP_FE \ - MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK -#define MSM_JPEG_HW_MASK_COMP_WE \ - (MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK | \ - MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK) -#define MSM_JPEG_HW_MASK_COMP_RESET_ACK \ - MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK -#define MSM_JPEG_HW_MASK_COMP_ERR \ - (MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK) - -#define msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FRAMEDONE) -#define msm_jpeg_hw_irq_is_fe_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FE) -#define msm_jpeg_hw_irq_is_we_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_WE) -#define msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_RESET_ACK) -#define msm_jpeg_hw_irq_is_err(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_ERR) - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); - -void msm_jpeg_hw_we_buffer_cfg(uint8_t is_realtime); - -void msm_jpeg_hw_fe_start(void *); -void msm_jpeg_hw_clk_cfg(void); - -void msm_jpeg_hw_reset(void *base, int size); -void msm_jpeg_hw_irq_cfg(void); - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *, void *); -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *, void *); -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *, int, void *); -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *, int); -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *, uint32_t , - uint32_t , void *); -void msm_jpeg_hw_region_dump(int size); -void msm_jpeg_io_dump(void *base, int size); -void msm_jpeg_decode_status(void *base); - -#endif /* MSM_JPEG_HW_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw_reg.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw_reg.h deleted file mode 100644 index 4fbab4b3ea71..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_hw_reg.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_REG_H -#define MSM_JPEG_HW_REG_H - -#define JPEG_REG_BASE 0 - -#define MSM_JPEG_HW_IRQ_MASK_ADDR 0x00000018 -#define MSM_JPEG_HW_IRQ_MASK_RMSK 0xFFFFFFFF -#define MSM_JPEG_HW_IRQ_ENABLE 0xFFFFFFFF - -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK 0x00000001 -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_SHIFT 0x00000000 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_SHIFT 0x00000001 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_MASK 0x00000004 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_SHIFT 0x00000002 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_MASK 0x00000008 -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_SHIFT 0x00000003 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_SHIFT 0x00000004 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK 0x00000020 -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_SHIFT 0x00000005 - -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK 0x10000000 -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_SHIFT 0x0000000a - -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_MASK 0x00000800 -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_SHIFT 0x0000000b - -#define MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF (0x1<<19) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR (0x1<<20) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR (0x1<<21) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF (0x1<<22) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW (0x1<<23) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM (0x1<<24) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ (0x1<<25) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM (0x1<<26) -#define MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK (0x1<<29) - -#define JPEG_OFFLINE_CMD_START 0x00000001 - -#define JPEG_RESET_DEFAULT 0x00032013 - -#define JPEG_IRQ_DISABLE_ALL 0x00000000 -#define JPEG_IRQ_CLEAR_ALL 0xFFFFFFFF - -#define JPEG_PLN0_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000038) -#define JPEG_PLN0_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN0_RD_OFFSET_ADDR 0x0000003C -#define JPEG_PLN0_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN1_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000044) -#define JPEG_PLN1_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_RD_OFFSET_ADDR 0x00000048 -#define JPEG_PLN1_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN2_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000050) -#define JPEG_PLN2_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_RD_OFFSET_ADDR 0x00000054 -#define JPEG_PLN2_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_CMD_ADDR (JPEG_REG_BASE + 0x00000010) -#define JPEG_CMD_BMSK 0x00000FFF -#define JPEG_CMD_CLEAR_WRITE_PLN_QUEUES 0x700 - -#define JPEG_PLN0_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000cc) -#define JPEG_PLN0_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D0) -#define JPEG_PLN1_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D4) -#define JPEG_PLN2_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_IRQ_MASK_ADDR (JPEG_REG_BASE + 0x00000018) -#define JPEG_IRQ_MASK_BMSK 0xFFFFFFFF -#define JPEG_IRQ_ALLSOURCES_ENABLE 0xFFFFFFFF - -#define JPEG_IRQ_CLEAR_ADDR (JPEG_REG_BASE + 0x0000001c) -#define JPEG_IRQ_CLEAR_BMSK 0xFFFFFFFF - -#define JPEG_RESET_CMD_ADDR (JPEG_REG_BASE + 0x00000008) -#define JPEG_RESET_CMD_RMSK 0xFFFFFFFF - -#define JPEG_IRQ_STATUS_ADDR (JPEG_REG_BASE + 0x00000020) -#define JPEG_IRQ_STATUS_BMSK 0xFFFFFFFF - -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR (JPEG_REG_BASE + 0x00000180) -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK 0x1FFFFFFF - -#define JPEG_DECODE_MCUS_DECODED_STATUS (JPEG_REG_BASE + 0x00000258) -#define JPEG_DECODE_BITS_CONSUMED_STATUS (JPEG_REG_BASE + 0x0000025C) -#define JPEG_DECODE_PRED_Y_STATE (JPEG_REG_BASE + 0x00000260) -#define JPEG_DECODE_PRED_C_STATE (JPEG_REG_BASE + 0x00000264) -#define JPEG_DECODE_RSM_STATE (JPEG_REG_BASE + 0x00000268) - -#define JPEG_HW_VERSION (JPEG_REG_BASE + 0x00000000) - -#define VBIF_BASE_ADDRESS 0xFDA60000 -#define VBIF_REGION_SIZE 0xC30 -#define JPEG_VBIF_CLKON 0x4 -#define JPEG_VBIF_IN_RD_LIM_CONF0 0xB0 -#define JPEG_VBIF_IN_RD_LIM_CONF1 0xB4 -#define JPEG_VBIF_IN_RD_LIM_CONF2 0xB8 -#define JPEG_VBIF_IN_WR_LIM_CONF0 0xC0 -#define JPEG_VBIF_IN_WR_LIM_CONF1 0xC4 -#define JPEG_VBIF_IN_WR_LIM_CONF2 0xC8 -#define JPEG_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define JPEG_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define JPEG_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define JPEG_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define JPEG_VBIF_ARB_CTL 0xF0 -#define JPEG_VBIF_OUT_AXI_AOOO_EN 0x178 -#define JPEG_VBIF_OUT_AXI_AOOO 0x17c -#define JPEG_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 - -#endif /* MSM_JPEG_HW_REG_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.c b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.c deleted file mode 100644 index 1243d8b42fef..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.c +++ /dev/null @@ -1,460 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_platform.h" -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" -#include "msm_jpeg_hw.h" -#include "msm_camera_io_util.h" - -#define JPEG_CLK_INFO_MAX 16 - -static struct msm_cam_clk_info jpeg_8x_clk_info[JPEG_CLK_INFO_MAX]; - -static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[JPEG_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - JPEG_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > JPEG_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - JPEG_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(jpeg_8x_clk_info[i].clk_name)); - JPEG_DBG("clock-names[%d] = %s\n", - i, jpeg_8x_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - jpeg_8x_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - JPEG_DBG("clk_rate[%d] = %ld\n", - i, jpeg_8x_clk_info[i].clk_rate); - } - jpeg_dev->num_clk = count; - return 0; -} - - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate) -{ - int rc = 0; - struct clk *jpeg_clk; - - jpeg_clk = clk_get(&pgmn_dev->pdev->dev, "core_clk"); - if (IS_ERR(jpeg_clk)) { - JPEG_PR_ERR("%s get failed\n", "core_clk"); - rc = PTR_ERR(jpeg_clk); - return rc; - } - - rc = clk_set_rate(jpeg_clk, clk_rate); - - return rc; -} - -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num) -{ - ion_unmap_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0); - ion_free(pgmn_dev->jpeg_client, *ionhandle); - *ionhandle = NULL; -} - -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file_p, struct ion_handle **ionhandle, - int domain_num) { - dma_addr_t paddr; - unsigned long size; - int rc; - *ionhandle = ion_import_dma_buf(pgmn_dev->jpeg_client, fd); - if (IS_ERR_OR_NULL(*ionhandle)) - return 0; - - rc = ion_map_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0, - SZ_4K, 0, &paddr, (unsigned long *)&size, 0, 0); - JPEG_DBG("%s:%d] addr 0x%x size %ld", __func__, __LINE__, - (uint32_t)paddr, size); - - if (rc < 0) { - JPEG_PR_ERR("%s: ion_map_iommu fd %d error %d\n", __func__, fd, - rc); - goto error1; - } - - /* validate user input */ - if (len > size) { - JPEG_PR_ERR("%s: invalid offset + len\n", __func__); - goto error1; - } - - return paddr; -error1: - ion_free(pgmn_dev->jpeg_client, *ionhandle); - return 0; -} - -static void set_vbif_params(struct msm_jpeg_device *pgmn_dev, - void *jpeg_vbif_base) -{ - writel_relaxed(0x1, - jpeg_vbif_base + JPEG_VBIF_CLKON); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF2); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF2); - writel_relaxed(0x00001010, - jpeg_vbif_base + JPEG_VBIF_OUT_RD_LIM_CONF0); - writel_relaxed(0x00000110, - jpeg_vbif_base + JPEG_VBIF_OUT_WR_LIM_CONF0); - writel_relaxed(0x00000707, - jpeg_vbif_base + JPEG_VBIF_DDR_OUT_MAX_BURST); - writel_relaxed(0x7, - jpeg_vbif_base + JPEG_VBIF_OCMEM_OUT_MAX_BURST); - writel_relaxed(0x00000030, - jpeg_vbif_base + JPEG_VBIF_ARB_CTL); - writel_relaxed(0x00000FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO_EN); - writel_relaxed(0x0FFF0FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO); - /*FE and WE QOS configuration need to be set when - QOS RR arbitration is enabled*/ - if (pgmn_dev->hw_version != JPEG_8974_V1) - writel_relaxed(0x00000003, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - else - writel_relaxed(0x00000001, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - - writel_relaxed(0x22222222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0); - writel_relaxed(0x2222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1); -} - -static struct msm_bus_vectors msm_jpeg_init_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_jpeg_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = JPEG_CLK_RATE * 2.5, - .ib = JPEG_CLK_RATE * 2.5, - }, -}; - -static struct msm_bus_paths msm_jpeg_bus_client_config[] = { - { - ARRAY_SIZE(msm_jpeg_init_vectors), - msm_jpeg_init_vectors, - }, - { - ARRAY_SIZE(msm_jpeg_vectors), - msm_jpeg_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_jpeg_bus_client_pdata = { - msm_jpeg_bus_client_config, - ARRAY_SIZE(msm_jpeg_bus_client_config), - .name = "msm_jpeg", -}; - -#ifdef CONFIG_MSM_IOMMU -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - int rc = iommu_attach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - if (rc < 0) { - JPEG_PR_ERR("%s: Device attach failed\n", __func__); - return -ENODEV; - } - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - iommu_detach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -#else -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -#endif - - - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context) -{ - int rc = -1; - int jpeg_irq; - struct resource *jpeg_mem, *vbif_mem, *jpeg_io, *jpeg_irq_res; - void *jpeg_base; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - pgmn_dev->state = MSM_JPEG_IDLE; - - jpeg_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!jpeg_mem) { - JPEG_PR_ERR("%s: jpeg no mem resource?\n", __func__); - return -ENODEV; - } - - vbif_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!vbif_mem) { - JPEG_PR_ERR("%s: vbif no mem resource?\n", __func__); - return -ENODEV; - } - - jpeg_irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!jpeg_irq_res) { - JPEG_PR_ERR("no irq resource?\n"); - return -ENODEV; - } - jpeg_irq = jpeg_irq_res->start; - JPEG_DBG("%s base address: 0x%x, jpeg irq number: %d\n", __func__, - jpeg_mem->start, jpeg_irq); - - pgmn_dev->jpeg_bus_client = - msm_bus_scale_register_client(&msm_jpeg_bus_client_pdata); - if (!pgmn_dev->jpeg_bus_client) { - JPEG_PR_ERR("%s: Registration Failed!\n", __func__); - pgmn_dev->jpeg_bus_client = 0; - return -EINVAL; - } - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 1); - - jpeg_io = request_mem_region(jpeg_mem->start, - resource_size(jpeg_mem), pdev->name); - if (!jpeg_io) { - JPEG_PR_ERR("%s: region already claimed\n", __func__); - return -EBUSY; - } - - jpeg_base = ioremap(jpeg_mem->start, resource_size(jpeg_mem)); - if (!jpeg_base) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_remap; - } - - pgmn_dev->jpeg_fs = regulator_get(&pgmn_dev->pdev->dev, "vdd"); - rc = regulator_enable(pgmn_dev->jpeg_fs); - if (rc) { - JPEG_PR_ERR("%s:%d]jpeg regulator get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - if (msm_jpeg_get_clk_info(pgmn_dev, pgmn_dev->pdev) < 0) { - JPEG_PR_ERR("%s:%d]jpeg clock get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - rc = msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - goto fail_clk; - } - - pgmn_dev->hw_version = readl_relaxed(jpeg_base + - JPEG_HW_VERSION); - JPEG_DBG_HIGH("%s:%d] jpeg HW version 0x%x", __func__, __LINE__, - pgmn_dev->hw_version); - - pgmn_dev->jpeg_vbif = ioremap(vbif_mem->start, resource_size(vbif_mem)); - if (!pgmn_dev->jpeg_vbif) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_vbif; - } - - JPEG_DBG("%s:%d] jpeg_vbif 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->jpeg_vbif); - - rc = msm_jpeg_attach_iommu(pgmn_dev); - if (rc < 0) - goto fail_iommu; - - set_vbif_params(pgmn_dev, pgmn_dev->jpeg_vbif); - - rc = request_irq(jpeg_irq, handler, IRQF_TRIGGER_RISING, "jpeg", - context); - if (rc) { - JPEG_PR_ERR("%s: request_irq failed, %d\n", __func__, - jpeg_irq); - goto fail_request_irq; - } - - *mem = jpeg_mem; - *base = jpeg_base; - *irq = jpeg_irq; - - pgmn_dev->jpeg_client = msm_ion_client_create("camera/jpeg"); - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - - pgmn_dev->state = MSM_JPEG_INIT; - return rc; - -fail_request_irq: - msm_jpeg_detach_iommu(pgmn_dev); - -fail_iommu: - iounmap(pgmn_dev->jpeg_vbif); - - -fail_vbif: - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - -fail_clk: - rc = regulator_disable(pgmn_dev->jpeg_fs); - if (!rc) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, rc); - pgmn_dev->jpeg_fs = NULL; - -fail_fs: - iounmap(jpeg_base); - -fail_remap: - release_mem_region(jpeg_mem->start, resource_size(jpeg_mem)); - JPEG_DBG("%s:%d] fail\n", __func__, __LINE__); - return rc; -} - -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context) -{ - int result = 0; - - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - free_irq(irq, context); - - msm_jpeg_detach_iommu(pgmn_dev); - - if (pgmn_dev->jpeg_bus_client) { - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 0); - msm_bus_scale_unregister_client(pgmn_dev->jpeg_bus_client); - } - - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - JPEG_DBG("%s:%d] clock disbale done", __func__, __LINE__); - - if (pgmn_dev->jpeg_fs) { - result = regulator_disable(pgmn_dev->jpeg_fs); - if (!result) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, result); - pgmn_dev->jpeg_fs = NULL; - } - iounmap(pgmn_dev->jpeg_vbif); - iounmap(base); - release_mem_region(mem->start, resource_size(mem)); - ion_client_destroy(pgmn_dev->jpeg_client); - pgmn_dev->state = MSM_JPEG_IDLE; - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return result; -} - diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.h deleted file mode 100644 index b59c41f8780c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_platform.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_PLATFORM_H -#define MSM_JPEG_PLATFORM_H - -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#define JPEG_CLK_RATE 266670000 - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate); -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num); -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file, struct ion_handle **ionhandle, - int domain_num); - -int msm_jpeg_platform_clk_enable(void); -int msm_jpeg_platform_clk_disable(void); - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context); -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context); - -#endif /* MSM_JPEG_PLATFORM_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.c b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.c deleted file mode 100644 index fac3da77d26f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.c +++ /dev/null @@ -1,1292 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -#define JPEG_REG_SIZE 0x308 -#define JPEG_DEV_CNT 3 -#define JPEG_DEC_ID 2 -#define UINT32_MAX (0xFFFFFFFFU) - -#ifdef CONFIG_COMPAT -#define MSM_JPEG_IOCTL_RESET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_INPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 6, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 8, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 9, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_EVT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_TEST_DUMP_REGION32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 15, compat_ulong_t) - -struct msm_jpeg_ctrl_cmd32 { - uint32_t type; - uint32_t len; - compat_uptr_t value; -}; -struct msm_jpeg_buf32 { - uint32_t type; - int fd; - - compat_uptr_t vaddr; - - uint32_t y_off; - uint32_t y_len; - uint32_t framedone_len; - - uint32_t cbcr_off; - uint32_t cbcr_len; - - uint32_t num_of_mcu_rows; - uint32_t offset; - uint32_t pln2_off; - uint32_t pln2_len; -}; - -#endif - - -inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, name); - q_p->name = name; - spin_lock_init(&q_p->lck); - INIT_LIST_HEAD(&q_p->q); - init_waitqueue_head(&q_p->wait); - q_p->unblck = 0; -} - -inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p) -{ - unsigned long flags; - struct msm_jpeg_q_entry *q_entry_p = NULL; - void *data = NULL; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - spin_lock_irqsave(&q_p->lck, flags); - if (!list_empty(&q_p->q)) { - q_entry_p = list_first_entry(&q_p->q, struct msm_jpeg_q_entry, - list); - list_del_init(&q_entry_p->list); - } - spin_unlock_irqrestore(&q_p->lck, flags); - - if (q_entry_p) { - data = q_entry_p->data; - kfree(q_entry_p); - } else { - JPEG_DBG("%s:%d] %s no entry\n", __func__, __LINE__, - q_p->name); - } - - return data; -} - -inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data) -{ - unsigned long flags; - - struct msm_jpeg_q_entry *q_entry_p; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - - q_entry_p = kmalloc(sizeof(struct msm_jpeg_q_entry), GFP_ATOMIC); - if (!q_entry_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - q_entry_p->data = data; - - spin_lock_irqsave(&q_p->lck, flags); - list_add_tail(&q_entry_p->list, &q_p->q); - spin_unlock_irqrestore(&q_p->lck, flags); - - return 0; -} - -inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p, - struct msm_jpeg_core_buf *buf) -{ - struct msm_jpeg_core_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - memcpy(buf_p, buf, sizeof(struct msm_jpeg_core_buf)); - - msm_jpeg_q_in(q_p, buf_p); - return 0; -} - -inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p) -{ - long tm = MAX_SCHEDULE_TIMEOUT; /* 500ms */ - int rc; - - JPEG_DBG("%s:%d] %s wait\n", __func__, __LINE__, q_p->name); - rc = wait_event_interruptible_timeout(q_p->wait, - (!list_empty_careful(&q_p->q) || q_p->unblck), - msecs_to_jiffies(tm)); - JPEG_DBG("%s:%d] %s wait done\n", __func__, __LINE__, q_p->name); - if (list_empty_careful(&q_p->q)) { - if (rc == 0) { - rc = -ETIMEDOUT; - JPEG_PR_ERR("%s:%d] %s timeout\n", __func__, __LINE__, - q_p->name); - } else if (q_p->unblck) { - JPEG_DBG("%s:%d] %s unblock is true\n", __func__, - __LINE__, q_p->name); - q_p->unblck = 0; - rc = -ECANCELED; - } else if (rc < 0) { - JPEG_PR_ERR("%s:%d] %s rc %d\n", __func__, __LINE__, - q_p->name, rc); - } - } - return rc; -} - -inline int msm_jpeg_q_wakeup(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - wake_up(&q_p->wait); - return 0; -} - -inline int msm_jpeg_q_unblock(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - q_p->unblck = 1; - wake_up(&q_p->wait); - return 0; -} - -inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_q *q_p, int domain_num) -{ - struct msm_jpeg_core_buf *buf_p; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - buf_p = msm_jpeg_q_out(q_p); - if (buf_p) { - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, - &buf_p->handle, domain_num); - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(buf_p); - } - } while (buf_p); - q_p->unblck = 0; -} - -inline void msm_jpeg_q_cleanup(struct msm_jpeg_q *q_p) -{ - void *data; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - data = msm_jpeg_q_out(q_p); - if (data) { - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(data); - } - } while (data); - q_p->unblck = 0; -} - -/*************** event queue ****************/ - -int msm_jpeg_framedone_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (buf_in) { - buf_in->vbuf.framedone_len = buf_in->framedone_len; - buf_in->vbuf.type = MSM_JPEG_EVT_SESSION_DONE; - JPEG_DBG("%s:%d] 0x%08x %d framedone_len %d\n", - __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len, - buf_in->vbuf.framedone_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, buf_in); - } else { - JPEG_PR_ERR("%s:%d] no output return buffer\n", - __func__, __LINE__); - rc = -1; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - return rc; -} - -int msm_jpeg_evt_get(struct msm_jpeg_device *pgmn_dev, - void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->evt_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->evt_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no buffer\n", __func__, __LINE__); - return -EAGAIN; - } - - memset(&ctrl_cmd, 0, sizeof(ctrl_cmd)); - ctrl_cmd.type = buf_p->vbuf.type; - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) ctrl_cmd.value, ctrl_cmd.len); - - if (copy_to_user(to, &ctrl_cmd, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_evt_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->evt_q); - return 0; -} - -void msm_jpeg_reset_ack_irq(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); -} - -void msm_jpeg_err_irq(struct msm_jpeg_device *pgmn_dev, - int event) -{ - int rc = 0; - struct msm_jpeg_core_buf buf; - - JPEG_PR_ERR("%s:%d] error: %d\n", __func__, __LINE__, event); - - buf.vbuf.type = MSM_JPEG_EVT_ERR; - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, &buf); - if (!rc) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - if (!rc) - JPEG_PR_ERR("%s:%d] err err\n", __func__, __LINE__); - - return; -} - -/*************** output queue ****************/ - -int msm_jpeg_we_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - struct msm_jpeg_core_buf *buf_out; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->output_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no output return buffer\n", __func__, - __LINE__); - rc = -1; - return rc; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_out->y_buffer_addr, buf_out->y_len); - rc = msm_jpeg_core_we_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - msm_jpeg_core_we_buf_reset(pgmn_dev, buf_in); - JPEG_DBG("%s:%d] no output buffer\n", __func__, __LINE__); - rc = -2; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->output_rtn_q); - - return rc; -} - -int msm_jpeg_output_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->output_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->output_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no output buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_output_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->output_rtn_q); - return 0; -} - -int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_buf buf_cmd; - struct msm_jpeg_core_buf *buf_p; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] vaddr = 0x%08x y_len = %d\n, fd = %d", - __func__, __LINE__, (int) buf_cmd.vaddr, buf_cmd.y_len, - buf_cmd.fd); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + buf_cmd.pln2_len, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s:%d]After v2p pln0_addr %x pln0_len %d", - __func__, __LINE__, buf_p->y_buffer_addr, - buf_cmd.y_len); - - JPEG_DBG("pl1_len %d, pln1_addr %x, pln2_adrr %x,pln2_len %d", - buf_cmd.cbcr_len, buf_p->cbcr_buffer_addr, - buf_p->pln2_addr, buf_cmd.pln2_len); - - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->output_buf_q, buf_p); - return 0; -} - -/*************** input queue ****************/ - -int msm_jpeg_fe_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - struct msm_jpeg_core_buf *buf_out; - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->input_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no input return buffer\n", __func__, - __LINE__); - rc = -EFAULT; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - rc = msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - msm_jpeg_core_fe_start(pgmn_dev); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, __LINE__); - rc = -EFAULT; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->input_rtn_q); - - return rc; -} - -int msm_jpeg_input_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_wait(&pgmn_dev->input_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->input_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no input buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_input_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->input_rtn_q); - return 0; -} - -int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + - buf_cmd.pln2_len + buf_cmd.offset, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num) + - buf_cmd.offset + buf_cmd.y_off; - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->num_of_mcu_rows = buf_cmd.num_of_mcu_rows; - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len + buf_cmd.cbcr_off; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len + buf_cmd.pln2_off; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s: y_addr=%x, y_len=%x, cbcr_addr=%x, cbcr_len=%d", - __func__, buf_p->y_buffer_addr, buf_p->y_len, - buf_p->cbcr_buffer_addr, buf_p->cbcr_len); - JPEG_DBG("pln2_addr = %x, pln2_len = %d, fd =%d\n", - buf_p->pln2_addr, buf_p->pln2_len, buf_cmd.fd); - - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->input_buf_q, buf_p); - - return 0; -} - -int msm_jpeg_irq(int event, void *context, void *data) -{ - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - switch (event) { - case MSM_JPEG_EVT_SESSION_DONE: - msm_jpeg_framedone_irq(pgmn_dev, data); - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_FE: - msm_jpeg_fe_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_WE: - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_RESET_ACK: - msm_jpeg_reset_ack_irq(pgmn_dev); - break; - - case MSM_JPEG_HW_MASK_COMP_ERR: - default: - msm_jpeg_err_irq(pgmn_dev, event); - break; - } - - return 0; -} - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev) -{ - int rc; - - mutex_lock(&pgmn_dev->lock); - if (pgmn_dev->open_count) { - /* only open once */ - JPEG_PR_ERR("%s:%d] busy\n", __func__, __LINE__); - mutex_unlock(&pgmn_dev->lock); - return -EBUSY; - } - pgmn_dev->open_count++; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_irq_install(msm_jpeg_irq); - rc = msm_jpeg_platform_init(pgmn_dev->pdev, - &pgmn_dev->mem, &pgmn_dev->base, - &pgmn_dev->irq, msm_jpeg_core_irq, pgmn_dev); - if (rc) { - JPEG_PR_ERR("%s:%d] platform_init fail %d\n", __func__, - __LINE__, rc); - return rc; - } - - JPEG_DBG("%s:%d] platform resources - mem %pK, base %pK, irq %d\n", - __func__, __LINE__, - pgmn_dev->mem, pgmn_dev->base, pgmn_dev->irq); - pgmn_dev->res_size = resource_size(pgmn_dev->mem); - - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_q_cleanup(&pgmn_dev->input_buf_q); - msm_jpeg_core_init(pgmn_dev); - - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return rc; -} - -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - mutex_lock(&pgmn_dev->lock); - if (!pgmn_dev->open_count) { - JPEG_PR_ERR(KERN_ERR "%s: not opened\n", __func__); - mutex_unlock(&pgmn_dev->lock); - return -EINVAL; - } - pgmn_dev->open_count--; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_release(pgmn_dev, pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->input_buf_q, - pgmn_dev->domain_num); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - if (pgmn_dev->open_count) - JPEG_PR_ERR(KERN_ERR "%s: multiple opens\n", __func__); - - msm_jpeg_platform_release(pgmn_dev->mem, pgmn_dev->base, - pgmn_dev->irq, pgmn_dev); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return 0; -} - -int msm_jpeg_ioctl_hw_cmd(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - struct msm_jpeg_hw_cmd hw_cmd; - int is_copy_to_user; - - if (copy_from_user(&hw_cmd, arg, sizeof(struct msm_jpeg_hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1, - pgmn_dev->res_size, pgmn_dev->base); - JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x,pdata %x\n", - __func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset, - hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, &hw_cmd, sizeof(hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - } else { - return is_copy_to_user; - } - - return 0; -} - -int msm_jpeg_ioctl_hw_cmds(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int is_copy_to_user; - uint32_t len; - uint32_t m; - struct msm_jpeg_hw_cmds *hw_cmds_p; - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (copy_from_user(&m, arg, sizeof(m))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - if ((m == 0) || (m > ((UINT32_MAX - sizeof(struct msm_jpeg_hw_cmds)) / - sizeof(struct msm_jpeg_hw_cmd)))) { - JPEG_PR_ERR("%s:%d] m_cmds out of range\n", __func__, __LINE__); - return -EFAULT; - } - - len = sizeof(struct msm_jpeg_hw_cmds) + - sizeof(struct msm_jpeg_hw_cmd) * (m - 1); - hw_cmds_p = kmalloc(len, GFP_KERNEL); - if (!hw_cmds_p) { - JPEG_PR_ERR("%s:%d] no mem %d\n", __func__, __LINE__, len); - return -EFAULT; - } - - if (copy_from_user(hw_cmds_p, arg, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - - hw_cmd_p = (struct msm_jpeg_hw_cmd *) &(hw_cmds_p->hw_cmd); - - is_copy_to_user = msm_jpeg_hw_exec_cmds(hw_cmd_p, m, - pgmn_dev->res_size, pgmn_dev->base); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, hw_cmds_p, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - } else { - kfree(hw_cmds_p); - return is_copy_to_user; - } - kfree(hw_cmds_p); - return 0; -} - -int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg) -{ - struct msm_jpeg_core_buf *buf_out; - struct msm_jpeg_core_buf *buf_out_free[2] = {NULL, NULL}; - int i, rc; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - pgmn_dev->release_buf = 1; - for (i = 0; i < 2; i++) { - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, - __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) { - buf_out_free[i] = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out_free[i]) { - msm_jpeg_core_we_buf_update(pgmn_dev, buf_out_free[i]); - pgmn_dev->release_buf = 0; - } else { - JPEG_DBG("%s:%d] no output buffer\n", - __func__, __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) - kfree(buf_out_free[i]); - - pgmn_dev->state = MSM_JPEG_EXECUTING; - JPEG_DBG_HIGH("%s:%d] START\n", __func__, __LINE__); - wmb(); - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, arg); - wmb(); - - JPEG_DBG("%s:%d]", __func__, __LINE__); - return rc; -} - -int msm_jpeg_ioctl_reset(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int rc; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (pgmn_dev->state == MSM_JPEG_INIT) { - if (copy_from_user(&ctrl_cmd, arg, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - pgmn_dev->op_mode = ctrl_cmd.type; - - rc = msm_jpeg_core_reset(pgmn_dev, pgmn_dev->op_mode, pgmn_dev->base, - resource_size(pgmn_dev->mem)); - } else { - JPEG_PR_ERR("%s:%d] JPEG not been initialized Wrong state\n", - __func__, __LINE__); - rc = -1; - } - return rc; -} - -int msm_jpeg_ioctl_test_dump_region(struct msm_jpeg_device *pgmn_dev, - unsigned long arg) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_io_dump(pgmn_dev->base, JPEG_REG_SIZE); - return 0; -} - -int msm_jpeg_ioctl_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - long clk_rate; - int rc; - - if ((pgmn_dev->state != MSM_JPEG_INIT) && - (pgmn_dev->state != MSM_JPEG_RESET)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - if (get_user(clk_rate, (unsigned int __user *)arg)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - JPEG_DBG("%s:%d] Requested clk rate %ld\n", __func__, __LINE__, - clk_rate); - if (clk_rate < 0) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - rc = msm_jpeg_platform_set_clk_rate(pgmn_dev, clk_rate); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - return -EFAULT; - } - - return 0; -} -#ifdef CONFIG_COMPAT -int msm_jpeg_get_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - if (copy_from_user(&ctrl_cmd32, arg, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - ctrl_cmd->type = ctrl_cmd32.type; - ctrl_cmd->len = ctrl_cmd32.len; - temp = (unsigned long) ctrl_cmd32.value; - ctrl_cmd->value = (void *) temp; - - return 0; -} -int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - - ctrl_cmd32.type = ctrl_cmd->type; - ctrl_cmd32.len = ctrl_cmd->len; - temp = (unsigned long) ctrl_cmd->value; - ctrl_cmd32.value = (compat_uptr_t) temp; - - if (copy_from_user(arg, &ctrl_cmd32, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_get_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - if (copy_from_user(&jpeg_buf32, arg, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - jpeg_buf->type = jpeg_buf32.type; - jpeg_buf->fd = jpeg_buf32.fd; - temp = (unsigned long) jpeg_buf32.vaddr; - jpeg_buf->vaddr = (void *) temp; - jpeg_buf->y_off = jpeg_buf32.y_off; - jpeg_buf->y_len = jpeg_buf32.y_len; - jpeg_buf->framedone_len = jpeg_buf32.framedone_len; - jpeg_buf->cbcr_off = jpeg_buf32.cbcr_off; - jpeg_buf->cbcr_len = jpeg_buf32.cbcr_len; - jpeg_buf->num_of_mcu_rows = jpeg_buf32.num_of_mcu_rows; - jpeg_buf->offset = jpeg_buf32.offset; - jpeg_buf->pln2_off = jpeg_buf32.pln2_off; - jpeg_buf->pln2_len = jpeg_buf32.pln2_len; - - return 0; -} -int msm_jpeg_put_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - - jpeg_buf32.type = jpeg_buf->type; - jpeg_buf32.fd = jpeg_buf->fd; - temp = (unsigned long) jpeg_buf->vaddr; - jpeg_buf32.vaddr = (compat_uptr_t) temp; - jpeg_buf32.y_off = jpeg_buf->y_off; - jpeg_buf32.y_len = jpeg_buf->y_len; - jpeg_buf32.framedone_len = jpeg_buf->framedone_len; - jpeg_buf32.cbcr_off = jpeg_buf->cbcr_off; - jpeg_buf32.cbcr_len = jpeg_buf->cbcr_len; - jpeg_buf32.num_of_mcu_rows = jpeg_buf->num_of_mcu_rows; - jpeg_buf32.offset = jpeg_buf->offset; - jpeg_buf32.pln2_off = jpeg_buf->pln2_off; - jpeg_buf32.pln2_len = jpeg_buf->pln2_len; - - if (copy_to_user(arg, &jpeg_buf32, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - return 0; -} - -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - struct msm_jpeg_buf jpeg_buf; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET32: - rc = msm_jpeg_get_compat_ctrl_cmd(&ctrl_cmd, - (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) &ctrl_cmd); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET32: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET32: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET32: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) &ctrl_cmd); - if (rc < 0) - break; - msm_jpeg_put_compat_ctrl_cmd(&ctrl_cmd, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION32: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, - (void __user *) arg); - break; - - default: - JPEG_PR_ERR(KERN_INFO "%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#else -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - return 0; -} -#endif - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, (void __user *) arg); - break; - default: - pr_err_ratelimited("%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#ifdef CONFIG_MSM_IOMMU -static int camera_register_domain(void) -{ - struct msm_iova_partition camera_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - - struct msm_iova_layout camera_fw_layout = { - .partitions = &camera_fw_partition, - .npartitions = 1, - .client_name = "camera_jpeg", - .domain_flags = 0, - }; - return msm_register_domain(&camera_fw_layout); -} -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) -{ - int rc = 0; - int idx = 0; -#ifdef CONFIG_MSM_IOMMU - int i = 0, j = 0; - char *iommu_name[JPEG_DEV_CNT] = {"jpeg_enc0", "jpeg_enc1", - "jpeg_dec"}; -#endif - - mutex_init(&pgmn_dev->lock); - - pr_err("%s:%d] Jpeg Device id %d", __func__, __LINE__, - pgmn_dev->pdev->id); - idx = pgmn_dev->pdev->id; - pgmn_dev->idx = idx; - pgmn_dev->iommu_cnt = 1; - pgmn_dev->decode_flag = (idx == JPEG_DEC_ID); - - msm_jpeg_q_init("evt_q", &pgmn_dev->evt_q); - msm_jpeg_q_init("output_rtn_q", &pgmn_dev->output_rtn_q); - msm_jpeg_q_init("output_buf_q", &pgmn_dev->output_buf_q); - msm_jpeg_q_init("input_rtn_q", &pgmn_dev->input_rtn_q); - msm_jpeg_q_init("input_buf_q", &pgmn_dev->input_buf_q); - -#ifdef CONFIG_MSM_IOMMU - j = (pgmn_dev->iommu_cnt <= 1) ? idx : 0; - /*get device context for IOMMU*/ - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - pgmn_dev->iommu_ctx_arr[i] = msm_iommu_get_ctx(iommu_name[j]); - JPEG_DBG("%s:%d] name %s", __func__, __LINE__, iommu_name[j]); - JPEG_DBG("%s:%d] ctx 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->iommu_ctx_arr[i]); - if (!pgmn_dev->iommu_ctx_arr[i]) { - JPEG_PR_ERR("%s: No iommu fw context found\n", - __func__); - goto error; - } - j++; - } - pgmn_dev->domain_num = camera_register_domain(); - JPEG_DBG("%s:%d] dom_num 0x%x", __func__, __LINE__, - pgmn_dev->domain_num); - if (pgmn_dev->domain_num < 0) { - JPEG_PR_ERR("%s: could not register domain\n", __func__); - goto error; - } - pgmn_dev->domain = msm_get_iommu_domain(pgmn_dev->domain_num); - JPEG_DBG("%s:%d] dom 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->domain); - if (!pgmn_dev->domain) { - JPEG_PR_ERR("%s: cannot find domain\n", __func__); - goto error; - } -#endif - - return rc; -#ifdef CONFIG_MSM_IOMMU -error: -#endif - mutex_destroy(&pgmn_dev->lock); - return -EFAULT; -} - -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev) -{ - mutex_destroy(&pgmn_dev->lock); - kfree(pgmn_dev); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.h b/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.h deleted file mode 100644 index 1698f17175c0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/jpeg_10/msm_jpeg_sync.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#ifndef MSM_JPEG_SYNC_H -#define MSM_JPEG_SYNC_H - -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_hw.h" - -#define JPEG_8974_V1 0x10000000 -#define JPEG_8974_V2 0x10010000 - -enum msm_jpeg_state { - MSM_JPEG_INIT, - MSM_JPEG_RESET, - MSM_JPEG_EXECUTING, - MSM_JPEG_STOPPED, - MSM_JPEG_IDLE -}; - -struct msm_jpeg_q { - char const *name; - struct list_head q; - spinlock_t lck; - wait_queue_head_t wait; - int unblck; -}; - -struct msm_jpeg_q_entry { - struct list_head list; - void *data; -}; - -struct msm_jpeg_device { - struct platform_device *pdev; - struct resource *mem; - int irq; - void *base; - struct clk *jpeg_clk[5]; - struct regulator *jpeg_fs; - uint32_t hw_version; - - struct device *device; - struct cdev cdev; - struct mutex lock; - char open_count; - uint8_t op_mode; - - /* event queue including frame done & err indications - */ - struct msm_jpeg_q evt_q; - - /* output return queue - */ - struct msm_jpeg_q output_rtn_q; - - /* output buf queue - */ - struct msm_jpeg_q output_buf_q; - - /* input return queue - */ - struct msm_jpeg_q input_rtn_q; - - /* input buf queue - */ - struct msm_jpeg_q input_buf_q; - - struct v4l2_subdev subdev; - - struct class *msm_jpeg_class; - - dev_t msm_jpeg_devno; - - /*iommu domain and context*/ - int domain_num; - int idx; - struct iommu_domain *domain; - struct device *iommu_ctx_arr[3]; - int iommu_cnt; - int decode_flag; - struct ion_client *jpeg_client; - void *jpeg_vbif; - int release_buf; - struct msm_jpeg_hw_pingpong fe_pingpong_buf; - struct msm_jpeg_hw_pingpong we_pingpong_buf; - int we_pingpong_index; - int reset_done_ack; - spinlock_t reset_lock; - wait_queue_head_t reset_wait; - uint32_t res_size; - uint32_t jpeg_bus_client; - uint32_t num_clk; - enum msm_jpeg_state state; -}; - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev); - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); - -#ifdef CONFIG_COMPAT -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev); - -#endif /* MSM_JPEG_SYNC_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/msm.c b/drivers/media/platform/msm/camera_v2_j5/msm.c deleted file mode 100644 index 01f0343a210b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm.c +++ /dev/null @@ -1,1198 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" -#include - - -static struct v4l2_device *msm_v4l2_dev; -static struct list_head ordered_sd_list; - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -static struct pm_qos_request msm_v4l2_pm_qos_request; -#endif - -static struct msm_queue_head *msm_session_q; - -/* config node envent queue */ -static struct v4l2_fh *msm_eventq; -spinlock_t msm_eventq_lock; - -static struct pid *msm_pid; -spinlock_t msm_pid_lock; -static int module_init_status; -struct msm_cam_dummy_queue { - wait_queue_head_t state_wait; -}; -static struct msm_cam_dummy_queue cam_dummy_queue; - -#define msm_dequeue(queue, type, member) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if ((node) && (&node->member) && (&node->member.next)) \ - list_del_init(&node->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - node; \ -}) - -#define msm_delete_sd_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node->sd == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_delete_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_queue_drain(queue, type, member) do { \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node; \ - spin_lock_irqsave(&__q->lock, flags); \ - while (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if (node) { \ - if (&node->member) \ - list_del_init(&node->member); \ - kzfree(node); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0); - -typedef int (*msm_queue_func)(void *d1, void *d2); -#define msm_queue_traverse_action(queue, type, member, func, data) do {\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - msm_queue_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node && __f) { \ - __f(node, data); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0) - -typedef int (*msm_queue_find_func)(void *d1, void *d2); -#define msm_queue_find(queue, type, member, func, data) ({\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - typeof(node) __ret = NULL; \ - msm_queue_find_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if ((__f) && __f(node, data)) { \ - __ret = node; \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - __ret; \ -}) - -static void msm_init_queue(struct msm_queue_head *qhead) -{ - BUG_ON(!qhead); - - INIT_LIST_HEAD(&qhead->list); - spin_lock_init(&qhead->lock); - qhead->len = 0; - qhead->max = 0; -} - -static void msm_enqueue(struct msm_queue_head *qhead, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&qhead->lock, flags); - qhead->len++; - if (qhead->len > qhead->max) - qhead->max = qhead->len; - list_add_tail(entry, &qhead->list); - spin_unlock_irqrestore(&qhead->lock, flags); -} - -/* index = session id */ -static inline int __msm_queue_find_session(void *d1, void *d2) -{ - struct msm_session *session = d1; - return (session->session_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_stream(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - return (stream->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_command_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *ack = d1; - return (ack->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -static void msm_pm_qos_add_request(void) -{ - pr_err("%s: add request",__func__); - pm_qos_add_request(&msm_v4l2_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); -} - -static void msm_pm_qos_remove_request(void) -{ - pr_err("%s: remove request",__func__); - msm_v4l2_pm_qos_request.type = PM_QOS_REQ_AFFINE_CORES; - msm_v4l2_pm_qos_request.cpus_affine.bits[0] = 0xF0; - - pm_qos_remove_request(&msm_v4l2_pm_qos_request); -} - -void msm_pm_qos_update_request(int val) -{ - pr_err("%s: update request %d",__func__,val); - pm_qos_update_request(&msm_v4l2_pm_qos_request, val); -} -#endif - -struct msm_session *msm_session_find(unsigned int session_id) -{ - struct msm_session *session; - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) - return NULL; - return session; -} - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - stream = kzalloc(sizeof(*stream), GFP_KERNEL); - if (!stream) - return -ENOMEM; - - stream->stream_id = stream_id; - stream->vb2_q = q; - spin_lock_init(&stream->stream_lock); - msm_enqueue(&session->stream_q, &stream->list); - session->stream_q.len++; - - INIT_LIST_HEAD(&stream->queued_list); - - return 0; -} - -void msm_delete_stream(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session = NULL; - struct msm_stream *stream = NULL; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return; - spin_lock_irqsave(&(session->stream_q.lock), flags); - list_del_init(&stream->list); - session->stream_q.len--; - spin_unlock_irqrestore(&(session->stream_q.lock), flags); - kzfree(stream); -} - -static void msm_sd_unregister_subdev(struct video_device *vdev) -{ - struct v4l2_subdev *sd = video_get_drvdata(vdev); - sd->devnode = NULL; - kzfree(vdev); -} - -static inline int __msm_sd_register_subdev(struct v4l2_subdev *sd) -{ - int rc = 0; - struct video_device *vdev; - - if (!msm_v4l2_dev || !sd || !sd->name[0]) - return -EINVAL; - - rc = v4l2_device_register_subdev(msm_v4l2_dev, sd); - if (rc < 0) - return rc; - - /* Register a device node for every subdev marked with the - * V4L2_SUBDEV_FL_HAS_DEVNODE flag. - */ - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE)) - return rc; - - vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); - if (!vdev) { - rc = -ENOMEM; - goto clean_up; - } - - video_set_drvdata(vdev, sd); - strlcpy(vdev->name, sd->name, sizeof(vdev->name)); - vdev->v4l2_dev = msm_v4l2_dev; - vdev->fops = &v4l2_subdev_fops; - vdev->release = msm_sd_unregister_subdev; - rc = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1, - sd->owner); - if (rc < 0) { - kzfree(vdev); - goto clean_up; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - sd->entity.info.v4l.major = VIDEO_MAJOR; - sd->entity.info.v4l.minor = vdev->minor; - sd->entity.name = video_device_node_name(vdev); -#endif - sd->devnode = vdev; - return 0; - -clean_up: - if (sd->devnode) - video_unregister_device(sd->devnode); - return rc; -} - -static void msm_add_sd_in_position(struct msm_sd_subdev *msm_subdev, - struct list_head *sd_list) -{ - struct msm_sd_subdev *temp_sd; - - list_for_each_entry(temp_sd, sd_list, list) { - if (msm_subdev->close_seq < temp_sd->close_seq) { - list_add_tail(&msm_subdev->list, &temp_sd->list); - return; - } - } - list_add_tail(&msm_subdev->list, sd_list); -} - -int msm_sd_register(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - if (WARN_ON(!msm_v4l2_dev) || WARN_ON(!msm_v4l2_dev->dev)) - return -EIO; - - msm_add_sd_in_position(msm_subdev, &ordered_sd_list); - return __msm_sd_register_subdev(&msm_subdev->sd); -} - -int msm_sd_unregister(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - v4l2_device_unregister_subdev(&msm_subdev->sd); - return 0; -} - -int msm_cam_get_module_init_status(void) -{ - int rc; - pr_warn("msm_cam_get_module_init_status : start\n"); - if (module_init_status == 1) - return 0; - while (1) { - rc = wait_event_interruptible(cam_dummy_queue.state_wait, - (module_init_status == 1)); - if (rc == -ETIMEDOUT) - continue; - else if (rc == 0) - break; - } - pr_err("msm_cam_get_module_init_status : end %d\n", rc); - return 0; -} - -int msm_create_session(unsigned int session_id, struct video_device *vdev) -{ - struct msm_session *session = NULL; - - if (!msm_session_q) { - pr_err("%s : session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - session = kzalloc(sizeof(*session), GFP_KERNEL); - if (!session) { - pr_err("%s : Memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - session->session_id = session_id; - session->event_q.vdev = vdev; - msm_init_queue(&session->command_ack_q); - msm_init_queue(&session->stream_q); - msm_enqueue(msm_session_q, &session->list); - mutex_init(&session->lock); - mutex_init(&session->lock_q); - return 0; -} - -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - - if (!msm_session_q) { - pr_err("%s : Session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - mutex_lock(&session->lock); - cmd_ack = kzalloc(sizeof(*cmd_ack), GFP_KERNEL); - if (!cmd_ack) { - mutex_unlock(&session->lock); - pr_err("%s : memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - msm_init_queue(&cmd_ack->command_q); - INIT_LIST_HEAD(&cmd_ack->list); - init_completion(&cmd_ack->wait_complete); - cmd_ack->stream_id = stream_id; - - msm_enqueue(&session->command_ack_q, &cmd_ack->list); - session->command_ack_q.len++; - mutex_unlock(&session->lock); - return 0; -} - -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - mutex_lock(&session->lock); - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, __msm_queue_find_command_ack_q, - &stream_id); - if (!cmd_ack) { - mutex_unlock(&session->lock); - return; - } - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - spin_lock_irqsave(&(session->command_ack_q.lock), flags); - list_del_init(&cmd_ack->list); - kzfree(cmd_ack); - session->command_ack_q.len--; - spin_unlock_irqrestore(&(session->command_ack_q.lock), flags); - mutex_unlock(&session->lock); -} - -static inline int __msm_sd_close_subdevs(struct msm_sd_subdev *msm_sd, - struct msm_sd_close_ioctl *sd_close) -{ - struct v4l2_subdev *sd; - sd = &msm_sd->sd; - pr_debug("%s: Shutting down subdev %s", __func__, sd->name); - - v4l2_subdev_call(sd, core, ioctl, MSM_SD_SHUTDOWN, sd_close); - v4l2_subdev_call(sd, core, s_power, 0); - - return 0; -} - -static inline int __msm_destroy_session_streams(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - pr_err("%s: Error: Destroyed list is not empty\n", __func__); - INIT_LIST_HEAD(&stream->queued_list); - return 0; -} - -static void msm_destroy_session_streams(struct msm_session *session) -{ - - if (!session) - return; - - msm_queue_traverse_action(&session->stream_q, struct msm_stream, list, - __msm_destroy_session_streams, NULL); - - msm_queue_drain(&session->stream_q, struct msm_stream, list); -} - -static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *cmd_ack = d1; - - if (!(&cmd_ack->command_q)) - return 0; - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - return 0; -} - -static void msm_remove_session_cmd_ack_q(struct msm_session *session) -{ - if ((!session) || !(&session->command_ack_q)) - return; - - mutex_lock(&session->lock); - /* to ensure error handling purpose, it needs to detach all subdevs - * which are being connected to streams */ - msm_queue_traverse_action(&session->command_ack_q, - struct msm_command_ack, list, - __msm_remove_session_cmd_ack_q, NULL); - - msm_queue_drain(&session->command_ack_q, struct msm_command_ack, list); - - mutex_unlock(&session->lock); -} - -int msm_destroy_session(unsigned int session_id) -{ - struct msm_session *session; - struct v4l2_subdev *buf_mgr_subdev; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - msm_destroy_session_streams(session); - msm_remove_session_cmd_ack_q(session); - mutex_destroy(&session->lock); - mutex_destroy(&session->lock_q); - msm_delete_entry(msm_session_q, struct msm_session, - list, session); - buf_mgr_subdev = msm_buf_mngr_get_subdev(); - if (buf_mgr_subdev) { - v4l2_subdev_call(buf_mgr_subdev, core, ioctl, - MSM_SD_SHUTDOWN, NULL); - } else { - pr_err("%s: Buff manger device node is NULL\n", __func__); - } - - return 0; -} - -static int __msm_close_destry_session_notify_apps(void *d1, void *d2) -{ - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct msm_session *session = d1; - - event.type = MSM_CAMERA_V4L2_EVENT_TYPE; - event.id = MSM_CAMERA_MSM_NOTIFY; - event_data->command = MSM_CAMERA_PRIV_SHUTDOWN; - - v4l2_event_queue(session->event_q.vdev, &event); - - return 0; -} - -static long msm_private_ioctl(struct file *file, void *fh, - bool valid_prio, unsigned int cmd, void *arg) -{ - int rc = 0; - struct msm_v4l2_event_data *event_data = arg; - struct v4l2_event event; - struct msm_session *session; - unsigned int session_id; - unsigned int stream_id; - unsigned long spin_flags = 0; - - if (cmd == MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS) { - module_init_status = *(int *) arg; - if (module_init_status) - wake_up(&cam_dummy_queue.state_wait); - return rc; - } - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - - if (!session) - return -EINVAL; - - switch (cmd) { - case MSM_CAM_V4L2_IOCTL_NOTIFY: { - if (WARN_ON(!session->event_q.vdev)) { - rc = -EFAULT; - break; - } - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - v4l2_event_queue(session->event_q.vdev, - &event); - } - break; - - case MSM_CAM_V4L2_IOCTL_CMD_ACK: { - struct msm_command_ack *cmd_ack; - struct msm_command *ret_cmd; - - ret_cmd = kzalloc(sizeof(*ret_cmd), GFP_KERNEL); - if (!ret_cmd) { - rc = -ENOMEM; - break; - } - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, - &stream_id); - if (WARN_ON(!cmd_ack)) { - kzfree(ret_cmd); - rc = -EFAULT; - break; - } - - spin_lock_irqsave(&(session->command_ack_q.lock), - spin_flags); - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - memcpy(&ret_cmd->event, &event, sizeof(struct v4l2_event)); - msm_enqueue(&cmd_ack->command_q, &ret_cmd->list); - complete(&cmd_ack->wait_complete); - spin_unlock_irqrestore(&(session->command_ack_q.lock), - spin_flags); - } - break; - - case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR: - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, - struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - break; - - default: - rc = -ENOTTY; - break; - } - - return rc; -} - -static int msm_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static int msm_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, 5, NULL); -} - -static const struct v4l2_ioctl_ops g_msm_ioctl_ops = { - .vidioc_subscribe_event = msm_subscribe_event, - .vidioc_unsubscribe_event = msm_unsubscribe_event, - .vidioc_default = msm_private_ioctl, -}; - -static unsigned int msm_poll(struct file *f, - struct poll_table_struct *pll_table) -{ - int rc = 0; - struct v4l2_fh *eventq = f->private_data; - - BUG_ON(!eventq); - - poll_wait(f, &eventq->wait, pll_table); - - if (v4l2_event_pending(eventq)) - rc = POLLIN | POLLRDNORM; - - return rc; -} - -static void msm_print_event_error(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - pr_err("Evt_type=%x Evt_id=%d Evt_cmd=%x\n", event->type, - event->id, event_data->command); - pr_err("Evt_session_id=%d Evt_stream_id=%d Evt_arg=%d\n", - event_data->session_id, event_data->stream_id, - event_data->arg_value); -} - -/* something seriously wrong if msm_close is triggered - * !!! user space imaging server is shutdown !!! - */ -int msm_post_event(struct v4l2_event *event, int timeout) -{ - int rc = 0; - struct video_device *vdev; - struct msm_session *session; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_command_ack *cmd_ack; - struct msm_command *cmd; - int session_id, stream_id; - unsigned long flags = 0; - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - spin_lock_irqsave(&msm_eventq_lock, flags); - if (!msm_eventq) { - spin_unlock_irqrestore(&msm_eventq_lock, flags); - pr_err("%s : msm event queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - spin_unlock_irqrestore(&msm_eventq_lock, flags); - - vdev = msm_eventq->vdev; - - /* send to imaging server and wait for ACK */ - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) { - pr_err("%s : session not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - mutex_lock(&session->lock); - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, &stream_id); - if (WARN_ON(!cmd_ack)) { - mutex_unlock(&session->lock); - pr_err("%s : cmd_ack not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - - /*re-init wait_complete */ - INIT_COMPLETION(cmd_ack->wait_complete); - - v4l2_event_queue(vdev, event); - - if (timeout < 0) { - mutex_unlock(&session->lock); - pr_err("%s : timeout cannot be negative Line %d\n", - __func__, __LINE__); - return rc; - } - - /* should wait on session based condition */ - rc = wait_for_completion_timeout(&cmd_ack->wait_complete, - msecs_to_jiffies(timeout)); - - - if (list_empty_careful(&cmd_ack->command_q.list)) { - if (!rc) { - pr_err("%s: Timed out\n", __func__); - msm_print_event_error(event); - rc = -ETIMEDOUT; - } else { - pr_err("%s: Error: No timeout but list empty!", - __func__); - msm_print_event_error(event); - mutex_unlock(&session->lock); - return -EINVAL; - } - } - - cmd = msm_dequeue(&cmd_ack->command_q, - struct msm_command, list); - if (!cmd) { - mutex_unlock(&session->lock); - pr_err("%s : cmd dequeue failed Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - event_data = (struct msm_v4l2_event_data *)cmd->event.u.data; - - /* compare cmd_ret and event */ - if (WARN_ON(event->type != cmd->event.type) || - WARN_ON(event->id != cmd->event.id)) { - pr_err("%s : Either event type or id didnot match Line %d\n", - __func__, __LINE__); - pr_err("%s : event->type %d event->id %d\n", __func__, - event->type, event->id); - pr_err("%s : cmd->event.type %d cmd->event.id %d\n", __func__, - cmd->event.type, cmd->event.id); - rc = -EINVAL; - } - - *event = cmd->event; - - kzfree(cmd); - mutex_unlock(&session->lock); - return rc; -} - -static int msm_close(struct file *filep) -{ - int rc = 0; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - struct msm_sd_close_ioctl sd_close; - struct msm_sd_subdev *msm_sd; - - /*stop all hardware blocks immediately*/ - if (!list_empty(&msm_v4l2_dev->subdevs)) - list_for_each_entry(msm_sd, &ordered_sd_list, list) - __msm_sd_close_subdevs(msm_sd, &sd_close); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* remove msm_v4l2_pm_qos_request */ - msm_pm_qos_remove_request(); -#endif - - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = NULL; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - v4l2_fh_release(filep); - - spin_lock_irqsave(&msm_pid_lock, flags); - put_pid(msm_pid); - msm_pid = NULL; - spin_unlock_irqrestore(&msm_pid_lock, flags); - - atomic_set(&pvdev->opened, 0); - - return rc; -} - -static inline void msm_list_switch(struct list_head *l1, - struct list_head *l2) -{ - l1->next = l2->next; - l2->prev = l1->prev; - l1->prev->next = l2; - l2->next->prev = l1; - l1->prev = l2; - l2->next = l1; -} - -static int msm_open(struct file *filep) -{ - int rc; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - BUG_ON(!pvdev); - - /* !!! only ONE open is allowed !!! */ - if (atomic_read(&pvdev->opened)) - return -EBUSY; - - atomic_set(&pvdev->opened, 1); - - spin_lock_irqsave(&msm_pid_lock, flags); - msm_pid = get_pid(task_pid(current)); - spin_unlock_irqrestore(&msm_pid_lock, flags); - - /* create event queue */ - rc = v4l2_fh_open(filep); - if (rc < 0) - return rc; - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = filep->private_data; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* register msm_v4l2_pm_qos_request */ - msm_pm_qos_add_request(); -#endif - - return rc; -} - -static struct v4l2_file_operations msm_fops = { - .owner = THIS_MODULE, - .open = msm_open, - .poll = msm_poll, - .release = msm_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = video_ioctl2, -#endif -}; - -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return ERR_PTR(-EINVAL); - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - - if (!stream) - return ERR_PTR(-EINVAL); - - return stream; -} - -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return NULL; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return NULL; - - return stream->vb2_q; -} - -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - unsigned long flags1; - unsigned long flags2; - spin_lock_irqsave(&msm_session_q->lock, flags1); - list_for_each_entry(session, &(msm_session_q->list), list) { - spin_lock_irqsave(&(session->stream_q.lock), flags2); - list_for_each_entry( - stream, &(session->stream_q.list), list) { - if (stream->vb2_q == q) { - spin_unlock_irqrestore - (&(session->stream_q.lock), flags2); - spin_unlock_irqrestore - (&msm_session_q->lock, flags1); - return stream; - } - } - spin_unlock_irqrestore(&(session->stream_q.lock), flags2); - } - spin_unlock_irqrestore(&msm_session_q->lock, flags1); - return NULL; -} - -static struct v4l2_subdev *msm_sd_find(const char *name) -{ - unsigned long flags; - struct v4l2_subdev *subdev = NULL; - struct v4l2_subdev *subdev_out = NULL; - - spin_lock_irqsave(&msm_v4l2_dev->lock, flags); - if (!list_empty(&msm_v4l2_dev->subdevs)) { - list_for_each_entry(subdev, &msm_v4l2_dev->subdevs, list) - if (!strcmp(name, subdev->name)) { - subdev_out = subdev; - break; - } - } - spin_unlock_irqrestore(&msm_v4l2_dev->lock, flags); - - return subdev_out; -} - -static void msm_sd_notify(struct v4l2_subdev *sd, - unsigned int notification, void *arg) -{ - int rc = 0; - struct v4l2_subdev *subdev = NULL; - - BUG_ON(!sd); - BUG_ON(!arg); - - /* Check if subdev exists before processing*/ - if (!msm_sd_find(sd->name)) - return; - - switch (notification) { - case MSM_SD_NOTIFY_GET_SD: { - struct msm_sd_req_sd *get_sd = arg; - - get_sd->subdev = msm_sd_find(get_sd->name); - /* TODO: might need to add ref count on ret_sd */ - } - break; - - case MSM_SD_NOTIFY_PUT_SD: { - struct msm_sd_req_sd *put_sd = arg; - subdev = msm_sd_find(put_sd->name); - } - break; - - case MSM_SD_NOTIFY_REQ_CB: { - struct msm_sd_req_vb2_q *req_sd = arg; - rc = msm_vb2_request_cb(req_sd); - if (rc < 0) - return; - } - break; - - default: - break; - } -} - -static int msm_probe(struct platform_device *pdev) -{ - struct msm_video_device *pvdev; - int rc = 0; - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CONFIGURATION_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - msm_v4l2_dev->notify = msm_sd_notify; - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-config", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops; - pvdev->vdev->ioctl_ops = &g_msm_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - msm_session_q = kzalloc(sizeof(*msm_session_q), GFP_KERNEL); - if (WARN_ON(!msm_session_q)) - goto v4l2_fail; - - msm_init_queue(msm_session_q); - spin_lock_init(&msm_eventq_lock); - spin_lock_init(&msm_pid_lock); - INIT_LIST_HEAD(&ordered_sd_list); - init_waitqueue_head(&cam_dummy_queue.state_wait); - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static const struct of_device_id msm_dt_match[] = { - {.compatible = "qcom,msm-cam"}, - {} -} - -MODULE_DEVICE_TABLE(of, msm_dt_match); - -static struct platform_driver msm_driver = { - .probe = msm_probe, - .driver = { - .name = "msm", - .owner = THIS_MODULE, - .of_match_table = msm_dt_match, - }, -}; - -static int __init msm_init(void) -{ - return platform_driver_register(&msm_driver); -} - -static void __exit msm_exit(void) -{ - platform_driver_unregister(&msm_driver); -} - - -module_init(msm_init); -module_exit(msm_exit); -MODULE_DESCRIPTION("MSM V4L2 Camera"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/msm.h b/drivers/media/platform/msm/camera_v2_j5/msm.h deleted file mode 100644 index ca07c0419458..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_H -#define _MSM_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/media/msmb_camera.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define MSM_POST_EVT_TIMEOUT 40000 -#else -#define MSM_POST_EVT_TIMEOUT 5000 -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -enum CAMERA_TUNING -{ -NORMAL_MODE, -REAR_TUNING, -FRONT_TUNING, -REAR_FRONT_TUNING -}; -#endif - -#define MSM_POST_EVT_NOTIMEOUT 0xFFFFFFFF -#define MSM_CAMERA_STREAM_CNT_BITS 32 - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_DISABLE_PC_LATENCY 200 -#define CAMERA_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE -#endif - -struct msm_video_device { - struct video_device *vdev; - atomic_t opened; -}; - -struct msm_queue_head { - struct list_head list; - spinlock_t lock; - int len; - int max; -}; - -/** msm_event: - * - * event sent by imaging server - **/ -struct msm_event { - struct video_device *vdev; - atomic_t on_heap; -}; - -struct msm_command { - struct list_head list; - struct v4l2_event event; - atomic_t on_heap; -}; - -/** struct msm_command_ack - * - * Object of command_ack_q, which is - * created per open operation - * - * contains struct msm_command - **/ -struct msm_command_ack { - struct list_head list; - struct msm_queue_head command_q; - struct completion wait_complete; - int stream_id; -}; - -struct msm_v4l2_subdev { - /* FIXME: for session close and error handling such - * as daemon shutdown */ - int close_sequence; -}; - -struct msm_session { - struct list_head list; - - /* session index */ - unsigned int session_id; - - /* event queue sent by imaging server */ - struct msm_event event_q; - - /* ACK by imaging server. Object type of - * struct msm_command_ack per open, - * assumption is application can send - * command on every opened video node */ - struct msm_queue_head command_ack_q; - - /* real streams(either data or metadate) owned by one - * session struct msm_stream */ - struct msm_queue_head stream_q; - struct mutex lock; - struct mutex lock_q; -}; - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -void msm_pm_qos_update_request(int val); -#endif - -int msm_cam_get_module_init_status(void); -int msm_post_event(struct v4l2_event *event, int timeout); -int msm_create_session(unsigned int session, struct video_device *vdev); -int msm_destroy_session(unsigned int session_id); - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q); -void msm_delete_stream(unsigned int session_id, unsigned int stream_id); -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id); -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id); -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id); -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id); -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q); -struct msm_session *msm_session_find(unsigned int session_id); -#endif /*_MSM_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/Makefile b/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/Makefile deleted file mode 100644 index c5c0b9dd70a1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -obj-$(CONFIG_MSMB_CAMERA) += msm_generic_buf_mgr.o diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.c b/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.c deleted file mode 100644 index eb385616d75d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.c +++ /dev/null @@ -1,352 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include "msm_generic_buf_mgr.h" - -static struct msm_buf_mngr_device *msm_buf_mngr_dev; - -struct v4l2_subdev *msm_buf_mngr_get_subdev(void) -{ - return &msm_buf_mngr_dev->subdev.sd; -} - -static int32_t msm_buf_mngr_get_buf(struct msm_buf_mngr_device *buf_mngr_dev, - void __user *argp) -{ - unsigned long flags; - struct msm_buf_mngr_info *buf_info = - (struct msm_buf_mngr_info *)argp; - struct msm_get_bufs *new_entry = - kzalloc(sizeof(struct msm_get_bufs), GFP_KERNEL); - - if (!new_entry) { - pr_err("%s:No mem\n", __func__); - return -ENOMEM; - } - INIT_LIST_HEAD(&new_entry->entry); - new_entry->vb2_buf = buf_mngr_dev->vb2_ops.get_buf(buf_info->session_id, - buf_info->stream_id); - if (!new_entry->vb2_buf) { - pr_debug("%s:Get buf is null\n", __func__); - kfree(new_entry); - return -EINVAL; - } - new_entry->session_id = buf_info->session_id; - new_entry->stream_id = buf_info->stream_id; - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_add_tail(&new_entry->entry, &buf_mngr_dev->buf_qhead); - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - buf_info->index = new_entry->vb2_buf->v4l2_buf.index; - return 0; -} - -static int32_t msm_buf_mngr_buf_done(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - bufs->vb2_buf->v4l2_buf.sequence = buf_info->frame_id; - bufs->vb2_buf->v4l2_buf.timestamp = buf_info->timestamp; - bufs->vb2_buf->v4l2_buf.reserved = 0; - ret = buf_mngr_dev->vb2_ops.buf_done - (bufs->vb2_buf, - buf_info->session_id, - buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - - -static int32_t msm_buf_mngr_put_buf(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - ret = buf_mngr_dev->vb2_ops.put_buf(bufs->vb2_buf, - buf_info->session_id, buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - -static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *buf_mngr_dev) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - if (!list_empty(&buf_mngr_dev->buf_qhead)) { - list_for_each_entry_safe(bufs, - save, &buf_mngr_dev->buf_qhead, entry) { - pr_err("%s: Error delete invalid bufs =%x, ses_id=%d, str_id=%d, idx=%d\n", - __func__, (unsigned int)bufs, bufs->session_id, - bufs->stream_id, bufs->vb2_buf->v4l2_buf.index); - list_del_init(&bufs->entry); - kfree(bufs); - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); -} - -static int msm_generic_buf_mngr_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static int msm_generic_buf_mngr_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static long msm_buf_mngr_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - rc = msm_buf_mngr_get_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - rc = msm_buf_mngr_buf_done(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = msm_buf_mngr_put_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_INIT: - rc = msm_generic_buf_mngr_open(sd, NULL); - break; - case VIDIOC_MSM_BUF_MNGR_DEINIT: - rc = msm_generic_buf_mngr_close(sd, NULL); - break; - case MSM_SD_SHUTDOWN: - msm_buf_mngr_sd_shutdown(buf_mngr_dev); - break; - default: - return -ENOIOCTLCMD; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - int32_t rc = 0; - - void __user *up = compat_ptr(arg); - - struct msm_buf_mngr_info32_t *buf_info32 = NULL; - struct msm_buf_mngr_info *buf_info; - - if (copy_from_user(buf_info32, (void __user *)up, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - buf_info->session_id = buf_info32->session_id; - buf_info->stream_id = buf_info32->stream_id; - buf_info->frame_id = buf_info32->frame_id; - buf_info->index = buf_info32->index; - buf_info->timestamp.tv_sec = (long) buf_info32->timestamp.tv_sec; - buf_info->timestamp.tv_usec = (long) buf_info32->timestamp.tv_usec; - - /* Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's - * except VIDIOC_MSM_CPP_CFG32, which needs special - * processing - */ - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_GET_BUF; - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE32: - cmd = VIDIOC_MSM_BUF_MNGR_BUF_DONE; - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_PUT_BUF; - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = v4l2_subdev_call(sd, core, ioctl, cmd, buf_info); - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - buf_info32->session_id = buf_info->session_id; - buf_info32->stream_id = buf_info->stream_id; - buf_info32->index = buf_info->index; - buf_info32->timestamp.tv_sec = (int32_t) buf_info->timestamp.tv_sec; - buf_info32->timestamp.tv_usec = (int32_t) buf_info->timestamp.tv_usec; - - if (copy_to_user((void __user *)up, buf_info32, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - return 0; -} -#endif - -static struct v4l2_subdev_core_ops msm_buf_mngr_subdev_core_ops = { - .ioctl = msm_buf_mngr_subdev_ioctl, -}; - -static const struct v4l2_subdev_internal_ops - msm_generic_buf_mngr_subdev_internal_ops = { - .open = msm_generic_buf_mngr_open, - .close = msm_generic_buf_mngr_close, -}; - -static const struct v4l2_subdev_ops msm_buf_mngr_subdev_ops = { - .core = &msm_buf_mngr_subdev_core_ops, -}; - -static const struct of_device_id msm_buf_mngr_dt_match[] = { - {.compatible = "qcom,msm_buf_mngr"}, - {} -}; - -static struct v4l2_file_operations msm_buf_v4l2_subdev_fops; - -static long msm_bmgr_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); -} - - -static long msm_buf_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_bmgr_subdev_do_ioctl); -} - -static int32_t __init msm_buf_mngr_init(void) -{ - int32_t rc = 0; - msm_buf_mngr_dev = kzalloc(sizeof(*msm_buf_mngr_dev), - GFP_KERNEL); - if (WARN_ON(!msm_buf_mngr_dev)) { - pr_err("%s: not enough memory", __func__); - return -ENOMEM; - } - /* Sub-dev */ - v4l2_subdev_init(&msm_buf_mngr_dev->subdev.sd, - &msm_buf_mngr_subdev_ops); - - msm_buf_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_buf_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_buf_v4l2_subdev_fops.unlocked_ioctl = msm_buf_subdev_fops_ioctl; - msm_buf_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_buf_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - -#ifdef CONFIG_COMPAT - msm_buf_v4l2_subdev_fops.compat_ioctl32 = - msm_bmgr_subdev_fops_compat_ioctl; -#endif - snprintf(msm_buf_mngr_dev->subdev.sd.name, - ARRAY_SIZE(msm_buf_mngr_dev->subdev.sd.name), "msm_buf_mngr"); - msm_buf_mngr_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - v4l2_set_subdevdata(&msm_buf_mngr_dev->subdev.sd, msm_buf_mngr_dev); - - media_entity_init(&msm_buf_mngr_dev->subdev.sd.entity, 0, NULL, 0); - msm_buf_mngr_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_buf_mngr_dev->subdev.sd.entity.group_id = - MSM_CAMERA_SUBDEV_BUF_MNGR; - msm_buf_mngr_dev->subdev.sd.internal_ops = - &msm_generic_buf_mngr_subdev_internal_ops; - msm_buf_mngr_dev->subdev.close_seq = MSM_SD_CLOSE_4TH_CATEGORY; - rc = msm_sd_register(&msm_buf_mngr_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto end; - } - - msm_buf_mngr_dev->subdev.sd.devnode->fops = &msm_buf_v4l2_subdev_fops; - - v4l2_subdev_notify(&msm_buf_mngr_dev->subdev.sd, MSM_SD_NOTIFY_REQ_CB, - &msm_buf_mngr_dev->vb2_ops); - - INIT_LIST_HEAD(&msm_buf_mngr_dev->buf_qhead); - spin_lock_init(&msm_buf_mngr_dev->buf_q_spinlock); -end: - return rc; -} - -static void __exit msm_buf_mngr_exit(void) -{ - kfree(msm_buf_mngr_dev); -} - -module_init(msm_buf_mngr_init); -module_exit(msm_buf_mngr_exit); -MODULE_DESCRIPTION("MSM Buffer Manager"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.h b/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.h deleted file mode 100644 index 754c8a078960..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_buf_mgr/msm_generic_buf_mgr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_BUF_GENERIC_MNGR_H__ -#define __MSM_BUF_GENERIC_MNGR_H__ - -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include - -#include "msm.h" -#include "msm_sd.h" - -struct msm_get_bufs { - struct list_head entry; - struct vb2_buffer *vb2_buf; - uint32_t session_id; - uint32_t stream_id; -}; - -struct msm_buf_mngr_device { - struct list_head buf_qhead; - spinlock_t buf_q_spinlock; - struct msm_sd_subdev subdev; - struct msm_sd_req_vb2_q vb2_ops; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_sd.h b/drivers/media/platform/msm/camera_v2_j5/msm_sd.h deleted file mode 100644 index 9ab74f4a6ce1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_sd.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_SD_H -#define _MSM_SD_H - -#include -#include "include/media/msmb_camera.h" - -/* NOTE: this header file should ONLY be included by subdev drivers */ - -struct msm_sd_close_ioctl { - unsigned int session; - unsigned int stream; -}; - -#define MSM_SD_CLOSE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 26, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 27, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION_AND_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 28, struct msm_sd_close_ioctl) - -#define MSM_SD_SHUTDOWN \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 29, struct msm_sd_close_ioctl) - -/* - * This is used to install Sequence in msm_sd_register. - * During msm_close, proper close sequence will be triggered. - * For example: - * - * close_sequence = 0x00100001 (ISP) - * close_sequence = 0x00100002 (ISP) - * close_sequence = 0x00100003 (ISP) - * close_sequence = 0x00200001 (sensor) - * close_sequence = 0x00200002 (sensor) - * close_sequence = 0x00200003 (sensor) - */ -#define MSM_SD_CLOSE_1ST_CATEGORY 0x00010000 -#define MSM_SD_CLOSE_2ND_CATEGORY 0x00020000 -#define MSM_SD_CLOSE_3RD_CATEGORY 0x00030000 -#define MSM_SD_CLOSE_4TH_CATEGORY 0x00040000 - -struct msm_sd_subdev { - struct v4l2_subdev sd; - int close_seq; - struct list_head list; -}; - -struct msm_sd_req_sd { - char *name; - struct v4l2_subdev *subdev; -}; - -struct msm_sd_req_vb2_q { - struct vb2_buffer *(*get_buf)(int session_id, unsigned int stream_id); - struct vb2_queue *(*get_vb2_queue)(int session_id, - unsigned int stream_id); - int (*put_buf)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); - int (*buf_done)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); -}; - -#define MSM_SD_NOTIFY_GET_SD 0x00000001 -#define MSM_SD_NOTIFY_PUT_SD 0x00000002 -#define MSM_SD_NOTIFY_REQ_CB 0x00000003 - -int msm_sd_register(struct msm_sd_subdev *msm_subdev); -int msm_sd_unregister(struct msm_sd_subdev *sd); -struct v4l2_subdev *msm_sd_get_subdev(struct v4l2_subdev *sd, - const char *get_name); -void msm_sd_put_subdev(struct v4l2_subdev *sd, struct v4l2_subdev *put); - -#endif /*_MSM_SD_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/Makefile b/drivers/media/platform/msm/camera_v2_j5/msm_vb2/Makefile deleted file mode 100644 index d79fd4ac82bd..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2.o diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.c b/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.c deleted file mode 100644 index 6e9336a20d29..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "msm_vb2.h" - -static int msm_vb2_queue_setup(struct vb2_queue *q, - const struct v4l2_format *fmt, - unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) -{ - int i; - struct msm_v4l2_format_data *data = q->drv_priv; - - if (!data) { - pr_err("%s: drv_priv NULL\n", __func__); - return -EINVAL; - } - if (data->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - if (WARN_ON(data->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - - *num_planes = data->num_planes; - - for (i = 0; i < data->num_planes; i++) - sizes[i] = data->plane_sizes[i]; - } else { - pr_err("%s: Unsupported buf type :%d\n", __func__, - data->type); - return -EINVAL; - } - return 0; -} - -int msm_vb2_buf_init(struct vb2_buffer *vb) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2_buf; - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s: Couldn't find stream\n", __func__); - return -EINVAL; - } - msm_vb2_buf = container_of(vb, struct msm_vb2_buffer, vb2_buf); - msm_vb2_buf->in_freeq = 0; - - return 0; -} - -static void msm_vb2_buf_queue(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_add_tail(&msm_vb2->list, &stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static int msm_vb2_buf_finish(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - struct msm_vb2_buffer *msm_vb2_entry, *temp; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return -EINVAL; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return -EINVAL; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_for_each_entry_safe(msm_vb2_entry, temp, &(stream->queued_list), - list) { - if (msm_vb2_entry == msm_vb2) { - list_del_init(&msm_vb2_entry->list); - break; - } - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return 0; -} - -static void msm_vb2_buf_cleanup(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2 NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - INIT_LIST_HEAD(&stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static struct vb2_ops msm_vb2_get_q_op = { - .queue_setup = msm_vb2_queue_setup, - .buf_init = msm_vb2_buf_init, - .buf_queue = msm_vb2_buf_queue, - .buf_cleanup = msm_vb2_buf_cleanup, - .buf_finish = msm_vb2_buf_finish, -}; - - -struct vb2_ops *msm_vb2_get_q_ops(void) -{ - return &msm_vb2_get_q_op; -} - -static void *msm_vb2_dma_contig_get_userptr(void *alloc_ctx, - unsigned long vaddr, unsigned long size, int write) -{ - struct msm_vb2_private_data *priv; - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) - return ERR_PTR(-ENOMEM); - priv->vaddr = (void *)vaddr; - priv->size = size; - priv->alloc_ctx = alloc_ctx; - return priv; -} - -static void msm_vb2_dma_contig_put_userptr(void *buf_priv) -{ - kzfree(buf_priv); -} - -static struct vb2_mem_ops msm_vb2_get_q_mem_op = { - .get_userptr = msm_vb2_dma_contig_get_userptr, - .put_userptr = msm_vb2_dma_contig_put_userptr, -}; - -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void) -{ - return &msm_vb2_get_q_mem_op; -} - -static struct vb2_queue *msm_vb2_get_queue(int session_id, - unsigned int stream_id) -{ - return msm_get_stream_vb2q(session_id, stream_id); -} - -static struct vb2_buffer *msm_vb2_get_buf(int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - struct msm_vb2_buffer *msm_vb2 = NULL; - unsigned long flags; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return NULL; - - spin_lock_irqsave(&stream->stream_lock, flags); - - if (!stream->vb2_q) { - pr_err("%s: stream q not available\n", __func__); - goto end; - } - - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf->state != VB2_BUF_STATE_ACTIVE) - continue; - - if (msm_vb2->in_freeq) - continue; - - msm_vb2->in_freeq = 1; - goto end; - } - msm_vb2 = NULL; - vb2_buf = NULL; -end: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return vb2_buf; -} - -static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2; - int rc = 0; - unsigned long flags; - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return -EINVAL; - - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - if (msm_vb2->in_freeq) { - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s: VB buffer is null\n", __func__); - rc = -EINVAL; - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -static int msm_vb2_buf_done(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - unsigned long flags; - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - int rc = 0; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return 0; - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf == vb) - break; - } - if (vb2_buf != vb) { - pr_err("%s:%d VB buffer is INVALID vb=%x, ses_id=%d, str_id=%d\n", - __func__, __LINE__, (unsigned int)vb, - session_id, stream_id); - rc = -EINVAL; - goto out; - } - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - /* put buf before buf done */ - if (msm_vb2->in_freeq) { - vb2_buffer_done(vb, VB2_BUF_STATE_DONE); - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s:%d VB buffer is NULL for ses_id=%d, str_id=%d\n", - __func__, __LINE__, session_id, stream_id); - rc = -EINVAL; - } -out: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req) -{ - if (!req) { - pr_err("%s: suddev is null\n", __func__); - return -EINVAL; - } - - req->get_buf = msm_vb2_get_buf; - req->get_vb2_queue = msm_vb2_get_queue; - req->put_buf = msm_vb2_put_buf; - req->buf_done = msm_vb2_buf_done; - - return 0; -} - diff --git a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.h b/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.h deleted file mode 100644 index e4b7c670a8d1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/msm_vb2/msm_vb2.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_VB_H -#define _MSM_VB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include -#include "msm.h" -#include "msm_sd.h" - -struct msm_vb2_buffer { - /* - * vb2 buffer has to be first in the structure - * because both v4l2 frameworks and driver directly - * cast msm_vb2_buffer to a vb2_buf. - */ - struct vb2_buffer vb2_buf; - struct list_head list; - int in_freeq; -}; - -struct msm_vb2_private_data { - void *vaddr; - unsigned long size; - /* Offset of the plane inside the buffer */ - void *alloc_ctx; -}; - -struct msm_stream { - struct list_head list; - - /* stream index per session, same - * as stream_id but set through s_parm */ - unsigned int stream_id; - /* vb2 buffer handling */ - struct vb2_queue *vb2_q; - spinlock_t stream_lock; - struct list_head queued_list; -}; - -struct vb2_ops *msm_vb2_get_q_ops(void); -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void); -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req_sd); - -#endif /*_MSM_VB_H */ diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/Makefile b/drivers/media/platform/msm/camera_v2_j5/pproc/Makefile deleted file mode 100644 index 4193adc173f7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_MSMB_CAMERA) += cpp/ -obj-$(CONFIG_MSMB_CAMERA) += vpe/ diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/Makefile b/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/Makefile deleted file mode 100644 index 96af8947ee61..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/isp/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSM_CPP) += msm_cpp.o diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.c deleted file mode 100644 index 4ba770f24567..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.c +++ /dev/null @@ -1,2291 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-CPP %s:%d " fmt, __func__, __LINE__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_camera.h" -#include -#include "../../include/media/msmb_pproc.h" -#include -#include "msm_cpp.h" -#include "msm_isp_util.h" -#include "msm_camera_io_util.h" -#include - -#define MSM_CPP_DRV_NAME "msm_cpp" - -#define MSM_CPP_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_CPP_DBG 0 - -#define ENABLE_CPP_LOW 0 - -#define CPP_CMD_TIMEOUT_MS 300 - -#define MSM_CPP_CORE_CLK_IDX 4 -#define MSM_MICRO_IFACE_CLK_IDX 7 - -#define MSM_CPP_NOMINAL_CLOCK 266670000 -#define MSM_CPP_TURBO_CLOCK 320000000 - -#define CPP_FW_VERSION_1_2_0 0x10020000 -#define CPP_FW_VERSION_1_4_0 0x10040000 -#define CPP_FW_VERSION_1_6_0 0x10060000 - -/* stripe information offsets in frame command */ -#define STRIPE_BASE_FW_1_2_0 130 -#define STRIPE_BASE_FW_1_4_0 140 -#define STRIPE_BASE_FW_1_6_0 464 - - -/* dump the frame command before writing to the hardware */ -#define MSM_CPP_DUMP_FRM_CMD 0 - -#define CPP_CLK_INFO_MAX 16 - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info); - -#if CONFIG_MSM_CPP_DBG -#define CPP_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CPP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define CPP_LOW(fmt, args...) do { \ - if (ENABLE_CPP_LOW) \ - pr_info(fmt, ##args); \ - } while (0) - -#define ERR_USER_COPY(to) pr_err("copy %s user\n", \ - ((to) ? "to" : "from")) -#define ERR_COPY_FROM_USER() ERR_USER_COPY(0) - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ -}) - -struct msm_cpp_timer_data_t { - struct cpp_device *cpp_dev; - struct msm_cpp_frame_info_t *processed_frame; -}; - -struct msm_cpp_timer_t { - atomic_t used; - struct msm_cpp_timer_data_t data; - struct timer_list cpp_timer; -}; - -struct msm_cpp_timer_t cpp_timer; - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - CPP_DBG("E\n"); - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_info("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - CPP_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -#define msm_cpp_empty_list(queue, member) { \ - unsigned long flags; \ - struct msm_queue_cmd *qcmd = NULL; \ - if (queue) { \ - spin_lock_irqsave(&queue->lock, flags); \ - while (!list_empty(&queue->list)) { \ - queue->len--; \ - qcmd = list_first_entry(&queue->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - kfree(qcmd); \ - } \ - spin_unlock_irqrestore(&queue->lock, flags); \ - } \ -} - -static struct msm_cam_clk_info cpp_clk_info[CPP_CLK_INFO_MAX]; - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev); -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin); -static void cpp_timer_callback(unsigned long data); - -uint8_t induce_error; -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev); - -static void msm_cpp_write(u32 data, void __iomem *cpp_base) -{ - writel_relaxed((data), cpp_base + MSM_CPP_MICRO_FIFO_RX_DATA); -} - -static uint32_t msm_cpp_read(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - do { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_STAT); - } while (((tmp & 0x2) == 0x0) && (retry++ < 10)) ; - if (retry < 10) { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_DATA); - CPP_DBG("Read data: 0%x\n", tmp); - } else { - CPP_DBG("Read failed\n"); - tmp = 0xDEADBEEF; - } - - return tmp; -} - -static struct msm_cpp_buff_queue_info_t *msm_cpp_get_buff_queue_entry( - struct cpp_device *cpp_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if ((cpp_dev->buff_queue[i].used == 1) && - (cpp_dev->buff_queue[i].session_id == session_id) && - (cpp_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &cpp_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_cpp_get_phy_addr(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff, int *fd) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - *fd = buff->map_info.buff_info.fd; - break; - } - } - - return phy_add; -} - -static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue, - struct msm_cpp_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_cpp_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(cpp_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto QUEUE_BUFF_ERROR1; - } - rc = ion_map_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto QUEUE_BUFF_ERROR2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -QUEUE_BUFF_ERROR2: - ion_free(cpp_dev->client, buff->map_info.ion_handle); -QUEUE_BUFF_ERROR1: - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_cpp_dequeue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_map_list_t *buff) -{ - - ion_unmap_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0); - ion_free(cpp_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_cpp_fetch_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id, int *fd) -{ - unsigned long phy_addr = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_cpp_get_phy_addr(cpp_dev, buff_queue_info, - buffer_info->index, native_buff, fd); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - buffer_info); - *fd = buffer_info->fd; - } - return phy_addr; -} - -static int32_t msm_cpp_enqueue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_cpp_dequeue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info) -{ - struct msm_cpp_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - return 0; -} - -static int32_t msm_cpp_add_buff_queue_entry(struct cpp_device *cpp_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 0) { - buff_queue_info = &cpp_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_cpp_free_buff_queue_entry(struct cpp_device *cpp_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_cpp_create_buff_queue(struct cpp_device *cpp_dev, - uint32_t num_buffq) -{ - struct msm_cpp_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_cpp_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (cpp_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - cpp_dev->buff_queue = buff_queue; - cpp_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_cpp_delete_buff_queue(struct cpp_device *cpp_dev) -{ - uint32_t i; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - msm_cpp_dequeue_buff_info_list - (cpp_dev, &cpp_dev->buff_queue[i]); - msm_cpp_free_buff_queue_entry(cpp_dev, - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - } - } - kzfree(cpp_dev->buff_queue); - cpp_dev->buff_queue = NULL; - cpp_dev->num_buffq = 0; - return; -} - -static void msm_cpp_poll(void __iomem *cpp_base, u32 val) -{ - uint32_t tmp, retry = 0; - do { - usleep_range(1000, 2000); - tmp = msm_cpp_read(cpp_base); - if (tmp != 0xDEADBEEF) - CPP_LOW("poll: 0%x\n", tmp); - } while ((tmp != val) && (retry++ < MSM_CPP_POLL_RETRIES)); - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll finished\n"); - else - pr_err("Poll failed: expect: 0x%x\n", val); -} - -static void msm_cpp_poll_rx_empty(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - while (((tmp & 0x2) != 0x0) && (retry++ < MSM_CPP_POLL_RETRIES)) { - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to read rx fifo.*/ - usleep_range(200, 300); - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - } - - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll rx empty\n"); - else - pr_err("Poll rx empty failed\n"); -} - -void cpp_release_ion_client(struct kref *ref) -{ - struct cpp_device *cpp_dev = container_of(ref, - struct cpp_device, refcount); - pr_err("Calling ion_client_destroy\n"); - ion_client_destroy(cpp_dev->client); -} - -static int cpp_init_mem(struct cpp_device *cpp_dev) -{ - int rc = 0; - - kref_init(&cpp_dev->refcount); - kref_get(&cpp_dev->refcount); - cpp_dev->client = msm_ion_client_create("cpp"); - - CPP_DBG("E\n"); - if (!cpp_dev->domain) { - pr_err("domain / iommu context not found\n"); - return -ENODEV; - } - - CPP_DBG("X\n"); - return rc; -} - -static void cpp_deinit_mem(struct cpp_device *cpp_dev) -{ - CPP_DBG("E\n"); - kref_put(&cpp_dev->refcount, cpp_release_ion_client); - CPP_DBG("X\n"); -} - -static irqreturn_t msm_cpp_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t tx_level; - uint32_t irq_status; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - irq_status = msm_camera_io_r(cpp_dev->base + MSM_CPP_MICRO_IRQGEN_STAT); - CPP_DBG("status: 0x%x\n", irq_status); - if (irq_status & 0x8) { - tx_level = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_STAT) >> 2; - for (i = 0; i < tx_level; i++) { - tx_fifo[i] = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_DATA); - } - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = &cpp_dev->tasklet_queue_cmd[cpp_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err("%s: cpp tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &cpp_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - queue_cmd->tx_level = tx_level; - memset(&queue_cmd->tx_fifo[0], 0, sizeof(queue_cmd->tx_fifo)); - for (i = 0; i < tx_level; i++) - queue_cmd->tx_fifo[i] = tx_fifo[i]; - - queue_cmd->cmd_used = 1; - cpp_dev->taskletq_idx = - (cpp_dev->taskletq_idx + 1) % MSM_CPP_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &cpp_dev->tasklet_q); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - tasklet_schedule(&cpp_dev->cpp_tasklet); - } else if (irq_status & 0x7C0) { - pr_err("%s: fatal error: 0x%x\n", __func__, irq_status); - pr_err("%s: DEBUG_SP: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_err("%s: DEBUG_T: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_err("%s: DEBUG_N: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_err("%s: DEBUG_R: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_err("%s: DEBUG_OPPC: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_err("%s: DEBUG_MO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_err("%s: DEBUG_TIMER0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_err("%s: DEBUG_TIMER1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_err("%s: DEBUG_GPI: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_err("%s: DEBUG_GPO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_err("%s: DEBUG_T0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_err("%s: DEBUG_R0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_err("%s: DEBUG_T1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_err("%s: DEBUG_R1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - } - msm_camera_io_w(irq_status, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - return IRQ_HANDLED; -} - -void msm_cpp_do_tasklet(unsigned long data) -{ - unsigned long flags; - uint32_t irq_status; - uint32_t tx_level; - uint32_t msg_id, cmd_len; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = (struct cpp_device *) data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - struct msm_cpp_timer_t *timer = NULL; - - while (atomic_read(&cpp_dev->irq_cnt)) { - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&cpp_dev->tasklet_q, - struct msm_cpp_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&cpp_dev->irq_cnt, 0); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &cpp_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status = queue_cmd->irq_status; - tx_level = queue_cmd->tx_level; - for (i = 0; i < tx_level; i++) - tx_fifo[i] = queue_cmd->tx_fifo[i]; - - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - for (i = 0; i < tx_level; i++) { - if (tx_fifo[i] == MSM_CPP_MSG_ID_CMD) { - cmd_len = tx_fifo[i+1]; - msg_id = tx_fifo[i+2]; - if (msg_id == MSM_CPP_MSG_ID_FRAME_ACK) { - CPP_DBG("Frame done!!\n"); - /* delete CPP timer */ - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } else if (msg_id == - MSM_CPP_MSG_ID_FRAME_NACK) { - pr_err("NACK error from hw!!\n"); - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } - i += cmd_len + 2; - } - } - } -} -static void cpp_get_clk_freq_tbl(struct clk *clk, struct cpp_hw_info *hw_info) -{ - uint32_t count; - signed long freq_tbl_entry = 0; - - if ((clk == NULL) || (hw_info == NULL) || (clk->ops == NULL) || - (clk->ops->list_rate == NULL)) { - pr_err("Bad parameter\n"); - return; - } - - for (count = 0; count < MAX_FREQ_TBL; count++) { - freq_tbl_entry = clk->ops->list_rate(clk, count); - if (freq_tbl_entry >= 0) - hw_info->freq_tbl[count] = freq_tbl_entry; - else - break; - } - - hw_info->freq_tbl_count = count; -} - -static int cpp_init_hardware(struct cpp_device *cpp_dev) -{ - int rc = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_CPP); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (cpp_dev->fs_cpp == NULL) { - cpp_dev->fs_cpp = - regulator_get(&cpp_dev->pdev->dev, "vdd"); - if (IS_ERR(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd get failed %ld\n", - PTR_ERR(cpp_dev->fs_cpp)); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } else if (regulator_enable(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd enable failed\n"); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } - } - - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX] = - clk_get(&cpp_dev->pdev->dev, - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - if (IS_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX])) { - pr_err("%s get failed\n", - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - rc = - PTR_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_ASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", - __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to resets all its registers.*/ - usleep_range(10000, 12000); - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_DEASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments and - this was the smallest number which works. This sleep is - needed to leave enough time for Microcontroller to - resets all its registers.*/ - usleep_range(1000, 1200); - - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - } - - rc = msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto clk_failed; - } - - cpp_dev->base = ioremap(cpp_dev->mem->start, - resource_size(cpp_dev->mem)); - if (!cpp_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto remap_failed; - } - - cpp_dev->vbif_base = ioremap(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - if (!cpp_dev->vbif_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto vbif_remap_failed; - } - - cpp_dev->cpp_hw_base = ioremap(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - if (!cpp_dev->cpp_hw_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto cpp_hw_remap_failed; - } - - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = request_irq(cpp_dev->irq->start, msm_cpp_irq, - IRQF_TRIGGER_RISING, "cpp", cpp_dev); - if (rc < 0) { - pr_err("irq request fail\n"); - goto req_irq_fail; - } - cpp_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_INIT, NULL); - if (rc < 0) { - pr_err("buf mngr init failed\n"); - free_irq(cpp_dev->irq->start, cpp_dev); - goto req_irq_fail; - } - } - - cpp_dev->hw_info.cpp_hw_version = - msm_camera_io_r(cpp_dev->cpp_hw_base); - pr_info("CPP HW Version: 0x%x\n", cpp_dev->hw_info.cpp_hw_version); - cpp_dev->hw_info.cpp_hw_caps = - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4); - cpp_get_clk_freq_tbl(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - &cpp_dev->hw_info); - pr_debug("CPP HW Caps: 0x%x\n", cpp_dev->hw_info.cpp_hw_caps); - msm_camera_io_w(0x1, cpp_dev->vbif_base + 0x4); - cpp_dev->taskletq_idx = 0; - atomic_set(&cpp_dev->irq_cnt, 0); - msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE); - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - cpp_dev->stream_cnt = 0; - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - if (cpp_dev->is_firmware_loaded == 1) { - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - msm_camera_io_w_mb(0x7C8, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - } - } else { - msm_camera_io_w(0x1, - cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w_mb(0x7C8, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - } - return rc; -req_irq_fail: - iounmap(cpp_dev->cpp_hw_base); -cpp_hw_remap_failed: - iounmap(cpp_dev->vbif_base); -vbif_remap_failed: - iounmap(cpp_dev->base); -remap_failed: - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); -clk_failed: - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -bus_scale_register_failed: - return rc; -} - -static void cpp_release_hardware(struct cpp_device *cpp_dev) -{ - int32_t rc; - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_DEINIT, NULL); - if (rc < 0) { - pr_err("error in buf mngr deinit\n"); - rc = -EINVAL; - } - free_irq(cpp_dev->irq->start, cpp_dev); - tasklet_kill(&cpp_dev->cpp_tasklet); - atomic_set(&cpp_dev->irq_cnt, 0); - } - msm_cpp_delete_buff_queue(cpp_dev); - iounmap(cpp_dev->base); - iounmap(cpp_dev->vbif_base); - iounmap(cpp_dev->cpp_hw_base); - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - if (cpp_dev->stream_cnt > 0) { - pr_err("error: stream count active\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - } - cpp_dev->stream_cnt = 0; - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -} - -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin) -{ - uint32_t i; - uint32_t *ptr_bin = NULL; - int32_t rc = -EFAULT; - const struct firmware *fw = NULL; - struct device *dev = &cpp_dev->pdev->dev; - - msm_camera_io_w(0x1, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - - if (fw_name_bin) { - pr_debug("%s: FW file: %s\n", __func__, fw_name_bin); - rc = request_firmware(&fw, fw_name_bin, dev); - if (rc) { - dev_err(dev, - "Fail to loc blob %s from dev %pK, Error: %d\n", - fw_name_bin, dev, rc); - } - if (NULL != fw) - ptr_bin = (uint32_t *)fw->data; - - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_camera_io_w(0xFFFFFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - /*Start firmware loading*/ - msm_cpp_write(MSM_CPP_CMD_FW_LOAD, cpp_dev->base); - if (fw) - msm_cpp_write(fw->size, cpp_dev->base); - else - msm_cpp_write(MSM_CPP_END_ADDRESS, cpp_dev->base); - msm_cpp_write(MSM_CPP_START_ADDRESS, cpp_dev->base); - - if (ptr_bin) { - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < fw->size/4; i++) { - msm_cpp_write(*ptr_bin, cpp_dev->base); - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - ptr_bin++; - } - } - if (fw) - release_firmware(fw); - msm_camera_io_w_mb(0x00, cpp_dev->cpp_hw_base + 0xC); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_OK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - } - - /*Trigger MC to jump to start address*/ - msm_cpp_write(MSM_CPP_CMD_EXEC_JUMP, cpp_dev->base); - msm_cpp_write(MSM_CPP_JUMP_ADDRESS, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x1); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_JUMP_ACK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Get Bootloader Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_BOOTLOADER_VER, cpp_dev->base); - pr_info("MC Bootloader Version: 0x%x\n", - msm_cpp_read(cpp_dev->base)); - - /*Get Firmware Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_CMD, cpp_dev->base); - msm_cpp_write(0x1, cpp_dev->base); - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_TRAILER, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x2); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_FW_VER); - cpp_dev->fw_version = msm_cpp_read(cpp_dev->base); - pr_info("CPP FW Version: 0x%08x\n", cpp_dev->fw_version); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Disable MC clock*/ - /*msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_CLKEN_CTL);*/ -} - -static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc; - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - CPP_DBG("E\n"); - - mutex_lock(&cpp_dev->mutex); - if (cpp_dev->cpp_open_cnt == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free CPP instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 0) { - cpp_dev->cpp_subscribe_list[i].active = 1; - cpp_dev->cpp_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - CPP_DBG("open %d %pK\n", i, &fh->vfh); - cpp_dev->cpp_open_cnt++; - if (cpp_dev->cpp_open_cnt == 1) { - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) { - cpp_dev->cpp_open_cnt--; - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - mutex_unlock(&cpp_dev->mutex); - return rc; - } - - iommu_attach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_init_mem(cpp_dev); - cpp_dev->state = CPP_STATE_IDLE; - } - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_device_queue *processing_q = NULL; - struct msm_device_queue *eventData_q = NULL; - - if (!cpp_dev) { - pr_err("failed: cpp_dev %pK\n", cpp_dev); - return -EINVAL; - } - - mutex_lock(&cpp_dev->mutex); - - processing_q = &cpp_dev->processing_q; - eventData_q = &cpp_dev->eventData_q; - - if (cpp_dev->cpp_open_cnt == 0) { - mutex_unlock(&cpp_dev->mutex); - return 0; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 1) { - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - cpp_dev->cpp_open_cnt--; - if (cpp_dev->cpp_open_cnt == 0) { - pr_debug("irq_status: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4)); - pr_debug("DEBUG_SP: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_debug("DEBUG_T: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_debug("DEBUG_N: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_debug("DEBUG_R: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_debug("DEBUG_OPPC: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_debug("DEBUG_MO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_debug("DEBUG_TIMER0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_debug("DEBUG_TIMER1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_debug("DEBUG_GPI: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_debug("DEBUG_GPO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_debug("DEBUG_T0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_debug("DEBUG_R0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_debug("DEBUG_T1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_debug("DEBUG_R1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - cpp_deinit_mem(cpp_dev); - iommu_detach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_release_hardware(cpp_dev); - msm_cpp_empty_list(processing_q, list_frame); - msm_cpp_empty_list(eventData_q, list_eventdata); - cpp_dev->state = CPP_STATE_OFF; - } - - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_cpp_internal_ops = { - .open = cpp_open_node, - .close = cpp_close_node, -}; - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(cpp_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_debug("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_queue_cmd *event_qcmd = NULL; - struct msm_cpp_frame_info_t *processed_frame = NULL; - struct msm_device_queue *queue = &cpp_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - frame_qcmd = msm_dequeue(queue, list_frame); - if (frame_qcmd) { - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("Insufficient memory. return"); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - CPP_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&cpp_dev->eventData_q, &event_qcmd->list_eventdata); - - if (!processed_frame->output_buffer_info[0].processed_divert && - !processed_frame->output_buffer_info[0].native_buff) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[0].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - - if (processed_frame->duplicate_output && - !processed_frame-> - output_buffer_info[1].processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->duplicate_identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->duplicate_identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[1].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_CPP_FRAME_DONE; - v4l2_event_queue(cpp_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -#if MSM_CPP_DUMP_FRM_CMD -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - int i; - pr_info("-- start: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - for (i = 0; i < frame_info->msg_len; i++) - pr_err("msg[%03d] = 0x%08x\n", i, frame_info->cpp_cmd_msg[i]); - pr_info("-- end: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - return 0; -} -#else -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - return 0; -} -#endif - - -static void msm_cpp_do_timeout_work(struct work_struct *work) -{ - int ret; - uint32_t i = 0; - struct msm_cpp_frame_info_t *this_frame = NULL; - - pr_err("cpp_timer_callback called. (jiffies=%lu)\n", - jiffies); - if (!work) { - pr_err("Invalid work:%pK\n", work); - return; - } - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - - disable_irq(cpp_timer.data.cpp_dev->irq->start); - pr_err("Reloading firmware\n"); - cpp_load_fw(cpp_timer.data.cpp_dev, NULL); - pr_err("Firmware loading done\n"); - enable_irq(cpp_timer.data.cpp_dev->irq->start); - msm_camera_io_w_mb(0x8, cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - - this_frame = cpp_timer.data.processed_frame; - pr_err("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - pr_err("Rescheduling for identity=0x%x, frame_id=%03d\n", - this_frame->identity, this_frame->frame_id); - msm_cpp_write(0x6, cpp_timer.data.cpp_dev->base); - msm_cpp_dump_frame_cmd(this_frame); - for (i = 0; i < this_frame->msg_len; i++) - msm_cpp_write(this_frame->cpp_cmd_msg[i], - cpp_timer.data.cpp_dev->base); - return; -} - -void cpp_timer_callback(unsigned long data) -{ - struct msm_cpp_work_t *work = - cpp_timer.data.cpp_dev->work; - queue_work(cpp_timer.data.cpp_dev->timer_wq, - (struct work_struct *)work); -} - -static int msm_cpp_send_frame_to_hardware(struct cpp_device *cpp_dev, - struct msm_queue_cmd *frame_qcmd) -{ - uint32_t i; - int32_t rc = -EAGAIN; - int ret; - struct msm_cpp_frame_info_t *process_frame; - - if (cpp_dev->processing_q.len < MAX_CPP_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&cpp_dev->processing_q, - &frame_qcmd->list_frame); - - cpp_timer.data.processed_frame = process_frame; - atomic_set(&cpp_timer.used, 1); - /* install timer for cpp timeout */ - CPP_DBG("Installing cpp_timer\n"); - setup_timer(&cpp_timer.cpp_timer, - cpp_timer_callback, (unsigned long)&cpp_timer); - CPP_DBG("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - msm_cpp_write(0x6, cpp_dev->base); - msm_cpp_dump_frame_cmd(process_frame); - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < process_frame->msg_len; i++) { - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - if ((induce_error) && (i == 1)) { - pr_err("Induce error\n"); - msm_cpp_write(process_frame->cpp_cmd_msg[i]-1, - cpp_dev->base); - induce_error--; - } else - msm_cpp_write(process_frame->cpp_cmd_msg[i], - cpp_dev->base); - } - do_gettimeofday(&(process_frame->in_time)); - rc = 0; - } - if (rc < 0) - pr_err("process queue full. drop frame\n"); - return rc; -} - -static int msm_cpp_flush_frames(struct cpp_device *cpp_dev) -{ - return 0; -} - -static int msm_cpp_cfg(struct cpp_device *cpp_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_cpp_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); - uint32_t *cpp_frame_msg; - unsigned long in_phyaddr, out_phyaddr0, out_phyaddr1; - uint16_t num_stripes = 0; - struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info; - int32_t status = 0; - int32_t stripe_base = 0; - - int in_fd; - - int i = 0; - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = (copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR1; - } - - if ((new_frame->msg_len == 0) || - (new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) { - pr_err("%s:%d: Invalid frame len:%d\n", __func__, - __LINE__, new_frame->msg_len); - rc = -EINVAL; - goto ERROR1; - } - - cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len, - GFP_KERNEL); - if (!cpp_frame_msg) { - pr_err("Insufficient memory. return"); - rc = -ENOMEM; - goto ERROR1; - } - - rc = (copy_from_user(cpp_frame_msg, - (void __user *)new_frame->cpp_cmd_msg, - sizeof(uint32_t)*new_frame->msg_len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR2; - } - - new_frame->cpp_cmd_msg = cpp_frame_msg; - - in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), &in_fd); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto ERROR2; - } - - if (new_frame->output_buffer_info[0].native_buff == 0) { - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & - 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR2; - } - new_frame->output_buffer_info[0].index = buff_mgr_info.index; - } - - out_phyaddr0 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[0], - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), - &new_frame->output_buffer_info[0].fd); - if (!out_phyaddr0) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto ERROR3; - } - out_phyaddr1 = out_phyaddr0; - - /* get buffer for duplicate output */ - if (new_frame->duplicate_output) { - CPP_DBG("duplication enabled, dup_id=0x%x", - new_frame->duplicate_identity); - memset(&new_frame->output_buffer_info[1], 0, - sizeof(struct msm_cpp_buffer_info_t)); - memset(&dup_buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - dup_buff_mgr_info.session_id = - ((new_frame->duplicate_identity >> 16) & 0xFFFF); - dup_buff_mgr_info.stream_id = - (new_frame->duplicate_identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &dup_buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR3; - } - new_frame->output_buffer_info[1].index = - dup_buff_mgr_info.index; - out_phyaddr1 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[1], - ((new_frame->duplicate_identity >> 16) & 0xFFFF), - (new_frame->duplicate_identity & 0xFFFF), - &new_frame->output_buffer_info[1].fd); - if (!out_phyaddr1) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &dup_buff_mgr_info); - goto ERROR3; - } - /* set duplicate enable bit */ - cpp_frame_msg[5] |= 0x1; - CPP_DBG("out_phyaddr1= %08x\n", (uint32_t)out_phyaddr1); - } - - num_stripes = ((cpp_frame_msg[12] >> 20) & 0x3FF) + - ((cpp_frame_msg[12] >> 10) & 0x3FF) + - (cpp_frame_msg[12] & 0x3FF); - - if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_2_0) { - stripe_base = STRIPE_BASE_FW_1_2_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_4_0) { - stripe_base = STRIPE_BASE_FW_1_4_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_6_0) { - stripe_base = STRIPE_BASE_FW_1_6_0; - } else { - pr_err("invalid fw version %08x", cpp_dev->fw_version); - goto ERROR3; - } - - for (i = 0; i < num_stripes; i++) { - cpp_frame_msg[stripe_base + 5 + i*27] += - (uint32_t) in_phyaddr; - cpp_frame_msg[stripe_base + 11 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 12 + i * 27] += - (uint32_t) out_phyaddr1; - cpp_frame_msg[stripe_base + 13 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 14 + i * 27] += - (uint32_t) out_phyaddr1; - } - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto ERROR3; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_cpp_send_frame_to_hardware(cpp_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto ERROR4; - } - - ioctl_ptr->trans_code = rc; - status = rc; - rc = (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR4; - } - return rc; -ERROR4: - kfree(frame_qcmd); -ERROR3: - if (new_frame->output_buffer_info[0].native_buff == 0) - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -ERROR2: - kfree(cpp_frame_msg); -ERROR1: - ioctl_ptr->trans_code = rc; - status = rc; - if (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t))) - pr_err("error cannot copy error\n"); - kfree(new_frame); - return rc; -} - -long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - if ((ioctl_ptr == NULL) || (ioctl_ptr->ioctl_ptr == NULL)) { - pr_err("ioctl_ptr is null\n"); - return -EINVAL; - } - if (cpp_dev == NULL) { - pr_err("cpp_dev is null\n"); - return -EINVAL; - } - mutex_lock(&cpp_dev->mutex); - CPP_DBG("E cmd: 0x%x\n", cmd); - switch (cmd) { - case VIDIOC_MSM_CPP_GET_HW_INFO: { - CPP_DBG("VIDIOC_MSM_CPP_GET_HW_INFO\n"); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - &cpp_dev->hw_info, - sizeof(struct cpp_hw_info))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - break; - } - - case VIDIOC_MSM_CPP_LOAD_FIRMWARE: { - CPP_DBG("VIDIOC_MSM_CPP_LOAD_FIRMWARE\n"); - if (cpp_dev->is_firmware_loaded == 0) { - if (cpp_dev->fw_name_bin != NULL) { - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - } - if ((ioctl_ptr->len == 0) || - (ioctl_ptr->len > MSM_CPP_MAX_FW_NAME_LEN)) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - cpp_dev->fw_name_bin = kzalloc(ioctl_ptr->len+1, - GFP_KERNEL); - if (!cpp_dev->fw_name_bin) { - pr_err("%s:%d: malloc error\n", __func__, - __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr=NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - rc = (copy_from_user(cpp_dev->fw_name_bin, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - *(cpp_dev->fw_name_bin+ioctl_ptr->len) = '\0'; - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - cpp_dev->is_firmware_loaded = 1; - } - break; - } - case VIDIOC_MSM_CPP_CFG: - CPP_DBG("VIDIOC_MSM_CPP_CFG\n"); - rc = msm_cpp_cfg(cpp_dev, ioctl_ptr); - break; - case VIDIOC_MSM_CPP_FLUSH_QUEUE: - CPP_DBG("VIDIOC_MSM_CPP_FLUSH_QUEUE\n"); - rc = msm_cpp_flush_frames(cpp_dev); - break; - case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO: - case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_cpp_stream_buff_info_t *u_stream_buff_info; - struct msm_cpp_stream_buff_info_t k_stream_buff_info; - CPP_DBG("VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO\n"); - if (sizeof(struct msm_cpp_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (u_stream_buff_info->num_buffs == 0) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - - if (k_stream_buff_info.num_buffs > MSM_CAMERA_MAX_STREAM_BUF) { - pr_err("%s:%d: unexpected large num buff requested\n", - __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t), GFP_KERNEL); - if (ZERO_OR_NULL_PTR(k_stream_buff_info.buffer_info)) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - rc = msm_cpp_add_buff_queue_entry(cpp_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - } - if (!rc) - rc = msm_cpp_enqueue_buff_info_list(cpp_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - cpp_dev->stream_cnt++; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - CPP_DBG("VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO\n"); - - if (ioctl_ptr->len != sizeof(uint32_t)) - return -EINVAL; - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - msm_cpp_dequeue_buff_info_list(cpp_dev, buff_queue_info); - rc = msm_cpp_free_buff_queue_entry(cpp_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - if (cpp_dev->stream_cnt > 0) { - cpp_dev->stream_cnt--; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - if (cpp_dev->stream_cnt == 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0); - if (rc < 0) - pr_err("Bandwidth Reset Failed!\n"); - } - } else { - pr_err("error: stream count underflow %d\n", - cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &cpp_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_cpp_frame_info_t *process_frame; - CPP_DBG("VIDIOC_MSM_CPP_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - if (!event_qcmd) { - pr_err("no queue cmd available"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - process_frame = event_qcmd->command; - CPP_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_cpp_frame_info_t))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - kfree(process_frame->cpp_cmd_msg); - kfree(process_frame); - kfree(event_qcmd); - break; - } - case VIDIOC_MSM_CPP_SET_CLOCK: { - struct msm_cpp_clock_settings_t clock_settings; - unsigned long clock_rate = 0; - CPP_DBG("VIDIOC_MSM_CPP_SET_CLOCK\n"); - if (ioctl_ptr->len == 0) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr is NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->len != sizeof(struct msm_cpp_clock_settings_t)) { - pr_err("Not valid ioctl_ptr->len\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&clock_settings, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (clock_settings.clock_rate > 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, - clock_settings.avg, - clock_settings.inst); - if (rc < 0) { - pr_err("Bandwidth Set Failed!\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - clock_rate = clk_round_rate( - cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_settings.clock_rate); - if (clock_rate != clock_settings.clock_rate) - pr_err("clock rate differ from settings\n"); - - clk_set_rate(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_rate); - } - break; - } - case MSM_SD_SHUTDOWN: - CPP_DBG("MSM_SD_SHUTDOWN\n"); - mutex_unlock(&cpp_dev->mutex); - while (cpp_dev->cpp_open_cnt != 0) - cpp_close_node(sd, NULL); - mutex_lock(&cpp_dev->mutex); - rc = 0; - break; - case VIDIOC_MSM_CPP_QUEUE_BUF: { - struct msm_pproc_queue_buf_info queue_buf_info; - CPP_DBG("VIDIOC_MSM_CPP_QUEUE_BUF\n"); - rc = (copy_from_user(&queue_buf_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_pproc_queue_buf_info)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - - if (queue_buf_info.is_buf_dirty) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &queue_buf_info.buff_mgr_info); - } else { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &queue_buf_info.buff_mgr_info); - } - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EINVAL; - } - - break; - } - case VIDIOC_MSM_CPP_POP_STREAM_BUFFER: { - struct msm_buf_mngr_info buff_mgr_info; - struct msm_cpp_frame_info_t frame_info; - rc = (copy_from_user(&frame_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((frame_info.identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (frame_info.identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_err("error getting buffer rc:%d\n", rc); - break; - } - buff_mgr_info.frame_id = frame_info.frame_id; - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EAGAIN; - } - break; - } - default: - pr_err_ratelimited("invalid value: cmd=0x%x\n", cmd); - break; - } - mutex_unlock(&cpp_dev->mutex); - CPP_DBG("X\n"); - return rc; -} - -int msm_cpp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_subscribe(fh, sub, MAX_CPP_V4l2_EVENTS, NULL); -} - -int msm_cpp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_cpp_subdev_core_ops = { - .ioctl = msm_cpp_subdev_ioctl, - .subscribe_event = msm_cpp_subscribe_event, - .unsubscribe_event = msm_cpp_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_cpp_subdev_ops = { - .core = &msm_cpp_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_cpp_v4l2_subdev_fops; - -static long msm_cpp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - case VIDIOC_MSM_CPP_GET_INST_INFO: { - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_cpp_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_cpp_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_cpp_frame_info_t))) { - return -EINVAL; - } - } - break; - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_cpp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_cpp_subdev_do_ioctl); -} - -static int cpp_register_domain(void) -{ - struct msm_iova_partition cpp_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout cpp_fw_layout = { - .partitions = &cpp_fw_partition, - .npartitions = 1, - .client_name = "camera_cpp", - .domain_flags = 0, - }; - - return msm_register_domain(&cpp_fw_layout); -} - -static int msm_cpp_get_clk_info(struct cpp_device *cpp_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CPP_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CPP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > CPP_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - CPP_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cpp_clk_info[i].clk_name)); - CPP_DBG("clock-names[%d] = %s\n", i, cpp_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cpp_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CPP_DBG("clk_rate[%d] = %ld\n", i, cpp_clk_info[i].clk_rate); - } - cpp_dev->num_clk = count; - return 0; -} - - -static int cpp_probe(struct platform_device *pdev) -{ - struct cpp_device *cpp_dev; - int rc = 0; - CPP_DBG("E"); - cpp_dev = kzalloc(sizeof(struct cpp_device), GFP_KERNEL); - if (!cpp_dev) { - pr_err("no enough memory\n"); - return -ENOMEM; - } - - cpp_dev->cpp_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(cpp_clk_info), GFP_KERNEL); - if (!cpp_dev->cpp_clk) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto ERROR1; - } - - v4l2_subdev_init(&cpp_dev->msm_sd.sd, &msm_cpp_subdev_ops); - cpp_dev->msm_sd.sd.internal_ops = &msm_cpp_internal_ops; - snprintf(cpp_dev->msm_sd.sd.name, ARRAY_SIZE(cpp_dev->msm_sd.sd.name), - "cpp"); - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&cpp_dev->msm_sd.sd, cpp_dev); - platform_set_drvdata(pdev, &cpp_dev->msm_sd.sd); - mutex_init(&cpp_dev->mutex); - spin_lock_init(&cpp_dev->tasklet_lock); - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - cpp_dev->pdev = pdev; - - cpp_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp"); - if (!cpp_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->vbif_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_vbif"); - if (!cpp_dev->vbif_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->cpp_hw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_hw"); - if (!cpp_dev->cpp_hw_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cpp"); - if (!cpp_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->io = request_mem_region(cpp_dev->mem->start, - resource_size(cpp_dev->mem), pdev->name); - if (!cpp_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto ERROR2; - } - - cpp_dev->domain_num = cpp_register_domain(); - if (cpp_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->domain = - msm_get_iommu_domain(cpp_dev->domain_num); - if (!cpp_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp"); - if (IS_ERR(cpp_dev->iommu_ctx)) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -EPROBE_DEFER; - goto ERROR3; - } - - if (msm_cpp_get_clk_info(cpp_dev, pdev) < 0) { - pr_err("msm_cpp_get_clk_info() failed\n"); - goto ERROR3; - } - - media_entity_init(&cpp_dev->msm_sd.sd.entity, 0, NULL, 0); - cpp_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - cpp_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CPP; - cpp_dev->msm_sd.sd.entity.name = pdev->name; - cpp_dev->msm_sd.close_seq = MSM_SD_CLOSE_3RD_CATEGORY; - msm_sd_register(&cpp_dev->msm_sd); - msm_cpp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_cpp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_cpp_v4l2_subdev_fops.unlocked_ioctl = msm_cpp_subdev_fops_ioctl; - msm_cpp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_cpp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - cpp_dev->msm_sd.sd.devnode->fops = &msm_cpp_v4l2_subdev_fops; - cpp_dev->msm_sd.sd.entity.revision = cpp_dev->msm_sd.sd.devnode->num; - cpp_dev->state = CPP_STATE_BOOT; - - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) - goto CPP_PROBE_INIT_ERROR; - - msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - msm_camera_io_w(0x80000000, cpp_dev->base + 0xF0); - cpp_release_hardware(cpp_dev); - cpp_dev->state = CPP_STATE_OFF; - msm_cpp_enable_debugfs(cpp_dev); - - msm_queue_init(&cpp_dev->eventData_q, "eventdata"); - msm_queue_init(&cpp_dev->processing_q, "frame"); - INIT_LIST_HEAD(&cpp_dev->tasklet_q); - tasklet_init(&cpp_dev->cpp_tasklet, msm_cpp_do_tasklet, - (unsigned long)cpp_dev); - cpp_dev->timer_wq = create_workqueue("msm_cpp_workqueue"); - cpp_dev->work = kmalloc(sizeof(struct msm_cpp_work_t), - GFP_KERNEL); - - if (!cpp_dev->work) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto CPP_PROBE_INIT_ERROR; - } - - INIT_WORK((struct work_struct *)cpp_dev->work, msm_cpp_do_timeout_work); - cpp_dev->cpp_open_cnt = 0; - cpp_dev->is_firmware_loaded = 0; - cpp_timer.data.cpp_dev = cpp_dev; - atomic_set(&cpp_timer.used, 0); - cpp_dev->fw_name_bin = NULL; - if (rc == 0) - CPP_DBG("SUCCESS."); - else - CPP_DBG("FAILED."); - return rc; -CPP_PROBE_INIT_ERROR: - media_entity_cleanup(&cpp_dev->msm_sd.sd.entity); - msm_sd_unregister(&cpp_dev->msm_sd); -ERROR3: - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); -ERROR2: - kfree(cpp_dev->cpp_clk); -ERROR1: - kfree(cpp_dev); - return rc; -} - -static const struct of_device_id msm_cpp_dt_match[] = { - {.compatible = "qcom,cpp"}, - {} -}; - -static int cpp_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct cpp_device *cpp_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - cpp_dev = (struct cpp_device *)v4l2_get_subdevdata(sd); - if (!cpp_dev) { - pr_err("%s: cpp device is NULL\n", __func__); - return 0; - } - - msm_sd_unregister(&cpp_dev->msm_sd); - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); - release_mem_region(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - release_mem_region(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - mutex_destroy(&cpp_dev->mutex); - kfree(cpp_dev->work); - destroy_workqueue(cpp_dev->timer_wq); - kfree(cpp_dev->cpp_clk); - kfree(cpp_dev); - return 0; -} - -static struct platform_driver cpp_driver = { - .probe = cpp_probe, - .remove = cpp_device_remove, - .driver = { - .name = MSM_CPP_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cpp_dt_match, - }, -}; - -static int __init msm_cpp_init_module(void) -{ - return platform_driver_register(&cpp_driver); -} - -static void __exit msm_cpp_exit_module(void) -{ - platform_driver_unregister(&cpp_driver); -} - -static int msm_cpp_debugfs_error_s(void *data, u64 val) -{ - pr_err("setting error inducement"); - induce_error = val; - return 0; -} - -DEFINE_SIMPLE_ATTRIBUTE(cpp_debugfs_error, NULL, - msm_cpp_debugfs_error_s, "%llu\n"); - -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_cpp", NULL); - if (!debugfs_base) - return -ENOMEM; - - if (!debugfs_create_file("error", S_IRUGO | S_IWUSR, debugfs_base, - (void *)cpp_dev, &cpp_debugfs_error)) - return -ENOMEM; - - return 0; -} - -module_init(msm_cpp_init_module); -module_exit(msm_cpp_exit_module); -MODULE_DESCRIPTION("MSM CPP driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.h b/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.h deleted file mode 100644 index e306335a826d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/cpp/msm_cpp.h +++ /dev/null @@ -1,233 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CPP_H__ -#define __MSM_CPP_H__ - -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/* hw version info: - 31:28 Major version - 27:16 Minor version - 15:0 Revision bits -**/ -#define CPP_HW_VERSION_1_1_0 0x10010000 -#define CPP_HW_VERSION_1_1_1 0x10010001 -#define CPP_HW_VERSION_2_0_0 0x20000000 -#define CPP_HW_VERSION_4_0_0 0x40000000 -#define CPP_HW_VERSION_4_1_0 0x40010000 - -#define MAX_ACTIVE_CPP_INSTANCE 8 -#define MAX_CPP_PROCESSING_FRAME 2 -#define MAX_CPP_V4l2_EVENTS 30 - -#define MSM_CPP_MICRO_BASE 0x4000 -#define MSM_CPP_MICRO_HW_VERSION 0x0000 -#define MSM_CPP_MICRO_IRQGEN_STAT 0x0004 -#define MSM_CPP_MICRO_IRQGEN_CLR 0x0008 -#define MSM_CPP_MICRO_IRQGEN_MASK 0x000C -#define MSM_CPP_MICRO_FIFO_TX_DATA 0x0010 -#define MSM_CPP_MICRO_FIFO_TX_STAT 0x0014 -#define MSM_CPP_MICRO_FIFO_RX_DATA 0x0018 -#define MSM_CPP_MICRO_FIFO_RX_STAT 0x001C -#define MSM_CPP_MICRO_BOOT_START 0x0020 -#define MSM_CPP_MICRO_BOOT_LDORG 0x0024 -#define MSM_CPP_MICRO_CLKEN_CTL 0x0030 - -#define MSM_CPP_CMD_GET_BOOTLOADER_VER 0x1 -#define MSM_CPP_CMD_FW_LOAD 0x2 -#define MSM_CPP_CMD_EXEC_JUMP 0x3 -#define MSM_CPP_CMD_RESET_HW 0x5 -#define MSM_CPP_CMD_PROCESS_FRAME 0x6 -#define MSM_CPP_CMD_FLUSH_STREAM 0x7 -#define MSM_CPP_CMD_CFG_MEM_PARAM 0x8 -#define MSM_CPP_CMD_ERROR_REQUEST 0x9 -#define MSM_CPP_CMD_GET_STATUS 0xA -#define MSM_CPP_CMD_GET_FW_VER 0xB - -#define MSM_CPP_MSG_ID_CMD 0x3E646D63 -#define MSM_CPP_MSG_ID_OK 0x0A0A4B4F -#define MSM_CPP_MSG_ID_TRAILER 0xABCDEFAA - -#define MSM_CPP_MSG_ID_JUMP_ACK 0x00000001 -#define MSM_CPP_MSG_ID_FRAME_ACK 0x00000002 -#define MSM_CPP_MSG_ID_FRAME_NACK 0x00000003 -#define MSM_CPP_MSG_ID_FLUSH_ACK 0x00000004 -#define MSM_CPP_MSG_ID_FLUSH_NACK 0x00000005 -#define MSM_CPP_MSG_ID_CFG_MEM_ACK 0x00000006 -#define MSM_CPP_MSG_ID_CFG_MEM_INV 0x00000007 -#define MSM_CPP_MSG_ID_ERROR_STATUS 0x00000008 -#define MSM_CPP_MSG_ID_INVALID_CMD 0x00000009 -#define MSM_CPP_MSG_ID_GEN_STATUS 0x0000000A -#define MSM_CPP_MSG_ID_FLUSHED 0x0000000B -#define MSM_CPP_MSG_ID_FW_VER 0x0000000C - -#define MSM_CPP_JUMP_ADDRESS 0x20 -#define MSM_CPP_START_ADDRESS 0x0 -#define MSM_CPP_END_ADDRESS 0x3F00 - -#define MSM_CPP_POLL_RETRIES 20 -#define MSM_CPP_TASKLETQ_SIZE 16 -#define MSM_CPP_TX_FIFO_LEVEL 16 -#define MSM_CPP_RX_FIFO_LEVEL 512 - -struct cpp_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum cpp_state { - CPP_STATE_BOOT, - CPP_STATE_IDLE, - CPP_STATE_ACTIVE, - CPP_STATE_OFF, -}; - -enum cpp_iommu_state { - CPP_IOMMU_STATE_DETACHED, - CPP_IOMMU_STATE_ATTACHED, -}; - -enum msm_queue { - MSM_CAM_Q_CTRL, /* control command or control command status */ - MSM_CAM_Q_VFE_EVT, /* adsp event */ - MSM_CAM_Q_VFE_MSG, /* adsp message */ - MSM_CAM_Q_V4L2_REQ, /* v4l2 request */ - MSM_CAM_Q_VPE_MSG, /* vpe message */ - MSM_CAM_Q_PP_MSG, /* pp message */ -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - enum msm_queue type; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_cpp_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - uint32_t tx_level; - uint8_t cmd_used; -}; - -struct msm_cpp_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_cpp_buffer_info_t buff_info; -}; - -struct msm_cpp_buffer_map_list_t { - struct msm_cpp_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_cpp_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct msm_cpp_work_t { - struct work_struct my_work; - struct cpp_device *cpp_dev; -}; -struct msm_cpp_clock_settings_t { - long clock_rate; - uint64_t avg; - uint64_t inst; -}; - -struct cpp_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct resource *vbif_mem; - struct resource *vbif_io; - struct resource *cpp_hw_mem; - void __iomem *vbif_base; - void __iomem *base; - void __iomem *cpp_hw_base; - struct clk **cpp_clk; - struct regulator *fs_cpp; - struct mutex mutex; - enum cpp_state state; - enum cpp_iommu_state iommu_state; - uint8_t is_firmware_loaded; - char *fw_name_bin; - struct workqueue_struct *timer_wq; - struct msm_cpp_work_t *work; - uint32_t fw_version; - uint8_t stream_cnt; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx; - struct ion_client *client; - struct kref refcount; - uint32_t num_clk; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct cpp_tasklet; - struct msm_cpp_tasklet_queue_cmd - tasklet_queue_cmd[MSM_CPP_TASKLETQ_SIZE]; - - struct cpp_subscribe_info cpp_subscribe_list[MAX_ACTIVE_CPP_INSTANCE]; - uint32_t cpp_open_cnt; - struct cpp_hw_info hw_info; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* Processing Queue - * store frame info for frames sent to microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_cpp_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; -#endif /* __MSM_CPP_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/Makefile b/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/Makefile deleted file mode 100644 index d3d25bfb918f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_vpe.o diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.c b/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.c deleted file mode 100644 index af233cfb76f1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.c +++ /dev/null @@ -1,1655 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-VPE %s:%d " fmt, __func__, __LINE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_pproc.h" -#include "msm_vpe.h" -#include "msm_camera_io_util.h" - -#define MSM_VPE_IDENT_TO_SESSION_ID(identity) ((identity >> 16) & 0xFFFF) -#define MSM_VPE_IDENT_TO_STREAM_ID(identity) (identity & 0xFFFF) - -#define MSM_VPE_DRV_NAME "msm_vpe" - -#define MSM_VPE_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_VPE_DBG 0 - -#if CONFIG_MSM_VPE_DBG -#define VPE_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define VPE_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -static void vpe_mem_dump(const char * const name, const void * const addr, - int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - VPE_DBG("%s: (%s) %pK %d\n", __func__, name, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = *p++; - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - VPE_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - VPE_DBG("%s\n", line_str); -} - -static inline long long vpe_do_div(long long num, long long den) -{ - do_div(num, den); - return num; -} - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, \ - member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ - }) - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static struct msm_cam_clk_info vpe_clk_info[] = { - {"vpe_clk", 160000000}, - {"vpe_pclk", -1}, -}; - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev); - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_debug("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - VPE_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -static struct msm_vpe_buff_queue_info_t *msm_vpe_get_buff_queue_entry( - struct vpe_device *vpe_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if ((vpe_dev->buff_queue[i].used == 1) && - (vpe_dev->buff_queue[i].session_id == session_id) && - (vpe_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &vpe_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_vpe_get_phy_addr(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - break; - } - } - - return phy_add; -} - -static unsigned long msm_vpe_queue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue, - struct msm_vpe_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_vpe_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(vpe_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto queue_buff_error1; - } - - rc = ion_map_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto queue_buff_error2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -queue_buff_error2: - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); -queue_buff_error1: - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_vpe_dequeue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_map_list_t *buff) -{ - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_vpe_fetch_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id) -{ - unsigned long phy_addr = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_vpe_get_phy_addr(vpe_dev, buff_queue_info, - buffer_info->index, native_buff); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - buffer_info); - } - return phy_addr; -} - -static int32_t msm_vpe_enqueue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_vpe_dequeue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info) -{ - struct msm_vpe_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - return 0; -} - -static int32_t msm_vpe_add_buff_queue_entry(struct vpe_device *vpe_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 0) { - buff_queue_info = &vpe_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_vpe_free_buff_queue_entry(struct vpe_device *vpe_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_vpe_create_buff_queue(struct vpe_device *vpe_dev, - uint32_t num_buffq) -{ - struct msm_vpe_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_vpe_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (vpe_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - vpe_dev->buff_queue = buff_queue; - vpe_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_vpe_delete_buff_queue(struct vpe_device *vpe_dev) -{ - uint32_t i; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - msm_vpe_free_buff_queue_entry(vpe_dev, - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - } - } - kzfree(vpe_dev->buff_queue); - vpe_dev->buff_queue = NULL; - vpe_dev->num_buffq = 0; - return; -} - -void vpe_release_ion_client(struct kref *ref) -{ - struct vpe_device *vpe_dev = container_of(ref, - struct vpe_device, refcount); - ion_client_destroy(vpe_dev->client); -} - -static int vpe_init_mem(struct vpe_device *vpe_dev) -{ - kref_init(&vpe_dev->refcount); - kref_get(&vpe_dev->refcount); - vpe_dev->client = msm_ion_client_create("vpe"); - - if (!vpe_dev->client) { - pr_err("couldn't create ion client\n"); - return -ENODEV; - } - - return 0; -} - -static void vpe_deinit_mem(struct vpe_device *vpe_dev) -{ - kref_put(&vpe_dev->refcount, vpe_release_ion_client); -} - -static irqreturn_t msm_vpe_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t irq_status; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - struct vpe_device *vpe_dev = (struct vpe_device *) data; - - irq_status = msm_camera_io_r_mb(vpe_dev->base + - VPE_INTR_STATUS_OFFSET); - - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = &vpe_dev->tasklet_queue_cmd[vpe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - VPE_DBG("%s: vpe tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vpe_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - - queue_cmd->cmd_used = 1; - vpe_dev->taskletq_idx = - (vpe_dev->taskletq_idx + 1) % MSM_VPE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vpe_dev->tasklet_q); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - tasklet_schedule(&vpe_dev->vpe_tasklet); - - msm_camera_io_w_mb(irq_status, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - VPE_DBG("%s: irq_status=0x%x.\n", __func__, irq_status); - - return IRQ_HANDLED; -} - -static void msm_vpe_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vpe_device *vpe_dev = (struct vpe_device *)data; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - - while (atomic_read(&vpe_dev->irq_cnt)) { - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vpe_dev->tasklet_q, - struct msm_vpe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vpe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vpe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - VPE_DBG("Frame done!!\n"); - msm_vpe_notify_frame_done(vpe_dev); - } -} - -static int vpe_init_hardware(struct vpe_device *vpe_dev) -{ - int rc = 0; - - if (vpe_dev->fs_vpe == NULL) { - vpe_dev->fs_vpe = - regulator_get(&vpe_dev->pdev->dev, "vdd"); - if (IS_ERR(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd get failed %ld\n", - PTR_ERR(vpe_dev->fs_vpe)); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } else if (regulator_enable(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd enable failed\n"); - regulator_put(vpe_dev->fs_vpe); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } - } - - rc = msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto disable_and_put_regulator; - } - - vpe_dev->base = ioremap(vpe_dev->mem->start, - resource_size(vpe_dev->mem)); - if (!vpe_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto disable_and_put_regulator; - } - - if (vpe_dev->state != VPE_STATE_BOOT) { - rc = request_irq(vpe_dev->irq->start, msm_vpe_irq, - IRQF_TRIGGER_RISING, - "vpe", vpe_dev); - if (rc < 0) { - pr_err("irq request fail! start=%u\n", - (uint32_t) vpe_dev->irq->start); - rc = -EBUSY; - goto unmap_base; - } else { - VPE_DBG("Got irq! %d\n", (int)vpe_dev->irq->start); - } - } else { - VPE_DBG("Skip requesting the irq since device is booting\n"); - } - vpe_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - msm_vpe_create_buff_queue(vpe_dev, MSM_VPE_MAX_BUFF_QUEUE); - return rc; - -unmap_base: - iounmap(vpe_dev->base); -disable_and_put_regulator: - regulator_disable(vpe_dev->fs_vpe); - regulator_put(vpe_dev->fs_vpe); -fail: - return rc; -} - -static int vpe_release_hardware(struct vpe_device *vpe_dev) -{ - if (vpe_dev->state != VPE_STATE_BOOT) { - free_irq(vpe_dev->irq->start, vpe_dev); - tasklet_kill(&vpe_dev->vpe_tasklet); - atomic_set(&vpe_dev->irq_cnt, 0); - } - - msm_vpe_delete_buff_queue(vpe_dev); - iounmap(vpe_dev->base); - msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 0); - return 0; -} - -static int vpe_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - - mutex_lock(&vpe_dev->mutex); - if (vpe_dev->vpe_open_cnt == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free VPE instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].active == 0) { - vpe_dev->vpe_subscribe_list[i].active = 1; - vpe_dev->vpe_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - VPE_DBG("open %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt++; - if (vpe_dev->vpe_open_cnt == 1) { - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - vpe_dev->vpe_open_cnt--; - goto err_fixup_sub_list; - } - rc = vpe_init_mem(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init mem\n", __func__); - vpe_dev->vpe_open_cnt--; - rc = -ENODEV; - goto err_release_hardware; - } - vpe_dev->state = VPE_STATE_IDLE; - } - mutex_unlock(&vpe_dev->mutex); - - return rc; - -err_release_hardware: - vpe_release_hardware(vpe_dev); -err_fixup_sub_list: - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } -err_mutex_unlock: - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int vpe_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - mutex_lock(&vpe_dev->mutex); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&vpe_dev->mutex); - return -ENODEV; - } - - VPE_DBG("close %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt--; - if (vpe_dev->vpe_open_cnt == 0) { - vpe_deinit_mem(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - } - mutex_unlock(&vpe_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_vpe_internal_ops = { - .open = vpe_open_node, - .close = vpe_close_node, -}; - -static int msm_vpe_buffer_ops(struct vpe_device *vpe_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(vpe_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *processed_frame; - struct msm_device_queue *queue = &vpe_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - if (queue->len > 0) { - frame_qcmd = msm_dequeue(queue, list_frame); - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("%s: Insufficient memory\n", __func__); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - VPE_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&vpe_dev->eventData_q, &event_qcmd->list_eventdata); - - if (!processed_frame->output_buffer_info.processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(buff_mgr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info.index; - rc = msm_vpe_buffer_ops(vpe_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("%s: error doing VIDIOC_MSM_BUF_MNGR_BUF_DONE\n", - __func__); - rc = -EINVAL; - } - } - - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_VPE_FRAME_DONE; - v4l2_event_queue(vpe_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -static void vpe_update_scaler_params(struct vpe_device *vpe_dev, - struct msm_vpe_frame_strip_info strip_info) -{ - uint32_t out_ROI_width, out_ROI_height; - uint32_t src_ROI_width, src_ROI_height; - - /* - * phase_step_x, phase_step_y, phase_init_x and phase_init_y - * are represented in fixed-point, unsigned 3.29 format - */ - uint32_t phase_step_x = 0; - uint32_t phase_step_y = 0; - uint32_t phase_init_x = 0; - uint32_t phase_init_y = 0; - - uint32_t src_roi, src_x, src_y, src_xy, temp; - uint32_t yscale_filter_sel, xscale_filter_sel; - uint32_t scale_unit_sel_x, scale_unit_sel_y; - uint64_t numerator, denominator; - - /* - * assumption is both direction need zoom. this can be - * improved. - */ - temp = msm_camera_io_r(vpe_dev->base + VPE_OP_MODE_OFFSET) | 0x3; - msm_camera_io_w(temp, vpe_dev->base + VPE_OP_MODE_OFFSET); - - src_ROI_width = strip_info.src_w; - src_ROI_height = strip_info.src_h; - out_ROI_width = strip_info.dst_w; - out_ROI_height = strip_info.dst_h; - - VPE_DBG("src w = %u, h=%u, dst w = %u, h =%u.\n", - src_ROI_width, src_ROI_height, out_ROI_width, - out_ROI_height); - src_roi = (src_ROI_height << 16) + src_ROI_width; - - msm_camera_io_w(src_roi, vpe_dev->base + VPE_SRC_SIZE_OFFSET); - - src_x = strip_info.src_x; - src_y = strip_info.src_y; - - VPE_DBG("src_x = %d, src_y=%d.\n", src_x, src_y); - - src_xy = src_y*(1<<16) + src_x; - msm_camera_io_w(src_xy, vpe_dev->base + - VPE_SRC_XY_OFFSET); - VPE_DBG("src_xy = 0x%x, src_roi=0x%x.\n", src_xy, src_roi); - - /* decide whether to use FIR or M/N for scaling */ - if ((out_ROI_width == 1 && src_ROI_width < 4) || - (src_ROI_width < 4 * out_ROI_width - 3)) - scale_unit_sel_x = 0;/* use FIR scalar */ - else - scale_unit_sel_x = 1;/* use M/N scalar */ - - if ((out_ROI_height == 1 && src_ROI_height < 4) || - (src_ROI_height < 4 * out_ROI_height - 3)) - scale_unit_sel_y = 0;/* use FIR scalar */ - else - scale_unit_sel_y = 1;/* use M/N scalar */ - - /* calculate phase step for the x direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_width == 1) - phase_step_x = (uint32_t) ((src_ROI_width) << - SCALER_PHASE_BITS); - - /* if using FIR scalar */ - else if (scale_unit_sel_x == 0) { - - /* - * Calculate the quotient ( src_ROI_width - 1 ) ( - * out_ROI_width - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point - */ - numerator = (uint64_t)(src_ROI_width - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the "(out_ROI_width == - * 1 )" - */ - denominator = (uint64_t)(out_ROI_width - 1); - /* - * divide and round up to the larger 29th decimal - * point. - */ - phase_step_x = (uint32_t) vpe_do_div((numerator + - denominator - 1), denominator); - } else if (scale_unit_sel_x == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_width ) / ( - * out_ROI_width) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_width) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_width); - phase_step_x = - (uint32_t) vpe_do_div(numerator, denominator); - } - /* calculate phase step for the y direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_height == 1) - phase_step_y = - (uint32_t) ((src_ROI_height) << SCALER_PHASE_BITS); - - /* if FIR scalar */ - else if (scale_unit_sel_y == 0) { - /* - * Calculate the quotient ( src_ROI_height - 1 ) / ( - * out_ROI_height - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the " ( out_ROI_height - * == 1 )" case - */ - denominator = (uint64_t)(out_ROI_height - 1); - /* - * Quotient is rounded up to the larger 29th decimal - * point. - */ - phase_step_y = - (uint32_t) vpe_do_div( - (numerator + denominator - 1), denominator); - } else if (scale_unit_sel_y == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_height ) ( - * out_ROI_height) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_height); - phase_step_y = (uint32_t) vpe_do_div( - numerator, denominator); - } - - /* decide which set of FIR coefficients to use */ - if (phase_step_x > HAL_MDP_PHASE_STEP_2P50) - xscale_filter_sel = 0; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P66) - xscale_filter_sel = 1; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P25) - xscale_filter_sel = 2; - else - xscale_filter_sel = 3; - - if (phase_step_y > HAL_MDP_PHASE_STEP_2P50) - yscale_filter_sel = 0; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P66) - yscale_filter_sel = 1; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P25) - yscale_filter_sel = 2; - else - yscale_filter_sel = 3; - - /* calculate phase init for the x direction */ - - /* if using FIR scalar */ - if (scale_unit_sel_x == 0) { - if (out_ROI_width == 1) - phase_init_x = - (uint32_t) ((src_ROI_width - 1) << - SCALER_PHASE_BITS); - else - phase_init_x = 0; - } else if (scale_unit_sel_x == 1) /* M over N scalar */ - phase_init_x = 0; - - /* - * calculate phase init for the y direction if using FIR - * scalar - */ - if (scale_unit_sel_y == 0) { - if (out_ROI_height == 1) - phase_init_y = - (uint32_t) ((src_ROI_height - - 1) << SCALER_PHASE_BITS); - else - phase_init_y = 0; - } else if (scale_unit_sel_y == 1) /* M over N scalar */ - phase_init_y = 0; - - strip_info.phase_step_x = phase_step_x; - strip_info.phase_step_y = phase_step_y; - strip_info.phase_init_x = phase_init_x; - strip_info.phase_init_y = phase_init_y; - VPE_DBG("phase step x = %d, step y = %d.\n", - strip_info.phase_step_x, strip_info.phase_step_y); - VPE_DBG("phase init x = %d, init y = %d.\n", - strip_info.phase_init_x, strip_info.phase_init_y); - - msm_camera_io_w(strip_info.phase_step_x, vpe_dev->base + - VPE_SCALE_PHASEX_STEP_OFFSET); - msm_camera_io_w(strip_info.phase_step_y, vpe_dev->base + - VPE_SCALE_PHASEY_STEP_OFFSET); - - msm_camera_io_w(strip_info.phase_init_x, vpe_dev->base + - VPE_SCALE_PHASEX_INIT_OFFSET); - msm_camera_io_w(strip_info.phase_init_y, vpe_dev->base + - VPE_SCALE_PHASEY_INIT_OFFSET); -} - -static void vpe_program_buffer_addresses( - struct vpe_device *vpe_dev, - unsigned long srcP0, - unsigned long srcP1, - unsigned long outP0, - unsigned long outP1) -{ - VPE_DBG("%s VPE Configured with:\n" - "Src %x, %x Dest %x, %x", - __func__, (uint32_t)srcP0, (uint32_t)srcP1, - (uint32_t)outP0, (uint32_t)outP1); - - msm_camera_io_w(srcP0, vpe_dev->base + VPE_SRCP0_ADDR_OFFSET); - msm_camera_io_w(srcP1, vpe_dev->base + VPE_SRCP1_ADDR_OFFSET); - msm_camera_io_w(outP0, vpe_dev->base + VPE_OUTP0_ADDR_OFFSET); - msm_camera_io_w(outP1, vpe_dev->base + VPE_OUTP1_ADDR_OFFSET); -} - -static int vpe_start(struct vpe_device *vpe_dev) -{ - /* enable the frame irq, bit 0 = Display list 0 ROI done */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - msm_camera_io_dump(vpe_dev->base, 0x120); - msm_camera_io_dump(vpe_dev->base + 0x00400, 0x18); - msm_camera_io_dump(vpe_dev->base + 0x10000, 0x250); - msm_camera_io_dump(vpe_dev->base + 0x30000, 0x20); - msm_camera_io_dump(vpe_dev->base + 0x50000, 0x30); - msm_camera_io_dump(vpe_dev->base + 0x50400, 0x10); - - /* - * This triggers the operation. When the VPE is done, - * msm_vpe_irq will fire. - */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_DL0_START_OFFSET); - return 0; -} - -static void vpe_config_axi_default(struct vpe_device *vpe_dev) -{ - msm_camera_io_w(0x25, vpe_dev->base + VPE_AXI_ARB_2_OFFSET); -} - -static int vpe_reset(struct vpe_device *vpe_dev) -{ - uint32_t vpe_version; - uint32_t rc = 0; - - vpe_version = msm_camera_io_r( - vpe_dev->base + VPE_HW_VERSION_OFFSET); - VPE_DBG("vpe_version = 0x%x\n", vpe_version); - /* disable all interrupts.*/ - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - /* clear all pending interrupts*/ - msm_camera_io_w(0x1fffff, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - /* write sw_reset to reset the core. */ - msm_camera_io_w(0x10, vpe_dev->base + VPE_SW_RESET_OFFSET); - /* then poll the reset bit, it should be self-cleared. */ - while (1) { - rc = msm_camera_io_r(vpe_dev->base + VPE_SW_RESET_OFFSET) \ - & 0x10; - if (rc == 0) - break; - cpu_relax(); - } - /* - * at this point, hardware is reset. Then pogram to default - * values. - */ - msm_camera_io_w(VPE_AXI_RD_ARB_CONFIG_VALUE, - vpe_dev->base + VPE_AXI_RD_ARB_CONFIG_OFFSET); - - msm_camera_io_w(VPE_CGC_ENABLE_VALUE, - vpe_dev->base + VPE_CGC_EN_OFFSET); - msm_camera_io_w(1, vpe_dev->base + VPE_CMD_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_OP_MODE_VALUE, - vpe_dev->base + VPE_OP_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_SCALE_CONFIG, - vpe_dev->base + VPE_SCALE_CONFIG_OFFSET); - vpe_config_axi_default(vpe_dev); - return rc; -} - -static void vpe_update_scale_coef(struct vpe_device *vpe_dev, uint32_t *p) -{ - uint32_t i, offset; - offset = *p; - for (i = offset; i < (VPE_SCALE_COEFF_NUM + offset); i++) { - VPE_DBG("Setting scale table %d\n", i); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_LSBn(i)); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_MSBn(i)); - } -} - -static void vpe_input_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_SRC_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SRC_UNPACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_IMAGE_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_XY_OFFSET); -} - -static void vpe_output_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OUT_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_OUT_PACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_XY_OFFSET); -} - -static void vpe_operation_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OP_MODE_OFFSET); -} - -/** - * msm_vpe_transaction_setup() - send setup for one frame to VPE - * @vpe_dev: vpe device - * @data: packed setup commands - * - * See msm_vpe.h for the expected format of `data' - */ -static void msm_vpe_transaction_setup(struct vpe_device *vpe_dev, void *data) -{ - int i; - void *iter = data; - - vpe_mem_dump("vpe_transaction", data, VPE_TRANSACTION_SETUP_CONFIG_LEN); - - for (i = 0; i < VPE_NUM_SCALER_TABLES; ++i) { - vpe_update_scale_coef(vpe_dev, (uint32_t *)iter); - iter += VPE_SCALER_CONFIG_LEN; - } - vpe_input_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_INPUT_PLANE_CFG_LEN; - vpe_output_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_OUTPUT_PLANE_CFG_LEN; - vpe_operation_config(vpe_dev, (uint32_t *)iter); -} - -static int msm_vpe_send_frame_to_hardware(struct vpe_device *vpe_dev, - struct msm_queue_cmd *frame_qcmd) -{ - struct msm_vpe_frame_info_t *process_frame; - - if (vpe_dev->processing_q.len < MAX_VPE_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&vpe_dev->processing_q, - &frame_qcmd->list_frame); - - vpe_update_scaler_params(vpe_dev, process_frame->strip_info); - vpe_program_buffer_addresses( - vpe_dev, - process_frame->src_phyaddr, - process_frame->src_phyaddr - + process_frame->src_chroma_plane_offset, - process_frame->dest_phyaddr, - process_frame->dest_phyaddr - + process_frame->dest_chroma_plane_offset); - vpe_start(vpe_dev); - do_gettimeofday(&(process_frame->in_time)); - } - return 0; -} - -static int msm_vpe_cfg(struct vpe_device *vpe_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_vpe_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_vpe_frame_info_t), GFP_KERNEL); - unsigned long in_phyaddr, out_phyaddr; - struct msm_buf_mngr_info buff_mgr_info; - - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_vpe_frame_info_t)); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - rc = -EINVAL; - goto err_free_new_frame; - } - - in_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - memset(&new_frame->output_buffer_info, 0, - sizeof(struct msm_vpe_buffer_info_t)); - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - pr_err("error getting buffer\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - new_frame->output_buffer_info.index = buff_mgr_info.index; - out_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->output_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!out_phyaddr) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto err_put_buf; - } - - new_frame->src_phyaddr = in_phyaddr; - new_frame->dest_phyaddr = out_phyaddr; - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto err_put_buf; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_vpe_send_frame_to_hardware(vpe_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto err_free_frame_qcmd; - } - - return rc; - -err_free_frame_qcmd: - kfree(frame_qcmd); -err_put_buf: - msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -err_free_new_frame: - kfree(new_frame); - return rc; -} - -static long msm_vpe_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - mutex_lock(&vpe_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_VPE_TRANSACTION_SETUP: { - struct msm_vpe_transaction_setup_cfg *cfg; - VPE_DBG("VIDIOC_MSM_VPE_TRANSACTION_SETUP\n"); - if (sizeof(*cfg) != ioctl_ptr->len) { - pr_err("%s: size mismatch cmd=%d, len=%d, expected=%d", - __func__, cmd, ioctl_ptr->len, - sizeof(*cfg)); - rc = -EINVAL; - break; - } - - cfg = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!cfg) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = copy_from_user(cfg, (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(cfg); - break; - } - - msm_vpe_transaction_setup(vpe_dev, (void *)cfg); - kfree(cfg); - break; - } - case VIDIOC_MSM_VPE_CFG: { - VPE_DBG("VIDIOC_MSM_VPE_CFG\n"); - rc = msm_vpe_cfg(vpe_dev, ioctl_ptr); - break; - } - case VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_vpe_stream_buff_info_t *u_stream_buff_info; - struct msm_vpe_stream_buff_info_t k_stream_buff_info; - - VPE_DBG("VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO\n"); - - if (sizeof(struct msm_vpe_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - if ((u_stream_buff_info->num_buffs == 0) || - (u_stream_buff_info->num_buffs > - MSM_CAMERA_MAX_STREAM_BUF)) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t), GFP_KERNEL); - if (!k_stream_buff_info.buffer_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = msm_vpe_add_buff_queue_entry(vpe_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - if (!rc) - rc = msm_vpe_enqueue_buff_info_list(vpe_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - break; - } - case VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - VPE_DBG("VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO\n"); - if (ioctl_ptr->len != sizeof(uint32_t)) { - pr_err("%s:%d Invalid len\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - msm_vpe_dequeue_buff_info_list(vpe_dev, buff_queue_info); - rc = msm_vpe_free_buff_queue_entry(vpe_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - break; - } - case VIDIOC_MSM_VPE_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &vpe_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *process_frame; - VPE_DBG("VIDIOC_MSM_VPE_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - process_frame = event_qcmd->command; - VPE_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_vpe_frame_info_t))) { - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - kfree(process_frame); - kfree(event_qcmd); - break; - } - } - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int msm_vpe_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, MAX_VPE_V4l2_EVENTS, NULL); -} - -static int msm_vpe_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_vpe_subdev_core_ops = { - .ioctl = msm_vpe_subdev_ioctl, - .subscribe_event = msm_vpe_subscribe_event, - .unsubscribe_event = msm_vpe_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_vpe_subdev_ops = { - .core = &msm_vpe_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_vpe_v4l2_subdev_fops; - -static long msm_vpe_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - case VIDIOC_MSM_VPE_GET_INST_INFO: { - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_vpe_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_vpe_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_vpe_frame_info_t))) { - return -EINVAL; - } - } - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_vpe_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_vpe_subdev_do_ioctl); -} - -static int vpe_register_domain(void) -{ - struct msm_iova_partition vpe_iommu_partition = { - /* TODO: verify that these are correct? */ - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vpe_iommu_layout = { - .partitions = &vpe_iommu_partition, - .npartitions = 1, - .client_name = "camera_vpe", - .domain_flags = 0, - }; - - return msm_register_domain(&vpe_iommu_layout); -} - -static int vpe_probe(struct platform_device *pdev) -{ - struct vpe_device *vpe_dev; - int rc = 0; - - vpe_dev = kzalloc(sizeof(struct vpe_device), GFP_KERNEL); - if (!vpe_dev) { - pr_err("not enough memory\n"); - return -ENOMEM; - } - - vpe_dev->vpe_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(vpe_clk_info), GFP_KERNEL); - if (!vpe_dev->vpe_clk) { - pr_err("not enough memory\n"); - rc = -ENOMEM; - goto err_free_vpe_dev; - } - - v4l2_subdev_init(&vpe_dev->msm_sd.sd, &msm_vpe_subdev_ops); - vpe_dev->msm_sd.sd.internal_ops = &msm_vpe_internal_ops; - snprintf(vpe_dev->msm_sd.sd.name, ARRAY_SIZE(vpe_dev->msm_sd.sd.name), - "vpe"); - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vpe_dev->msm_sd.sd, vpe_dev); - platform_set_drvdata(pdev, &vpe_dev->msm_sd.sd); - mutex_init(&vpe_dev->mutex); - spin_lock_init(&vpe_dev->tasklet_lock); - - vpe_dev->pdev = pdev; - - vpe_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "vpe"); - if (!vpe_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto err_free_vpe_clk; - } - - vpe_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "vpe"); - if (!vpe_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain_num = vpe_register_domain(); - if (vpe_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain = - msm_get_iommu_domain(vpe_dev->domain_num); - if (!vpe_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->iommu_ctx_src = msm_iommu_get_ctx("vpe_src"); - vpe_dev->iommu_ctx_dst = msm_iommu_get_ctx("vpe_dst"); - if (!vpe_dev->iommu_ctx_src || !vpe_dev->iommu_ctx_dst) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - media_entity_init(&vpe_dev->msm_sd.sd.entity, 0, NULL, 0); - vpe_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vpe_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_VPE; - vpe_dev->msm_sd.sd.entity.name = pdev->name; - msm_sd_register(&vpe_dev->msm_sd); - msm_vpe_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_vpe_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_vpe_v4l2_subdev_fops.unlocked_ioctl = msm_vpe_subdev_fops_ioctl; - msm_vpe_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_vpe_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vpe_dev->msm_sd.sd.devnode->fops = &msm_vpe_v4l2_subdev_fops; - vpe_dev->msm_sd.sd.entity.revision = vpe_dev->msm_sd.sd.devnode->num; - vpe_dev->state = VPE_STATE_BOOT; - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - goto err_unregister_sd; - } - vpe_reset(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - if (rc < 0) { - pr_err("Couldn't attach to vpe_src context bank\n"); - rc = -ENODEV; - goto err_unregister_sd; - } - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - if (rc < 0) { - pr_err("Couldn't attach to vpe_dst context bank\n"); - rc = -ENODEV; - goto err_detach_src; - } - - vpe_dev->state = VPE_STATE_OFF; - - msm_queue_init(&vpe_dev->eventData_q, "vpe-eventdata"); - msm_queue_init(&vpe_dev->processing_q, "vpe-frame"); - INIT_LIST_HEAD(&vpe_dev->tasklet_q); - tasklet_init(&vpe_dev->vpe_tasklet, msm_vpe_do_tasklet, - (unsigned long)vpe_dev); - vpe_dev->vpe_open_cnt = 0; - - return rc; - -err_detach_src: - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); -err_unregister_sd: - msm_sd_unregister(&vpe_dev->msm_sd); -err_release_mem: - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); -err_free_vpe_clk: - kfree(vpe_dev->vpe_clk); -err_free_vpe_dev: - kfree(vpe_dev); - return rc; -} - -static int vpe_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct vpe_device *vpe_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - vpe_dev = (struct vpe_device *)v4l2_get_subdevdata(sd); - if (!vpe_dev) { - pr_err("%s: vpe device is NULL\n", __func__); - return 0; - } - - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - msm_sd_unregister(&vpe_dev->msm_sd); - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); - mutex_destroy(&vpe_dev->mutex); - kfree(vpe_dev); - return 0; -} - -static struct platform_driver vpe_driver = { - .probe = vpe_probe, - .remove = vpe_device_remove, - .driver = { - .name = MSM_VPE_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_vpe_init_module(void) -{ - return platform_driver_register(&vpe_driver); -} - -static void __exit msm_vpe_exit_module(void) -{ - platform_driver_unregister(&vpe_driver); -} - -module_init(msm_vpe_init_module); -module_exit(msm_vpe_exit_module); -MODULE_DESCRIPTION("MSM VPE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.h b/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.h deleted file mode 100644 index 1a8508963493..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/pproc/vpe/msm_vpe.h +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VPE_H__ -#define __MSM_VPE_H__ - -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/*********** start of register offset *********************/ -#define VPE_INTR_ENABLE_OFFSET 0x0020 -#define VPE_INTR_STATUS_OFFSET 0x0024 -#define VPE_INTR_CLEAR_OFFSET 0x0028 -#define VPE_DL0_START_OFFSET 0x0030 -#define VPE_HW_VERSION_OFFSET 0x0070 -#define VPE_SW_RESET_OFFSET 0x0074 -#define VPE_AXI_RD_ARB_CONFIG_OFFSET 0x0078 -#define VPE_SEL_CLK_OR_HCLK_TEST_BUS_OFFSET 0x007C -#define VPE_CGC_EN_OFFSET 0x0100 -#define VPE_CMD_STATUS_OFFSET 0x10008 -#define VPE_PROFILE_EN_OFFSET 0x10010 -#define VPE_PROFILE_COUNT_OFFSET 0x10014 -#define VPE_CMD_MODE_OFFSET 0x10060 -#define VPE_SRC_SIZE_OFFSET 0x10108 -#define VPE_SRCP0_ADDR_OFFSET 0x1010C -#define VPE_SRCP1_ADDR_OFFSET 0x10110 -#define VPE_SRC_YSTRIDE1_OFFSET 0x1011C -#define VPE_SRC_FORMAT_OFFSET 0x10124 -#define VPE_SRC_UNPACK_PATTERN1_OFFSET 0x10128 -#define VPE_OP_MODE_OFFSET 0x10138 -#define VPE_SCALE_PHASEX_INIT_OFFSET 0x1013C -#define VPE_SCALE_PHASEY_INIT_OFFSET 0x10140 -#define VPE_SCALE_PHASEX_STEP_OFFSET 0x10144 -#define VPE_SCALE_PHASEY_STEP_OFFSET 0x10148 -#define VPE_OUT_FORMAT_OFFSET 0x10150 -#define VPE_OUT_PACK_PATTERN1_OFFSET 0x10154 -#define VPE_OUT_SIZE_OFFSET 0x10164 -#define VPE_OUTP0_ADDR_OFFSET 0x10168 -#define VPE_OUTP1_ADDR_OFFSET 0x1016C -#define VPE_OUT_YSTRIDE1_OFFSET 0x10178 -#define VPE_OUT_XY_OFFSET 0x1019C -#define VPE_SRC_XY_OFFSET 0x10200 -#define VPE_SRC_IMAGE_SIZE_OFFSET 0x10208 -#define VPE_SCALE_CONFIG_OFFSET 0x10230 -#define VPE_DEINT_STATUS_OFFSET 0x30000 -#define VPE_DEINT_DECISION_OFFSET 0x30004 -#define VPE_DEINT_COEFF0_OFFSET 0x30010 -#define VPE_SCALE_STATUS_OFFSET 0x50000 -#define VPE_SCALE_SVI_PARAM_OFFSET 0x50010 -#define VPE_SCALE_SHARPEN_CFG_OFFSET 0x50020 -#define VPE_SCALE_COEFF_LSP_0_OFFSET 0x50400 -#define VPE_SCALE_COEFF_MSP_0_OFFSET 0x50404 - -#define VPE_AXI_ARB_1_OFFSET 0x00408 -#define VPE_AXI_ARB_2_OFFSET 0x0040C - -#define VPE_SCALE_COEFF_LSBn(n) (0x50400 + 8 * (n)) -#define VPE_SCALE_COEFF_MSBn(n) (0x50404 + 8 * (n)) -#define VPE_SCALE_COEFF_NUM 32 - -/*********** end of register offset ********************/ - - -#define VPE_HARDWARE_VERSION 0x00080308 -#define VPE_SW_RESET_VALUE 0x00000010 /* bit 4 for PPP*/ -#define VPE_AXI_RD_ARB_CONFIG_VALUE 0x124924 -#define VPE_CMD_MODE_VALUE 0x1 -#define VPE_DEFAULT_OP_MODE_VALUE 0x40FC0004 -#define VPE_CGC_ENABLE_VALUE 0xffff -#define VPE_DEFAULT_SCALE_CONFIG 0x3c - -#define VPE_NORMAL_MODE_CLOCK_RATE 150000000 -#define VPE_TURBO_MODE_CLOCK_RATE 200000000 -#define VPE_SUBDEV_MAX_EVENTS 30 - -/**************************************************/ -/*********** End of command id ********************/ -/**************************************************/ - -#define SCALER_PHASE_BITS 29 -#define HAL_MDP_PHASE_STEP_2P50 0x50000000 -#define HAL_MDP_PHASE_STEP_1P66 0x35555555 -#define HAL_MDP_PHASE_STEP_1P25 0x28000000 - - -#define MAX_ACTIVE_VPE_INSTANCE 8 -#define MAX_VPE_PROCESSING_FRAME 2 -#define MAX_VPE_V4l2_EVENTS 30 - -#define MSM_VPE_TASKLETQ_SIZE 16 - -/** - * The format of the msm_vpe_transaction_setup_cfg is as follows: - * - * - vpe_update_scale_coef (65*4 uint32_t's) - * - Each table is 65 uint32_t's long - * - 1st uint32_t in each table indicates offset - * - Following 64 uint32_t's are the data - * - * - vpe_input_plane_config (6 uint32_t's) - * - VPE_SRC_FORMAT_OFFSET - * - VPE_SRC_UNPACK_PATTERN1_OFFSET - * - VPE_SRC_IMAGE_SIZE_OFFSET - * - VPE_SRC_YSTRIDE1_OFFSET - * - VPE_SRC_SIZE_OFFSET - * - VPE_SRC_XY_OFFSET - * - * - vpe_output_plane_config (5 uint32_t's) - * - VPE_OUT_FORMAT_OFFSET - * - VPE_OUT_PACK_PATTERN1_OFFSET - * - VPE_OUT_YSTRIDE1_OFFSET - * - VPE_OUT_SIZE_OFFSET - * - VPE_OUT_XY_OFFSET - * - * - vpe_operation_config (1 uint32_t) - * - VPE_OP_MODE_OFFSET - * - */ - -#define VPE_SCALER_CONFIG_LEN 260 -#define VPE_INPUT_PLANE_CFG_LEN 24 -#define VPE_OUTPUT_PLANE_CFG_LEN 20 -#define VPE_OPERATION_MODE_CFG_LEN 4 -#define VPE_NUM_SCALER_TABLES 4 - -#define VPE_TRANSACTION_SETUP_CONFIG_LEN ( \ - (VPE_SCALER_CONFIG_LEN * VPE_NUM_SCALER_TABLES) \ - + VPE_INPUT_PLANE_CFG_LEN \ - + VPE_OUTPUT_PLANE_CFG_LEN \ - + VPE_OPERATION_MODE_CFG_LEN) -/* VPE_TRANSACTION_SETUP_CONFIG_LEN = 1088 */ - -struct msm_vpe_transaction_setup_cfg { - uint8_t scaler_cfg[VPE_TRANSACTION_SETUP_CONFIG_LEN]; -}; - -struct vpe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum vpe_state { - VPE_STATE_BOOT, - VPE_STATE_IDLE, - VPE_STATE_ACTIVE, - VPE_STATE_OFF, -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_vpe_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint8_t cmd_used; -}; - -struct msm_vpe_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_vpe_buffer_info_t buff_info; -}; - -struct msm_vpe_buffer_map_list_t { - struct msm_vpe_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_vpe_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct vpe_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - void __iomem *base; - struct clk **vpe_clk; - struct regulator *fs_vpe; - struct mutex mutex; - enum vpe_state state; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx_src; - struct device *iommu_ctx_dst; - struct ion_client *client; - struct kref refcount; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct vpe_tasklet; - struct msm_vpe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VPE_TASKLETQ_SIZE]; - - struct vpe_subscribe_info vpe_subscribe_list[MAX_ACTIVE_VPE_INSTANCE]; - uint32_t vpe_open_cnt; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* - * Processing Queue: store frame info for frames sent to - * microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_vpe_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; - -#endif /* __MSM_VPE_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/Makefile deleted file mode 100644 index e35948ceeb60..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ flash/ eeprom/ -obj-$(CONFIG_MSM_CAMERA_SENSOR) += msm_sensor_init.o msm_sensor_driver.o msm_sensor.o -obj-$(CONFIG_IMX132) += imx132.o -obj-$(CONFIG_IMX134) += imx134.o -obj-$(CONFIG_OV8825) += ov8825.o -obj-$(CONFIG_OV8865) += ov8865.o -obj-$(CONFIG_s5k4e1) += s5k4e1.o -obj-$(CONFIG_OV12830) += ov12830.o -obj-$(CONFIG_OV9724) += ov9724.o -obj-$(CONFIG_HI256) += hi256.o -obj-$(CONFIG_OV5648) += ov5648.o -obj-$(CONFIG_MT9M114) += mt9m114.o -obj-$(CONFIG_MT9M114) += ov5645.o -obj-$(CONFIG_SP1628) += sp1628.o -obj-$(CONFIG_GC0339) += gc0339.o - -obj-$(CONFIG_SR200PC20) += sr200pc20_yuv.o \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/Makefile deleted file mode 100644 index 3ff6ca11e6c5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_actuator.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.c deleted file mode 100644 index f606fee8cd9a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.c +++ /dev/null @@ -1,1368 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_sd.h" -#include "msm_actuator.h" -#include "msm_cci.h" - -DEFINE_MSM_MUTEX(msm_actuator_mutex); - -//#define MSM_ACUTUATOR_DEBUG -#undef CDBG -#ifdef MSM_ACUTUATOR_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); - -static struct msm_actuator msm_vcm_actuator_table; -static struct msm_actuator msm_piezo_actuator_table; - -static struct i2c_driver msm_actuator_i2c_driver; -static struct msm_actuator *actuators[] = { - &msm_vcm_actuator_table, - &msm_piezo_actuator_table, - &msm_vcm_actuator_table, /* dummy entries */ - &msm_piezo_actuator_table, /* dummy entries */ -}; - -static int32_t msm_actuator_piezo_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) { - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s: i2c write error:%d\n", - __func__, rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = 0; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl, - int16_t next_lens_position, uint32_t hw_params, uint16_t delay) -{ - struct msm_actuator_reg_params_t *write_arr = a_ctrl->reg_tbl; - uint32_t hw_dword = hw_params; - uint16_t i2c_byte1 = 0, i2c_byte2 = 0; - uint16_t value = 0; - uint32_t size = a_ctrl->reg_tbl_size, i = 0; - struct msm_camera_i2c_reg_array *i2c_tbl = a_ctrl->i2c_reg_tbl; - CDBG("Enter\n"); - for (i = 0; i < size; i++) { - if (write_arr[i].reg_write_type == MSM_ACTUATOR_WRITE_DAC) { - value = (next_lens_position << - write_arr[i].data_shift) | - ((hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift); - - if (write_arr[i].reg_addr != 0xFFFF) { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = value; - if (size != (i+1)) { - i2c_byte2 = value & 0xFF; - CDBG("byte1:0x%x, byte2:0x%x\n", - i2c_byte1, i2c_byte2); - if (a_ctrl->i2c_tbl_index > - a_ctrl->total_steps) { - pr_err("failed:i2c table index out of bound\n"); - break; - } - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index]. - delay = 0; - a_ctrl->i2c_tbl_index++; - i++; - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (value & 0xFF00) >> 8; - } - } else { - i2c_byte1 = (value & 0xFF00) >> 8; - i2c_byte2 = value & 0xFF; - } - } else { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift; - } - if (a_ctrl->i2c_tbl_index > a_ctrl->total_steps) { - pr_err("failed: i2c table index out of bound\n"); - break; - } - CDBG("i2c_byte1:0x%x, i2c_byte2:0x%x\n", i2c_byte1, i2c_byte2); - i2c_tbl[a_ctrl->i2c_tbl_index].reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index].reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - CDBG("Enter\n"); - - for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_ACT_WRITE: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - case MSM_ACT_POLL: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - } - - if (0 != settings[i].delay) - msleep(settings[i].delay); - - if (rc < 0) - break; - } - - a_ctrl->curr_step_pos = 0; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vcm_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - uint16_t delay = 0; - uint16_t status_addr = 0; - uint16_t status_data = 0; - uint16_t status = 0; - uint16_t delay_count = 0; - uint16_t delay_count_limit = 0; - - CDBG("%s Enter, size %d\n", __func__, size); - - for (i = 0; i < size; i++) { - if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_DELAY) { - delay = settings[i].reg_data; - usleep_range(delay, delay + 1000); - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - } - else if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_READ_STATUS) { - /* reg_data[i] = limitation for delay count for read status */ - delay_count_limit = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - i++; - /*reg_addr[i+1] = addr for status register*/ - status_addr = settings[i].reg_addr; - /*reg_data[i+1] = value for stopping to read the status register*/ - status_data = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - delay_count = 0; - do { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, status_addr, &status, - MSM_CAMERA_I2C_BYTE_DATA); - CDBG("%s %d status %d\n", __func__, __LINE__,status); - if (rc < 0) { - CDBG("%s Failed I2C read Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(1000, 2000); - delay_count++; - if(delay_count >= delay_count_limit) break; - } while (status != status_data); - } - else { - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, settings[i].reg_addr, - settings[i].reg_data, MSM_CAMERA_I2C_BYTE_DATA); - if(rc < 0){ - pr_err("%s:%d I2C write failure size[%d] writen[%d]\n", - __func__, __LINE__, size, i); - break; - } - } - } - - CDBG("Exit\n"); - return 0; -} - -static void msm_actuator_write_focus( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t curr_lens_pos, - struct damping_params_t *damping_params, - int8_t sign_direction, - int16_t code_boundary) -{ - int16_t next_lens_pos = 0; - uint16_t damping_code_step = 0; - uint16_t wait_time = 0; - CDBG("Enter\n"); - - damping_code_step = damping_params->damping_step; - wait_time = damping_params->damping_delay; - - /* Write code based on damping_code_step in a loop */ - for (next_lens_pos = - curr_lens_pos + (sign_direction * damping_code_step); - (sign_direction * next_lens_pos) <= - (sign_direction * code_boundary); - next_lens_pos = - (next_lens_pos + - (sign_direction * damping_code_step))) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - next_lens_pos, damping_params->hw_params, wait_time); - curr_lens_pos = next_lens_pos; - } - - if (curr_lens_pos != code_boundary) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - code_boundary, damping_params->hw_params, wait_time); - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_piezo_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t dest_step_position = move_params->dest_step_pos; - struct damping_params_t ringing_params_kernel; - int32_t rc = 0; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[0]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - if (num_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - (num_steps * - a_ctrl->region_params[0].code_per_step), - ringing_params_kernel.hw_params, 0); - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = dest_step_position; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct damping_params_t ringing_params_kernel; - int8_t sign_dir = move_params->sign_dir; - uint16_t step_boundary = 0; - uint16_t target_step_pos = 0; - uint16_t target_lens_pos = 0; - int16_t dest_step_pos = move_params->dest_step_pos; - uint16_t curr_lens_pos = 0; - int dir = move_params->dir; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[a_ctrl->curr_region_index]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - - CDBG("called, dir %d, num_steps %d\n", dir, num_steps); - - if (dest_step_pos == a_ctrl->curr_step_pos) - return rc; - - if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) || - (sign_dir < MSM_ACTUATOR_MOVE_SIGNED_FAR)) { - pr_err("Invalid sign_dir = %d\n", sign_dir); - return -EFAULT; - } - if ((dir > MOVE_FAR) || (dir < MOVE_NEAR)) { - pr_err("Invalid direction = %d\n", dir); - return -EFAULT; - } - if (dest_step_pos > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", - dest_step_pos); - return -EFAULT; - } - curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; - a_ctrl->i2c_tbl_index = 0; - CDBG("curr_step_pos =%d dest_step_pos =%d curr_lens_pos=%d\n", - a_ctrl->curr_step_pos, dest_step_pos, curr_lens_pos); - - while (a_ctrl->curr_step_pos != dest_step_pos) { - step_boundary = - a_ctrl->region_params[a_ctrl->curr_region_index]. - step_bound[dir]; - if ((dest_step_pos * sign_dir) <= - (step_boundary * sign_dir)) { - - target_step_pos = dest_step_pos; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - } else { - target_step_pos = step_boundary; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - a_ctrl->curr_region_index += sign_dir; - } - a_ctrl->curr_step_pos = target_step_pos; - } - - move_params->curr_lens_pos = curr_lens_pos; - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) -{ - int16_t code_per_step = 0; - int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; - uint16_t step_boundary = 0; - uint32_t max_code_size = 1; - uint16_t data_size = set_info->actuator_params.data_size; - CDBG("Enter\n"); - for (; data_size > 0; data_size--) - max_code_size *= 2; - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - a_ctrl->step_position_table = - kmalloc(sizeof(uint16_t) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (a_ctrl->step_position_table == NULL) - return -ENOMEM; - cur_code = set_info->af_tuning_params.initial_code; - a_ctrl->step_position_table[step_index++] = cur_code; - for (region_index = 0; - region_index < a_ctrl->region_size; - region_index++) { - code_per_step = - a_ctrl->region_params[region_index].code_per_step; - step_boundary = - a_ctrl->region_params[region_index]. - step_bound[MOVE_NEAR]; - if (step_boundary > set_info->af_tuning_params.total_steps - 1) { - CDBG("%s: Error af steps mismatch!", __func__); - return -EFAULT; - } - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) - a_ctrl->step_position_table[step_index] = - cur_code; - else { - for (; step_index < - set_info->af_tuning_params.total_steps; - step_index++) - a_ctrl-> - step_position_table[ - step_index] = - max_code_size; - } - } - } - for (step_index = 0; - step_index < set_info->af_tuning_params.total_steps; - step_index++) { - CDBG("step_position_table[%d] = %d", step_index, - a_ctrl->step_position_table[step_index]); - } - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_actuator_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, move_params); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, - int config) -{ - int rc = 0, i, cnt; - struct msm_actuator_vreg *vreg_cfg; - - vreg_cfg = &a_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt) - return 0; - - if (cnt >= MSM_ACTUATOT_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - } - return rc; -} - -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) -{ - int32_t rc = 0; - CDBG("Enter\n"); - if (a_ctrl->actuator_state != ACTUATOR_POWER_DOWN) { - if (a_ctrl->vcm_enable) { - rc = gpio_direction_output(a_ctrl->vcm_pwd, 0); - if (!rc) - gpio_free(a_ctrl->vcm_pwd); - } - - rc = msm_actuator_vreg_control(a_ctrl, 0); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_tbl_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_DOWN; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_set_position_tbl( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t pos, uint16_t delay) -{ - uint16_t msb, lsb, reg_addr; - reg_addr = a_ctrl->reg_tbl[0].reg_addr; - CDBG("%s reg_addr = %d\n", __func__, reg_addr); - - msb = (pos>>8)&0x00ff; - lsb = pos&0x00ff; - - CDBG("%s pos=%d msb= 0x%X, lsb=0x%X\n", __func__, pos, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr+1; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - -} - -static int32_t msm_actuator_vcm_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) -{ - - int32_t rc = 0; - int32_t index; - uint16_t pos, delay; - struct msm_camera_i2c_reg_setting reg_setting; - - CDBG("%s Enter : steps = %d\n", __func__, set_pos->number_of_steps); - - if (set_pos->number_of_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - - for (index = 0; index < set_pos->number_of_steps; index++) { - pos = a_ctrl->step_position_table[set_pos->pos[index]]; - delay = set_pos->delay[index]; - msm_actuator_set_position_tbl(a_ctrl, pos, delay); - } - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) { - struct reg_settings_t *init_settings = NULL; - int32_t rc = -EFAULT; - uint16_t i = 0; - struct msm_camera_cci_client *cci_client = NULL; - CDBG("Enter\n"); - - for (i = 0; i < ARRAY_SIZE(actuators); i++) { - if (set_info->actuator_params.act_type == - actuators[i]->act_type) { - a_ctrl->func_tbl = &actuators[i]->func_tbl; - rc = 0; - } - } - - if (rc < 0) { - pr_err("Actuator function table not found : act_type = %d\n", set_info->actuator_params.act_type); - return rc; - } - if (set_info->af_tuning_params.total_steps - > MAX_ACTUATOR_AF_TOTAL_STEPS) { - pr_err("Max actuator totalsteps exceeded = %d\n", - set_info->af_tuning_params.total_steps); - return -EFAULT; - } - if (set_info->af_tuning_params.region_size - > MAX_ACTUATOR_REGION) { - pr_err("MAX_ACTUATOR_REGION is exceeded.\n"); - return -EFAULT; - } - - a_ctrl->region_size = set_info->af_tuning_params.region_size; - a_ctrl->pwd_step = set_info->af_tuning_params.pwd_step; - a_ctrl->total_steps = set_info->af_tuning_params.total_steps; - - if (copy_from_user(&a_ctrl->region_params, - (void *)set_info->af_tuning_params.region_params, - a_ctrl->region_size * sizeof(struct region_params_t))) - return -EFAULT; - - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = a_ctrl->i2c_client.cci_client; - cci_client->sid = - set_info->actuator_params.i2c_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->cci_i2c_master = a_ctrl->cci_master; - } else { - a_ctrl->i2c_client.client->addr = - set_info->actuator_params.i2c_addr; - } - - a_ctrl->i2c_data_type = set_info->actuator_params.i2c_data_type; - a_ctrl->i2c_client.addr_type = set_info->actuator_params.i2c_addr_type; - if (set_info->actuator_params.reg_tbl_size <= - MAX_ACTUATOR_REG_TBL_SIZE) { - a_ctrl->reg_tbl_size = set_info->actuator_params.reg_tbl_size; - } else { - a_ctrl->reg_tbl_size = 0; - pr_err("MAX_ACTUATOR_REG_TBL_SIZE is exceeded.\n"); - return -EFAULT; - } - - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_reg_tbl = - kmalloc(sizeof(struct msm_camera_i2c_reg_array) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (!a_ctrl->i2c_reg_tbl) { - pr_err("kmalloc fail\n"); - return -ENOMEM; - } - - if (copy_from_user(&a_ctrl->reg_tbl, - (void *)set_info->actuator_params.reg_tbl_params, - a_ctrl->reg_tbl_size * - sizeof(struct msm_actuator_reg_params_t))) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - return -EFAULT; - } - - if (set_info->actuator_params.init_setting_size && - set_info->actuator_params.init_setting_size - <= MAX_ACTUATOR_REG_TBL_SIZE) { - if (a_ctrl->func_tbl->actuator_init_focus) { - init_settings = kmalloc(sizeof(struct reg_settings_t) * - (set_info->actuator_params.init_setting_size), - GFP_KERNEL); - if (init_settings == NULL) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error allocating memory for init_settings\n"); - return -EFAULT; - } - if (copy_from_user(init_settings, - (void *)set_info->actuator_params.init_settings, - set_info->actuator_params.init_setting_size * - sizeof(struct reg_settings_t))) { - kfree(init_settings); - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error copying init_settings\n"); - return -EFAULT; - } - rc = a_ctrl->func_tbl->actuator_init_focus(a_ctrl, - set_info->actuator_params.init_setting_size, - init_settings); - kfree(init_settings); - if (rc < 0) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error actuator_init_focus\n"); - return -EFAULT; - } - } - } - - a_ctrl->initial_code = set_info->af_tuning_params.initial_code; - if (a_ctrl->func_tbl->actuator_init_step_table) - rc = a_ctrl->func_tbl-> - actuator_init_step_table(a_ctrl, set_info); - - a_ctrl->curr_step_pos = 0; - a_ctrl->curr_region_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_UP; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_sw_landing( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - struct damping_params_t *damping_params; - struct damping_params_t damping_params_k; - struct damping_params_t damping_params_sacoff; - - int16_t pos_index, First_damping_lens_pos, Second_damping_lens_pos, damp_delay, damp_step, lens_pos; - - if(a_ctrl == NULL || a_ctrl->step_position_table == NULL || move_params == NULL || move_params->ringing_params == NULL) - { - pr_err("%s %d NULL Pointer\n", __func__, __LINE__); - return 0; - } - - CDBG("%s Enter %d\n", __func__, __LINE__); - /*get first and second damping position, damp delay and step*/ - if (copy_from_user(&damping_params_k,&move_params->ringing_params[2],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - if (copy_from_user(&damping_params_sacoff,&move_params->ringing_params[3],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - damping_params = &damping_params_k; - damp_delay = damping_params->damping_delay; - damp_step = damping_params->damping_step; - pos_index = (damping_params->hw_params&0xffff); // low 4byte : ker index, high 4byte : dac - - if (pos_index > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", pos_index); - return -EFAULT; - } - First_damping_lens_pos = a_ctrl->step_position_table[pos_index];// - Second_damping_lens_pos = (First_damping_lens_pos>>2) ; // for old version - - CDBG("%s %d First damping index =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - CDBG("%s %d damp_delay=%d, damp_step=%d\n", __func__, __LINE__, damp_delay, damp_step); - /*set the starting lens pos to first damping lens pos*/ - lens_pos = First_damping_lens_pos;// - CDBG("%s %d curr_lens_pos=%d\n", __func__, __LINE__, lens_pos); - - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - - // 1. Go to pan_focus// - if(damping_params_sacoff.damping_step & 0x1 ) - { - Second_damping_lens_pos = ((damping_params->hw_params>>16)&0xffff); // default 0, dac value - if (Second_damping_lens_pos < 0) - Second_damping_lens_pos = 0; - CDBG("%s %d First damping index new =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - a_ctrl->i2c_tbl_index = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - CDBG("%s %d i2c_tbl_index %d\n", __func__, __LINE__, a_ctrl->i2c_tbl_index); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - //reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s %d Go to pan_focus, lens_pos=%d\n", __func__, __LINE__, lens_pos); - } - - // 2. SAC mode off// - if(damping_params_sacoff.damping_step & 0x02 ) - { - - uint16_t addr, data ; - addr = ((damping_params_sacoff.hw_params>>16)&0xffff); // 0x02 - data = ((damping_params_sacoff.hw_params)&0xffff); // 0x00 - usleep_range(damping_params_sacoff.damping_delay , damping_params_sacoff.damping_delay+1000); //10 msec - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr,data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s SAC mode off delay=%d, addr=0x%x, data =0x%x \n", __func__, damping_params_sacoff.damping_delay, addr, data); - } - - // 3. Start SW landing// - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - a_ctrl->i2c_tbl_index = 0; - do{ - if(lens_pos < Second_damping_lens_pos + damp_step) break; - else{ - lens_pos -= damp_step; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - } - }while(lens_pos > Second_damping_lens_pos); - - /*set final position*/ - CDBG("%s %d set the final position in the table\n", __func__, __LINE__); - lens_pos = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - return rc; -} - -static int msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, - void __user *argp) -{ - struct msm_actuator_cfg_data *cdata = - (struct msm_actuator_cfg_data *)argp; - int32_t rc = 0; - - if (!a_ctrl) - return -1; - - mutex_lock(a_ctrl->actuator_mutex); - CDBG("Enter\n"); - CDBG("%s type %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_ACTUATOR_INIT: - rc = msm_actuator_init(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_init failed %d\n", rc); - break; - case CFG_GET_ACTUATOR_INFO: - cdata->is_af_supported = 1; - cdata->cfg.cam_name = a_ctrl->cam_name; - break; - - case CFG_SET_ACTUATOR_INFO: - rc = msm_actuator_set_param(a_ctrl, &cdata->cfg.set_info); - if (rc < 0) - pr_err("init table failed %d\n", rc); - break; - - case CFG_SET_DEFAULT_FOCUS: - rc = a_ctrl->func_tbl->actuator_set_default_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - - case CFG_MOVE_FOCUS: - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - case CFG_ACTUATOR_POWERDOWN: - rc = msm_actuator_power_down(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_power_down failed %d\n", rc); - break; - - case CFG_SET_POSITION: - rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl, - &cdata->cfg.setpos); - if (rc < 0) - pr_err("actuator_set_position failed %d\n", rc); - break; - - case CFG_SET_ACTUATOR_SW_LANDING: - if (a_ctrl && a_ctrl->func_tbl && a_ctrl->func_tbl->actuator_sw_landing) { - rc = a_ctrl->func_tbl->actuator_sw_landing(a_ctrl, &cdata->cfg.move); - if (rc < 0) - pr_err("actuator_sw_landing failed %d\n", rc); - } - - case CFG_ACTUATOR_POWERUP: - rc = msm_actuator_power_up(a_ctrl); - if (rc < 0) - pr_err("Failed actuator power up%d\n", rc); - break; - - default: - break; - } - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_get_subdev_id(struct msm_actuator_ctrl_t *a_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = a_ctrl->pdev->id; - else - *subdev_id = a_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_actuator_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_actuator_internal_ops = { - .close = msm_actuator_close, -}; - -static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("Enter\n"); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_actuator_get_subdev_id(a_ctrl, argp); - case VIDIOC_MSM_ACTUATOR_CFG: - return msm_actuator_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_actuator_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("%s called\n", __func__); - - CDBG("vcm info: %d %d\n", a_ctrl->vcm_pwd, - a_ctrl->vcm_enable); - - rc = msm_actuator_vreg_control(a_ctrl, 1); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - if (a_ctrl->vcm_enable) { - rc = gpio_request(a_ctrl->vcm_pwd, "msm_actuator"); - if (!rc) { - CDBG("Enable VCM PWD\n"); - gpio_direction_output(a_ctrl->vcm_pwd, 1); - } - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(a_ctrl->actuator_mutex); - if (on) - rc = msm_actuator_power_up(a_ctrl); - else - rc = msm_actuator_power_down(a_ctrl); - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static struct v4l2_subdev_core_ops msm_actuator_subdev_core_ops = { - .ioctl = msm_actuator_subdev_ioctl, - .s_power = msm_actuator_power, -}; - -static struct v4l2_subdev_ops msm_actuator_subdev_ops = { - .core = &msm_actuator_subdev_core_ops, -}; - -static const struct i2c_device_id msm_actuator_i2c_id[] = { - {"qcom,actuator", (kernel_ulong_t)NULL}, - { } -}; - -static int32_t msm_actuator_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_actuator_ctrl_t *act_ctrl_t = NULL; - pr_err("msm_actuator_i2c_probe: Enter\n"); - - if (client == NULL) { - pr_err("msm_actuator_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; - } - - act_ctrl_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!act_ctrl_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - kfree(act_ctrl_t); - goto probe_failure; - } - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &act_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", act_ctrl_t->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(act_ctrl_t); - return rc; - } - - act_ctrl_t->i2c_driver = &msm_actuator_i2c_driver; - act_ctrl_t->i2c_client.client = client; - act_ctrl_t->curr_step_pos = 0, - act_ctrl_t->curr_region_index = 0, - /* Set device type as I2C */ - act_ctrl_t->act_device_type = MSM_CAMERA_I2C_DEVICE; - act_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - act_ctrl_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - act_ctrl_t->actuator_mutex = &msm_actuator_mutex; - - act_ctrl_t->cam_name = act_ctrl_t->subdev_id; - CDBG("act_ctrl_t->cam_name: %d", act_ctrl_t->cam_name); - /* Assign name for sub device */ - snprintf(act_ctrl_t->msm_sd.sd.name, sizeof(act_ctrl_t->msm_sd.sd.name), - "%s", act_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&act_ctrl_t->msm_sd.sd, - act_ctrl_t->i2c_client.client, - act_ctrl_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&act_ctrl_t->msm_sd.sd, act_ctrl_t); - act_ctrl_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - act_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&act_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - act_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - act_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - act_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&act_ctrl_t->msm_sd); - pr_info("msm_actuator_i2c_probe: succeeded\n"); - pr_err("msm_actuator_i2c_probe: Exit\n"); - -probe_failure: - return rc; -} - -static int32_t msm_actuator_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_actuator_ctrl_t *msm_actuator_t = NULL; - struct msm_actuator_vreg *vreg_cfg; - pr_err("msm_actuator_platform_probe: Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_actuator_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!msm_actuator_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_actuator_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_actuator_t->cci_master, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_actuator_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_actuator_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - msm_actuator_t->actuator_mutex = &msm_actuator_mutex; - msm_actuator_t->cam_name = pdev->id; - - /* Set platform device handle */ - msm_actuator_t->pdev = pdev; - /* Set device type as platform device */ - msm_actuator_t->act_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_actuator_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_actuator_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_actuator_t->i2c_client.cci_client) { - kfree(msm_actuator_t->vreg_cfg.cam_vreg); - kfree(msm_actuator_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = msm_actuator_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_actuator_t->msm_sd.sd, - msm_actuator_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_actuator_t->msm_sd.sd, msm_actuator_t); - msm_actuator_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - msm_actuator_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_actuator_t->msm_sd.sd.name, - ARRAY_SIZE(msm_actuator_t->msm_sd.sd.name), "msm_actuator"); - media_entity_init(&msm_actuator_t->msm_sd.sd.entity, 0, NULL, 0); - msm_actuator_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_actuator_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - msm_actuator_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&msm_actuator_t->msm_sd); - pr_err("msm_actuator_platform_probe: Exit\n"); - return rc; -} - -static const struct of_device_id msm_actuator_i2c_dt_match[] = { - {.compatible = "qcom,actuator"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_i2c_dt_match); - -static struct i2c_driver msm_actuator_i2c_driver = { - .id_table = msm_actuator_i2c_id, - .probe = msm_actuator_i2c_probe, - .remove = __exit_p(msm_actuator_i2c_remove), - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_i2c_dt_match, - }, -}; - -static const struct of_device_id msm_actuator_dt_match[] = { - {.compatible = "qcom,actuator", .data = NULL}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_dt_match); - -static struct platform_driver msm_actuator_platform_driver = { - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_dt_match, - }, -}; - -static int __init msm_actuator_init_module(void) -{ - int32_t rc = 0; - pr_err("msm_actuator_init_module: Enter\n"); - rc = platform_driver_probe(&msm_actuator_platform_driver, - msm_actuator_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&msm_actuator_i2c_driver); -} - -static struct msm_actuator msm_vcm_actuator_table = { - .act_type = ACTUATOR_VCM, - .func_tbl = { - .actuator_init_step_table = msm_actuator_vcm_init_step_table, - .actuator_move_focus = msm_actuator_move_focus, - .actuator_write_focus = msm_actuator_write_focus, - .actuator_set_default_focus = msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_vcm_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_vcm_set_position, - .actuator_sw_landing = msm_actuator_vcm_sw_landing, - }, -}; - -static struct msm_actuator msm_piezo_actuator_table = { - .act_type = ACTUATOR_PIEZO, - .func_tbl = { - .actuator_init_step_table = NULL, - .actuator_move_focus = msm_actuator_piezo_move_focus, - .actuator_write_focus = NULL, - .actuator_set_default_focus = - msm_actuator_piezo_set_default_focus, - .actuator_init_focus = msm_actuator_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - }, -}; - -module_init(msm_actuator_init_module); -MODULE_DESCRIPTION("MSM ACTUATOR"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.h b/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.h deleted file mode 100644 index 198cc7066907..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/actuator/msm_actuator.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_ACTUATOR_H -#define MSM_ACTUATOR_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_ACTUATOT_MAX_VREGS (10) - -struct msm_actuator_ctrl_t; - -enum msm_actuator_state_t { - ACTUATOR_POWER_UP, - ACTUATOR_POWER_DOWN, -}; - -struct msm_actuator_func_tbl { - int32_t (*actuator_i2c_write_b_af)(struct msm_actuator_ctrl_t *, - uint8_t, - uint8_t); - int32_t (*actuator_init_step_table)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_info_t *); - int32_t (*actuator_init_focus)(struct msm_actuator_ctrl_t *, - uint16_t, struct reg_settings_t *); - int32_t (*actuator_set_default_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - int32_t (*actuator_move_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - void (*actuator_parse_i2c_params)(struct msm_actuator_ctrl_t *, - int16_t, uint32_t, uint16_t); - void (*actuator_write_focus)(struct msm_actuator_ctrl_t *, - uint16_t, - struct damping_params_t *, - int8_t, - int16_t); - int32_t (*actuator_set_position)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_position_t *); - int32_t (*actuator_sw_landing)(struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); -}; - -struct msm_actuator { - enum actuator_type act_type; - struct msm_actuator_func_tbl func_tbl; -}; - -struct msm_actuator_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_ACTUATOT_MAX_VREGS]; - int num_vreg; -}; - -struct msm_actuator_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t act_device_type; - struct msm_sd_subdev msm_sd; - enum af_camera_name cam_name; - struct mutex *actuator_mutex; - struct msm_actuator_func_tbl *func_tbl; - enum msm_actuator_data_type i2c_data_type; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *act_v4l2_subdev_ops; - - int16_t curr_step_pos; - uint16_t curr_region_index; - uint16_t *step_position_table; - struct region_params_t region_params[MAX_ACTUATOR_REGION]; - uint16_t reg_tbl_size; - struct msm_actuator_reg_params_t reg_tbl[MAX_ACTUATOR_REG_TBL_SIZE]; - uint16_t region_size; - void *user_data; - uint32_t vcm_pwd; - uint32_t vcm_enable; - uint32_t total_steps; - uint16_t pwd_step; - uint16_t initial_code; - struct msm_camera_i2c_reg_array *i2c_reg_tbl; - uint16_t i2c_tbl_index; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_actuator_state_t actuator_state; - struct msm_actuator_vreg vreg_cfg; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/cci/Makefile deleted file mode 100644 index b1a31efbdaca..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSM_CCI) += msm_cci.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cam_cci_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cam_cci_hwreg.h deleted file mode 100644 index 059633bfd54a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cam_cci_hwreg.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAM_CCI_HWREG__ -#define __MSM_CAM_CCI_HWREG__ - -#define CCI_HW_VERSION_ADDR 0x00000000 -#define CCI_RESET_CMD_ADDR 0x00000004 -#define CCI_RESET_CMD_RMSK 0x0f73f3f7 -#define CCI_M0_RESET_RMSK 0x3F1 -#define CCI_M1_RESET_RMSK 0x3F001 -#define CCI_QUEUE_START_ADDR 0x00000008 -#define CCI_SET_CID_SYNC_TIMER_0_ADDR 0x00000010 -#define CCI_I2C_M0_SCL_CTL_ADDR 0x00000100 -#define CCI_I2C_M0_SDA_CTL_0_ADDR 0x00000104 -#define CCI_I2C_M0_SDA_CTL_1_ADDR 0x00000108 -#define CCI_I2C_M0_SDA_CTL_2_ADDR 0x0000010c -#define CCI_I2C_M0_READ_DATA_ADDR 0x00000118 -#define CCI_I2C_M0_MISC_CTL_ADDR 0x00000110 -#define CCI_I2C_M0_READ_BUF_LEVEL_ADDR 0x0000011C -#define CCI_HALT_REQ_ADDR 0x00000034 -#define CCI_M0_HALT_REQ_RMSK 0x1 -#define CCI_M1_HALT_REQ_RMSK 0x2 -#define CCI_I2C_M1_SCL_CTL_ADDR 0x00000200 -#define CCI_I2C_M1_SDA_CTL_0_ADDR 0x00000204 -#define CCI_I2C_M1_SDA_CTL_1_ADDR 0x00000208 -#define CCI_I2C_M1_SDA_CTL_2_ADDR 0x0000020c -#define CCI_I2C_M1_MISC_CTL_ADDR 0x00000210 -#define CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR 0x00000304 -#define CCI_I2C_M0_Q0_CUR_CMD_ADDR 0x00000308 -#define CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR 0x00000300 -#define CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x00000310 -#define CCI_IRQ_MASK_0_ADDR 0x00000c04 -#define CCI_IRQ_MASK_0_RMSK 0x7fff7ff7 -#define CCI_IRQ_CLEAR_0_ADDR 0x00000c08 -#define CCI_IRQ_STATUS_0_ADDR 0x00000c0c -#define CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK 0x4000000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK 0x2000000 -#define CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK 0x1000000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK 0x100000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK 0x10000 -#define CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK 0x1000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK 0x100 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK 0x10 -#define CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK 0x18000EE6 -#define CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK 0x60EE6000 -#define CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK 0x1 -#define CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x00000c00 -#endif /* __MSM_CAM_CCI_HWREG__ */ diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.c b/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.c deleted file mode 100644 index 4cb65c8e375a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.c +++ /dev/null @@ -1,1366 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_cam_cci_hwreg.h" -#include "msm_camera_io_util.h" - -#define V4L2_IDENT_CCI 50005 -#define CCI_I2C_QUEUE_0_SIZE 64 -#define CCI_I2C_QUEUE_1_SIZE 16 -#define CYCLES_PER_MICRO_SEC 4915 -#define CCI_MAX_DELAY 10000 - -#define CCI_TIMEOUT msecs_to_jiffies(100) - -/* TODO move this somewhere else */ -#define MSM_CCI_DRV_NAME "msm_cci" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do {} while (0) -#endif - -/* Max bytes that can be read per CCI read transaction */ -#define CCI_READ_MAX 12 -#define CCI_I2C_READ_MAX_RETRIES 3 -#define CCI_I2C_MAX_READ 8192 -#define CCI_I2C_MAX_WRITE 8192 -#define CCI_NUM_CLK_MAX 16 - -static struct v4l2_subdev *g_cci_subdev; - -static struct msm_cam_clk_info cci_clk_info[CCI_NUM_CLK_MAX]; - -static void msm_cci_set_clk_param(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl) -{ - struct msm_cci_clk_params_t *clk_params = NULL; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - enum i2c_freq_mode_t i2c_freq_mode = c_ctrl->cci_info->i2c_freq_mode; - - if (cci_dev->master_clk_init[master]) - return; - clk_params = &cci_dev->cci_clk_params[i2c_freq_mode]; - - if (MASTER_0 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M0_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M0_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M0_MISC_CTL_ADDR); - } else if (MASTER_1 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M1_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M1_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M1_MISC_CTL_ADDR); - } - cci_dev->master_clk_init[master] = 1; - return; -} - -static void msm_cci_flush_queue(struct cci_device *cci_dev, - enum cci_i2c_master_t master) -{ - int32_t rc = 0; - - msm_camera_io_w_mb(1 << master, cci_dev->base + CCI_HALT_REQ_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc < 0) { - pr_err("%s:%d wait failed\n", __func__, __LINE__); - } else if (rc == 0) { - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - - /* Set proper mask to RESET CMD address based on MASTER */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, __LINE__, - rc); - } - return; -} - -static int32_t msm_cci_validate_queue(struct cci_device *cci_dev, - uint32_t len, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t read_val = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - read_val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR + reg_offset); - CDBG("%s line %d CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR %d len %d max %d\n", - __func__, __LINE__, read_val, len, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size); - if ((read_val + len + 1) > cci_dev-> - cci_i2c_queue_info[master][queue].max_queue_size) { - uint32_t reg_val = 0; - uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - msm_camera_io_w_mb(report_val, - cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - read_val++; - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR %d\n", - __func__, __LINE__, read_val); - msm_camera_io_w_mb(read_val, cci_dev->base + - CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR + reg_offset); - reg_val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(reg_val, cci_dev->base + - CCI_QUEUE_START_ADDR); - CDBG("%s line %d wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - return rc; - } - rc = cci_dev->cci_master_info[master].status; - if (rc < 0) - pr_err("%s failed rc %d\n", __func__, rc); - } - return rc; -} - -static int32_t msm_cci_data_queue(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl, enum cci_i2c_queue_t queue, uint8_t is_burst) -{ - uint16_t i = 0, j = 0, k = 0, h = 0, len = 0; - int32_t rc = 0; - uint32_t cmd = 0, delay = 0; - uint8_t data[11]; - uint16_t reg_addr = 0; - struct msm_camera_i2c_reg_setting *i2c_msg = - &c_ctrl->cfg.cci_i2c_write_cfg; - uint16_t cmd_size = i2c_msg->size; - struct msm_camera_i2c_reg_array *i2c_cmd = i2c_msg->reg_setting; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - - if (i2c_cmd == NULL) { - pr_err("%s:%d Failed line\n", __func__, - __LINE__); - return -EINVAL; - } - - if ((!cmd_size) || (cmd_size > CCI_I2C_MAX_WRITE)) { - pr_err("%s:%d Failed line\n", __func__, __LINE__); - return -EINVAL; - } - - CDBG("%s addr type %d data type %d\n", __func__, - i2c_msg->addr_type, i2c_msg->data_type); - - if (i2c_msg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - if (i2c_msg->data_type >= MSM_CAMERA_I2C_DATA_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - /* assume total size within the max queue */ - while (cmd_size) { - CDBG("%s cmd_size %d addr 0x%x data 0x%x", __func__, - cmd_size, i2c_cmd->reg_addr, i2c_cmd->reg_data); - delay = i2c_cmd->delay; - data[i++] = CCI_I2C_WRITE_CMD; - if (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA) { - if (i2c_cmd->reg_addr) { - reg_addr = i2c_cmd->reg_addr; - } - } - else { - reg_addr = i2c_cmd->reg_addr; - } - /* either byte or word addr */ - if (i2c_msg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - data[i++] = reg_addr; - else { - data[i++] = (reg_addr & 0xFF00) >> 8; - data[i++] = reg_addr & 0x00FF; - } - /* max of 10 data bytes */ - do { - if ((i2c_msg->data_type == MSM_CAMERA_I2C_BYTE_DATA) || - (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA)) { - data[i++] = i2c_cmd->reg_data; - if (!is_burst) - reg_addr++; - } else { - if ((i + 1) <= 10) { - data[i++] = (i2c_cmd->reg_data & - 0xFF00) >> 8; /* MSB */ - data[i++] = i2c_cmd->reg_data & - 0x00FF; /* LSB */ - if (!is_burst) - reg_addr += 2; - } else - break; - } - i2c_cmd++; - } while (--cmd_size && !i2c_cmd->reg_addr && (i <= 10)); - data[0] |= ((i-1) << 4); - len = ((i-1)/4) + 1; - rc = msm_cci_validate_queue(cci_dev, len, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - for (h = 0, k = 0; h < len; h++) { - cmd = 0; - for (j = 0; (j < 4 && k < i); j++) - cmd |= (data[k++] << (j * 8)); - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - if ((delay > 0) && (delay < CCI_MAX_DELAY)) { - cmd = (uint32_t)((delay * CYCLES_PER_MICRO_SEC) / - 0x100); - cmd <<= 4; - cmd |= CCI_I2C_WAIT_CMD; - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - i = 0; - } - return rc; -} - -static int32_t msm_cci_write_i2c_queue(struct cci_device *cci_dev, - uint32_t val, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cci_validate_queue(cci_dev, 1, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR:val 0x%x:0x%x\n", - __func__, CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - return rc; -} - -static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - uint32_t val = 0; - int32_t read_words = 0, exp_words = 0; - int32_t index = 0, first_byte = 0; - uint32_t i = 0; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_1; - struct cci_device *cci_dev = NULL; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - CDBG("%s line %d\n", __func__, __LINE__); - cci_dev = v4l2_get_subdevdata(sd); - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_read call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - if (read_cfg->data == NULL) { - pr_err("%s:%d Data ptr is NULL\n", __func__, - __LINE__); - goto ERROR; - } - - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - ((read_cfg->addr & 0xFF) << 8); - if (read_cfg->addr_type == MSM_CAMERA_I2C_WORD_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - (((read_cfg->addr & 0xFF00) >> 8) << 8) | - ((read_cfg->addr & 0xFF) << 16); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_READ_CMD | (read_cfg->num_byte << 4); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_UNLOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s cur word cnt 0x%x\n", __func__, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = 0; - } - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - - read_words = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_BUF_LEVEL_ADDR + master * 0x100); - exp_words = ((read_cfg->num_byte / 4) + 1); - if (read_words != exp_words) { - pr_err("%s:%d read_words = %d, exp words = %d\n", __func__, - __LINE__, read_words, exp_words); - memset(read_cfg->data, 0, read_cfg->num_byte); - rc = -EINVAL; - goto ERROR; - } - index = 0; - CDBG("%s index %d num_type %d\n", __func__, index, - read_cfg->num_byte); - first_byte = 0; - do { - val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_DATA_ADDR + master * 0x100); - CDBG("%s read val 0x%x\n", __func__, val); - for (i = 0; (i < 4) && (index < read_cfg->num_byte); i++) { - CDBG("%s i %d index %d\n", __func__, i, index); - if (!first_byte) { - CDBG("%s sid 0x%x\n", __func__, val & 0xFF); - first_byte++; - } else { - read_cfg->data[index] = - (val >> (i * 8)) & 0xFF; - CDBG("%s data[%d] 0x%x\n", __func__, index, - read_cfg->data[index]); - index++; - } - } - } while (--read_words > 0); -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - struct cci_device *cci_dev = NULL; - enum cci_i2c_master_t master; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - uint16_t read_bytes = 0; - - if (!sd || !c_ctrl) { - pr_err("%s:%d sd %pK c_ctrl %pK\n", __func__, - __LINE__, sd, c_ctrl); - return -EINVAL; - } - if (!c_ctrl->cci_info) { - pr_err("%s:%d cci_info NULL\n", __func__, __LINE__); - return -EINVAL; - } - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev) { - pr_err("%s:%d cci_dev NULL\n", __func__, __LINE__); - return -EINVAL; - } - - if (c_ctrl->cci_info->cci_i2c_master > MASTER_MAX - || c_ctrl->cci_info->cci_i2c_master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - if ((!read_cfg->num_byte) || (read_cfg->num_byte > CCI_I2C_MAX_READ)) { - pr_err("%s:%d read num bytes 0\n", __func__, __LINE__); - rc = -EINVAL; - goto ERROR; - } - - read_bytes = read_cfg->num_byte; - do { - if (read_bytes > CCI_READ_MAX) - read_cfg->num_byte = CCI_READ_MAX; - else - read_cfg->num_byte = read_bytes; - rc = msm_cci_i2c_read(sd, c_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - if (read_bytes > CCI_READ_MAX) { - read_cfg->addr += CCI_READ_MAX; - read_cfg->data += CCI_READ_MAX; - read_bytes -= CCI_READ_MAX; - } else { - read_bytes = 0; - } - } while (read_bytes); -ERROR: - return rc; -} - -static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl, uint8_t is_burst) -{ - int32_t rc = 0; - struct cci_device *cci_dev; - uint32_t val; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_0; - cci_dev = v4l2_get_subdevdata(sd); - - master = c_ctrl->cci_info->cci_i2c_master; - if (master >= MASTER_MAX - || master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_write call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - CDBG("%s:%d CCI_I2C_SET_PARAM_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - CDBG("%s:%d CCI_I2C_LOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - rc = msm_cci_data_queue(cci_dev, c_ctrl, queue, is_burst); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - val = CCI_I2C_UNLOCK_CMD; - CDBG("%s:%d CCI_I2C_UNLOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s:%d cur word count %d\n", __func__, __LINE__, val); - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - - CDBG("%s:%d E wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = cci_dev->cci_master_info[master].status; - } - CDBG("%s:%d X wait_for_completion_interruptible\n", __func__, - __LINE__); - -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int msm_cci_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - if (!chip) { - pr_err("%s:%d: NULL pointer supplied for chip ident\n", - __func__, __LINE__); - return -EINVAL; - } - chip->ident = V4L2_IDENT_CCI; - chip->revision = 0; - return 0; -} - -static int32_t msm_cci_pinctrl_init(struct cci_device *cci_dev) -{ - struct msm_pinctrl_info *cci_pctrl = NULL; - - cci_pctrl = &cci_dev->cci_pinctrl; - cci_pctrl->pinctrl = devm_pinctrl_get(&cci_dev->pdev->dev); - if (IS_ERR_OR_NULL(cci_pctrl->pinctrl)) { - pr_err("%s:%d devm_pinctrl_get cci_pinctrl failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_active = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_active)) { - pr_err("%s:%d look up state for active state failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_suspend = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_suspend)) { - pr_err("%s:%d look up state for suspend state failed\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -static int32_t msm_cci_init(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - uint8_t i = 0; - int32_t rc = 0, ret = 0; - struct cci_device *cci_dev; - enum cci_i2c_master_t master; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev || !c_ctrl) { - pr_err("%s:%d failed: invalid params %pK %pK\n", __func__, - __LINE__, cci_dev, c_ctrl); - rc = -ENOMEM; - return rc; - } - if (cci_dev->ref_count++) { - CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); - master = c_ctrl->cci_info->cci_i2c_master; - CDBG("%s:%d master %d\n", __func__, __LINE__, master); - if (master < MASTER_MAX && master >= 0) { - mutex_lock(&cci_dev->cci_master_info[master].mutex); - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - /* Set proper mask to RESET CMD address */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master]. - reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, - __LINE__, rc); - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - } - return 0; - } - ret = msm_cci_pinctrl_init(cci_dev); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - cci_dev->cci_pinctrl_status = 0; - } else { - cci_dev->cci_pinctrl_status = 1; - } - rc = msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 1); - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: request gpio failed\n", __func__); - goto request_gpio_failed; - } - rc = msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 1); - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: clk enable failed\n", __func__); - goto clk_enable_failed; - } - enable_irq(cci_dev->irq->start); - cci_dev->hw_version = msm_camera_io_r_mb(cci_dev->base + - CCI_HW_VERSION_ADDR); - pr_info("%s:%d: hw_version = 0x%x\n", __func__, __LINE__, - cci_dev->hw_version); - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_RESET_CMD_RMSK, cci_dev->base + - CCI_RESET_CMD_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_RESET_CMD_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[MASTER_0].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - goto reset_complete_failed; - } - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - msm_cci_set_clk_param(cci_dev, c_ctrl); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_MASK_0_ADDR); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - cci_dev->cci_state = CCI_STATE_ENABLED; - - return 0; - -reset_complete_failed: - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); -clk_enable_failed: - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - } - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); -request_gpio_failed: - cci_dev->ref_count--; - return rc; -} - -static int32_t msm_cci_release(struct v4l2_subdev *sd) -{ - uint8_t i = 0, rc = 0; - struct cci_device *cci_dev; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev->ref_count || cci_dev->cci_state != CCI_STATE_ENABLED) { - pr_err("%s invalid ref count %d / cci state %d\n", - __func__, cci_dev->ref_count, cci_dev->cci_state); - return -EINVAL; - } - if (--cci_dev->ref_count) { - CDBG("%s ref_count Exit %d\n", __func__, cci_dev->ref_count); - return 0; - } - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); - if (cci_dev->cci_pinctrl_status) { - rc = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - cci_dev->cci_pinctrl_status = 0; - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - cci_dev->cci_state = CCI_STATE_DISABLED; - - return 0; -} - -static int32_t msm_cci_config(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *cci_ctrl) -{ - int32_t rc = 0; - CDBG("%s line %d cmd %d\n", __func__, __LINE__, - cci_ctrl->cmd); - switch (cci_ctrl->cmd) { - case MSM_CCI_INIT: - rc = msm_cci_init(sd, cci_ctrl); - break; - case MSM_CCI_RELEASE: - rc = msm_cci_release(sd); - break; - case MSM_CCI_I2C_READ: - rc = msm_cci_i2c_read_bytes(sd, cci_ctrl); - break; - case MSM_CCI_I2C_WRITE: - rc = msm_cci_i2c_write(sd, cci_ctrl, 0); - break; - case MSM_CCI_I2C_WRITE_BURST: - rc = msm_cci_i2c_write(sd, cci_ctrl, 1); - break; - case MSM_CCI_GPIO_WRITE: - break; - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - cci_ctrl->status = rc; - return rc; -} - -static irqreturn_t msm_cci_irq(int irq_num, void *data) -{ - uint32_t irq; - struct cci_device *cci_dev = data; - irq = msm_camera_io_r_mb(cci_dev->base + CCI_IRQ_STATUS_0_ADDR); - msm_camera_io_w_mb(irq, cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - msm_camera_io_w_mb(0x0, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - CDBG("%s CCI_I2C_M0_STATUS_ADDR = 0x%x\n", __func__, irq); - if (irq & CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK) { - if (cci_dev->cci_master_info[MASTER_0].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_0].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_0]. - reset_complete); - } - if (cci_dev->cci_master_info[MASTER_1].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_1].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_1]. - reset_complete); - } - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_0].status = 0; - complete(&cci_dev->cci_master_info[MASTER_0].reset_complete); - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_1].status = 0; - complete(&cci_dev->cci_master_info[MASTER_1].reset_complete); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_1].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK) { - pr_err("%s:%d MASTER_0 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_0].status = -EINVAL; - msm_camera_io_w_mb(CCI_M0_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK) { - pr_err("%s:%d MASTER_1 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_1].status = -EINVAL; - msm_camera_io_w_mb(CCI_M1_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - return IRQ_HANDLED; -} - -static int msm_cci_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct cci_device *cci_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s line %d\n", __func__, __LINE__); - ret = msm_cci_irq(cci_dev->irq->start, cci_dev); - CDBG("%s: msm_cci_irq return %d\n", __func__, ret); - *handled = TRUE; - return 0; -} - -static long msm_cci_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - CDBG("%s line %d\n", __func__, __LINE__); - switch (cmd) { - case VIDIOC_MSM_CCI_CFG: - rc = msm_cci_config(sd, arg); - break; - case MSM_SD_SHUTDOWN: { - return rc; - } - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - return rc; -} - -static struct v4l2_subdev_core_ops msm_cci_subdev_core_ops = { - .g_chip_ident = &msm_cci_subdev_g_chip_ident, - .ioctl = &msm_cci_subdev_ioctl, - .interrupt_service_routine = msm_cci_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_cci_subdev_ops = { - .core = &msm_cci_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_cci_internal_ops; - -static void msm_cci_init_cci_params(struct cci_device *new_cci_dev) -{ - uint8_t i = 0, j = 0; - for (i = 0; i < NUM_MASTERS; i++) { - new_cci_dev->cci_master_info[i].status = 0; - mutex_init(&new_cci_dev->cci_master_info[i].mutex); - init_completion(&new_cci_dev-> - cci_master_info[i].reset_complete); - for (j = 0; j < NUM_QUEUES; j++) { - if (j == QUEUE_0) - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_0_SIZE; - else - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_1_SIZE; - } - } - return; -} - -static int32_t msm_cci_init_gpio_params(struct cci_device *cci_dev) -{ - int32_t rc = 0, i = 0; - uint32_t *val_array = NULL; - uint8_t tbl_size = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct gpio *gpio_tbl = NULL; - - cci_dev->cci_gpio_tbl_size = tbl_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, tbl_size); - if (!tbl_size) { - pr_err("%s:%d gpio count 0\n", __func__, __LINE__); - return 0; - } - - gpio_tbl = cci_dev->cci_gpio_tbl = - kzalloc(sizeof(struct gpio) * tbl_size, GFP_KERNEL); - if (!gpio_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - return 0; - } - - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].gpio = of_get_gpio(of_node, i); - CDBG("%s gpio_tbl[%d].gpio = %d\n", __func__, i, - gpio_tbl[i].gpio); - } - - val_array = kzalloc(sizeof(uint32_t) * tbl_size, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-tbl-flags", - val_array, tbl_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].flags = val_array[i]; - CDBG("%s gpio_tbl[%d].flags = %ld\n", __func__, i, - gpio_tbl[i].flags); - } - - for (i = 0; i < tbl_size; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-tbl-label", i, &gpio_tbl[i].label); - CDBG("%s gpio_tbl[%d].label = %s\n", __func__, i, - gpio_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(val_array); -ERROR1: - kfree(cci_dev->cci_gpio_tbl); - cci_dev->cci_gpio_tbl = NULL; - cci_dev->cci_gpio_tbl_size = 0; - return rc; -} - -static void msm_cci_init_default_clk_params(struct cci_device *cci_dev, - uint8_t index) -{ - /* default clock params are for 100Khz */ - cci_dev->cci_clk_params[index].hw_thigh = 78; - cci_dev->cci_clk_params[index].hw_tlow = 114; - cci_dev->cci_clk_params[index].hw_tsu_sto = 28; - cci_dev->cci_clk_params[index].hw_tsu_sta = 28; - cci_dev->cci_clk_params[index].hw_thd_dat = 10; - cci_dev->cci_clk_params[index].hw_thd_sta = 77; - cci_dev->cci_clk_params[index].hw_tbuf = 118; - cci_dev->cci_clk_params[index].hw_scl_stretch_en = 0; - cci_dev->cci_clk_params[index].hw_trdhld = 6; - cci_dev->cci_clk_params[index].hw_tsp = 1; -} - -static void msm_cci_init_clk_params(struct cci_device *cci_dev) -{ - int32_t rc = 0; - uint32_t val = 0; - uint8_t count = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct device_node *src_node = NULL; - - for (count = 0; count < I2C_MAX_MODES; count++) { - - if (I2C_STANDARD_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_standard_mode"); - else if (I2C_FAST_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_fast_mode"); - else - src_node = of_find_node_by_name(of_node, - "qcom,i2c_custom_mode"); - - rc = of_property_read_u32(src_node, "qcom,hw-thigh", &val); - CDBG("%s qcom,hw-thigh %d, rc %d\n", __func__, val, rc); - if (!rc) { - cci_dev->cci_clk_params[count].hw_thigh = val; - rc = of_property_read_u32(src_node, "qcom,hw-tlow", - &val); - CDBG("%s qcom,hw-tlow %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tlow = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sto", - &val); - CDBG("%s qcom,hw-tsu-sto %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sto = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sta", - &val); - CDBG("%s qcom,hw-tsu-sta %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-dat", - &val); - CDBG("%s qcom,hw-thd-dat %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_dat = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-sta", - &val); - CDBG("%s qcom,hw-thd-sta %d, rc %d\n", __func__, - val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-tbuf", - &val); - CDBG("%s qcom,hw-tbuf %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tbuf = val; - rc = of_property_read_u32(src_node, - "qcom,hw-scl-stretch-en", &val); - CDBG("%s qcom,hw-scl-stretch-en %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_scl_stretch_en = val; - rc = of_property_read_u32(src_node, "qcom,hw-trdhld", - &val); - CDBG("%s qcom,hw-trdhld %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_trdhld = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsp", - &val); - CDBG("%s qcom,hw-tsp %d, rc %d\n", __func__, val, rc); - } - if (!rc) - cci_dev->cci_clk_params[count].hw_tsp = val; - else - msm_cci_init_default_clk_params(cci_dev, count); - of_node_put(src_node); - src_node = NULL; - } - return; -} - -struct v4l2_subdev *msm_cci_get_subdev(void) -{ - return g_cci_subdev; -} - -static int msm_cci_get_clk_info(struct cci_device *cci_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CCI_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - cci_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CCI_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CCI_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cci_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, cci_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cci_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - cci_clk_info[i].clk_rate); - } - return 0; -} - -static int msm_cci_probe(struct platform_device *pdev) -{ - struct cci_device *new_cci_dev; - int rc = 0; - pr_err("%s: pdev %pK device id = %d\n", __func__, pdev, pdev->id); - new_cci_dev = kzalloc(sizeof(struct cci_device), GFP_KERNEL); - if (!new_cci_dev) { - CDBG("%s: no enough memory\n", __func__); - return -ENOMEM; - } - v4l2_subdev_init(&new_cci_dev->msm_sd.sd, &msm_cci_subdev_ops); - new_cci_dev->msm_sd.sd.internal_ops = &msm_cci_internal_ops; - snprintf(new_cci_dev->msm_sd.sd.name, - ARRAY_SIZE(new_cci_dev->msm_sd.sd.name), "msm_cci"); - v4l2_set_subdevdata(&new_cci_dev->msm_sd.sd, new_cci_dev); - platform_set_drvdata(pdev, &new_cci_dev->msm_sd.sd); - CDBG("%s sd %pK\n", __func__, &new_cci_dev->msm_sd.sd); - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - rc = msm_cci_get_clk_info(new_cci_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_cci_get_clk_info() failed", __func__); - return -EFAULT; - } - - new_cci_dev->ref_count = 0; - new_cci_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cci"); - if (!new_cci_dev->mem) { - CDBG("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cci"); - CDBG("%s line %d cci irq start %d end %d\n", __func__, - __LINE__, - (int) new_cci_dev->irq->start, - (int) new_cci_dev->irq->end); - if (!new_cci_dev->irq) { - CDBG("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->io = request_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem), pdev->name); - if (!new_cci_dev->io) { - CDBG("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto cci_no_resource; - } - - new_cci_dev->base = ioremap(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); - if (!new_cci_dev->base) { - rc = -ENOMEM; - goto cci_release_mem; - } - rc = request_irq(new_cci_dev->irq->start, msm_cci_irq, - IRQF_TRIGGER_RISING, "cci", new_cci_dev); - if (rc < 0) { - CDBG("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto cci_release_mem; - } - disable_irq(new_cci_dev->irq->start); - new_cci_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - msm_sd_register(&new_cci_dev->msm_sd); - new_cci_dev->pdev = pdev; - msm_cci_init_cci_params(new_cci_dev); - msm_cci_init_clk_params(new_cci_dev); - msm_cci_init_gpio_params(new_cci_dev); - rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); - if (rc) - pr_err("%s: failed to add child nodes, rc=%d\n", __func__, rc); - new_cci_dev->cci_state = CCI_STATE_DISABLED; - g_cci_subdev = &new_cci_dev->msm_sd.sd; - CDBG("%s cci subdev %pK\n", __func__, &new_cci_dev->msm_sd.sd); - CDBG("%s line %d\n", __func__, __LINE__); - return 0; - -cci_release_mem: - release_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); -cci_no_resource: - kfree(new_cci_dev); - return 0; -} - -static int __exit msm_cci_exit(struct platform_device *pdev) -{ - struct v4l2_subdev *subdev = platform_get_drvdata(pdev); - struct cci_device *cci_dev = - v4l2_get_subdevdata(subdev); - release_mem_region(cci_dev->mem->start, resource_size(cci_dev->mem)); - kfree(cci_dev); - return 0; -} - -static const struct of_device_id msm_cci_dt_match[] = { - {.compatible = "qcom,cci"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_cci_dt_match); - -static struct platform_driver cci_driver = { - .probe = msm_cci_probe, - .remove = msm_cci_exit, - .driver = { - .name = MSM_CCI_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cci_dt_match, - }, -}; - -static int __init msm_cci_init_module(void) -{ - return platform_driver_register(&cci_driver); -} - -static void __exit msm_cci_exit_module(void) -{ - platform_driver_unregister(&cci_driver); -} - -module_init(msm_cci_init_module); -module_exit(msm_cci_exit_module); -MODULE_DESCRIPTION("MSM CCI driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.h b/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.h deleted file mode 100644 index 1e50388cc3ff..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/cci/msm_cci.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CCI_H -#define MSM_CCI_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_sd.h" - -#define NUM_MASTERS 2 -#define NUM_QUEUES 2 - -#define TRUE 1 -#define FALSE 0 - -#define CCI_PINCTRL_STATE_DEFAULT "cci_default" -#define CCI_PINCTRL_STATE_SLEEP "cci_suspend" -#define CCI_NUM_CLK_MAX 16 - - -enum cci_i2c_queue_t { - QUEUE_0, - QUEUE_1, -}; - -struct msm_camera_cci_client { - struct v4l2_subdev *cci_subdev; - uint32_t freq; - enum i2c_freq_mode_t i2c_freq_mode; - enum cci_i2c_master_t cci_i2c_master; - uint16_t sid; - uint16_t cid; - uint32_t timeout; - uint16_t retries; - uint16_t id_map; -}; - -enum msm_cci_cmd_type { - MSM_CCI_INIT, - MSM_CCI_RELEASE, - MSM_CCI_SET_SID, - MSM_CCI_SET_FREQ, - MSM_CCI_SET_SYNC_CID, - MSM_CCI_I2C_READ, - MSM_CCI_I2C_WRITE, - MSM_CCI_GPIO_WRITE, - MSM_CCI_I2C_WRITE_BURST, -}; - -struct msm_camera_cci_wait_sync_cfg { - uint16_t line; - uint16_t delay; -}; - -struct msm_camera_cci_gpio_cfg { - uint16_t gpio_queue; - uint16_t i2c_queue; -}; - -struct msm_camera_cci_i2c_read_cfg { - uint16_t addr; - enum msm_camera_i2c_reg_addr_type addr_type; - uint8_t *data; - uint16_t num_byte; -}; - -struct msm_camera_cci_i2c_queue_info { - uint32_t max_queue_size; - uint32_t report_id; - uint32_t irq_en; - uint32_t capture_rep_data; -}; - -struct msm_camera_cci_ctrl { - int32_t status; - struct msm_camera_cci_client *cci_info; - enum msm_cci_cmd_type cmd; - union { - struct msm_camera_i2c_reg_setting cci_i2c_write_cfg; - struct msm_camera_cci_i2c_read_cfg cci_i2c_read_cfg; - struct msm_camera_cci_wait_sync_cfg cci_wait_sync_cfg; - struct msm_camera_cci_gpio_cfg gpio_cfg; - } cfg; -}; - -struct msm_camera_cci_master_info { - uint32_t status; - uint8_t reset_pending; - struct mutex mutex; - struct completion reset_complete; -}; - -struct msm_cci_clk_params_t { - uint16_t hw_thigh; - uint16_t hw_tlow; - uint16_t hw_tsu_sto; - uint16_t hw_tsu_sta; - uint16_t hw_thd_dat; - uint16_t hw_thd_sta; - uint16_t hw_tbuf; - uint8_t hw_scl_stretch_en; - uint8_t hw_trdhld; - uint8_t hw_tsp; -}; - -enum msm_cci_state_t { - CCI_STATE_ENABLED, - CCI_STATE_DISABLED, -}; - -struct cci_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - void __iomem *base; - - uint32_t hw_version; - uint8_t ref_count; - enum msm_cci_state_t cci_state; - uint32_t num_clk; - - struct clk *cci_clk[CCI_NUM_CLK_MAX]; - struct msm_camera_cci_i2c_queue_info - cci_i2c_queue_info[NUM_MASTERS][NUM_QUEUES]; - struct msm_camera_cci_master_info cci_master_info[NUM_MASTERS]; - struct msm_cci_clk_params_t cci_clk_params[I2C_MAX_MODES]; - struct gpio *cci_gpio_tbl; - uint8_t cci_gpio_tbl_size; - uint8_t master_clk_init[MASTER_MAX]; - struct msm_pinctrl_info cci_pinctrl; - uint8_t cci_pinctrl_status; -}; - -enum msm_cci_i2c_cmd_type { - CCI_I2C_SET_PARAM_CMD = 1, - CCI_I2C_WAIT_CMD, - CCI_I2C_WAIT_SYNC_CMD, - CCI_I2C_WAIT_GPIO_EVENT_CMD, - CCI_I2C_TRIG_I2C_EVENT_CMD, - CCI_I2C_LOCK_CMD, - CCI_I2C_UNLOCK_CMD, - CCI_I2C_REPORT_CMD, - CCI_I2C_WRITE_CMD, - CCI_I2C_READ_CMD, - CCI_I2C_WRITE_DISABLE_P_CMD, - CCI_I2C_READ_DISABLE_P_CMD, - CCI_I2C_WRITE_CMD2, - CCI_I2C_WRITE_CMD3, - CCI_I2C_REPEAT_CMD, - CCI_I2C_INVALID_CMD, -}; - -enum msm_cci_gpio_cmd_type { - CCI_GPIO_SET_PARAM_CMD = 1, - CCI_GPIO_WAIT_CMD, - CCI_GPIO_WAIT_SYNC_CMD, - CCI_GPIO_WAIT_GPIO_IN_EVENT_CMD, - CCI_GPIO_WAIT_I2C_Q_TRIG_EVENT_CMD, - CCI_GPIO_OUT_CMD, - CCI_GPIO_TRIG_EVENT_CMD, - CCI_GPIO_REPORT_CMD, - CCI_GPIO_REPEAT_CMD, - CCI_GPIO_CONTINUE_CMD, - CCI_GPIO_INVALID_CMD, -}; - -struct v4l2_subdev *msm_cci_get_subdev(void); - -#define VIDIOC_MSM_CCI_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct msm_camera_cci_ctrl *) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/Makefile deleted file mode 100644 index 842167192b70..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_csid.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_0_hwreg.h deleted file mode 100644 index 7bfeb200c80a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_0_hwreg.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_0_HWREG_H -#define MSM_CSID_2_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_0 = { - - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02000011, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_2_hwreg.h deleted file mode 100644 index 4ad1c2924b1f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_2_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_2_HWREG_H -#define MSM_CSID_2_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02001000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_0_hwreg.h deleted file mode 100644 index 980f497e4596..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_0_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_0_HWREG_H -#define MSM_CSID_3_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_0 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30000000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_1_hwreg.h deleted file mode 100644 index d53867f5e5c5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_1_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_1_HWREG_H -#define MSM_CSID_3_1_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_1 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30010000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_2_hwreg.h deleted file mode 100644 index b002d78e6f04..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/include/msm_csid_3_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_2_HWREG_H -#define MSM_CSID_3_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30020000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.c b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.c deleted file mode 100644 index b0d3f2e56090..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.c +++ /dev/null @@ -1,844 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_csid.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csid_2_0_hwreg.h" -#include "include/msm_csid_2_2_hwreg.h" -#include "include/msm_csid_3_0_hwreg.h" -#include "include/msm_csid_3_1_hwreg.h" -#include "include/msm_csid_3_2_hwreg.h" - -#define V4L2_IDENT_CSID 50002 -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V31 0x30010000 -#define CSID_VERSION_V31_1 0x30010001 -#define CSID_VERSION_V32 0x30020000 -#define CSID_VERSION_V33 0x30030000 -#define CSID_VERSION_V34 0x30040000 -#define CSID_VERSION_V40 0x40000000 -#define MSM_CSID_DRV_NAME "msm_csid" - -#define DBG_CSID 0 - -#define TRUE 1 -#define FALSE 0 - -#define CSID_NUM_CLK_MAX 16 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csid_clk_info[CSID_NUM_CLK_MAX]; -static struct msm_cam_clk_info csid_clk_src_info[CSID_NUM_CLK_MAX]; - -static struct camera_vreg_t csid_vreg_info[] = { - {"qcom,mipi-csi-vdd", REG_LDO, 0, 0, 12000}, -}; - -static struct camera_vreg_t csid_8960_vreg_info[] = { - {"mipi_csi_vdd", REG_LDO, 1200000, 1200000, 20000}, -}; - -static int msm_csid_cid_lut( - struct msm_camera_csid_lut_params *csid_lut_params, - struct csid_device *csid_dev) -{ - int rc = 0, i = 0; - uint32_t val = 0; - - if (!csid_lut_params) { - pr_err("%s:%d csid_lut_params NULL\n", __func__, __LINE__); - return -EINVAL; - } - for (i = 0; i < csid_lut_params->num_cid && i < 16; i++) { - if (csid_lut_params->vc_cfg[i]->cid >= - csid_lut_params->num_cid || - csid_lut_params->vc_cfg[i]->cid < 0) { - pr_err("%s: cid outside range %d\n", - __func__, csid_lut_params->vc_cfg[i]->cid); - return -EINVAL; - } - CDBG("%s lut params num_cid = %d, cid = %d\n", - __func__, - csid_lut_params->num_cid, - csid_lut_params->vc_cfg[i]->cid); - CDBG("%s lut params dt = 0x%x, df = %d\n", __func__, - csid_lut_params->vc_cfg[i]->dt, - csid_lut_params->vc_cfg[i]->decode_format); - if (csid_lut_params->vc_cfg[i]->dt < 0x12 || - csid_lut_params->vc_cfg[i]->dt > 0x37) { - pr_err("%s: unsupported data type 0x%x\n", - __func__, csid_lut_params->vc_cfg[i]->dt); - return rc; - } - val = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4) - & ~(0xFF << ((csid_lut_params->vc_cfg[i]->cid % 4) * - 8)); - val |= (csid_lut_params->vc_cfg[i]->dt << - ((csid_lut_params->vc_cfg[i]->cid % 4) * 8)); - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4); - - val = (csid_lut_params->vc_cfg[i]->decode_format << 4) | 0x3; - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_n_cfg_addr + - (csid_lut_params->vc_cfg[i]->cid * 4)); - } - return rc; -} - -#if DBG_CSID -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - uint32_t val = 0; - val = ((1 << csid_params->lane_cnt) - 1) << 20; - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); -} -#else -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) {} -#endif - -static void msm_csid_reset(struct csid_device *csid_dev) -{ - msm_camera_io_w(csid_dev->ctrl_reg->csid_reg.csid_rst_stb_all, - csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_rst_cmd_addr); - wait_for_completion(&csid_dev->reset_complete); - return; -} - -static int msm_csid_config(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - int rc = 0; - uint32_t val = 0; - void __iomem *csidbase; - csidbase = csid_dev->base; - if (!csidbase || !csid_params) { - pr_err("%s:%d csidbase %pK, csid params %pK\n", __func__, - __LINE__, csidbase, csid_params); - return -EINVAL; - } - - CDBG("%s csid_params, lane_cnt = %d, lane_assign = 0x%x\n", - __func__, - csid_params->lane_cnt, - csid_params->lane_assign); - CDBG("%s csid_params phy_sel = %d\n", __func__, - csid_params->phy_sel); - - msm_csid_reset(csid_dev); - - val = csid_params->lane_cnt - 1; - val |= csid_params->lane_assign << - csid_dev->ctrl_reg->csid_reg.csid_dl_input_sel_shift; - if (csid_dev->hw_version < 0x30000000) { - val |= (0xF << 10); - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - } else { - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - val = csid_params->phy_sel << - csid_dev->ctrl_reg->csid_reg.csid_phy_sel_shift; - val |= 0xF; - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_1_addr); - } - - rc = msm_csid_cid_lut(&csid_params->lut_params, csid_dev); - if (rc < 0) - return rc; - - msm_csid_set_debug_reg(csid_dev, csid_params); - return rc; -} - -static irqreturn_t msm_csid_irq(int irq_num, void *data) -{ - uint32_t irq; - struct csid_device *csid_dev; - void __iomem *csidbase; - - if (!data) { - pr_err("%s:%d data NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - }//prevent - csid_dev = data ; - if (!csid_dev->base) { - pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - } - csidbase = csid_dev->base; - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - CDBG("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", - __func__, csid_dev->pdev->id, irq); - if (irq & (0x1 << - csid_dev->ctrl_reg->csid_reg.csid_rst_done_irq_bitshift)) - complete(&csid_dev->reset_complete); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - return IRQ_HANDLED; -} - -static int msm_csid_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s E\n", __func__); - ret = msm_csid_irq(csid_dev->irq->start, csid_dev); - *handled = TRUE; - return 0; -} - -static int msm_csid_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSID; - chip->revision = 0; - return 0; -} - -static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) -{ - int rc = 0; - - if (!csid_version) { - pr_err("%s:%d csid_version NULL\n", __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - if (csid_dev->csid_state == CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - rc = -EINVAL; - return rc; - } - - csid_dev->base = ioremap(csid_dev->mem->start, - resource_size(csid_dev->mem)); - if (!csid_dev->base) { - pr_err("%s csid_dev->base NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - pr_info("%s: CSID_VERSION = 0x%x\n", __func__, - csid_dev->ctrl_reg->csid_reg.csid_version); - /* power up */ - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator on failed\n", __func__); - goto vreg_config_failed; - } - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator enable failed\n", __func__); - goto vreg_enable_failed; - } - - if (csid_dev->ctrl_reg->csid_reg.csid_version == CSID_VERSION_V22) - msm_cam_clk_sel_src(&csid_dev->pdev->dev, - &csid_clk_info[3], csid_clk_src_info, - csid_dev->num_clk_src_info); - - - rc = msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, csid_dev->csid_clk, - csid_dev->num_clk, 1); - if (rc < 0) { - pr_err("%s:%d clock enable failed\n", - __func__, __LINE__); - goto clk_enable_failed; - } - CDBG("%s:%d called\n", __func__, __LINE__); - csid_dev->hw_version = - msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_hw_version_addr); - CDBG("%s:%d called csid_dev->hw_version %x\n", __func__, __LINE__, - csid_dev->hw_version); - *csid_version = csid_dev->hw_version; - - init_completion(&csid_dev->reset_complete); - - enable_irq(csid_dev->irq->start); - - msm_csid_reset(csid_dev); - csid_dev->csid_state = CSID_POWER_UP; - return rc; - -clk_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_config_failed: - iounmap(csid_dev->base); - csid_dev->base = NULL; - return rc; -} - -static int msm_csid_release(struct csid_device *csid_dev) -{ - uint32_t irq; - - if (csid_dev->csid_state != CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - return -EINVAL; - } - - CDBG("%s:%d, hw_version = 0x%x\n", __func__, __LINE__, - csid_dev->hw_version); - - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - msm_camera_io_w(0, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - - disable_irq(csid_dev->irq->start); - - if (csid_dev->hw_version == CSID_VERSION_V20) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if (csid_dev->hw_version == CSID_VERSION_V22) { - msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, - csid_dev->csid_clk, - csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version >= CSID_VERSION_V30 && - csid_dev->hw_version < CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V40) || - (csid_dev->hw_version == CSID_VERSION_V31_1)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version == CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V32) || - (csid_dev->hw_version == CSID_VERSION_V33) || - (csid_dev->hw_version == CSID_VERSION_V34)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - csid_dev->hw_version); - return -EINVAL; - } - - iounmap(csid_dev->base); - csid_dev->base = NULL; - csid_dev->csid_state = CSID_POWER_DOWN; - return 0; -} - -static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) -{ - int rc = 0; - struct csid_cfg_data *cdata = (struct csid_cfg_data *)arg; - - if (!csid_dev || !cdata) { - pr_err("%s:%d csid_dev %pK, cdata %pK\n", __func__, __LINE__, - csid_dev, cdata); - return -EINVAL; - } - CDBG("%s cfgtype = %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CSID_INIT: - rc = msm_csid_init(csid_dev, &cdata->cfg.csid_version); - CDBG("%s csid version 0x%x\n", __func__, - cdata->cfg.csid_version); - break; - case CSID_CFG: { - struct msm_camera_csid_params csid_params; - struct msm_camera_csid_vc_cfg *vc_cfg = NULL; - int8_t i = 0; - if (copy_from_user(&csid_params, - (void *)cdata->cfg.csid_params, - sizeof(struct msm_camera_csid_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (csid_params.lut_params.num_cid < 1 || - csid_params.lut_params.num_cid > 16) { - pr_err("%s: %d num_cid outside range\n", - __func__, __LINE__); - rc = -EINVAL; - break; - } - for (i = 0; i < csid_params.lut_params.num_cid; i++) { - vc_cfg = kzalloc(sizeof(struct msm_camera_csid_vc_cfg), - GFP_KERNEL); - if (!vc_cfg) { - pr_err("%s: %d failed\n", __func__, __LINE__); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -ENOMEM; - break; - } - if (copy_from_user(vc_cfg, - (void *)csid_params.lut_params.vc_cfg[i], - sizeof(struct msm_camera_csid_vc_cfg))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - kfree(vc_cfg); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -EFAULT; - break; - } - csid_params.lut_params.vc_cfg[i] = vc_cfg; - } - rc = msm_csid_config(csid_dev, &csid_params); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - break; - } - case CSID_RELEASE: - rc = msm_csid_release(csid_dev); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csid_get_subdev_id(struct csid_device *csid_dev, void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csid_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - mutex_lock(&csid_dev->mutex); - CDBG("%s:%d id %d\n", __func__, __LINE__, csid_dev->pdev->id); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csid_get_subdev_id(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_IO_CFG: - rc = msm_csid_cmd(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csid_release(csid_dev); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - CDBG("%s:%d\n", __func__, __LINE__); - mutex_unlock(&csid_dev->mutex); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csid_internal_ops; - -static struct v4l2_subdev_core_ops msm_csid_subdev_core_ops = { - .g_chip_ident = &msm_csid_subdev_g_chip_ident, - .ioctl = &msm_csid_subdev_ioctl, - .interrupt_service_routine = msm_csid_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_csid_subdev_ops = { - .core = &msm_csid_subdev_core_ops, -}; - -static int msm_csid_get_clk_info(struct csid_device *csid_dev, - struct platform_device *pdev) -{ - uint32_t count; - uint32_t cnt = 0; - int i, rc; - int ii = 0; - uint32_t rates[CSID_NUM_CLK_MAX]; - const char *clock_name; - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csid_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return -EINVAL; - } - - if (count > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - cnt = count; - count = 0; - CDBG("%s: cnt = %d\n", __func__, cnt); - if (cnt == 0) { - pr_err("%s: no clocks found in device tree, cnt=%d", - __func__, cnt); - return -EINVAL; - } - - if (cnt > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid cnt=%d, max is %d\n", __func__, - cnt, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - count++; - rc = of_property_read_string_index(of_node, - "clock-names", i, &clock_name); - CDBG("%s: clock_names[%d] = %s\n", __func__, - i, clock_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - if (strcmp(clock_name, "csi_phy_src_clk") == 0) - break; - } - csid_dev->num_clk = count; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csid_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csid_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csid_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csid_clk_info[i].clk_rate); - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - csid_dev->num_clk_src_info = cnt - count; - CDBG("%s: count = %d\n", __func__, (cnt - count)); - - for (i = count; i < cnt; i++) { - ii++; - rc = of_property_read_string_index(of_node, - "clock-names", i, - &(csid_clk_src_info[ii].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - ii, csid_clk_src_info[ii].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - ii = 0; - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, cnt); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = count; i < cnt; i++) { - ii++; - csid_clk_src_info[ii].clk_rate = rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, ii, - csid_clk_src_info[ii].clk_rate); - } - } - return 0; -} - -static int csid_probe(struct platform_device *pdev) -{ - struct csid_device *new_csid_dev; - uint32_t csi_vdd_voltage = 0; - int rc = 0; - new_csid_dev = kzalloc(sizeof(struct csid_device), GFP_KERNEL); - if (!new_csid_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - new_csid_dev->ctrl_reg = NULL; - new_csid_dev->ctrl_reg = kzalloc(sizeof(struct csid_ctrl_t), - GFP_KERNEL); - if (!new_csid_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csid_dev); - return -ENOMEM; - } - - v4l2_subdev_init(&new_csid_dev->msm_sd.sd, &msm_csid_subdev_ops); - v4l2_set_subdevdata(&new_csid_dev->msm_sd.sd, new_csid_dev); - platform_set_drvdata(pdev, &new_csid_dev->msm_sd.sd); - mutex_init(&new_csid_dev->mutex); - - if (pdev->dev.of_node) { - rc = of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - if (rc < 0) { - pr_err("%s:%d failed to read cell-index\n", __func__, - __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s device id %d\n", __func__, pdev->id); - - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,csi-vdd-voltage", &csi_vdd_voltage); - if (rc < 0) { - pr_err("%s:%d failed to read qcom,csi-vdd-voltage\n", - __func__, __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s:%d reading mipi_csi_vdd is %d\n", __func__, __LINE__, - csi_vdd_voltage); - - csid_vreg_info[0].min_voltage = csi_vdd_voltage; - csid_vreg_info[0].max_voltage = csi_vdd_voltage; - } - - rc = msm_csid_get_clk_info(new_csid_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csid_get_clk_info() failed", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - - - new_csid_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csid"); - if (!new_csid_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csid"); - if (!new_csid_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->io = request_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem), pdev->name); - if (!new_csid_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - - new_csid_dev->pdev = pdev; - new_csid_dev->msm_sd.sd.internal_ops = &msm_csid_internal_ops; - new_csid_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csid_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csid_dev->msm_sd.sd.name), "msm_csid"); - media_entity_init(&new_csid_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csid_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csid_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSID; - new_csid_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x5; - msm_sd_register(&new_csid_dev->msm_sd); - - rc = request_irq(new_csid_dev->irq->start, msm_csid_irq, - IRQF_TRIGGER_RISING, "csid", new_csid_dev); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - disable_irq(new_csid_dev->irq->start); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s Error registering irq ", __func__); - goto csid_no_resource; - } - - if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V20; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V22; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V30; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v4.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V40; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.1")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_1; - new_csid_dev->hw_dts_version = CSID_VERSION_V31; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csid_dev->hw_dts_version); - rc = -ENODEV; - goto csid_no_resource; - } - - new_csid_dev->csid_state = CSID_POWER_DOWN; - return 0; - -csid_no_resource: - mutex_destroy(&new_csid_dev->mutex); - kfree(new_csid_dev->ctrl_reg); - kfree(new_csid_dev); - return rc; -} - -static const struct of_device_id msm_csid_dt_match[] = { - {.compatible = "qcom,csid"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csid_dt_match); - -static struct platform_driver csid_driver = { - .probe = csid_probe, - .driver = { - .name = MSM_CSID_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csid_dt_match, - }, -}; - -static int __init msm_csid_init_module(void) -{ - return platform_driver_register(&csid_driver); -} - -static void __exit msm_csid_exit_module(void) -{ - platform_driver_unregister(&csid_driver); -} - -module_init(msm_csid_init_module); -module_exit(msm_csid_exit_module); -MODULE_DESCRIPTION("MSM CSID driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.h deleted file mode 100644 index d53fd9133fd5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csid/msm_csid.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_H -#define MSM_CSID_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -struct csid_reg_parms_t { -/* MIPI CSID registers */ - uint32_t csid_hw_version_addr; - uint32_t csid_core_ctrl_0_addr; - uint32_t csid_core_ctrl_1_addr; - uint32_t csid_rst_cmd_addr; - uint32_t csid_cid_lut_vc_0_addr; - uint32_t csid_cid_lut_vc_1_addr; - uint32_t csid_cid_lut_vc_2_addr; - uint32_t csid_cid_lut_vc_3_addr; - uint32_t csid_cid_n_cfg_addr; - uint32_t csid_irq_clear_cmd_addr; - uint32_t csid_irq_mask_addr; - uint32_t csid_irq_status_addr; - uint32_t csid_captured_unmapped_long_pkt_hdr_addr; - uint32_t csid_captured_mmaped_long_pkt_hdr_addr; - uint32_t csid_captured_short_pkt_addr; - uint32_t csid_captured_long_pkt_hdr_addr; - uint32_t csid_captured_long_pkt_ftr_addr; - uint32_t csid_pif_misr_dl0_addr; - uint32_t csid_pif_misr_dl1_addr; - uint32_t csid_pif_misr_dl2_addr; - uint32_t csid_pif_misr_dl3_addr; - uint32_t csid_stats_total_pkts_rcvd_addr; - uint32_t csid_stats_ecc_addr; - uint32_t csid_stats_crc_addr; - uint32_t csid_tg_ctrl_addr; - uint32_t csid_tg_vc_cfg_addr; - uint32_t csid_tg_dt_n_cfg_0_addr; - uint32_t csid_tg_dt_n_cfg_1_addr; - uint32_t csid_tg_dt_n_cfg_2_addr; - uint32_t csid_rst_done_irq_bitshift; - uint32_t csid_rst_stb_all; - uint32_t csid_dl_input_sel_shift; - uint32_t csid_phy_sel_shift; - uint32_t csid_version; -}; - -struct csid_ctrl_t { - struct csid_reg_parms_t csid_reg; -}; - -enum msm_csid_state_t { - CSID_POWER_UP, - CSID_POWER_DOWN, -}; - -struct csid_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct regulator *csi_vdd; - void __iomem *base; - struct mutex mutex; - struct completion reset_complete; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csid_state_t csid_state; - struct csid_ctrl_t *ctrl_reg; - uint32_t num_clk; - uint32_t num_clk_src_info; - - struct clk *csid_clk[11]; -}; - -#define VIDIOC_MSM_CSID_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct v4l2_subdev*) -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/Makefile deleted file mode 100644 index 0e8071525eb4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSM_CSIPHY) += msm_csiphy.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h deleted file mode 100644 index 5abf99123365..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_0_HWREG_H -#define MSM_CSIPHY_2_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_0 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x0, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h deleted file mode 100644 index 8682478f7e98..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_2_HWREG_H -#define MSM_CSIPHY_2_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_2 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x1, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h deleted file mode 100644 index af4d3e03a7ce..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_0_HWREG_H -#define MSM_CSIPHY_3_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_0 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x10, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h deleted file mode 100644 index c80a7c748fc6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_1_HWREG_H -#define MSM_CSIPHY_3_1_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_1 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x31, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h deleted file mode 100644 index 19f14e73a92c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_2_HWREG_H -#define MSM_CSIPHY_3_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_2 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x32, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.c b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.c deleted file mode 100644 index 80f2d021b137..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.c +++ /dev/null @@ -1,937 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "msm_csiphy.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csiphy_2_0_hwreg.h" -#include "include/msm_csiphy_2_2_hwreg.h" -#include "include/msm_csiphy_3_0_hwreg.h" -#include "include/msm_csiphy_3_1_hwreg.h" -#include "include/msm_csiphy_3_2_hwreg.h" - -#define DBG_CSIPHY 0 - -#define V4L2_IDENT_CSIPHY 50003 -#define CSIPHY_VERSION_V22 0x01 -#define CSIPHY_VERSION_V20 0x00 -#define CSIPHY_VERSION_V30 0x10 -#define CSIPHY_VERSION_V31 0x31 -#define CSIPHY_VERSION_V32 0x32 -#define MSM_CSIPHY_DRV_NAME "msm_csiphy" - -#define CSIPHY_NUM_CLK_MAX 16 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csiphy_clk_info[CSIPHY_NUM_CLK_MAX]; - -static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, - struct msm_camera_csiphy_params *csiphy_params) -{ - int rc = 0; - int j = 0; - uint32_t val = 0; - uint8_t lane_cnt = 0; - uint16_t lane_mask = 0; - void __iomem *csiphybase; - uint8_t csiphy_id = csiphy_dev->pdev->id; - csiphybase = csiphy_dev->base; - if (!csiphybase) { - pr_err("%s: csiphybase NULL\n", __func__); - return -EINVAL; - } - - csiphy_dev->lane_mask[csiphy_id] |= csiphy_params->lane_mask; - lane_mask = csiphy_dev->lane_mask[csiphy_id]; - lane_cnt = csiphy_params->lane_cnt; - if (csiphy_params->lane_cnt < 1 || csiphy_params->lane_cnt > 4) { - pr_err("%s: unsupported lane cnt %d\n", - __func__, csiphy_params->lane_cnt); - return rc; - } - - CDBG("%s csiphy_params, mask = 0x%x cnt = %d\n", - __func__, - csiphy_params->lane_mask, - csiphy_params->lane_cnt); - CDBG("%s csiphy_params, settle cnt = 0x%x csid %d\n", - __func__, csiphy_params->settle_cnt, - csiphy_params->csid_core); - - if (csiphy_dev->hw_version >= CSIPHY_VERSION_V30) { - val = msm_camera_io_r(csiphy_dev->clk_mux_base); - if (csiphy_params->combo_mode && - (csiphy_params->lane_mask & 0x18)) { - val &= ~0xf0; - val |= csiphy_params->csid_core << 4; - } else { - val &= ~0xf; - val |= csiphy_params->csid_core; - } - msm_camera_io_w(val, csiphy_dev->clk_mux_base); - CDBG("%s clk mux addr %pK val 0x%x\n", __func__, - csiphy_dev->clk_mux_base, val); - mb(); - } - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_t_init_cfg0_addr); - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_t_wakeup_cfg0_addr); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - val = 0x3; - msm_camera_io_w((lane_mask << 2) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(0x10, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg3_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg4_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_mask0_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_clear0_addr); - } else { - val = 0x1; - msm_camera_io_w((lane_mask << 1) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(csiphy_params->combo_mode << - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_mode_config_shift, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_glbl_reset_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40); - } - - lane_mask &= 0x1f; - while (lane_mask & 0x1f) { - if (!(lane_mask & 0x1)) { - j++; - lane_mask >>= 1; - continue; - } - msm_camera_io_w(0x10, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*j); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg3_addr + 0x40*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_addr + 0x4*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear_addr + 0x4*j); - msm_camera_io_w(0xff, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40*j); - j++; - lane_mask >>= 1; - } - return rc; -} - -static irqreturn_t msm_csiphy_irq(int irq_num, void *data) -{ - uint32_t irq; - int i; - struct csiphy_device *csiphy_dev = data; - - for (i = 0; i < 8; i++) { - irq = msm_camera_io_r( - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_status0_addr + 0x4*i); - msm_camera_io_w(irq, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - pr_err("%s MIPI_CSIPHY%d_INTERRUPT_STATUS%d = 0x%x\n", - __func__, csiphy_dev->pdev->id, i, irq); - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - } - return IRQ_HANDLED; -} - -static void msm_csiphy_reset(struct csiphy_device *csiphy_dev) -{ - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); - usleep_range(5000, 8000); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); -} - -static int msm_csiphy_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSIPHY; - chip->revision = 0; - return 0; -} - -static int msm_csiphy_recovery(struct csiphy_device *csiphy_dev) -{ - int i = 0; - uint16_t csi_lane_mask; - - pr_err("msm_csiphy_recovery: E\n"); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - csiphy_dev->ref_count = 0; - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - pr_err("msm_csiphy_recovery: X\n"); - return 0; -} - -#if DBG_CSIPHY -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version < CSIPHY_VERSION_V30) { - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - enable_irq(csiphy_dev->irq->start); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#else -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %pK io %pK\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#endif - -#if DBG_CSIPHY -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - disable_irq(csiphy_dev->irq->start); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} -#else -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} - -#endif - -static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg) -{ - int rc = 0; - struct csiphy_cfg_data *cdata = (struct csiphy_cfg_data *)arg; - struct msm_camera_csiphy_params csiphy_params; - struct msm_camera_csi_lane_params csi_lane_params; - if (!csiphy_dev || !cdata) { - pr_err("%s: csiphy_dev NULL\n", __func__); - return -EINVAL; - } - switch (cdata->cfgtype) { - case CSIPHY_INIT: - rc = msm_csiphy_init(csiphy_dev); - break; - case CSIPHY_CFG: - if (copy_from_user(&csiphy_params, - (void *)cdata->cfg.csiphy_params, - sizeof(struct msm_camera_csiphy_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_lane_config(csiphy_dev, &csiphy_params); - break; - case CSIPHY_RELEASE: - if (copy_from_user(&csi_lane_params, - (void *)cdata->cfg.csi_lane_params, - sizeof(struct msm_camera_csi_lane_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_release(csiphy_dev, &csi_lane_params); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csiphy_get_subdev_id(struct csiphy_device *csiphy_dev, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csiphy_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csiphy_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csiphy_device *csiphy_dev = v4l2_get_subdevdata(sd); - CDBG("%s:%d id %d\n", __func__, __LINE__, csiphy_dev->pdev->id); - mutex_lock(&csiphy_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csiphy_get_subdev_id(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_IO_CFG: - rc = msm_csiphy_cmd(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csiphy_release(csiphy_dev, arg); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - mutex_unlock(&csiphy_dev->mutex); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csiphy_internal_ops; - -static struct v4l2_subdev_core_ops msm_csiphy_subdev_core_ops = { - .g_chip_ident = &msm_csiphy_subdev_g_chip_ident, - .ioctl = &msm_csiphy_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_csiphy_subdev_ops = { - .core = &msm_csiphy_subdev_core_ops, -}; - -static int msm_csiphy_get_clk_info(struct csiphy_device *csiphy_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CSIPHY_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csiphy_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CSIPHY_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSIPHY_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csiphy_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csiphy_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csiphy_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csiphy_clk_info[i].clk_rate); - } - return 0; -} - -static int csiphy_probe(struct platform_device *pdev) -{ - struct csiphy_device *new_csiphy_dev; - int rc = 0; - - new_csiphy_dev = kzalloc(sizeof(struct csiphy_device), GFP_KERNEL); - if (!new_csiphy_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - new_csiphy_dev->ctrl_reg = NULL; - new_csiphy_dev->ctrl_reg = kzalloc(sizeof(struct csiphy_ctrl_t), - GFP_KERNEL); - if (!new_csiphy_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csiphy_dev); - return -ENOMEM; - } - v4l2_subdev_init(&new_csiphy_dev->msm_sd.sd, &msm_csiphy_subdev_ops); - v4l2_set_subdevdata(&new_csiphy_dev->msm_sd.sd, new_csiphy_dev); - platform_set_drvdata(pdev, &new_csiphy_dev->msm_sd.sd); - - mutex_init(&new_csiphy_dev->mutex); - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - CDBG("%s: device id = %d\n", __func__, pdev->id); - } - - rc = msm_csiphy_get_clk_info(new_csiphy_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csiphy_get_clk_info() failed", __func__); - rc = -EFAULT; - goto csiphy_no_resource; - } - - new_csiphy_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy"); - if (!new_csiphy_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csiphy"); - if (!new_csiphy_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->io = request_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem), pdev->name); - if (!new_csiphy_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - - rc = request_irq(new_csiphy_dev->irq->start, msm_csiphy_irq, - IRQF_TRIGGER_RISING, "csiphy", new_csiphy_dev); - if (rc < 0) { - release_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - disable_irq(new_csiphy_dev->irq->start); - - new_csiphy_dev->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy_clk_mux"); - if (new_csiphy_dev->clk_mux_mem) { - new_csiphy_dev->clk_mux_io = request_mem_region( - new_csiphy_dev->clk_mux_mem->start, - resource_size(new_csiphy_dev->clk_mux_mem), - new_csiphy_dev->clk_mux_mem->name); - if (!new_csiphy_dev->clk_mux_io) - pr_err("%s: ERROR %d\n", __func__, __LINE__); - } - - new_csiphy_dev->pdev = pdev; - new_csiphy_dev->msm_sd.sd.internal_ops = &msm_csiphy_internal_ops; - new_csiphy_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csiphy_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csiphy_dev->msm_sd.sd.name), "msm_csiphy"); - media_entity_init(&new_csiphy_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csiphy_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csiphy_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSIPHY; - new_csiphy_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x4; - msm_sd_register(&new_csiphy_dev->msm_sd); - - if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V20; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V22; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V30; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.1")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_1; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V31; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csiphy_dev->hw_dts_version); - rc = -EINVAL; - goto csiphy_no_resource; - } - - new_csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; - -csiphy_no_resource: - mutex_destroy(&new_csiphy_dev->mutex); - kfree(new_csiphy_dev->ctrl_reg); - kfree(new_csiphy_dev); - return rc; -} - -static const struct of_device_id msm_csiphy_dt_match[] = { - {.compatible = "qcom,csiphy"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csiphy_dt_match); - -static struct platform_driver csiphy_driver = { - .probe = csiphy_probe, - .driver = { - .name = MSM_CSIPHY_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csiphy_dt_match, - }, -}; - -static int __init msm_csiphy_init_module(void) -{ - return platform_driver_register(&csiphy_driver); -} - -static void __exit msm_csiphy_exit_module(void) -{ - platform_driver_unregister(&csiphy_driver); -} - -module_init(msm_csiphy_init_module); -module_exit(msm_csiphy_exit_module); -MODULE_DESCRIPTION("MSM CSIPHY driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.h b/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.h deleted file mode 100644 index 8a363df67bc7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/csiphy/msm_csiphy.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_H -#define MSM_CSIPHY_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -#define MAX_CSIPHY 3 - -struct csiphy_reg_parms_t { -/*MIPI CSI PHY registers*/ - uint32_t mipi_csiphy_lnn_cfg1_addr; - uint32_t mipi_csiphy_lnn_cfg2_addr; - uint32_t mipi_csiphy_lnn_cfg3_addr; - uint32_t mipi_csiphy_lnn_cfg4_addr; - uint32_t mipi_csiphy_lnn_cfg5_addr; - uint32_t mipi_csiphy_lnck_cfg1_addr; - uint32_t mipi_csiphy_lnck_cfg2_addr; - uint32_t mipi_csiphy_lnck_cfg3_addr; - uint32_t mipi_csiphy_lnck_cfg4_addr; - uint32_t mipi_csiphy_lnck_cfg5_addr; - uint32_t mipi_csiphy_lnck_misc1_addr; - uint32_t mipi_csiphy_glbl_reset_addr; - uint32_t mipi_csiphy_glbl_pwr_cfg_addr; - uint32_t mipi_csiphy_glbl_irq_cmd_addr; - uint32_t mipi_csiphy_hw_version_addr; - uint32_t mipi_csiphy_interrupt_status0_addr; - uint32_t mipi_csiphy_interrupt_mask0_addr; - uint32_t mipi_csiphy_interrupt_mask_val; - uint32_t mipi_csiphy_interrupt_mask_addr; - uint32_t mipi_csiphy_interrupt_clear0_addr; - uint32_t mipi_csiphy_interrupt_clear_addr; - uint32_t mipi_csiphy_mode_config_shift; - uint32_t mipi_csiphy_glbl_t_init_cfg0_addr; - uint32_t mipi_csiphy_t_wakeup_cfg0_addr; - uint32_t csiphy_version; -}; - -struct csiphy_ctrl_t { - struct csiphy_reg_parms_t csiphy_reg; -}; - -enum msm_csiphy_state_t { - CSIPHY_POWER_UP, - CSIPHY_POWER_DOWN, -}; - -struct csiphy_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csiphy_state_t csiphy_state; - struct csiphy_ctrl_t *ctrl_reg; - uint32_t num_clk; - - struct clk *csiphy_clk[8]; - - int32_t ref_count; - uint16_t lane_mask[MAX_CSIPHY]; -}; - -#define VIDIOC_MSM_CSIPHY_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, void *) -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/Makefile deleted file mode 100644 index d5aa00d163f4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/cci -obj-$(CONFIG_MSM_EEPROM) += msm_eeprom.o -obj-$(CONFIG_MSM_OTP) += msm_otp.o \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.c b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.c deleted file mode 100644 index 287145f17cad..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.c +++ /dev/null @@ -1,1575 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_eeprom.h" - -//#define MSM_EEPROM_DEBUG -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -/** - * msm_eeprom_parse_memory_map() - parse memory map in device node - * @of: device node - * @str: id string - * @data: memory block for output - * - * This functions parses @of to fill @data. It allocates map itself, parses - * the @of node, calculate total data length, and allocates required buffer. - * It only fills the map, but does not perform actual reading. - */ -static int msm_eeprom_parse_memory_map(struct device_node *of, const char *str, - struct msm_eeprom_memory_block_t *data) -{ - int i, rc = 0; - char property[PROPERTY_MAXSIZE]; - uint32_t count = 6; - struct msm_eeprom_memory_map_t *map; - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-num-blocks", str); - rc = of_property_read_u32(of, property, &data->num_map); - CDBG("%s: %s %d\n", __func__, property, data->num_map); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-page%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-poll%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-mem%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - - CDBG("%s num_bytes %d\n", __func__, data->num_data); - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - int j; - struct msm_eeprom_memory_map_t *emap = block->map; - uint8_t *memptr = block->mapdata; - - pr_err("%s Enter \n", __func__); - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].page.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].page.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), emap[j].page.addr, - emap[j].page.data, emap[j].page.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].page.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].page.delay); - if (rc < 0) { - pr_err("%s: page write failed\n", __func__); - return rc; - } - } - - if (emap[j].poll.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].poll.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &(e_ctrl->i2c_client), emap[j].poll.addr, - emap[j].poll.data, emap[j].poll.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].poll.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].poll.delay); - if (rc < 0) { - pr_err("%s: poll failed\n", __func__); - return rc; - } - } - - if (emap[j].mem.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].mem.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - pr_err("%s %d \n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; - } - } - - pr_err("%s Exit \n", __func__); - return rc; -} - -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - CDBG("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - memptr = data->mapdata; - - for (j = 0; j + 1 < data->num_map; j += 2) { - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - memptr += map[j].mem.valid_size - + map[j+1].mem.valid_size; - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr + map[j].mem.valid_size); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, - *sum); - if (!rc) - ret |= 1 << (j/2); - memptr += map[j].mem.valid_size + map[j+1].mem.valid_size; - } - return ret; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - - pr_info("%s: read 0x%02X%02X, check Fidelix 16M:0x%02X%02X, Winbond 8M:0x%02X%02X, Winbond 16M:0x%02X%02X\n", __func__, - id[0], id[1], client->spi_client->mfr_id0, client->spi_client->device_id0, - client->spi_client->mfr_id1, client->spi_client->device_id1, - client->spi_client->mfr_id2, client->spi_client->device_id2); - - if ((id[0] == client->spi_client->mfr_id0 && id[1] == client->spi_client->device_id0) - || (id[0] == client->spi_client->mfr_id1 && id[1] == client->spi_client->device_id1) - || (id[0] == client->spi_client->mfr_id2 && id[1] == client->spi_client->device_id2)) - return 0; - - return -ENODEV; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl, bool *down) -{ - int rc = 0; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - rc = msm_eeprom_match_id(e_ctrl); - pr_warn("%s : E", __func__); - - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || rc < 0) { - if (down) *down = true; - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - } else { - if (down) *down = false; - } - return rc; -} - -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl, bool down) -{ - pr_warn("%s : E", __func__); - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || down) - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - else - return 0; -} - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - bool down; - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf, cdata->cfg.read_data.num_bytes); - CDBG("%s: read data, rc addr = 0x%pK %d %d\n", __func__, (void*)cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes, rc); - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; -#if 0 // just once to power up when load lib - bool down; -#endif - - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if 0 // just once to power up when load lib - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } -#endif - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf_comp, cdata->cfg.read_data.comp_size); - - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl, down); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - bool down; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - compressed_buf, compressed_size); - - // write CRC32 for compressed data - rc |= e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size, - (uint8_t *)&crc, 4); - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - buf, cdata->cfg.write_data.num_bytes); - } - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - bool down; - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl, down); - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - CDBG("%s:%d Enter\n", __func__, __LINE__); - /* check eeprom id */ - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) { - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - return rc; - } - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - return rc; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s:%d Exit\n", __func__, __LINE__); - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - size_t length = 0; - - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - length = strlen(e_ctrl->eboard_info->eeprom_name) + 1; - if (length > MAX_EEPROM_NAME) { - pr_err("%s:%d invalid eeprom_name length %d\n", - __func__,__LINE__, (int)length); - rc = -EINVAL; - break; - } - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, length); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before%X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after%X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_ERASESIZE: - CDBG("%s E CFG_EEPROM_GET_ERASESIZE\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->i2c_client.spi_client->erase_size; - break; - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl, NULL); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl, true); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - default: - break; - } - - CDBG("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - CDBG("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - rc = of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size); \ - if (rc < 0) \ - return rc; \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - spic->cmd_tbl.name.delay_intv = out[3]; \ - spic->cmd_tbl.name.delay_count = out[4]; \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[5]; - struct device_node *of = spic->spi_master->dev.of_node; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-read", read, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readseq", read_seq, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-queryid", query_id, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-pprog", - page_program, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-wenable", - write_enable, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readst", - read_status, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-erase", erase, tmp, 5); - - rc = of_property_read_u32(of, "qcom,spi-busy-mask", tmp); - if (rc < 0) { - pr_err("%s: Failed to get busy mask\n", __func__); - return rc; - } - spic->busy_mask = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-page-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get page size\n", __func__); - return rc; - } - spic->page_size = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-erase-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get erase size\n", __func__); - return rc; - } - spic->erase_size = tmp[0]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id0", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 0\n", __func__); - return rc; - } - spic->mfr_id0 = tmp[0]; - spic->device_id0 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id1", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 1\n", __func__); - return rc; - } - spic->mfr_id1 = tmp[0]; - spic->device_id1 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id2", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 2\n", __func__); - return rc; - } - spic->mfr_id2 = tmp[0]; - spic->device_id2 = tmp[1]; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - int16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size > 0) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) { - pr_err("%s : eb_info is NULL", __func__); - goto spi_free; - } - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) { - pr_err("%s : msm_eeprom_get_dt_data", __func__); - goto board_free; - } - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - CDBG("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - CDBG("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - CDBG("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - e_ctrl = kzalloc(sizeof(struct msm_eeprom_ctrl_t), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - CDBG("%s client = %x\n", __func__, (unsigned int)client); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -ENOMEM; - goto board_free; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto memdata_free; - } - rc = of_property_read_u32(of_node, "cell-index", &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto memdata_free; - } - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto memdata_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto memdata_free; - rc = msm_eeprom_parse_memory_map(of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - pr_warn("%s: no cal memory map\n", __func__); - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("%s failed power up %d\n", __func__, __LINE__); - goto memdata_free; - } - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = 1; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -board_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - CDBG("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - rc = -ENOMEM; - kfree(e_ctrl); - return rc; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, "cal", &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,eeprom" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,eeprom", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - CDBG("%s:%d platform rc %d\n", __func__, __LINE__, rc); -// rc = spi_register_driver(&msm_eeprom_spi_driver); -// CDBG("%s:%d spi rc %d\n", __func__, __LINE__, rc); - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0 /*&& spi_rc < 0*/) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.h b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.h deleted file mode 100644 index d1a371d35750..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_eeprom.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp.c b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp.c deleted file mode 100755 index 17b71903df7b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp.c +++ /dev/null @@ -1,2099 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#if defined(CONFIG_SR544) -#include "msm_otp_sr544.h" -#else -#include "msm_otp_s5k5e3yx.h" -#endif -#include "../../include/media/msm_cam_sensor.h" - -//#define MSM_EEPROM_DEBUG 1 - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#undef EEPROM_MMAP_DEBUG - -uint8_t *map_data = NULL; - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl); -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block); - - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl); -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - pr_err("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - - for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; - - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr_crc); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, *sum); - if (!rc) - { - ret |= 1 << (j/2); - } - } - return ret; -} - -static int msm_eeprom_get_cmm_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &e_ctrl->eboard_info->cmm_data; - cdata->cfg.get_cmm_data.cmm_support = cmm_data->cmm_support; - cdata->cfg.get_cmm_data.cmm_compression = cmm_data->cmm_compression; - cdata->cfg.get_cmm_data.cmm_size = cmm_data->cmm_size; - return rc; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0; - pr_warn("%s : E", __func__); - - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - - return rc; -} -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl) -{ - pr_warn("%s : E", __func__); - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); -} - -#if defined(CONFIG_SR544) -static int prepare_read_write_data(struct msm_eeprom_ctrl_t *e_ctrl, uint8_t addr_h, uint8_t addr_l, enum msm_camera_i2c_data_type data_type, int isWrite) -{ - int rc=0; - - isWrite = !(!isWrite)+1; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_otp); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - addr_h, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - addr_l, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - isWrite, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - return rc; -} -#endif - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - /* this below code is giving probelm in device -> encrypt -> came launch - Ideally we should not free this data until dtor. so commentiong out */ - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - uint16_t data; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - -#if defined(CONFIG_SR544) - return rc; -#endif - - buf = kmalloc(cdata->cfg.read_data.num_bytes+1, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on otp\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf[i]=data; - } - -#if !defined(CONFIG_SR544) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - buf[cdata->cfg.read_data.num_bytes] = '\0'; - pr_err("[sjlee] %s : buf[%s]\n", __func__, buf); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_fw_version(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - memset(buf, 0, cdata->cfg.read_data.num_bytes); - if(e_ctrl->cal_data.num_data < (cdata->cfg.read_data.addr + cdata->cfg.read_data.num_bytes)) { - pr_err("%s : requested data size was mismatched! addr:size[0x%x:%d]\n", __func__, cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes); - rc = -ENOMEM; - goto FREE; - } - - memcpy(buf, &map_data[cdata->cfg.read_data.addr], cdata->cfg.read_data.num_bytes); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); - -FREE: - - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - uint16_t data; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if defined(CONFIG_SR544) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.comp_size; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf_comp[i]=data; - } - -#if !defined(CONFIG_SR544) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - int i; -#if defined(CONFIG_SR544) - uint8_t addr_h, addr_l; -#endif - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) - if (cdata->cfg.write_data.compress) { - - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - addr_h = ((cdata->cfg.write_data.addr+compressed_size)>>8)&0xFF; - addr_l = (cdata->cfg.write_data.addr+compressed_size)&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } else { - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } -#else - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size+i, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } -#endif - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - - int rc = 0; -#if 0 - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl); -#endif - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - /* power up */ - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - return rc; - } - - /* read cal data */ - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto POWER_DOWN; - } - - /* update support info */ - e_ctrl->is_supported = (msm_eeprom_match_crc(&e_ctrl->cal_data) << 1) | 1; - pr_err("%s:%d is_supported = 0x%X\n", __func__, __LINE__, e_ctrl->is_supported); - -POWER_DOWN: - /* power down */ - if (msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client) < 0) - pr_err("%s:%d pwoer down failed\n", __func__, __LINE__); - pr_err("%s:%d Exit\n", __func__, __LINE__); - - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - - CDBG("%s:%d: subdevid: %d, cfgtype: %d\n",__func__,__LINE__,e_ctrl->subdev_id, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, - sizeof(cdata->cfg.eeprom_name)); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before : %X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after : %X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_MM_INFO: - CDBG("%s E CFG_EEPROM_GET_MM_INFO\n", __func__); - rc = msm_eeprom_get_cmm_data(e_ctrl, cdata); - break; - - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_GET_FW_VERSION_INFO\n", __func__); - rc = eeprom_config_read_fw_version(e_ctrl, cdata); - break; - default: - break; - } - - pr_err("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - pr_err("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -uint8_t* get_eeprom_data_addr() -{ - return map_data; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -#if defined(CONFIG_SR544) -// compare dtsi file to GTA when L-OS upgrade for rossa/core-prime. -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr544_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %pK\n", __func__, __LINE__ , memptr); - } - return rc; -} -#else -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint8_t page; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), 0x0A04, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - page = 2; - break; - case 3: - page = 3; - break; - case 7: - page = 4; - break; - case 0xF: - page = 5; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - init_read_otp.reg_setting[1].reg_data = page; - init_write_otp.reg_setting[7].reg_data = page; - - if (emap[j].mem.valid_size) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - for (i=0x0A08; i<=0x0A41; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), i, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i-0x0A08] = OTP_Data; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - return rc; - } -#ifdef EEPROM_MMAP_DEBUG - for (i=0; inum_map); - pr_err("%s::%d %s %d\n", __func__, __LINE__, property, data->num_map); - if (rc < 0) { - pr_err("%s::%d failed rc %d\n", __func__,__LINE__,rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - pr_err("%s, %d: i = %d\n", __func__, __LINE__, i); - - snprintf(property, PROPERTY_MAXSIZE, "qcom,page%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,poll%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,mem%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - pr_err("%s::%d valid size = %d\n", __func__,__LINE__, data->num_data); - - total_size = 0; - -#if defined(CONFIG_SR544) - // if total-size is defined at dtsi file. - // set num_data as total-size (refer dtsi file of GTA) - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - pr_err("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - pr_err("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } -#endif - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - int j; - - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - return -EINVAL; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - goto probe_failure; - } - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - pr_err("%s client = 0x%pK\n", __func__, client); - - //e_ctrl->eboard_info = (struct msm_eeprom_board_info *)(id->driver_data); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -EINVAL; - goto memdata_free; - } - - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto board_free; - } - - rc = of_property_read_u32(of_node, "cell-index", - &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto board_free; - } - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - - pr_err("%s:%d e_ctrl->eboard_info->i2c_slaveaddr = %d\n", __func__, __LINE__ , e_ctrl->eboard_info->i2c_slaveaddr); - - /* Set device type as I2C */ - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - pr_err("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - pr_err("%s: no cal memory map\n", __func__); - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto board_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - -// e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = 1; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -board_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -memdata_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - if (of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size)) { \ - return -EFAULT; \ - } else { \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - } \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[3]; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,read", read, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,readseq", read_seq, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,queryid", query_id, tmp, 3); - - rc = of_property_read_u32_array(spic->spi_master->dev.of_node, - "qcom,eeprom-id", tmp, 2); - if (rc) { - pr_err("%s: Failed to get eeprom id\n", __func__); - return rc; - } - spic->mfr_id = tmp[0]; - spic->device_id = tmp[1]; - - return 0; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - pr_err("%s: read 0x%x 0x%x, check 0x%x 0x%x\n", __func__, id[0], - id[1], client->spi_client->mfr_id, client->spi_client->device_id); - if (id[0] != client->spi_client->mfr_id - || id[1] != client->spi_client->device_id) - return -ENODEV; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - pr_err("msm_camera_get_dt_power_setting_data : %d\n", __LINE__); - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - pr_err("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - pr_err("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - - -static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, - struct device_node *of_node) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; - - cmm_data->cmm_support = - of_property_read_bool(of_node, "qcom,cmm-data-support"); - if (!cmm_data->cmm_support){ - pr_err("%s::%d qcom,cmm-data-support failed ",__func__,__LINE__); - return -EINVAL; - } - cmm_data->cmm_compression = - of_property_read_bool(of_node, "qcom,cmm-data-compressed"); - if (!cmm_data->cmm_compression) - CDBG("No MM compression data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", - &cmm_data->cmm_offset); - if (rc < 0) - CDBG("No MM offset data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-size", - &cmm_data->cmm_size); - if (rc < 0) - CDBG("No MM size data\n"); - - CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", - cmm_data->cmm_compression, - cmm_data->cmm_offset, - cmm_data->cmm_size); - return 0; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) - goto spi_free; - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, spi->dev.of_node); - if (rc < 0) - CDBG("%s MM data miss:%d\n", __func__, __LINE__); - - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) - goto board_free; - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - pr_err("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - pr_err("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - pr_err("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - pr_err("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - kfree(e_ctrl); - return -ENOMEM; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); - if (rc < 0){ - pr_err("%s MM data miss:%d\n", __func__, __LINE__); - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_otp"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - pr_err("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,otp" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct of_device_id msm_eeprom_i2c_dt_match[] = { - { .compatible = "qcom,otp"}, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,otp", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_i2c_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0 /*, spi_rc = 0*/; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - if(rc<0){ - pr_err("%s:%d platform rc %d\n", __func__, __LINE__, rc); - return rc; - } - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_s5k5e3yx.h b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_s5k5e3yx.h deleted file mode 100755 index 215ed6baf643..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_s5k5e3yx.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 17 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array init_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_read_otp = { - init_read_s5k5e3yx_otp_reg, sizeof(init_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting finish_read_otp = { - finish_read_s5k5e3yx_otp_reg, sizeof(finish_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array init_write_s5k5e3yx_otp_reg[] = { - {0x3b42, 0x68, NULL, 0}, - {0x3b41, 0x01, NULL, 0}, - {0x3b40, 0x00, NULL, 0}, - {0x3b45, 0x02, NULL, 0}, - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x03, NULL, 0}, - {0x3b42, 0x00, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x03, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_write_otp = { - init_write_s5k5e3yx_otp_reg, sizeof(init_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_write_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, - {0x3b40, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting finish_write_otp = { - finish_write_s5k5e3yx_otp_reg, sizeof(finish_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_sr544.h b/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_sr544.h deleted file mode 100755 index c4eeffe62a52..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/eeprom/msm_otp_sr544.h +++ /dev/null @@ -1,2102 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr544_init_reg[] = { -{0x0118, 0x0000}, //sleep On - -//--- SRAM timing control---// -{0x0E00, 0x0101}, -{0x0E02, 0x0101}, -{0x0E04, 0x0101}, -{0x0E06, 0x0101}, -{0x0E08, 0x0101}, -{0x0E0A, 0x0101}, -{0x0E0C, 0x0101}, -{0x0E0E, 0x0101}, - -//Firmware 2Lane v0.39, LB OTP Burst On + double luma under dark. FW 20140804 -{0x2000, 0x4031}, -{0x2002, 0x83F8}, -{0x2004, 0x4104}, -{0x2006, 0x4307}, -{0x2008, 0x4382}, -{0x200a, 0x80D0}, -{0x200c, 0x4382}, -{0x200e, 0x8070}, -{0x2010, 0x43A2}, -{0x2012, 0x0B80}, -{0x2014, 0x0C0A}, -{0x2016, 0x4382}, -{0x2018, 0x0B90}, -{0x201a, 0x0C0A}, -{0x201c, 0x4382}, -{0x201e, 0x0B9C}, -{0x2020, 0x0C0A}, -{0x2022, 0x93D2}, -{0x2024, 0x003D}, -{0x2026, 0x2002}, -{0x2028, 0x4030}, -{0x202a, 0xF6C0}, -{0x202c, 0x43C2}, -{0x202e, 0x0F82}, -{0x2030, 0x425F}, -{0x2032, 0x0118}, -{0x2034, 0xF37F}, -{0x2036, 0x930F}, -{0x2038, 0x2002}, -{0x203a, 0x0CC8}, -{0x203c, 0x3FF9}, -{0x203e, 0x4F82}, -{0x2040, 0x809A}, -{0x2042, 0x43D2}, -{0x2044, 0x0A80}, -{0x2046, 0x43D2}, -{0x2048, 0x0180}, -{0x204a, 0x43D2}, -{0x204c, 0x019A}, -{0x204e, 0x40F2}, -{0x2050, 0x0009}, -{0x2052, 0x019B}, -{0x2054, 0x12B0}, -{0x2056, 0xFE26}, -{0x2058, 0x4382}, -{0x205a, 0x8094}, -{0x205c, 0x93D2}, -{0x205e, 0x003E}, -{0x2060, 0x2002}, -{0x2062, 0x4030}, -{0x2064, 0xF5A0}, -{0x2066, 0x4308}, -{0x2068, 0x5038}, -{0x206a, 0x0030}, -{0x206c, 0x480F}, -{0x206e, 0x12B0}, -{0x2070, 0xFE38}, -{0x2072, 0x403B}, -{0x2074, 0x7606}, -{0x2076, 0x4B29}, -{0x2078, 0x5318}, -{0x207a, 0x480F}, -{0x207c, 0x12B0}, -{0x207e, 0xFE38}, -{0x2080, 0x4B2A}, -{0x2082, 0x5318}, -{0x2084, 0x480F}, -{0x2086, 0x12B0}, -{0x2088, 0xFE38}, -{0x208a, 0x4A0D}, -{0x208c, 0xF03D}, -{0x208e, 0x000F}, -{0x2090, 0x108D}, -{0x2092, 0x4B2E}, -{0x2094, 0x5E0E}, -{0x2096, 0x5E0E}, -{0x2098, 0x5E0E}, -{0x209a, 0x5E0E}, -{0x209c, 0x4A0F}, -{0x209e, 0xC312}, -{0x20a0, 0x100F}, -{0x20a2, 0x110F}, -{0x20a4, 0x110F}, -{0x20a6, 0x110F}, -{0x20a8, 0x590D}, -{0x20aa, 0x4D87}, -{0x20ac, 0x5000}, -{0x20ae, 0x5F0E}, -{0x20b0, 0x4E87}, -{0x20b2, 0x6000}, -{0x20b4, 0x5327}, -{0x20b6, 0x5038}, -{0x20b8, 0xFFD1}, -{0x20ba, 0x9038}, -{0x20bc, 0x0300}, -{0x20be, 0x2BD4}, -{0x20c0, 0x0261}, -{0x20c2, 0x0000}, -{0x20c4, 0x43A2}, -{0x20c6, 0x0384}, -{0x20c8, 0x42B2}, -{0x20ca, 0x0386}, -{0x20cc, 0x43C2}, -{0x20ce, 0x0180}, -{0x20d0, 0x43D2}, -{0x20d2, 0x003D}, -{0x20d4, 0x40B2}, -{0x20d6, 0x808B}, -{0x20d8, 0x0B88}, -{0x20da, 0x0C0A}, -{0x20dc, 0x40B2}, -{0x20de, 0x1009}, -{0x20e0, 0x0B8A}, -{0x20e2, 0x0C0A}, -{0x20e4, 0x40B2}, -{0x20e6, 0xC40C}, -{0x20e8, 0x0B8C}, -{0x20ea, 0x0C0A}, -{0x20ec, 0x40B2}, -{0x20ee, 0xC9E1}, -{0x20f0, 0x0B8E}, -{0x20f2, 0x0C0A}, -{0x20f4, 0x40B2}, -{0x20f6, 0x0C1E}, -{0x20f8, 0x0B92}, -{0x20fa, 0x0C0A}, -{0x20fc, 0x43D2}, -{0x20fe, 0x0F82}, -{0x2100, 0x0C3C}, -{0x2102, 0x0C3C}, -{0x2104, 0x0C3C}, -{0x2106, 0x0C3C}, -{0x2108, 0x421F}, -{0x210a, 0x00A6}, -{0x210c, 0x503F}, -{0x210e, 0x07D0}, -{0x2110, 0x3811}, -{0x2112, 0x4F82}, -{0x2114, 0x7100}, -{0x2116, 0x0004}, -{0x2118, 0x0C0D}, -{0x211a, 0x0005}, -{0x211c, 0x0C04}, -{0x211e, 0x000D}, -{0x2120, 0x0C09}, -{0x2122, 0x003D}, -{0x2124, 0x0C1D}, -{0x2126, 0x003C}, -{0x2128, 0x0C13}, -{0x212a, 0x0004}, -{0x212c, 0x0C09}, -{0x212e, 0x0004}, -{0x2130, 0x533F}, -{0x2132, 0x37EF}, -{0x2134, 0x4392}, -{0x2136, 0x8096}, -{0x2138, 0x4382}, -{0x213a, 0x809E}, -{0x213c, 0x4382}, -{0x213e, 0x80B6}, -{0x2140, 0x4382}, -{0x2142, 0x80BE}, -{0x2144, 0x4382}, -{0x2146, 0x80A2}, -{0x2148, 0x40B2}, -{0x214a, 0x0028}, -{0x214c, 0x7000}, -{0x214e, 0x43A2}, -{0x2150, 0x80A0}, -{0x2152, 0xB3E2}, -{0x2154, 0x00B4}, -{0x2156, 0x2402}, -{0x2158, 0x4392}, -{0x215a, 0x80A0}, -{0x215c, 0x4326}, -{0x215e, 0xB3D2}, -{0x2160, 0x00B4}, -{0x2162, 0x2002}, -{0x2164, 0x4030}, -{0x2166, 0xF590}, -{0x2168, 0x4306}, -{0x216a, 0x4384}, -{0x216c, 0x0002}, -{0x216e, 0x4384}, -{0x2170, 0x0006}, -{0x2172, 0x4382}, -{0x2174, 0x809C}, -{0x2176, 0x4382}, -{0x2178, 0x8098}, -{0x217a, 0x40B2}, -{0x217c, 0x0005}, -{0x217e, 0x7320}, -{0x2180, 0x4392}, -{0x2182, 0x7326}, -{0x2184, 0x12B0}, -{0x2186, 0xF952}, -{0x2188, 0x4392}, -{0x218a, 0x731C}, -{0x218c, 0x9382}, -{0x218e, 0x8096}, -{0x2190, 0x200A}, -{0x2192, 0x0B00}, -{0x2194, 0x7302}, -{0x2196, 0x02BC}, -{0x2198, 0x4382}, -{0x219a, 0x7004}, -{0x219c, 0x430F}, -{0x219e, 0x12B0}, -{0x21a0, 0xF752}, -{0x21a2, 0x12B0}, -{0x21a4, 0xF952}, -{0x21a6, 0x4392}, -{0x21a8, 0x80BC}, -{0x21aa, 0x4382}, -{0x21ac, 0x740E}, -{0x21ae, 0xB3E2}, -{0x21b0, 0x0080}, -{0x21b2, 0x2402}, -{0x21b4, 0x4392}, -{0x21b6, 0x740E}, -{0x21b8, 0x431F}, -{0x21ba, 0x12B0}, -{0x21bc, 0xF752}, -{0x21be, 0x4392}, -{0x21c0, 0x7004}, -{0x21c2, 0x4682}, -{0x21c4, 0x7110}, -{0x21c6, 0x9382}, -{0x21c8, 0x8092}, -{0x21ca, 0x2005}, -{0x21cc, 0x9392}, -{0x21ce, 0x7110}, -{0x21d0, 0x2402}, -{0x21d2, 0x4030}, -{0x21d4, 0xF494}, -{0x21d6, 0x9392}, -{0x21d8, 0x7110}, -{0x21da, 0x20A4}, -{0x21dc, 0x0B00}, -{0x21de, 0x7302}, -{0x21e0, 0x0032}, -{0x21e2, 0x4382}, -{0x21e4, 0x7004}, -{0x21e6, 0x0B00}, -{0x21e8, 0x7302}, -{0x21ea, 0x03E8}, -{0x21ec, 0x0800}, -{0x21ee, 0x7114}, -{0x21f0, 0x425F}, -{0x21f2, 0x0C9C}, -{0x21f4, 0x4F4E}, -{0x21f6, 0x430F}, -{0x21f8, 0x4E0D}, -{0x21fa, 0x430C}, -{0x21fc, 0x421F}, -{0x21fe, 0x0C9A}, -{0x2200, 0xDF0C}, -{0x2202, 0x1204}, -{0x2204, 0x440F}, -{0x2206, 0x532F}, -{0x2208, 0x120F}, -{0x220a, 0x1212}, -{0x220c, 0x0CA2}, -{0x220e, 0x403E}, -{0x2210, 0x80C0}, -{0x2212, 0x403F}, -{0x2214, 0x8072}, -{0x2216, 0x12B0}, -{0x2218, 0xF7BA}, -{0x221a, 0x4F07}, -{0x221c, 0x425F}, -{0x221e, 0x0CA0}, -{0x2220, 0x4F4E}, -{0x2222, 0x430F}, -{0x2224, 0x4E0D}, -{0x2226, 0x430C}, -{0x2228, 0x421F}, -{0x222a, 0x0C9E}, -{0x222c, 0xDF0C}, -{0x222e, 0x440F}, -{0x2230, 0x522F}, -{0x2232, 0x120F}, -{0x2234, 0x532F}, -{0x2236, 0x120F}, -{0x2238, 0x1212}, -{0x223a, 0x0CA4}, -{0x223c, 0x403E}, -{0x223e, 0x80A4}, -{0x2240, 0x403F}, -{0x2242, 0x8050}, -{0x2244, 0x12B0}, -{0x2246, 0xF7BA}, -{0x2248, 0x4F08}, -{0x224a, 0x430D}, -{0x224c, 0x441E}, -{0x224e, 0x0004}, -{0x2250, 0x442F}, -{0x2252, 0x5031}, -{0x2254, 0x000C}, -{0x2256, 0x9E0F}, -{0x2258, 0x2C01}, -{0x225a, 0x431D}, -{0x225c, 0x8E0F}, -{0x225e, 0x930F}, -{0x2260, 0x3402}, -{0x2262, 0xE33F}, -{0x2264, 0x531F}, -{0x2266, 0x421E}, -{0x2268, 0x0CA2}, -{0x226a, 0xC312}, -{0x226c, 0x100E}, -{0x226e, 0x9E0F}, -{0x2270, 0x2804}, -{0x2272, 0x930D}, -{0x2274, 0x2001}, -{0x2276, 0x5317}, -{0x2278, 0x5D08}, -{0x227a, 0x403B}, -{0x227c, 0x0196}, -{0x227e, 0x403D}, -{0x2280, 0x0040}, -{0x2282, 0x4D0F}, -{0x2284, 0x8B2F}, -{0x2286, 0x470A}, -{0x2288, 0x4F0C}, -{0x228a, 0x12B0}, -{0x228c, 0xFE58}, -{0x228e, 0x4E09}, -{0x2290, 0xC312}, -{0x2292, 0x1009}, -{0x2294, 0x1109}, -{0x2296, 0x1109}, -{0x2298, 0x1109}, -{0x229a, 0x1109}, -{0x229c, 0x1109}, -{0x229e, 0x4D0F}, -{0x22a0, 0x8B2F}, -{0x22a2, 0x480A}, -{0x22a4, 0x4F0C}, -{0x22a6, 0x12B0}, -{0x22a8, 0xFE58}, -{0x22aa, 0x4E0F}, -{0x22ac, 0xC312}, -{0x22ae, 0x100F}, -{0x22b0, 0x110F}, -{0x22b2, 0x110F}, -{0x22b4, 0x110F}, -{0x22b6, 0x110F}, -{0x22b8, 0x110F}, -{0x22ba, 0x5F09}, -{0x22bc, 0xC312}, -{0x22be, 0x1009}, -{0x22c0, 0x92B2}, -{0x22c2, 0x80BE}, -{0x22c4, 0x280C}, -{0x22c6, 0x90B2}, -{0x22c8, 0x0096}, -{0x22ca, 0x80B6}, -{0x22cc, 0x2408}, -{0x22ce, 0x0900}, -{0x22d0, 0x710E}, -{0x22d2, 0x0B00}, -{0x22d4, 0x7302}, -{0x22d6, 0x0320}, -{0x22d8, 0x12B0}, -{0x22da, 0xF6F2}, -{0x22dc, 0x3F74}, -{0x22de, 0x470A}, -{0x22e0, 0x580A}, -{0x22e2, 0xC312}, -{0x22e4, 0x100A}, -{0x22e6, 0x890A}, -{0x22e8, 0xB3E2}, -{0x22ea, 0x0C81}, -{0x22ec, 0x2418}, -{0x22ee, 0x425F}, -{0x22f0, 0x0C92}, -{0x22f2, 0xF37F}, -{0x22f4, 0x9F0A}, -{0x22f6, 0x280E}, -{0x22f8, 0x425F}, -{0x22fa, 0x0C92}, -{0x22fc, 0xF37F}, -{0x22fe, 0x4A0E}, -{0x2300, 0x8F0E}, -{0x2302, 0x4E82}, -{0x2304, 0x0CAC}, -{0x2306, 0x425F}, -{0x2308, 0x0C92}, -{0x230a, 0xF37F}, -{0x230c, 0x8F0A}, -{0x230e, 0x4A82}, -{0x2310, 0x0CAE}, -{0x2312, 0x3FDD}, -{0x2314, 0x4382}, -{0x2316, 0x0CAC}, -{0x2318, 0x4382}, -{0x231a, 0x0CAE}, -{0x231c, 0x3FD8}, -{0x231e, 0x4A82}, -{0x2320, 0x0CAC}, -{0x2322, 0x3FF5}, -{0x2324, 0x0B00}, -{0x2326, 0x7302}, -{0x2328, 0x0002}, -{0x232a, 0x069A}, -{0x232c, 0x0C1F}, -{0x232e, 0x0403}, -{0x2330, 0x0C05}, -{0x2332, 0x0001}, -{0x2334, 0x0C01}, -{0x2336, 0x0003}, -{0x2338, 0x0C03}, -{0x233a, 0x000B}, -{0x233c, 0x0C33}, -{0x233e, 0x0003}, -{0x2340, 0x0C03}, -{0x2342, 0x0653}, -{0x2344, 0x0C03}, -{0x2346, 0x065B}, -{0x2348, 0x0C13}, -{0x234a, 0x065F}, -{0x234c, 0x0C43}, -{0x234e, 0x0657}, -{0x2350, 0x0C03}, -{0x2352, 0x0653}, -{0x2354, 0x0C03}, -{0x2356, 0x0643}, -{0x2358, 0x0C0F}, -{0x235a, 0x067D}, -{0x235c, 0x0C01}, -{0x235e, 0x077F}, -{0x2360, 0x0C01}, -{0x2362, 0x0677}, -{0x2364, 0x0C01}, -{0x2366, 0x0673}, -{0x2368, 0x0C67}, -{0x236a, 0x0677}, -{0x236c, 0x0C03}, -{0x236e, 0x077D}, -{0x2370, 0x0C19}, -{0x2372, 0x0013}, -{0x2374, 0x0C27}, -{0x2376, 0x0003}, -{0x2378, 0x0C45}, -{0x237a, 0x0675}, -{0x237c, 0x0C01}, -{0x237e, 0x0671}, -{0x2380, 0x4392}, -{0x2382, 0x7004}, -{0x2384, 0x430F}, -{0x2386, 0x9382}, -{0x2388, 0x80BC}, -{0x238a, 0x2001}, -{0x238c, 0x431F}, -{0x238e, 0x4F82}, -{0x2390, 0x80BC}, -{0x2392, 0x930F}, -{0x2394, 0x2473}, -{0x2396, 0x0B00}, -{0x2398, 0x7302}, -{0x239a, 0x033A}, -{0x239c, 0x0675}, -{0x239e, 0x0C02}, -{0x23a0, 0x0339}, -{0x23a2, 0xAE0C}, -{0x23a4, 0x0C01}, -{0x23a6, 0x003C}, -{0x23a8, 0x0C01}, -{0x23aa, 0x0004}, -{0x23ac, 0x0C01}, -{0x23ae, 0x0642}, -{0x23b0, 0x0B00}, -{0x23b2, 0x7302}, -{0x23b4, 0x0386}, -{0x23b6, 0x0643}, -{0x23b8, 0x0C05}, -{0x23ba, 0x0001}, -{0x23bc, 0x0C01}, -{0x23be, 0x0003}, -{0x23c0, 0x0C03}, -{0x23c2, 0x000B}, -{0x23c4, 0x0C33}, -{0x23c6, 0x0003}, -{0x23c8, 0x0C03}, -{0x23ca, 0x0653}, -{0x23cc, 0x0C03}, -{0x23ce, 0x065B}, -{0x23d0, 0x0C13}, -{0x23d2, 0x065F}, -{0x23d4, 0x0C43}, -{0x23d6, 0x0657}, -{0x23d8, 0x0C03}, -{0x23da, 0x0653}, -{0x23dc, 0x0C03}, -{0x23de, 0x0643}, -{0x23e0, 0x0C0F}, -{0x23e2, 0x067D}, -{0x23e4, 0x0C01}, -{0x23e6, 0x077F}, -{0x23e8, 0x0C01}, -{0x23ea, 0x0677}, -{0x23ec, 0x0C01}, -{0x23ee, 0x0673}, -{0x23f0, 0x0C67}, -{0x23f2, 0x0677}, -{0x23f4, 0x0C03}, -{0x23f6, 0x077D}, -{0x23f8, 0x0C19}, -{0x23fa, 0x0013}, -{0x23fc, 0x0C27}, -{0x23fe, 0x0003}, -{0x2400, 0x0C45}, -{0x2402, 0x0675}, -{0x2404, 0x0C01}, -{0x2406, 0x0671}, -{0x2408, 0x12B0}, -{0x240a, 0xF6F2}, -{0x240c, 0x930F}, -{0x240e, 0x2405}, -{0x2410, 0x4292}, -{0x2412, 0x8096}, -{0x2414, 0x809E}, -{0x2416, 0x4382}, -{0x2418, 0x8096}, -{0x241a, 0x9382}, -{0x241c, 0x80BC}, -{0x241e, 0x241E}, -{0x2420, 0x0B00}, -{0x2422, 0x7302}, -{0x2424, 0x069E}, -{0x2426, 0x0675}, -{0x2428, 0x0C02}, -{0x242a, 0x0339}, -{0x242c, 0xAE0C}, -{0x242e, 0x0C01}, -{0x2430, 0x003C}, -{0x2432, 0x0C01}, -{0x2434, 0x0004}, -{0x2436, 0x0C01}, -{0x2438, 0x0642}, -{0x243a, 0x0C01}, -{0x243c, 0x06A1}, -{0x243e, 0x0C03}, -{0x2440, 0x06A0}, -{0x2442, 0x9382}, -{0x2444, 0x80D0}, -{0x2446, 0x2004}, -{0x2448, 0x930F}, -{0x244a, 0x26BD}, -{0x244c, 0x4030}, -{0x244e, 0xF18C}, -{0x2450, 0x43C2}, -{0x2452, 0x0A80}, -{0x2454, 0x0B00}, -{0x2456, 0x7302}, -{0x2458, 0xFFF0}, -{0x245a, 0x3EB5}, -{0x245c, 0x0B00}, -{0x245e, 0x7302}, -{0x2460, 0x069E}, -{0x2462, 0x0675}, -{0x2464, 0x0C02}, -{0x2466, 0x0301}, -{0x2468, 0xAE0C}, -{0x246a, 0x0C01}, -{0x246c, 0x0004}, -{0x246e, 0x0C03}, -{0x2470, 0x0642}, -{0x2472, 0x0C01}, -{0x2474, 0x06A1}, -{0x2476, 0x0C03}, -{0x2478, 0x06A0}, -{0x247a, 0x3FE3}, -{0x247c, 0x0B00}, -{0x247e, 0x7302}, -{0x2480, 0x033A}, -{0x2482, 0x0675}, -{0x2484, 0x0C02}, -{0x2486, 0x0301}, -{0x2488, 0xAE0C}, -{0x248a, 0x0C01}, -{0x248c, 0x0004}, -{0x248e, 0x0C03}, -{0x2490, 0x0642}, -{0x2492, 0x3F8E}, -{0x2494, 0x0B00}, -{0x2496, 0x7302}, -{0x2498, 0x0002}, -{0x249a, 0x069A}, -{0x249c, 0x0C1F}, -{0x249e, 0x0402}, -{0x24a0, 0x0C05}, -{0x24a2, 0x0001}, -{0x24a4, 0x0C01}, -{0x24a6, 0x0003}, -{0x24a8, 0x0C03}, -{0x24aa, 0x000B}, -{0x24ac, 0x0C33}, -{0x24ae, 0x0003}, -{0x24b0, 0x0C03}, -{0x24b2, 0x0653}, -{0x24b4, 0x0C03}, -{0x24b6, 0x065B}, -{0x24b8, 0x0C13}, -{0x24ba, 0x065F}, -{0x24bc, 0x0C43}, -{0x24be, 0x0657}, -{0x24c0, 0x0C03}, -{0x24c2, 0x0653}, -{0x24c4, 0x0C03}, -{0x24c6, 0x0643}, -{0x24c8, 0x0C0F}, -{0x24ca, 0x077D}, -{0x24cc, 0x0C01}, -{0x24ce, 0x067F}, -{0x24d0, 0x0C01}, -{0x24d2, 0x0677}, -{0x24d4, 0x0C01}, -{0x24d6, 0x0673}, -{0x24d8, 0x0C5F}, -{0x24da, 0x0663}, -{0x24dc, 0x0C6F}, -{0x24de, 0x0667}, -{0x24e0, 0x0C01}, -{0x24e2, 0x0677}, -{0x24e4, 0x0C01}, -{0x24e6, 0x077D}, -{0x24e8, 0x0C33}, -{0x24ea, 0x0013}, -{0x24ec, 0x0C27}, -{0x24ee, 0x0003}, -{0x24f0, 0x0C4F}, -{0x24f2, 0x0675}, -{0x24f4, 0x0C01}, -{0x24f6, 0x0671}, -{0x24f8, 0x0CFF}, -{0x24fa, 0x0C78}, -{0x24fc, 0x0661}, -{0x24fe, 0x4392}, -{0x2500, 0x7004}, -{0x2502, 0x430F}, -{0x2504, 0x9382}, -{0x2506, 0x80BC}, -{0x2508, 0x2001}, -{0x250a, 0x431F}, -{0x250c, 0x4F82}, -{0x250e, 0x80BC}, -{0x2510, 0x12B0}, -{0x2512, 0xF6F2}, -{0x2514, 0x930F}, -{0x2516, 0x2405}, -{0x2518, 0x4292}, -{0x251a, 0x8096}, -{0x251c, 0x809E}, -{0x251e, 0x4382}, -{0x2520, 0x8096}, -{0x2522, 0x9382}, -{0x2524, 0x80BC}, -{0x2526, 0x2019}, -{0x2528, 0x0B00}, -{0x252a, 0x7302}, -{0x252c, 0x0562}, -{0x252e, 0x0665}, -{0x2530, 0x0C02}, -{0x2532, 0x0301}, -{0x2534, 0xA60C}, -{0x2536, 0x0204}, -{0x2538, 0xAE0C}, -{0x253a, 0x0C03}, -{0x253c, 0x0642}, -{0x253e, 0x0C13}, -{0x2540, 0x06A1}, -{0x2542, 0x0C03}, -{0x2544, 0x06A0}, -{0x2546, 0x9382}, -{0x2548, 0x80D0}, -{0x254a, 0x277E}, -{0x254c, 0x43C2}, -{0x254e, 0x0A80}, -{0x2550, 0x0B00}, -{0x2552, 0x7302}, -{0x2554, 0xFFF0}, -{0x2556, 0x4030}, -{0x2558, 0xF1C6}, -{0x255a, 0x0B00}, -{0x255c, 0x7302}, -{0x255e, 0x0562}, -{0x2560, 0x0665}, -{0x2562, 0x0C02}, -{0x2564, 0x0339}, -{0x2566, 0xA60C}, -{0x2568, 0x023C}, -{0x256a, 0xAE0C}, -{0x256c, 0x0C01}, -{0x256e, 0x0004}, -{0x2570, 0x0C01}, -{0x2572, 0x0642}, -{0x2574, 0x0C13}, -{0x2576, 0x06A1}, -{0x2578, 0x0C03}, -{0x257a, 0x06A0}, -{0x257c, 0x9382}, -{0x257e, 0x80D0}, -{0x2580, 0x2763}, -{0x2582, 0x43C2}, -{0x2584, 0x0A80}, -{0x2586, 0x0B00}, -{0x2588, 0x7302}, -{0x258a, 0xFFF0}, -{0x258c, 0x4030}, -{0x258e, 0xF1C6}, -{0x2590, 0xB3E2}, -{0x2592, 0x00B4}, -{0x2594, 0x2002}, -{0x2596, 0x4030}, -{0x2598, 0xF16A}, -{0x259a, 0x4316}, -{0x259c, 0x4030}, -{0x259e, 0xF16A}, -{0x25a0, 0x4392}, -{0x25a2, 0x760E}, -{0x25a4, 0x425F}, -{0x25a6, 0x0118}, -{0x25a8, 0xF37F}, -{0x25aa, 0x930F}, -{0x25ac, 0x2005}, -{0x25ae, 0x43C2}, -{0x25b0, 0x0A80}, -{0x25b2, 0x0B00}, -{0x25b4, 0x7302}, -{0x25b6, 0xFFF0}, -{0x25b8, 0x9382}, -{0x25ba, 0x760C}, -{0x25bc, 0x2002}, -{0x25be, 0x0C64}, -{0x25c0, 0x3FF1}, -{0x25c2, 0x4F82}, -{0x25c4, 0x809A}, -{0x25c6, 0x421F}, -{0x25c8, 0x760A}, -{0x25ca, 0x932F}, -{0x25cc, 0x2013}, -{0x25ce, 0x4292}, -{0x25d0, 0x018A}, -{0x25d2, 0x80B8}, -{0x25d4, 0x12B0}, -{0x25d6, 0xFE26}, -{0x25d8, 0x40B2}, -{0x25da, 0x0005}, -{0x25dc, 0x7600}, -{0x25de, 0x4382}, -{0x25e0, 0x7602}, -{0x25e2, 0x0262}, -{0x25e4, 0x0000}, -{0x25e6, 0x0222}, -{0x25e8, 0x0000}, -{0x25ea, 0x0262}, -{0x25ec, 0x0000}, -{0x25ee, 0x0260}, -{0x25f0, 0x0000}, -{0x25f2, 0x3FD6}, -{0x25f4, 0x903F}, -{0x25f6, 0x0003}, -{0x25f8, 0x285B}, -{0x25fa, 0x903F}, -{0x25fc, 0x0102}, -{0x25fe, 0x204E}, -{0x2600, 0x425F}, -{0x2602, 0x0186}, -{0x2604, 0x4F4C}, -{0x2606, 0x93D2}, -{0x2608, 0x018F}, -{0x260a, 0x2446}, -{0x260c, 0x425F}, -{0x260e, 0x018F}, -{0x2610, 0x4F4D}, -{0x2612, 0x4308}, -{0x2614, 0x421B}, -{0x2616, 0x80B8}, -{0x2618, 0x431F}, -{0x261a, 0x480E}, -{0x261c, 0x930E}, -{0x261e, 0x2403}, -{0x2620, 0x5F0F}, -{0x2622, 0x831E}, -{0x2624, 0x23FD}, -{0x2626, 0xFC0F}, -{0x2628, 0x242F}, -{0x262a, 0x430F}, -{0x262c, 0x9D0F}, -{0x262e, 0x2C2C}, -{0x2630, 0x4B0E}, -{0x2632, 0x4E82}, -{0x2634, 0x7600}, -{0x2636, 0x4882}, -{0x2638, 0x7602}, -{0x263a, 0x4C82}, -{0x263c, 0x7604}, -{0x263e, 0x0264}, -{0x2640, 0x0000}, -{0x2642, 0x0224}, -{0x2644, 0x0000}, -{0x2646, 0x0264}, -{0x2648, 0x0000}, -{0x264a, 0x0260}, -{0x264c, 0x0000}, -{0x264e, 0x0268}, -{0x2650, 0x0000}, -{0x2652, 0x0C18}, -{0x2654, 0x02E8}, -{0x2656, 0x0000}, -{0x2658, 0x0C30}, -{0x265a, 0x02A8}, -{0x265c, 0x0000}, -{0x265e, 0x0C30}, -{0x2660, 0x0C30}, -{0x2662, 0x0C30}, -{0x2664, 0x0C30}, -{0x2666, 0x0C30}, -{0x2668, 0x0C30}, -{0x266a, 0x0C30}, -{0x266c, 0x0C30}, -{0x266e, 0x0C00}, -{0x2670, 0x02E8}, -{0x2672, 0x0000}, -{0x2674, 0x0C30}, -{0x2676, 0x0268}, -{0x2678, 0x0000}, -{0x267a, 0x0C18}, -{0x267c, 0x0260}, -{0x267e, 0x0000}, -{0x2680, 0x0C18}, -{0x2682, 0x531F}, -{0x2684, 0x9D0F}, -{0x2686, 0x2BD5}, -{0x2688, 0x5318}, -{0x268a, 0x9238}, -{0x268c, 0x2BC5}, -{0x268e, 0x0260}, -{0x2690, 0x0000}, -{0x2692, 0x5392}, -{0x2694, 0x80B8}, -{0x2696, 0x3F84}, -{0x2698, 0x432D}, -{0x269a, 0x3FBB}, -{0x269c, 0x903F}, -{0x269e, 0x0201}, -{0x26a0, 0x237F}, -{0x26a2, 0x5392}, -{0x26a4, 0x80B8}, -{0x26a6, 0x421F}, -{0x26a8, 0x80B8}, -{0x26aa, 0x12B0}, -{0x26ac, 0xFE38}, -{0x26ae, 0x3F78}, -{0x26b0, 0x931F}, -{0x26b2, 0x2376}, -{0x26b4, 0x12B0}, -{0x26b6, 0xFE26}, -{0x26b8, 0x4292}, -{0x26ba, 0x018A}, -{0x26bc, 0x80B8}, -{0x26be, 0x3FF3}, -{0x26c0, 0x4382}, -{0x26c2, 0x0B88}, -{0x26c4, 0x0C0A}, -{0x26c6, 0x4382}, -{0x26c8, 0x0B8A}, -{0x26ca, 0x0C0A}, -{0x26cc, 0x40B2}, -{0x26ce, 0x000C}, -{0x26d0, 0x0B8C}, -{0x26d2, 0x0C0A}, -{0x26d4, 0x40B2}, -{0x26d6, 0xB5E1}, -{0x26d8, 0x0B8E}, -{0x26da, 0x0C0A}, -{0x26dc, 0x40B2}, -{0x26de, 0x641C}, -{0x26e0, 0x0B92}, -{0x26e2, 0x0C0A}, -{0x26e4, 0x43C2}, -{0x26e6, 0x003D}, -{0x26e8, 0x4030}, -{0x26ea, 0xF02C}, -{0x26ec, 0x5231}, -{0x26ee, 0x4030}, -{0x26f0, 0xFE54}, -{0x26f2, 0xE3B2}, -{0x26f4, 0x740E}, -{0x26f6, 0x425F}, -{0x26f8, 0x0118}, -{0x26fa, 0xF37F}, -{0x26fc, 0x4F82}, -{0x26fe, 0x809A}, -{0x2700, 0x930F}, -{0x2702, 0x2005}, -{0x2704, 0x93C2}, -{0x2706, 0x0A82}, -{0x2708, 0x2402}, -{0x270a, 0x4392}, -{0x270c, 0x80D0}, -{0x270e, 0x9382}, -{0x2710, 0x809A}, -{0x2712, 0x2002}, -{0x2714, 0x4392}, -{0x2716, 0x8070}, -{0x2718, 0x421F}, -{0x271a, 0x710E}, -{0x271c, 0x93A2}, -{0x271e, 0x7110}, -{0x2720, 0x2411}, -{0x2722, 0x9382}, -{0x2724, 0x710E}, -{0x2726, 0x240C}, -{0x2728, 0x5292}, -{0x272a, 0x80A0}, -{0x272c, 0x7110}, -{0x272e, 0x4382}, -{0x2730, 0x740E}, -{0x2732, 0x9382}, -{0x2734, 0x80BA}, -{0x2736, 0x2402}, -{0x2738, 0x4392}, -{0x273a, 0x740E}, -{0x273c, 0x4392}, -{0x273e, 0x80BC}, -{0x2740, 0x430F}, -{0x2742, 0x4130}, -{0x2744, 0xF31F}, -{0x2746, 0x27ED}, -{0x2748, 0x40B2}, -{0x274a, 0x0003}, -{0x274c, 0x7110}, -{0x274e, 0x431F}, -{0x2750, 0x4130}, -{0x2752, 0x4F0E}, -{0x2754, 0x421D}, -{0x2756, 0x8070}, -{0x2758, 0x425F}, -{0x275a, 0x0118}, -{0x275c, 0xF37F}, -{0x275e, 0x903E}, -{0x2760, 0x0003}, -{0x2762, 0x2405}, -{0x2764, 0x931E}, -{0x2766, 0x2403}, -{0x2768, 0x0B00}, -{0x276a, 0x7302}, -{0x276c, 0x0384}, -{0x276e, 0x930F}, -{0x2770, 0x241A}, -{0x2772, 0x930D}, -{0x2774, 0x2018}, -{0x2776, 0x9382}, -{0x2778, 0x7308}, -{0x277a, 0x2402}, -{0x277c, 0x930E}, -{0x277e, 0x2419}, -{0x2780, 0x9382}, -{0x2782, 0x7328}, -{0x2784, 0x2402}, -{0x2786, 0x931E}, -{0x2788, 0x2414}, -{0x278a, 0x9382}, -{0x278c, 0x710E}, -{0x278e, 0x2402}, -{0x2790, 0x932E}, -{0x2792, 0x240F}, -{0x2794, 0x9382}, -{0x2796, 0x7114}, -{0x2798, 0x2402}, -{0x279a, 0x922E}, -{0x279c, 0x240A}, -{0x279e, 0x903E}, -{0x27a0, 0x0003}, -{0x27a2, 0x23DA}, -{0x27a4, 0x3C06}, -{0x27a6, 0x43C2}, -{0x27a8, 0x0A80}, -{0x27aa, 0x0B00}, -{0x27ac, 0x7302}, -{0x27ae, 0xFFF0}, -{0x27b0, 0x3FD3}, -{0x27b2, 0x4F82}, -{0x27b4, 0x809A}, -{0x27b6, 0x431F}, -{0x27b8, 0x4130}, -{0x27ba, 0x120B}, -{0x27bc, 0x120A}, -{0x27be, 0x1209}, -{0x27c0, 0x1208}, -{0x27c2, 0x1207}, -{0x27c4, 0x1206}, -{0x27c6, 0x1205}, -{0x27c8, 0x1204}, -{0x27ca, 0x8221}, -{0x27cc, 0x403B}, -{0x27ce, 0x0016}, -{0x27d0, 0x510B}, -{0x27d2, 0x4F08}, -{0x27d4, 0x4E09}, -{0x27d6, 0x4BA1}, -{0x27d8, 0x0000}, -{0x27da, 0x4B1A}, -{0x27dc, 0x0002}, -{0x27de, 0x4B91}, -{0x27e0, 0x0004}, -{0x27e2, 0x0002}, -{0x27e4, 0x4304}, -{0x27e6, 0x4305}, -{0x27e8, 0x4306}, -{0x27ea, 0x4307}, -{0x27ec, 0x9382}, -{0x27ee, 0x80B4}, -{0x27f0, 0x2425}, -{0x27f2, 0x438A}, -{0x27f4, 0x0000}, -{0x27f6, 0x430B}, -{0x27f8, 0x4B0F}, -{0x27fa, 0x5F0F}, -{0x27fc, 0x5F0F}, -{0x27fe, 0x580F}, -{0x2800, 0x4C8F}, -{0x2802, 0x0000}, -{0x2804, 0x4D8F}, -{0x2806, 0x0002}, -{0x2808, 0x4B0F}, -{0x280a, 0x5F0F}, -{0x280c, 0x590F}, -{0x280e, 0x41AF}, -{0x2810, 0x0000}, -{0x2812, 0x531B}, -{0x2814, 0x923B}, -{0x2816, 0x2BF0}, -{0x2818, 0x430B}, -{0x281a, 0x4B0F}, -{0x281c, 0x5F0F}, -{0x281e, 0x5F0F}, -{0x2820, 0x580F}, -{0x2822, 0x5F34}, -{0x2824, 0x6F35}, -{0x2826, 0x4B0F}, -{0x2828, 0x5F0F}, -{0x282a, 0x590F}, -{0x282c, 0x4F2E}, -{0x282e, 0x430F}, -{0x2830, 0x5E06}, -{0x2832, 0x6F07}, -{0x2834, 0x531B}, -{0x2836, 0x923B}, -{0x2838, 0x2BF0}, -{0x283a, 0x3C18}, -{0x283c, 0x4A2E}, -{0x283e, 0x4E0F}, -{0x2840, 0x5F0F}, -{0x2842, 0x5F0F}, -{0x2844, 0x580F}, -{0x2846, 0x4C8F}, -{0x2848, 0x0000}, -{0x284a, 0x4D8F}, -{0x284c, 0x0002}, -{0x284e, 0x5E0E}, -{0x2850, 0x590E}, -{0x2852, 0x41AE}, -{0x2854, 0x0000}, -{0x2856, 0x4A2F}, -{0x2858, 0x903F}, -{0x285a, 0x0007}, -{0x285c, 0x2404}, -{0x285e, 0x531F}, -{0x2860, 0x4F8A}, -{0x2862, 0x0000}, -{0x2864, 0x3FD9}, -{0x2866, 0x438A}, -{0x2868, 0x0000}, -{0x286a, 0x3FD6}, -{0x286c, 0x440C}, -{0x286e, 0x450D}, -{0x2870, 0x460A}, -{0x2872, 0x470B}, -{0x2874, 0x12B0}, -{0x2876, 0xFEAA}, -{0x2878, 0x4C08}, -{0x287a, 0x4D09}, -{0x287c, 0x4C0E}, -{0x287e, 0x430F}, -{0x2880, 0x4E0A}, -{0x2882, 0x4F0B}, -{0x2884, 0x460C}, -{0x2886, 0x470D}, -{0x2888, 0x12B0}, -{0x288a, 0xFE6E}, -{0x288c, 0x8E04}, -{0x288e, 0x7F05}, -{0x2890, 0x440E}, -{0x2892, 0x450F}, -{0x2894, 0xC312}, -{0x2896, 0x100F}, -{0x2898, 0x100E}, -{0x289a, 0x110F}, -{0x289c, 0x100E}, -{0x289e, 0x110F}, -{0x28a0, 0x100E}, -{0x28a2, 0x411D}, -{0x28a4, 0x0002}, -{0x28a6, 0x4E8D}, -{0x28a8, 0x0000}, -{0x28aa, 0x480F}, -{0x28ac, 0x5221}, -{0x28ae, 0x4134}, -{0x28b0, 0x4135}, -{0x28b2, 0x4136}, -{0x28b4, 0x4137}, -{0x28b6, 0x4138}, -{0x28b8, 0x4139}, -{0x28ba, 0x413A}, -{0x28bc, 0x413B}, -{0x28be, 0x4130}, -{0x28c0, 0x120A}, -{0x28c2, 0x4F0D}, -{0x28c4, 0x4E0C}, -{0x28c6, 0x425F}, -{0x28c8, 0x00BA}, -{0x28ca, 0x4F4A}, -{0x28cc, 0x503A}, -{0x28ce, 0x0010}, -{0x28d0, 0x931D}, -{0x28d2, 0x242B}, -{0x28d4, 0x932D}, -{0x28d6, 0x2421}, -{0x28d8, 0x903D}, -{0x28da, 0x0003}, -{0x28dc, 0x2418}, -{0x28de, 0x922D}, -{0x28e0, 0x2413}, -{0x28e2, 0x903D}, -{0x28e4, 0x0005}, -{0x28e6, 0x2407}, -{0x28e8, 0x903D}, -{0x28ea, 0x0006}, -{0x28ec, 0x2028}, -{0x28ee, 0xC312}, -{0x28f0, 0x100A}, -{0x28f2, 0x110A}, -{0x28f4, 0x3C24}, -{0x28f6, 0x4A0E}, -{0x28f8, 0xC312}, -{0x28fa, 0x100E}, -{0x28fc, 0x110E}, -{0x28fe, 0x4E0F}, -{0x2900, 0x110F}, -{0x2902, 0x4E0A}, -{0x2904, 0x5F0A}, -{0x2906, 0x3C1B}, -{0x2908, 0xC312}, -{0x290a, 0x100A}, -{0x290c, 0x3C18}, -{0x290e, 0x4A0E}, -{0x2910, 0xC312}, -{0x2912, 0x100E}, -{0x2914, 0x4E0F}, -{0x2916, 0x110F}, -{0x2918, 0x3FF3}, -{0x291a, 0x4A0F}, -{0x291c, 0xC312}, -{0x291e, 0x100F}, -{0x2920, 0x4F0E}, -{0x2922, 0x110E}, -{0x2924, 0x4F0A}, -{0x2926, 0x5E0A}, -{0x2928, 0x3C0A}, -{0x292a, 0x4A0F}, -{0x292c, 0xC312}, -{0x292e, 0x100F}, -{0x2930, 0x4F0E}, -{0x2932, 0x110E}, -{0x2934, 0x4F0A}, -{0x2936, 0x5E0A}, -{0x2938, 0x4E0F}, -{0x293a, 0x110F}, -{0x293c, 0x3FE3}, -{0x293e, 0x12B0}, -{0x2940, 0xFE58}, -{0x2942, 0x4E0F}, -{0x2944, 0xC312}, -{0x2946, 0x100F}, -{0x2948, 0x110F}, -{0x294a, 0x110F}, -{0x294c, 0x110F}, -{0x294e, 0x413A}, -{0x2950, 0x4130}, -{0x2952, 0x120B}, -{0x2954, 0x120A}, -{0x2956, 0x1209}, -{0x2958, 0x1208}, -{0x295a, 0x425F}, -{0x295c, 0x0080}, -{0x295e, 0xF36F}, -{0x2960, 0x4F0E}, -{0x2962, 0xF32E}, -{0x2964, 0x4E82}, -{0x2966, 0x80BA}, -{0x2968, 0xB3D2}, -{0x296a, 0x0786}, -{0x296c, 0x2402}, -{0x296e, 0x4392}, -{0x2970, 0x7002}, -{0x2972, 0x4392}, -{0x2974, 0x80BC}, -{0x2976, 0x4382}, -{0x2978, 0x740E}, -{0x297a, 0x9382}, -{0x297c, 0x80BA}, -{0x297e, 0x2402}, -{0x2980, 0x4392}, -{0x2982, 0x740E}, -{0x2984, 0x93C2}, -{0x2986, 0x00C6}, -{0x2988, 0x2406}, -{0x298a, 0xB392}, -{0x298c, 0x732A}, -{0x298e, 0x2403}, -{0x2990, 0xB3D2}, -{0x2992, 0x00C7}, -{0x2994, 0x2412}, -{0x2996, 0x4292}, -{0x2998, 0x01A8}, -{0x299a, 0x0688}, -{0x299c, 0x4292}, -{0x299e, 0x01AA}, -{0x29a0, 0x068A}, -{0x29a2, 0x4292}, -{0x29a4, 0x01AC}, -{0x29a6, 0x068C}, -{0x29a8, 0x4292}, -{0x29aa, 0x01AE}, -{0x29ac, 0x068E}, -{0x29ae, 0x4292}, -{0x29b0, 0x0190}, -{0x29b2, 0x0A92}, -{0x29b4, 0x4292}, -{0x29b6, 0x0192}, -{0x29b8, 0x0A94}, -{0x29ba, 0x430E}, -{0x29bc, 0x425F}, -{0x29be, 0x00C7}, -{0x29c0, 0xF35F}, -{0x29c2, 0xF37F}, -{0x29c4, 0xF21F}, -{0x29c6, 0x732A}, -{0x29c8, 0x200C}, -{0x29ca, 0xB3D2}, -{0x29cc, 0x00C7}, -{0x29ce, 0x2003}, -{0x29d0, 0xB392}, -{0x29d2, 0x80A2}, -{0x29d4, 0x2006}, -{0x29d6, 0xB3A2}, -{0x29d8, 0x732A}, -{0x29da, 0x2003}, -{0x29dc, 0x9382}, -{0x29de, 0x8096}, -{0x29e0, 0x2401}, -{0x29e2, 0x431E}, -{0x29e4, 0x4E82}, -{0x29e6, 0x80B4}, -{0x29e8, 0x930E}, -{0x29ea, 0x2002}, -{0x29ec, 0x4030}, -{0x29ee, 0xFDE4}, -{0x29f0, 0x4382}, -{0x29f2, 0x80BE}, -{0x29f4, 0x421F}, -{0x29f6, 0x732A}, -{0x29f8, 0xF31F}, -{0x29fa, 0x4F82}, -{0x29fc, 0x80A2}, -{0x29fe, 0x425F}, -{0x2a00, 0x008C}, -{0x2a02, 0x4FC2}, -{0x2a04, 0x8092}, -{0x2a06, 0x43C2}, -{0x2a08, 0x8093}, -{0x2a0a, 0x425F}, -{0x2a0c, 0x009E}, -{0x2a0e, 0x4F48}, -{0x2a10, 0x425F}, -{0x2a12, 0x009F}, -{0x2a14, 0xF37F}, -{0x2a16, 0x5F08}, -{0x2a18, 0x1108}, -{0x2a1a, 0x1108}, -{0x2a1c, 0x425F}, -{0x2a1e, 0x00B2}, -{0x2a20, 0x4F49}, -{0x2a22, 0x425F}, -{0x2a24, 0x00B3}, -{0x2a26, 0xF37F}, -{0x2a28, 0x5F09}, -{0x2a2a, 0x1109}, -{0x2a2c, 0x1109}, -{0x2a2e, 0x425F}, -{0x2a30, 0x00BA}, -{0x2a32, 0x4F4C}, -{0x2a34, 0x407A}, -{0x2a36, 0x001C}, -{0x2a38, 0x12B0}, -{0x2a3a, 0xFE8E}, -{0x2a3c, 0x934C}, -{0x2a3e, 0x25BE}, -{0x2a40, 0x403E}, -{0x2a42, 0x0080}, -{0x2a44, 0x4E0F}, -{0x2a46, 0xF37F}, -{0x2a48, 0x108F}, -{0x2a4a, 0xD03F}, -{0x2a4c, 0x008B}, -{0x2a4e, 0x4F82}, -{0x2a50, 0x0B88}, -{0x2a52, 0x0C0A}, -{0x2a54, 0x403C}, -{0x2a56, 0x0813}, -{0x2a58, 0x403D}, -{0x2a5a, 0x007F}, -{0x2a5c, 0x403F}, -{0x2a5e, 0x00BA}, -{0x2a60, 0x4F6E}, -{0x2a62, 0x90FF}, -{0x2a64, 0x0010}, -{0x2a66, 0x0000}, -{0x2a68, 0x2D13}, -{0x2a6a, 0x403C}, -{0x2a6c, 0x1005}, -{0x2a6e, 0x430D}, -{0x2a70, 0x425E}, -{0x2a72, 0x00BA}, -{0x2a74, 0x4E4F}, -{0x2a76, 0x108F}, -{0x2a78, 0xDD0F}, -{0x2a7a, 0x4F82}, -{0x2a7c, 0x0B90}, -{0x2a7e, 0x0C0A}, -{0x2a80, 0x4C82}, -{0x2a82, 0x0B8A}, -{0x2a84, 0x0C0A}, -{0x2a86, 0x425F}, -{0x2a88, 0x0C87}, -{0x2a8a, 0x4F4E}, -{0x2a8c, 0x425F}, -{0x2a8e, 0x0C88}, -{0x2a90, 0xF37F}, -{0x2a92, 0x12B0}, -{0x2a94, 0xF8C0}, -{0x2a96, 0x4F82}, -{0x2a98, 0x0C8C}, -{0x2a9a, 0x425F}, -{0x2a9c, 0x0C85}, -{0x2a9e, 0x4F4E}, -{0x2aa0, 0x425F}, -{0x2aa2, 0x0C89}, -{0x2aa4, 0xF37F}, -{0x2aa6, 0x12B0}, -{0x2aa8, 0xF8C0}, -{0x2aaa, 0x4F82}, -{0x2aac, 0x0C8A}, -{0x2aae, 0x425E}, -{0x2ab0, 0x00B7}, -{0x2ab2, 0x5E4E}, -{0x2ab4, 0x4EC2}, -{0x2ab6, 0x0CB0}, -{0x2ab8, 0x425F}, -{0x2aba, 0x00B8}, -{0x2abc, 0x5F4F}, -{0x2abe, 0x4FC2}, -{0x2ac0, 0x0CB1}, -{0x2ac2, 0x480E}, -{0x2ac4, 0x5E0E}, -{0x2ac6, 0x5E0E}, -{0x2ac8, 0x5E0E}, -{0x2aca, 0x5E0E}, -{0x2acc, 0x490F}, -{0x2ace, 0x5F0F}, -{0x2ad0, 0x5F0F}, -{0x2ad2, 0x5F0F}, -{0x2ad4, 0x5F0F}, -{0x2ad6, 0x5F0F}, -{0x2ad8, 0x5F0F}, -{0x2ada, 0x5F0F}, -{0x2adc, 0xDF0E}, -{0x2ade, 0x4E82}, -{0x2ae0, 0x0A8E}, -{0x2ae2, 0xB229}, -{0x2ae4, 0x2401}, -{0x2ae6, 0x5339}, -{0x2ae8, 0xB3E2}, -{0x2aea, 0x0080}, -{0x2aec, 0x2403}, -{0x2aee, 0x40F2}, -{0x2af0, 0x0003}, -{0x2af2, 0x00B5}, -{0x2af4, 0x40B2}, -{0x2af6, 0x1000}, -{0x2af8, 0x7500}, -{0x2afa, 0x40B2}, -{0x2afc, 0x1001}, -{0x2afe, 0x7502}, -{0x2b00, 0x40B2}, -{0x2b02, 0x0803}, -{0x2b04, 0x7504}, -{0x2b06, 0x40B2}, -{0x2b08, 0x080F}, -{0x2b0a, 0x7506}, -{0x2b0c, 0x40B2}, -{0x2b0e, 0x6003}, -{0x2b10, 0x7508}, -{0x2b12, 0x40B2}, -{0x2b14, 0x0801}, -{0x2b16, 0x750A}, -{0x2b18, 0x40B2}, -{0x2b1a, 0x0800}, -{0x2b1c, 0x750C}, -{0x2b1e, 0x40B2}, -{0x2b20, 0x1400}, -{0x2b22, 0x750E}, -{0x2b24, 0x403F}, -{0x2b26, 0x0003}, -{0x2b28, 0x12B0}, -{0x2b2a, 0xF752}, -{0x2b2c, 0x421F}, -{0x2b2e, 0x0098}, -{0x2b30, 0x821F}, -{0x2b32, 0x0092}, -{0x2b34, 0x531F}, -{0x2b36, 0xC312}, -{0x2b38, 0x100F}, -{0x2b3a, 0x4F82}, -{0x2b3c, 0x0A86}, -{0x2b3e, 0x421F}, -{0x2b40, 0x00AC}, -{0x2b42, 0x821F}, -{0x2b44, 0x00A6}, -{0x2b46, 0x531F}, -{0x2b48, 0x4F82}, -{0x2b4a, 0x0A88}, -{0x2b4c, 0xB0B2}, -{0x2b4e, 0x0010}, -{0x2b50, 0x0A84}, -{0x2b52, 0x248F}, -{0x2b54, 0x421E}, -{0x2b56, 0x068C}, -{0x2b58, 0xC312}, -{0x2b5a, 0x100E}, -{0x2b5c, 0x4E82}, -{0x2b5e, 0x0782}, -{0x2b60, 0x4292}, -{0x2b62, 0x068E}, -{0x2b64, 0x0784}, -{0x2b66, 0xB3D2}, -{0x2b68, 0x0CB6}, -{0x2b6a, 0x2418}, -{0x2b6c, 0x421A}, -{0x2b6e, 0x0CB8}, -{0x2b70, 0x430B}, -{0x2b72, 0x425F}, -{0x2b74, 0x0CBA}, -{0x2b76, 0x4F4E}, -{0x2b78, 0x430F}, -{0x2b7a, 0x4E0F}, -{0x2b7c, 0x430E}, -{0x2b7e, 0xDE0A}, -{0x2b80, 0xDF0B}, -{0x2b82, 0x421F}, -{0x2b84, 0x0CBC}, -{0x2b86, 0x4F0C}, -{0x2b88, 0x430D}, -{0x2b8a, 0x421F}, -{0x2b8c, 0x0CBE}, -{0x2b8e, 0x430E}, -{0x2b90, 0xDE0C}, -{0x2b92, 0xDF0D}, -{0x2b94, 0x12B0}, -{0x2b96, 0xFEAA}, -{0x2b98, 0x4C82}, -{0x2b9a, 0x0194}, -{0x2b9c, 0xB2A2}, -{0x2b9e, 0x0A84}, -{0x2ba0, 0x2412}, -{0x2ba2, 0x421E}, -{0x2ba4, 0x0A96}, -{0x2ba6, 0xC312}, -{0x2ba8, 0x100E}, -{0x2baa, 0x110E}, -{0x2bac, 0x110E}, -{0x2bae, 0x43C2}, -{0x2bb0, 0x0A98}, -{0x2bb2, 0x431D}, -{0x2bb4, 0x4E0F}, -{0x2bb6, 0x9F82}, -{0x2bb8, 0x0194}, -{0x2bba, 0x2850}, -{0x2bbc, 0x5E0F}, -{0x2bbe, 0x531D}, -{0x2bc0, 0x903D}, -{0x2bc2, 0x0009}, -{0x2bc4, 0x2BF8}, -{0x2bc6, 0x4292}, -{0x2bc8, 0x0084}, -{0x2bca, 0x7524}, -{0x2bcc, 0x4292}, -{0x2bce, 0x0088}, -{0x2bd0, 0x7316}, -{0x2bd2, 0x9382}, -{0x2bd4, 0x8092}, -{0x2bd6, 0x2403}, -{0x2bd8, 0x4292}, -{0x2bda, 0x008A}, -{0x2bdc, 0x7316}, -{0x2bde, 0x430E}, -{0x2be0, 0x421F}, -{0x2be2, 0x0086}, -{0x2be4, 0x822F}, -{0x2be6, 0x9F82}, -{0x2be8, 0x0084}, -{0x2bea, 0x2801}, -{0x2bec, 0x431E}, -{0x2bee, 0x4292}, -{0x2bf0, 0x0086}, -{0x2bf2, 0x7314}, -{0x2bf4, 0x93C2}, -{0x2bf6, 0x00BC}, -{0x2bf8, 0x2007}, -{0x2bfa, 0xB31E}, -{0x2bfc, 0x2405}, -{0x2bfe, 0x421F}, -{0x2c00, 0x0084}, -{0x2c02, 0x522F}, -{0x2c04, 0x4F82}, -{0x2c06, 0x7314}, -{0x2c08, 0x425F}, -{0x2c0a, 0x00BC}, -{0x2c0c, 0xF37F}, -{0x2c0e, 0xFE0F}, -{0x2c10, 0x2406}, -{0x2c12, 0x421E}, -{0x2c14, 0x0086}, -{0x2c16, 0x503E}, -{0x2c18, 0xFFFB}, -{0x2c1a, 0x4E82}, -{0x2c1c, 0x7524}, -{0x2c1e, 0x430E}, -{0x2c20, 0x421F}, -{0x2c22, 0x7524}, -{0x2c24, 0x9F82}, -{0x2c26, 0x809C}, -{0x2c28, 0x2C07}, -{0x2c2a, 0x9382}, -{0x2c2c, 0x8096}, -{0x2c2e, 0x2004}, -{0x2c30, 0x9382}, -{0x2c32, 0x8098}, -{0x2c34, 0x2001}, -{0x2c36, 0x431E}, -{0x2c38, 0x40B2}, -{0x2c3a, 0x0032}, -{0x2c3c, 0x7522}, -{0x2c3e, 0x4292}, -{0x2c40, 0x7524}, -{0x2c42, 0x809C}, -{0x2c44, 0x930E}, -{0x2c46, 0x24E6}, -{0x2c48, 0x421F}, -{0x2c4a, 0x7316}, -{0x2c4c, 0xC312}, -{0x2c4e, 0x100F}, -{0x2c50, 0x832F}, -{0x2c52, 0x4F82}, -{0x2c54, 0x7522}, -{0x2c56, 0x53B2}, -{0x2c58, 0x7524}, -{0x2c5a, 0x3CDC}, -{0x2c5c, 0x431F}, -{0x2c5e, 0x4D0E}, -{0x2c60, 0x533E}, -{0x2c62, 0x930E}, -{0x2c64, 0x2403}, -{0x2c66, 0x5F0F}, -{0x2c68, 0x831E}, -{0x2c6a, 0x23FD}, -{0x2c6c, 0x4FC2}, -{0x2c6e, 0x0A98}, -{0x2c70, 0x3FAA}, -{0x2c72, 0x4292}, -{0x2c74, 0x0A86}, -{0x2c76, 0x0782}, -{0x2c78, 0x421F}, -{0x2c7a, 0x0A88}, -{0x2c7c, 0x490E}, -{0x2c7e, 0x930E}, -{0x2c80, 0x2404}, -{0x2c82, 0xC312}, -{0x2c84, 0x100F}, -{0x2c86, 0x831E}, -{0x2c88, 0x23FC}, -{0x2c8a, 0x4F82}, -{0x2c8c, 0x0784}, -{0x2c8e, 0x3F6B}, -{0x2c90, 0x90F2}, -{0x2c92, 0x0010}, -{0x2c94, 0x00BA}, -{0x2c96, 0x2809}, -{0x2c98, 0x90F2}, -{0x2c9a, 0x0031}, -{0x2c9c, 0x00BA}, -{0x2c9e, 0x2C05}, -{0x2ca0, 0x403C}, -{0x2ca2, 0x0E05}, -{0x2ca4, 0x403D}, -{0x2ca6, 0x003C}, -{0x2ca8, 0x3EE3}, -{0x2caa, 0x90F2}, -{0x2cac, 0x0031}, -{0x2cae, 0x00BA}, -{0x2cb0, 0x280D}, -{0x2cb2, 0x90F2}, -{0x2cb4, 0x0039}, -{0x2cb6, 0x00BA}, -{0x2cb8, 0x2C09}, -{0x2cba, 0x403C}, -{0x2cbc, 0x0E09}, -{0x2cbe, 0x403D}, -{0x2cc0, 0x003C}, -{0x2cc2, 0x425E}, -{0x2cc4, 0x00BA}, -{0x2cc6, 0x507E}, -{0x2cc8, 0x0003}, -{0x2cca, 0x3ED4}, -{0x2ccc, 0x90F2}, -{0x2cce, 0x0039}, -{0x2cd0, 0x00BA}, -{0x2cd2, 0x280D}, -{0x2cd4, 0x90F2}, -{0x2cd6, 0x0041}, -{0x2cd8, 0x00BA}, -{0x2cda, 0x2C09}, -{0x2cdc, 0x403C}, -{0x2cde, 0x0C0B}, -{0x2ce0, 0x403D}, -{0x2ce2, 0x003C}, -{0x2ce4, 0x425E}, -{0x2ce6, 0x00BA}, -{0x2ce8, 0x507E}, -{0x2cea, 0x0005}, -{0x2cec, 0x3EC3}, -{0x2cee, 0x90F2}, -{0x2cf0, 0x0041}, -{0x2cf2, 0x00BA}, -{0x2cf4, 0x280D}, -{0x2cf6, 0x90F2}, -{0x2cf8, 0x0051}, -{0x2cfa, 0x00BA}, -{0x2cfc, 0x2C09}, -{0x2cfe, 0x403C}, -{0x2d00, 0x0A0F}, -{0x2d02, 0x403D}, -{0x2d04, 0x003C}, -{0x2d06, 0x425E}, -{0x2d08, 0x00BA}, -{0x2d0a, 0x507E}, -{0x2d0c, 0x0009}, -{0x2d0e, 0x3EB2}, -{0x2d10, 0x90F2}, -{0x2d12, 0x0051}, -{0x2d14, 0x00BA}, -{0x2d16, 0x280D}, -{0x2d18, 0x90F2}, -{0x2d1a, 0x0061}, -{0x2d1c, 0x00BA}, -{0x2d1e, 0x2C09}, -{0x2d20, 0x403C}, -{0x2d22, 0x0A11}, -{0x2d24, 0x403D}, -{0x2d26, 0x003C}, -{0x2d28, 0x425E}, -{0x2d2a, 0x00BA}, -{0x2d2c, 0x507E}, -{0x2d2e, 0x000B}, -{0x2d30, 0x3EA1}, -{0x2d32, 0x90F2}, -{0x2d34, 0x0061}, -{0x2d36, 0x00BA}, -{0x2d38, 0x2807}, -{0x2d3a, 0x90F2}, -{0x2d3c, 0x0075}, -{0x2d3e, 0x00BA}, -{0x2d40, 0x2C03}, -{0x2d42, 0x403C}, -{0x2d44, 0x0813}, -{0x2d46, 0x3FF0}, -{0x2d48, 0x90F2}, -{0x2d4a, 0x0075}, -{0x2d4c, 0x00BA}, -{0x2d4e, 0x280B}, -{0x2d50, 0x90F2}, -{0x2d52, 0xFF91}, -{0x2d54, 0x00BA}, -{0x2d56, 0x2C07}, -{0x2d58, 0x403C}, -{0x2d5a, 0x0813}, -{0x2d5c, 0x425E}, -{0x2d5e, 0x00BA}, -{0x2d60, 0x507E}, -{0x2d62, 0x000C}, -{0x2d64, 0x3E87}, -{0x2d66, 0x90F2}, -{0x2d68, 0xFF91}, -{0x2d6a, 0x00BA}, -{0x2d6c, 0x280B}, -{0x2d6e, 0x90F2}, -{0x2d70, 0xFFB1}, -{0x2d72, 0x00BA}, -{0x2d74, 0x2C07}, -{0x2d76, 0x403D}, -{0x2d78, 0x0060}, -{0x2d7a, 0x425E}, -{0x2d7c, 0x00BA}, -{0x2d7e, 0x507E}, -{0x2d80, 0x000D}, -{0x2d82, 0x3E78}, -{0x2d84, 0x90F2}, -{0x2d86, 0xFFB1}, -{0x2d88, 0x00BA}, -{0x2d8a, 0x280B}, -{0x2d8c, 0x90F2}, -{0x2d8e, 0xFFD1}, -{0x2d90, 0x00BA}, -{0x2d92, 0x2C07}, -{0x2d94, 0x403D}, -{0x2d96, 0x0050}, -{0x2d98, 0x425E}, -{0x2d9a, 0x00BA}, -{0x2d9c, 0x507E}, -{0x2d9e, 0x000E}, -{0x2da0, 0x3E69}, -{0x2da2, 0x403D}, -{0x2da4, 0x003C}, -{0x2da6, 0x403F}, -{0x2da8, 0x00BA}, -{0x2daa, 0x4F6E}, -{0x2dac, 0x507E}, -{0x2dae, 0x000F}, -{0x2db0, 0x90FF}, -{0x2db2, 0xFFF1}, -{0x2db4, 0x0000}, -{0x2db6, 0x2A5E}, -{0x2db8, 0x437E}, -{0x2dba, 0x3E5C}, -{0x2dbc, 0x425F}, -{0x2dbe, 0x00BA}, -{0x2dc0, 0x4F4C}, -{0x2dc2, 0x407A}, -{0x2dc4, 0x001C}, -{0x2dc6, 0x12B0}, -{0x2dc8, 0xFE8E}, -{0x2dca, 0x4E4F}, -{0x2dcc, 0xC312}, -{0x2dce, 0x104F}, -{0x2dd0, 0x114F}, -{0x2dd2, 0xF37F}, -{0x2dd4, 0x5F0F}, -{0x2dd6, 0x5F0F}, -{0x2dd8, 0x5F0F}, -{0x2dda, 0x5F0F}, -{0x2ddc, 0x403E}, -{0x2dde, 0x00F0}, -{0x2de0, 0x8F0E}, -{0x2de2, 0x3E30}, -{0x2de4, 0x421F}, -{0x2de6, 0x80BE}, -{0x2de8, 0x903F}, -{0x2dea, 0x0009}, -{0x2dec, 0x2C05}, -{0x2dee, 0x531F}, -{0x2df0, 0x4F82}, -{0x2df2, 0x80BE}, -{0x2df4, 0x4030}, -{0x2df6, 0xF9F4}, -{0x2df8, 0x421F}, -{0x2dfa, 0x80B6}, -{0x2dfc, 0x903F}, -{0x2dfe, 0x0098}, -{0x2e00, 0x2C05}, -{0x2e02, 0x531F}, -{0x2e04, 0x4F82}, -{0x2e06, 0x80B6}, -{0x2e08, 0x4030}, -{0x2e0a, 0xF9F4}, -{0x2e0c, 0x4382}, -{0x2e0e, 0x80B6}, -{0x2e10, 0x4030}, -{0x2e12, 0xF9F4}, -{0x2e14, 0x4E82}, -{0x2e16, 0x8098}, -{0x2e18, 0xD392}, -{0x2e1a, 0x7102}, -{0x2e1c, 0x4138}, -{0x2e1e, 0x4139}, -{0x2e20, 0x413A}, -{0x2e22, 0x413B}, -{0x2e24, 0x4130}, -{0x2e26, 0x0260}, -{0x2e28, 0x0000}, -{0x2e2a, 0x0C18}, -{0x2e2c, 0x0240}, -{0x2e2e, 0x0000}, -{0x2e30, 0x0260}, -{0x2e32, 0x0000}, -{0x2e34, 0x0C05}, -{0x2e36, 0x4130}, -{0x2e38, 0x4382}, -{0x2e3a, 0x7602}, -{0x2e3c, 0x4F82}, -{0x2e3e, 0x7600}, -{0x2e40, 0x0270}, -{0x2e42, 0x0000}, -{0x2e44, 0x0C07}, -{0x2e46, 0x0270}, -{0x2e48, 0x0001}, -{0x2e4a, 0x421F}, -{0x2e4c, 0x7606}, -{0x2e4e, 0x4FC2}, -{0x2e50, 0x0188}, -{0x2e52, 0x4130}, -{0x2e54, 0xDF02}, -{0x2e56, 0x3FFE}, -{0x2e58, 0x430E}, -{0x2e5a, 0x930A}, -{0x2e5c, 0x2407}, -{0x2e5e, 0xC312}, -{0x2e60, 0x100C}, -{0x2e62, 0x2801}, -{0x2e64, 0x5A0E}, -{0x2e66, 0x5A0A}, -{0x2e68, 0x930C}, -{0x2e6a, 0x23F7}, -{0x2e6c, 0x4130}, -{0x2e6e, 0x430E}, -{0x2e70, 0x430F}, -{0x2e72, 0x3C08}, -{0x2e74, 0xC312}, -{0x2e76, 0x100D}, -{0x2e78, 0x100C}, -{0x2e7a, 0x2802}, -{0x2e7c, 0x5A0E}, -{0x2e7e, 0x6B0F}, -{0x2e80, 0x5A0A}, -{0x2e82, 0x6B0B}, -{0x2e84, 0x930C}, -{0x2e86, 0x23F6}, -{0x2e88, 0x930D}, -{0x2e8a, 0x23F4}, -{0x2e8c, 0x4130}, -{0x2e8e, 0xEE4E}, -{0x2e90, 0x407B}, -{0x2e92, 0x0009}, -{0x2e94, 0x3C05}, -{0x2e96, 0x100D}, -{0x2e98, 0x6E4E}, -{0x2e9a, 0x9A4E}, -{0x2e9c, 0x2801}, -{0x2e9e, 0x8A4E}, -{0x2ea0, 0x6C4C}, -{0x2ea2, 0x6D0D}, -{0x2ea4, 0x835B}, -{0x2ea6, 0x23F7}, -{0x2ea8, 0x4130}, -{0x2eaa, 0xEF0F}, -{0x2eac, 0xEE0E}, -{0x2eae, 0x4039}, -{0x2eb0, 0x0021}, -{0x2eb2, 0x3C0A}, -{0x2eb4, 0x1008}, -{0x2eb6, 0x6E0E}, -{0x2eb8, 0x6F0F}, -{0x2eba, 0x9B0F}, -{0x2ebc, 0x2805}, -{0x2ebe, 0x2002}, -{0x2ec0, 0x9A0E}, -{0x2ec2, 0x2802}, -{0x2ec4, 0x8A0E}, -{0x2ec6, 0x7B0F}, -{0x2ec8, 0x6C0C}, -{0x2eca, 0x6D0D}, -{0x2ecc, 0x6808}, -{0x2ece, 0x8319}, -{0x2ed0, 0x23F1}, -{0x2ed2, 0x4130}, -{0x2ed4, 0x0000}, -{0x2ffe, 0xf000}, -{0x3000, 0x00AE}, -{0x3002, 0x00AE}, -{0x3004, 0x00AE}, -{0x3006, 0x00AE}, -{0x3008, 0x00AE}, -{0x4000, 0x0400}, -{0x4002, 0x0400}, -{0x4004, 0x0C04}, -{0x4006, 0x0C04}, -{0x4008, 0x0C04}, - -//--- FW End ---// - - -//--- Initial Set file ---// -{0x0B02, 0x0014}, -{0x0B04, 0x07C8}, -{0x0B06, 0x5ED7}, -{0x0B14, 0x430F}, //PLL Main Div[15:8]. Mclk 26.022Mhz / 0x430F = Pclk(87.174Mhz) -{0x0B16, 0x4A0B}, -{0x0B18, 0x0000}, -{0x0B1A, 0x1044}, - -{0x004C, 0x0100}, //tg_enable. -{0x000C, 0x0000}, -{0x0036, 0x0048}, //ramp_rst_offset -{0x0038, 0x4800}, //ramp_sig_poffset -{0x0138, 0x0104}, //pxl_drv_pwr -{0x013A, 0x0100}, //tx_idle -{0x0C00, 0x3BC7}, //BLC_ctl1. Line BLC on = 0x3b, off = 0x2A //LBLC_ctl1. [0]en_blc, [1]en_lblc_dpc, [2]en_channel_blc, [3]en_adj_pxl_dpc, [4]en_adp_dead_pxl_th -{0x0C0E, 0x0500}, //0x07 BLC display On, 0x05 BLC D off //BLC_ctl3. Frame BLC On = 0x05, off=0x04 //FBLC_ctl3. [0]en_fblc, [1]en_blc_bypass, [2]en_fblc_dpc, [5]en_fobp_dig_offset, [7]en_lobp_dpc_bypass -{0x0C10, 0x0510}, //dig_blc_offset_h -{0x0C16, 0x0000}, //fobp_dig_b_offset. red b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C18, 0x0000}, //fobp_dig_Gb_offset. Gr b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C36, 0x0100}, //r_g_sum_ctl. [0]:g_sum_en. '1'enable, '0'disable. - -//--- MIPI blank time --------------// -{0x0902, 0x4101}, //mipi_value_clk_trail. MIPI CLK mode [1]'1'cont(0x43),'0'non-cont(0x41) [6]'1'2lane(0x41), '0'1lane(0x01) -{0x090A, 0x03E4}, //mipi_vblank_delay_h. -{0x090C, 0x0020}, //mipi_hblank_short_delay_h. -{0x090E, 0x0020}, //mipi_hblank_long_delay_h. -{0x0910, 0x5D07}, //05 mipi_LPX -{0x0912, 0x061e}, //05 mipi_CLK_prepare -{0x0914, 0x0407}, //02 mipi_clk_pre -{0x0916, 0x0d0a}, //09 mipi_data_zero -{0x0918, 0x0e09}, //0c mipi_clk_post - -//--- Pixel Array Addressing ------// -{0x000E, 0x0000}, -{0x0014, 0x003F}, -{0x0010, 0x0050}, -{0x0016, 0x008F}, -{0x0012, 0x00AA}, -{0x0018, 0x0ACD}, -{0x0020, 0x0700}, -{0x0022, 0x0004}, -{0x0028, 0x000B}, -{0x0024, 0xFFFA}, -{0x002A, 0xFFFF}, -{0x0026, 0x0016}, -{0x002C, 0x07b1}, -{0x0034, 0x0700}, - -{0x0128, 0x0002}, // digital_crop_x_offset_l -{0x012A, 0x0000}, // digital_crop_y_offset_l -{0x012C, 0x0A20}, //2C}, //2592 digital_crop_image_width -{0x012E, 0x0798}, //A4}, //1944 digital_crop_image_height - -//----< Image FMT Size >--------------------// -//Image size 2592x1944 -{0x0110, 0x0A20}, //X_output_size_h -{0x0112, 0x0798}, //Y_output_size_h - -//----< Frame / Line Length >--------------// -{0x0006, 0x07c0}, //frame_length_h 1984 -{0x0008, 0x0B40}, //line_length_h 2880 -{0x000A, 0x0DB0}, -//---------------------------------------// -//--- ETC set ----// -{0x003C, 0x0000}, //fixed frame off. b[0] '1'enable, '0'disable -{0x0500, 0x0000}, //DGA_ctl. b[1]'0'OTP_color_ratio_disable, '1' OTP_color_ratio_enable, b[2]'0'data_pedestal_en, '1'data_pedestal_dis. -{0x0700, 0x0590}, //Scaler Normal -{0x001E, 0x0101}, -{0x0032, 0x0101}, -{0x0A02, 0x0100}, // Fast sleep Enable -{0x0C12, 0x0100}, // BLC Offset -{0x0116, 0x0024}, // FBLC Ratio -//----------------// - -//--- AG / DG control ----------------// -//AG -{0x003A, 0x0000}, //Analog Gain. 0x00=x1, 0x70=x8, 0xf0=x16. - -//DG -{0x0508, 0x0100}, //DG_Gr_h. 0x01=x1, 0x07=x8. -{0x050a, 0x0100}, //DG_Gb_h. 0x01=x1, 0x07=x8. -{0x050c, 0x0100}, //DG_R_h. 0x01=x1, 0x07=x8. -{0x050e, 0x0100}, //DG_B_h. 0x01=x1, 0x07=x8. -//----------------------------------// - -//-----< Exp.Time >------------------------// -// Pclk_88Mhz @ Line_length_pclk : 2880 @Exp.Time 33.33ms -{0x0002, 0x0539}, //Fine_int : 33.33ms@Pclk88mhz@Line_length2880 -{0x0004, 0x07E0}, //coarse_int : 33.33ms@Pclk88mhz@Line_length2880 - -//--- ISP enable Selection ---------------// -{0x0A04, 0x011A}, //isp_en. [9]s-gamma,[8]MIPI_en,[6]compresion10to8,[5]Scaler,[4]window,[3]DG,[2]LSC,[1]adpc,[0]tpg -//----------------------------------------// - -{0x0118, 0x0100}, //sleep Off -}; - -struct msm_camera_i2c_reg_setting sr544_init = { - sr544_init_reg, sizeof(sr544_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0118, 0x00, NULL, 100}, //sleep On - {0x0F02, 0x00, NULL, 0}, - {0x011A, 0x01, NULL, 0}, - {0x011B, 0x09, NULL, 0}, - {0x0D04, 0x01, NULL, 0}, - {0x0D00, 0x07, NULL, 0}, - {0x004C, 0x01, NULL, 0}, - {0x003E, 0x01, NULL, 0}, - {0x0118, 0x01, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/Makefile deleted file mode 100644 index 2898e3f1448f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_led_flash.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_i2c_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += adp1660.o -obj-$(CONFIG_MSMB_CAMERA) += bd7710.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_torch.o -obj-$(CONFIG_MSMB_CAMERA) += lm3642.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/adp1660.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/adp1660.c deleted file mode 100644 index f57843c6ff2a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/adp1660.c +++ /dev/null @@ -1,212 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "qcom,led-flash" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver adp1660_i2c_driver; - -static struct msm_camera_i2c_reg_array adp1660_init_array[] = { - {0x01, 0x03}, - {0x02, 0x0F}, - {0x09, 0x28}, -}; - -static struct msm_camera_i2c_reg_array adp1660_off_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_release_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_low_array[] = { - {0x08, 0x04}, - {0x06, 0x1E}, - {0x01, 0xBD}, - {0x0f, 0x01}, -}; - -static struct msm_camera_i2c_reg_array adp1660_high_array[] = { - {0x02, 0x4F}, - {0x06, 0x3C}, - {0x09, 0x3C}, - {0x0f, 0x03}, - {0x01, 0xBB}, -}; - -static void __exit msm_flash_adp1660_i2c_remove(void) -{ - i2c_del_driver(&adp1660_i2c_driver); - return; -} - -static const struct of_device_id adp1660_trigger_dt_match[] = { - {.compatible = "qcom,led-flash", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, adp1660_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"qcom,led-flash", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id adp1660_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_adp1660_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_adp1660_i2c_probe: id is NULL"); - id = adp1660_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver adp1660_i2c_driver = { - .id_table = adp1660_i2c_id, - .probe = msm_flash_adp1660_i2c_probe, - .remove = __exit_p(msm_flash_adp1660_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int msm_flash_adp1660_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - match = of_match_device(adp1660_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver adp1660_platform_driver = { - .probe = msm_flash_adp1660_platform_probe, - .driver = { - .name = "qcom,led-flash", - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int __init msm_flash_adp1660_init_module(void) -{ - int32_t rc = 0; - rc = platform_driver_register(&adp1660_platform_driver); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&adp1660_i2c_driver); -} - -static void __exit msm_flash_adp1660_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&adp1660_platform_driver); - else - i2c_del_driver(&adp1660_i2c_driver); -} - -static struct msm_camera_i2c_client adp1660_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting adp1660_init_setting = { - .reg_setting = adp1660_init_array, - .size = ARRAY_SIZE(adp1660_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_off_setting = { - .reg_setting = adp1660_off_array, - .size = ARRAY_SIZE(adp1660_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_release_setting = { - .reg_setting = adp1660_release_array, - .size = ARRAY_SIZE(adp1660_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_low_setting = { - .reg_setting = adp1660_low_array, - .size = ARRAY_SIZE(adp1660_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_high_setting = { - .reg_setting = adp1660_high_array, - .size = ARRAY_SIZE(adp1660_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t adp1660_regs = { - .init_setting = &adp1660_init_setting, - .off_setting = &adp1660_off_setting, - .low_setting = &adp1660_low_setting, - .high_setting = &adp1660_high_setting, - .release_setting = &adp1660_release_setting, -}; - -static struct msm_flash_fn_t adp1660_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &adp1660_i2c_client, - .reg_setting = &adp1660_regs, - .func_tbl = &adp1660_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_adp1660_init_module); -module_exit(msm_flash_adp1660_exit_module); -MODULE_DESCRIPTION("adp1660 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/bd7710.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/bd7710.c deleted file mode 100644 index 4e18537f9bf7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/bd7710.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "rohm-flash,bd7710" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver bd7710_i2c_driver; - -static struct msm_camera_i2c_reg_array bd7710_init_array[] = { - {0x00, 0x10}, -}; - -static struct msm_camera_i2c_reg_array bd7710_off_array[] = { - {0x05, 0x00}, - {0x02, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_release_array[] = { - {0x00, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_low_array[] = { - {0x05, 0x25}, - {0x00, 0x38}, - {0x02, 0x40}, -}; - -static struct msm_camera_i2c_reg_array bd7710_high_array[] = { - {0x05, 0x25}, - {0x02, 0xBF}, -}; - -static void __exit msm_flash_bd7710_i2c_remove(void) -{ - i2c_del_driver(&bd7710_i2c_driver); - return; -} - -static const struct of_device_id bd7710_trigger_dt_match[] = { - {.compatible = "rohm-flash,bd7710", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, bd7710_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"rohm-flash,bd7710", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id bd7710_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_bd7710_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_bd7710_i2c_probe: id is NULL"); - id = bd7710_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver bd7710_i2c_driver = { - .id_table = bd7710_i2c_id, - .probe = msm_flash_bd7710_i2c_probe, - .remove = __exit_p(msm_flash_bd7710_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int msm_flash_bd7710_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - - match = of_match_device(bd7710_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver bd7710_platform_driver = { - .probe = msm_flash_bd7710_platform_probe, - .driver = { - .name = "rohm-flash,bd7710", - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int __init msm_flash_bd7710_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_register(&bd7710_platform_driver); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&bd7710_i2c_driver); -} - -static void __exit msm_flash_bd7710_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&bd7710_platform_driver); - else - i2c_del_driver(&bd7710_i2c_driver); -} - -static struct msm_camera_i2c_client bd7710_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting bd7710_init_setting = { - .reg_setting = bd7710_init_array, - .size = ARRAY_SIZE(bd7710_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_off_setting = { - .reg_setting = bd7710_off_array, - .size = ARRAY_SIZE(bd7710_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_release_setting = { - .reg_setting = bd7710_release_array, - .size = ARRAY_SIZE(bd7710_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_low_setting = { - .reg_setting = bd7710_low_array, - .size = ARRAY_SIZE(bd7710_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_high_setting = { - .reg_setting = bd7710_high_array, - .size = ARRAY_SIZE(bd7710_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t bd7710_regs = { - .init_setting = &bd7710_init_setting, - .off_setting = &bd7710_off_setting, - .low_setting = &bd7710_low_setting, - .high_setting = &bd7710_high_setting, - .release_setting = &bd7710_release_setting, -}; - -static struct msm_flash_fn_t bd7710_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &bd7710_i2c_client, - .reg_setting = &bd7710_regs, - .func_tbl = &bd7710_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_bd7710_init_module); -module_exit(msm_flash_bd7710_exit_module); -MODULE_DESCRIPTION("bd7710 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/lm3642.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/lm3642.c deleted file mode 100644 index 9a3237050fec..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/lm3642.c +++ /dev/null @@ -1,399 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include "msm_camera_io_util.h" -#include "msm_led_flash.h" - -#define FLASH_NAME "ti,lm3642" - -#define CONFIG_LM3642_DEBUG -#ifdef CONFIG_LM3642_DEBUG -#define LM3642_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define LM3642_DBG(fmt, args...) -#endif - - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver lm3642_i2c_driver; - -static struct msm_camera_i2c_reg_array lm3642_init_array[] = { - {0x0A, 0x00}, - {0x08, 0x07}, - {0x09, 0x19}, -}; - -static struct msm_camera_i2c_reg_array lm3642_off_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_release_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_low_array[] = { - {0x0A, 0x22}, -}; - -static struct msm_camera_i2c_reg_array lm3642_high_array[] = { - {0x0A, 0x23}, -}; - - -static const struct of_device_id lm3642_i2c_trigger_dt_match[] = { - {.compatible = "ti,lm3642"}, - {} -}; - -MODULE_DEVICE_TABLE(of, lm3642_i2c_trigger_dt_match); -static const struct i2c_device_id lm3642_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (value > LED_OFF) { - if(fctrl.func_tbl->flash_led_low) - fctrl.func_tbl->flash_led_low(&fctrl); - } else { - if(fctrl.func_tbl->flash_led_off) - fctrl.func_tbl->flash_led_off(&fctrl); - } -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -static int32_t msm_lm3642_torch_create_classdev(struct device *dev , - void *data) -{ - int rc; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - rc = led_classdev_register(dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; - -int msm_flash_lm3642_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return rc; -} - -int msm_flash_lm3642_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->release_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return 0; -} - -int msm_flash_lm3642_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_lm3642_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_lm3642_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} -static int msm_flash_lm3642_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - if (!id) { - pr_err("msm_flash_lm3642_i2c_probe: id is NULL"); - id = lm3642_i2c_id; - } - rc = msm_flash_i2c_probe(client, id); - - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - pr_err("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - - if (!rc) - msm_lm3642_torch_create_classdev(&(client->dev),NULL); - return rc; -} - -static int msm_flash_lm3642_i2c_remove(struct i2c_client *client) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - return rc; -} - - -static struct i2c_driver lm3642_i2c_driver = { - .id_table = lm3642_i2c_id, - .probe = msm_flash_lm3642_i2c_probe, - .remove = msm_flash_lm3642_i2c_remove, - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = lm3642_i2c_trigger_dt_match, - }, -}; - -static int __init msm_flash_lm3642_init(void) -{ - LM3642_DBG("%s entry\n", __func__); - return i2c_add_driver(&lm3642_i2c_driver); -} - -static void __exit msm_flash_lm3642_exit(void) -{ - LM3642_DBG("%s entry\n", __func__); - i2c_del_driver(&lm3642_i2c_driver); - return; -} - - -static struct msm_camera_i2c_client lm3642_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting lm3642_init_setting = { - .reg_setting = lm3642_init_array, - .size = ARRAY_SIZE(lm3642_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_off_setting = { - .reg_setting = lm3642_off_array, - .size = ARRAY_SIZE(lm3642_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_release_setting = { - .reg_setting = lm3642_release_array, - .size = ARRAY_SIZE(lm3642_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_low_setting = { - .reg_setting = lm3642_low_array, - .size = ARRAY_SIZE(lm3642_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_high_setting = { - .reg_setting = lm3642_high_array, - .size = ARRAY_SIZE(lm3642_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t lm3642_regs = { - .init_setting = &lm3642_init_setting, - .off_setting = &lm3642_off_setting, - .low_setting = &lm3642_low_setting, - .high_setting = &lm3642_high_setting, - .release_setting = &lm3642_release_setting, -}; - -static struct msm_flash_fn_t lm3642_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_lm3642_led_init, - .flash_led_release = msm_flash_lm3642_led_release, - .flash_led_off = msm_flash_lm3642_led_off, - .flash_led_low = msm_flash_lm3642_led_low, - .flash_led_high = msm_flash_lm3642_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &lm3642_i2c_client, - .reg_setting = &lm3642_regs, - .func_tbl = &lm3642_func_tbl, -}; - -module_init(msm_flash_lm3642_init); -module_exit(msm_flash_lm3642_exit); -MODULE_DESCRIPTION("lm3642 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.c deleted file mode 100644 index 86058a9ca7b8..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.c +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include "msm_led_flash.h" -#include - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static long msm_led_flash_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_led_flash_ctrl_t *fctrl = NULL; - void __user *argp = (void __user *)arg; - if (!sd) { - pr_err("sd NULL\n"); - return -EINVAL; - } - fctrl = v4l2_get_subdevdata(sd); - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return fctrl->func_tbl->flash_get_subdev_id(fctrl, argp); - case VIDIOC_MSM_FLASH_LED_DATA_CFG: - return fctrl->func_tbl->flash_led_config(fctrl, argp); - case MSM_SD_SHUTDOWN: - *(int *)argp = MSM_CAMERA_LED_RELEASE; - return fctrl->func_tbl->flash_led_config(fctrl, argp); - default: - pr_err_ratelimited("invalid cmd %d\n", cmd); - return -ENOIOCTLCMD; - } -} - -static struct v4l2_subdev_core_ops msm_flash_subdev_core_ops = { - .ioctl = msm_led_flash_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_flash_subdev_ops = { - .core = &msm_flash_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_flash_internal_ops; - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->pdev = pdev; - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - fctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashen-gpio", 0); -#else - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led1-gpio", 0); -#endif - if (fctrl->led_irq_gpio1 < 0) { - pr_err("Fail : can't get led1-gpio\n"); - return -EINVAL; - } -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashtorch-gpio", 0); -#else - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led2-gpio", 0); -#endif - if (fctrl->led_irq_gpio2 < 0) { - pr_err("Fail : can't get led2-gpio\n"); - return -EINVAL; - } - - msm_sd_register(&fctrl->msm_sd); - - CDBG("probe success\n"); - return 0; -} - -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - msm_sd_register(&fctrl->msm_sd); - - CDBG("probe success\n"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.h b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.h deleted file mode 100644 index ad6aba89c7ee..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_flash.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef MSM_LED_FLASH_H -#define MSM_LED_FLASH_H - -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_sd.h" - - -struct msm_led_flash_ctrl_t; - -struct msm_flash_fn_t { - int32_t (*flash_get_subdev_id)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_config)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_init)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_release)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_off)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_low)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_high)(struct msm_led_flash_ctrl_t *); -}; - -struct msm_led_flash_reg_t { - struct msm_camera_i2c_reg_setting *init_setting; - struct msm_camera_i2c_reg_setting *off_setting; - struct msm_camera_i2c_reg_setting *release_setting; - struct msm_camera_i2c_reg_setting *low_setting; - struct msm_camera_i2c_reg_setting *high_setting; -}; - -struct msm_led_flash_ctrl_t { - struct msm_camera_i2c_client *flash_i2c_client; - struct msm_sd_subdev msm_sd; - struct platform_device *pdev; - struct msm_flash_fn_t *func_tbl; - struct msm_camera_sensor_board_info *flashdata; - struct msm_led_flash_reg_t *reg_setting; - const char *flash_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; - uint32_t flash_num_sources; - uint32_t flash_op_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_current[MAX_LED_TRIGGERS]; - const char *torch_trigger_name; - struct led_trigger *torch_trigger; - uint32_t torch_op_current; - uint32_t torch_max_current; - void *data; - uint32_t num_sources; - enum msm_camera_device_type_t flash_device_type; - enum cci_i2c_master_t cci_i2c_master; - enum msm_camera_led_config_t led_state; - uint32_t subdev_id; - struct msm_pinctrl_info pinctrl_info; - int led_irq_gpio1; - int led_irq_gpio2; -}; - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id); - -int msm_flash_probe(struct platform_device *pdev, const void *data); - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, - void *data); -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data); - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg); - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data); - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_i2c_trigger.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_i2c_trigger.c deleted file mode 100644 index f374ce639341..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_i2c_trigger.c +++ /dev/null @@ -1,746 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#include "msm_led_flash.h" -#include "msm_camera_io_util.h" -#include "../msm_sensor.h" -#include "msm_led_flash.h" -#include "../cci/msm_cci.h" -#include - -#define FLASH_NAME "camera-led-flash" -#define CAM_FLASH_PINCTRL_STATE_SLEEP "cam_flash_suspend" -#define CAM_FLASH_PINCTRL_STATE_DEFAULT "cam_flash_default" -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - *subdev_id = fctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - return 0; -} - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl->func_tbl) { - pr_err("failed\n"); - return -EINVAL; - } - switch (cfg->cfgtype) { - - case MSM_CAMERA_LED_INIT: - if (fctrl->func_tbl->flash_led_init) - rc = fctrl->func_tbl->flash_led_init(fctrl); - break; - - case MSM_CAMERA_LED_RELEASE: - if (fctrl->func_tbl->flash_led_release) - rc = fctrl->func_tbl-> - flash_led_release(fctrl); - break; - - case MSM_CAMERA_LED_OFF: - if (fctrl->func_tbl->flash_led_off) - rc = fctrl->func_tbl->flash_led_off(fctrl); - break; - - case MSM_CAMERA_LED_LOW: - if (fctrl->func_tbl->flash_led_low) - rc = fctrl->func_tbl->flash_led_low(fctrl); - break; - - case MSM_CAMERA_LED_HIGH: - if (fctrl->func_tbl->flash_led_high) - rc = fctrl->func_tbl->flash_led_high(fctrl); - break; - default: - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -static int msm_flash_pinctrl_init(struct msm_led_flash_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *flash_pctrl = NULL; - flash_pctrl = &ctrl->pinctrl_info; - if (flash_pctrl->use_pinctrl != true) { - pr_err("%s: %d PINCTRL is not enables in Flash driver node\n", - __func__, __LINE__); - return 0; - } - flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl->pdev->dev); - - if (IS_ERR_OR_NULL(flash_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_active = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_DEFAULT); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_suspend = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_SLEEP); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - if (power_info->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - power_info->gpio_conf->cam_gpiomux_conf_tbl, - power_info->gpio_conf->cam_gpiomux_conf_tbl_size); - } - - /* CCI Init */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("cci_init failed\n"); - return rc; - } - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl->pinctrl_info.use_pinctrl == true) { - CDBG("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - msleep(20); - - CDBG("before FL_RESET\n"); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - fctrl->led_state = MSM_CAMERA_LED_INIT; - return rc; -} - -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0, ret = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - - if (fctrl->led_state != MSM_CAMERA_LED_INIT) { - pr_err("%s:%d invalid led state\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_LOW); - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_LOW); - - if (fctrl->pinctrl_info.use_pinctrl == true) { - ret = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - /* CCI deInit */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_deinit failed\n"); - } - - return 0; -} - -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -static int32_t msm_led_get_dt_data(struct device_node *of_node, - struct msm_led_flash_ctrl_t *fctrl) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct device_node *flash_src_node = NULL; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - uint32_t count = 0; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl->flashdata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!fctrl->flashdata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - rc = of_property_read_u32(of_node, "cell-index", &fctrl->subdev_id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - - CDBG("subdev id %d\n", fctrl->subdev_id); - - rc = of_property_read_string(of_node, "label", - &flashdata->sensor_name); - CDBG("%s label %s, rc %d\n", __func__, - flashdata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &fctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, fctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - fctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - fctrl->pinctrl_info.use_pinctrl = false; - fctrl->pinctrl_info.use_pinctrl = of_property_read_bool(of_node, - "qcom,enable_pinctrl"); - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("failed\n"); - return -EINVAL; - } - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl->flash_trigger_name[i]); - - rc = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl->flash_op_current[i]); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - of_node_put(flash_src_node); - continue; - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->flash_op_current[i]); - - led_trigger_register_simple( - fctrl->flash_trigger_name[i], - &fctrl->flash_trigger[i]); - } - - } else { /*Handle LED Flash Ctrl by GPIO*/ - power_info->gpio_conf = - kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - gconf = power_info->gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR4; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR5; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR6; - } - } - - flashdata->slave_info = - kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!flashdata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR8; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR9; - } - fctrl->flashdata->slave_info->sensor_slave_addr = id_info[0]; - fctrl->flashdata->slave_info->sensor_id_reg_addr = id_info[1]; - fctrl->flashdata->slave_info->sensor_id = id_info[2]; - - kfree(gpio_array); - return rc; -ERROR9: - kfree(fctrl->flashdata->slave_info); -ERROR8: - kfree(fctrl->flashdata->power_info.gpio_conf->gpio_num_info); -ERROR6: - kfree(gconf->cam_gpio_set_tbl); -ERROR5: - kfree(gconf->cam_gpio_req_tbl); -ERROR4: - kfree(gconf); -ERROR1: - kfree(fctrl->flashdata); - kfree(gpio_array); - } - return rc; -} - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -#ifdef CONFIG_DEBUG_FS -static int set_led_status(void *data, u64 val) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - int rc = -1; - pr_debug("set_led_status: Enter val: %llu", val); - if (!fctrl) { - pr_err("set_led_status: fctrl is NULL"); - return rc; - } - if (!fctrl->func_tbl) { - pr_err("set_led_status: fctrl->func_tbl is NULL"); - return rc; - } - if (val == 0) { - pr_debug("set_led_status: val is disable"); - rc = msm_flash_led_off(fctrl); - } else { - pr_debug("set_led_status: val is enable"); - rc = msm_flash_led_low(fctrl); - } - - return rc; -} - -DEFINE_SIMPLE_ATTRIBUTE(ledflashdbg_fops, - NULL, set_led_status, "%llu\n"); -#endif - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = NULL; -#ifdef CONFIG_DEBUG_FS - struct dentry *dentry; -#endif - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - goto probe_failure; - } - - fctrl = (struct msm_led_flash_ctrl_t *)(id->driver_data); - if (fctrl->flash_i2c_client) - fctrl->flash_i2c_client->client = client; - /* Set device type as I2C */ - fctrl->flash_device_type = MSM_CAMERA_I2C_DEVICE; - - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", id->name); - - rc = msm_led_get_dt_data(client->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - - msm_flash_pinctrl_init(fctrl); - if (fctrl->flash_i2c_client != NULL) { - fctrl->flash_i2c_client->client = client; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - fctrl->flash_i2c_client->client->addr = - fctrl->flashdata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - - rc = msm_led_i2c_flash_create_v4lsubdev(fctrl); -#ifdef CONFIG_DEBUG_FS - dentry = debugfs_create_file("ledflash", S_IRUGO, NULL, (void *)fctrl, - &ledflashdbg_fops); - if (!dentry) - pr_err("Failed to create the debugfs ledflash file"); -#endif - CDBG("%s:%d probe success\n", __func__, __LINE__); - return 0; - -probe_failure: - CDBG("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -int msm_flash_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_cci_client *cci_client = NULL; - - if (!of_node || !fctrl) { - pr_err("%s of_node is NULL or fctrl is NULL, line %d\n",__func__,__LINE__); - rc = -EFAULT; - goto probe_failure; - } - fctrl->pdev = pdev; - - rc = msm_led_get_dt_data(pdev->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d rc = %d\n", __func__, __LINE__, rc); - rc = -EFAULT; - goto probe_failure; - } - - msm_flash_pinctrl_init(fctrl); - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", fctrl->flashdata->sensor_name); - /* Set device type as Platform*/ - fctrl->flash_device_type = MSM_CAMERA_PLATFORM_DEVICE; - - if (NULL == fctrl->flash_i2c_client) { - pr_err("%s flash_i2c_client NULL\n", - __func__); - rc = -EFAULT; - goto probe_failure; - } - - fctrl->flash_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!fctrl->flash_i2c_client->cci_client) { - pr_err("%s failed line %d kzalloc failed\n", - __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - - cci_client = fctrl->flash_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = fctrl->cci_i2c_master; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - cci_client->sid = - fctrl->flashdata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - - rc = msm_led_flash_create_v4lsubdev(pdev, fctrl); - - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - goto probe_failure1; - } - - CDBG("%s: probe success\n", __func__); - return 0; - -probe_failure1: - kfree(fctrl->flash_i2c_client->cci_client); - -probe_failure: - - pr_err("%s probe failed\n", __func__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_torch.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_torch.c deleted file mode 100644 index ff6369634541..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_torch.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_led_flash.h" - -static struct led_trigger *torch_trigger; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (!torch_trigger) { - pr_err("No torch trigger found, can't set brightness\n"); - return; - } - - led_trigger_event(torch_trigger, value); -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -int32_t msm_led_torch_create_classdev(struct platform_device *pdev, - void *data) -{ - int rc; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - - if (!fctrl || !fctrl->torch_trigger) { - pr_err("Invalid fctrl or torch trigger\n"); - return -EINVAL; - } - - torch_trigger = fctrl->torch_trigger; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - - rc = led_classdev_register(&pdev->dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_trigger.c b/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_trigger.c deleted file mode 100644 index c47b8e496abc..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/flash/msm_led_trigger.c +++ /dev/null @@ -1,566 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#if defined(CONFIG_FLED_SM5701) -#include -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -#include -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) -#include -#endif -#ifdef CONFIG_FLED_SM5703 -#include -#endif -#include "msm_led_flash.h" - -#define FLASH_NAME "camera-led-flash" - -#if defined(CONFIG_FLED_LM3632) -extern void ssflash_led_turn_on(void); -extern void ssflash_led_turn_off(void); -#endif -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -extern int system_rev; - - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -extern int32_t msm_led_torch_create_classdev( - struct platform_device *pdev, void *data); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -extern void rt5033_fled_strobe_critial_section_lock(struct rt_fled_info *fled_info); -extern void rt5033_fled_strobe_critial_section_unlock(struct rt_fled_info *fled_info); -extern bool assistive_light; -#endif - -#if defined(CONFIG_FLED_SM5701) -extern bool assistive_light; -#endif - -#ifdef CONFIG_FLED_SM5703_EXT_GPIO -extern bool assistive_light; -extern int32_t sm5703_fled_notification(struct sm_fled_info *info); -static int led_prev_mode = 0; -#endif - -static enum flash_type flashtype; -static struct msm_led_flash_ctrl_t fctrl; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -static bool lock_state = false; -#endif - -static int32_t msm_led_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = fctrl->pdev->id; - CDBG("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; -#if !defined(CONFIG_FLED_SM5703) - uint32_t i; -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - rt_fled_info_t *fled_info = rt_fled_get_info_by_name(NULL); -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); -#endif -#if 0 - uint32_t curr_l, max_curr_l; -#endif - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - -#ifdef CONFIG_SEC_NOVEL_PROJECT - pr_err("MSM-Not control flash %d\n", cfg->cfgtype); - return 0; -#endif - - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - pr_err("MSM_CAMERA_LED_OFF\n"); -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) - if(system_rev < 5){ - CDBG("ssflaash led turn on msm_led_trigger\n"); - ssflash_led_turn_off(); - }else{ - ktd2692_flash_on(0); - CDBG("Ktd2692 led turn on msm_led_trigger\n"); - } -#endif - -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - break; - -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - break; -#if 0 - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; -#endif - - case MSM_CAMERA_LED_LOW: - pr_err("MSM_CAMERA_LED_LOW\n"); -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) - if (cfg->torch_current == FRONT_CAMERA_B) { - if(system_rev < 5){ - ssflash_led_turn_on(); - }else{ - ktd2692_flash_on(1); - } - break; - } -#endif - -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - break; -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(MOVIE_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_MOVIE); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; -#if 0 - if (fctrl->torch_trigger) { - max_curr_l = fctrl->torch_max_current; - if (cfg->torch_current > 0 && - cfg->torch_current < max_curr_l) { - curr_l = cfg->torch_current; - } else { - curr_l = fctrl->torch_op_current; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->torch_trigger, - curr_l); - } - break; -#endif - - case MSM_CAMERA_LED_HIGH: - pr_err("MSM_CAMERA_LED_HIGH\n"); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - rt5033_fled_strobe_critial_section_lock(fled_info); - lock_state = true; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - break; - -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(FLASH_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_FLASH); -#else - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; -#if 0 - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) { - max_curr_l = fctrl->flash_max_current[i]; - if (cfg->flash_current[i] > 0 && - cfg->flash_current[i] < max_curr_l) { - curr_l = cfg->flash_current[i]; - } else { - curr_l = fctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->flash_trigger[i], - curr_l); - } - break; -#endif - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - CDBG("MSM_CAMERA_LED_INIT\n"); -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) - - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - } else if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - - } - /*for (i = 0; i < fctrl->flash_num_sources; i++) - { - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger[i], 0); - }*/ - break; - -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - } else { - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } - } -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#endif -#if !defined(CONFIG_FLED_SM5703_EXT_GPIO) - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; -#endif - default: - pr_err("LED state error!\n"); - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} - -static const struct of_device_id msm_led_trigger_dt_match[] = { - {.compatible = "qcom,camera-led-flash"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_led_trigger_dt_match); - -static struct platform_driver msm_led_trigger_driver = { - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_led_trigger_dt_match, - }, -}; - -static int32_t msm_led_trigger_probe(struct platform_device *pdev) -{ - int32_t rc = 0, rc_1 = 0, i = 0; - struct device_node *of_node = pdev->dev.of_node; - struct device_node *flash_src_node = NULL; - uint32_t count = 0; - struct led_trigger *temp = NULL; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl.pdev = pdev; - fctrl.num_sources = 0; - - rc = of_property_read_u32(of_node, "cell-index", &pdev->id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - CDBG("pdev id %d\n", pdev->id); - - rc = of_property_read_u32(of_node, - "qcom,flash-type", &flashtype); - if (rc < 0) { - pr_err("flash-type: read failed\n"); - return -EINVAL; - } - - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl.num_sources = count; - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.flash_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl.flash_trigger_name[i]); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.flash_op_current[i] = LED_FULL; - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.flash_op_current[i]); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.flash_max_current[i]); - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl.flash_op_current[i]); - - led_trigger_register_simple(fctrl.flash_trigger_name[i], - &fctrl.flash_trigger[i]); - - if (flashtype == GPIO_FLASH) - if (fctrl.flash_trigger[i]) - temp = fctrl.flash_trigger[i]; - } - - /* Torch source */ - flash_src_node = of_parse_phandle(of_node, "qcom,torch-source", - 0); - if (flash_src_node) { - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.torch_trigger_name); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - goto torch_failed; - } - - CDBG("default trigger %s\n", - fctrl.torch_trigger_name); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.torch_op_current = LED_HALF; - if (temp) - fctrl.torch_trigger = temp; - else - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.torch_op_current); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.torch_max_current); - - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - goto torch_failed; - } - - CDBG("torch max_current %d\n", - fctrl.torch_op_current); - - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } -torch_failed: - of_node_put(flash_src_node); - } - } - - rc = msm_led_flash_create_v4lsubdev(pdev, &fctrl); - if (!rc) { - msm_led_torch_create_classdev(pdev, &fctrl); - } - - return rc; -} - -static int __init msm_led_trigger_add_driver(void) -{ - CDBG("called\n"); - return platform_driver_probe(&msm_led_trigger_driver, - msm_led_trigger_probe); -} - -static struct msm_flash_fn_t msm_led_trigger_func_tbl = { - .flash_get_subdev_id = msm_led_trigger_get_subdev_id, - .flash_led_config = msm_led_trigger_config, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .func_tbl = &msm_led_trigger_func_tbl, -}; -#if defined(CONFIG_FLED_SM5703) -int set_led_flash(int mode) -{ - struct msm_camera_led_cfg_t cfg; - int rc = 0; - cfg.cfgtype = mode; - - if (led_prev_mode && mode) - return -1; - - rc = msm_led_trigger_config(&fctrl, &mode); - - if (rc == 0) - led_prev_mode = mode; - - return rc; -} -EXPORT_SYMBOL(set_led_flash); -#endif -module_init(msm_led_trigger_add_driver); -MODULE_DESCRIPTION("LED TRIGGER FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/gc0339.c b/drivers/media/platform/msm/camera_v2_j5/sensor/gc0339.c deleted file mode 100755 index bada8365fc4c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/gc0339.c +++ /dev/null @@ -1,704 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" - - -#define GC0339_SENSOR_NAME "gc0339" -DEFINE_MSM_MUTEX(gc0339_mut); - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl; - -static struct msm_sensor_power_setting gc0339_power_setting[] = { - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info gc0339_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_gc0339_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0339_s_ctrl); -} - -static const struct i2c_device_id gc0339_i2c_id[] = { - {GC0339_SENSOR_NAME, (kernel_ulong_t)&gc0339_s_ctrl}, - { } -}; - -static struct i2c_driver gc0339_i2c_driver = { - .id_table = gc0339_i2c_id, - .probe = msm_gc0339_i2c_probe, - .driver = { - .name = GC0339_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0339_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -int32_t gc0339_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - gpio_conf->cam_gpiomux_conf_tbl, - gpio_conf->cam_gpiomux_conf_tbl_size); - } - - rc = msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - for (index = 0; index < power_setting_array->size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= - power_info->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - power_info->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - power_info->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - pr_debug("%s:%d gpio set val %d\n", __func__, __LINE__, - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x10, MSM_CAMERA_I2C_BYTE_DATA); - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) { - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - goto power_up_failed; - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - return rc; -} - -int32_t gc0339_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x01, MSM_CAMERA_I2C_BYTE_DATA); - - for (index = (power_setting_array->size - 1); index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - CDBG("%s exit\n", __func__); - return 0; -} - -int32_t gc0339_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.addr_type == MSM_CAMERA_I2C_WORD_ADDR - || conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA - || !conf_array.size) - break; - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static struct msm_sensor_fn_t gc0339_sensor_fn_t = { - .sensor_power_up = gc0339_power_up, - .sensor_power_down = gc0339_power_down, - .sensor_match_id = gc0339_match_id, - .sensor_config = gc0339_config, -}; - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl = { - .sensor_i2c_client = &gc0339_sensor_i2c_client, - .power_setting_array.power_setting = gc0339_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0339_power_setting), - .msm_sensor_mutex = &gc0339_mut, - .sensor_v4l2_subdev_info = gc0339_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0339_subdev_info), - .func_tbl = &gc0339_sensor_fn_t, -}; - -static const struct of_device_id gc0339_dt_match[] = { - {.compatible = "shinetech,gc0339", .data = &gc0339_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0339_dt_match); - -static struct platform_driver gc0339_platform_driver = { - .driver = { - .name = "shinetech,gc0339", - .owner = THIS_MODULE, - .of_match_table = gc0339_dt_match, - }, -}; - -static int32_t gc0339_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(gc0339_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init gc0339_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&gc0339_platform_driver, - gc0339_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&gc0339_i2c_driver); -} - -static void __exit gc0339_exit_module(void) -{ - if (gc0339_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0339_s_ctrl); - platform_driver_unregister(&gc0339_platform_driver); - } else - i2c_del_driver(&gc0339_i2c_driver); - return; -} - -module_init(gc0339_init_module); -module_exit(gc0339_exit_module); -MODULE_DESCRIPTION("gc0339"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/hi256.c b/drivers/media/platform/msm/camera_v2_j5/sensor/hi256.c deleted file mode 100755 index e61f57a3927d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/hi256.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define HI256_SENSOR_NAME "hi256" -#define PLATFORM_DRIVER_NAME "msm_camera_hi256" - -#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(hi256_mut); -static struct msm_sensor_ctrl_t hi256_s_ctrl; - -static struct msm_sensor_power_setting hi256_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_uxga_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x0a}, - {0x22, 0x00}, - {0x23, 0x0a}, - {0x40, 0x01}, - {0x41, 0x68}, - {0x42, 0x00}, - {0x43, 0x12}, - {0x03, 0x10}, - {0x3f, 0x00}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0xfd}, - {0x03, 0x00}, - {0x10, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x0c}, - {0x31, 0x80}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_start_settings[] = { - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_stop_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, -}; - -static struct msm_camera_i2c_reg_conf hi256_recommend_settings[] = { - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - - {0x08, 0x0f}, - {0x0a, 0x00}, - - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - - {0x03, 0x00}, - {0x10, 0x13}, - {0x11, 0x90}, /* no H/V flip */ - {0x12, 0x00}, - {0x0b, 0xaa}, - {0x0c, 0xaa}, - {0x0d, 0xaa}, - {0x20, 0x00}, - {0x21, 0x06}, - {0x22, 0x00}, - {0x23, 0x05}, - {0x24, 0x04}, - {0x25, 0xb0}, - {0x26, 0x06}, - {0x27, 0x40}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x45, 0x04}, - {0x46, 0x18}, - {0x47, 0xd8}, - {0x80, 0x2e}, - {0x81, 0x7e}, - {0x82, 0x90}, - {0x83, 0x00}, - {0x84, 0x0c}, - {0x85, 0x00}, - {0x90, 0x0c}, - {0x91, 0x0c}, - {0x92, 0x78}, - {0x93, 0x70}, - {0x94, 0xff}, - {0x95, 0xff}, - {0x96, 0xdc}, - {0x97, 0xfe}, - {0x98, 0x38}, - {0xa0, 0x45}, - {0xa2, 0x45}, - {0xa4, 0x45}, - {0xa6, 0x45}, - {0xa8, 0x45}, - {0xaa, 0x45}, - {0xac, 0x45}, - {0xae, 0x45}, - {0x99, 0x43}, - {0x9a, 0x43}, - {0x9b, 0x43}, - {0x9c, 0x43}, - {0x03, 0x02}, - {0x12, 0x03}, - {0x13, 0x03}, - {0x15, 0x00}, - {0x16, 0x00}, - {0x17, 0x8C}, - {0x18, 0x4c}, - {0x19, 0x00}, - {0x1a, 0x39}, - {0x1c, 0x09}, - {0x1d, 0x40}, - {0x1e, 0x30}, - {0x1f, 0x10}, - {0x20, 0x77}, - {0x21, 0x6d}, - {0x22, 0x77}, - {0x23, 0x30}, - {0x24, 0x77}, - {0x27, 0x3c}, - {0x2b, 0x80}, - {0x2e, 0x00}, - {0x2f, 0x00}, - {0x30, 0x05}, - {0x50, 0x20}, - {0x52, 0x01}, - {0x53, 0xc1}, - {0x55, 0x1c}, - {0x56, 0x11}, - {0x58, 0x22}, - {0x59, 0x20}, - {0x5d, 0xa2}, - {0x5e, 0x5a}, - {0x60, 0x87}, - {0x61, 0x99}, - {0x62, 0x88}, - {0x63, 0x97}, - {0x64, 0x88}, - {0x65, 0x97}, - {0x67, 0x0c}, - {0x68, 0x0c}, - {0x69, 0x0c}, - {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}, - {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}, - {0xd4, 0x0c}, - {0xd5, 0x0c}, - {0xd6, 0x78}, - {0xd7, 0x70}, - {0xe0, 0xc4}, - {0xe1, 0xc4}, - {0xe2, 0xc4}, - {0xe3, 0xc4}, - {0xe4, 0x00}, - {0xe8, 0x80}, - {0xe9, 0x40}, - {0xea, 0x7f}, - {0xf0, 0xc1}, - {0xf1, 0xc1}, - {0xf2, 0xc1}, - {0xf3, 0xc1}, - {0xf4, 0xc1}, - {0x03, 0x03}, - {0x10, 0x10}, - {0x03, 0x10}, - {0x10, 0x03}, - {0x12, 0x30}, - {0x13, 0x02}, - {0x20, 0x00}, - {0x30, 0x00}, - {0x31, 0x00}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x30}, - {0x35, 0x00}, - {0x36, 0x00}, - {0x38, 0x00}, - {0x3e, 0x58}, - {0x3f, 0x00}, - {0x40, 0x80}, - {0x41, 0x00}, - {0x48, 0x95}, - {0x60, 0x67}, - {0x61, 0x88}, - {0x62, 0x90}, - {0x63, 0x50}, - {0x64, 0x41}, - {0x66, 0x42}, - {0x67, 0x20}, - {0x6a, 0x71}, - {0x6b, 0x84}, - {0x6c, 0x72}, - {0x6d, 0x83}, - {0x03, 0x11}, - {0x10, 0x7f}, - {0x11, 0x40}, - {0x12, 0x0a}, - {0x13, 0xbb}, - {0x26, 0x31}, - {0x27, 0x34}, - {0x28, 0x0f}, - {0x29, 0x10}, - {0x2b, 0x30}, - {0x2c, 0x32}, - {0x30, 0x70}, - {0x31, 0x10}, - {0x32, 0x58}, - {0x33, 0x09}, - {0x34, 0x06}, - {0x35, 0x03}, - {0x36, 0x70}, - {0x37, 0x18}, - {0x38, 0x58}, - {0x39, 0x09}, - {0x3a, 0x06}, - {0x3b, 0x03}, - {0x3c, 0x80}, - {0x3d, 0x18}, - {0x3e, 0x80}, - {0x3f, 0x0c}, - {0x40, 0x05}, - {0x41, 0x06}, - {0x42, 0x80}, - {0x43, 0x18}, - {0x44, 0x80}, - {0x45, 0x0c}, - {0x46, 0x05}, - {0x47, 0x06}, - {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, 0x18}, - {0x5b, 0x00}, - {0x5c, 0x00}, - {0x60, 0x3f}, - {0x62, 0x60}, - {0x70, 0x06}, - {0x03, 0x12}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x25, 0x00}, - {0x28, 0x00}, - {0x29, 0x00}, - {0x2a, 0x00}, - {0x30, 0x50}, - {0x31, 0x18}, - {0x32, 0x32}, - {0x33, 0x40}, - {0x34, 0x50}, - {0x35, 0x70}, - {0x36, 0xa0}, - {0x40, 0xa0}, - {0x41, 0x40}, - {0x42, 0xa0}, - {0x43, 0x90}, - {0x44, 0x90}, - {0x45, 0x80}, - {0x46, 0xb0}, - {0x47, 0x55}, - {0x48, 0xa0}, - {0x49, 0x90}, - {0x4a, 0x90}, - {0x4b, 0x80}, - {0x4c, 0xb0}, - {0x4d, 0x40}, - {0x4e, 0x90}, - {0x4f, 0x60}, - {0x50, 0xa0}, - {0x51, 0x80}, - {0x52, 0xb0}, - {0x53, 0x40}, - {0x54, 0x90}, - {0x55, 0x60}, - {0x56, 0xa0}, - {0x57, 0x80}, - {0x58, 0x90}, - {0x59, 0x40}, - {0x5a, 0xd0}, - {0x5b, 0xd0}, - {0x5c, 0xe0}, - {0x5d, 0x80}, - {0x5e, 0x88}, - {0x5f, 0x40}, - {0x60, 0xe0}, - {0x61, 0xe0}, - {0x62, 0xe0}, - {0x63, 0x80}, - {0x70, 0x15}, - {0x71, 0x01}, - {0x72, 0x18}, - {0x73, 0x01}, - {0x74, 0x25}, - {0x75, 0x15}, - {0x80, 0x20}, - {0x81, 0x40}, - {0x82, 0x65}, - {0x85, 0x1a}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x90, 0x5d}, - {0xD0, 0x0c}, - {0xD1, 0x80}, - {0xD2, 0x17}, - {0xD3, 0x00}, - {0xD4, 0x00}, - {0xD5, 0x0f}, - {0xD6, 0xff}, - {0xD7, 0xff}, - {0x3b, 0x06}, - {0x3c, 0x06}, - {0xc5, 0x00}, - {0xc6, 0x00}, - {0x03, 0x13}, - {0x10, 0xcb}, - {0x11, 0x7b}, - {0x12, 0x07}, - {0x14, 0x00}, - {0x20, 0x15}, - {0x21, 0x13}, - {0x22, 0x33}, - {0x23, 0x05}, - {0x24, 0x09}, - {0x25, 0x0a}, - {0x26, 0x18}, - {0x27, 0x30}, - {0x29, 0x12}, - {0x2a, 0x50}, - {0x2b, 0x02}, - {0x2c, 0x02}, - {0x25, 0x06}, - {0x2d, 0x0c}, - {0x2e, 0x12}, - {0x2f, 0x12}, - {0x50, 0x10}, - {0x51, 0x14}, - {0x52, 0x12}, - {0x53, 0x0c}, - {0x54, 0x0f}, - {0x55, 0x0c}, - {0x56, 0x10}, - {0x57, 0x13}, - {0x58, 0x12}, - {0x59, 0x0c}, - {0x5a, 0x0f}, - {0x5b, 0x0c}, - {0x5c, 0x25}, - {0x5d, 0x25}, - {0x5e, 0x25}, - {0x5f, 0x25}, - {0x60, 0x25}, - {0x61, 0x25}, - {0x62, 0x25}, - {0x63, 0x25}, - {0x64, 0x25}, - {0x65, 0x25}, - {0x66, 0x25}, - {0x67, 0x25}, - {0x68, 0x07}, - {0x69, 0x07}, - {0x6a, 0x07}, - {0x6b, 0x05}, - {0x6c, 0x05}, - {0x6d, 0x05}, - {0x6e, 0x07}, - {0x6f, 0x07}, - {0x70, 0x07}, - {0x71, 0x05}, - {0x72, 0x05}, - {0x73, 0x05}, - {0x80, 0x01}, - {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}, - {0x03, 0x14}, - {0x10, 0x11}, - {0x14, 0x80}, - {0x15, 0x80}, - {0x16, 0x80}, - {0x17, 0x80}, - {0x18, 0x80}, - {0x19, 0x80}, - {0x20, 0x80}, - {0x21, 0x80}, - {0x22, 0x80}, - {0x23, 0x80}, - {0x24, 0x80}, - {0x30, 0xc8}, - {0x31, 0x2b}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x90}, - {0x40, 0x32}, - {0x50, 0x21}, - {0x60, 0x19}, - {0x70, 0x21}, - {0x03, 0x15}, - {0x10, 0x0f}, - {0x14, 0x46}, - {0x15, 0x36}, - {0x16, 0x26}, - {0x17, 0x2f}, - {0x30, 0x8f}, - {0x31, 0x59}, - {0x32, 0x0a}, - {0x33, 0x15}, - {0x34, 0x5b}, - {0x35, 0x06}, - {0x36, 0x07}, - {0x37, 0x40}, - {0x38, 0x87}, - {0x40, 0x94}, - {0x41, 0x20}, - {0x42, 0x89}, - {0x43, 0x84}, - {0x44, 0x03}, - {0x45, 0x01}, - {0x46, 0x88}, - {0x47, 0x9c}, - {0x48, 0x28}, - {0x50, 0x02}, - {0x51, 0x82}, - {0x52, 0x00}, - {0x53, 0x07}, - {0x54, 0x11}, - {0x55, 0x98}, - {0x56, 0x00}, - {0x57, 0x0b}, - {0x58, 0x8b}, - {0x80, 0x03}, - {0x85, 0x40}, - {0x87, 0x02}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x8a, 0x00}, - {0x03, 0x16}, - {0x10, 0x31}, - {0x18, 0x5e}, - {0x19, 0x5d}, - {0x1a, 0x0e}, - {0x1b, 0x01}, - {0x1c, 0xdc}, - {0x1d, 0xfe}, - {0x30, 0x00}, - {0x31, 0x0a}, - {0x32, 0x1f}, - {0x33, 0x33}, - {0x34, 0x53}, - {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}, - {0x50, 0x00}, - {0x51, 0x08}, - {0x52, 0x1e}, - {0x53, 0x36}, - {0x54, 0x5a}, - {0x55, 0x75}, - {0x56, 0x8d}, - {0x57, 0xa1}, - {0x58, 0xb2}, - {0x59, 0xbe}, - {0x5a, 0xc9}, - {0x5b, 0xd2}, - {0x5c, 0xdb}, - {0x5d, 0xe3}, - {0x5e, 0xeb}, - {0x5f, 0xf0}, - {0x60, 0xf5}, - {0x61, 0xf7}, - {0x62, 0xf8}, - {0x70, 0x00}, - {0x71, 0x08}, - {0x72, 0x17}, - {0x73, 0x2f}, - {0x74, 0x53}, - {0x75, 0x6c}, - {0x76, 0x81}, - {0x77, 0x94}, - {0x78, 0xa4}, - {0x79, 0xb3}, - {0x7a, 0xc0}, - {0x7b, 0xcb}, - {0x7c, 0xd5}, - {0x7d, 0xde}, - {0x7e, 0xe6}, - {0x7f, 0xee}, - {0x80, 0xf4}, - {0x81, 0xfa}, - {0x82, 0xff}, - {0x03, 0x17}, - {0x10, 0xf7}, - {0xC4, 0x66}, - {0xC5, 0x55}, - {0x03, 0x20}, - {0x11, 0x1c}, - {0x18, 0x30}, - {0x1a, 0x08}, - {0x20, 0x05}, - {0x21, 0x30}, - {0x22, 0x10}, - {0x23, 0x00}, - {0x24, 0x00}, - {0x28, 0xe7}, - {0x29, 0x0d}, - {0x2a, 0xf0}, - {0x2b, 0x34}, - {0x30, 0x78}, - {0x2c, 0xc2}, - {0x2d, 0xff}, - {0x2e, 0x33}, - {0x30, 0x78}, - {0x32, 0x03}, - {0x33, 0x2e}, - {0x34, 0x30}, - {0x35, 0xd4}, - {0x36, 0xfe}, - {0x37, 0x32}, - {0x38, 0x04}, - {0x39, 0x22}, - {0x3a, 0xde}, - {0x3b, 0x22}, - {0x3c, 0xde}, - {0x50, 0x45}, - {0x51, 0x88}, - {0x56, 0x03}, - {0x57, 0xf7}, - {0x58, 0x14}, - {0x59, 0x88}, - {0x5a, 0x04}, - {0x60, 0xaa}, - {0x61, 0xaa}, - {0x62, 0xaa}, - {0x63, 0xaa}, - {0x64, 0xaa}, - {0x65, 0xaa}, - {0x66, 0xab}, - {0x67, 0xEa}, - {0x68, 0xab}, - {0x69, 0xEa}, - {0x6a, 0xaa}, - {0x6b, 0xaa}, - {0x6c, 0xaa}, - {0x6d, 0xaa}, - {0x6e, 0xaa}, - {0x6f, 0xaa}, - {0x70, 0x76}, - {0x71, 0x80}, - {0x76, 0x43}, - {0x77, 0x04}, - {0x78, 0x23}, - {0x79, 0x46}, - {0x7a, 0x23}, - {0x7b, 0x22}, - {0x7d, 0x23}, - {0x83, 0x01}, - {0x84, 0x5f}, - {0x85, 0x90}, - {0x86, 0x01}, - {0x87, 0x2c}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x8B, 0x75}, - {0x8C, 0x30}, - {0x8D, 0x61}, - {0x8E, 0x44}, - {0x9c, 0x08}, - {0x9d, 0x34}, - {0x9e, 0x01}, - {0x9f, 0x2c}, - {0xb0, 0x18}, - {0xb1, 0x14}, - {0xb2, 0x80}, - {0xb3, 0x18}, - {0xb4, 0x1a}, - {0xb5, 0x44}, - {0xb6, 0x2f}, - {0xb7, 0x28}, - {0xb8, 0x25}, - {0xb9, 0x22}, - {0xba, 0x21}, - {0xbb, 0x20}, - {0xbc, 0x32}, - {0xbd, 0x30}, - {0xc0, 0x10}, - {0xc1, 0x2b}, - {0xc2, 0x2b}, - {0xc3, 0x2b}, - {0xc4, 0x08}, - {0xc8, 0x40}, - {0xc9, 0x40}, - {0x03, 0x22}, - {0x10, 0xfd}, - {0x11, 0x2e}, - {0x19, 0x01}, - {0x20, 0x10}, - {0x21, 0x80}, - {0x24, 0x01}, - {0x30, 0x80}, - {0x31, 0x80}, - {0x38, 0x11}, - {0x39, 0x34}, - {0x40, 0xfa}, - {0x41, 0x44}, - {0x42, 0x43}, - {0x43, 0xf6}, - {0x44, 0x44}, - {0x45, 0x33}, - {0x46, 0x00}, - {0x50, 0xb2}, - {0x51, 0x81}, - {0x52, 0x98}, - {0x80, 0x38}, - {0x81, 0x20}, - {0x82, 0x38}, - {0x83, 0x5e}, - {0x84, 0x18}, - {0x85, 0x58}, - {0x86, 0x20}, - {0x87, 0x49}, - {0x88, 0x33}, - {0x89, 0x37}, - {0x8a, 0x2a}, - {0x8b, 0x41}, - {0x8c, 0x39}, - {0x8d, 0x34}, - {0x8e, 0x29}, - {0x8f, 0x53}, - {0x90, 0x52}, - {0x91, 0x51}, - {0x92, 0x4e}, - {0x93, 0x46}, - {0x94, 0x3d}, - {0x95, 0x34}, - {0x96, 0x2e}, - {0x97, 0x29}, - {0x98, 0x22}, - {0x99, 0x1c}, - {0x9a, 0x18}, - {0x9b, 0x77}, - {0x9c, 0x77}, - {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}, - {0xb4, 0xea}, - {0xb8, 0xa0}, - {0xb9, 0x00}, - {0x03, 0x48}, - {0x70, 0x03}, - {0x71, 0x30}, - {0x72, 0x81}, - {0x73, 0x10}, - {0x70, 0x85}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x70, 0x95}, - {0x10, 0x1c}, - {0x11, 0x10}, - {0x12, 0x00}, - {0x14, 0x00}, - {0x16, 0x04}, - {0x18, 0x80}, - {0x19, 0x00}, - {0x1a, 0xa0}, - {0x1b, 0x0d}, - {0x1c, 0x01}, - {0x1d, 0x0a}, - {0x1e, 0x07}, - {0x1f, 0x0b}, - {0x23, 0x01}, - {0x24, 0x1e}, - {0x25, 0x00}, - {0x26, 0x00}, - {0x27, 0x08}, - {0x28, 0x00}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x32, 0x13}, - {0x33, 0x0c}, - {0x34, 0x04}, - {0x35, 0x06}, - {0x36, 0x01}, - {0x37, 0x06}, - {0x39, 0x4f}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x0e, 0x03}, - {0x0e, 0x73}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct v4l2_subdev_info hi256_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_svga_settings[] = { - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x10, 0x13}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x04}, - {0x22, 0x00}, - {0x23, 0x07}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x03, 0x10}, - {0x3f, 0x02}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x03, 0x20}, - {0x88, 0x01}, - {0x89, 0x5f}, - {0x8a, 0x90}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, -}; - -static struct msm_camera_i2c_reg_conf hi256_sleep_settings[] = { - - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x02}, - {0x55, 0x10}, - - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_saturation[11][3] = { - { - {0x03, 0x10}, - {0x61, 0x1c}, - {0x62, 0x1c}, - }, - { - {0x03, 0x10}, - {0x61, 0x30}, - {0x62, 0x30}, - }, - { - {0x03, 0x10}, - {0x61, 0x44}, - {0x62, 0x44}, - }, - { - {0x03, 0x10}, - {0x61, 0x58}, - {0x62, 0x58}, - }, - { - {0x03, 0x10}, - {0x61, 0x6c}, - {0x62, 0x6c}, - }, - { - {0x03, 0x10}, - {0x61, 0x80}, - {0x62, 0x80}, - }, - { - {0x03, 0x10}, - {0x61, 0x94}, - {0x62, 0x94}, - }, - { - {0x03, 0x10}, - {0x61, 0xa8}, - {0x62, 0xa8}, - }, - { - {0x03, 0x10}, - {0x61, 0xbc}, - {0x62, 0xbc}, - }, - { - {0x03, 0x10}, - {0x61, 0xd0}, - {0x62, 0xd0}, - }, - { - {0x03, 0x10}, - {0x61, 0xe4}, - {0x62, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_contrast[11][3] = { - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x1c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x30}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x44}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x58}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x6c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x80}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x94}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xa8}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xbc}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xd0}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_sharpness[7][9] = { - { - {0x03, 0x13}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x00}, - {0x91, 0x00}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 0*/ - { - {0x03, 0x13}, - {0x20, 0x04}, - {0x21, 0x03}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x08}, - {0x91, 0x08}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 1*/ - { - {0x03, 0x13}, - {0x20, 0x08}, - {0x21, 0x07}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x32}, - {0x91, 0x32}, - {0x94, 0x04}, - {0x95, 0x0a}, - }, /* SHARPNESS LEVEL 2*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x09}, - {0x24, 0x11}, - {0x90, 0x05}, - {0x91, 0x05}, - {0x94, 0x10}, - {0x95, 0x5a}, - }, /* SHARPNESS LEVEL 3*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xaf}, - {0x91, 0xaf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 4*/ - { - {0x03, 0x13}, - {0x20, 0x20}, - {0x21, 0x20}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xdf}, - {0x91, 0xdf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 5*/ - { - {0x03, 0x13}, - {0x20, 0x25}, - {0x21, 0x25}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xff}, - {0x91, 0xff}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 6*/ -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_iso[7][3] = { - /* auto */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* auto hjt */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* iso 100 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x1B}, - }, - /* iso 200 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x35}, - }, - /* iso 400 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x65}, - }, - /* iso 800 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x95}, - }, - /* iso 1600 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0xd0}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_exposure_compensation[5][2] = { - /* -2 */ - { - {0x03, 0x10}, - {0x40, 0xa4}, - }, - /* -1 */ - { - {0x03, 0x10}, - {0x40, 0x94}, - }, - /* 0 */ - { - {0x03, 0x10}, - {0x40, 0x80}, - }, - /* 1 */ - { - {0x03, 0x10}, - {0x40, 0x14}, - }, - /* 2 */ - { - {0x03, 0x10}, - {0x40, 0x24}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_antibanding[][2] = { - /* OFF */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, - /* 50Hz */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - }, - /* 60Hz */ - { - {0x03, 0x20}, - {0x10, 0x8c}, - }, - /* AUTO */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_normal[] = { - /* normal: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0X30}, - {0x13, 0x0a}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_black_white[] = { - /* B&W: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x02}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_negative[] = { - /* Negative: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x08}, - {0x13, 0x0a}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_old_movie[] = { - /* Sepia(antique): */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x0a}, - {0x44, 0x25}, - {0x45, 0xa6}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_solarize[] = { - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x0b}, - {0x12, 0x00}, - {0x13, 0x00}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_auto[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_portrait[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_landscape[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_night[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x09}, - {0x89, 0x27}, - {0x8a, 0xc0}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_auto[] = { - /* Auto: */ - {0x03, 0x22}, - {0x11, 0x2e}, - {0x83, 0x60}, - {0x84, 0x0a}, - {0x85, 0x60}, - {0x86, 0x15}, - {0x10, 0xfd}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_sunny[] = { - /* Sunny: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x33}, - {0x82, 0x3d}, - {0x83, 0x2e}, - {0x84, 0x24}, - {0x85, 0x43}, - {0x86, 0x3d}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_cloudy[] = { - /* Cloudy: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x49}, - {0x82, 0x24}, - {0x83, 0x50}, - {0x84, 0x45}, - {0x85, 0x24}, - {0x86, 0x1E}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_office[] = { - /* Office: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x20}, - {0x82, 0x58}, - {0x83, 0x27}, - {0x84, 0x22}, - {0x85, 0x58}, - {0x86, 0x52}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_home[] = { - /* Home: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x29}, - {0x82, 0x54}, - {0x83, 0x2e}, - {0x84, 0x23}, - {0x85, 0x58}, - {0x86, 0x4f}, -}; - - -static const struct i2c_device_id hi256_i2c_id[] = { - {HI256_SENSOR_NAME, (kernel_ulong_t)&hi256_s_ctrl}, - { } -}; - -static int32_t msm_hi256_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &hi256_s_ctrl); -} - -static struct i2c_driver hi256_i2c_driver = { - .id_table = hi256_i2c_id, - .probe = msm_hi256_i2c_probe, - .driver = { - .name = HI256_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client hi256_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id hi256_dt_match[] = { - {.compatible = "shinetech,hi256", .data = &hi256_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, hi256_dt_match); - -static struct platform_driver hi256_platform_driver = { - .driver = { - .name = "shinetech,hi256", - .owner = THIS_MODULE, - .of_match_table = hi256_dt_match, - }, -}; - -static void hi256_i2c_write_table(struct msm_sensor_ctrl_t *s_ctrl, - struct msm_camera_i2c_reg_conf *table, - int num) -{ - int i = 0; - int rc = 0; - for (i = 0; i < num; ++i) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - msleep(100); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - } - table++; - } -} - -static int32_t hi256_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - hi256_i2c_write_table(s_ctrl, &hi256_sleep_settings[0], - ARRAY_SIZE(hi256_sleep_settings)); - return msm_sensor_power_down(s_ctrl); -} - -static int32_t hi256_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(hi256_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init hi256_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&hi256_platform_driver, - hi256_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&hi256_i2c_driver); -} - -static void __exit hi256_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (hi256_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&hi256_s_ctrl); - platform_driver_unregister(&hi256_platform_driver); - } else - i2c_del_driver(&hi256_i2c_driver); - return; -} - -static int32_t hi256_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: hi256 read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -static void hi256_set_stauration(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_saturation[value][0], - ARRAY_SIZE(HI256_reg_saturation[value])); -} - -static void hi256_set_contrast(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_contrast[value][0], - ARRAY_SIZE(HI256_reg_contrast[value])); -} - -static void hi256_set_sharpness(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - int val = value / 6; - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_sharpness[val][0], - ARRAY_SIZE(HI256_reg_sharpness[val])); -} - - -static void hi256_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_iso[value][0], - ARRAY_SIZE(HI256_reg_iso[value])); -} - -static void hi256_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - int val = (value + 12) / 6; - pr_debug("%s %d", __func__, val); - hi256_i2c_write_table(s_ctrl, &HI256_reg_exposure_compensation[val][0], - ARRAY_SIZE(HI256_reg_exposure_compensation[val])); -} - -static void hi256_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_EFFECT_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - break; - } - case MSM_CAMERA_EFFECT_MODE_MONO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_black_white[0], - ARRAY_SIZE(HI256_reg_effect_black_white)); - break; - } - case MSM_CAMERA_EFFECT_MODE_NEGATIVE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_negative[0], - ARRAY_SIZE(HI256_reg_effect_negative)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SEPIA: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_old_movie[0], - ARRAY_SIZE(HI256_reg_effect_old_movie)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SOLARIZE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_solarize[0], - ARRAY_SIZE(HI256_reg_effect_solarize)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - } -} - -static void hi256_set_antibanding(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_antibanding[value][0], - ARRAY_SIZE(HI256_reg_antibanding[value])); -} - -static void hi256_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_SCENE_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - break; - } - case MSM_CAMERA_SCENE_MODE_NIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_night[0], - ARRAY_SIZE(HI256_reg_scene_night)); - break; - } - case MSM_CAMERA_SCENE_MODE_LANDSCAPE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_landscape[0], - ARRAY_SIZE(HI256_reg_scene_landscape)); - break; - } - case MSM_CAMERA_SCENE_MODE_PORTRAIT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_portrait[0], - ARRAY_SIZE(HI256_reg_scene_portrait)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - } -} - -static void hi256_set_white_balance_mode(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_WB_MODE_AUTO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - break; - } - case MSM_CAMERA_WB_MODE_INCANDESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_home[0], - ARRAY_SIZE(HI256_reg_wb_home)); - break; - } - case MSM_CAMERA_WB_MODE_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_sunny[0], - ARRAY_SIZE(HI256_reg_wb_sunny)); - break; - } - case MSM_CAMERA_WB_MODE_FLUORESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_office[0], - ARRAY_SIZE(HI256_reg_wb_office)); - break; - } - case MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_cloudy[0], - ARRAY_SIZE(HI256_reg_wb_cloudy)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - } -} - -int32_t hi256_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("init setting"); - hi256_i2c_write_table(s_ctrl, - &hi256_recommend_settings[0], - ARRAY_SIZE(hi256_recommend_settings)); - CDBG("init setting X"); - break; - case CFG_SET_RESOLUTION: { - int val = 0; - if (copy_from_user(&val, - (void *)cdata->cfg.setting, sizeof(int))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (val == 0) - hi256_i2c_write_table(s_ctrl, &hi256_uxga_settings[0], - ARRAY_SIZE(hi256_uxga_settings)); - else if (val == 1) - hi256_i2c_write_table(s_ctrl, &hi256_svga_settings[0], - ARRAY_SIZE(hi256_svga_settings)); - break; - } - case CFG_SET_STOP_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_stop_settings[0], - ARRAY_SIZE(hi256_stop_settings)); - break; - case CFG_SET_START_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_start_settings[0], - ARRAY_SIZE(hi256_start_settings)); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - hi256_set_stauration(s_ctrl, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - hi256_set_contrast(s_ctrl, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - hi256_set_sharpness(s_ctrl, shp_lev); - break; - } - case CFG_SET_ISO: { - int32_t iso_lev; - if (copy_from_user(&iso_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: ISO Value is %d", __func__, iso_lev); - hi256_set_iso(s_ctrl, iso_lev); - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - int32_t ec_lev; - if (copy_from_user(&ec_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Exposure compensation Value is %d", - __func__, ec_lev); - hi256_set_exposure_compensation(s_ctrl, ec_lev); - break; - } - case CFG_SET_EFFECT: { - int32_t effect_mode; - if (copy_from_user(&effect_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Effect mode is %d", __func__, effect_mode); - hi256_set_effect(s_ctrl, effect_mode); - break; - } - case CFG_SET_ANTIBANDING: { - int32_t antibanding_mode; - if (copy_from_user(&antibanding_mode, - (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: anti-banding mode is %d", __func__, - antibanding_mode); - hi256_set_antibanding(s_ctrl, antibanding_mode); - break; - } - case CFG_SET_BESTSHOT_MODE: { - int32_t bs_mode; - if (copy_from_user(&bs_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: best shot mode is %d", __func__, bs_mode); - hi256_set_scene_mode(s_ctrl, bs_mode); - break; - } - case CFG_SET_WHITE_BALANCE: { - int32_t wb_mode; - if (copy_from_user(&wb_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: white balance is %d", __func__, wb_mode); - hi256_set_white_balance_mode(s_ctrl, wb_mode); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t hi256_sensor_func_tbl = { - .sensor_config = hi256_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = hi256_sensor_power_down, - .sensor_match_id = hi256_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t hi256_s_ctrl = { - .sensor_i2c_client = &hi256_sensor_i2c_client, - .power_setting_array.power_setting = hi256_power_setting, - .power_setting_array.size = ARRAY_SIZE(hi256_power_setting), - .msm_sensor_mutex = &hi256_mut, - .sensor_v4l2_subdev_info = hi256_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(hi256_subdev_info), - .func_tbl = &hi256_sensor_func_tbl, -}; - -module_init(hi256_init_module); -module_exit(hi256_exit_module); -MODULE_DESCRIPTION("Hi256 2MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/imx132.c b/drivers/media/platform/msm/camera_v2_j5/sensor/imx132.c deleted file mode 100755 index f9d057ac403c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/imx132.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX132_SENSOR_NAME "imx132" -DEFINE_MSM_MUTEX(imx132_mut); - -static struct msm_sensor_ctrl_t imx132_s_ctrl; - -static struct msm_sensor_power_setting imx132_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx132_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SRGGB10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx132_i2c_id[] = { - {IMX132_SENSOR_NAME, (kernel_ulong_t)&imx132_s_ctrl}, - { } -}; - -static int32_t msm_imx132_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx132_s_ctrl); -} -static struct i2c_driver imx132_i2c_driver = { - .id_table = imx132_i2c_id, - .probe = msm_imx132_i2c_probe, - .driver = { - .name = IMX132_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx132_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx132_dt_match[] = { - {.compatible = "qcom,imx132", .data = &imx132_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx132_dt_match); - -static struct platform_driver imx132_platform_driver = { - .driver = { - .name = "qcom,imx132", - .owner = THIS_MODULE, - .of_match_table = imx132_dt_match, - }, -}; - -static int32_t imx132_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx132_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx132_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx132_platform_driver, - imx132_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx132_i2c_driver); -} - -static void __exit imx132_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx132_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx132_s_ctrl); - platform_driver_unregister(&imx132_platform_driver); - } else - i2c_del_driver(&imx132_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx132_s_ctrl = { - .sensor_i2c_client = &imx132_sensor_i2c_client, - .power_setting_array.power_setting = imx132_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx132_power_setting), - .msm_sensor_mutex = &imx132_mut, - .sensor_v4l2_subdev_info = imx132_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx132_subdev_info), -}; - -module_init(imx132_init_module); -module_exit(imx132_exit_module); -MODULE_DESCRIPTION("imx132"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/imx134.c b/drivers/media/platform/msm/camera_v2_j5/sensor/imx134.c deleted file mode 100755 index 17a50889a88a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/imx134.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX134_SENSOR_NAME "imx134" -DEFINE_MSM_MUTEX(imx134_mut); - -static struct msm_sensor_ctrl_t imx134_s_ctrl; - -static struct msm_sensor_power_setting imx134_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx134_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx134_i2c_id[] = { - {IMX134_SENSOR_NAME, (kernel_ulong_t)&imx134_s_ctrl}, - { } -}; - -static int32_t msm_imx134_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx134_s_ctrl); -} - -static struct i2c_driver imx134_i2c_driver = { - .id_table = imx134_i2c_id, - .probe = msm_imx134_i2c_probe, - .driver = { - .name = IMX134_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx134_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx134_dt_match[] = { - {.compatible = "sne,imx134", .data = &imx134_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx134_dt_match); - -static struct platform_driver imx134_platform_driver = { - .driver = { - .name = "sne,imx134", - .owner = THIS_MODULE, - .of_match_table = imx134_dt_match, - }, -}; - -static int32_t imx134_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx134_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx134_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx134_platform_driver, - imx134_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx134_i2c_driver); -} - -static void __exit imx134_exit_module(void) -{ - pr_debug("%s:%d\n", __func__, __LINE__); - if (imx134_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx134_s_ctrl); - platform_driver_unregister(&imx134_platform_driver); - } else { - i2c_del_driver(&imx134_i2c_driver); - } - return; -} - -static struct msm_sensor_ctrl_t imx134_s_ctrl = { - .sensor_i2c_client = &imx134_sensor_i2c_client, - .power_setting_array.power_setting = imx134_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx134_power_setting), - .msm_sensor_mutex = &imx134_mut, - .sensor_v4l2_subdev_info = imx134_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx134_subdev_info), -}; - -module_init(imx134_init_module); -module_exit(imx134_exit_module); -MODULE_DESCRIPTION("imx134"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/imx135.c b/drivers/media/platform/msm/camera_v2_j5/sensor/imx135.c deleted file mode 100755 index c26e4fffbd4f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/imx135.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX135_SENSOR_NAME "imx135" -DEFINE_MSM_MUTEX(imx135_mut); - -static struct msm_sensor_ctrl_t imx135_s_ctrl; - -static struct msm_sensor_power_setting imx135_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx135_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx135_i2c_id[] = { - {IMX135_SENSOR_NAME, (kernel_ulong_t)&imx135_s_ctrl}, - { } -}; - -static int32_t msm_imx135_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx135_s_ctrl); -} - -static struct i2c_driver imx135_i2c_driver = { - .id_table = imx135_i2c_id, - .probe = msm_imx135_i2c_probe, - .driver = { - .name = IMX135_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx135_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx135_dt_match[] = { - {.compatible = "qcom,imx135", .data = &imx135_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx135_dt_match); - -static struct platform_driver imx135_platform_driver = { - .driver = { - .name = "qcom,imx135", - .owner = THIS_MODULE, - .of_match_table = imx135_dt_match, - }, -}; - -static int32_t imx135_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx135_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx135_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx135_platform_driver, - imx135_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx135_i2c_driver); -} - -static void __exit imx135_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx135_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx135_s_ctrl); - platform_driver_unregister(&imx135_platform_driver); - } else - i2c_del_driver(&imx135_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx135_s_ctrl = { - .sensor_i2c_client = &imx135_sensor_i2c_client, - .power_setting_array.power_setting = imx135_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx135_power_setting), - .msm_sensor_mutex = &imx135_mut, - .sensor_v4l2_subdev_info = imx135_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx135_subdev_info), -}; - -module_init(imx135_init_module); -module_exit(imx135_exit_module); -MODULE_DESCRIPTION("imx135"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/Makefile b/drivers/media/platform/msm/camera_v2_j5/sensor/io/Makefile deleted file mode 100644 index 0ad43af82be3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j5/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_camera_io_util.o msm_camera_cci_i2c.o msm_camera_qup_i2c.o msm_camera_i2c_mux.o msm_camera_spi.o msm_camera_dt_util.o diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_cci_i2c.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_cci_i2c.c deleted file mode 100644 index 8318b7ed537b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_cci_i2c.c +++ /dev/null @@ -1,599 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_cci.h" - -//#define CONFIG_MSMB_CAMERA_DEBUG 1 -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = data_type; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char *buf = NULL; - int i; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - buf = kzalloc(num_byte, GFP_KERNEL); - if (!buf) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - cci_ctrl.status = 0; //prevent - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - kfree(buf); - return rc; -} - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array reg_conf_tbl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - CDBG("%s:%d reg addr = 0x%x data type: %d\n", - __func__, __LINE__, addr, data_type); - reg_conf_tbl.reg_addr = addr; - reg_conf_tbl.reg_data = data; - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = ®_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = 1; -#if defined(CONFIG_SR200PC20) - if (addr == 0xff){ - pr_err("delay START = %d\n", (int)data*10); - mdelay(data*10); - return 0; - } -#endif - - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint8_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl = {0}; - struct msm_camera_i2c_reg_array reg_conf_tbl[num_byte]; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - memset(reg_conf_tbl, 0, - num_byte * sizeof(struct msm_camera_i2c_reg_array)); - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - } - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BYTE_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint32_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - reg_conf_tbl = (struct msm_camera_i2c_reg_array *) - kzalloc(num_byte * sizeof(struct msm_camera_i2c_reg_array), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d failed: no memory", __func__, __LINE__); - return -ENOMEM; - } - - CDBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - memset(reg_conf_tbl, 0, - num_byte * sizeof(struct msm_camera_i2c_reg_array)); - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - CDBG("%s:%d data[%d] %x\n", __func__, __LINE__, i, - reg_conf_tbl[i].reg_data); - } - cci_ctrl.status = 0;//prevent - cci_ctrl.cmd = MSM_CCI_I2C_WRITE_BURST; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BURST_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s:%d failed: VIDIOC_MSM_CCI_CFG rc %d\n", __func__, __LINE__, - rc); - } - - rc = cci_ctrl.status; - kfree(reg_conf_tbl); - return rc; -} - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_array = NULL; - - if (!client || !write_setting) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA - && write_setting->data_type != MSM_CAMERA_I2C_BURST_DATA)) { - pr_err("[CCI]%s:%d failed data_type(%d)\n", __func__, __LINE__, write_setting->data_type); - return rc; - } - - reg_array = - (struct msm_camera_i2c_reg_array *)write_setting->reg_setting; - CDBG("%s:%d size %d addr %x\n", __func__, __LINE__, - reg_array->delay, reg_array->reg_addr); - rc = msm_camera_cci_i2c_write_burst(client, reg_array->reg_addr, - reg_array->reg_burst_data, reg_array->delay); - if (rc < 0) { - pr_err("%s:%d failed: msm_camera_cci_i2c_write_seq rc %d\n", - __func__, __LINE__, rc); - } - - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_cci_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - return rc; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -static int32_t msm_camera_cci_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - rc = msm_camera_cci_i2c_compare(client, - addr, data, data_type); - return rc; -} - -static int32_t msm_camera_cci_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_cci_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_cci_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_cci_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_cci_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_cci_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_cci_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_cci_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_cci_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd) -{ - int32_t rc = 0; - struct msm_camera_cci_ctrl cci_ctrl; - - CDBG("%s line %d\n", __func__, __LINE__); - cci_ctrl.cmd = cci_cmd; - cci_ctrl.cci_info = client->cci_client; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - return cci_ctrl.status; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.c deleted file mode 100644 index a541da6c5da6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.c +++ /dev/null @@ -1,1638 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include "msm_cci.h" - -#define CAM_SENSOR_PINCTRL_STATE_SLEEP "cam_suspend" -#define CAM_SENSOR_PINCTRL_STATE_DEFAULT "cam_default" -//#define CONFIG_MSM_CAMERA_DT_DEBUG -#undef CDBG -#ifdef CONFIG_MSM_CAMERA_DT_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size) -{ - uint16_t i = 0; - int j = 0; - - /* Validate input parameters */ - if (!cam_vreg || !power_setting) { - pr_err("%s:%d failed: cam_vreg %pK power_setting %pK", __func__, - __LINE__, cam_vreg, power_setting); - return -EINVAL; - } - - /* Validate size of num_vreg */ - if (num_vreg <= 0) { - pr_err("failed: num_vreg %d", num_vreg); - return -EINVAL; - } - - for (i = 0; i < power_setting_size; i++) { - if (power_setting[i].seq_type != SENSOR_VREG) - continue; - - switch (power_setting[i].seq_val) { - case CAM_VDIG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vdig")) { - CDBG("%s:%d i %d j %d cam_vdig\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VIO: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vio")) { - CDBG("%s:%d i %d j %d cam_vio\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VANA: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vana")) { - CDBG("%s:%d i %d j %d cam_vana\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VAF: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vaf")) { - CDBG("%s:%d i %d j %d cam_vaf\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - case CAM_VIO_VT: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vio_vt")) { - CDBG("%s:%d i %d j %d cam_vio_vt\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; -#endif - - case CAM_VANA_VT: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vana_vt")) { - CDBG("%s:%d i %d j %d cam_vana_vt\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - default: - pr_err("%s:%d invalid seq_val %d\n", __func__, - __LINE__, power_setting[i].seq_val); - break; - } - } - - return 0; -} - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info) -{ - int rc = 0, i = 0; - uint32_t val = 0, count = 0; - uint32_t *val_array = NULL; - struct device_node *src_node = NULL; - struct msm_sensor_info_t *sensor_info; - - sensor_info = kzalloc(sizeof(*sensor_info), GFP_KERNEL); - if (!sensor_info) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -ENOMEM; - } - for (i = 0; i < SUB_MODULE_MAX; i++) - sensor_info->subdev_id[i] = -1; - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_ACTUATOR] = val; - of_node_put(src_node); - src_node = NULL; - } - - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", 0); - if (!src_node) { - CDBG("%s:%d eeprom src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,eeprom-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,eeprom-sd-index %d, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - } else - rc = 0; - - src_node = of_parse_phandle(of_node, "qcom,led-flash-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,led flash cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_LED_FLASH] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,strobe-flash-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,strobe-flash-sd-index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_STROBE_FLASH] = val; - } else - rc = 0; - - if (of_get_property(of_node, "qcom,csiphy-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csiphy-sd-index count %d > 2\n", - __func__, count); - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csiphy-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id[SUB_MODULE_CSIPHY + i] = - val_array[i]; - CDBG("%s csiphy_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csiphy-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - if (of_get_property(of_node, "qcom,csid-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csid-sd-index count %d > 2\n", - __func__, count); - rc = -EINVAL; - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csid-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id - [SUB_MODULE_CSID + i] = val_array[i]; - CDBG("%s csid_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csid-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - *s_info = sensor_info; - return rc; -ERROR: - kfree(sensor_info); - return rc; -} - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info) -{ - int rc = 0; - uint32_t val = 0; - struct msm_actuator_info *actuator_info; - - rc = of_property_read_u32(of_node, "qcom,actuator-cam-name", &val); - CDBG("%s qcom,actuator-cam-name %d, rc %d\n", __func__, val, rc); - if (rc < 0) - return 0; - - actuator_info = kzalloc(sizeof(*actuator_info), GFP_KERNEL); - if (!actuator_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - actuator_info->cam_name = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-pwd", &val); - CDBG("%s qcom,actuator-vcm-pwd %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_pwd = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-enable", &val); - CDBG("%s qcom,actuator-vcm-enable %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_enable = val; - - *act_info = actuator_info; - return 0; -ERROR: - kfree(actuator_info); - return rc; -} - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params) -{ - int rc = 0; - uint32_t val = 0; - struct msm_camera_csi_lane_params *clp; - - clp = kzalloc(sizeof(*clp), GFP_KERNEL); - if (!clp) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *csi_lane_params = clp; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-assign", &val); - CDBG("%s qcom,csi-lane-assign 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_assign = val; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-mask", &val); - CDBG("%s qcom,csi-lane-mask 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_mask = val; - - return rc; -ERROR: - kfree(clp); - return rc; -} - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info) -{ - int rc = 0, i, j; - int count = 0; - const char *seq_name = NULL; - uint32_t *array = NULL; - struct msm_sensor_power_setting *ps; - - struct msm_sensor_power_setting *power_setting; - uint16_t *power_setting_size, size = 0; - bool need_reverse = 0; - - if (!power_info) - return -EINVAL; - - power_setting = power_info->power_setting; - power_setting_size = &power_info->power_setting_size; - - count = of_property_count_strings(of_node, "qcom,cam-power-seq-type"); - *power_setting_size = count; - - CDBG("%s qcom,cam-power-seq-type count %d\n", __func__, count); - - if (count <= 0) - return 0; - - ps = kzalloc(sizeof(*ps) * count, GFP_KERNEL); - if (!ps) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - power_setting = ps; - power_info->power_setting = ps; - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-type", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - if (!strcmp(seq_name, "sensor_vreg")) { - ps[i].seq_type = SENSOR_VREG; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_gpio")) { - ps[i].seq_type = SENSOR_GPIO; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_clk")) { - ps[i].seq_type = SENSOR_CLK; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_i2c_mux")) { - ps[i].seq_type = SENSOR_I2C_MUX; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else { - CDBG("%s: unrecognized seq-type\n", __func__); - rc = -EILSEQ; - goto ERROR1; - } - } - - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-val", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - switch (ps[i].seq_type) { - case SENSOR_VREG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(seq_name, cam_vreg[j].reg_name)) - break; - } - if (j < num_vreg) - ps[i].seq_val = j; - else - rc = -EILSEQ; - break; - case SENSOR_GPIO: - if (!strcmp(seq_name, "sensor_gpio_reset")) - ps[i].seq_val = SENSOR_GPIO_RESET; - else if (!strcmp(seq_name, "sensor_gpio_standby")) - ps[i].seq_val = SENSOR_GPIO_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vdig")) - ps[i].seq_val = SENSOR_GPIO_VDIG; - else if (!strcmp(seq_name, "sensor_gpio_vana")) - ps[i].seq_val = SENSOR_GPIO_VANA; - else if (!strcmp(seq_name, "sensor_gpio_vt_reset")) - ps[i].seq_val = SENSOR_GPIO_VT_RESET; -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - else if (!strcmp(seq_name, "sensor_gpio_vt_standby")) - ps[i].seq_val = SENSOR_GPIO_VT_STANDBY; -#endif - else - rc = -EILSEQ; - break; - case SENSOR_CLK: - if (!strcmp(seq_name, "sensor_cam_mclk")) - ps[i].seq_val = SENSOR_CAM_MCLK; - else if (!strcmp(seq_name, "sensor_cam_clk")) - ps[i].seq_val = SENSOR_CAM_CLK; - else - rc = -EILSEQ; - break; - case SENSOR_I2C_MUX: - if (!strcmp(seq_name, "none")) - ps[i].seq_val = 0; - else - rc = -EILSEQ; - break; - default: - rc = -EILSEQ; - break; - } - if (rc < 0) { - CDBG("%s: unrecognized seq-val\n", __func__); - goto ERROR1; - } - } - - array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-cfg-val", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (ps[i].seq_type == SENSOR_GPIO) { - if (array[i] == 0) - ps[i].config_val = GPIO_OUT_LOW; - else if (array[i] == 1) - ps[i].config_val = GPIO_OUT_HIGH; - } else { - ps[i].config_val = array[i]; - } - CDBG("%s power_setting[%d].config_val = %ld\n", __func__, i, - ps[i].config_val); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-delay", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - ps[i].delay = array[i]; - CDBG("%s power_setting[%d].delay = %d\n", __func__, - i, ps[i].delay); - } - kfree(array); - - size = *power_setting_size; - - if (NULL != ps && 0 != size) - need_reverse = 1; - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - memcpy(power_info->power_down_setting, - ps, sizeof(*ps) * size); - - power_info->power_down_setting_size = size; - - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } -#if defined(CONFIG_SR544) || defined(CONFIG_SR200PC20) - for (c = 0; c < size; c ++) { - if(power_info->power_down_setting[c].seq_val == SENSOR_GPIO_VDIG) - { - int i = c + 1; - power_down_setting_t = power_info->power_down_setting[c]; - power_info->power_down_setting[c] = power_info->power_down_setting[i]; - power_info->power_down_setting[i] = power_down_setting_t; - power_info->power_down_setting[c].delay = 0; - break; - } - } -#endif - } - return rc; -ERROR2: - kfree(array); -ERROR1: - kfree(ps); - power_setting_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-req-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-req-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_req_tbl = kzalloc(sizeof(struct gpio) * count, - GFP_KERNEL); - if (!gconf->cam_gpio_req_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_req_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio req tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_req_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_req_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_req_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_req_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_req_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_req_tbl[i].flags); - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-req-tbl-label", i, - &gconf->cam_gpio_req_tbl[i].label); - CDBG("%s cam_gpio_req_tbl[%d].label = %s\n", __func__, i, - gconf->cam_gpio_req_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_req_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_req_tbl_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-set-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-set-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_set_tbl = kzalloc(sizeof(struct msm_gpio_set_tbl) * - count, GFP_KERNEL); - if (!gconf->cam_gpio_set_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_set_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio set tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_set_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_set_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_set_tbl[i].flags); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-delay", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].delay = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].delay = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].delay); - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_set_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_set_tbl_size = 0; - return rc; -} - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, val = 0; - - gconf->gpio_num_info = kzalloc(sizeof(struct msm_camera_gpio_num_info), - GFP_KERNEL); - if (!gconf->gpio_num_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - rc = of_property_read_u32(of_node, "qcom,gpio-vio", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vio invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VIO] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vana invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VANA] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vdig", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vdig failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vdig invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VDIG] = 1; - CDBG("%s qcom,gpio-vdig %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_RESET] = 1; - CDBG("%s qcom,gpio-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_STANDBY] = 1; - CDBG("%s qcom,gpio-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vt-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_RESET] = 1; - CDBG("%s qcom,gpio-vt-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET]); - } else - rc = 0; - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - rc = of_property_read_u32(of_node, "qcom,gpio-vt-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_STANDBY] = 1; - CDBG("%s qcom,gpio-vt-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY]); - } else - rc = 0; -#endif - - rc = of_property_read_u32(of_node, "qcom,gpio-af-pwdm", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-af-pwdm failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-af-pwdm invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_AF_PWDM] = 1; - CDBG("%s qcom,gpio-af-pwdm %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-en", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-en failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-en invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_EN] = 1; - CDBG("%s qcom,gpio-flash-en %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-now", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-now failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-now invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_NOW] = 1; - CDBG("%s qcom,gpio-flash-now %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%dread qcom,gpio-flash-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_RESET] = 1; - CDBG("%s qcom,gpio-flash-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET]); - } else - rc = 0; - return rc; - -ERROR: - kfree(gconf->gpio_num_info); - gconf->gpio_num_info = NULL; - return rc; -} - -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf) -{ - int rc = 0, val = 0; - char camera_info[100] = {0, }; - - rc = of_property_read_u32(of_node, "cam,isp", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcpy(camera_info, "ISP="); - switch(val) { - case CAM_INFO_ISP_TYPE_INTERNAL : - strcat(camera_info, "INT;"); - break; - case CAM_INFO_ISP_TYPE_EXTERNAL : - strcat(camera_info, "EXT;"); - break; - case CAM_INFO_ISP_TYPE_SOC : - strcat(camera_info, "SOC;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,cal_memory", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CALMEM="); - switch(val) { - case CAM_INFO_CAL_MEM_TYPE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CAL_MEM_TYPE_FROM : - case CAM_INFO_CAL_MEM_TYPE_EEPROM : - case CAM_INFO_CAL_MEM_TYPE_OTP : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,read_version", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "READVER="); - switch(val) { - case CAM_INFO_READ_VER_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_READ_VER_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,core_voltage", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "COREVOLT="); - switch(val) { - case CAM_INFO_CORE_VOLT_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CORE_VOLT_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,upgrade", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "UPGRADE="); - switch(val) { - case CAM_INFO_FW_UPGRADE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_FW_UPGRADE_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_FW_UPGRADE_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,companion_chip", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CC="); - switch(val) { - case CAM_INFO_COMPANION_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_COMPANION_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,ois", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "OIS="); - switch(val) { - case CAM_INFO_OIS_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_OIS_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; - -ERROR1: - strcpy(camera_info, "ISP=NULL;CALMEM=NULL;READVER=NULL;COREVOLT=NULL;UPGRADE=NULL;FW_CC=NULL;OIS=NULL"); - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; -} -#endif - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *vreg_array = NULL; - struct camera_vreg_t *vreg = NULL; - - count = of_property_count_strings(of_node, "qcom,cam-vreg-name"); - CDBG("%s qcom,cam-vreg-name count %d\n", __func__, count); - - if (!count) - return 0; - - vreg = kzalloc(sizeof(*vreg) * count, GFP_KERNEL); - if (!vreg) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *cam_vreg = vreg; - *num_vreg = count; - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-vreg-name", i, - &vreg[i].reg_name); - CDBG("%s reg_name[%d] = %s\n", __func__, i, - vreg[i].reg_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - } - - vreg_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!vreg_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-type", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].type = vreg_array[i]; - CDBG("%s cam_vreg[%d].type = %d\n", __func__, i, - vreg[i].type); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-min-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].min_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].min_voltage = %d\n", __func__, - i, vreg[i].min_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-max-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].max_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].max_voltage = %d\n", __func__, - i, vreg[i].max_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-op-mode", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].op_mode = vreg_array[i]; - CDBG("%s cam_vreg[%d].op_mode = %d\n", __func__, i, - vreg[i].op_mode); - } - - kfree(vreg_array); - return rc; -ERROR2: - kfree(vreg_array); -ERROR1: - kfree(vreg); - *num_vreg = 0; - return rc; -} - -static int msm_camera_enable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_INIT, NULL); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_CFG, (void *)&i2c_conf->i2c_mux_mode); - return 0; -} - -static int msm_camera_disable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_RELEASE, NULL); - return 0; -} - -static int msm_camera_pinctrl_init(struct msm_camera_power_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *sensor_pctrl = NULL; - - sensor_pctrl = &ctrl->pinctrl_info; - sensor_pctrl->pinctrl = devm_pinctrl_get(ctrl->dev); - if (IS_ERR_OR_NULL(sensor_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_active = - pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_suspend - = pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int rc = 0, index = 0, no_gpio = 0, ret = 0; - struct msm_sensor_power_setting *power_setting = NULL; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (ctrl->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - ctrl->gpio_conf->cam_gpiomux_conf_tbl, - ctrl->gpio_conf->cam_gpiomux_conf_tbl_size); - } - ret = msm_camera_pinctrl_init(ctrl); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - ctrl->cam_pinctrl_status = 0; - } else { - ctrl->cam_pinctrl_status = 1; - } - - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - rc = msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) - no_gpio = rc; - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - for (index = 0; index < ctrl->power_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= ctrl->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - ctrl->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - ctrl->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (no_gpio) { - pr_err("%s: request gpio failed\n", __func__); - return no_gpio; - } - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - CDBG("%s:%d gpio set val %d\n", __func__, __LINE__, - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_enable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - - case SENSOR_CLK: - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if (ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - return rc; -} - -static struct msm_sensor_power_setting* -msm_camera_get_power_settings(struct msm_camera_power_ctrl_t *ctrl, - enum msm_sensor_power_seq_type_t seq_type, - uint16_t seq_val) -{ - struct msm_sensor_power_setting *power_setting, *ps = NULL; - int idx; - - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == seq_type && - power_setting->seq_val == seq_val) { - ps = power_setting; - return ps; - } - - } - return ps; -} - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int index = 0, ret = 0; - struct msm_sensor_power_setting *pd = NULL; - struct msm_sensor_power_setting *ps; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) - sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_RELEASE); - - for (index = 0; index < ctrl->power_down_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - pd = &ctrl->power_down_setting[index]; - ps = NULL; - CDBG("%s type %d\n", __func__, pd->seq_type); - switch (pd->seq_type) { - case SENSOR_CLK: - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - if (ps) - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&ps->data[0], - ctrl->clk_info_size, - 0); - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_GPIO: - if (pd->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [pd->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [pd->seq_val], - 0); - break; - case SENSOR_VREG: - if (pd->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - - if (ps) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ps->data[0], - 0); - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - pd->seq_type); - break; - } - if (pd->delay > 20) { - msleep(pd->delay); - } else if (pd->delay) { - usleep_range(pd->delay * 1000, - (pd->delay * 1000) + 1000); - } - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - CDBG("%s exit\n", __func__); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.h b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.h deleted file mode 100644 index f8e858307a7b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_dt_util.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_DT_UTIL_H__ -#define MSM_CAMERA_DT_UTIL_H__ - -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_i2c.h" - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info); - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info); - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params); - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info); - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg); - -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf); -#endif - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c.h b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c.h deleted file mode 100644 index 00a2a6332e78..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_CCI_I2C_H -#define MSM_CAMERA_CCI_I2C_H - -#include -#include -#include "../../include/media/msm_cam_sensor.h" - -struct msm_camera_i2c_client { - struct msm_camera_i2c_fn_t *i2c_func_tbl; - struct i2c_client *client; - struct msm_camera_cci_client *cci_client; - struct msm_camera_spi_client *spi_client; - enum msm_camera_i2c_reg_addr_type addr_type; -}; - -struct msm_camera_i2c_fn_t { - int (*i2c_read) (struct msm_camera_i2c_client *, uint32_t, uint16_t *, - enum msm_camera_i2c_data_type); - int32_t (*i2c_read_seq)(struct msm_camera_i2c_client *, uint32_t, - uint8_t *, uint32_t); - int (*i2c_write) (struct msm_camera_i2c_client *, uint32_t, uint16_t, - enum msm_camera_i2c_data_type); - int (*i2c_write_seq) (struct msm_camera_i2c_client *, uint32_t , - uint8_t *, uint32_t); - int32_t (*i2c_write_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_burst_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_seq_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_seq_reg_setting *); - int32_t (*i2c_write_table_w_microdelay) - (struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_util)(struct msm_camera_i2c_client *, uint16_t); - int32_t (*i2c_write_conf_tbl)(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - int32_t (*i2c_poll)(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); -}; - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd); - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.c deleted file mode 100644 index cd2af2c2751e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundatation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "msm_camera_i2c_mux.h" - -/* TODO move this somewhere else */ -#define MSM_I2C_MUX_DRV_NAME "msm_cam_i2c_mux" -static int msm_i2c_mux_config(struct i2c_mux_device *mux_device, uint8_t *mode) -{ - uint32_t val; - val = msm_camera_io_r(mux_device->ctl_base); - if (*mode == MODE_DUAL) { - msm_camera_io_w(val | 0x3, mux_device->ctl_base); - } else if (*mode == MODE_L) { - msm_camera_io_w(((val | 0x2) & ~(0x1)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config left value is %d\n", val); - } else { - msm_camera_io_w(((val | 0x1) & ~(0x2)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config right value is %d\n", val); - } - return 0; -} - -static int msm_i2c_mux_init(struct i2c_mux_device *mux_device) -{ - int rc = 0, val = 0; - if (mux_device->use_count == 0) { - mux_device->ctl_base = ioremap(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem)); - if (!mux_device->ctl_base) { - rc = -ENOMEM; - return rc; - } - mux_device->rw_base = ioremap(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem)); - if (!mux_device->rw_base) { - rc = -ENOMEM; - iounmap(mux_device->ctl_base); - return rc; - } - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val | 0x200), mux_device->rw_base); - } - mux_device->use_count++; - return 0; -}; - -static int msm_i2c_mux_release(struct i2c_mux_device *mux_device) -{ - int val = 0; - mux_device->use_count--; - if (mux_device->use_count == 0) { - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val & ~0x200), mux_device->rw_base); - iounmap(mux_device->rw_base); - iounmap(mux_device->ctl_base); - } - return 0; -} - -static long msm_i2c_mux_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - mux_device = v4l2_get_subdevdata(sd); - if (mux_device == NULL) { - rc = -ENOMEM; - return rc; - } - mutex_lock(&mux_device->mutex); - switch (cmd) { - case VIDIOC_MSM_I2C_MUX_CFG: - rc = msm_i2c_mux_config(mux_device, (uint8_t *) arg); - break; - case VIDIOC_MSM_I2C_MUX_INIT: - rc = msm_i2c_mux_init(mux_device); - break; - case VIDIOC_MSM_I2C_MUX_RELEASE: - rc = msm_i2c_mux_release(mux_device); - break; - default: - rc = -ENOIOCTLCMD; - } - mutex_unlock(&mux_device->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_i2c_mux_subdev_core_ops = { - .ioctl = &msm_i2c_mux_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_i2c_mux_subdev_ops = { - .core = &msm_i2c_mux_subdev_core_ops, -}; - -static int i2c_mux_probe(struct platform_device *pdev) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - CDBG("%s: device id = %d\n", __func__, pdev->id); - mux_device = kzalloc(sizeof(struct i2c_mux_device), GFP_KERNEL); - if (!mux_device) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - v4l2_subdev_init(&mux_device->subdev, &msm_i2c_mux_subdev_ops); - v4l2_set_subdevdata(&mux_device->subdev, mux_device); - platform_set_drvdata(pdev, &mux_device->subdev); - mutex_init(&mux_device->mutex); - - mux_device->ctl_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_ctl"); - if (!mux_device->ctl_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->ctl_io = request_mem_region(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem), pdev->name); - if (!mux_device->ctl_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->rw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_rw"); - if (!mux_device->rw_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->rw_io = request_mem_region(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem), pdev->name); - if (!mux_device->rw_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->pdev = pdev; - return 0; - -i2c_mux_no_resource: - mutex_destroy(&mux_device->mutex); - kfree(mux_device); - return 0; -} - -static struct platform_driver i2c_mux_driver = { - .probe = i2c_mux_probe, - .driver = { - .name = MSM_I2C_MUX_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_camera_i2c_mux_init_module(void) -{ - return platform_driver_register(&i2c_mux_driver); -} - -static void __exit msm_camera_i2c_mux_exit_module(void) -{ - platform_driver_unregister(&i2c_mux_driver); -} - -module_init(msm_camera_i2c_mux_init_module); -module_exit(msm_camera_i2c_mux_exit_module); -MODULE_DESCRIPTION("MSM Camera I2C mux driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.h b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.h deleted file mode 100644 index 30f908b12e15..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_i2c_mux.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_I2C_MUX_H -#define MSM_I2C_MUX_H - -#include -#include - -struct i2c_mux_device { - struct platform_device *pdev; - struct v4l2_subdev subdev; - struct resource *ctl_mem; - struct resource *ctl_io; - void __iomem *ctl_base; - struct resource *rw_mem; - struct resource *rw_io; - void __iomem *rw_base; - struct mutex mutex; - unsigned use_count; -}; - -struct i2c_mux_cfg_params { - struct v4l2_subdev *subdev; - void *parms; -}; - -#define VIDIOC_MSM_I2C_MUX_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct i2c_mux_cfg_params) - -#define VIDIOC_MSM_I2C_MUX_INIT \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct v4l2_subdev*) - -#define VIDIOC_MSM_I2C_MUX_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct v4l2_subdev*) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.c deleted file mode 100644 index 426200b42ac2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.c +++ /dev/null @@ -1,672 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_io_util.h" - -#define BUFF_SIZE_128 128 - -//#define CONFIG_MSMB_CAMERA_DEBUG 1 -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#ifdef CONFIG_MFD_RT5033_RESET_WA -#ifdef CONFIG_CAM_USE_EXT_VANA_GPIO -#define RT5033_RESET_WA_VREG_NAME ("cam_vdig") -#else -#define RT5033_RESET_WA_VREG_NAME ("cam_vana") -#endif -#endif - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) -extern unsigned int system_rev; -#endif - -void msm_camera_io_w(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - writel_relaxed((data), (addr)); -} - -void msm_camera_io_w_mb(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - wmb(); - writel_relaxed((data), (addr)); - wmb(); -} - -u32 msm_camera_io_r(void __iomem *addr) -{ - uint32_t data = readl_relaxed(addr); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -u32 msm_camera_io_r_mb(void __iomem *addr) -{ - uint32_t data; - rmb(); - data = readl_relaxed(addr); - rmb(); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -void msm_camera_io_memcpy_toio(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < len; i++) - writel_relaxed(*s++, d++); -} - -void msm_camera_io_dump(void __iomem *addr, int size) -{ - char line_str[BUFF_SIZE_128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - CDBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "0x%pK: ", p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%d ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - CDBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - CDBG("%s\n", line_str); -} - -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len); - msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4); - msm_camera_io_dump(dest_addr, len); -} - -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < (len / 4); i++) - msm_camera_io_w_mb(*s++, d++); -} - -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk) -{ - int i; - int rc = 0; - struct clk *mux_clk = NULL; - struct clk *src_clk = NULL; - - for (i = 0; i < num_clk; i++) { - if (clk_src_info[i].clk_name) { - mux_clk = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(mux_clk)) { - pr_err("%s get failed\n", - clk_info[i].clk_name); - continue; - } - src_clk = clk_get(dev, clk_src_info[i].clk_name); - if (IS_ERR(src_clk)) { - pr_err("%s get failed\n", - clk_src_info[i].clk_name); - continue; - } - clk_set_parent(mux_clk, src_clk); - } - } - return rc; -} - -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable) -{ - int i; - int rc = 0; - long clk_rate; - if (enable) { - for (i = 0; i < num_clk; i++) { - CDBG("%s enable %s\n", __func__, - clk_info[i].clk_name); - clk_ptr[i] = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(clk_ptr[i])) { - pr_err("%s get failed\n", clk_info[i].clk_name); - rc = PTR_ERR(clk_ptr[i]); - goto cam_clk_get_err; - } - if (clk_info[i].clk_rate > 0) { - rc = clk_set_rate(clk_ptr[i], - clk_info[i].clk_rate); - if (rc < 0) { - pr_err("%s set failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } else if (clk_info[i].clk_rate == INIT_RATE) { - clk_rate = clk_get_rate(clk_ptr[i]); - if (clk_rate == 0) { - clk_rate = - clk_round_rate(clk_ptr[i], 0); - if (clk_rate < 0) { - pr_err("%s round rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - rc = clk_set_rate(clk_ptr[i], - clk_rate); - if (rc < 0) { - pr_err("%s set rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } - } - rc = clk_prepare(clk_ptr[i]); - if (rc < 0) { - pr_err("%s prepare failed\n", - clk_info[i].clk_name); - goto cam_clk_prepare_err; - } - - rc = clk_enable(clk_ptr[i]); - if (rc < 0) { - pr_err("%s enable failed\n", - clk_info[i].clk_name); - goto cam_clk_enable_err; - } - if (clk_info[i].delay > 20) { - msleep(clk_info[i].delay); - } else if (clk_info[i].delay) { - usleep_range(clk_info[i].delay * 1000, - (clk_info[i].delay * 1000) + 1000); - } - } - } else { - for (i = num_clk - 1; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - CDBG("%s disable %s\n", __func__, - clk_info[i].clk_name); - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - } - return rc; - - -cam_clk_enable_err: - clk_unprepare(clk_ptr[i]); -cam_clk_prepare_err: -cam_clk_set_err: - clk_put(clk_ptr[i]); -cam_clk_get_err: - for (i--; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - return rc; -} - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config) -{ - int i = 0, j = 0; - int rc = 0; - struct camera_vreg_t *curr_vreg; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (cam_vreg == NULL) { - pr_err("%s:%d cam_vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (config) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - reg_ptr[j] = regulator_get(dev, - curr_vreg->reg_name); - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s get failed\n", - __func__, - curr_vreg->reg_name); - reg_ptr[j] = NULL; - goto vreg_get_fail; - } - if (curr_vreg->type == REG_LDO) { - rc = regulator_set_voltage( - reg_ptr[j], - curr_vreg->min_voltage, - curr_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (curr_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode( - reg_ptr[j], - curr_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s:%s set optimum mode fail\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - if (reg_ptr[j]) { - if (curr_vreg->type == REG_LDO) { - if (curr_vreg->op_mode >= 0) { - regulator_set_optimum_mode( - reg_ptr[j], 0); - } - regulator_set_voltage( - reg_ptr[j], 0, curr_vreg-> - max_voltage); - } - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - } - } - } - return 0; - -vreg_unconfig: -if (curr_vreg->type == REG_LDO) - regulator_set_optimum_mode(reg_ptr[j], 0); - -vreg_set_opt_mode_fail: -if (curr_vreg->type == REG_LDO) - regulator_set_voltage(reg_ptr[j], 0, - curr_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - -vreg_get_fail: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - goto vreg_unconfig; - } - return -ENODEV; -} - -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable) -{ - int i = 0, j = 0, rc = 0; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (enable) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s null regulator\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - rc = regulator_enable(reg_ptr[j]); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } - return rc; -disable_vreg: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - return rc; -} - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting) -{ - int rc = 0; - if (!bus_perf_client) { - pr_err("%s: Bus Client NOT Registered!!!\n", __func__); - return; - } - - switch (perf_setting) { - case S_EXIT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - msm_bus_scale_unregister_client(bus_perf_client); - break; - case S_PREVIEW: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - break; - case S_VIDEO: - rc = msm_bus_scale_client_update_request(bus_perf_client, 2); - break; - case S_CAPTURE: - rc = msm_bus_scale_client_update_request(bus_perf_client, 3); - break; - case S_ZSL: - rc = msm_bus_scale_client_update_request(bus_perf_client, 4); - break; - case S_LIVESHOT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 5); - break; - case S_DEFAULT: - break; - default: - pr_warning("%s: INVALID CASE\n", __func__); - } -} - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en) -{ - int rc = 0, i; - - if (gpio_en) { - for (i = 0; i < gpio_tbl_size; i++) { - gpio_set_value_cansleep(gpio_tbl[i].gpio, - gpio_tbl[i].flags); - usleep_range(gpio_tbl[i].delay, - gpio_tbl[i].delay + 1000); - } - } else { - for (i = gpio_tbl_size - 1; i >= 0; i--) { - if (gpio_tbl[i].flags) - gpio_set_value_cansleep(gpio_tbl[i].gpio, - GPIOF_OUT_INIT_LOW); - } - } - return rc; -} - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config) -{ - int rc = 0; -#ifdef CONFIG_MFD_RT5033_RESET_WA - int rt_rc = 0; -#endif - - if (config) { - if (!dev || !cam_vreg || !reg_ptr) { - pr_err("%s: get failed NULL parameter\n", __func__); - goto vreg_get_fail; - } - CDBG("%s enable %s\n", __func__, cam_vreg->reg_name); - if (!strncmp(cam_vreg->reg_name, "cam_vdig", 8)) { -#if defined(CONFIG_SEC_ROSSA_PROJECT) - *reg_ptr = regulator_get(dev, "CAM_SENSOR_IO_1.8V"); -#elif defined(CONFIG_SEC_NOVEL_PROJECT) - *reg_ptr = regulator_get(dev, "CAM_SENSOR_CORE_1.8V"); -#else - *reg_ptr = regulator_get(dev, "CAM_SENSOR_CORE_1.2V"); -#endif - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } -#if defined(CONFIG_SEC_NOVEL_PROJECT) - } else if (!strncmp(cam_vreg->reg_name, "cam_vana_vt", 11)) { - *reg_ptr = regulator_get(dev, "LDO3"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } -#endif - } else if (!strncmp(cam_vreg->reg_name, "cam_vana", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - } else if (!strncmp(cam_vreg->reg_name, "cam_vio_vt", 10)) { - pr_err("[cam_vio_vt]%s:%d system_rev:%d\n", __func__, __LINE__, system_rev); - if(system_rev == 0) { - *reg_ptr = regulator_get(dev, "LDO2"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#endif - } else { - *reg_ptr = regulator_get(dev, cam_vreg->reg_name); - if (IS_ERR_OR_NULL(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - if (cam_vreg->type == REG_LDO) { - rc = regulator_set_voltage( - *reg_ptr, cam_vreg->min_voltage, - cam_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (cam_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode(*reg_ptr, - cam_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s: %s set optimum mode failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } -#ifdef CONFIG_MFD_RT5033_RESET_WA - if (!strncmp(cam_vreg->reg_name, RT5033_RESET_WA_VREG_NAME, 8)){ - rt_rc = regulator_get_status(*reg_ptr); - if((rt_rc == 2) || (rt_rc == 8)){ - BUG_ON(1); - } else { - pr_err("[RT5033] result : 0x%x\n", rt_rc); - } - } -#endif - rc = regulator_enable(*reg_ptr); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg->reg_name); - goto vreg_unconfig; - } - } else { - if (*reg_ptr) { - CDBG("%s disable %s\n", __func__, cam_vreg->reg_name); - regulator_disable(*reg_ptr); - if (cam_vreg->type == REG_LDO) { - if (cam_vreg->op_mode >= 0) - regulator_set_optimum_mode(*reg_ptr, 0); - regulator_set_voltage( - *reg_ptr, 0, cam_vreg->max_voltage); - } - regulator_put(*reg_ptr); - *reg_ptr = NULL; - } - } - return 0; - -vreg_unconfig: -if (cam_vreg->type == REG_LDO) - regulator_set_optimum_mode(*reg_ptr, 0); - -vreg_set_opt_mode_fail: -if (cam_vreg->type == REG_LDO) - regulator_set_voltage(*reg_ptr, 0, cam_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(*reg_ptr); - *reg_ptr = NULL; - -vreg_get_fail: - return -ENODEV; -} - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en) -{ - int rc = 0, i = 0, err = 0; - - if (!gpio_tbl || !size) { - pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__, - __LINE__, gpio_tbl, size); - return -EINVAL; - } - for (i = 0; i < size; i++) { - CDBG("%s:%d i %d, gpio %d dir %ld\n", __func__, __LINE__, i, - gpio_tbl[i].gpio, gpio_tbl[i].flags); - } - if (gpio_en) { - for (i = 0; i < size; i++) { - err = gpio_request_one(gpio_tbl[i].gpio, - gpio_tbl[i].flags, gpio_tbl[i].label); - if (err) { - /* - * After GPIO request fails, contine to - * apply new gpios, outout a error message - * for driver bringup debug - */ - pr_err("%s:%d gpio %d:%s request fails\n", - __func__, __LINE__, - gpio_tbl[i].gpio, gpio_tbl[i].label); - } - } - } else { - gpio_free_array(gpio_tbl, size); - } - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.h b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.h deleted file mode 100644 index 04d34092b90b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_io_util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_IO_UTIL_H -#define __MSM_CAMERA_IO_UTIL_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include "../../include/media/msm_cam_sensor.h" - -#define NO_SET_RATE -1 -#define INIT_RATE -2 - -void msm_camera_io_w(u32 data, void __iomem *addr); -void msm_camera_io_w_mb(u32 data, void __iomem *addr); -u32 msm_camera_io_r(void __iomem *addr); -u32 msm_camera_io_r_mb(void __iomem *addr); -void msm_camera_io_dump(void __iomem *addr, int size); -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk); -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable); - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config); -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable); - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting); - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en); - -void msm_camera_config_single_gpio(uint16_t gpio, unsigned long flags, - int gpio_en); - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config); - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_qup_i2c.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_qup_i2c.c deleted file mode 100644 index 4e29f8b086ae..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_qup_i2c.c +++ /dev/null @@ -1,546 +0,0 @@ -/* Copyright (c) 2011, 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" - -//#define CONFIG_MSMB_CAMERA_DEBUG 1 -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -static int32_t msm_camera_qup_i2c_rxdata( - struct msm_camera_i2c_client *dev_client, unsigned char *rxdata, - int data_length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msgs[] = { - { - .addr = saddr, - .flags = 0, - .len = dev_client->addr_type, - .buf = rxdata, - }, - { - .addr = saddr, - .flags = I2C_M_RD, - .len = data_length, - .buf = rxdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msgs, 2); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_rxdata failed 0x%x\n", saddr); - return rc; -} - -static int32_t msm_camera_qup_i2c_txdata( - struct msm_camera_i2c_client *dev_client, unsigned char *txdata, - int length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msg[] = { - { - .addr = saddr, - .flags = 0, - .len = length, - .buf = txdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msg, 1); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_txdata faild 0x%x\n", saddr); - return rc; -} - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, data_type); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - return rc; - } - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; - int i; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, num_byte); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - return rc; - } - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - return rc; -} - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - uint8_t len = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", - __func__, addr, data_type); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - S_I2C_DBG("Data: 0x%x\n", data); - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) { - buf[len] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - len += 1; - } else if (data_type == MSM_CAMERA_I2C_WORD_DATA) { - buf[len] = data >> BITS_PER_BYTE; - buf[len+1] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - S_I2C_DBG("Byte %d: 0x%x\n", len+1, buf[len+1]); - len += 2; - } - rc = msm_camera_qup_i2c_txdata(client, buf, len); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; - uint8_t len = 0, i = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - for (i = 0; i < num_byte; i++) { - buf[i+len] = data[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i+len, buf[i+len]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - rc = msm_camera_qup_i2c_txdata(client, buf, len+num_byte); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - CDBG("%s addr 0x%x data 0x%x\n", __func__, - reg_setting->reg_addr, reg_setting->reg_data); - - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - if (reg_setting->delay) - usleep_range(reg_setting->delay, - reg_setting->delay + 1000); - reg_setting++; - } - return rc; -} - -static int32_t msm_camera_qup_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - int i; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - for (i = 0; i < I2C_POLL_MAX_ITERATION; i++) { - rc = msm_camera_qup_i2c_compare(client, - addr, data, data_type); - if (rc == 0 || rc < 0) - break; - usleep_range(10000, 11000); - } - return rc; -} - -static int32_t msm_camera_qup_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_qup_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_qup_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_qup_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_qup_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_qup_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - pr_err("%s, E. ", __func__); - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_qup_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_qup_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_qup_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.c b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.c deleted file mode 100644 index 9fb1b7cf2c9f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.c +++ /dev/null @@ -1,407 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_spi.h" - -//#define CONFIG_MSMB_CAMERA_DEBUG 1 -#undef SPIDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define SPIDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define SPIDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -static int msm_camera_spi_txfr(struct spi_device *spi, char *txbuf, - char *rxbuf, int num_byte) -{ - struct spi_transfer t; - struct spi_message m; - - memset(&t, 0, sizeof(t)); - t.tx_buf = txbuf; - t.rx_buf = rxbuf; - t.len = num_byte; - spi_message_init(&m); - spi_message_add_tail(&t, &m); - - return spi_sync(spi, &m); -} - -/** - * msm_camera_set_addr() - helper function to set transfer address - * @addr: device address - * @addr_len: the addr field length of an instruction - * @type: type (i.e. byte-length) of @addr - * @str: shifted address output, must be zeroed when passed in - * - * This helper function sets @str based on the addr field length of an - * instruction and the data length. - */ -static void msm_camera_set_addr(uint32_t addr, uint8_t addr_len, - enum msm_camera_i2c_reg_addr_type type, - char *str) -{ - int i, len; - - if (addr_len < type) - SPIDBG("%s: omitting higher bits in address\n", __func__); - - /* only support transfer MSB first for now */ - len = addr_len - type; - for (i = len; i < addr_len; i++) { - if (i >= 0) - str[i] = (addr >> (BITS_PER_BYTE * (addr_len - i - 1))) - & 0xFF; - } - -} - -/** - * msm_camera_spi_tx_helper() - wrapper for SPI transaction - * @client: io client - * @inst: inst of this transaction - * @addr: device addr following the inst - * @data: output byte array (could be NULL) - * @num_byte: size of @data - * @tx, rx: optional transfer buffer. It must be at least header - * + @num_byte long. - * - * This is the core function for SPI transaction, except for writes. It first - * checks address type, then allocates required memory for tx/rx buffers. - * It sends out , and optionally receives @num_byte of response, - * if @data is not NULL. This function does not check for wait conditions, - * and will return immediately once bus transaction finishes. - * - * This function will allocate buffers of header + @num_byte long. For - * large transfers, the allocation could fail. External buffer @tx, @rx - * should be passed in to bypass allocation. The size of buffer should be - * at least header + num_byte long. Since buffer is managed externally, - * @data will be ignored, and read results will be in @rx. - * @tx, @rx also can be used for repeated transfers to improve performance. - */ -int32_t msm_camera_spi_tx_helper(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst, uint32_t addr, uint8_t *data, - uint32_t num_byte, char *tx, char *rx) -{ - int32_t rc = -EINVAL; - struct spi_device *spi = client->spi_client->spi_master; - char *ctx = NULL, *crx = NULL; - uint32_t len, hlen; - uint8_t retries = client->spi_client->retries; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - - hlen = msm_camera_spi_get_hlen(inst); - len = hlen + num_byte; - - if (tx) - ctx = tx; - else - ctx = kzalloc(len, GFP_KERNEL); - if (!ctx) - return -ENOMEM; - - if (num_byte) { - if (rx) - crx = rx; - else - crx = kzalloc(len, GFP_KERNEL); - if (!crx) { - if (!tx) - kfree(ctx); - return -ENOMEM; - } - } else { - crx = NULL; - } - - ctx[0] = inst->opcode; - msm_camera_set_addr(addr, inst->addr_len, client->addr_type, ctx + 1); - while ((rc = msm_camera_spi_txfr(spi, ctx, crx, len)) && retries) { - retries--; - msleep(client->spi_client->retry_delay); - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - goto out; - } - if (data && num_byte && !rx) - memcpy(data, crx + hlen, num_byte); - -out: - if (!tx) - kfree(ctx); - if (!rx) - kfree(crx); - return rc; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EINVAL; - uint8_t temp[2]; - - if ((data_type != MSM_CAMERA_I2C_BYTE_DATA) - && (data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - rc = msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read, addr, &temp[0], - data_type, NULL, NULL); - if (rc < 0) - return rc; - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = temp[0]; - else - *data = (temp[0] << BITS_PER_BYTE) | temp[1]; - - SPIDBG("%s: addr 0x%x, data %u\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, data, num_byte, - NULL, NULL); -} - -/** - * msm_camera_spi_read_seq_l()- function for large SPI reads - * @client: io client - * @addr: device address to read - * @num_byte: read length - * @tx,rx: pre-allocated SPI buffer. Its size must be at least - * header + num_byte - * - * This function is used for large transactions. Instead of allocating SPI - * buffer each time, caller is responsible for pre-allocating memory buffers. - * Memory buffer must be at least header + num_byte. Header length can be - * obtained by msm_camera_spi_get_hlen(). - */ -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, NULL, num_byte, - tx, rx); -} - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.query_id, addr, data, num_byte, - NULL, NULL); -} - -static int32_t msm_camera_spi_read_status_reg( - struct msm_camera_i2c_client *client, uint8_t *status) -{ - struct msm_camera_spi_inst *rs = - &client->spi_client->cmd_tbl.read_status; - if (rs->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - return msm_camera_spi_tx_helper(client, rs, 0, status, 1, NULL, NULL); -} - -static int32_t msm_camera_spi_device_busy(struct msm_camera_i2c_client *client, - uint8_t *busy) -{ - int rc; - uint8_t st = 0; - rc = msm_camera_spi_read_status_reg(client, &st); - if (rc < 0) { - SPIDBG("%s: failed to read status reg\n", __func__); - return rc; - } - *busy = st & client->spi_client->busy_mask; - return 0; -} - -static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst) -{ - uint8_t busy; - int i, rc; - SPIDBG("%s: op 0x%x wait start\n", __func__, inst->opcode); - for (i = 0; i <= inst->delay_count; i++) { - rc = msm_camera_spi_device_busy(client, &busy); - if (rc < 0) - return rc; - if (!busy) - break; - else - msleep(inst->delay_intv); - SPIDBG("%s: op 0x%x wait\n", __func__, inst->opcode); - } - if (i > inst->delay_count) { - SPIDBG("%s: op %x timed out\n", __func__, inst->opcode); - return -ETIMEDOUT; - } - SPIDBG("%s: op %x finished\n", __func__, inst->opcode); - return 0; -} - -static int32_t msm_camera_spi_write_enable( - struct msm_camera_i2c_client *client) -{ - struct msm_camera_spi_inst *we = - &client->spi_client->cmd_tbl.write_enable; - int rc; - if (we->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - rc = msm_camera_spi_tx_helper(client, we, 0, NULL, 0, NULL, NULL); - if (rc < 0) - SPIDBG("%s: write enable failed\n", __func__); - return rc; -} - -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size) -{ - struct msm_camera_spi_inst *se = &client->spi_client->cmd_tbl.erase; - int rc = 0; - uint32_t cur; - uint32_t end = addr + size; - uint32_t erase_size = client->spi_client->erase_size; - end = addr + size; - for (cur = rounddown(addr, erase_size); cur < end; cur += erase_size) { - SPIDBG("%s: erasing 0x%x\n", __func__, cur); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - rc = msm_camera_spi_tx_helper(client, se, cur, NULL, 0, - NULL, NULL); - if (rc < 0) { - SPIDBG("%s: erase failed\n", __func__); - return rc; - } - rc = msm_camera_spi_wait(client, se); - if (rc < 0) { - SPIDBG("%s: erase timedout\n", __func__); - return rc; - } - } - return rc; -} -/** - * msm_camera_spi_page_program() - core function to perform write - * @client: need for obtaining SPI device - * @addr: address to program on device - * @data: data to write - * @len: size of data - * @tx: tx buffer, size >= header + len - * - * This function performs SPI write, and has no boundary check. Writing range - * should not cross page boundary, or data will be corrupted. Transaction is - * guaranteed to be finished when it returns. This function should never be - * used outside msm_camera_spi_write_seq(). - */ -static int32_t msm_camera_spi_page_program(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint16_t len, uint8_t *tx) -{ - int rc; - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - struct spi_device *spi = client->spi_client->spi_master; - uint8_t retries = client->spi_client->retries; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - SPIDBG("%s: addr 0x%x, size 0x%x\n", __func__, addr, len); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - memset(tx, 0, header_len); - tx[0] = pg->opcode; - msm_camera_set_addr(addr, pg->addr_len, client->addr_type, tx + 1); - memcpy(tx + header_len, data, len); - SPIDBG("%s: tx(%u): %02x %02x %02x %02x\n", __func__, - len, tx[0], tx[1], tx[2], tx[3]); - while ((rc = spi_write(spi, tx, len + header_len)) && retries) { - rc = msm_camera_spi_wait(client, pg); - msleep(client->spi_client->retry_delay); - retries--; - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - return rc; - } - rc = msm_camera_spi_wait(client, pg); - return rc; -} -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - const uint32_t page_size = client->spi_client->page_size; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - uint16_t len; - uint32_t cur_len, end; - char *tx, *pdata = data; - int rc = -EINVAL; - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - /* single page write */ - if ((addr % page_size) + num_byte <= page_size) { - len = header_len + num_byte; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - rc = msm_camera_spi_page_program(client, addr, data, - num_byte, tx); - if (rc < 0) - goto ERROR; - goto OUT; - } - /* multi page write */ - len = header_len + page_size; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - while (num_byte) { - end = min(page_size, (addr % page_size) + num_byte); - cur_len = end - (addr % page_size); - rc = msm_camera_spi_page_program(client, addr, pdata, - cur_len, tx); - if (rc < 0) - goto ERROR; - addr += cur_len; - pdata += cur_len; - num_byte -= cur_len; - } - goto OUT; -NOMEM: - SPIDBG("%s: memory allocation failed\n", __func__); - return -ENOMEM; -ERROR: - SPIDBG("%s: error write\n", __func__); -OUT: - kfree(tx); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.h b/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.h deleted file mode 100644 index 0949667b3c72..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/io/msm_camera_spi.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_SPI_H -#define __MSM_CAMERA_SPI_H - -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_camera_i2c.h" - -/** - * Common SPI communication scheme - * tx: [addr][wait][write buffer] - * rx: [read buffer] - * Some inst require polling busy reg until it's done - */ -struct msm_camera_spi_inst { - uint8_t opcode; /* one-byte opcode */ - uint8_t addr_len; /* addr len in bytes */ - uint8_t dummy_len; /* setup cycles */ - uint8_t delay_intv; /* delay intv for this inst (ms) */ - uint8_t delay_count; /* total delay count for this inst */ -}; - -struct msm_camera_spi_inst_tbl { - struct msm_camera_spi_inst read; - struct msm_camera_spi_inst read_seq; - struct msm_camera_spi_inst query_id; - struct msm_camera_spi_inst page_program; - struct msm_camera_spi_inst write_enable; - struct msm_camera_spi_inst read_status; - struct msm_camera_spi_inst erase; -}; - -struct msm_camera_spi_client { - struct spi_device *spi_master; - struct msm_camera_spi_inst_tbl cmd_tbl; - uint8_t device_id; - uint8_t device_id0; - uint8_t device_id1; - uint8_t device_id2; - uint8_t mfr_id; - uint8_t mfr_id0; - uint8_t mfr_id1; - uint8_t mfr_id2; - uint8_t retry_delay; /* ms */ - uint8_t retries; /* retry times upon failure */ - uint8_t busy_mask; /* busy bit in status reg */ - uint16_t page_size; /* page size for page program */ - uint32_t erase_size; /* minimal erase size */ -}; - -static __always_inline -uint16_t msm_camera_spi_get_hlen(struct msm_camera_spi_inst *inst) -{ - return sizeof(inst->opcode) + inst->addr_len + inst->dummy_len; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx); - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.c b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.c deleted file mode 100644 index 92f83ed1e1c8..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.c +++ /dev/null @@ -1,1728 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include -#include -#include - -//#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -extern unsigned int system_rev; - -#if defined(CONFIG_FLED_LM3632) -extern void ssflash_led_turn_on(void); -extern void ssflash_led_turn_off(void); -#endif -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) -int32_t msm_sensor_flash_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - - if(system_rev >= 5){ - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - if(s_ctrl->sensordata->slave_info->sensor_id == 0x5e30){ - if(cam_info->value_1 == 3) { - pr_err("%s : KTD Front LED turn on\n", __func__); - ktd2692_flash_on(1); - } else if(cam_info->value_1 == 0) { - pr_err("%s : KTD Front LED turn off\n", __func__); - ktd2692_flash_on(0); - }else{ - pr_err("%s : KTD Invalid LED value\n", __func__); - } - } - return 0; - }else{ - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - if(s_ctrl->sensordata->slave_info->sensor_id == 0x5e30){ - if(cam_info->value_1 == 3) { - pr_err("%s : Front LED turn on\n", __func__); - ssflash_led_turn_on(); - } else if(cam_info->value_1 == 0) { - pr_err("%s : Front LED turn off\n", __func__); - ssflash_led_turn_off(); - }else{ - pr_err("%s : Invalid LED value\n", __func__); - } - } - return 0; -} -} -#endif - -static void msm_sensor_adjust_mclk(struct msm_camera_power_ctrl_t *ctrl) -{ - int idx; - struct msm_sensor_power_setting *power_setting; - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == SENSOR_CLK && - power_setting->seq_val == SENSOR_CAM_MCLK) { - if (power_setting->config_val == 24000000) { - power_setting->config_val = 23880000; - CDBG("%s MCLK request adjusted to 23.88MHz\n" - , __func__); - } - break; - } - } - - return; -} - -static int32_t msm_camera_get_power_settimgs_from_sensor_lib( - struct msm_camera_power_ctrl_t *power_info, - struct msm_sensor_power_setting_array *power_setting_array) -{ - int32_t rc = 0; - uint32_t size; - struct msm_sensor_power_setting *ps; - bool need_reverse = 0; - - if ((NULL == power_info->power_setting) || - (0 == power_info->power_setting_size)) { - - ps = power_setting_array->power_setting; - size = power_setting_array->size; - if ((NULL == ps) || (0 == size)) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -EINVAL; - goto FAILED_1; - } - - power_info->power_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FAILED_1; - } - memcpy(power_info->power_setting, - power_setting_array->power_setting, - sizeof(*ps) * size); - power_info->power_setting_size = size; - } - - ps = power_setting_array->power_down_setting; - size = power_setting_array->size_down; - if (NULL == ps || 0 == size) { - ps = power_info->power_setting; - size = power_info->power_setting_size; - need_reverse = 1; - } - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_UP; - } - memcpy(power_info->power_down_setting, - ps, - sizeof(*ps) * size); - power_info->power_down_setting_size = size; - - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } - } - - return 0; -FREE_UP: - kfree(power_info->power_setting); -FAILED_1: - return rc; -} - -static int32_t msm_sensor_get_dt_data(struct device_node *of_node, - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, i = 0, ret = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct msm_camera_sensor_board_info *sensordata = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - s_ctrl->sensordata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - rc = of_property_read_string(of_node, "qcom,sensor-name", - &sensordata->sensor_name); - CDBG("%s qcom,sensor-name %s, rc %d\n", __func__, - sensordata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, s_ctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - /* Get sensor mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - CDBG("%s:%d Default sensor mount angle\n", - __func__, __LINE__); - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Default sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = 0; - } - CDBG("%s qcom,sensor-position %d\n", __func__, - sensordata->sensor_info->position); - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Default sensor mode\n", __func__, __LINE__); - sensordata->sensor_info->modes_supported = 0; - } - CDBG("%s qcom,sensor-mode %d\n", __func__, - sensordata->sensor_info->modes_supported); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 %d\n", __func__, - s_ctrl->set_mclk_23880000); - - rc = msm_sensor_get_dt_csi_data(of_node, &sensordata->csi_lane_params); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSOR_INFO; - } - - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) - goto FREE_CSI; - - rc = msm_camera_get_dt_power_setting_data(of_node, - sensordata->power_info.cam_vreg, - sensordata->power_info.num_vreg, - &sensordata->power_info); - - - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - - rc = msm_camera_get_power_settimgs_from_sensor_lib( - &sensordata->power_info, - &s_ctrl->power_setting_array); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_PS; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_REQ_TBL; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_SET_TBL; - } - } - rc = msm_sensor_get_dt_actuator_data(of_node, - &sensordata->actuator_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_PIN_TBL; - } - - sensordata->slave_info = kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!sensordata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_ACTUATOR_INFO; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SLAVE_INFO; - } - - sensordata->slave_info->sensor_slave_addr = id_info[0]; - sensordata->slave_info->sensor_id_reg_addr = id_info[1]; - sensordata->slave_info->sensor_id = id_info[2]; - CDBG("%s:%d slave addr 0x%x sensor reg 0x%x id 0x%x\n", - __func__, __LINE__, - sensordata->slave_info->sensor_slave_addr, - sensordata->slave_info->sensor_id_reg_addr, - sensordata->slave_info->sensor_id); - - /*Optional property, don't return error if absent */ - ret = of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("%s qcom,misc_regulator %s, rc %d\n", __func__, - sensordata->misc_regulator, ret); - - kfree(gpio_array); - - return rc; - -FREE_SLAVE_INFO: - kfree(s_ctrl->sensordata->slave_info); -FREE_ACTUATOR_INFO: - kfree(s_ctrl->sensordata->actuator_info); -FREE_GPIO_PIN_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); -FREE_GPIO_SET_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); -FREE_GPIO_REQ_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(s_ctrl->sensordata->power_info.gpio_conf); -FREE_PS: - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->power_info.power_down_setting); -FREE_VREG: - kfree(s_ctrl->sensordata->power_info.cam_vreg); -FREE_CSI: - kfree(s_ctrl->sensordata->csi_lane_params); -FREE_SENSOR_INFO: - kfree(s_ctrl->sensordata->sensor_info); -FREE_SENSORDATA: - kfree(s_ctrl->sensordata); - kfree(gpio_array); - return rc; -} - -static void msm_sensor_misc_regulator( - struct msm_sensor_ctrl_t *sctrl, uint32_t enable) -{ - int32_t rc = 0; - if (enable) { - sctrl->misc_regulator = (void *)rpm_regulator_get( - &sctrl->pdev->dev, sctrl->sensordata->misc_regulator); - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode(sctrl->misc_regulator, - RPM_REGULATOR_MODE_HPM); - if (rc < 0) { - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } else { - pr_err("%s: Failed to vote for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - } - } else { - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode( - (struct rpm_regulator *)sctrl->misc_regulator, - RPM_REGULATOR_MODE_AUTO); - if (rc < 0) - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } -} - -int32_t msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (!s_ctrl->pdev && !s_ctrl->sensor_i2c_client->client) - return 0; - kfree(s_ctrl->sensordata->slave_info); - kfree(s_ctrl->sensordata->cam_slave_info); - kfree(s_ctrl->sensordata->actuator_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->csi_lane_params); - kfree(s_ctrl->sensordata->sensor_info); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(s_ctrl->sensordata); - return 0; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8610_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - struct msm_camera_power_ctrl_t *power_info; - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_i2c_client *sensor_i2c_client; - - if (!s_ctrl) { - pr_err("%s:%d failed: s_ctrl %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - power_info = &s_ctrl->sensordata->power_info; - sensor_device_type = s_ctrl->sensor_device_type; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) - if(s_ctrl->sensordata->slave_info->sensor_id == 0x5e30){ - pr_err("%s : Front LED turn off\n", __func__); - if(system_rev >= 5) - ktd2692_flash_on(0); - else - ssflash_led_turn_off(); - } -#endif - if (!power_info || !sensor_i2c_client) { - pr_err("%s:%d failed: power_info %pK sensor_i2c_client %pK\n", - __func__, __LINE__, power_info, sensor_i2c_client); - return -EINVAL; - } - return msm_camera_power_down(power_info, sensor_device_type, - sensor_i2c_client); -} - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - struct msm_camera_power_ctrl_t *power_info; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; - uint32_t retry = 0; - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - power_info = &s_ctrl->sensordata->power_info; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!power_info || !sensor_i2c_client || !slave_info || - !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK %pK\n", - __func__, __LINE__, power_info, - sensor_i2c_client, slave_info, sensor_name); - return -EINVAL; - } - - CDBG("set__mclk_23880000: %d", s_ctrl->set_mclk_23880000); - if (s_ctrl->set_mclk_23880000) - msm_sensor_adjust_mclk(power_info); - - for (retry = 0; retry < 3; retry++) { - rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type, - sensor_i2c_client); - if (rc < 0) - return rc; - rc = msm_sensor_check_id(s_ctrl); - if (rc < 0) { - msm_camera_power_down(power_info, - s_ctrl->sensor_device_type, sensor_i2c_client); - msleep(20); - continue; - } else { - break; - } - } - - return rc; -} - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; -#if defined(CONFIG_SEC_ROSSA_PROJECT) - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; -#endif - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (slave_info->sensor_id == 0xb4) - data_type = MSM_CAMERA_I2C_BYTE_DATA; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, data_type); - if (chipid != slave_info->sensor_id) { - if(slave_info->sensor_id== 0x4405) - { - uint16_t original_sid = 0; - chipid = 0; - original_sid = sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x50 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr,&chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - chipid = 0; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x40 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, &chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - // If sensor id not matched finally, restore sensor_id and sid to original values. - pr_err("msm_sensor_match_id chip id doesnot match\n"); - s_ctrl->sensor_i2c_client->cci_client->sid = original_sid; - return 0; - } - } - } - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; - } -#else - - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_WORD_DATA); -#endif - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; //to pass DFMS with removing REAR cam - } - return rc; -} - -static struct msm_sensor_ctrl_t *get_sctrl(struct v4l2_subdev *sd) -{ - return container_of(container_of(sd, struct msm_sd_subdev, sd), - struct msm_sensor_ctrl_t, msm_sd); -} - -static void msm_sensor_stop_stream(struct msm_sensor_ctrl_t *s_ctrl) -{ - mutex_lock(s_ctrl->msm_sensor_mutex); - if (s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &s_ctrl->stop_setting); - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return; -} - -static int msm_sensor_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - /* TO-DO: Need to set AF status register address and expected value - We need to check the AF status in the sensor register and - set the status in the *status variable accordingly*/ - return 0; -} - -static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - void __user *argp = (void __user *)arg; - if (!s_ctrl) { - pr_err("%s s_ctrl NULL\n", __func__); - return -EBADF; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_CFG: - return s_ctrl->func_tbl->sensor_config(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_GET_AF_STATUS: - return msm_sensor_get_af_status(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_RELEASE: - msm_sensor_stop_stream(s_ctrl); - return 0; - case MSM_SD_SHUTDOWN: - return 0; - case VIDIOC_MSM_SENSOR_NATIVE_CMD: - if( s_ctrl->func_tbl->sensor_native_control != NULL ) - return s_ctrl->func_tbl->sensor_native_control(s_ctrl, argp); - else - pr_err("s_ctrl->func_tbl->sensor_native_control is NULL\n"); - - default: - return -ENOIOCTLCMD; - } -} - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - pr_err("CFG_GET_SENSOR_INFO\n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - pr_err("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int s_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - p_ctrl = &s_ctrl->sensordata->power_info; - - /* Update power up sequence */ - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (s_index = 0; s_index < - p_ctrl->power_setting_size; s_index++) { - CDBG("%s i %d power up setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_setting[s_index].seq_type, - p_ctrl->power_setting[s_index].seq_val, - p_ctrl->power_setting[s_index].config_val, - p_ctrl->power_setting[s_index].delay); - } - - /* Update power down sequence */ - if (!sensor_slave_info.power_setting_array.power_down_setting || - 0 == size) { - pr_err("%s: Missing dedicated power down sequence\n", - __func__); - break; - } - size = sensor_slave_info.power_setting_array.size_down; - - if (p_ctrl->power_down_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_down_setting); - p_ctrl->power_down_setting = tmp; - } - p_ctrl->power_down_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_down_setting, (void *) - sensor_slave_info.power_setting_array. - power_down_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_down_setting); - rc = -EFAULT; - break; - } - for (s_index = 0; s_index < - p_ctrl->power_down_setting_size; s_index++) { - CDBG("%s i %d power DOWN setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_down_setting[s_index].seq_type, - p_ctrl->power_down_setting[s_index].seq_val, - p_ctrl->power_down_setting[s_index].config_val, - p_ctrl->power_down_setting[s_index].delay); - } - - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint8_t *reg_data = NULL; - uint32_t i = 0, size = 0; - - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.data_type == MSM_CAMERA_I2C_BURST_DATA) { - CDBG("%s:%d MSM_CAMERA_I2C_BURST_DATA\n", __func__, __LINE__); - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = (void *)kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user((void *)reg_setting, - (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - size = conf_array.size; - conf_array.size = 1; - - for (i = 0; i < size; i++) { - reg_data = kzalloc(reg_setting[i].delay * - (sizeof(uint8_t)), GFP_KERNEL); - if (!reg_data) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_data, - (void *)reg_setting[i].reg_burst_data, - reg_setting[i].delay * - (sizeof(uint8_t)))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_data); - continue; - } - - reg_setting[i].reg_burst_data = reg_data; - conf_array.reg_setting = ®_setting[i]; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_burst_table( - s_ctrl->sensor_i2c_client, &conf_array); - if (rc < 0) { - pr_err("%s:%d failed i2c_write_table rc %d\n", __func__, - __LINE__, rc); - } - kfree(reg_data); - } - - kfree(reg_setting); - }else { - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - } - case CFG_SLAVE_READ_I2C: { - struct msm_camera_i2c_read_config read_config; - uint16_t local_data = 0; - uint16_t orig_slave_addr = 0, read_slave_addr = 0; - if (copy_from_user(&read_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_read_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - read_slave_addr = read_config.slave_addr; - CDBG("%s:CFG_SLAVE_READ_I2C:", __func__); - CDBG("%s:slave_addr=0x%x reg_addr=0x%x, data_type=%d\n", - __func__, read_config.slave_addr, - read_config.reg_addr, read_config.data_type); - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - read_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - read_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - read_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - read_config.reg_addr, - &local_data, read_config.data_type); - if (rc < 0) { - pr_err("%s:%d: i2c_read failed\n", __func__, __LINE__); - break; - } - if (copy_to_user((void __user *)read_config.data, - (void *)&local_data, sizeof(uint16_t))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - break; - } - case CFG_SLAVE_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_array_write_config write_config; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint16_t write_slave_addr = 0; - uint16_t orig_slave_addr = 0; - - if (copy_from_user(&write_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_array_write_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s:CFG_SLAVE_WRITE_I2C_ARRAY:", __func__); - CDBG("%s:slave_addr=0x%x, array_size=%d\n", __func__, - write_config.slave_addr, - write_config.conf_array.size); - - if (!write_config.conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(write_config.conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, - (void *)(write_config.conf_array.reg_setting), - write_config.conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - write_config.conf_array.reg_setting = reg_setting; - write_slave_addr = write_config.slave_addr; - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - write_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - write_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - write_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &(write_config.conf_array)); - if (s_ctrl->sensor_i2c_client->cci_client) { - s_ctrl->sensor_i2c_client->cci_client->sid = - orig_slave_addr; - } else if (s_ctrl->sensor_i2c_client->client) { - s_ctrl->sensor_i2c_client->client->addr = - orig_slave_addr; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_DOWN) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_up) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 1); - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_UP; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_down) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 0); - - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - - if (!stop_setting->size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - - case CFG_SET_SENSOR_OTP_CAL: { - const uint16_t otp_start = 0xa3d, otp_end = 0xa42; - uint16_t otp_cal_data[6], temp_data; - int idx = 0; - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A02, 0x0F, // Set the PAGE15 of OTP set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x01, // Set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (i = otp_start; i <= otp_end; i++) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - i, &otp_cal_data[idx++], - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C read\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_err("%s: 0x%x, 0x%x\n", __func__, i, otp_cal_data[idx - 1]); - if ((i+1)%2) { - temp_data = ((otp_cal_data[idx - 2] << 8) & 0xFF00) | - (otp_cal_data[idx - 1] & 0xFF); - // Valid check : +-50% - if (temp_data > 0x180 || temp_data < 0x80) { - pr_err("%s: range over (0x%x)\n", __func__, temp_data); - rc = -EFAULT; - break; - } - } - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x00, // Disable NVM controller - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (rc >= 0) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020E, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020F, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0210, otp_cal_data[0], // R msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0211, otp_cal_data[1], // R lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0212, otp_cal_data[4], // B msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0213, otp_cal_data[5], // B lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0214, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0215, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - } - break; - } - case CFG_SET_START_STREAM: { - rc = 0; - break; - } - case CFG_SET_STOP_STREAM: { - rc = 0; - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - rc = 0; - return rc; -} - -static int msm_sensor_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - mutex_lock(s_ctrl->msm_sensor_mutex); - if (!on && s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static int msm_sensor_v4l2_enum_fmt(struct v4l2_subdev *sd, - unsigned int index, enum v4l2_mbus_pixelcode *code) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - - if ((unsigned int)index >= s_ctrl->sensor_v4l2_subdev_info_size) - return -EINVAL; - - *code = s_ctrl->sensor_v4l2_subdev_info[index].code; - return 0; -} - -static struct v4l2_subdev_core_ops msm_sensor_subdev_core_ops = { - .ioctl = msm_sensor_subdev_ioctl, - .s_power = msm_sensor_power, -}; - -static struct v4l2_subdev_video_ops msm_sensor_subdev_video_ops = { - .enum_mbus_fmt = msm_sensor_v4l2_enum_fmt, -}; - -static struct v4l2_subdev_ops msm_sensor_subdev_ops = { - .core = &msm_sensor_subdev_core_ops, - .video = &msm_sensor_subdev_video_ops, -}; - -static struct msm_sensor_fn_t msm_sensor_func_tbl = { - .sensor_config = msm_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_burst_table = msm_camera_cci_i2c_write_burst_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_write_conf_tbl = msm_camera_qup_i2c_write_conf_tbl, -}; - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = - (struct msm_sensor_ctrl_t *)data; - struct msm_camera_cci_client *cci_client = NULL; - uint32_t session_id; - unsigned long mount_pos = 0; - s_ctrl->pdev = pdev; - CDBG("%s called data %pK\n", __func__, data); - CDBG("%s pdev name %s\n", __func__, pdev->id_entry->name); - if (pdev->dev.of_node) { - rc = msm_sensor_get_dt_data(pdev->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - s_ctrl->sensordata->power_info.dev = &pdev->dev; - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - /* TODO: get CCI subdev */ - cci_client = s_ctrl->sensor_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = - s_ctrl->sensordata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - kfree(cci_client); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, cam_8974_clk_info, - sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, - s_ctrl->sensordata->sensor_name); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(cci_client); - return rc; - } - - pr_info("%s %s probe succeeded\n", __func__, - s_ctrl->sensordata->sensor_name); - v4l2_subdev_init(&s_ctrl->msm_sd.sd, - s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint32_t session_id; - unsigned long mount_pos = 0; - CDBG("%s %s_i2c_probe called\n", __func__, client->name); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!client->dev.of_node) { - CDBG("msm_sensor_i2c_probe: of_node is NULL"); - s_ctrl = (struct msm_sensor_ctrl_t *)(id->driver_data); - if (!s_ctrl) { - pr_err("%s:%d sensor ctrl structure NULL\n", __func__, - __LINE__); - return -EINVAL; - } - s_ctrl->sensordata = client->dev.platform_data; - } else { - CDBG("msm_sensor_i2c_probe: of_node exisists"); - rc = msm_sensor_get_dt_data(client->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - if (s_ctrl->sensordata == NULL) { - pr_err("%s %s NULL sensor data\n", __func__, client->name); - return -EFAULT; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - if (s_ctrl->sensordata->slave_info->sensor_slave_addr) - s_ctrl->sensor_i2c_client->client->addr = - s_ctrl->sensordata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - if (!client->dev.of_node) { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8960_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8960_clk_info, sizeof(cam_8960_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8960_clk_info); - } else { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8610_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8610_clk_info, sizeof(cam_8610_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8610_clk_info); - } - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, client->name); - kfree(s_ctrl->sensordata->power_info.clk_info); - return rc; - } - - CDBG("%s %s probe succeeded\n", __func__, client->name); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", id->name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->sensor_i2c_client->client->dev, - &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - return rc; -} - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = -ENOMEM; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_cam_clk_info *clk_info = NULL; - unsigned long mount_pos = 0; - - /* Validate input parameters */ - if (!s_ctrl) { - pr_err("%s:%d failed: invalid params s_ctrl %pK\n", __func__, - __LINE__, s_ctrl); - return -EINVAL; - } - - if (!s_ctrl->sensor_i2c_client) { - pr_err("%s:%d failed: invalid params sensor_i2c_client %pK\n", - __func__, __LINE__, s_ctrl->sensor_i2c_client); - return -EINVAL; - } - - /* Initialize cci_client */ - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s:%d failed: no memory cci_client %pK\n", __func__, - __LINE__, s_ctrl->sensor_i2c_client->cci_client); - return -ENOMEM; - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = s_ctrl->sensor_i2c_client->cci_client; - - /* Get CCI subdev */ - cci_client->cci_subdev = msm_cci_get_subdev(); - - /* Update CCI / I2C function table */ - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - } else { - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) { - CDBG("%s:%d\n", __func__, __LINE__); - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - } - } - - /* Update function table driven by ioctl */ - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - - /* Update v4l2 subdev ops table */ - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - /* Initialize clock info */ - clk_info = kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!clk_info) { - pr_err("%s:%d failed no memory clk_info %pK\n", __func__, - __LINE__, clk_info); - rc = -ENOMEM; - goto FREE_CCI_CLIENT; - } - memcpy(clk_info, cam_8974_clk_info, sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info = clk_info; - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - return 0; - -FREE_CCI_CLIENT: - kfree(cci_client); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.h deleted file mode 100755 index 6329f5dc6e4a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor.h +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_H -#define MSM_SENSOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/soc/qcom/camera2.h" -#include "../include/media/msm_cam_sensor.h" -#include -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_sd.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -struct msm_sensor_ctrl_t; - -enum msm_sensor_state_t { - MSM_SENSOR_POWER_DOWN, - MSM_SENSOR_POWER_UP, -}; - -struct msm_sensor_fn_t { - int (*sensor_config) (struct msm_sensor_ctrl_t *, void __user *); - int (*sensor_power_down) (struct msm_sensor_ctrl_t *); - int (*sensor_power_up) (struct msm_sensor_ctrl_t *); - int (*sensor_match_id) (struct msm_sensor_ctrl_t *); - int (*sensor_native_control) (struct msm_sensor_ctrl_t *, void __user *); -}; - - -struct msm_sensor_ctrl_t { - struct platform_device *pdev; - struct mutex *msm_sensor_mutex; - - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_sensor_board_info *sensordata; - struct msm_sensor_power_setting_array power_setting_array; - struct msm_sensor_packed_cfg_t *cfg_override; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_i2c_master; - - struct msm_camera_i2c_client *sensor_i2c_client; - struct v4l2_subdev_info *sensor_v4l2_subdev_info; - uint8_t sensor_v4l2_subdev_info_size; - struct v4l2_subdev_ops *sensor_v4l2_subdev_ops; - struct msm_sensor_fn_t *func_tbl; - struct msm_camera_i2c_reg_setting stop_setting; - void *misc_regulator; - enum msm_sensor_state_t sensor_state; - uint8_t is_probe_succeed; - uint32_t id; - struct device_node *of_node; - enum msm_camera_stream_type_t camera_stream_type; - uint32_t set_mclk_23880000; -}; - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp); - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data); -int msm_sensor_update_cfg(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) -int32_t msm_sensor_flash_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.c b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.c deleted file mode 100644 index a6d5db2f8b1d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.c +++ /dev/null @@ -1,1292 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define SENSOR_DRIVER_I2C "camera" -/* Header file declaration */ -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#include -#include -#include -#include -#include -static char *regs_table = NULL; -static int table_size; -#endif -#if defined(CONFIG_SR200PC20) -#include "sr200pc20.h" -#endif - -/* Logging macro */ -//#define MSM_SENSOR_DRIVER_DEBUG -#undef CDBG -#ifdef MSM_SENSOR_DRIVER_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define SENSOR_MAX_MOUNTANGLE (360) - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) -extern unsigned int system_rev; -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -extern char rear_cam_info[100]; //camera_info -extern char front_cam_info[100]; //camera_info -#endif - -/* Static declaration */ -static struct msm_sensor_ctrl_t *g_sctrl[MAX_CAMERAS]; - -#if defined(CONFIG_SR200PC20) -static struct msm_sensor_fn_t sr200pc20_sensor_func_tbl = { - .sensor_config = sr200pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr200pc20_sensor_native_control, -}; -#endif - -#if defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) -static struct msm_sensor_fn_t front_flash_func_tbl = { - .sensor_config = msm_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = msm_sensor_flash_native_control, -}; -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); - -static int msm_sensor_platform_remove(struct platform_device *pdev) -{ - struct msm_sensor_ctrl_t *s_ctrl; - - pr_err("%s: sensor FREE\n", __func__); - - s_ctrl = g_sctrl[pdev->id]; - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - g_sctrl[pdev->id] = NULL; - - return 0; -} - - -static const struct of_device_id msm_sensor_driver_dt_match[] = { - {.compatible = "qcom,camera"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_sensor_driver_dt_match); - -static struct platform_driver msm_sensor_platform_driver = { - .driver = { - .name = "qcom,camera", - .owner = THIS_MODULE, - .of_match_table = msm_sensor_driver_dt_match, - }, - .remove = msm_sensor_platform_remove, -}; - -static struct v4l2_subdev_info msm_sensor_driver_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_sensor_driver_create_i2c_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - struct i2c_client *client = s_ctrl->sensor_i2c_client->client; - - CDBG("%s %s I2c probe succeeded\n", __func__, client->name); - rc = camera_init_v4l2(&client->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_i2c_v4l2 rc %d", rc); - return rc; - } - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_sensor_driver_create_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_v4l2 rc %d", rc); - return rc; - } - CDBG("rc %d session_id %d", rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - - /* Create /dev/v4l-subdevX device */ - v4l2_subdev_init(&s_ctrl->msm_sd.sd, s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, s_ctrl->pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - return rc; -} - -static int32_t msm_sensor_fill_eeprom_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - const char *eeprom_name; - struct device_node *src_node = NULL; - uint32_t val = 0, count = 0, eeprom_name_len; - int i; - int32_t *eeprom_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - const void *p; - - if (!s_ctrl->sensordata->eeprom_name || !of_node) - return -EINVAL; - - eeprom_name_len = strlen(s_ctrl->sensordata->eeprom_name); - if (eeprom_name_len >= MAX_SENSOR_NAME) - return -EINVAL; - - sensor_info = s_ctrl->sensordata->sensor_info; - eeprom_subdev_id = &sensor_info->subdev_id[SUB_MODULE_EEPROM]; - /* - * string for eeprom name is valid, set sudev id to -1 - * and try to found new id - */ - *eeprom_subdev_id = -1; - - if (0 == eeprom_name_len) - return 0; - - CDBG("Try to find eeprom subdev for %s\n", - s_ctrl->sensordata->eeprom_name); - p = of_get_property(of_node, "qcom,eeprom-src", &count); - if (!p || !count) - return 0; - - count /= sizeof(uint32_t); - for (i = 0; i < count; i++) { - eeprom_name = NULL; - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", i); - if (!src_node) { - pr_err("eeprom src node NULL\n"); - continue; - } - rc = of_property_read_string(src_node, "qcom,eeprom-name", - &eeprom_name); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - if (strcmp(eeprom_name, s_ctrl->sensordata->eeprom_name)) - continue; - - rc = of_property_read_u32(src_node, "cell-index", &val); - - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - - *eeprom_subdev_id = val; - CDBG("Done. Eeprom subdevice id is %d\n", val); - of_node_put(src_node); - src_node = NULL; - break; - } - - return rc; -} - -static int32_t msm_sensor_fill_actuator_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct device_node *src_node = NULL; - uint32_t val = 0, actuator_name_len; - int32_t *actuator_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - - if (!s_ctrl->sensordata->actuator_name || !of_node) - return -EINVAL; - - actuator_name_len = strlen(s_ctrl->sensordata->actuator_name); - if (actuator_name_len >= MAX_SENSOR_NAME) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is greater than max len\n"); - return -EINVAL; - } - - sensor_info = s_ctrl->sensordata->sensor_info; - actuator_subdev_id = &sensor_info->subdev_id[SUB_MODULE_ACTUATOR]; - /* - * string for actuator name is valid, set sudev id to -1 - * and try to found new id - */ - *actuator_subdev_id = -1; - - if (0 == actuator_name_len) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is zero\n"); - return 0; - } - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - pr_err("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - pr_err("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -EINVAL; - } - *actuator_subdev_id = val; - of_node_put(src_node); - src_node = NULL; - } - - return rc; -} - -static int32_t msm_sensor_fill_slave_info_init_params( - struct msm_camera_sensor_slave_info *slave_info, - struct msm_sensor_info_t *sensor_info) -{ - struct msm_sensor_init_params *sensor_init_params; - if (!slave_info || !sensor_info) - return -EINVAL; - - if (!slave_info->is_init_params_valid) - return 0; - - sensor_init_params = &slave_info->sensor_init_params; - if (INVALID_CAMERA_B != sensor_init_params->position) - sensor_info->position = - sensor_init_params->position; - - if (SENSOR_MAX_MOUNTANGLE > sensor_init_params->sensor_mount_angle) { - sensor_info->sensor_mount_angle = - sensor_init_params->sensor_mount_angle; - sensor_info->is_mount_angle_valid = 1; - } - - if (CAMERA_MODE_INVALID != sensor_init_params->modes_supported) - sensor_info->modes_supported = - sensor_init_params->modes_supported; - - return 0; -} - - -static int32_t msm_sensor_validate_slave_info( - struct msm_sensor_info_t *sensor_info) -{ - if (INVALID_CAMERA_B == sensor_info->position) { - sensor_info->position = BACK_CAMERA_B; - CDBG("%s:%d Set default sensor position\n", - __func__, __LINE__); - } - if (CAMERA_MODE_INVALID == sensor_info->modes_supported) { - sensor_info->modes_supported = CAMERA_MODE_2D_B; - CDBG("%s:%d Set default sensor modes_supported\n", - __func__, __LINE__); - } - if (SENSOR_MAX_MOUNTANGLE <= sensor_info->sensor_mount_angle) { - sensor_info->sensor_mount_angle = 0; - CDBG("%s:%d Set default sensor mount angle\n", - __func__, __LINE__); - sensor_info->is_mount_angle_valid = 1; - } - return 0; -} - -/* static function definition */ -int32_t msm_sensor_driver_probe(void *setting) -{ - int32_t rc = 0; - uint16_t i = 0, size = 0, size_down = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_camera_sensor_slave_info *slave_info = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_sensor_power_setting *power_down_setting = NULL; - struct msm_camera_slave_info *camera_info = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int c, end; - struct msm_sensor_power_setting power_down_setting_t; - unsigned long mount_pos = 0; - int probe_fail = 0; - - /* Validate input parameters */ - if (!setting) { - pr_err("failed: slave_info %pK", setting); - return -EINVAL; - } - - /* Allocate memory for slave info */ - slave_info = kzalloc(sizeof(*slave_info), GFP_KERNEL); - if (!slave_info) { - pr_err("failed: no memory slave_info %pK", slave_info); - return -ENOMEM; - } - - if (copy_from_user(slave_info, (void *)setting, sizeof(*slave_info))) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_SLAVE_INFO; - } - - /* Print slave info */ - CDBG("camera id %d, ", slave_info->camera_id); - CDBG("slave_addr 0x%x, ", slave_info->slave_addr); - CDBG("addr_type %d, ", slave_info->addr_type); - CDBG("sensor_id_reg_addr 0x%x, ", - slave_info->sensor_id_info.sensor_id_reg_addr); - CDBG("sensor_id 0x%x, ", slave_info->sensor_id_info.sensor_id); - CDBG("size %d, ", slave_info->power_setting_array.size); - CDBG("size down %d, ", slave_info->power_setting_array.size_down); - CDBG("sensor_name %s, ", slave_info->sensor_name); - - if (slave_info->is_init_params_valid) { - CDBG("position %d", - slave_info->sensor_init_params.position); - CDBG("mount %d", - slave_info->sensor_init_params.sensor_mount_angle); - } - - /* Validate camera id */ - if (slave_info->camera_id >= MAX_CAMERAS) { - pr_err("failed: invalid camera id %d max %d", - slave_info->camera_id, MAX_CAMERAS); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } - - /* Extract s_ctrl from camera id */ - s_ctrl = g_sctrl[slave_info->camera_id]; - if (!s_ctrl) { - pr_err("failed: s_ctrl %pK for camera_id %d", s_ctrl, - slave_info->camera_id); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } -#if defined(CONFIG_SR200PC20) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &sr200pc20_sensor_func_tbl ; - } -#elif defined(CONFIG_FLED_LM3632) || defined(CONFIG_FLED_KTD2692) - if(slave_info->camera_id == CAMERA_1){ - s_ctrl->func_tbl = &front_flash_func_tbl ; - } -#endif - - CDBG("s_ctrl[%d] %pK", slave_info->camera_id, s_ctrl); - - if (s_ctrl->is_probe_succeed == 1) { - /* - * Different sensor on this camera slot has been connected - * and probe already succeeded for that sensor. Ignore this - * probe - */ - pr_err("slot %d has some other sensor", slave_info->camera_id); - rc = 0; - goto FREE_SLAVE_INFO; - } - - size = slave_info->power_setting_array.size; - /* Allocate memory for power up setting */ - power_setting = kzalloc(sizeof(*power_setting) * size, GFP_KERNEL); - if (!power_setting) { - pr_err("failed: no memory power_setting %pK", power_setting); - rc = -ENOMEM; - goto FREE_SLAVE_INFO; - } - - if (copy_from_user(power_setting, - (void *)slave_info->power_setting_array.power_setting, - sizeof(*power_setting) * size)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_SETTING; - } - - /* Print power setting */ - for (i = 0; i < size; i++) { - CDBG("UP seq_type %d seq_val %d config_val %ld delay %d", - power_setting[i].seq_type, power_setting[i].seq_val, - power_setting[i].config_val, power_setting[i].delay); - } - /*DOWN*/ - size_down = slave_info->power_setting_array.size_down; - if (!size_down) - size_down = size; - /* Allocate memory for power down setting */ - power_down_setting = - kzalloc(sizeof(*power_setting) * size_down, GFP_KERNEL); - if (!power_down_setting) { - pr_err("failed: no memory power_setting %pK", - power_down_setting); - rc = -ENOMEM; - goto FREE_POWER_SETTING; - } - - if (slave_info->power_setting_array.power_down_setting) { - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_down_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - } else { - pr_err("failed: no power_down_setting"); - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - - /*reverce*/ - end = size_down - 1; - for (c = 0; c < size_down/2; c++) { - power_down_setting_t = power_down_setting[c]; - power_down_setting[c] = power_down_setting[end]; - power_down_setting[end] = power_down_setting_t; - end--; - } - - } - - /* Print power setting */ - for (i = 0; i < size_down; i++) { - CDBG("DOWN seq_type %d seq_val %d config_val %ld delay %d", - power_down_setting[i].seq_type, - power_down_setting[i].seq_val, - power_down_setting[i].config_val, - power_down_setting[i].delay); - } - - camera_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL); - if (!camera_info) { - pr_err("failed: no memory slave_info %pK", camera_info); - goto FREE_POWER_DOWN_SETTING; - - } - - /* Fill power up setting and power up setting size */ - power_info = &s_ctrl->sensordata->power_info; - power_info->power_setting = power_setting; - power_info->power_setting_size = size; - power_info->power_down_setting = power_down_setting; - power_info->power_down_setting_size = size_down; - - s_ctrl->sensordata->slave_info = camera_info; - - /* Fill sensor slave info */ - camera_info->sensor_slave_addr = slave_info->slave_addr; - camera_info->sensor_id_reg_addr = - slave_info->sensor_id_info.sensor_id_reg_addr; - camera_info->sensor_id = slave_info->sensor_id_info.sensor_id; - - /* Fill CCI master, slave address and CCI default params */ - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - rc = -EINVAL; - goto FREE_CAMERA_INFO; - } - /* Fill sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = slave_info->addr_type; - if (s_ctrl->sensor_i2c_client->client) - s_ctrl->sensor_i2c_client->client->addr = - camera_info->sensor_slave_addr; - - cci_client = s_ctrl->sensor_i2c_client->cci_client; - if (!cci_client) { - pr_err("failed: cci_client %pK", cci_client); - goto FREE_CAMERA_INFO; - } - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = slave_info->slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->i2c_freq_mode = slave_info->i2c_freq_mode; - - /* Parse and fill vreg params for powerup settings */ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_setting, - power_info->power_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_power_setting_data rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Parse and fill vreg params for powerdown settings*/ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_down_setting, - power_info->power_down_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_fill_vreg_params for PDOWN rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Update sensor, actuator and eeprom name in - * sensor control structure */ - s_ctrl->sensordata->sensor_name = slave_info->sensor_name; - s_ctrl->sensordata->eeprom_name = slave_info->eeprom_name; - s_ctrl->sensordata->actuator_name = slave_info->actuator_name; - - /* - * Update eeporm subdevice Id by input eeprom name - */ - rc = msm_sensor_fill_eeprom_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - /* - * Update actuator subdevice Id by input actuator name - */ - rc = msm_sensor_fill_actuator_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - msm_sensor_remove_dev_node_for_eeprom(slave_info->camera_id, - s_ctrl->sensordata->sensor_info->subdev_id[SUB_MODULE_EEPROM]); - /* Power up and probe sensor */ - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s power up failed", slave_info->sensor_name); - probe_fail = rc; -// goto FREE_CAMERA_INFO; - } - - pr_err("%s probe succeeded", slave_info->sensor_name); - - /* - Set probe succeeded flag to 1 so that no other camera shall - * probed on this slot - */ - s_ctrl->is_probe_succeed = 1; - - /* - * Create /dev/videoX node, comment for now until dummy /dev/videoX - * node is created and used by HAL - */ - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - pr_err("[Probe]%s:%d system_rev:%d\n", __func__, __LINE__, system_rev); - if(system_rev == 0) { - if(slave_info->camera_id == CAMERA_1){ - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - } else { - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = msm_sensor_driver_create_v4l_subdev(s_ctrl); - } else { - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - } - } - if (rc < 0) { - pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } - } else { - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) - rc = msm_sensor_driver_create_v4l_subdev(s_ctrl); - else - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - if (rc < 0) { - pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } - } -#else - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) - rc = msm_sensor_driver_create_v4l_subdev(s_ctrl); - else - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - if (rc < 0) { - pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } -#endif - - memcpy(slave_info->subdev_name, s_ctrl->msm_sd.sd.entity.name, - sizeof(slave_info->subdev_name)); - slave_info->is_probe_succeed = 1; - slave_info->sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - slave_info->sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - pr_err("sensor_subdev_id = %d i = %d\n",slave_info->sensor_info.subdev_id[i], i); - } - if (copy_to_user((void __user *)setting, - (void *)slave_info, sizeof(*slave_info))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - } - - /* Power down */ - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - - rc = msm_sensor_fill_slave_info_init_params( - slave_info, - s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Fill slave info failed", slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - rc = msm_sensor_validate_slave_info(s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Validate slave info failed", - slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - /*Save sensor info*/ - s_ctrl->sensordata->cam_slave_info = slave_info; - - if(probe_fail) { - rc = probe_fail; - } - - return rc; - -CAMERA_POWER_DOWN: - s_ctrl->func_tbl->sensor_power_down(s_ctrl); -FREE_CAMERA_INFO: - kfree(camera_info); -FREE_POWER_DOWN_SETTING: - kfree(power_down_setting); -FREE_POWER_SETTING: - kfree(power_setting); -FREE_SLAVE_INFO: - kfree(slave_info); - return rc; -} - -static int32_t msm_sensor_driver_get_gpio_data( - struct msm_camera_sensor_board_info *sensordata, - struct device_node *of_node) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - - /* Validate input paramters */ - if (!sensordata || !of_node) { - pr_err("failed: invalid params sensordata %pK of_node %pK", - sensordata, of_node); - return -EINVAL; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("failed"); - return -ENOMEM; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("gpio count %d", gpio_array_size); - if (!gpio_array_size) - return 0; - - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, GFP_KERNEL); - if (!gpio_array) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("gpio_array[%d] = %d", i, gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_REQ_TBL; - } - - kfree(gpio_array); - return rc; - -FREE_GPIO_REQ_TBL: - kfree(sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(sensordata->power_info.gpio_conf); - kfree(gpio_array); - return rc; -} - -static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct msm_camera_sensor_board_info *sensordata = NULL; - struct device_node *of_node = s_ctrl->of_node; - uint32_t cell_id; - - s_ctrl->sensordata = kzalloc(sizeof(*sensordata), GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("failed: no memory"); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - /* - * Read cell index - this cell index will be the camera slot where - * this camera will be mounted - */ - rc = of_property_read_u32(of_node, "cell-index", &cell_id); - if (rc < 0) { - pr_err("failed: cell-index rc %d", rc); - goto FREE_SENSOR_DATA; - } - s_ctrl->id = cell_id; - - /* Validate cell_id */ - if (cell_id >= MAX_CAMERAS) { - pr_err("failed: invalid cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Check whether g_sctrl is already filled for this cell_id */ - if (g_sctrl[cell_id]) { - pr_err("failed: sctrl already filled for cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Read subdev info */ - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("failed"); - goto FREE_SENSOR_DATA; - } - - /* Read vreg information */ - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_vreg_data rc %d", rc); - goto FREE_SUB_MODULE_DATA; - } - - /* Read gpio information */ - rc = msm_sensor_driver_get_gpio_data(sensordata, of_node); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_get_gpio_data rc %d", rc); - goto FREE_VREG_DATA; - } - - /* Get CCI master */ - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("qcom,cci-master %d, rc %d", s_ctrl->cci_i2c_master, rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - /* Get mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Invalid sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = INVALID_CAMERA_B; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Invalid sensor mode supported\n", - __func__, __LINE__); - sensordata->sensor_info->modes_supported = CAMERA_MODE_INVALID; - } - /* Get vdd-cx regulator */ - /*Optional property, don't return error if absent */ - of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("qcom,misc_regulator %s", sensordata->misc_regulator); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 = %d\n", __func__, - s_ctrl->set_mclk_23880000); - -#if defined (CONFIG_CAMERA_SYSFS_V2) - /* camera information */ - if (cell_id == 0) { - rc = msm_camera_get_dt_camera_info(of_node, rear_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } else { - rc = msm_camera_get_dt_camera_info(of_node, front_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } -#endif - return rc; - -FREE_VREG_DATA: - kfree(sensordata->power_info.cam_vreg); -FREE_SUB_MODULE_DATA: - kfree(sensordata->sensor_info); -FREE_SENSOR_DATA: - kfree(sensordata); - return rc; -} - -static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - - CDBG("Enter"); - /* Validate input parameters */ - - - /* Allocate memory for sensor_i2c_client */ - s_ctrl->sensor_i2c_client = kzalloc(sizeof(*s_ctrl->sensor_i2c_client), - GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: no memory sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - return -ENOMEM; - } - - /* Allocate memory for mutex */ - s_ctrl->msm_sensor_mutex = kzalloc(sizeof(*s_ctrl->msm_sensor_mutex), - GFP_KERNEL); - if (!s_ctrl->msm_sensor_mutex) { - pr_err("failed: no memory msm_sensor_mutex %pK", - s_ctrl->msm_sensor_mutex); - goto FREE_SENSOR_I2C_CLIENT; - } - - /* Parse dt information and store in sensor control structure */ - rc = msm_sensor_driver_get_dt_data(s_ctrl); - if (rc < 0) { - pr_err("failed: rc %d", rc); - goto FREE_MUTEX; - } - - /* Initialize mutex */ - mutex_init(s_ctrl->msm_sensor_mutex); - - /* Initilize v4l2 subdev info */ - s_ctrl->sensor_v4l2_subdev_info = msm_sensor_driver_subdev_info; - s_ctrl->sensor_v4l2_subdev_info_size = - ARRAY_SIZE(msm_sensor_driver_subdev_info); - - /* Initialize default parameters */ - rc = msm_sensor_init_default_params(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_init_default_params rc %d", rc); - goto FREE_DT_DATA; - } - - /* Store sensor control structure in static database */ - g_sctrl[s_ctrl->id] = s_ctrl; - pr_err("g_sctrl[%d] %pK", s_ctrl->id, g_sctrl[s_ctrl->id]); - - return rc; - -FREE_DT_DATA: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata); -FREE_MUTEX: - kfree(s_ctrl->msm_sensor_mutex); -FREE_SENSOR_I2C_CLIENT: - kfree(s_ctrl->sensor_i2c_client); - return rc; -} - -static int32_t msm_sensor_driver_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); - return -ENOMEM; - } - - platform_set_drvdata(pdev, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->of_node = pdev->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - /* Fill platform device */ - pdev->id = s_ctrl->id; - s_ctrl->pdev = pdev; - - /* Fill device in power info */ - s_ctrl->sensordata->power_info.dev = &pdev->dev; - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int32_t msm_sensor_driver_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl; - - CDBG("\n\nEnter: msm_sensor_driver_i2c_probe"); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) { - pr_err("failed: no memory s_ctrl %pK", s_ctrl); - return -ENOMEM; - } - - i2c_set_clientdata(client, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - s_ctrl->of_node = client->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - - } - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int msm_sensor_driver_i2c_remove(struct i2c_client *client) -{ - struct msm_sensor_ctrl_t *s_ctrl = i2c_get_clientdata(client); - - pr_err("%s: sensor FREE\n", __func__); - - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - g_sctrl[s_ctrl->id] = NULL; - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - - return 0; -} - -static const struct i2c_device_id i2c_id[] = { - {SENSOR_DRIVER_I2C, (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_sensor_driver_i2c = { - .id_table = i2c_id, - .probe = msm_sensor_driver_i2c_probe, - .remove = msm_sensor_driver_i2c_remove, - .driver = { - .name = SENSOR_DRIVER_I2C, - }, -}; - -static int __init msm_sensor_driver_init(void) -{ - int32_t rc = 0; - - CDBG("Enter"); - rc = platform_driver_probe(&msm_sensor_platform_driver, - msm_sensor_driver_platform_probe); - if (!rc) { - CDBG("probe success"); - -#if defined(CONFIG_SEC_NOVEL_PROJECT) && defined(CONFIG_CAM_USE_GPIO_I2C) - pr_err("[msm_sensor_driver_init]%s:%d system_rev:%d\n", __func__, __LINE__, system_rev); - if(system_rev == 0) { - rc = i2c_add_driver(&msm_sensor_driver_i2c); - } -#endif - return rc; - } else { - CDBG("probe i2c"); - rc = i2c_add_driver(&msm_sensor_driver_i2c); - } - - return rc; -} - - -static void __exit msm_sensor_driver_exit(void) -{ - CDBG("Enter"); - platform_driver_unregister(&msm_sensor_platform_driver); - i2c_del_driver(&msm_sensor_driver_i2c); - return; -} - -#if defined CONFIG_SEC_CAMERA_TUNING -int register_table_init(char *filename) { - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return -1; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - return -1; - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - return -1; - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to if part of string compare sr352_regs_table"); - regs_table = dp; - table_size = lsize; - *((regs_table+ table_size) - 1) = '\0'; - return 0; -} - -void register_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (regs_table) { - vfree(regs_table); - regs_table = NULL; - } -} - -int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name) { - char *start, *end, *reg,reg_buf[7], data_buf[7]; - int rc,addr,value; - addr=0; - rc=0; - value=0; - - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - *(reg_buf + 4) = '\0'; - *(data_buf + 4) = '\0'; - } else { - *(reg_buf + 6) = '\0'; - *(data_buf + 6) = '\0'; - } - if(regs_table == NULL) { - pr_err("regs_table is null "); - return -1; - } - pr_err("@@@ %s",name); - start = strstr(regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf, (reg + 7), 4); - } else { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf, (reg + 9), 6); - } - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!"); - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - start = (reg + 14); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } else { - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - } - pr_err("register_read_from_sdcard end!"); - return rc; -} - -#endif - -module_init(msm_sensor_driver_init); -module_exit(msm_sensor_driver_exit); -MODULE_DESCRIPTION("msm_sensor_driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.h b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.h deleted file mode 100644 index a0aaa3818309..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_driver.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_DRIVER_H -#define MSM_SENSOR_DRIVER_H - -#include "msm_sensor.h" - -int32_t msm_sensor_driver_probe(void *setting); -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); -struct yuv_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int aeawblock; - unsigned int resolution; - unsigned int prev_resolution; -}; - -struct yuv_ctrl { - struct yuv_userset settings; - int op_mode; - int prev_mode; - int streamon; - int vtcall_mode; - int exif_iso; - int exif_shutterspeed; -}; - - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.c b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.c deleted file mode 100644 index fcfe98632afa..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.c +++ /dev/null @@ -1,622 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-SENSOR-INIT %s:%d " fmt "\n", __func__, __LINE__ - -/* Header files */ -#include -#include "msm_sensor_init.h" -#include "msm_sensor_driver.h" -#include "msm_sensor.h" -#include "msm_sd.h" - -/* Logging macro */ -//#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -struct class *camera_class = NULL; -struct device *cam_dev_back = NULL; -struct device *cam_dev_front = NULL; - -uint16_t rear_vendor_id = 0; - -static struct msm_sensor_init_t *s_init; - -/* Static function declaration */ -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg); - -/* Static structure declaration */ -static struct v4l2_subdev_core_ops msm_sensor_init_subdev_core_ops = { - .ioctl = msm_sensor_init_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_sensor_init_subdev_ops = { - .core = &msm_sensor_init_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_sensor_init_internal_ops; - -static int msm_sensor_wait_for_probe_done(struct msm_sensor_init_t *s_init) -{ - int rc; - int tm = 10000; - - if (s_init->module_init_status == 1) { - pr_err("msm_cam_get_module_init_status -2\n"); - return 0; - } - rc = wait_event_interruptible_timeout(s_init->state_wait, - (s_init->module_init_status == 1), msecs_to_jiffies(tm)); - if (rc < 0) - pr_err("%s:%d wait failed\n", __func__, __LINE__); - else if (rc == 0) - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - return rc; -} - -/* Static function definition */ -static int32_t msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, - void *arg) -{ - int32_t rc = 0; - struct sensor_init_cfg_data *cfg = (struct sensor_init_cfg_data *)arg; - - /* Validate input parameters */ - if (!s_init || !cfg) { - pr_err("failed: s_init %pK cfg %pK", s_init, cfg); - return -EINVAL; - } - - switch (cfg->cfgtype) { - case CFG_SINIT_PROBE: - mutex_lock(&s_init->imutex); - s_init->module_init_status = 0; - rc = msm_sensor_driver_probe(cfg->cfg.setting); - mutex_unlock(&s_init->imutex); - if (rc < 0) - pr_err("failed: msm_sensor_driver_probe rc %d", rc); - break; - - case CFG_SINIT_PROBE_DONE: - s_init->module_init_status = 1; - wake_up(&s_init->state_wait); - break; - - case CFG_SINIT_PROBE_WAIT_DONE: - msm_sensor_wait_for_probe_done(s_init); - break; - - default: - pr_err("default"); - break; - } - - return rc; -} - -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_sensor_init_t *s_init = v4l2_get_subdevdata(sd); - CDBG("Enter"); - - /* Validate input parameters */ - if (!s_init) { - pr_err("failed: s_init %pK", s_init); - return -EINVAL; - } - - switch (cmd) { - case VIDIOC_MSM_SENSOR_INIT_CFG: - rc = msm_sensor_driver_cmd(s_init, arg); - break; - - default: - pr_err_ratelimited("default\n"); - break; - } - - return rc; -} - - -static ssize_t back_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - -#if defined(CONFIG_IMX219) - char type[] = "SONY_IMX219\n"; -#elif defined(CONFIG_S5K4H5YB) - char type[] = "SLSI_S5K4H5YB\n"; -#elif defined(CONFIG_S5K3L2XX) - char type[] = "SLSI_S5K3L2XX\n"; -#elif defined(CONFIG_S5K4ECGX) - char type[] = "SLSI_S5K4ECGX\n"; -#elif defined(CONFIG_IMX135) - char type[] = "SONY_IMX135\n"; -#elif defined(CONFIG_SR544) - char type[] = "SILICONFILE_SR544\n"; -#else - char type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(type), "%s", type); -} - -static ssize_t front_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K6A3YX) - char cam_type[] = "SLSI_S5K6A3YX\n"; -#elif defined(CONFIG_S5K5E3YX) - char cam_type[] = "SLSI_S5K5E3YX\n"; -#elif defined(CONFIG_SR200PC20) - char cam_type[] = "SILICONFILE_SR200PC20\n"; -#elif defined(CONFIG_S5K6B2YX) - char cam_type[] = "SLSI_S5K6B2YX\n"; -#else - char cam_type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(cam_type), "%s", cam_type); -} - -char cam_fw_ver[25] = "NULL NULL\n"; -static ssize_t back_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K4ECGX) - char cam_fw[] = "S5K4ECGX N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#else - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_ver); - return snprintf(buf, sizeof(cam_fw_ver), "%s", cam_fw_ver); -#endif -} - -static ssize_t back_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_ver, sizeof(cam_fw_ver), "%s", buf); - - return size; -} - -char cam_load_fw[25] = "NULL\n"; -static ssize_t back_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", cam_load_fw); - return snprintf(buf, sizeof(cam_load_fw), "%s", cam_load_fw); -} - -static ssize_t back_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_load_fw, sizeof(cam_load_fw), "%s\n", buf); - return size; -} - -char cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t back_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_full_ver); - return snprintf(buf, sizeof(cam_fw_full_ver), "%s", cam_fw_full_ver); -} - -static ssize_t back_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_full_ver, sizeof(cam_fw_full_ver), "%s", buf); - return size; -} - -static ssize_t rear_camera_isp_core_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char isp_core[] = "0.9000\n"; - return snprintf(buf, sizeof(isp_core), "%s", isp_core); -} -static ssize_t rear_camera_vendorid_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char vendor_id[16] = {0}; - if (rear_vendor_id) - sprintf(vendor_id, "0x0%x\n", rear_vendor_id); - else - strncpy(vendor_id, "NULL\n", sizeof(vendor_id)); - - return snprintf(buf, sizeof(vendor_id), "%s", vendor_id); -} - -char cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_user_ver); - return snprintf(buf, sizeof(cam_fw_user_ver), "%s", cam_fw_user_ver); -} - -static ssize_t back_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_user_ver, sizeof(cam_fw_user_ver), "%s", buf); - - return size; -} - -char cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_factory_ver); - return snprintf(buf, sizeof(cam_fw_factory_ver), "%s", cam_fw_factory_ver); -} - -static ssize_t back_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_factory_ver, sizeof(cam_fw_factory_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_fw_ver[25] = "S5K5E3YX N\n"; -#elif defined(CONFIG_S5K6A3YX) -char front_cam_fw_ver[25] = "S5K6A3YX N\n"; -#elif defined(CONFIG_SR200PC20) - char front_cam_fw_ver[25] = "SR200PC20M N\n"; -#else -char front_cam_fw_ver[25] = "NULL NULL\n"; -#endif -static ssize_t front_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_ver : %s\n", front_cam_fw_ver); - return snprintf(buf, sizeof(front_cam_fw_ver), "%s", front_cam_fw_ver); -} - -static ssize_t front_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_ver, sizeof(front_cam_fw_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_load_fw[25] = "S5K5E3YX\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "S5K5E3YX N N\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#else -char front_cam_load_fw[25] = "NULL\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -char rear_cam_info[100] = "NULL\n"; //camera_info -static ssize_t rear_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", rear_cam_info); - return snprintf(buf, sizeof(rear_cam_info), "%s", rear_cam_info); -} - -static ssize_t rear_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(rear_cam_info, sizeof(rear_cam_info), "%s", buf); - - return size; -} - -char front_cam_info[100] = "NULL\n"; //camera_info -static ssize_t front_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", front_cam_info); - return snprintf(buf, sizeof(front_cam_info), "%s", front_cam_info); -} - -static ssize_t front_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(front_cam_info, sizeof(front_cam_info), "%s", buf); - - return size; -} -#endif - -static DEVICE_ATTR(rear_camtype, S_IRUGO, back_camera_type_show, NULL); -static DEVICE_ATTR(rear_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_show, back_camera_firmware_store); -static DEVICE_ATTR(rear_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_user_show, back_camera_firmware_user_store); -static DEVICE_ATTR(rear_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_factory_show, back_camera_firmware_factory_store); -static DEVICE_ATTR(rear_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_load_show, back_camera_firmware_load_store); -static DEVICE_ATTR(rear_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - back_camera_firmware_full_show, back_camera_firmware_full_store); -static DEVICE_ATTR(isp_core, S_IRUGO, rear_camera_isp_core_show, NULL); -static DEVICE_ATTR(front_camtype, S_IRUGO, front_camera_type_show, NULL); -static DEVICE_ATTR(front_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_show, front_camera_firmware_store); -static DEVICE_ATTR(front_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_load_show, front_camera_firmware_load_store); -#if defined (CONFIG_CAMERA_SYSFS_V2) -static DEVICE_ATTR(rear_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - rear_camera_info_show, rear_camera_info_store); -static DEVICE_ATTR(front_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_info_show, front_camera_info_store); -#endif - - -static DEVICE_ATTR(front_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - front_camera_firmware_full_show, front_camera_firmware_full_store); - -static DEVICE_ATTR(rear_vendorid, S_IRUGO, rear_camera_vendorid_show, NULL); - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id, int remove) -{ - if(id == CAMERA_0) { - if(remove == -1) { - device_remove_file(cam_dev_back, &dev_attr_rear_camfw_full); - pr_err("[CAM][Rear] EEPROM node removed\n"); - } - } else { - if(remove == -1) { - device_remove_file(cam_dev_front, &dev_attr_front_camfw_full); - pr_err("[CAM][Front] EEPROM node removed\n"); - } - } - return 0; -} -static int __init msm_sensor_init_module(void) -{ - struct msm_sensor_init_t *s_init = NULL; - int rc = 0; - - if (camera_class == NULL){ - camera_class = class_create(THIS_MODULE, "camera"); - if (IS_ERR(camera_class)) - pr_err("failed to create device cam_dev_rear!\n"); - } - /* Allocate memory for msm_sensor_init control structure */ - s_init = kzalloc(sizeof(struct msm_sensor_init_t), GFP_KERNEL); - if (!s_init) { - class_destroy(camera_class); - pr_err("failed: no memory s_init %pK", NULL); - return -ENOMEM; - } - - pr_err("MSM_SENSOR_INIT_MODULE %pK", NULL); - - /* Initialize mutex */ - mutex_init(&s_init->imutex); - - /* Create /dev/v4l-subdevX for msm_sensor_init */ - v4l2_subdev_init(&s_init->msm_sd.sd, &msm_sensor_init_subdev_ops); - snprintf(s_init->msm_sd.sd.name, sizeof(s_init->msm_sd.sd.name), "%s", - "msm_sensor_init"); - v4l2_set_subdevdata(&s_init->msm_sd.sd, s_init); - s_init->msm_sd.sd.internal_ops = &msm_sensor_init_internal_ops; - s_init->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - rc = media_entity_init(&s_init->msm_sd.sd.entity, 0, NULL, 0); - if (rc < 0) - goto entity_fail; - s_init->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_init->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR_INIT; - s_init->msm_sd.sd.entity.name = s_init->msm_sd.sd.name; - s_init->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - rc = msm_sd_register(&s_init->msm_sd); - if (rc < 0) - goto msm_sd_register_fail; - - cam_dev_back = device_create(camera_class, NULL, - 1, NULL, "rear"); - if (IS_ERR(cam_dev_back)) { - printk("Failed to create cam_dev_back device!\n"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_isp_core) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_isp_core.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_vendorid) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_vendorid.attr.name); - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_back, &dev_attr_rear_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_caminfo.attr.name); - goto device_create_fail; - } -#endif - - cam_dev_front = device_create(camera_class, NULL, - 2, NULL, "front"); - if (IS_ERR(cam_dev_front)) { - printk("Failed to create cam_dev_front device!"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camfw.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_front, &dev_attr_front_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_caminfo.attr.name); - goto device_create_fail; - } -#endif - - init_waitqueue_head(&s_init->state_wait); - - return 0; -device_create_fail: - msm_sd_unregister(&s_init->msm_sd); -msm_sd_register_fail: - media_entity_cleanup(&s_init->msm_sd.sd.entity); -entity_fail: - mutex_destroy(&s_init->imutex); - kfree(s_init); - class_destroy(camera_class); - return rc; -} - -static void __exit msm_sensor_exit_module(void) -{ - msm_sd_unregister(&s_init->msm_sd); - mutex_destroy(&s_init->imutex); - kfree(s_init); - return; -} - -module_init(msm_sensor_init_module); -module_exit(msm_sensor_exit_module); -MODULE_DESCRIPTION("msm_sensor_init"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.h b/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.h deleted file mode 100644 index a9700ec94d43..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/msm_sensor_init.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_INIT_H -#define MSM_SENSOR_INIT_H - -#include "msm_sensor.h" - -struct msm_sensor_init_t { - struct mutex imutex; - struct msm_sd_subdev msm_sd; - int module_init_status; - wait_queue_head_t state_wait; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/mt9m114.c b/drivers/media/platform/msm/camera_v2_j5/sensor/mt9m114.c deleted file mode 100644 index 97feef3d945c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/mt9m114.c +++ /dev/null @@ -1,1510 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define MT9M114_SENSOR_NAME "mt9m114" -#define PLATFORM_DRIVER_NAME "msm_camera_mt9m114" -#define mt9m114_obj mt9m114_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -/* Sysctl registers */ -#define MT9M114_COMMAND_REGISTER 0x0080 -#define MT9M114_COMMAND_REGISTER_APPLY_PATCH (1 << 0) -#define MT9M114_COMMAND_REGISTER_SET_STATE (1 << 1) -#define MT9M114_COMMAND_REGISTER_REFRESH (1 << 2) -#define MT9M114_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) -#define MT9M114_COMMAND_REGISTER_OK (1 << 15) - -DEFINE_MSM_MUTEX(mt9m114_mut); -static struct msm_sensor_ctrl_t mt9m114_s_ctrl; - -static struct msm_sensor_power_setting mt9m114_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 100, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_720p_settings[] = { - {0xdc00, 0x50, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x52, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_POLL}, - - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ -}; - -static struct msm_camera_i2c_reg_conf mt9m114_recommend_settings[] = { - {0x301A, 0x0200, MSM_CAMERA_I2C_SET_WORD_MASK}, - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_enable = 1*/ - {0xC97E, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_divider_m_n = 288*/ - {0xC980, 0x0120,}, - /*cam_sysctl_pll_divider_p = 1792*/ - {0xC982, 0x0700,}, - /*output_control = 32769*/ - {0xC984, 0x8001,}, - /*mipi_timing_t_hs_zero = 3840*/ - {0xC988, 0x0F00,}, - /*mipi_timing_t_hs_exit_hs_trail = 2823*/ - {0xC98A, 0x0B07,}, - /*mipi_timing_t_clk_post_clk_pre = 3329*/ - {0xC98C, 0x0D01,}, - /*mipi_timing_t_clk_trail_clk_zero = 1821*/ - {0xC98E, 0x071D,}, - /*mipi_timing_t_lpx = 6*/ - {0xC990, 0x0006,}, - /*mipi_timing_init_timing = 2572*/ - {0xC992, 0x0A0C,}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ - - /*Sensor optimization*/ - {0x316A, 0x8270,}, - {0x316C, 0x8270,}, - {0x3ED0, 0x2305,}, - {0x3ED2, 0x77CF,}, - {0x316E, 0x8202,}, - {0x3180, 0x87FF,}, - {0x30D4, 0x6080,}, - {0xA802, 0x0008,},/*AE_TRACK_MODE*/ - {0x3E14, 0xFF39,}, - {0x0982, 0x0001,},/*ACCESS_CTL_STAT*/ - {0x098A, 0x5000,},/*PHYSICAL_ADDRESS_ACCESS*/ - {0xD000, 0x70CF,}, - {0xD002, 0xFFFF,}, - {0xD004, 0xC5D4,}, - {0xD006, 0x903A,}, - {0xD008, 0x2144,}, - {0xD00A, 0x0C00,}, - {0xD00C, 0x2186,}, - {0xD00E, 0x0FF3,}, - {0xD010, 0xB844,}, - {0xD012, 0xB948,}, - {0xD014, 0xE082,}, - {0xD016, 0x20CC,}, - {0xD018, 0x80E2,}, - {0xD01A, 0x21CC,}, - {0xD01C, 0x80A2,}, - {0xD01E, 0x21CC,}, - {0xD020, 0x80E2,}, - {0xD022, 0xF404,}, - {0xD024, 0xD801,}, - {0xD026, 0xF003,}, - {0xD028, 0xD800,}, - {0xD02A, 0x7EE0,}, - {0xD02C, 0xC0F1,}, - {0xD02E, 0x08BA,}, - {0xD030, 0x0600,}, - {0xD032, 0xC1A1,}, - {0xD034, 0x76CF,}, - {0xD036, 0xFFFF,}, - {0xD038, 0xC130,}, - {0xD03A, 0x6E04,}, - {0xD03C, 0xC040,}, - {0xD03E, 0x71CF,}, - {0xD040, 0xFFFF,}, - {0xD042, 0xC790,}, - {0xD044, 0x8103,}, - {0xD046, 0x77CF,}, - {0xD048, 0xFFFF,}, - {0xD04A, 0xC7C0,}, - {0xD04C, 0xE001,}, - {0xD04E, 0xA103,}, - {0xD050, 0xD800,}, - {0xD052, 0x0C6A,}, - {0xD054, 0x04E0,}, - {0xD056, 0xB89E,}, - {0xD058, 0x7508,}, - {0xD05A, 0x8E1C,}, - {0xD05C, 0x0809,}, - {0xD05E, 0x0191,}, - {0xD060, 0xD801,}, - {0xD062, 0xAE1D,}, - {0xD064, 0xE580,}, - {0xD066, 0x20CA,}, - {0xD068, 0x0022,}, - {0xD06A, 0x20CF,}, - {0xD06C, 0x0522,}, - {0xD06E, 0x0C5C,}, - {0xD070, 0x04E2,}, - {0xD072, 0x21CA,}, - {0xD074, 0x0062,}, - {0xD076, 0xE580,}, - {0xD078, 0xD901,}, - {0xD07A, 0x79C0,}, - {0xD07C, 0xD800,}, - {0xD07E, 0x0BE6,}, - {0xD080, 0x04E0,}, - {0xD082, 0xB89E,}, - {0xD084, 0x70CF,}, - {0xD086, 0xFFFF,}, - {0xD088, 0xC8D4,}, - {0xD08A, 0x9002,}, - {0xD08C, 0x0857,}, - {0xD08E, 0x025E,}, - {0xD090, 0xFFDC,}, - {0xD092, 0xE080,}, - {0xD094, 0x25CC,}, - {0xD096, 0x9022,}, - {0xD098, 0xF225,}, - {0xD09A, 0x1700,}, - {0xD09C, 0x108A,}, - {0xD09E, 0x73CF,}, - {0xD0A0, 0xFF00,}, - {0xD0A2, 0x3174,}, - {0xD0A4, 0x9307,}, - {0xD0A6, 0x2A04,}, - {0xD0A8, 0x103E,}, - {0xD0AA, 0x9328,}, - {0xD0AC, 0x2942,}, - {0xD0AE, 0x7140,}, - {0xD0B0, 0x2A04,}, - {0xD0B2, 0x107E,}, - {0xD0B4, 0x9349,}, - {0xD0B6, 0x2942,}, - {0xD0B8, 0x7141,}, - {0xD0BA, 0x2A04,}, - {0xD0BC, 0x10BE,}, - {0xD0BE, 0x934A,}, - {0xD0C0, 0x2942,}, - {0xD0C2, 0x714B,}, - {0xD0C4, 0x2A04,}, - {0xD0C6, 0x10BE,}, - {0xD0C8, 0x130C,}, - {0xD0CA, 0x010A,}, - {0xD0CC, 0x2942,}, - {0xD0CE, 0x7142,}, - {0xD0D0, 0x2250,}, - {0xD0D2, 0x13CA,}, - {0xD0D4, 0x1B0C,}, - {0xD0D6, 0x0284,}, - {0xD0D8, 0xB307,}, - {0xD0DA, 0xB328,}, - {0xD0DC, 0x1B12,}, - {0xD0DE, 0x02C4,}, - {0xD0E0, 0xB34A,}, - {0xD0E2, 0xED88,}, - {0xD0E4, 0x71CF,}, - {0xD0E6, 0xFF00,}, - {0xD0E8, 0x3174,}, - {0xD0EA, 0x9106,}, - {0xD0EC, 0xB88F,}, - {0xD0EE, 0xB106,}, - {0xD0F0, 0x210A,}, - {0xD0F2, 0x8340,}, - {0xD0F4, 0xC000,}, - {0xD0F6, 0x21CA,}, - {0xD0F8, 0x0062,}, - {0xD0FA, 0x20F0,}, - {0xD0FC, 0x0040,}, - {0xD0FE, 0x0B02,}, - {0xD100, 0x0320,}, - {0xD102, 0xD901,}, - {0xD104, 0x07F1,}, - {0xD106, 0x05E0,}, - {0xD108, 0xC0A1,}, - {0xD10A, 0x78E0,}, - {0xD10C, 0xC0F1,}, - {0xD10E, 0x71CF,}, - {0xD110, 0xFFFF,}, - {0xD112, 0xC7C0,}, - {0xD114, 0xD840,}, - {0xD116, 0xA900,}, - {0xD118, 0x71CF,}, - {0xD11A, 0xFFFF,}, - {0xD11C, 0xD02C,}, - {0xD11E, 0xD81E,}, - {0xD120, 0x0A5A,}, - {0xD122, 0x04E0,}, - {0xD124, 0xDA00,}, - {0xD126, 0xD800,}, - {0xD128, 0xC0D1,}, - {0xD12A, 0x7EE0,}, - {0x098E, 0x0000,}, - - {0x0982, 0x0001,}, - {0x098A, 0x5C10,}, - {0xDC10, 0xC0F1,}, - {0xDC12, 0x0CDA,}, - {0xDC14, 0x0580,}, - {0xDC16, 0x76CF,}, - {0xDC18, 0xFF00,}, - {0xDC1A, 0x2184,}, - {0xDC1C, 0x9624,}, - {0xDC1E, 0x218C,}, - {0xDC20, 0x8FC3,}, - {0xDC22, 0x75CF,}, - {0xDC24, 0xFFFF,}, - {0xDC26, 0xE058,}, - {0xDC28, 0xF686,}, - {0xDC2A, 0x1550,}, - {0xDC2C, 0x1080,}, - {0xDC2E, 0xE001,}, - {0xDC30, 0x1D50,}, - {0xDC32, 0x1002,}, - {0xDC34, 0x1552,}, - {0xDC36, 0x1100,}, - {0xDC38, 0x6038,}, - {0xDC3A, 0x1D52,}, - {0xDC3C, 0x1004,}, - {0xDC3E, 0x1540,}, - {0xDC40, 0x1080,}, - {0xDC42, 0x081B,}, - {0xDC44, 0x00D1,}, - {0xDC46, 0x8512,}, - {0xDC48, 0x1000,}, - {0xDC4A, 0x00C0,}, - {0xDC4C, 0x7822,}, - {0xDC4E, 0x2089,}, - {0xDC50, 0x0FC1,}, - {0xDC52, 0x2008,}, - {0xDC54, 0x0F81,}, - {0xDC56, 0xFFFF,}, - {0xDC58, 0xFF80,}, - {0xDC5A, 0x8512,}, - {0xDC5C, 0x1801,}, - {0xDC5E, 0x0052,}, - {0xDC60, 0xA512,}, - {0xDC62, 0x1544,}, - {0xDC64, 0x1080,}, - {0xDC66, 0xB861,}, - {0xDC68, 0x262F,}, - {0xDC6A, 0xF007,}, - {0xDC6C, 0x1D44,}, - {0xDC6E, 0x1002,}, - {0xDC70, 0x20CA,}, - {0xDC72, 0x0021,}, - {0xDC74, 0x20CF,}, - {0xDC76, 0x04E1,}, - {0xDC78, 0x0850,}, - {0xDC7A, 0x04A1,}, - {0xDC7C, 0x21CA,}, - {0xDC7E, 0x0021,}, - {0xDC80, 0x1542,}, - {0xDC82, 0x1140,}, - {0xDC84, 0x8D2C,}, - {0xDC86, 0x6038,}, - {0xDC88, 0x1D42,}, - {0xDC8A, 0x1004,}, - {0xDC8C, 0x1542,}, - {0xDC8E, 0x1140,}, - {0xDC90, 0xB601,}, - {0xDC92, 0x046D,}, - {0xDC94, 0x0580,}, - {0xDC96, 0x78E0,}, - {0xDC98, 0xD800,}, - {0xDC9A, 0xB893,}, - {0xDC9C, 0x002D,}, - {0xDC9E, 0x04A0,}, - {0xDCA0, 0xD900,}, - {0xDCA2, 0x78E0,}, - {0xDCA4, 0x72CF,}, - {0xDCA6, 0xFFFF,}, - {0xDCA8, 0xE058,}, - {0xDCAA, 0x2240,}, - {0xDCAC, 0x0340,}, - {0xDCAE, 0xA212,}, - {0xDCB0, 0x208A,}, - {0xDCB2, 0x0FFF,}, - {0xDCB4, 0x1A42,}, - {0xDCB6, 0x0004,}, - {0xDCB8, 0xD830,}, - {0xDCBA, 0x1A44,}, - {0xDCBC, 0x0002,}, - {0xDCBE, 0xD800,}, - {0xDCC0, 0x1A50,}, - {0xDCC2, 0x0002,}, - {0xDCC4, 0x1A52,}, - {0xDCC6, 0x0004,}, - {0xDCC8, 0x1242,}, - {0xDCCA, 0x0140,}, - {0xDCCC, 0x8A2C,}, - {0xDCCE, 0x6038,}, - {0xDCD0, 0x1A42,}, - {0xDCD2, 0x0004,}, - {0xDCD4, 0x1242,}, - {0xDCD6, 0x0141,}, - {0xDCD8, 0x70CF,}, - {0xDCDA, 0xFF00,}, - {0xDCDC, 0x2184,}, - {0xDCDE, 0xB021,}, - {0xDCE0, 0xD800,}, - {0xDCE2, 0xB893,}, - {0xDCE4, 0x07E5,}, - {0xDCE6, 0x0460,}, - {0xDCE8, 0xD901,}, - {0xDCEA, 0x78E0,}, - {0xDCEC, 0xC0F1,}, - {0xDCEE, 0x0BFA,}, - {0xDCF0, 0x05A0,}, - {0xDCF2, 0x216F,}, - {0xDCF4, 0x0043,}, - {0xDCF6, 0xC1A4,}, - {0xDCF8, 0x220A,}, - {0xDCFA, 0x1F80,}, - {0xDCFC, 0xFFFF,}, - {0xDCFE, 0xE058,}, - {0xDD00, 0x2240,}, - {0xDD02, 0x134F,}, - {0xDD04, 0x1A48,}, - {0xDD06, 0x13C0,}, - {0xDD08, 0x1248,}, - {0xDD0A, 0x1002,}, - {0xDD0C, 0x70CF,}, - {0xDD0E, 0x7FFF,}, - {0xDD10, 0xFFFF,}, - {0xDD12, 0xE230,}, - {0xDD14, 0xC240,}, - {0xDD16, 0xDA00,}, - {0xDD18, 0xF00C,}, - {0xDD1A, 0x1248,}, - {0xDD1C, 0x1003,}, - {0xDD1E, 0x1301,}, - {0xDD20, 0x04CB,}, - {0xDD22, 0x7261,}, - {0xDD24, 0x2108,}, - {0xDD26, 0x0081,}, - {0xDD28, 0x2009,}, - {0xDD2A, 0x0080,}, - {0xDD2C, 0x1A48,}, - {0xDD2E, 0x10C0,}, - {0xDD30, 0x1248,}, - {0xDD32, 0x100B,}, - {0xDD34, 0xC300,}, - {0xDD36, 0x0BE7,}, - {0xDD38, 0x90C4,}, - {0xDD3A, 0x2102,}, - {0xDD3C, 0x0003,}, - {0xDD3E, 0x238C,}, - {0xDD40, 0x8FC3,}, - {0xDD42, 0xF6C7,}, - {0xDD44, 0xDAFF,}, - {0xDD46, 0x1A05,}, - {0xDD48, 0x1082,}, - {0xDD4A, 0xC241,}, - {0xDD4C, 0xF005,}, - {0xDD4E, 0x7A6F,}, - {0xDD50, 0xC241,}, - {0xDD52, 0x1A05,}, - {0xDD54, 0x10C2,}, - {0xDD56, 0x2000,}, - {0xDD58, 0x8040,}, - {0xDD5A, 0xDA00,}, - {0xDD5C, 0x20C0,}, - {0xDD5E, 0x0064,}, - {0xDD60, 0x781C,}, - {0xDD62, 0xC042,}, - {0xDD64, 0x1C0E,}, - {0xDD66, 0x3082,}, - {0xDD68, 0x1A48,}, - {0xDD6A, 0x13C0,}, - {0xDD6C, 0x7548,}, - {0xDD6E, 0x7348,}, - {0xDD70, 0x7148,}, - {0xDD72, 0x7648,}, - {0xDD74, 0xF002,}, - {0xDD76, 0x7608,}, - {0xDD78, 0x1248,}, - {0xDD7A, 0x1000,}, - {0xDD7C, 0x1400,}, - {0xDD7E, 0x300B,}, - {0xDD80, 0x084D,}, - {0xDD82, 0x02C5,}, - {0xDD84, 0x1248,}, - {0xDD86, 0x1000,}, - {0xDD88, 0xE101,}, - {0xDD8A, 0x1001,}, - {0xDD8C, 0x04CB,}, - {0xDD8E, 0x1A48,}, - {0xDD90, 0x1000,}, - {0xDD92, 0x7361,}, - {0xDD94, 0x1408,}, - {0xDD96, 0x300B,}, - {0xDD98, 0x2302,}, - {0xDD9A, 0x02C0,}, - {0xDD9C, 0x780D,}, - {0xDD9E, 0x2607,}, - {0xDDA0, 0x903E,}, - {0xDDA2, 0x07D6,}, - {0xDDA4, 0xFFE3,}, - {0xDDA6, 0x792F,}, - {0xDDA8, 0x09CF,}, - {0xDDAA, 0x8152,}, - {0xDDAC, 0x1248,}, - {0xDDAE, 0x100E,}, - {0xDDB0, 0x2400,}, - {0xDDB2, 0x334B,}, - {0xDDB4, 0xE501,}, - {0xDDB6, 0x7EE2,}, - {0xDDB8, 0x0DBF,}, - {0xDDBA, 0x90F2,}, - {0xDDBC, 0x1B0C,}, - {0xDDBE, 0x1382,}, - {0xDDC0, 0xC123,}, - {0xDDC2, 0x140E,}, - {0xDDC4, 0x3080,}, - {0xDDC6, 0x7822,}, - {0xDDC8, 0x1A07,}, - {0xDDCA, 0x1002,}, - {0xDDCC, 0x124C,}, - {0xDDCE, 0x1000,}, - {0xDDD0, 0x120B,}, - {0xDDD2, 0x1081,}, - {0xDDD4, 0x1207,}, - {0xDDD6, 0x1083,}, - {0xDDD8, 0x2142,}, - {0xDDDA, 0x004B,}, - {0xDDDC, 0x781B,}, - {0xDDDE, 0x0B21,}, - {0xDDE0, 0x02E2,}, - {0xDDE2, 0x1A4C,}, - {0xDDE4, 0x1000,}, - {0xDDE6, 0xE101,}, - {0xDDE8, 0x0915,}, - {0xDDEA, 0x00C2,}, - {0xDDEC, 0xC101,}, - {0xDDEE, 0x1204,}, - {0xDDF0, 0x1083,}, - {0xDDF2, 0x090D,}, - {0xDDF4, 0x00C2,}, - {0xDDF6, 0xE001,}, - {0xDDF8, 0x1A4C,}, - {0xDDFA, 0x1000,}, - {0xDDFC, 0x1A06,}, - {0xDDFE, 0x1002,}, - {0xDE00, 0x234A,}, - {0xDE02, 0x1000,}, - {0xDE04, 0x7169,}, - {0xDE06, 0xF008,}, - {0xDE08, 0x2053,}, - {0xDE0A, 0x0003,}, - {0xDE0C, 0x6179,}, - {0xDE0E, 0x781C,}, - {0xDE10, 0x2340,}, - {0xDE12, 0x104B,}, - {0xDE14, 0x1203,}, - {0xDE16, 0x1083,}, - {0xDE18, 0x0BF1,}, - {0xDE1A, 0x90C2,}, - {0xDE1C, 0x1202,}, - {0xDE1E, 0x1080,}, - {0xDE20, 0x091D,}, - {0xDE22, 0x0004,}, - {0xDE24, 0x70CF,}, - {0xDE26, 0xFFFF,}, - {0xDE28, 0xC644,}, - {0xDE2A, 0x881B,}, - {0xDE2C, 0xE0B2,}, - {0xDE2E, 0xD83C,}, - {0xDE30, 0x20CA,}, - {0xDE32, 0x0CA2,}, - {0xDE34, 0x1A01,}, - {0xDE36, 0x1002,}, - {0xDE38, 0x1A4C,}, - {0xDE3A, 0x1080,}, - {0xDE3C, 0x02B9,}, - {0xDE3E, 0x05A0,}, - {0xDE40, 0xC0A4,}, - {0xDE42, 0x78E0,}, - {0xDE44, 0xC0F1,}, - {0xDE46, 0xFF95,}, - {0xDE48, 0xD800,}, - {0xDE4A, 0x71CF,}, - {0xDE4C, 0xFF00,}, - {0xDE4E, 0x1FE0,}, - {0xDE50, 0x19D0,}, - {0xDE52, 0x001C,}, - {0xDE54, 0x19D1,}, - {0xDE56, 0x001C,}, - {0xDE58, 0x70CF,}, - {0xDE5A, 0xFFFF,}, - {0xDE5C, 0xE058,}, - {0xDE5E, 0x901F,}, - {0xDE60, 0xB861,}, - {0xDE62, 0x19D2,}, - {0xDE64, 0x001C,}, - {0xDE66, 0xC0D1,}, - {0xDE68, 0x7EE0,}, - {0xDE6A, 0x78E0,}, - {0xDE6C, 0xC0F1,}, - {0xDE6E, 0x0A7A,}, - {0xDE70, 0x0580,}, - {0xDE72, 0x70CF,}, - {0xDE74, 0xFFFF,}, - {0xDE76, 0xC5D4,}, - {0xDE78, 0x9041,}, - {0xDE7A, 0x9023,}, - {0xDE7C, 0x75CF,}, - {0xDE7E, 0xFFFF,}, - {0xDE80, 0xE058,}, - {0xDE82, 0x7942,}, - {0xDE84, 0xB967,}, - {0xDE86, 0x7F30,}, - {0xDE88, 0xB53F,}, - {0xDE8A, 0x71CF,}, - {0xDE8C, 0xFFFF,}, - {0xDE8E, 0xC84C,}, - {0xDE90, 0x91D3,}, - {0xDE92, 0x108B,}, - {0xDE94, 0x0081,}, - {0xDE96, 0x2615,}, - {0xDE98, 0x1380,}, - {0xDE9A, 0x090F,}, - {0xDE9C, 0x0C91,}, - {0xDE9E, 0x0A8E,}, - {0xDEA0, 0x05A0,}, - {0xDEA2, 0xD906,}, - {0xDEA4, 0x7E10,}, - {0xDEA6, 0x2615,}, - {0xDEA8, 0x1380,}, - {0xDEAA, 0x0A82,}, - {0xDEAC, 0x05A0,}, - {0xDEAE, 0xD960,}, - {0xDEB0, 0x790F,}, - {0xDEB2, 0x090D,}, - {0xDEB4, 0x0133,}, - {0xDEB6, 0xAD0C,}, - {0xDEB8, 0xD904,}, - {0xDEBA, 0xAD2C,}, - {0xDEBC, 0x79EC,}, - {0xDEBE, 0x2941,}, - {0xDEC0, 0x7402,}, - {0xDEC2, 0x71CF,}, - {0xDEC4, 0xFF00,}, - {0xDEC6, 0x2184,}, - {0xDEC8, 0xB142,}, - {0xDECA, 0x1906,}, - {0xDECC, 0x0E44,}, - {0xDECE, 0xFFDE,}, - {0xDED0, 0x70C9,}, - {0xDED2, 0x0A5A,}, - {0xDED4, 0x05A0,}, - {0xDED6, 0x8D2C,}, - {0xDED8, 0xAD0B,}, - {0xDEDA, 0xD800,}, - {0xDEDC, 0xAD01,}, - {0xDEDE, 0x0219,}, - {0xDEE0, 0x05A0,}, - {0xDEE2, 0xA513,}, - {0xDEE4, 0xC0F1,}, - {0xDEE6, 0x71CF,}, - {0xDEE8, 0xFFFF,}, - {0xDEEA, 0xC644,}, - {0xDEEC, 0xA91B,}, - {0xDEEE, 0xD902,}, - {0xDEF0, 0x70CF,}, - {0xDEF2, 0xFFFF,}, - {0xDEF4, 0xC84C,}, - {0xDEF6, 0x093E,}, - {0xDEF8, 0x03A0,}, - {0xDEFA, 0xA826,}, - {0xDEFC, 0xFFDC,}, - {0xDEFE, 0xF1B5,}, - {0xDF00, 0xC0F1,}, - {0xDF02, 0x09EA,}, - {0xDF04, 0x0580,}, - {0xDF06, 0x75CF,}, - {0xDF08, 0xFFFF,}, - {0xDF0A, 0xE058,}, - {0xDF0C, 0x1540,}, - {0xDF0E, 0x1080,}, - {0xDF10, 0x08A7,}, - {0xDF12, 0x0010,}, - {0xDF14, 0x8D00,}, - {0xDF16, 0x0813,}, - {0xDF18, 0x009E,}, - {0xDF1A, 0x1540,}, - {0xDF1C, 0x1081,}, - {0xDF1E, 0xE181,}, - {0xDF20, 0x20CA,}, - {0xDF22, 0x00A1,}, - {0xDF24, 0xF24B,}, - {0xDF26, 0x1540,}, - {0xDF28, 0x1081,}, - {0xDF2A, 0x090F,}, - {0xDF2C, 0x0050,}, - {0xDF2E, 0x1540,}, - {0xDF30, 0x1081,}, - {0xDF32, 0x0927,}, - {0xDF34, 0x0091,}, - {0xDF36, 0x1550,}, - {0xDF38, 0x1081,}, - {0xDF3A, 0xDE00,}, - {0xDF3C, 0xAD2A,}, - {0xDF3E, 0x1D50,}, - {0xDF40, 0x1382,}, - {0xDF42, 0x1552,}, - {0xDF44, 0x1101,}, - {0xDF46, 0x1D52,}, - {0xDF48, 0x1384,}, - {0xDF4A, 0xB524,}, - {0xDF4C, 0x082D,}, - {0xDF4E, 0x015F,}, - {0xDF50, 0xFF55,}, - {0xDF52, 0xD803,}, - {0xDF54, 0xF033,}, - {0xDF56, 0x1540,}, - {0xDF58, 0x1081,}, - {0xDF5A, 0x0967,}, - {0xDF5C, 0x00D1,}, - {0xDF5E, 0x1550,}, - {0xDF60, 0x1081,}, - {0xDF62, 0xDE00,}, - {0xDF64, 0xAD2A,}, - {0xDF66, 0x1D50,}, - {0xDF68, 0x1382,}, - {0xDF6A, 0x1552,}, - {0xDF6C, 0x1101,}, - {0xDF6E, 0x1D52,}, - {0xDF70, 0x1384,}, - {0xDF72, 0xB524,}, - {0xDF74, 0x0811,}, - {0xDF76, 0x019E,}, - {0xDF78, 0xB8A0,}, - {0xDF7A, 0xAD00,}, - {0xDF7C, 0xFF47,}, - {0xDF7E, 0x1D40,}, - {0xDF80, 0x1382,}, - {0xDF82, 0xF01F,}, - {0xDF84, 0xFF5A,}, - {0xDF86, 0x8D01,}, - {0xDF88, 0x8D40,}, - {0xDF8A, 0xE812,}, - {0xDF8C, 0x71CF,}, - {0xDF8E, 0xFFFF,}, - {0xDF90, 0xC644,}, - {0xDF92, 0x893B,}, - {0xDF94, 0x7030,}, - {0xDF96, 0x22D1,}, - {0xDF98, 0x8062,}, - {0xDF9A, 0xF20A,}, - {0xDF9C, 0x0A0F,}, - {0xDF9E, 0x009E,}, - {0xDFA0, 0x71CF,}, - {0xDFA2, 0xFFFF,}, - {0xDFA4, 0xC84C,}, - {0xDFA6, 0x893B,}, - {0xDFA8, 0xE902,}, - {0xDFAA, 0xFFCF,}, - {0xDFAC, 0x8D00,}, - {0xDFAE, 0xB8E7,}, - {0xDFB0, 0x26CA,}, - {0xDFB2, 0x1022,}, - {0xDFB4, 0xF5E2,}, - {0xDFB6, 0xFF3C,}, - {0xDFB8, 0xD801,}, - {0xDFBA, 0x1D40,}, - {0xDFBC, 0x1002,}, - {0xDFBE, 0x0141,}, - {0xDFC0, 0x0580,}, - {0xDFC2, 0x78E0,}, - {0xDFC4, 0xC0F1,}, - {0xDFC6, 0xC5E1,}, - {0xDFC8, 0xFF34,}, - {0xDFCA, 0xDD00,}, - {0xDFCC, 0x70CF,}, - {0xDFCE, 0xFFFF,}, - {0xDFD0, 0xE090,}, - {0xDFD2, 0xA8A8,}, - {0xDFD4, 0xD800,}, - {0xDFD6, 0xB893,}, - {0xDFD8, 0x0C8A,}, - {0xDFDA, 0x0460,}, - {0xDFDC, 0xD901,}, - {0xDFDE, 0x71CF,}, - {0xDFE0, 0xFFFF,}, - {0xDFE2, 0xDC10,}, - {0xDFE4, 0xD813,}, - {0xDFE6, 0x0B96,}, - {0xDFE8, 0x0460,}, - {0xDFEA, 0x72A9,}, - {0xDFEC, 0x0119,}, - {0xDFEE, 0x0580,}, - {0xDFF0, 0xC0F1,}, - {0xDFF2, 0x71CF,}, - {0xDFF4, 0x0000,}, - {0xDFF6, 0x5BAE,}, - {0xDFF8, 0x7940,}, - {0xDFFA, 0xFF9D,}, - {0xDFFC, 0xF135,}, - {0xDFFE, 0x78E0,}, - {0xE000, 0xC0F1,}, - {0xE002, 0x70CF,}, - {0xE004, 0x0000,}, - {0xE006, 0x5CBA,}, - {0xE008, 0x7840,}, - {0xE00A, 0x70CF,}, - {0xE00C, 0xFFFF,}, - {0xE00E, 0xE058,}, - {0xE010, 0x8800,}, - {0xE012, 0x0815,}, - {0xE014, 0x001E,}, - {0xE016, 0x70CF,}, - {0xE018, 0xFFFF,}, - {0xE01A, 0xC84C,}, - {0xE01C, 0x881A,}, - {0xE01E, 0xE080,}, - {0xE020, 0x0EE0,}, - {0xE022, 0xFFC1,}, - {0xE024, 0xF121,}, - {0xE026, 0x78E0,}, - {0xE028, 0xC0F1,}, - {0xE02A, 0xD900,}, - {0xE02C, 0xF009,}, - {0xE02E, 0x70CF,}, - {0xE030, 0xFFFF,}, - {0xE032, 0xE0AC,}, - {0xE034, 0x7835,}, - {0xE036, 0x8041,}, - {0xE038, 0x8000,}, - {0xE03A, 0xE102,}, - {0xE03C, 0xA040,}, - {0xE03E, 0x09F3,}, - {0xE040, 0x8114,}, - {0xE042, 0x71CF,}, - {0xE044, 0xFFFF,}, - {0xE046, 0xE058,}, - {0xE048, 0x70CF,}, - {0xE04A, 0xFFFF,}, - {0xE04C, 0xC594,}, - {0xE04E, 0xB030,}, - {0xE050, 0xFFDD,}, - {0xE052, 0xD800,}, - {0xE054, 0xF109,}, - {0xE056, 0x0000,}, - {0xE058, 0x0300,}, - {0xE05A, 0x0204,}, - {0xE05C, 0x0700,}, - {0xE05E, 0x0000,}, - {0xE060, 0x0000,}, - {0xE062, 0x0000,}, - {0xE064, 0x0000,}, - {0xE066, 0x0000,}, - {0xE068, 0x0000,}, - {0xE06A, 0x0000,}, - {0xE06C, 0x0000,}, - {0xE06E, 0x0000,}, - {0xE070, 0x0000,}, - {0xE072, 0x0000,}, - {0xE074, 0x0000,}, - {0xE076, 0x0000,}, - {0xE078, 0x0000,}, - {0xE07A, 0x0000,}, - {0xE07C, 0x0000,}, - {0xE07E, 0x0000,}, - {0xE080, 0x0000,}, - {0xE082, 0x0000,}, - {0xE084, 0x0000,}, - {0xE086, 0x0000,}, - {0xE088, 0x0000,}, - {0xE08A, 0x0000,}, - {0xE08C, 0x0000,}, - {0xE08E, 0x0000,}, - {0xE090, 0x0000,}, - {0xE092, 0x0000,}, - {0xE094, 0x0000,}, - {0xE096, 0x0000,}, - {0xE098, 0x0000,}, - {0xE09A, 0x0000,}, - {0xE09C, 0x0000,}, - {0xE09E, 0x0000,}, - {0xE0A0, 0x0000,}, - {0xE0A2, 0x0000,}, - {0xE0A4, 0x0000,}, - {0xE0A6, 0x0000,}, - {0xE0A8, 0x0000,}, - {0xE0AA, 0x0000,}, - {0xE0AC, 0xFFFF,}, - {0xE0AE, 0xCB68,}, - {0xE0B0, 0xFFFF,}, - {0xE0B2, 0xDFF0,}, - {0xE0B4, 0xFFFF,}, - {0xE0B6, 0xCB6C,}, - {0xE0B8, 0xFFFF,}, - {0xE0BA, 0xE000,}, - {0x098E, 0x0000,}, - - /*MIPI setting for SOC1040*/ - {0x3C5A, 0x0009,}, - {0x3C44, 0x0080,},/*MIPI_CUSTOM_SHORT_PKT*/ - - /*[Tuning_settings]*/ - - /*[CCM]*/ - {0xC892, 0x0267,},/*CAM_AWB_CCM_L_0*/ - {0xC894, 0xFF1A,},/*CAM_AWB_CCM_L_1*/ - {0xC896, 0xFFB3,},/*CAM_AWB_CCM_L_2*/ - {0xC898, 0xFF80,},/*CAM_AWB_CCM_L_3*/ - {0xC89A, 0x0166,},/*CAM_AWB_CCM_L_4*/ - {0xC89C, 0x0003,},/*CAM_AWB_CCM_L_5*/ - {0xC89E, 0xFF9A,},/*CAM_AWB_CCM_L_6*/ - {0xC8A0, 0xFEB4,},/*CAM_AWB_CCM_L_7*/ - {0xC8A2, 0x024D,},/*CAM_AWB_CCM_L_8*/ - {0xC8A4, 0x01BF,},/*CAM_AWB_CCM_M_0*/ - {0xC8A6, 0xFF01,},/*CAM_AWB_CCM_M_1*/ - {0xC8A8, 0xFFF3,},/*CAM_AWB_CCM_M_2*/ - {0xC8AA, 0xFF75,},/*CAM_AWB_CCM_M_3*/ - {0xC8AC, 0x0198,},/*CAM_AWB_CCM_M_4*/ - {0xC8AE, 0xFFFD,},/*CAM_AWB_CCM_M_5*/ - {0xC8B0, 0xFF9A,},/*CAM_AWB_CCM_M_6*/ - {0xC8B2, 0xFEE7,},/*CAM_AWB_CCM_M_7*/ - {0xC8B4, 0x02A8,},/*CAM_AWB_CCM_M_8*/ - {0xC8B6, 0x01D9,},/*CAM_AWB_CCM_R_0*/ - {0xC8B8, 0xFF26,},/*CAM_AWB_CCM_R_1*/ - {0xC8BA, 0xFFF3,},/*CAM_AWB_CCM_R_2*/ - {0xC8BC, 0xFFB3,},/*CAM_AWB_CCM_R_3*/ - {0xC8BE, 0x0132,},/*CAM_AWB_CCM_R_4*/ - {0xC8C0, 0xFFE8,},/*CAM_AWB_CCM_R_5*/ - {0xC8C2, 0xFFDA,},/*CAM_AWB_CCM_R_6*/ - {0xC8C4, 0xFECD,},/*CAM_AWB_CCM_R_7*/ - {0xC8C6, 0x02C2,},/*CAM_AWB_CCM_R_8*/ - {0xC8C8, 0x0075,},/*CAM_AWB_CCM_L_RG_GAIN*/ - {0xC8CA, 0x011C,},/*CAM_AWB_CCM_L_BG_GAIN*/ - {0xC8CC, 0x009A,},/*CAM_AWB_CCM_M_RG_GAIN*/ - {0xC8CE, 0x0105,},/*CAM_AWB_CCM_M_BG_GAIN*/ - {0xC8D0, 0x00A4,},/*CAM_AWB_CCM_R_RG_GAIN*/ - {0xC8D2, 0x00AC,},/*CAM_AWB_CCM_R_BG_GAIN*/ - {0xC8D4, 0x0A8C,},/*CAM_AWB_CCM_L_CTEMP*/ - {0xC8D6, 0x0F0A,},/*CAM_AWB_CCM_M_CTEMP*/ - {0xC8D8, 0x1964,},/*CAM_AWB_CCM_R_CTEMP*/ - - /*[AWB]*/ - {0xC914, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_XSTART*/ - {0xC916, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_YSTART*/ - {0xC918, 0x04FF,},/*CAM_STAT_AWB_CLIP_WINDOW_XEND*/ - {0xC91A, 0x02CF,},/*CAM_STAT_AWB_CLIP_WINDOW_YEND*/ - {0xC904, 0x0033,},/*CAM_AWB_AWB_XSHIFT_PRE_ADJ*/ - {0xC906, 0x0040,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F2, 0x03, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_XSCALE*/ - {0xC8F3, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_YSCALE*/ - {0xC906, 0x003C,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F4, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_0*/ - {0xC8F6, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_1*/ - {0xC8F8, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_2*/ - {0xC8FA, 0xE724,},/*CAM_AWB_AWB_WEIGHTS_3*/ - {0xC8FC, 0x1583,},/*CAM_AWB_AWB_WEIGHTS_4*/ - {0xC8FE, 0x2045,},/*CAM_AWB_AWB_WEIGHTS_5*/ - {0xC900, 0x03FF,},/*CAM_AWB_AWB_WEIGHTS_6*/ - {0xC902, 0x007C,},/*CAM_AWB_AWB_WEIGHTS_7*/ - {0xC90C, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_L*/ - {0xC90D, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_L*/ - {0xC90E, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_L*/ - {0xC90F, 0x88, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_R*/ - {0xC910, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_R*/ - {0xC911, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_R*/ - - /*[Step7-CPIPE_Preference]*/ - {0xC926, 0x0020,},/*CAM_LL_START_BRIGHTNESS*/ - {0xC928, 0x009A,},/*CAM_LL_STOP_BRIGHTNESS*/ - {0xC946, 0x0070,},/*CAM_LL_START_GAIN_METRIC*/ - {0xC948, 0x00F3,},/*CAM_LL_STOP_GAIN_METRIC*/ - {0xC952, 0x0020,},/*CAM_LL_START_TARGET_LUMA_BM*/ - {0xC954, 0x009A,},/*CAM_LL_STOP_TARGET_LUMA_BM*/ - {0xC92A, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_SATURATION*/ - {0xC92B, 0x4B, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_SATURATION*/ - {0xC92C, 0x00, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DESATURATION*/ - {0xC92D, 0xFF, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_DESATURATION*/ - {0xC92E, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DEMOSAIC*/ - {0xC92F, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_GAIN*/ - {0xC930, 0x06, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_THRESH*/ - {0xC931, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_DEMOSAIC*/ - {0xC932, 0x01, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_GAIN*/ - {0xC933, 0x0C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_THRESH*/ - {0xC934, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_RED*/ - {0xC935, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_GREEN*/ - {0xC936, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_BLUE*/ - {0xC937, 0x0F, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_THRESH*/ - {0xC938, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_RED*/ - {0xC939, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_GREEN*/ - {0xC93A, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_BLUE*/ - {0xC93B, 0x32, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_THRESH*/ - {0xC93C, 0x0020,},/*CAM_LL_START_CONTRAST_BM*/ - {0xC93E, 0x009A,},/*CAM_LL_STOP_CONTRAST_BM*/ - {0xC940, 0x00DC,},/*CAM_LL_GAMMA*/ - /*CAM_LL_START_CONTRAST_GRADIENT*/ - {0xC942, 0x38, MSM_CAMERA_I2C_BYTE_DATA}, - /*CAM_LL_STOP_CONTRAST_GRADIENT*/ - {0xC943, 0x30, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC944, 0x50, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_CONTRAST_LUMA*/ - {0xC945, 0x19, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_CONTRAST_LUMA*/ - {0xC94A, 0x0230,},/*CAM_LL_START_FADE_TO_BLACK_LUMA*/ - {0xC94C, 0x0010,},/*CAM_LL_STOP_FADE_TO_BLACK_LUMA*/ - {0xC94E, 0x01CD,},/*CAM_LL_CLUSTER_DC_TH_BM*/ - {0xC950, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_CLUSTER_DC_GATE*/ - {0xC951, 0x40, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_SUMMING_SENSITIVITY*/ - /*CAM_AET_TARGET_AVERAGE_LUMA_DARK*/ - {0xC87B, 0x1B, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x0E, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AET_AEMODE*/ - {0xC890, 0x0080,},/*CAM_AET_TARGET_GAIN*/ - {0xC886, 0x0100,},/*CAM_AET_AE_MAX_VIRT_AGAIN*/ - {0xC87C, 0x005A,},/*CAM_AET_BLACK_CLIPPING_TARGET*/ - {0xB42A, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CCM_DELTA_GAIN*/ - /*AE_TRACK_AE_TRACKING_DAMPENING*/ - {0xA80A, 0x20, MSM_CAMERA_I2C_BYTE_DATA}, - {0x3C44, 0x0080,}, - {0x3C40, 0x0004, MSM_CAMERA_I2C_UNSET_WORD_MASK}, - {0xA802, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xC908, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC879, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC909, 0x01, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, - {0xA80A, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xA80B, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xAC16, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xBC02, 0x08, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, -}; - -static struct v4l2_subdev_info mt9m114_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_config_change_settings[] = { - {0xdc00, 0x28, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x31, MSM_CAMERA_I2C_BYTE_DATA}, -}; - -static const struct i2c_device_id mt9m114_i2c_id[] = { - {MT9M114_SENSOR_NAME, (kernel_ulong_t)&mt9m114_s_ctrl}, - { } -}; - -static int32_t msm_mt9m114_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &mt9m114_s_ctrl); -} - -static struct i2c_driver mt9m114_i2c_driver = { - .id_table = mt9m114_i2c_id, - .probe = msm_mt9m114_i2c_probe, - .driver = { - .name = MT9M114_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client mt9m114_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id mt9m114_dt_match[] = { - {.compatible = "qcom,mt9m114", .data = &mt9m114_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, mt9m114_dt_match); - -static struct platform_driver mt9m114_platform_driver = { - .driver = { - .name = "qcom,mt9m114", - .owner = THIS_MODULE, - .of_match_table = mt9m114_dt_match, - }, -}; - -static int32_t mt9m114_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(mt9m114_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init mt9m114_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&mt9m114_platform_driver, - mt9m114_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&mt9m114_i2c_driver); -} - -static void __exit mt9m114_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (mt9m114_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&mt9m114_s_ctrl); - platform_driver_unregister(&mt9m114_platform_driver); - } else - i2c_del_driver(&mt9m114_i2c_driver); - return; -} - -int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_recommend_settings, - ARRAY_SIZE(mt9m114_recommend_settings), - MSM_CAMERA_I2C_WORD_DATA); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_RESOLUTION: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_720p_settings, - ARRAY_SIZE(mt9m114_720p_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_STOP_STREAM: - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - break; - } - case CFG_SET_AUTOFOCUS: { - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - } - case CFG_CANCEL_AUTOFOCUS: { - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t mt9m114_sensor_func_tbl = { - .sensor_config = mt9m114_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t mt9m114_s_ctrl = { - .sensor_i2c_client = &mt9m114_sensor_i2c_client, - .power_setting_array.power_setting = mt9m114_power_setting, - .power_setting_array.size = ARRAY_SIZE(mt9m114_power_setting), - .msm_sensor_mutex = &mt9m114_mut, - .sensor_v4l2_subdev_info = mt9m114_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(mt9m114_subdev_info), - .func_tbl = &mt9m114_sensor_func_tbl, -}; - -module_init(mt9m114_init_module); -module_exit(mt9m114_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov12830.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov12830.c deleted file mode 100755 index fb6d548f1f22..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov12830.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV12830_SENSOR_NAME "ov12830" -DEFINE_MSM_MUTEX(ov12830_mut); - -static struct msm_sensor_ctrl_t ov12830_s_ctrl; - -static struct msm_sensor_power_setting ov12830_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov12830_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov12830_i2c_id[] = { - {OV12830_SENSOR_NAME, - (kernel_ulong_t)&ov12830_s_ctrl}, - { } -}; - -static int msm_ov12830_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov12830_s_ctrl); -} - -static struct i2c_driver ov12830_i2c_driver = { - .id_table = ov12830_i2c_id, - .probe = msm_ov12830_i2c_probe, - .driver = { - .name = OV12830_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov12830_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov12830_dt_match[] = { - {.compatible = "qcom,ov12830", - .data = &ov12830_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov12830_dt_match); - -static struct platform_driver ov12830_platform_driver = { - .driver = { - .name = "qcom,ov12830", - .owner = THIS_MODULE, - .of_match_table = ov12830_dt_match, - }, -}; - -static int32_t ov12830_platform_probe - (struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov12830_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov12830_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov12830_platform_driver, - ov12830_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov12830_i2c_driver); -} - -static void __exit ov12830_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov12830_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov12830_s_ctrl); - platform_driver_unregister - (&ov12830_platform_driver); - } else { - i2c_del_driver(&ov12830_i2c_driver); - } -} - -static struct msm_sensor_ctrl_t ov12830_s_ctrl = { - .sensor_i2c_client = &ov12830_sensor_i2c_client, - .power_setting_array.power_setting = ov12830_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov12830_power_setting), - .msm_sensor_mutex = &ov12830_mut, - .sensor_v4l2_subdev_info = ov12830_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov12830_subdev_info), -}; - -module_init(ov12830_init_module); -module_exit(ov12830_exit_module); -MODULE_DESCRIPTION("ov12830"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov2720.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov2720.c deleted file mode 100755 index 397564b3ef62..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov2720.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV2720_SENSOR_NAME "ov2720" -DEFINE_MSM_MUTEX(ov2720_mut); - -static struct msm_sensor_ctrl_t ov2720_s_ctrl; - -static struct msm_sensor_power_setting ov2720_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov2720_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov2720_i2c_id[] = { - {OV2720_SENSOR_NAME, (kernel_ulong_t)&ov2720_s_ctrl}, - { } -}; - -static int32_t msm_ov2720_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov2720_s_ctrl); -} - -static struct i2c_driver ov2720_i2c_driver = { - .id_table = ov2720_i2c_id, - .probe = msm_ov2720_i2c_probe, - .driver = { - .name = OV2720_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov2720_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov2720_dt_match[] = { - {.compatible = "qcom,ov2720", .data = &ov2720_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov2720_dt_match); - -static struct platform_driver ov2720_platform_driver = { - .driver = { - .name = "qcom,ov2720", - .owner = THIS_MODULE, - .of_match_table = ov2720_dt_match, - }, -}; - -static int32_t ov2720_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov2720_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov2720_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov2720_platform_driver, - ov2720_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov2720_i2c_driver); -} - -static void __exit ov2720_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov2720_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov2720_s_ctrl); - platform_driver_unregister(&ov2720_platform_driver); - } else - i2c_del_driver(&ov2720_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov2720_s_ctrl = { - .sensor_i2c_client = &ov2720_sensor_i2c_client, - .power_setting_array.power_setting = ov2720_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov2720_power_setting), - .msm_sensor_mutex = &ov2720_mut, - .sensor_v4l2_subdev_info = ov2720_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov2720_subdev_info), -}; - -module_init(ov2720_init_module); -module_exit(ov2720_exit_module); -MODULE_DESCRIPTION("ov2720"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov5645.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov5645.c deleted file mode 100755 index 7b84d8392571..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov5645.c +++ /dev/null @@ -1,958 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define OV5645_SENSOR_NAME "ov5645" -#define PLATFORM_DRIVER_NAME "msm_camera_ov5645" -#define ov5645_obj ov5645_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(ov5645_mut); -static struct msm_sensor_ctrl_t ov5645_s_ctrl; - -static struct msm_sensor_power_setting ov5645_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_sxga_settings[] = { - {0x3612, 0xa9,}, - {0x3614, 0x50,}, - {0x3618, 0x00,}, - {0x3034, 0x18,}, - {0x3035, 0x21,}, - {0x3036, 0x70,}, - {0x3600, 0x09,}, - {0x3601, 0x43,}, - {0x3708, 0x66,}, - {0x370c, 0xc3,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x06,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9d,}, - {0x3808, 0x05,}, - {0x3809, 0x00,}, - {0x380a, 0x03,}, - {0x380b, 0xc0,}, - {0x380c, 0x07,}, - {0x380d, 0x68,}, - {0x380e, 0x03,}, - {0x380f, 0xd8,}, - {0x3813, 0x06,}, - {0x3814, 0x31,}, - {0x3815, 0x31,}, - {0x3820, 0x47,}, - {0x3a02, 0x03,}, - {0x3a03, 0xd8,}, - {0x3a08, 0x01,}, - {0x3a09, 0xf8,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0xa4,}, - {0x3a0e, 0x02,}, - {0x3a0d, 0x02,}, - {0x3a14, 0x03,}, - {0x3a15, 0xd8,}, - {0x3a18, 0x00,}, - {0x4004, 0x02,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_full_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x00,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9f,}, - {0x3808, 0x0a,}, - {0x3809, 0x20,}, - {0x380a, 0x07,}, - {0x380b, 0x98,}, - {0x380c, 0x0b,}, - {0x380d, 0x1c,}, - {0x380e, 0x07,}, - {0x380f, 0xb0,}, - {0x3813, 0x06,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x07,}, - {0x3a03, 0xb0,}, - {0x3a08, 0x01,}, - {0x3a09, 0x27,}, - {0x3a0a, 0x00,}, - {0x3a0b, 0xf6,}, - {0x3a0e, 0x06,}, - {0x3a0d, 0x08,}, - {0x3a14, 0x07,}, - {0x3a15, 0xb0,}, - {0x3a18, 0x01,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4837, 0x0b,}, - {0x4202, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_1080P_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x01,}, - {0x3801, 0x50,}, - {0x3802, 0x01,}, - {0x3803, 0xb2,}, - {0x3804, 0x08,}, - {0x3805, 0xef,}, - {0x3806, 0x05,}, - {0x3807, 0xf1,}, - {0x3808, 0x07,}, - {0x3809, 0x80,}, - {0x380a, 0x04,}, - {0x380b, 0x38,}, - {0x380c, 0x09,}, - {0x380d, 0xc4,}, - {0x380e, 0x04,}, - {0x380f, 0x60,}, - {0x3813, 0x04,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x04,}, - {0x3a03, 0x60,}, - {0x3a08, 0x01,}, - {0x3a09, 0x50,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0x18,}, - {0x3a0e, 0x03,}, - {0x3a0d, 0x04,}, - {0x3a14, 0x04,}, - {0x3a15, 0x60,}, - {0x3a18, 0x00,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - {0x4837, 0x0b,}, -}; - - -static struct msm_camera_i2c_reg_conf ov5645_recommend_settings[] = { - {0x3103, 0x11,}, - {0x3008, 0x82,}, - {0x3008, 0x42,}, - {0x3103, 0x03,}, - {0x3503, 0x07,}, - {0x3002, 0x1c,}, - {0x3006, 0xc3,}, - {0x300e, 0x45,}, - {0x3017, 0x00,}, - {0x3018, 0x00,}, - {0x302e, 0x0b,}, - {0x3037, 0x13,}, - {0x3108, 0x01,}, - {0x3611, 0x06,}, - {0x3500, 0x00,}, - {0x3501, 0x01,}, - {0x3502, 0x00,}, - {0x350a, 0x00,}, - {0x350b, 0x3f,}, - {0x3620, 0x33,}, - {0x3621, 0xe0,}, - {0x3622, 0x01,}, - {0x3630, 0x2e,}, - {0x3631, 0x00,}, - {0x3632, 0x32,}, - {0x3633, 0x52,}, - {0x3634, 0x70,}, - {0x3635, 0x13,}, - {0x3636, 0x03,}, - {0x3703, 0x5a,}, - {0x3704, 0xa0,}, - {0x3705, 0x1a,}, - {0x3709, 0x12,}, - {0x370b, 0x61,}, - {0x370f, 0x10,}, - {0x3715, 0x78,}, - {0x3717, 0x01,}, - {0x371b, 0x20,}, - {0x3731, 0x12,}, - {0x3901, 0x0a,}, - {0x3905, 0x02,}, - {0x3906, 0x10,}, - {0x3719, 0x86,}, - {0x3810, 0x00,}, - {0x3811, 0x10,}, - {0x3812, 0x00,}, - {0x3821, 0x01,}, - {0x3824, 0x01,}, - {0x3826, 0x03,}, - {0x3828, 0x08,}, - {0x3a19, 0xf8,}, - {0x3c01, 0x34,}, - {0x3c04, 0x28,}, - {0x3c05, 0x98,}, - {0x3c07, 0x07,}, - {0x3c09, 0xc2,}, - {0x3c0a, 0x9c,}, - {0x3c0b, 0x40,}, - {0x3c01, 0x34,}, - {0x4001, 0x02,}, - {0x4514, 0x00,}, - {0x4520, 0xb0,}, - {0x460b, 0x37,}, - {0x460c, 0x20,}, - {0x4818, 0x01,}, - {0x481d, 0xf0,}, - {0x481f, 0x50,}, - {0x4823, 0x70,}, - {0x4831, 0x14,}, - {0x5000, 0xa7,}, - {0x5001, 0x83,}, - {0x501d, 0x00,}, - {0x501f, 0x00,}, - {0x503d, 0x00,}, - {0x505c, 0x30,}, - {0x5181, 0x59,}, - {0x5183, 0x00,}, - {0x5191, 0xf0,}, - {0x5192, 0x03,}, - {0x5684, 0x10,}, - {0x5685, 0xa0,}, - {0x5686, 0x0c,}, - {0x5687, 0x78,}, - {0x5a00, 0x08,}, - {0x5a21, 0x00,}, - {0x5a24, 0x00,}, - {0x3008, 0x02,}, - {0x3503, 0x00,}, - {0x5180, 0xff,}, - {0x5181, 0xf2,}, - {0x5182, 0x00,}, - {0x5183, 0x14,}, - {0x5184, 0x25,}, - {0x5185, 0x24,}, - {0x5186, 0x09,}, - {0x5187, 0x09,}, - {0x5188, 0x0a,}, - {0x5189, 0x75,}, - {0x518a, 0x52,}, - {0x518b, 0xea,}, - {0x518c, 0xa8,}, - {0x518d, 0x42,}, - {0x518e, 0x38,}, - {0x518f, 0x56,}, - {0x5190, 0x42,}, - {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, 0x08,}, - {0x5384, 0x0a,}, - {0x5385, 0x7e,}, - {0x5386, 0x88,}, - {0x5387, 0x7c,}, - {0x5388, 0x6c,}, - {0x5389, 0x10,}, - {0x538a, 0x01,}, - {0x538b, 0x98,}, - {0x5300, 0x08,}, - {0x5301, 0x30,}, - {0x5302, 0x10,}, - {0x5303, 0x00,}, - {0x5304, 0x08,}, - {0x5305, 0x30,}, - {0x5306, 0x08,}, - {0x5307, 0x16,}, - {0x5309, 0x08,}, - {0x530a, 0x30,}, - {0x530b, 0x04,}, - {0x530c, 0x06,}, - {0x5480, 0x01,}, - {0x5481, 0x08,}, - {0x5482, 0x14,}, - {0x5483, 0x28,}, - {0x5484, 0x51,}, - {0x5485, 0x65,}, - {0x5486, 0x71,}, - {0x5487, 0x7d,}, - {0x5488, 0x87,}, - {0x5489, 0x91,}, - {0x548a, 0x9a,}, - {0x548b, 0xaa,}, - {0x548c, 0xb8,}, - {0x548d, 0xcd,}, - {0x548e, 0xdd,}, - {0x548f, 0xea,}, - {0x5490, 0x1d,}, - {0x5580, 0x02,}, - {0x5583, 0x40,}, - {0x5584, 0x10,}, - {0x5589, 0x10,}, - {0x558a, 0x00,}, - {0x558b, 0xf8,}, - {0x5800, 0x3f,}, - {0x5801, 0x16,}, - {0x5802, 0x0e,}, - {0x5803, 0x0d,}, - {0x5804, 0x17,}, - {0x5805, 0x3f,}, - {0x5806, 0x0b,}, - {0x5807, 0x06,}, - {0x5808, 0x04,}, - {0x5809, 0x04,}, - {0x580a, 0x06,}, - {0x580b, 0x0b,}, - {0x580c, 0x09,}, - {0x580d, 0x03,}, - {0x580e, 0x00,}, - {0x580f, 0x00,}, - {0x5810, 0x03,}, - {0x5811, 0x08,}, - {0x5812, 0x0a,}, - {0x5813, 0x03,}, - {0x5814, 0x00,}, - {0x5815, 0x00,}, - {0x5816, 0x04,}, - {0x5817, 0x09,}, - {0x5818, 0x0f,}, - {0x5819, 0x08,}, - {0x581a, 0x06,}, - {0x581b, 0x06,}, - {0x581c, 0x08,}, - {0x581d, 0x0c,}, - {0x581e, 0x3f,}, - {0x581f, 0x1e,}, - {0x5820, 0x12,}, - {0x5821, 0x13,}, - {0x5822, 0x21,}, - {0x5823, 0x3f,}, - {0x5824, 0x68,}, - {0x5825, 0x28,}, - {0x5826, 0x2c,}, - {0x5827, 0x28,}, - {0x5828, 0x08,}, - {0x5829, 0x48,}, - {0x582a, 0x64,}, - {0x582b, 0x62,}, - {0x582c, 0x64,}, - {0x582d, 0x28,}, - {0x582e, 0x46,}, - {0x582f, 0x62,}, - {0x5830, 0x60,}, - {0x5831, 0x62,}, - {0x5832, 0x26,}, - {0x5833, 0x48,}, - {0x5834, 0x66,}, - {0x5835, 0x44,}, - {0x5836, 0x64,}, - {0x5837, 0x28,}, - {0x5838, 0x66,}, - {0x5839, 0x48,}, - {0x583a, 0x2c,}, - {0x583b, 0x28,}, - {0x583c, 0x26,}, - {0x583d, 0xae,}, - {0x5025, 0x00,}, - {0x3a0f, 0x30,}, - {0x3a10, 0x28,}, - {0x3a1b, 0x30,}, - {0x3a1e, 0x26,}, - {0x3a11, 0x60,}, - {0x3a1f, 0x14,}, - {0x0601, 0x02,}, - {0x3008, 0x42,}, - -}; - -static struct v4l2_subdev_info ov5645_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov5645_start_settings[] = { - {0x3008, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_stop_settings[] = { - {0x3008, 0x42,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_enable_aec_settings[] = { - {0x3503, 0x00,}, - {0x3406, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_disable_aec_settings[] = { - {0x3503, 0x07,}, - {0x3406, 0x01,}, -}; - -static const struct i2c_device_id ov5645_i2c_id[] = { - {OV5645_SENSOR_NAME, (kernel_ulong_t)&ov5645_s_ctrl}, - { } -}; - -static int32_t msm_ov5645_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5645_s_ctrl); -} - -static struct i2c_driver ov5645_i2c_driver = { - .id_table = ov5645_i2c_id, - .probe = msm_ov5645_i2c_probe, - .driver = { - .name = OV5645_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5645_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov5645_dt_match[] = { - {.compatible = "ovti,ov5645", .data = &ov5645_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5645_dt_match); - -static int32_t ov5645_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(ov5645_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver ov5645_platform_driver = { - .driver = { - .name = "ovti,ov5645", - .owner = THIS_MODULE, - .of_match_table = ov5645_dt_match, - }, - .probe = ov5645_platform_probe, -}; - -static int __init ov5645_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_register(&ov5645_platform_driver); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov5645_i2c_driver); -} - -static void __exit ov5645_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (ov5645_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5645_s_ctrl); - platform_driver_unregister(&ov5645_platform_driver); - } else - i2c_del_driver(&ov5645_i2c_driver); - return; -} - -int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_recommend_settings, - ARRAY_SIZE(ov5645_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_full_settings, - ARRAY_SIZE(ov5645_full_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov5645_full_settings ", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_QTR) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_sxga_settings, - ARRAY_SIZE(ov5645_sxga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_sxga_settings\n", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_2) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - ov5645_1080P_settings, - ARRAY_SIZE(ov5645_1080P_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_1080P_settings\n", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_stop_settings, - ARRAY_SIZE(ov5645_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - if (s_ctrl->camera_stream_type != MSM_CAMERA_STREAM_SNAPSHOT) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_enable_aec_settings, - ARRAY_SIZE(ov5645_enable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } else { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_disable_aec_settings, - ARRAY_SIZE(ov5645_disable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_start_settings, - ARRAY_SIZE(ov5645_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x sensor addr type %d sensor reg %x\n" - "sensor id %x\n", __func__, - sensor_slave_info.slave_addr, - sensor_slave_info.addr_type, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t ov5645_sensor_func_tbl = { - .sensor_config = ov5645_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t ov5645_s_ctrl = { - .sensor_i2c_client = &ov5645_sensor_i2c_client, - .power_setting_array.power_setting = ov5645_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov5645_power_setting), - .msm_sensor_mutex = &ov5645_mut, - .sensor_v4l2_subdev_info = ov5645_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov5645_subdev_info), - .func_tbl = &ov5645_sensor_func_tbl, -}; - -module_init(ov5645_init_module); -module_exit(ov5645_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov5648.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov5648.c deleted file mode 100755 index 99224684a131..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov5648.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV5648_SENSOR_NAME "ov5648" -DEFINE_MSM_MUTEX(ov5648_mut); - -static struct msm_sensor_ctrl_t ov5648_s_ctrl; - -static struct msm_sensor_power_setting ov5648_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov5648_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov5648_i2c_id[] = { - {OV5648_SENSOR_NAME, - (kernel_ulong_t)&ov5648_s_ctrl}, - { } -}; - -static int32_t msm_ov5648_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5648_s_ctrl); -} - -static struct i2c_driver ov5648_i2c_driver = { - .id_table = ov5648_i2c_id, - .probe = msm_ov5648_i2c_probe, - .driver = { - .name = OV5648_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5648_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov5648_s_ctrl = { - .sensor_i2c_client = &ov5648_sensor_i2c_client, - .power_setting_array.power_setting = ov5648_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov5648_power_setting), - .msm_sensor_mutex = &ov5648_mut, - .sensor_v4l2_subdev_info = ov5648_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov5648_subdev_info), -}; - -static const struct of_device_id ov5648_dt_match[] = { - { - .compatible = "ovti,ov5648", - .data = &ov5648_s_ctrl - }, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5648_dt_match); - -static struct platform_driver ov5648_platform_driver = { - .driver = { - .name = "ovti,ov5648", - .owner = THIS_MODULE, - .of_match_table = ov5648_dt_match, - }, -}; - -static int32_t ov5648_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov5648_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov5648_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov5648_platform_driver, - ov5648_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov5648_i2c_driver); -} - -static void __exit ov5648_exit_module(void) -{ - if (ov5648_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5648_s_ctrl); - platform_driver_unregister(&ov5648_platform_driver); - } else - i2c_del_driver(&ov5648_i2c_driver); - return; -} - -module_init(ov5648_init_module); -module_exit(ov5648_exit_module); -MODULE_DESCRIPTION("ov5648"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov8825.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov8825.c deleted file mode 100755 index e17c94e85b50..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov8825.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8825_SENSOR_NAME "ov8825" -DEFINE_MSM_MUTEX(ov8825_mut); - -static struct msm_sensor_ctrl_t ov8825_s_ctrl; - -static struct msm_sensor_power_setting ov8825_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8825_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8825_i2c_id[] = { - {OV8825_SENSOR_NAME, (kernel_ulong_t)&ov8825_s_ctrl}, - { } -}; - -static int32_t msm_ov8825_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8825_s_ctrl); -} - -static struct i2c_driver ov8825_i2c_driver = { - .id_table = ov8825_i2c_id, - .probe = msm_ov8825_i2c_probe, - .driver = { - .name = OV8825_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8825_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8825_dt_match[] = { - {.compatible = "qcom,ov8825", .data = &ov8825_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8825_dt_match); - -static struct platform_driver ov8825_platform_driver = { - .driver = { - .name = "qcom,ov8825", - .owner = THIS_MODULE, - .of_match_table = ov8825_dt_match, - }, -}; - -static int32_t ov8825_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8825_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8825_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8825_platform_driver, - ov8825_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8825_i2c_driver); -} - -static void __exit ov8825_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8825_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8825_s_ctrl); - platform_driver_unregister(&ov8825_platform_driver); - } else - i2c_del_driver(&ov8825_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8825_s_ctrl = { - .sensor_i2c_client = &ov8825_sensor_i2c_client, - .power_setting_array.power_setting = ov8825_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8825_power_setting), - .msm_sensor_mutex = &ov8825_mut, - .sensor_v4l2_subdev_info = ov8825_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8825_subdev_info), -}; - -module_init(ov8825_init_module); -module_exit(ov8825_exit_module); -MODULE_DESCRIPTION("ov8825"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov8865.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov8865.c deleted file mode 100755 index 6d788f592b17..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov8865.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8865_SENSOR_NAME "ov8865" -DEFINE_MSM_MUTEX(ov8865_mut); - -static struct msm_sensor_ctrl_t ov8865_s_ctrl; - -static struct msm_sensor_power_setting ov8865_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8865_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8865_i2c_id[] = { - {OV8865_SENSOR_NAME, (kernel_ulong_t)&ov8865_s_ctrl}, - { } -}; - -static int32_t msm_ov8865_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8865_s_ctrl); -} - -static struct i2c_driver ov8865_i2c_driver = { - .id_table = ov8865_i2c_id, - .probe = msm_ov8865_i2c_probe, - .driver = { - .name = OV8865_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8865_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8865_dt_match[] = { - {.compatible = "ovti,ov8865", .data = &ov8865_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8865_dt_match); - -static struct platform_driver ov8865_platform_driver = { - .driver = { - .name = "ovti,ov8865", - .owner = THIS_MODULE, - .of_match_table = ov8865_dt_match, - }, -}; - -static int32_t ov8865_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8865_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8865_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8865_platform_driver, - ov8865_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8865_i2c_driver); -} - -static void __exit ov8865_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8865_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8865_s_ctrl); - platform_driver_unregister(&ov8865_platform_driver); - } else - i2c_del_driver(&ov8865_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8865_s_ctrl = { - .sensor_i2c_client = &ov8865_sensor_i2c_client, - .power_setting_array.power_setting = ov8865_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8865_power_setting), - .msm_sensor_mutex = &ov8865_mut, - .sensor_v4l2_subdev_info = ov8865_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8865_subdev_info), -}; - -module_init(ov8865_init_module); -module_exit(ov8865_exit_module); -MODULE_DESCRIPTION("ov8865"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/ov9724.c b/drivers/media/platform/msm/camera_v2_j5/sensor/ov9724.c deleted file mode 100755 index 99bf03ab1aa0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/ov9724.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV9724_SENSOR_NAME "ov9724" -DEFINE_MSM_MUTEX(ov9724_mut); - -static struct msm_sensor_ctrl_t ov9724_s_ctrl; - -static struct msm_sensor_power_setting ov9724_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov9724_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_ov9724_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov9724_s_ctrl); -} - -static const struct i2c_device_id ov9724_i2c_id[] = { - {OV9724_SENSOR_NAME, (kernel_ulong_t)&ov9724_s_ctrl}, - { } -}; - -static struct i2c_driver ov9724_i2c_driver = { - .id_table = ov9724_i2c_id, - .probe = msm_ov9724_i2c_probe, - .driver = { - .name = OV9724_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov9724_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov9724_s_ctrl = { - .sensor_i2c_client = &ov9724_sensor_i2c_client, - .power_setting_array.power_setting = ov9724_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov9724_power_setting), - .msm_sensor_mutex = &ov9724_mut, - .sensor_v4l2_subdev_info = ov9724_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov9724_subdev_info), -}; - -static const struct of_device_id ov9724_dt_match[] = { - {.compatible = "qcom,ov9724", .data = &ov9724_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov9724_dt_match); - -static struct platform_driver ov9724_platform_driver = { - .driver = { - .name = "qcom,ov9724", - .owner = THIS_MODULE, - .of_match_table = ov9724_dt_match, - }, -}; - -static int32_t ov9724_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov9724_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov9724_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov9724_platform_driver, - ov9724_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov9724_i2c_driver); -} - -static void __exit ov9724_exit_module(void) -{ - if (ov9724_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov9724_s_ctrl); - platform_driver_unregister(&ov9724_platform_driver); - } else - i2c_del_driver(&ov9724_i2c_driver); - return; -} - -module_init(ov9724_init_module); -module_exit(ov9724_exit_module); -MODULE_DESCRIPTION("ov9724"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/s5k3l1yx.c b/drivers/media/platform/msm/camera_v2_j5/sensor/s5k3l1yx.c deleted file mode 100755 index 225e81d94cdb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/s5k3l1yx.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define S5K3L1YX_SENSOR_NAME "s5k3l1yx" -DEFINE_MSM_MUTEX(s5k3l1yx_mut); - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl; - -static struct msm_sensor_power_setting s5k3l1yx_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info s5k3l1yx_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k3l1yx_i2c_id[] = { - {S5K3L1YX_SENSOR_NAME, (kernel_ulong_t)&s5k3l1yx_s_ctrl}, - { } -}; - -static int32_t msm_s5k3l1yx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k3l1yx_s_ctrl); -} - -static struct i2c_driver s5k3l1yx_i2c_driver = { - .id_table = s5k3l1yx_i2c_id, - .probe = msm_s5k3l1yx_i2c_probe, - .driver = { - .name = S5K3L1YX_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k3l1yx_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k3l1yx_dt_match[] = { - {.compatible = "qcom,s5k3l1yx", .data = &s5k3l1yx_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k3l1yx_dt_match); - -static struct platform_driver s5k3l1yx_platform_driver = { - .driver = { - .name = "qcom,s5k3l1yx", - .owner = THIS_MODULE, - .of_match_table = s5k3l1yx_dt_match, - }, -}; - -static int32_t s5k3l1yx_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k3l1yx_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k3l1yx_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k3l1yx_platform_driver, - s5k3l1yx_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k3l1yx_i2c_driver); -} - -static void __exit s5k3l1yx_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k3l1yx_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k3l1yx_s_ctrl); - platform_driver_unregister(&s5k3l1yx_platform_driver); - } else - i2c_del_driver(&s5k3l1yx_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl = { - .sensor_i2c_client = &s5k3l1yx_sensor_i2c_client, - .power_setting_array.power_setting = s5k3l1yx_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k3l1yx_power_setting), - .msm_sensor_mutex = &s5k3l1yx_mut, - .sensor_v4l2_subdev_info = s5k3l1yx_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k3l1yx_subdev_info), -}; - -module_init(s5k3l1yx_init_module); -module_exit(s5k3l1yx_exit_module); -MODULE_DESCRIPTION("s5k3l1yx"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/s5k4e1.c b/drivers/media/platform/msm/camera_v2_j5/sensor/s5k4e1.c deleted file mode 100755 index 5c70df2dec56..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/s5k4e1.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define s5k4e1_SENSOR_NAME "s5k4e1" -DEFINE_MSM_MUTEX(s5k4e1_mut); - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl; - -static struct msm_sensor_power_setting s5k4e1_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info s5k4e1_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SGRBG10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k4e1_i2c_id[] = { - {s5k4e1_SENSOR_NAME, (kernel_ulong_t)&s5k4e1_s_ctrl}, - { } -}; - -static int32_t msm_s5k4e1_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k4e1_s_ctrl); -} - -static struct i2c_driver s5k4e1_i2c_driver = { - .id_table = s5k4e1_i2c_id, - .probe = msm_s5k4e1_i2c_probe, - .driver = { - .name = s5k4e1_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k4e1_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k4e1_dt_match[] = { - {.compatible = "shinetech,s5k4e1", .data = &s5k4e1_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k4e1_dt_match); - -static struct platform_driver s5k4e1_platform_driver = { - .driver = { - .name = "shinetech,s5k4e1", - .owner = THIS_MODULE, - .of_match_table = s5k4e1_dt_match, - }, -}; - -static int32_t s5k4e1_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k4e1_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k4e1_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k4e1_platform_driver, - s5k4e1_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k4e1_i2c_driver); -} - -static void __exit s5k4e1_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k4e1_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k4e1_s_ctrl); - platform_driver_unregister(&s5k4e1_platform_driver); - } else - i2c_del_driver(&s5k4e1_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl = { - .sensor_i2c_client = &s5k4e1_sensor_i2c_client, - .power_setting_array.power_setting = s5k4e1_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k4e1_power_setting), - .msm_sensor_mutex = &s5k4e1_mut, - .sensor_v4l2_subdev_info = s5k4e1_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k4e1_subdev_info), -}; - -module_init(s5k4e1_init_module); -module_exit(s5k4e1_exit_module); -MODULE_DESCRIPTION("s5k4e1"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/sp1628.c b/drivers/media/platform/msm/camera_v2_j5/sensor/sp1628.c deleted file mode 100755 index 6cd06582fb36..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/sp1628.c +++ /dev/null @@ -1,992 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -#define CONFIG_MSMB_CAMERA_DEBUG - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define SP1628_SENSOR_NAME "sp1628" -DEFINE_MSM_MUTEX(sp1628_mut); - -static struct msm_sensor_ctrl_t sp1628_s_ctrl; - -static struct msm_sensor_power_setting sp1628_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 5, - }, -}; - -static struct msm_camera_i2c_reg_conf sp1628_start_settings[] = { - {0x92, 0x81}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_stop_settings[] = { - {0x92, 0x01}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_recommend_settings[] = { - {0xfd, 0x00,}, - {0x91, 0x00,}, - {0x92, 0x81,}, - {0x98, 0x2a,}, - {0x96, 0xd0,}, /* c0*/ - {0x97, 0x02,}, /* 03*/ - {0x2f, 0x20,}, /* 24M*3=72M*/ - {0x0b, 0x48,}, /* analog*/ - {0x30, 0x80,}, /* 00*/ - {0x0c, 0x66,}, /* analog*/ - {0x0d, 0x12,}, - {0x13, 0x0f,}, /* 10*/ - {0x14, 0x00,}, - {0x12, 0x00,}, - {0x6b, 0x10,}, /* 11*/ - {0x6c, 0x00,}, - {0x6d, 0x00,}, - {0x6e, 0x00,}, - {0x6f, 0x10,}, /* 11*/ - {0x73, 0x11,}, /* 12*/ - {0x7a, 0x10,}, /* 11*/ - {0x15, 0x17,}, /* 18*/ - {0x71, 0x18,}, /* 19*/ - {0x76, 0x18,}, /* 19*/ - {0x29, 0x08,}, - {0x18, 0x01,}, - {0x19, 0x10,}, - {0x1a, 0xc3,}, /* c1*/ - {0x1b, 0x6f,}, - {0x1d, 0x11,}, /* 01*/ - {0x1e, 0x00,}, /* 1e*/ - {0x1f, 0x80,}, - {0x20, 0x7f,}, - {0x22, 0x3c,}, /* 1b*/ - {0x25, 0xff,}, - {0x2b, 0x88,}, - {0x2c, 0x85,}, - {0x2d, 0x00,}, - {0x2e, 0x80,}, - {0x27, 0x38,}, - {0x28, 0x03,}, - {0x70, 0x1a,}, - {0x72, 0x18,}, /* 1a*/ - {0x74, 0x18,}, - {0x75, 0x18,}, - {0x77, 0x16,}, /* 18*/ - {0x7f, 0x19,}, - {0x31, 0x11,}, /* 720P, no mirror/flip */ - {0xfd, 0x01,}, - {0x5d, 0x11,}, /* position*/ - {0x5f, 0x00,}, - {0x36, 0x08,}, - {0x2f, 0xff,}, - {0xfb, 0x25,}, /* blacklevl*/ - {0x48, 0x00,}, /* dp*/ - {0x49, 0x99,}, - {0xf2, 0x0A,}, - {0xfd, 0x02,}, /* AE*/ - {0x52, 0x34,}, - {0x53, 0x02,}, - {0x54, 0x0c,}, - {0x55, 0x08,}, - {0x86, 0x0c,}, - {0x87, 0x10,}, - {0x8b, 0x10,}, - - /* 12-30 50Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x05,}, - {0x04, 0x64,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x02,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xe6,}, - {0xf8, 0xc1,}, - {0x02, 0x08,}, - {0x03, 0x01,}, - {0x06, 0xe6,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x30,}, - {0xbf, 0x07,}, - {0xd0, 0x30,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x30,}, - {0xfd, 0x00,}, - - /* 12-30 60Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x04,}, - {0x04, 0x80,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x01,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xc0,}, - {0xf8, 0xc1,}, - {0x02, 0x0a,}, - {0x03, 0x01,}, - {0x06, 0xc0,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x80,}, - {0xbf, 0x07,}, - {0xd0, 0x80,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x80,}, - {0xfd, 0x00,}, - - {0xfd, 0x01,}, /* fix status*/ - {0x5a, 0x38,}, /* DP_gain*/ - {0xfd, 0x02,}, - {0xba, 0x30,}, /* mean_dummy_low*/ - {0xbb, 0x50,}, /* mean_low_dummy*/ - {0xbc, 0xc0,}, /* rpc_heq_low*/ - {0xbd, 0xa0,}, /* rpc_heq_dummy*/ - {0xb8, 0x80,}, /* mean_nr_dummy*/ - {0xb9, 0x90,}, /* mean_dummy_nr*/ - {0xfd, 0x01,}, /* rpc*/ - {0xe0, 0x54,}, - {0xe1, 0x40,}, - {0xe2, 0x38,}, - {0xe3, 0x34,}, - {0xe4, 0x34,}, - {0xe5, 0x30,}, - {0xe6, 0x30,}, - {0xe7, 0x2e,}, - {0xe8, 0x2e,}, - {0xe9, 0x2e,}, - {0xea, 0x2c,}, - {0xf3, 0x2c,}, - {0xf4, 0x2c,}, - {0xfd, 0x01,}, /* min gain*/ - {0x04, 0xc0,}, /* rpc_max_indr*/ - {0x05, 0x2c,}, /* rpc_min_indr*/ - {0x0a, 0xc0,}, /* rpc_max_outdr*/ - {0x0b, 0x2c,}, /* rpc_min_outdr*/ - {0xfd, 0x01,}, /* ae target*/ - {0xeb, 0x78,}, - {0xec, 0x78,}, - {0xed, 0x05,}, - {0xee, 0x0a,}, - {0xfd, 0x01,}, /* lsc*/ - {0x26, 0x30,}, - {0x27, 0xdc,}, - {0x28, 0x05,}, - {0x29, 0x08,}, - {0x2a, 0x00,}, - {0x2b, 0x03,}, - {0x2c, 0x00,}, - {0x2d, 0x2f,}, - {0xfd, 0x01,}, /* RGainf*/ - {0xa1, 0x37,}, /* left*/ - {0xa2, 0x26,}, /* right*/ - {0xa3, 0x32,}, /* up*/ - {0xa4, 0x2b,}, /* down*/ - {0xad, 0x0f,}, /* lu*/ - {0xae, 0x0a,}, /* ru*/ - {0xaf, 0x0a,}, /* ld*/ - {0xb0, 0x0a,}, /* rd*/ - {0x18, 0x2f,}, /* left*/ - {0x19, 0x30,}, /* right*/ - {0x1a, 0x32,}, /* up*/ - {0x1b, 0x30,}, /* down*/ - {0xbf, 0xa5,}, /* lu*/ - {0xc0, 0x12,}, /* ru*/ - {0xc1, 0x08,}, /* ld*/ - {0xfa, 0x00,}, /* rd*/ - {0xa5, 0x35,}, /* GGain*/ - {0xa6, 0x24,}, - {0xa7, 0x2e,}, - {0xa8, 0x25,}, - {0xb1, 0x00,}, - {0xb2, 0x04,}, - {0xb3, 0x00,}, - {0xb4, 0x00,}, - {0x1c, 0x24,}, - {0x1d, 0x23,}, - {0x1e, 0x2c,}, - {0xb9, 0x25,}, - {0x21, 0xa0,}, - {0x22, 0x13,}, - {0x23, 0x1c,}, - {0x24, 0x0d,}, - {0xa9, 0x2f,}, /* BGain*/ - {0xaa, 0x24,}, - {0xab, 0x2d,}, - {0xac, 0x24,}, - {0xb5, 0x00,}, - {0xb6, 0x00,}, - {0xb7, 0x00,}, - {0xb8, 0x00,}, - {0xba, 0x22,}, - {0xbc, 0x24,}, - {0xbd, 0x31,}, - {0xbe, 0x24,}, - {0x25, 0xa0,}, - {0x45, 0x08,}, - {0x46, 0x12,}, - {0x47, 0x09,}, - {0xfd, 0x01,}, /* awb*/ - {0x32, 0x15,}, - {0xfd, 0x02,}, - {0x26, 0xc9,}, - {0x27, 0x8b,}, - {0x1b, 0x80,}, - {0x1a, 0x80,}, - {0x18, 0x27,}, - {0x19, 0x26,}, - {0x2a, 0x01,}, - {0x2b, 0x10,}, - {0x28, 0xf8,}, - {0x29, 0x08,}, - - /* d65*/ - {0x66, 0x35,}, - {0x67, 0x60,}, - {0x68, 0xb0,}, - {0x69, 0xe0,}, - {0x6a, 0xa5,}, - - /* indoor*/ - {0x7c, 0x38,}, - {0x7d, 0x58,}, - {0x7e, 0xdb,}, - {0x7f, 0x13,}, - {0x80, 0xa6,}, - - /* cwftl84*/ - {0x70, 0x18,}, /* 2f*/ - {0x71, 0x4a,}, - {0x72, 0x08,}, - {0x73, 0x32,}, /* 24*/ - {0x74, 0xaa,}, - - /* tl84--F*/ - {0x6b, 0x02,}, /* 18*/ - {0x6c, 0x2a,}, /* 34*/ - {0x6d, 0x1e,}, /* 17*/ - {0x6e, 0x49,}, /* 32*/ - {0x6f, 0xaa,}, - - /* f--H*/ - {0x61, 0xea,}, /* 02*/ - {0x62, 0xf8,}, /* 2a*/ - {0x63, 0x4f,}, /* 1e*/ - {0x64, 0x5f,}, /* 49*/ - {0x65, 0x5a,}, /* aa*/ - - {0x75, 0x80,}, - {0x76, 0x09,}, - {0x77, 0x02,}, - {0x24, 0x25,}, - {0x0e, 0x16,}, - {0x3b, 0x09,}, - {0xfd, 0x02,}, /* sharp*/ - {0xde, 0x0f,}, - {0xd2, 0x0c,}, /* control black-white edge; 0 - bolder, f - thinner*/ - {0xd3, 0x0a,}, - {0xd4, 0x08,}, - {0xd5, 0x08,}, - {0xd7, 0x10,}, /* outline judgement*/ - {0xd8, 0x1d,}, - {0xd9, 0x32,}, - {0xda, 0x48,}, - {0xdb, 0x08,}, - {0xe8, 0x38,}, /* outline strength*/ - {0xe9, 0x38,}, - {0xea, 0x38,}, /* 30*/ - {0xeb, 0x38,}, /* 2*/ - {0xec, 0x60,}, - {0xed, 0x40,}, - {0xee, 0x38,}, /* 30*/ - {0xef, 0x38,}, /* 20*/ - {0xf3, 0x00,}, /* sharpness level of flat area*/ - {0xf4, 0x00,}, - {0xf5, 0x00,}, - {0xf6, 0x00,}, - {0xfd, 0x02,}, /* skin sharpen*/ - {0xdc, 0x04,}, /* skin de-sharpen*/ - {0x05, 0x6f,}, - {0x09, 0x10,}, - {0xfd, 0x01,}, /* dns*/ - {0x64, 0x22,}, /* 0 - max, 8 - min*/ - {0x65, 0x22,}, - {0x86, 0x20,}, /* threshold, 0 - min*/ - {0x87, 0x20,}, - {0x88, 0x20,}, - {0x89, 0x20,}, - {0x6d, 0x0f,}, - {0x6e, 0x0f,}, - {0x6f, 0x10,}, - {0x70, 0x10,}, - {0x71, 0x0d,}, - {0x72, 0x23,}, - {0x73, 0x23,}, /* 28*/ - {0x74, 0x23,}, /* 2a*/ - {0x75, 0x46,}, /* [7:4] strength of flat area, - [3:0]strength of un-flat area; - 0-max, 8-min*/ - {0x76, 0x36,}, - {0x77, 0x36,}, /* 25*/ - {0x78, 0x36,}, /* 12*/ - {0x81, 0x1d,}, /* 2x*/ - {0x82, 0x2b,}, /* 4x*/ - {0x83, 0x2b,}, /* 50; 8x*/ - {0x84, 0x2b,}, /* 80; 16x*/ - {0x85, 0x0a,}, /* 12/8reg0x81*/ - {0xfd, 0x01,}, /* gamma*/ - {0x8b, 0x00,}, /* 00; 00; 00;*/ - {0x8c, 0x0d,}, /* 02; 0b; 0b;*/ - {0x8d, 0x1f,}, /* 0a; 19; 17;*/ - {0x8e, 0x2d,}, /* 13; 2a; 27;*/ - {0x8f, 0x3a,}, /* 1d; 37; 35;*/ - {0x90, 0x4b,}, /* 30; 4b; 51;*/ - {0x91, 0x59,}, /* 40; 5e; 64;*/ - {0x92, 0x64,}, /* 4e; 6c; 74;*/ - {0x93, 0x70,}, /* 5a; 78; 80;*/ - {0x94, 0x83,}, /* 71; 92; 92;*/ - {0x95, 0x92,}, /* 85; a6; a2;*/ - {0x96, 0xa1,}, /* 96; b5; af;*/ - {0x97, 0xae,}, /* a6; bf; bb;*/ - {0x98, 0xba,}, /* b3; ca; c6;*/ - {0x99, 0xc4,}, /* c0; d2; d0;*/ - {0x9a, 0xcf,}, /* cb; d9; d9;*/ - {0x9b, 0xdb,}, /* d5; e1; e0;*/ - {0x9c, 0xe5,}, /* df; e8; e8;*/ - {0x9d, 0xec,}, /* e9; ee; ee;*/ - {0x9e, 0xf3,}, /* f2; f4; f4;*/ - {0x9f, 0xfa,}, /* fa; fa; fa;*/ - {0xa0, 0xff,}, /* ff; ff; ff;*/ - {0xfd, 0x02,}, /* CCM*/ - {0x15, 0xc8,}, /* b>th ab*/ - {0x16, 0x95,}, /* rdev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init sp1628_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&sp1628_platform_driver, - sp1628_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&sp1628_i2c_driver); -} - -static void __exit sp1628_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sp1628_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&sp1628_s_ctrl); - platform_driver_unregister(&sp1628_platform_driver); - } else - i2c_del_driver(&sp1628_i2c_driver); - return; -} - -int32_t sp1628_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* Write Recommend settings */ - pr_err("%s, sensor write init setting!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_recommend_settings, - ARRAY_SIZE(sp1628_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_RESOLUTION: - break; - case CFG_SET_STOP_STREAM: - pr_err("%s, sensor stop stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_stop_settings, - ARRAY_SIZE(sp1628_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - pr_err("%s, sensor start stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_start_settings, - ARRAY_SIZE(sp1628_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *)sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - - break; - } - case CFG_SET_CONTRAST: { - - break; - } - case CFG_SET_SHARPNESS: { - - break; - } - case CFG_SET_ISO: { - - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - - break; - } - case CFG_SET_EFFECT: { - - break; - } - case CFG_SET_ANTIBANDING: { - - break; - } - case CFG_SET_BESTSHOT_MODE: { - - break; - } - case CFG_SET_WHITE_BALANCE: { - - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int32_t sp1628_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - CDBG("%s, E. calling i2c_read:, i2c_addr:%d, id_reg_addr:%d", - __func__, - s_ctrl->sensordata->slave_info->sensor_slave_addr, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr); - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0x02, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x16:\n", __func__, chipid); - if (chipid != 0x16) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0xa0, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x28:\n", __func__, chipid); - if (chipid != 0x28) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - return rc; -} - - -static struct msm_sensor_fn_t sp1628_sensor_func_tbl = { - .sensor_config = sp1628_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sp1628_match_id, -}; - -static struct msm_sensor_ctrl_t sp1628_s_ctrl = { - .sensor_i2c_client = &sp1628_sensor_i2c_client, - .power_setting_array.power_setting = sp1628_power_setting, - .power_setting_array.size = ARRAY_SIZE(sp1628_power_setting), - .msm_sensor_mutex = &sp1628_mut, - .sensor_v4l2_subdev_info = sp1628_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(sp1628_subdev_info), - .func_tbl = &sp1628_sensor_func_tbl, -}; - -module_init(sp1628_init_module); -module_exit(sp1628_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20.h b/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20.h deleted file mode 100755 index 7a22c0b1b4ec..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __sr200pc20_H__ -#define __sr200pc20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef sr200pc20_DEBUG -#undef CDBG -#define sr200pc20_DEBUG -#ifdef sr200pc20_DEBUG -#define CDBG(fmt, args...) printk("[sr200pc20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.c b/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.c deleted file mode 100755 index 2ef0157b13b8..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.c +++ /dev/null @@ -1,708 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "sr200pc20.h" -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#include "sr200pc20_yuv_coreprime.h" -#else -#include "sr200pc20_yuv.h" -#endif -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define SR200PC20_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define SR200PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl sr200pc20_ctrl; -static exif_data_t sr200pc20_exif; -#if defined(CONFIG_SEC_ROSSA_PROJECT) -bool init_setting_write = FALSE; -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_coreprime.h" -#else -#define FILENAME "/data/sr200pc20_yuv.h" -#endif -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif -static int32_t streamon = 0; -static int32_t recording = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -static int sr200pc20_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 read_value3 = 0; - int OPCLK = 26000000; - int rc = 0; - - /* Exposure Time */ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x80,&read_value1,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x81,&read_value2,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x82,&read_value3,MSM_CAMERA_I2C_BYTE_DATA); - if(read_value1 == 0 && read_value2 == 0 && read_value3 == 0) - { - pr_err("%s::%d read_value1=%d read_value2=%d read_value3=%d " - ,__func__,__LINE__,read_value1,read_value2,read_value3); - rc = -EFAULT; - } - else - { - sr200pc20_exif.shutterspeed = OPCLK / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - CDBG("Exposure time = %d", sr200pc20_exif.shutterspeed); - } - return rc; -} - -static int sr200pc20_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value4 = 0; - unsigned short gain_value; - - /* ISO*/ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0xb0,&read_value4,MSM_CAMERA_I2C_BYTE_DATA); - - gain_value = (read_value4 / 32) * 1000 +500; - if (gain_value < 1140) - sr200pc20_exif.iso = 50; - else if (gain_value < 2140) - sr200pc20_exif.iso = 100; - else if (gain_value < 2640) - sr200pc20_exif.iso = 200; - else if (gain_value < 7520) - sr200pc20_exif.iso = 400; - else - sr200pc20_exif.iso = 800; - - CDBG("ISO = %d", sr200pc20_exif.iso); - - return 0; -} - -void sr200pc20_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - CDBG("E"); - - /*Exif data*/ - sr200pc20_exif_shutter_speed(s_ctrl); - sr200pc20_exif_iso(s_ctrl); - CDBG("exp_time : %d -- iso_value : %d",sr200pc20_exif.shutterspeed, sr200pc20_exif.iso); - return; -} - -int32_t sr200pc20_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr200pc20_exif.iso; - exif_info->value_3 = sr200pc20_exif.shutterspeed; - return 0; -} - -int32_t sr200pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M4); - break; - case CAMERA_EV_M3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M3); - break; - case CAMERA_EV_M2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M2); - break; - case CAMERA_EV_M1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - SR200PC20_WRITE_LIST(sr200pc20_brightness_default); - break; - case CAMERA_EV_P1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P1); - break; - case CAMERA_EV_P2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P2); - break; - case CAMERA_EV_P3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P3); - break; - case CAMERA_EV_P4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P4); - break; - default: - CDBG("Setting %d is invalid", mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - SR200PC20_WRITE_LIST(sr200pc20_WB_Auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - SR200PC20_WRITE_LIST(sr200pc20_Capture); - sr200pc20_get_exif(s_ctrl); - break; - default: -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (init_setting_write) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_60hz); - } - init_setting_write = FALSE; - }else { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#else - if (mode == MSM_SENSOR_RES_QTR) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_60hz); - } - } -#endif -#if 0 - else if (mode == MSM_SENSOR_RES_2) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#endif - //rc = msm_sensor_driver_WRT_LIST(s_ctrl,sr200pc20_800x600_Preview); - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc=0; - } - return rc; -} - -int32_t sr200pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Normal); - break; - case CAMERA_EFFECT_MONO: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Gray); - break; - case CAMERA_EFFECT_NEGATIVE: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Negative); - break; - case CAMERA_EFFECT_SEPIA: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - sr200pc20_ctrl.vtcall_mode = 0; - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr200pc20_Init_Reg \n"); -#if defined(CONFIG_SEC_ROSSA_PROJECT) - init_setting_write = TRUE; -#endif - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("/data/sr200pc20_yuv.h inside CFG_SET_INIT_SETTING"); - } -#endif - break; - case CFG_SET_RESOLUTION: - resolution = *((int32_t *)cdata->cfg.setting); - if (sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr200pc20_ctrl.vtcall_mode) { - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_50Hz); - } else { - pr_err("%s : %d 60Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - }else { -#if 0 - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } -#endif - CDBG("Init settings"); - } - } - CDBG("CFG_SET_RESOLUTION *** res = %d" , resolution); - if( sr200pc20_ctrl.op_mode == CAMERA_MODE_RECORDING ) { - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_50hz); - } else { - pr_err("%s : %d 60Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_60hz); - } -#if 0 - CDBG("CFG_SET_RESOLUTION recording START recording =1 *** res = %d" , resolution); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - -#endif - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - recording = 1; - }else{ - if(recording == 1){ - CDBG("CFG_SET_RESOLUTION recording STOP recording =1 *** res = %d" , resolution); - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - recording = 0; - }else if( sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT ){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } else{ - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - SR200PC20_WRITE_LIST(sr200pc20_stop_stream); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); -#if 0 - if( sr200pc20_ctrl.op_mode != CAMERA_MODE_CAPTURE){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - } -#endif - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - streamon = 0; - sr200pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr200pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr200pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr200pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr200pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr200pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_exit(); - } -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - /* CDBG("cam_info values = %d : %d : %d : %d : %d", cam_info->mode, cam_info->address,\ - cam_info->value_1, cam_info->value_2 , cam_info->value_3); */ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr200pc20_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_exposure_compensation(s_ctrl, sr200pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr200pc20_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_white_balance(s_ctrl, sr200pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr200pc20_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_effect(s_ctrl, sr200pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr200pc20_ctrl.prev_mode = sr200pc20_ctrl.op_mode; - sr200pc20_ctrl.op_mode = cam_info->value_1; - /*CDBG("EXT_CAM_SENSOR_MODE = %d", sr200pc20_ctrl.op_mode);*/ - break; - case EXT_CAM_EXIF: - sr200pc20_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - /*CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1);*/ - sr200pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.h b/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.h deleted file mode 100755 index fa16f1fd7e8e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv.h +++ /dev/null @@ -1,15599 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: SM-G3608W(Rossa_CMCC_OPEN) */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 640x480 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x83,}, /* 131 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Defalt */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* 100ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { - - -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x6e,}, /* 110 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { - - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, -/* 100ms */ - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, -/* 100ms */ - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_50hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 ART */ -{0x03, 0x48,}, - -/* PLL Settng */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX etting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 ND */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x28,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_60hz[] = { - - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 ART */ -{0x03, 0x48,}, - -/* PLL Settng */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX etting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 ND */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x28,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { - - -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x83,}, /* 131 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { - - -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x6e,}, /* 110 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x28,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { - - -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x94,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, - -/* END of sr200pc20m_vt_common */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { - -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x7e,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only forPreview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Settng */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX etting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x10,}, -{0x1e, 0x08,}, -{0x1f, 0x04,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ -{0x03, 0x22,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, -{0x83, 0x56,}, // R Max D65 -{0x84, 0x20,}, // R Min H -{0x85, 0x58,}, // B Max H -{0x86, 0x20,}, // B Min D65 -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, -{0x83, 0x3c,}, -{0x84, 0x3a,}, -{0x85, 0x36,}, -{0x86, 0x34,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x49,}, -{0x81, 0x20,}, -{0x82, 0x2a,}, -{0x83, 0x4a,}, -{0x84, 0x48,}, -{0x85, 0x2b,}, -{0x86, 0x29,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, -{0x83, 0x3e,}, -{0x84, 0x38,}, -{0x85, 0x4d,}, -{0x86, 0x44,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x20,}, -{0x81, 0x20,}, -{0x82, 0x58,}, -{0x83, 0x23,}, -{0x84, 0x1f,}, -{0x85, 0x58,}, -{0x86, 0x52,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { - - -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x83,}, /* 131 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* delay 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { - - -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_404 */ -{0x41, 0x94,}, -{0x42, 0x00,}, -{0x43, 0x6e,}, /* 110 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { - - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { - - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x70,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x5e,}, /* 3e */ -{0x50, 0x40,}, /* 28 */ -{0x60, 0x3d,}, /* 24 */ -{0x70, 0x40,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS*/ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x3a,}, -{0x8a, 0x29,}, - -{0x8b, 0x3d,}, -{0x8c, 0x36,}, -{0x8d, 0x37,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if 0 -static const u16 sr200pc20_15fps[] = { - -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{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, 0x07,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x07,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xa8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x07,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x07,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xa8,}, /*DCDC_AG_TH_OFF*/ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 18 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x02,}, /*EXP Max 17.14 fps */ -{0x89, 0xe4,}, -{0x8a, 0x8d,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x91, 0x03,}, /*EXP Fix 15.00 fps*/ -{0x92, 0x4e,}, -{0x93, 0x58,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ - -}; - -static const u16 sr200pc20_20fps[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x05,}, /* BLC_TIME_TH_ON */ -{0x91, 0x05,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x05,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x05,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, /*EXP Normal 30.00 fps */ -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 24.00 fps */ -{0x89, 0x94,}, -{0x8a, 0xf0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x03,}, /*EXP Fix 20.01 fps*/ -{0x92, 0x19,}, -{0x93, 0x20,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,},/*+10*/ -{0x62, 0x86,},/*+10*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness +1*/ -{0x03, 0x13,}, -{0x12, 0x02,}, -{0x25, 0x02,}, -{0x20, 0x1a,}, -{0x21, 0x1a,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/* AE Matrix(Average)*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_party[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,}, -{0x62, 0x86,}, -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xe4,}, /* adaptive off*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - - /*ISO_200*/ -{0xb0, 0x37,}, -{0xb1, 0x37,}, -{0xb2, 0x40,}, -{0xb3, 0x37,}, -{0xb4, 0x37,}, -{0xb5, 0x40,}, -{0xb6, 0x3e,}, -{0xb7, 0x3c,}, -{0xb8, 0x3a,}, -{0xb9, 0x39,}, -{0xba, 0x38,}, -{0xbb, 0x37,}, -{0xbc, 0x37,}, -{0xbd, 0x37,}, - -{0xc0, 0x10,}, -{0xc1, 0x37,}, -{0xc2, 0x37,}, -{0xc3, 0x37,}, -{0xc4, 0x0b,}, - -{0xff, 0x05,}, -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_dawn[] = { -/*WB FLUORESCENT*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, /* 3a */ - -{0x83, 0x3e,}, /* */ -{0x84, 0x38,}, /* */ -{0x85, 0x4d,}, /* */ -{0x86, 0x44,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +2, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x9a,},/*+20*/ -{0x62, 0x96,},/*+20*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /* Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon1*/ -{0x88, 0x10,}, /*EXP Max 3.00 fps */ -{0x89, 0x87,}, -{0x8a, 0xb8,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon2*/ -{0x83, 0x10,}, /*EXP 3.00 fps*/ -{0x84, 0x87,}, -{0x85, 0xb8,}, - -{0x88, 0x10,}, /*EXP Max 3.00 fps */ -{0x89, 0x87,}, -{0x8a, 0xb8,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Flash OFF _Spot*/ -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x72,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x0c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x8c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -static const u16 sr200pc20m_metering_spot[] = { -{0x03, 0x20,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -}; - -static const u16 sr200pc20m_metering_center[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv_coreprime.h b/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv_coreprime.h deleted file mode 100755 index bfc3f06bd8cf..000000000000 --- a/drivers/media/platform/msm/camera_v2_j5/sensor/sr200pc20_yuv_coreprime.h +++ /dev/null @@ -1,13371 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: SM-G3608W(Rossa_CMCC_OPEN) */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 640x480 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_60hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x94,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { - -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0e,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x05,}, /*EXP Max 8.57 fps */ -{0x89, 0xc9,}, -{0x8a, 0x1a,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xe5,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x03,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ -{0x03, 0x22,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, -{0x83, 0x3c,}, -{0x84, 0x3a,}, -{0x85, 0x36,}, -{0x86, 0x34,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x49,}, -{0x81, 0x20,}, -{0x82, 0x2a,}, -{0x83, 0x4a,}, -{0x84, 0x48,}, -{0x85, 0x2b,}, -{0x86, 0x29,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, -{0x83, 0x3e,}, -{0x84, 0x38,}, -{0x85, 0x4d,}, -{0x86, 0x44,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x20,}, -{0x81, 0x20,}, -{0x82, 0x58,}, -{0x83, 0x23,}, -{0x84, 0x1f,}, -{0x85, 0x58,}, -{0x86, 0x52,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { - - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, /*EXP Normal 30.00 fps */ -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 30.00 fps */ -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if 0 -static const u16 sr200pc20_15fps[] = { - -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 360 */ -{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, 0x06,}, /* BLC_TIME_TH_ON */ -{0x91, 0x06,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x06,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x06,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 18 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 5950.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x02,}, /*EXP Max 16.67 fps */ -{0x89, 0xf9,}, -{0x8a, 0xb8,} - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x03,}, /*EXP Fix 15.01 fps*/ -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c-> 3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ - -}; - -static const u16 sr200pc20_20fps[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x05,}, /* BLC_TIME_TH_ON */ -{0x91, 0x05,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x05,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x05,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,} - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x03,}, /*EXP Fix 20.01 fps*/ -{0x92, 0x19,}, -{0x93, 0x20,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,},/*+10*/ -{0x62, 0x86,},/*+10*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness +1*/ -{0x03, 0x13,}, -{0x12, 0x02,}, -{0x25, 0x02,}, -{0x20, 0x1a,}, -{0x21, 0x1a,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/* AE Matrix(Average)*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_party[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,}, -{0x62, 0x86,}, -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xe4,}, /* adaptive off*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - - /*ISO_200*/ -{0xb0, 0x37,}, -{0xb1, 0x37,}, -{0xb2, 0x40,}, -{0xb3, 0x37,}, -{0xb4, 0x37,}, -{0xb5, 0x40,}, -{0xb6, 0x3e,}, -{0xb7, 0x3c,}, -{0xb8, 0x3a,}, -{0xb9, 0x39,}, -{0xba, 0x38,}, -{0xbb, 0x37,}, -{0xbc, 0x37,}, -{0xbd, 0x37,}, - -{0xc0, 0x10,}, -{0xc1, 0x37,}, -{0xc2, 0x37,}, -{0xc3, 0x37,}, -{0xc4, 0x0b,}, - -{0xff, 0x05,}, -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_dawn[] = { -/*WB FLUORESCENT*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, /* 3a */ - -{0x83, 0x3e,}, /* */ -{0x84, 0x38,}, /* */ -{0x85, 0x4d,}, /* */ -{0x86, 0x44,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +2, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x9a,},/*+20*/ -{0x62, 0x96,},/*+20*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /* Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon1*/ -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon2*/ -{0x83, 0x10,}, /*EXP 3.03 fps*/ -{0x84, 0x5d,}, -{0x85, 0x74,}, - -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Flash OFF _Spot*/ -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x72,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -static const u16 sr200pc20m_metering_spot[] = { -{0x03, 0x20,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -}; - -static const u16 sr200pc20m_metering_center[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/Kconfig b/drivers/media/platform/msm/camera_v2_j7lte/Kconfig deleted file mode 100644 index 63ef000e4fbd..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/Kconfig +++ /dev/null @@ -1,433 +0,0 @@ -config MSM_CAMERA_SENSOR - bool "Qualcomm MSM camera sensor support" - depends on MSMB_CAMERA - ---help--- - This flag enables support for Camera Sensor. - The sensor driver is capable of providing real time - data for camera support. The driver support V4L2 - subdev APIs. - -config MSM_CPP - bool "Qualcomm MSM Camera Post Processing Engine support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Post-processing Engine - The Post processing engine is capable of scaling - and cropping image. The driver support V4L2 subdev - APIs. - -config MSM_CCI - bool "Qualcomm MSM Camera Control Interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Control Interface driver only - for those platforms that have hardware support. This driver - is responsible for handling I2C read and write on the I2C - bus. It is also responsible for synchronization with - GPIO and data frames. - -config MSM_CSI20_HEADER - bool "Qualcomm MSM CSI 2.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8960, - 8930 and 8064 platforms. - -config MSM_CSI22_HEADER - bool "Qualcomm MSM CSI 2.2 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 2.2 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required targets based on 8610 - platform. - -config MSM_CSI30_HEADER - bool "Qualcomm MSM CSI 3.0 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - 8064 platforms. - -config MSM_CSI31_HEADER - bool "Qualcomm MSM CSI 3.1 Header" - depends on MSMB_CAMERA - ---help--- - Enable support for CSI drivers to include 3.0 - header. This header has register macros and its - values and bit mask for register configuration bits - This config macro is required for targets based on - APQ8084 platform. - -config MSM_CSIPHY - bool "Qualcomm MSM Camera Serial Interface Physical receiver support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface - Physical receiver. It deserializes packets and - supports detection of packet start and stop - signalling. - -config MSM_CSID - bool "Qualcomm MSM Camera Serial Interface decoder support" - depends on MSMB_CAMERA - ---help--- - Enable support for Camera Serial Interface decoder. - It supports lane merging and decoding of packets - based on cid which is mapped to a virtual channel - and datatype. - -config MSM_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_FRONT_EEPROM - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data in case of FLASH ROM. - Currently supports I2C, CCI and SPI protocol - -config MSM_OTP - bool "Qualcomm MSM Camera ROM Interface for Calibration support" - depends on MSMB_CAMERA - ---help--- - Enable support for ROM Interface for Calibration - Provides interface for reading the Claibration data. - and also provides support for writing data - -config MSM_ISPIF - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of CSID can be routed to of of pixel or raw - data interface in VFE. - -config MSM_ISPIF_V1 - bool "Qualcomm MSM Image Signal Processing interface support" - depends on MSMB_CAMERA - ---help--- - Enable support for Image Signal Processing interface module. - This module acts as a crossbar between CSID and VFE. Output - of any CID of MSM_CSI22_HEADER can be routed to of pixel - or raw data interface in VFE. - -config SENSOR_8_BPP - bool "8 bits per pixel YUV sensor output" - depends on MSMB_CAMERA - ---help--- - 8 bits per pixel YUV sensor output. - -config IMX134 - bool "Sensor IMX134 (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - Sony 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - HFR @60fps and @120fps, - Video HDR support. - -config IMX132 - bool "Sensor IMX132 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - Sony 2 MP Bayer Sensor with auto focus, uses - 2 mipi lanes, preview config = 1920 x 1080 at 30 fps, - snapshot config = 1920 x 1080 at 30 fps, - Video HDR support. - -config SR352 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 3MP sensor, - Rear sensor. - -config SR130PC20 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 1.3MP sensor, - Front sensor. - -config OV9724 - bool "Sensor OV9724 (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config HI256 - bool "Hynix hi256 (YUV 2MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV5648 - bool "Sensor OV5648 (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - OmniVision 5 MP Bayer Sensor, only use 1 mipi lane, - preview set to 1296*972 at 30 fps, - snapshot set to 2592*1944 at 12 fps, - This sensor driver does not support auto focus. - -config MT9M114 - bool "Sensor MT9M114 (YUV 1.26MP)" - depends on MSMB_CAMERA - ---help--- - MT9M114 is Aptina YUV sensor. It supports 1.26 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. -config OV5645 - bool "Sensor OV5645 (YUV 5.0MP)" - depends on MSMB_CAMERA - ---help--- - OV5645 is Omnivision YUV sensor. It supports 5.0 MP preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like saturation. - -config SR200PC20 - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Siliconfile 2.0MP sensor, - Front sensor. -config SR544 - bool "Sensor for back camera" - depends on MSMB_CAMERA - default n - ---help--- - 5MP sensor - Rear sensor - -config SP1628 - bool "Sensor SP1628 (YUV 720P)" - depends on MSMB_CAMERA - ---help--- - SP1628 is SuperPix YUV sensor. It supports 720P preview - and snapshot. The preview and snapshot resolution shall be - 1280 * 270. It does not support auto focus. It supports - few special effects like mono. - -config GC0339 - bool "Sensor GC0339 (BAYER .3M)" - depends on MSMB_CAMERA - ---help--- - gc0339 is a Galaxycore .3 MP Bayer Sensor. - It supports 1 or 2 mipi lanes. - Preview and snapshot resolution shall be 640*480 at 30 fps, - It does not support auto focus. - -config OV8825 - bool "OmniVision OV8825 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 2 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 18 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config OV8865 - bool "OmniVision OV8865 (BAYER 8MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 1632*1224 30 fps, - snapshot config = 3264 * 2448 at 30 fps. - Max fps is 30fps at 3264 * 2448, 60fps at 1632 * 1224 - -config s5k4e1 - bool "Sensor s5k4e1 (BAYER 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP Bayer Sensor. It uses 2 mipi lanes, - supports 720P preview at 30 fps - and QSXGA snapshot at 15 fps. - This sensor driver does not support auto focus. - -config S5K8B1YX - bool "Sensor S5K8B1YX (BAYER 2M)" - depends on MSMB_CAMERA - ---help--- - LSI 2 MP Bayer Sensor, supports 2 mipi lanes, - preview and snapshot config at 1280*720 at 30 fps, - hfr video at 60, 90 and 120 fps. This sensor driver does - not support auto focus. - -config S5K6A3YX - bool "Sensor S5K6A3YX (BAYER 1.9M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 2 MP Bayer Sensor, supports 2 mipi lanes, - -config S5K4H5YB - bool "Sensor S5K4H5YB (BAYER 8M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 8 MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps and - -config S5K3L2XX - bool "Sensor S5K3L2XX (BAYER 13M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 13MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K3P3SX - bool "Sensor S5K3P3SX (BAYER 16M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 16MP Bayer Sensor with auto focus, uses - 4 mipi lanes full resolution @30fps - -config S5K5E3YX - bool "Sensor S5K5E3YX (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config SR552 - bool "Sensor SR552 (BAYER 5M)" - depends on MSMB_CAMERA - ---help--- - S.LSI. 5MP Bayer Sensor with auto focus, uses - 2 mipi lanes full resolution @30fps - -config S5K4ECGX - bool "Sensor s5k4ecgx (SOC 5MP)" - depends on MSMB_CAMERA - ---help--- - Samsung 5 MP SOC Sensor. It uses 2 mipi lanes, - Support auto focus, and flash - -config OV12830 - bool "OmniVision OV12830 (BAYER 12MP)" - depends on MSMB_CAMERA - ---help--- - OmniVision 12.8 MP Bayer Sensor with auto focus.uses - 4 mipi lanes, preview config = 2112 * 1500 at 30 fps, - snapshot config = 4224 * 3000 at 15 fps. - 2 lanes max fps is 18, 4 lanes max fps is 24. - -config MSM_V4L2_VIDEO_OVERLAY_DEVICE - tristate "Qualcomm MSM V4l2 video overlay device" - ---help--- - Enables support for the MSM V4L2 video - overlay driver. This allows video rendering - apps to render overlaid video using Video4Linux2 - APIs, by using /dev/videoX device - -config MSMB_JPEG - tristate "Qualcomm MSM Jpeg Encoder Engine support" - depends on MSMB_CAMERA && (ARCH_MSM8974 || ARCH_MSM8226 || ARCH_APQ8084 || ARCH_MSM8916 || ARCH_MSM) - ---help--- - Enable support for Jpeg Encoder/Decoder - Engine for 8974. - This module serves as the common driver - for the JPEG 1.0 encoder and decoder. - -config MSM_GEMINI - tristate "Qualcomm MSM Gemini JPEG engine support" - depends on MSMB_CAMERA && (ARCH_MSM7X30 || ARCH_MSM8X60 || ARCH_MSM8960) - ---help--- - Enables support for the Gemini JPEG encoder engine for 8x60. - -config SEC_CAMERA_TUNING - bool "Generic Tuning Concept" - ---help--- - Enable support for Tuning in eng Binary - -config CAM_USE_EXT_VANA_GPIO - bool "Samsung EXT_VANA_GPIO" - depends on MSMB_CAMERA - ---help--- - Board use external LDO controlled by GPIO. - -config CAM_DISABLE_LPM_MODE - bool "Camera is Disabled in LPM mode." - depends on NFC_PN547 - default n - ---help--- - Because NFC HW limitation which should not be turned on L16. - -config CAM_PN547_PVDD_EN_CONTROL - bool "PN547 NFC PVDD EN CONTROL" - depends on NFC_PN547 - default n - help - SAMSUNG PN547 NFC PVDD EN CONTROL feature. - This feature provides support for NXP PN547 products. - You should select this feature if your NFC product uses pvdd en pin. - Say Y here to compile support for NXP PN547 PVDD EN CONTROL feature into the - kernel. - -config SW_LANDING_FOR_MULTI_TASKING - bool "SW Landing is applied during multi tasking" - depends on ACTUATOR - default n - help - If Camera exit while multi tasking with call, actuator makes big noise. - SW landing is applied during multi tasking only. - -config CAMERA_SYSFS_V2 - bool "CAMERA SYS" - depends on MSMB_CAMERA - ---help--- - CAMERA SYS. - -config DB8221A - bool "Sensor for front camera" - depends on MSMB_CAMERA - default n - ---help--- - Dongbu HiTek 2.0MP sensor, - Front sensor. - -config OIS - tristate "External ois support" - depends on MSMB_CAMERA - default n - ---help--- - Enables support for external ois module. - -config CAM_DUAL_POWER_SEQ - bool "Dual power up sequence enable" - depends on MSMB_CAMERA - ---help--- - This flag will allow us to write dual power up sequence. - -config FRONT_FLASH - bool "Rear LEd and Front LED both USING" - depends on MSMB_CAMERA - ---help--- - ONLY for Front FLASH Model using. - Front LED for LM3632 or KTD2692 Rear LED SM5703. diff --git a/drivers/media/platform/msm/camera_v2_j7lte/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/Makefile deleted file mode 100644 index 4561562870fe..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/codecs -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/isps -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/pproc -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/jpeg_10 - -obj-$(CONFIG_MSMB_CAMERA) += msm.o -obj-$(CONFIG_MSMB_CAMERA) += cam_dummy.o -obj-$(CONFIG_MSMB_CAMERA) += camera/ -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2/ -obj-$(CONFIG_MSMB_CAMERA) += sensor/ -obj-$(CONFIG_MSMB_CAMERA) += pproc/ -obj-$(CONFIG_MSMB_CAMERA) += isp/ -obj-$(CONFIG_MSMB_CAMERA) += ispif/ -obj-$(CONFIG_MSMB_JPEG) += jpeg_10/ -obj-$(CONFIG_MSMB_CAMERA) += msm_buf_mgr/ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/cam_dummy.c b/drivers/media/platform/msm/camera_v2_j7lte/cam_dummy.c deleted file mode 100644 index 7c2a73a20f0b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/cam_dummy.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" - -static struct v4l2_device *msm_v4l2_dev; -/* static struct msm_cam_dummy_queue cam_dummy_queue; */ - -#if defined CONFIG_SEC_CAMERA_TUNING -int rear_tune; -int front_tune; -#endif - -static int msm_open_cam_dummy(struct file *fp) -{ - int rc; - - pr_err("%s: E\n", __func__); - rc = msm_cam_get_module_init_status(); - pr_err("%s: X %d\n", __func__, rc); - return rc; -} - -#if !defined CONFIG_SEC_CAMERA_TUNING -static long msm_ioctl_cam_dummy(struct file *fp, unsigned int cmd, - unsigned long arg) -{ - return 0; -} -#endif -static int msm_close_cam_dummy(struct file *f) -{ - return 0; -} - -static struct v4l2_file_operations msm_fops_config = { - .owner = THIS_MODULE, - .open = msm_open_cam_dummy, - .release = msm_close_cam_dummy, -#if defined CONFIG_SEC_CAMERA_TUNING - .ioctl = video_ioctl2, -#else - .unlocked_ioctl = msm_ioctl_cam_dummy, -#endif -}; - -static const struct of_device_id cam_dummy_dt_match[] = { - {.compatible = "qcom,cam_dummy",}, - {} -}; - -MODULE_DEVICE_TABLE(of, cam_dummy_dt_match); - -static struct platform_driver cam_dummy_platform_driver = { - .driver = { - .name = "qcom,cam_dummy", - .owner = THIS_MODULE, - .of_match_table = cam_dummy_dt_match, - }, -}; - -#if defined CONFIG_SEC_CAMERA_TUNING -static int msm_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - pr_err("%s TUNING CTRL : ctrl->value %d",__func__,ctrl->value); - if(ctrl->id >= V4L2_CID_PRIVATE_BASE) - { - switch (ctrl->value){ - case NORMAL_MODE : - rear_tune = 0; - front_tune = 0; - pr_err("%s TUNING CTRL : Setting Normal Binary",__func__); - break; - case REAR_TUNING : - rear_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear Tuning Binary",__func__); - break; - case FRONT_TUNING : - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Front Tuning Binary",__func__); - break; - case REAR_FRONT_TUNING : - rear_tune = 1; - front_tune = 1; - pr_err("%s TUNING CTRL : Setting Rear and Front Tuning Binary",__func__); - break; - } - } - return rc; -} - -static const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = { - .vidioc_s_ctrl = msm_v4l2_s_ctrl, -}; -#endif - -static int32_t cam_dummy_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - struct msm_video_device *pvdev; - - /* init_waitqueue_head(&cam_dummy_queue.state_wait);*/ - pr_err("%s:%d\n", __func__, __LINE__); - match = of_match_device(cam_dummy_dt_match, &pdev->dev); - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CAMERA_DUMMY_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-camdummy", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops_config; -#if defined CONFIG_SEC_CAMERA_TUNING - pvdev->vdev->ioctl_ops = &msm_v4l2_ioctl_ops; -#endif - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static int __init cam_dummy_init_module(void) -{ - int32_t rc = 0; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&cam_dummy_platform_driver, - cam_dummy_platform_probe); - pr_err("%s:%d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static void __exit cam_dummy_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - platform_driver_unregister(&cam_dummy_platform_driver); - return; -} - -module_init(cam_dummy_init_module); -module_exit(cam_dummy_exit_module); -MODULE_DESCRIPTION("cam_dummy"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/camera/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/camera/Makefile deleted file mode 100644 index d2a394ca5dad..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/camera/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += camera.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.c b/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.c deleted file mode 100644 index a4205552964b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.c +++ /dev/null @@ -1,826 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "camera.h" -#include "msm.h" -#include "msm_vb2.h" - -#define fh_to_private(__fh) \ - container_of(__fh, struct camera_v4l2_private, fh) - -extern struct task_struct *qdaemon_task; -#define QDAEMON "mm-qcamera" -struct camera_v4l2_private { - struct v4l2_fh fh; - unsigned int stream_id; - unsigned int is_vb2_valid; /*0 if no vb2 buffers on stream, else 1*/ - struct vb2_queue vb2_q; -}; - -static void camera_pack_event(struct file *filep, int evt_id, - int command, int value, struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - /* always MSM_CAMERA_V4L2_EVENT_TYPE */ - event->type = MSM_CAMERA_V4L2_EVENT_TYPE; - event->id = evt_id; - event_data->command = command; - event_data->session_id = pvdev->vdev->num; - event_data->stream_id = sp->stream_id; - event_data->arg_value = value; -} - -static int camera_check_event_status(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - if (event_data->status > MSM_CAMERA_ERR_EVT_BASE) { - pr_err("%s : event_data status out of bounds\n", - __func__); - pr_err("%s : Line %d event_data->status 0X%x\n", - __func__, __LINE__, event_data->status); - return -EFAULT; - } - - return 0; -} - -static int camera_v4l2_querycap(struct file *filep, void *fh, - struct v4l2_capability *cap) -{ - int rc; - struct v4l2_event event; - - /* can use cap->driver to make differentiation */ - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_QUERY_CAP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - - return rc; -} - -static int camera_v4l2_s_crop(struct file *filep, void *fh, - const struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_crop(struct file *filep, void *fh, - struct v4l2_crop *crop) -{ - int rc = 0; - struct v4l2_event event; - - if (crop->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_CROP, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_queryctrl(struct file *filep, void *fh, - struct v4l2_queryctrl *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->type == V4L2_CTRL_TYPE_MENU) { - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - ctrl->id, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_g_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_GET_PARM, ctrl->id, -1, - &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_ctrl(struct file *filep, void *fh, - struct v4l2_control *ctrl) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data; - if (ctrl->id >= V4L2_CID_PRIVATE_BASE) { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, ctrl->id, - ctrl->value, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - event_data = (struct msm_v4l2_event_data *)event.u.data; - ctrl->value = event_data->ret_value; - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_reqbufs(struct file *filep, void *fh, - struct v4l2_requestbuffers *req) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_reqbufs(&sp->vb2_q, req); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_querybuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - return 0; -} - -static int camera_v4l2_qbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_qbuf(&sp->vb2_q, pb); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_dqbuf(struct file *filep, void *fh, - struct v4l2_buffer *pb) -{ - int ret; - struct msm_session *session; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int session_id = pvdev->vdev->num; - session = msm_session_find(session_id); - if (WARN_ON(!session)) - return -EIO; - mutex_lock(&session->lock_q); - ret = vb2_dqbuf(&sp->vb2_q, pb, filep->f_flags & O_NONBLOCK); - mutex_unlock(&session->lock_q); - return ret; -} - -static int camera_v4l2_streamon(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = vb2_streamon(&sp->vb2_q, buf_type); - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_ON, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - return rc; -} - -static int camera_v4l2_streamoff(struct file *filep, void *fh, - enum v4l2_buf_type buf_type) -{ - struct v4l2_event event; - int rc; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_STREAM_OFF, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - vb2_streamoff(&sp->vb2_q, buf_type); - return rc; -} - -static int camera_v4l2_g_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = -EINVAL; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - struct v4l2_event event; - - camera_pack_event(filep, MSM_CAMERA_GET_PARM, - MSM_CAMERA_PRIV_G_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - } - - return rc; -} - -static int camera_v4l2_s_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - int rc = 0; - int i = 0; - struct v4l2_event event; - struct camera_v4l2_private *sp = fh_to_private(fh); - struct msm_v4l2_format_data *user_fmt; - - if (pfmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - - if (WARN_ON(!sp->vb2_q.drv_priv)) - return -ENOMEM; - - memcpy(sp->vb2_q.drv_priv, pfmt->fmt.raw_data, - sizeof(struct msm_v4l2_format_data)); - user_fmt = (struct msm_v4l2_format_data *)sp->vb2_q.drv_priv; - - pr_debug("%s: num planes :%c\n", __func__, - user_fmt->num_planes); - /*num_planes need to bound checked, otherwise for loop - can execute forever */ - if (WARN_ON(user_fmt->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - for (i = 0; i < user_fmt->num_planes; i++) - pr_debug("%s: plane size[%d]\n", __func__, - user_fmt->plane_sizes[i]); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_S_FMT, -1, &event); - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - return rc; - - rc = camera_check_event_status(&event); - if (rc < 0) - return rc; - - sp->is_vb2_valid = 1; - } - - return rc; - -} - -static int camera_v4l2_try_fmt_vid_cap_mplane(struct file *filep, void *fh, - struct v4l2_format *pfmt) -{ - return 0; -} - - -static int camera_v4l2_g_parm(struct file *filep, void *fh, - struct v4l2_streamparm *a) -{ - /* TODO */ - return 0; -} - -static int camera_v4l2_s_parm(struct file *filep, void *fh, - struct v4l2_streamparm *parm) -{ - int rc = 0; - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct camera_v4l2_private *sp = fh_to_private(fh); - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_NEW_STREAM, -1, &event); - - rc = msm_create_stream(event_data->session_id, - event_data->stream_id, &sp->vb2_q); - if (rc < 0) - return rc; - - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) - goto error; - - rc = camera_check_event_status(&event); - if (rc < 0) - goto error; - - /* use stream_id as stream index */ - parm->parm.capture.extendedmode = sp->stream_id; - - return rc; - -error: - msm_delete_stream(event_data->session_id, - event_data->stream_id); - return rc; -} - -static int camera_v4l2_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_subscribe(&sp->fh, sub, 5, NULL); - - return rc; -} - -static int camera_v4l2_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(fh); - - rc = v4l2_event_unsubscribe(&sp->fh, sub); - - return rc; -} - -static const struct v4l2_ioctl_ops camera_v4l2_ioctl_ops = { - .vidioc_querycap = camera_v4l2_querycap, - .vidioc_s_crop = camera_v4l2_s_crop, - .vidioc_g_crop = camera_v4l2_g_crop, - .vidioc_queryctrl = camera_v4l2_queryctrl, - .vidioc_g_ctrl = camera_v4l2_g_ctrl, - .vidioc_s_ctrl = camera_v4l2_s_ctrl, - .vidioc_reqbufs = camera_v4l2_reqbufs, - .vidioc_querybuf = camera_v4l2_querybuf, - .vidioc_qbuf = camera_v4l2_qbuf, - .vidioc_dqbuf = camera_v4l2_dqbuf, - .vidioc_streamon = camera_v4l2_streamon, - .vidioc_streamoff = camera_v4l2_streamoff, - .vidioc_g_fmt_vid_cap_mplane = camera_v4l2_g_fmt_vid_cap_mplane, - .vidioc_s_fmt_vid_cap_mplane = camera_v4l2_s_fmt_vid_cap_mplane, - .vidioc_try_fmt_vid_cap_mplane = camera_v4l2_try_fmt_vid_cap_mplane, - - /* Stream type-dependent parameter ioctls */ - .vidioc_g_parm = camera_v4l2_g_parm, - .vidioc_s_parm = camera_v4l2_s_parm, - - /* event subscribe/unsubscribe */ - .vidioc_subscribe_event = camera_v4l2_subscribe_event, - .vidioc_unsubscribe_event = camera_v4l2_unsubscribe_event, -}; - -static int camera_v4l2_fh_open(struct file *filep) -{ - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp; - unsigned int stream_id; - - sp = kzalloc(sizeof(*sp), GFP_KERNEL); - if (!sp) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - filep->private_data = &sp->fh; - - /* stream_id = open id */ - stream_id = atomic_read(&pvdev->opened); - sp->stream_id = find_first_zero_bit( - &stream_id, MSM_CAMERA_STREAM_CNT_BITS); - pr_debug("%s: Found stream_id=%d\n", __func__, sp->stream_id); - - v4l2_fh_init(&sp->fh, pvdev->vdev); - v4l2_fh_add(&sp->fh); - - return 0; -} - -static int camera_v4l2_fh_release(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - - if (sp) { - v4l2_fh_del(&sp->fh); - v4l2_fh_exit(&sp->fh); - } - - kzfree(sp); - return 0; -} - -static int camera_v4l2_vb2_q_init(struct file *filep) -{ - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - struct vb2_queue *q = &sp->vb2_q; - - memset(q, 0, sizeof(struct vb2_queue)); - - /* free up this buffer when stream is done */ - q->drv_priv = - kzalloc(sizeof(struct msm_v4l2_format_data), GFP_KERNEL); - if (!q->drv_priv) { - pr_err("%s : memory not available\n", __func__); - return -ENOMEM; - } - - q->mem_ops = msm_vb2_get_q_mem_ops(); - q->ops = msm_vb2_get_q_ops(); - - /* default queue type */ - q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - q->io_modes = VB2_USERPTR; - q->io_flags = 0; - q->buf_struct_size = sizeof(struct msm_vb2_buffer); - q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - return vb2_queue_init(q); -} - -static void camera_v4l2_vb2_q_release(struct file *filep) -{ - struct camera_v4l2_private *sp = filep->private_data; - - kzfree(sp->vb2_q.drv_priv); - vb2_queue_release(&sp->vb2_q); -} - -static int camera_v4l2_open(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - unsigned int opn_idx, idx; - BUG_ON(!pvdev); - - rc = camera_v4l2_fh_open(filep); - if (rc < 0) { - pr_err("%s : camera_v4l2_fh_open failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto fh_open_fail; - } - - opn_idx = atomic_read(&pvdev->opened); - idx = opn_idx; - /* every stream has a vb2 queue */ - rc = camera_v4l2_vb2_q_init(filep); - if (rc < 0) { - pr_err("%s : vb2 queue init fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto vb2_q_fail; - } - - if (!atomic_read(&pvdev->opened)) { - pm_stay_awake(&pvdev->vdev->dev); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* Disable power collapse latency */ - msm_pm_qos_update_request(CAMERA_DISABLE_PC_LATENCY); -#endif - - /* create a new session when first opened */ - rc = msm_create_session(pvdev->vdev->num, pvdev->vdev); - if (rc < 0) { - pr_err("%s : session creation failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed\n", - __func__); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto command_ack_q_fail; - } - - camera_pack_event(filep, MSM_CAMERA_NEW_SESSION, 0, -1, &event); - rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - if (rc < 0) { - pr_err("%s : posting of NEW_SESSION event failed\n", - __func__); - if (qdaemon_task) { - if (!strncmp(qdaemon_task->comm, QDAEMON, strlen(QDAEMON))) { - pr_err("%s, kill daemon", __func__); - send_sig(SIGKILL, qdaemon_task, 0); - pr_err("%s, kill this", __func__); - send_sig(SIGKILL, current, 0); - } else - pr_err("%s, now (%s : %d)", __func__, - qdaemon_task->comm, task_pid_nr(qdaemon_task)); - } else - pr_err("error!! can't look for daemon"); - pr_err("%s : Line %d rc %d\n", __func__, __LINE__, rc); - goto post_fail; - } - - rc = camera_check_event_status(&event); - if (rc < 0) { - pr_err("%s : checking event status fails Line %d rc %d\n", - __func__, __LINE__, rc); - goto post_fail; - } - } else { - rc = msm_create_command_ack_q(pvdev->vdev->num, - find_first_zero_bit(&opn_idx, - MSM_CAMERA_STREAM_CNT_BITS)); - if (rc < 0) { - pr_err("%s : creation of command_ack queue failed Line %d rc %d\n", - __func__, __LINE__, rc); - goto session_fail; - } - } - pr_debug("%s: Open stream_id=%d\n", __func__, - find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - idx |= (1 << find_first_zero_bit(&opn_idx, MSM_CAMERA_STREAM_CNT_BITS)); - atomic_cmpxchg(&pvdev->opened, opn_idx, idx); - return rc; - -post_fail: - msm_delete_command_ack_q(pvdev->vdev->num, 0); -command_ack_q_fail: - msm_destroy_session(pvdev->vdev->num); -session_fail: - pm_relax(&pvdev->vdev->dev); - camera_v4l2_vb2_q_release(filep); -vb2_q_fail: - camera_v4l2_fh_release(filep); -fh_open_fail: - return rc; -} - -static unsigned int camera_v4l2_poll(struct file *filep, - struct poll_table_struct *wait) -{ - int rc = 0; - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - if (sp->is_vb2_valid == 1) - rc = vb2_poll(&sp->vb2_q, filep, wait); - - poll_wait(filep, &sp->fh.wait, wait); - if (v4l2_event_pending(&sp->fh)) - rc |= POLLPRI; - - return rc; -} - -static int camera_v4l2_close(struct file *filep) -{ - int rc = 0; - struct v4l2_event event; - struct msm_video_device *pvdev = video_drvdata(filep); - struct camera_v4l2_private *sp = fh_to_private(filep->private_data); - unsigned int opn_idx, mask; - BUG_ON(!pvdev); - - opn_idx = atomic_read(&pvdev->opened); - pr_debug("%s: close stream_id=%d\n", __func__, sp->stream_id); - mask = (1 << sp->stream_id); - opn_idx &= ~mask; - atomic_set(&pvdev->opened, opn_idx); - - if (atomic_read(&pvdev->opened) == 0) { - - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - - camera_pack_event(filep, MSM_CAMERA_DEL_SESSION, 0, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, 0); - - /* This should take care of both normal close - * and application crashes */ - msm_destroy_session(pvdev->vdev->num); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* Enable power collapse latency */ - msm_pm_qos_update_request(CAMERA_ENABLE_PC_LATENCY); -#endif - - pm_relax(&pvdev->vdev->dev); - } else { - camera_pack_event(filep, MSM_CAMERA_SET_PARM, - MSM_CAMERA_PRIV_DEL_STREAM, -1, &event); - - /* Donot wait, imaging server may have crashed */ - msm_post_event(&event, MSM_POST_EVT_TIMEOUT); - msm_delete_command_ack_q(pvdev->vdev->num, - sp->stream_id); - - msm_delete_stream(pvdev->vdev->num, sp->stream_id); - } - - camera_v4l2_vb2_q_release(filep); - camera_v4l2_fh_release(filep); - - return rc; -} - -#ifdef CONFIG_COMPAT -long camera_v4l2_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return -ENOIOCTLCMD; -} -#endif -static struct v4l2_file_operations camera_v4l2_fops = { - .owner = THIS_MODULE, - .open = camera_v4l2_open, - .poll = camera_v4l2_poll, - .release = camera_v4l2_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = camera_v4l2_compat_ioctl, -#endif -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session) -{ - struct msm_video_device *pvdev; - struct v4l2_device *v4l2_dev; - int rc = 0; - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto init_end; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - - v4l2_dev = kzalloc(sizeof(struct v4l2_device), GFP_KERNEL); - if (WARN_ON(!v4l2_dev)) { - rc = -ENOMEM; - goto v4l2_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(v4l2_dev->mdev->model, MSM_CAMERA_NAME, - sizeof(v4l2_dev->mdev->model)); - - v4l2_dev->mdev->dev = dev; - - rc = media_device_register(v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - rc = media_entity_init(&pvdev->vdev->entity, 0, NULL, 0); - if (WARN_ON(rc < 0)) - goto entity_fail; - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - v4l2_dev->notify = NULL; - pvdev->vdev->v4l2_dev = v4l2_dev; - - rc = v4l2_device_register(dev, pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-sensor", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &camera_v4l2_fops; - pvdev->vdev->ioctl_ops = &camera_v4l2_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto video_register_fail; -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - *session = pvdev->vdev->num; - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - device_init_wakeup(&pvdev->vdev->dev, 1); - goto init_end; - -video_register_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(v4l2_dev->mdev); -media_fail: - kzfree(v4l2_dev->mdev); -mdev_fail: -#endif - kzfree(v4l2_dev); -v4l2_fail: - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -init_end: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.h b/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.h deleted file mode 100644 index ac860a4f87d6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/camera/camera.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _CAMERA_H -#define _CAMERA_H - -enum stream_state { - START_STREAM = 0, - STOP_STREAM, -}; - -int camera_init_v4l2(struct device *dev, unsigned int *session); - -#endif /*_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/fd/Makefile deleted file mode 100644 index 757c84e8e08a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) -ccflags-y += -Idrivers/media/video/msm - -obj-$(CONFIG_MSM_FD) += msm_fd_dev.o msm_fd_hw.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.c b/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.c deleted file mode 100644 index 148901d46330..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.c +++ /dev/null @@ -1,1386 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_fd_dev.h" -#include "msm_fd_hw.h" -#include "msm_fd_regs.h" - -#define MSM_FD_DRV_NAME "msm_fd" - -#define MSM_FD_WORD_SIZE_BYTES 4 - -/* Face detection thresholds definitions */ -#define MSM_FD_DEF_THRESHOLD 5 -#define MSM_FD_MAX_THRESHOLD_VALUE 9 - -/* Face angle lookup table */ -#define MSM_FD_DEF_ANGLE_IDX 2 -static int msm_fd_angle[] = {45, 135, 359}; - -/* Face direction lookup table */ -#define MSM_FD_DEF_DIR_IDX 0 -static int msm_fd_dir[] = {0, 90, 270, 180}; - -/* Minimum face size lookup table */ -#define MSM_FD_DEF_MIN_SIZE_IDX 0 -static int msm_fd_min_size[] = {20, 25, 32, 40}; - -/* Face detection size lookup table */ -static struct msm_fd_size fd_size[] = { - { - .width = 320, - .height = 240, - .reg_val = MSM_FD_IMAGE_SIZE_QVGA, - .work_size = (13120 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 427, - .height = 240, - .reg_val = MSM_FD_IMAGE_SIZE_WQVGA, - .work_size = (17744 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 640, - .height = 480, - .reg_val = MSM_FD_IMAGE_SIZE_VGA, - .work_size = (52624 * MSM_FD_WORD_SIZE_BYTES), - }, - { - .width = 854, - .height = 480, - .reg_val = MSM_FD_IMAGE_SIZE_WVGA, - .work_size = (70560 * MSM_FD_WORD_SIZE_BYTES), - }, -}; - -/* - * msm_fd_ctx_from_fh - Get fd context from v4l2 fh. - * @fh: Pointer to v4l2 fh. - */ -static inline struct fd_ctx *msm_fd_ctx_from_fh(struct v4l2_fh *fh) -{ - return container_of(fh, struct fd_ctx, fh); -} - -/* - * msm_fd_get_format_index - Get format index from v4l2 format. - * @f: Pointer to v4l2 format struct. - */ -static int msm_fd_get_format_index(struct v4l2_format *f) -{ - int index; - - for (index = 0; index < ARRAY_SIZE(fd_size); index++) { - if (f->fmt.pix.width <= fd_size[index].width && - f->fmt.pix.height <= fd_size[index].height) - return index; - } - return index - 1; -} - -/* - * msm_fd_get_idx_from_value - Get array index from value. - * @value: Value for which index is needed. - * @array: Array in which index is searched for. - * @array_size: Array size. - */ -static int msm_fd_get_idx_from_value(int value, int *array, int array_size) -{ - int index; - int i; - - index = 0; - for (i = 1; i < array_size; i++) { - if (value == array[i]) { - index = i; - break; - } - if (abs(value - array[i]) < abs(value - array[index])) - index = i; - } - return index; -} - -/* - * msm_fd_fill_format_from_index - Fill v4l2 format struct from size index. - * @f: Pointer of v4l2 struct which will be filled. - * @index: Size index (Format will be filled based on this index). - */ -static int msm_fd_fill_format_from_index(struct v4l2_format *f, int index) -{ - f->fmt.pix.width = fd_size[index].width; - f->fmt.pix.height = fd_size[index].height; - f->fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; - if (f->fmt.pix.bytesperline < f->fmt.pix.width) - f->fmt.pix.bytesperline = f->fmt.pix.width; - - f->fmt.pix.bytesperline = ALIGN(f->fmt.pix.bytesperline, 16); - f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * f->fmt.pix.height; - f->fmt.pix.field = V4L2_FIELD_NONE; - - return 0; -} - -/* - * msm_fd_fill_format_from_ctx - Fill v4l2 format struct from fd context. - * @f: Pointer of v4l2 struct which will be filled. - * @c: Pointer to fd context. - */ -static int msm_fd_fill_format_from_ctx(struct v4l2_format *f, struct fd_ctx *c) -{ - if (NULL == c->format.size) - return -EINVAL; - - f->fmt.pix.width = c->format.size->width; - f->fmt.pix.height = c->format.size->height; - f->fmt.pix.pixelformat = c->format.pixelformat; - f->fmt.pix.bytesperline = c->format.bytesperline; - f->fmt.pix.sizeimage = c->format.sizeimage; - f->fmt.pix.field = V4L2_FIELD_NONE; - - return 0; -} - -/* - * msm_fd_queue_setup - vb2_ops queue_setup callback. - * @q: Pointer to vb2 queue struct. - * @fmt: Pointer to v4l2 format struct (NULL is valid argument). - * @num_buffers: Pointer of number of buffers requested. - * @num_planes: Pointer to number of planes requested. - * @sizes: Array containing sizes of planes. - * @alloc_ctxs: Array of allocated contexts for each plane. - */ -static int msm_fd_queue_setup(struct vb2_queue *q, - const struct v4l2_format *fmt, - unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - - *num_planes = 1; - - if (NULL == fmt) - sizes[0] = ctx->format.sizeimage; - else - sizes[0] = fmt->fmt.pix.sizeimage; - - alloc_ctxs[0] = &ctx->mem_pool; - - return 0; -} - -/* - * msm_fd_buf_init - vb2_ops buf_init callback. - * @vb: Pointer to vb2 buffer struct. - */ -int msm_fd_buf_init(struct vb2_buffer *vb) -{ - struct msm_fd_buffer *fd_buffer = - (struct msm_fd_buffer *)vb; - - INIT_LIST_HEAD(&fd_buffer->list); - atomic_set(&fd_buffer->active, 0); - - return 0; -} - -/* - * msm_fd_buf_queue - vb2_ops buf_queue callback. - * @vb: Pointer to vb2 buffer struct. - */ -static void msm_fd_buf_queue(struct vb2_buffer *vb) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue); - struct msm_fd_buffer *fd_buffer = - (struct msm_fd_buffer *)vb; - - fd_buffer->format = ctx->format; - fd_buffer->settings = ctx->settings; - fd_buffer->work_addr = ctx->work_buf.addr; - msm_fd_hw_add_buffer(ctx->fd_device, fd_buffer); - - if (vb->vb2_queue->streaming) - msm_fd_hw_schedule_and_start(ctx->fd_device); - - return; -} - -/* - * msm_fd_start_streaming - vb2_ops start_streaming callback. - * @q: Pointer to vb2 queue struct. - * @count: Number of buffer queued before stream on call. - */ -static int msm_fd_start_streaming(struct vb2_queue *q, unsigned int count) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - int ret; - - if (!ctx->work_buf.handle) { - dev_err(ctx->fd_device->dev, "Missing working buffer\n"); - return -EINVAL; - } - - ret = msm_fd_hw_get(ctx->fd_device, ctx->settings.speed); - if (ret < 0) { - dev_err(ctx->fd_device->dev, "Can not acquire fd hw\n"); - goto out; - } - - ret = msm_fd_hw_schedule_and_start(ctx->fd_device); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Can not start fd hw\n"); - -out: - return ret; -} - -/* - * msm_fd_stop_streaming - vb2_ops stop_streaming callback. - * @q: Pointer to vb2 queue struct. - */ -static int msm_fd_stop_streaming(struct vb2_queue *q) -{ - struct fd_ctx *ctx = vb2_get_drv_priv(q); - - msm_fd_hw_remove_buffers_from_queue(ctx->fd_device, q); - msm_fd_hw_put(ctx->fd_device); - - return 0; -} - -/* Videobuf2 queue callbacks. */ -static struct vb2_ops msm_fd_vb2_q_ops = { - .queue_setup = msm_fd_queue_setup, - .buf_init = msm_fd_buf_init, - .buf_queue = msm_fd_buf_queue, - .start_streaming = msm_fd_start_streaming, - .stop_streaming = msm_fd_stop_streaming, -}; - -/* - * msm_fd_get_userptr - Map and get buffer handler for user pointer buffer. - * @alloc_ctx: Contexts allocated in buf_setup. - * @vaddr: Virtual addr passed from userpsace (in our case ion fd) - * @size: Size of the buffer - * @write: True if buffer will be used for writing the data. - */ -static void *msm_fd_get_userptr(void *alloc_ctx, - unsigned long vaddr, unsigned long size, int write) -{ - struct msm_fd_mem_pool *pool = alloc_ctx; - struct msm_fd_buf_handle *buf; - int ret; - - buf = kzalloc(sizeof(*buf), GFP_KERNEL); - if (!buf) - return ERR_PTR(-ENOMEM); - - ret = msm_fd_hw_map_buffer(pool, vaddr, buf); - if (ret < 0 || buf->size < size) - goto error; - - return buf; -error: - kzfree(buf); - return ERR_PTR(-ENOMEM); -} - -/* - * msm_fd_put_userptr - Unmap and free buffer handler. - * @buf_priv: Buffer handler allocated get_userptr callback. - */ -static void msm_fd_put_userptr(void *buf_priv) -{ - if (IS_ERR_OR_NULL(buf_priv)) - return; - - msm_fd_hw_unmap_buffer(buf_priv); - - kzfree(buf_priv); -} - -/* Videobuf2 memory callbacks. */ -static struct vb2_mem_ops msm_fd_vb2_mem_ops = { - .get_userptr = msm_fd_get_userptr, - .put_userptr = msm_fd_put_userptr, -}; - -/* - * msm_fd_open - Fd device open method. - * @file: Pointer to file struct. - */ -static int msm_fd_open(struct file *file) -{ - struct msm_fd_device *device = video_drvdata(file); - struct video_device *video = video_devdata(file); - struct fd_ctx *ctx; - int ret; - - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; - - ctx->fd_device = device; - - /* Initialize work buffer handler */ - ctx->work_buf.pool = NULL; - ctx->work_buf.fd = -1; - - /* Set ctx defaults */ - ctx->settings.speed = ctx->fd_device->clk_rates_num; - ctx->settings.angle_index = MSM_FD_DEF_ANGLE_IDX; - ctx->settings.direction_index = MSM_FD_DEF_DIR_IDX; - ctx->settings.min_size_index = MSM_FD_DEF_MIN_SIZE_IDX; - ctx->settings.threshold = MSM_FD_DEF_THRESHOLD; - - atomic_set(&ctx->subscribed_for_event, 0); - - v4l2_fh_init(&ctx->fh, video); - - file->private_data = &ctx->fh; - v4l2_fh_add(&ctx->fh); - - ctx->vb2_q.drv_priv = ctx; - ctx->vb2_q.mem_ops = &msm_fd_vb2_mem_ops; - ctx->vb2_q.ops = &msm_fd_vb2_q_ops; - ctx->vb2_q.buf_struct_size = sizeof(struct msm_fd_buffer); - ctx->vb2_q.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; - ctx->vb2_q.io_modes = VB2_USERPTR; - ctx->vb2_q.timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY; - ret = vb2_queue_init(&ctx->vb2_q); - if (ret < 0) { - dev_err(device->dev, "Error queue init\n"); - goto error_vb2_queue_init; - } - - ctx->mem_pool.client = msm_ion_client_create(MSM_FD_DRV_NAME); - if (IS_ERR_OR_NULL(ctx->mem_pool.client)) { - dev_err(device->dev, "Error ion client create\n"); - goto error_ion_client_create; - } - ctx->mem_pool.fd_device = ctx->fd_device; - ctx->mem_pool.domain_num = ctx->fd_device->iommu_domain_num; - - ctx->stats = vmalloc(sizeof(*ctx->stats) * MSM_FD_MAX_RESULT_BUFS); - if (!ctx->stats) { - dev_err(device->dev, "No memory for face statistics\n"); - ret = -ENOMEM; - goto error_stats_vmalloc; - } - - return 0; - -error_stats_vmalloc: - ion_client_destroy(ctx->mem_pool.client); -error_ion_client_create: - vb2_queue_release(&ctx->vb2_q); -error_vb2_queue_init: - v4l2_fh_del(&ctx->fh); - v4l2_fh_exit(&ctx->fh); - kfree(ctx); - return ret; -} - -/* - * msm_fd_release - Fd device release method. - * @file: Pointer to file struct. - */ -static int msm_fd_release(struct file *file) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(file->private_data); - - vb2_queue_release(&ctx->vb2_q); - - vfree(ctx->stats); - - if (ctx->work_buf.handle) - msm_fd_hw_unmap_buffer(&ctx->work_buf); - - ion_client_destroy(ctx->mem_pool.client); - - v4l2_fh_del(&ctx->fh); - v4l2_fh_exit(&ctx->fh); - - kfree(ctx); - - return 0; -} - -/* - * msm_fd_poll - Fd device pool method. - * @file: Pointer to file struct. - * @wait: Pointer to pool table struct. - */ -static unsigned int msm_fd_poll(struct file *file, - struct poll_table_struct *wait) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(file->private_data); - unsigned int ret; - - ret = vb2_poll(&ctx->vb2_q, file, wait); - - if (atomic_read(&ctx->subscribed_for_event)) { - poll_wait(file, &ctx->fh.wait, wait); - if (v4l2_event_pending(&ctx->fh)) - ret |= POLLPRI; - } - - return ret; -} - -/* - * msm_fd_private_ioctl - V4l2 private ioctl handler. - * @file: Pointer to file struct. - * @fd: V4l2 device file handle. - * @valid_prio: Priority ioctl valid flag. - * @cmd: Ioctl command. - * @arg: Ioctl argument. - */ -static long msm_fd_private_ioctl(struct file *file, void *fh, - bool valid_prio, unsigned int cmd, void *arg) -{ - struct msm_fd_result *req_result = arg; - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - struct msm_fd_stats *stats; - int stats_idx; - int ret; - int i; - - switch (cmd) { - case VIDIOC_MSM_FD_GET_RESULT: - if (req_result->frame_id == 0) { - dev_err(ctx->fd_device->dev, "Invalid frame id\n"); - return -EINVAL; - } - - stats_idx = req_result->frame_id % MSM_FD_MAX_RESULT_BUFS; - stats = &ctx->stats[stats_idx]; - if (req_result->frame_id != atomic_read(&stats->frame_id)) { - dev_err(ctx->fd_device->dev, "Stats not available\n"); - return -EINVAL; - } - - if (req_result->face_cnt > stats->face_cnt) - req_result->face_cnt = stats->face_cnt; - - for (i = 0; i < req_result->face_cnt; i++) { - ret = copy_to_user((void __user *) - &req_result->face_data[i], - &stats->face_data[i], - sizeof(struct msm_fd_face_data)); - if (ret) { - dev_err(ctx->fd_device->dev, "Copy to user\n"); - return -EFAULT; - } - } - - if (req_result->frame_id != atomic_read(&stats->frame_id)) { - dev_err(ctx->fd_device->dev, "Erroneous buffer\n"); - return -EINVAL; - } - break; - default: - dev_err(ctx->fd_device->dev, "Wrong ioctl type %x\n", cmd); - ret = -ENOTTY; - break; - } - - return ret; -} - -#ifdef CONFIG_COMPAT -/* - * msm_fd_compat_ioctl32 - Compat ioctl handler function. - * @file: Pointer to file struct. - * @cmd: Ioctl command. - * @arg: Ioctl argument. - */ -static long msm_fd_compat_ioctl32(struct file *file, - unsigned int cmd, unsigned long arg) -{ - long ret; - - switch (cmd) { - case VIDIOC_MSM_FD_GET_RESULT32: - { - struct msm_fd_result32 result32; - struct msm_fd_result result; - - if (copy_from_user(&result32, (void __user *)arg, - sizeof(result32))) - return -EFAULT; - - result.frame_id = result32.frame_id; - result.face_cnt = result32.face_cnt; - result.face_data = compat_ptr(result32.face_data); - - ret = msm_fd_private_ioctl(file, file->private_data, - 0, VIDIOC_MSM_FD_GET_RESULT, (void *)&result); - - result32.frame_id = result.frame_id; - result32.face_cnt = result.face_cnt; - - if (copy_to_user((void __user *)arg, &result32, - sizeof(result32))) - return -EFAULT; - - break; - } - default: - ret = -ENOIOCTLCMD; - break; - - } - - return ret; -} -#endif - -/* Fd device file operations callbacks */ -static const struct v4l2_file_operations fd_fops = { - .owner = THIS_MODULE, - .open = msm_fd_open, - .release = msm_fd_release, - .poll = msm_fd_poll, - .unlocked_ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = msm_fd_compat_ioctl32, -#endif -}; - -/* - * msm_fd_querycap - V4l2 ioctl query capability handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @cap: Pointer to v4l2_capability struct need to be filled. - */ -static int msm_fd_querycap(struct file *file, - void *fh, struct v4l2_capability *cap) -{ - cap->bus_info[0] = 0; - strlcpy(cap->driver, MSM_FD_DRV_NAME, sizeof(cap->driver)); - strlcpy(cap->card, MSM_FD_DRV_NAME, sizeof(cap->card)); - cap->capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT; - - return 0; -} - -/* - * msm_fd_enum_fmt_vid_out - V4l2 ioctl enumerate format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_fmtdesc struct need to be filled. - */ -static int msm_fd_enum_fmt_vid_out(struct file *file, - void *fh, struct v4l2_fmtdesc *f) -{ - if (f->index > 0) - return -EINVAL; - - f->pixelformat = V4L2_PIX_FMT_GREY; - strlcpy(f->description, "8 Greyscale", - sizeof(f->description)); - - return 0; -} - -/* - * msm_fd_g_fmt - V4l2 ioctl get format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct need to be filled. - */ -static int msm_fd_g_fmt(struct file *file, void *fh, struct v4l2_format *f) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return msm_fd_fill_format_from_ctx(f, ctx); -} - -/* - * msm_fd_try_fmt_vid_out - V4l2 ioctl try format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct. - */ -static int msm_fd_try_fmt_vid_out(struct file *file, - void *fh, struct v4l2_format *f) -{ - int index; - - index = msm_fd_get_format_index(f); - - return msm_fd_fill_format_from_index(f, index); -} - -/* - * msm_fd_s_fmt_vid_out - V4l2 ioctl set format handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @f: Pointer to v4l2_format struct. - */ -static int msm_fd_s_fmt_vid_out(struct file *file, - void *fh, struct v4l2_format *f) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int index; - - index = msm_fd_get_format_index(f); - - msm_fd_fill_format_from_index(f, index); - - ctx->format.size = &fd_size[index]; - ctx->format.pixelformat = f->fmt.pix.pixelformat; - ctx->format.bytesperline = f->fmt.pix.bytesperline; - ctx->format.sizeimage = f->fmt.pix.sizeimage; - - /* Initialize crop */ - ctx->format.crop.top = 0; - ctx->format.crop.left = 0; - ctx->format.crop.width = fd_size[index].width; - ctx->format.crop.height = fd_size[index].height; - - return 0; -} - -/* - * msm_fd_reqbufs - V4l2 ioctl request buffers handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @req: Pointer to v4l2_requestbuffer struct. - */ -static int msm_fd_reqbufs(struct file *file, - void *fh, struct v4l2_requestbuffers *req) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_reqbufs(&ctx->vb2_q, req); -} - -/* - * msm_fd_qbuf - V4l2 ioctl queue buffer handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @pb: Pointer to v4l2_buffer struct. - */ -static int msm_fd_qbuf(struct file *file, void *fh, - struct v4l2_buffer *pb) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_qbuf(&ctx->vb2_q, pb); -} - -/* - * msm_fd_dqbuf - V4l2 ioctl dequeue buffer handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @pb: Pointer to v4l2_buffer struct. - */ -static int msm_fd_dqbuf(struct file *file, - void *fh, struct v4l2_buffer *pb) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); -} - -/* - * msm_fd_streamon - V4l2 ioctl stream on handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @buf_type: V4l2 buffer type. - */ -static int msm_fd_streamon(struct file *file, - void *fh, enum v4l2_buf_type buf_type) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = vb2_streamon(&ctx->vb2_q, buf_type); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Stream on fails\n"); - - return ret; -} - -/* - * msm_fd_streamoff - V4l2 ioctl stream off handler. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @buf_type: V4l2 buffer type. - */ -static int msm_fd_streamoff(struct file *file, - void *fh, enum v4l2_buf_type buf_type) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = vb2_streamoff(&ctx->vb2_q, buf_type); - if (ret < 0) - dev_err(ctx->fd_device->dev, "Stream off fails\n"); - - return ret; -} - -/* - * msm_fd_subscribe_event - V4l2 ioctl subscribe for event handler. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_event_subscription containing event information. - */ -static int msm_fd_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - if (sub->type != MSM_EVENT_FD) - return -EINVAL; - - ret = v4l2_event_subscribe(fh, sub, MSM_FD_MAX_RESULT_BUFS, NULL); - if (!ret) - atomic_set(&ctx->subscribed_for_event, 1); - - return ret; -} - -/* - * msm_fd_unsubscribe_event - V4l2 ioctl unsubscribe from event handler. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_event_subscription containing event information. - */ -static int msm_fd_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int ret; - - ret = v4l2_event_unsubscribe(fh, sub); - if (!ret) - atomic_set(&ctx->subscribed_for_event, 0); - - return ret; -} - -/* - * msm_fd_guery_ctrl - V4l2 ioctl query control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct info need to be filled based on id. - */ -static int msm_fd_guery_ctrl(struct file *file, void *fh, - struct v4l2_queryctrl *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - switch (a->id) { - case V4L2_CID_FD_SPEED: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = ctx->fd_device->clk_rates_num; - a->minimum = 0; - a->maximum = ctx->fd_device->clk_rates_num; - a->step = 1; - strlcpy(a->name, "msm fd face speed idx", - sizeof(a->name)); - case V4L2_CID_FD_FACE_ANGLE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_angle[MSM_FD_DEF_ANGLE_IDX]; - a->minimum = msm_fd_angle[0]; - a->maximum = msm_fd_angle[ARRAY_SIZE(msm_fd_angle) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd face angle ctrl", - sizeof(a->name)); - break; - case V4L2_CID_FD_FACE_DIRECTION: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_dir[MSM_FD_DEF_DIR_IDX]; - a->minimum = msm_fd_dir[0]; - a->maximum = msm_fd_dir[ARRAY_SIZE(msm_fd_dir) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd face direction ctrl", - sizeof(a->name)); - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = msm_fd_min_size[MSM_FD_DEF_MIN_SIZE_IDX]; - a->minimum = msm_fd_min_size[0]; - a->maximum = msm_fd_min_size[ARRAY_SIZE(msm_fd_min_size) - 1]; - a->step = 1; - strlcpy(a->name, "msm fd minimum face size (pixels)", - sizeof(a->name)); - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = MSM_FD_DEF_THRESHOLD; - a->minimum = 0; - a->maximum = MSM_FD_MAX_THRESHOLD_VALUE; - a->step = 1; - strlcpy(a->name, "msm fd detection threshold", - sizeof(a->name)); - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = fd_size[0].work_size; - a->minimum = fd_size[(ARRAY_SIZE(fd_size) - 1)].work_size; - a->maximum = fd_size[0].work_size; - a->step = 1; - strlcpy(a->name, "msm fd working memory size", - sizeof(a->name)); - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - a->type = V4L2_CTRL_TYPE_INTEGER; - a->default_value = -1; - a->minimum = 0; - a->maximum = INT_MAX; - a->step = 1; - strlcpy(a->name, "msm fd ion fd of working memory", - sizeof(a->name)); - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_g_ctrl - V4l2 ioctl get control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct need to be filled. - */ -static int msm_fd_g_ctrl(struct file *file, void *fh, struct v4l2_control *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - switch (a->id) { - case V4L2_CID_FD_SPEED: - a->value = ctx->settings.speed; - break; - case V4L2_CID_FD_FACE_ANGLE: - a->value = msm_fd_angle[ctx->settings.angle_index]; - break; - case V4L2_CID_FD_FACE_DIRECTION: - a->value = msm_fd_dir[ctx->settings.direction_index]; - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - a->value = msm_fd_min_size[ctx->settings.min_size_index]; - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - a->value = ctx->settings.threshold; - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - if (!ctx->format.size) - return -EINVAL; - - a->value = ctx->format.size->work_size; - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - if (!ctx->work_buf.handle) - return -EINVAL; - - a->value = ctx->work_buf.fd; - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_s_ctrl - V4l2 ioctl set control. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_queryctrl struct need to be set. - */ -static int msm_fd_s_ctrl(struct file *file, void *fh, struct v4l2_control *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int idx; - int ret; - - switch (a->id) { - case V4L2_CID_FD_SPEED: - if (a->value > ctx->fd_device->clk_rates_num) - a->value = ctx->fd_device->clk_rates_num; - else if (a->value < 0) - a->value = 0; - - ctx->settings.speed = a->value; - break; - case V4L2_CID_FD_FACE_ANGLE: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_angle, - ARRAY_SIZE(msm_fd_angle)); - - ctx->settings.angle_index = idx; - a->value = msm_fd_angle[ctx->settings.angle_index]; - break; - case V4L2_CID_FD_FACE_DIRECTION: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_dir, - ARRAY_SIZE(msm_fd_dir)); - - ctx->settings.direction_index = idx; - a->value = msm_fd_dir[ctx->settings.direction_index]; - break; - case V4L2_CID_FD_MIN_FACE_SIZE: - idx = msm_fd_get_idx_from_value(a->value, msm_fd_min_size, - ARRAY_SIZE(msm_fd_min_size)); - - ctx->settings.min_size_index = idx; - a->value = msm_fd_min_size[ctx->settings.min_size_index]; - break; - case V4L2_CID_FD_DETECTION_THRESHOLD: - if (a->value > MSM_FD_MAX_THRESHOLD_VALUE) - a->value = MSM_FD_MAX_THRESHOLD_VALUE; - else if (a->value < 0) - a->value = 0; - - ctx->settings.threshold = a->value; - break; - case V4L2_CID_FD_WORK_MEMORY_SIZE: - if (!ctx->format.size) - return -EINVAL; - - if (a->value < ctx->format.size->work_size) - a->value = ctx->format.size->work_size; - break; - case V4L2_CID_FD_WORK_MEMORY_FD: - if (ctx->work_buf.handle) - msm_fd_hw_unmap_buffer(&ctx->work_buf); - - if (a->value >= 0) { - ret = msm_fd_hw_map_buffer(&ctx->mem_pool, - a->value, &ctx->work_buf); - if (ret < 0) - return ret; - } - break; - default: - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_cropcap - V4l2 ioctl crop capabilites. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_cropcap struct need to be set. - */ -static int msm_fd_cropcap(struct file *file, void *fh, struct v4l2_cropcap *a) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Cropcap fails format missing\n"); - return -EINVAL; - } - - a->bounds.top = 0; - a->bounds.left = 0; - a->bounds.width = ctx->format.size->width; - a->bounds.height = ctx->format.size->height; - - a->defrect = ctx->format.crop; - - a->pixelaspect.numerator = 1; - a->pixelaspect.denominator = 1; - - return 0; -} - -/* - * msm_fd_g_crop - V4l2 ioctl get crop. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_crop struct need to be set. - */ -static int msm_fd_g_crop(struct file *file, void *fh, struct v4l2_crop *crop) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Get crop, format missing!\n"); - return -EINVAL; - } - - crop->c = ctx->format.crop; - - return 0; -} - -/* - * msm_fd_s_crop - V4l2 ioctl set crop. - * @file: Pointer to file struct. - * @fh: V4l2 File handle. - * @sub: Pointer to v4l2_crop struct need to be set. - */ -static int msm_fd_s_crop(struct file *file, void *fh, - const struct v4l2_crop *crop) -{ - struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); - int min_face_size; - - if (!ctx->format.size) { - dev_err(ctx->fd_device->dev, "Get crop, format missing!\n"); - return -EINVAL; - } - - /* First check that crop is valid */ - min_face_size = msm_fd_min_size[ctx->settings.min_size_index]; - - if (crop->c.width < min_face_size || crop->c.height < min_face_size) - return -EINVAL; - - if (crop->c.width + crop->c.left > ctx->format.size->width) - return -EINVAL; - - if (crop->c.height + crop->c.top > ctx->format.size->height) - return -EINVAL; - - ctx->format.crop = crop->c; - - return 0; -} - -/* V4l2 ioctl handlers */ -static const struct v4l2_ioctl_ops fd_ioctl_ops = { - .vidioc_querycap = msm_fd_querycap, - .vidioc_enum_fmt_vid_out = msm_fd_enum_fmt_vid_out, - .vidioc_g_fmt_vid_out = msm_fd_g_fmt, - .vidioc_try_fmt_vid_out = msm_fd_try_fmt_vid_out, - .vidioc_s_fmt_vid_out = msm_fd_s_fmt_vid_out, - .vidioc_reqbufs = msm_fd_reqbufs, - .vidioc_qbuf = msm_fd_qbuf, - .vidioc_dqbuf = msm_fd_dqbuf, - .vidioc_streamon = msm_fd_streamon, - .vidioc_streamoff = msm_fd_streamoff, - .vidioc_queryctrl = msm_fd_guery_ctrl, - .vidioc_s_ctrl = msm_fd_s_ctrl, - .vidioc_g_ctrl = msm_fd_g_ctrl, - .vidioc_cropcap = msm_fd_cropcap, - .vidioc_g_crop = msm_fd_g_crop, - .vidioc_s_crop = msm_fd_s_crop, - .vidioc_subscribe_event = msm_fd_subscribe_event, - .vidioc_unsubscribe_event = msm_fd_unsubscribe_event, - .vidioc_default = msm_fd_private_ioctl, -}; - -/* - * msm_fd_fill_results - Read and fill face detection result. - * @fd: Pointer to fd device. - * @face: Pointer of face data which information need to be stored. - * @idx: Face number index need to be filled. - */ -static void msm_fd_fill_results(struct msm_fd_device *fd, - struct msm_fd_face_data *face, int idx) -{ - int half_face_size; - - msm_fd_hw_get_result_angle_pose(fd, idx, &face->angle, &face->pose); - - msm_fd_hw_get_result_conf_size(fd, idx, &face->confidence, - &face->face.width); - face->face.height = face->face.width; - - face->face.left = msm_fd_hw_get_result_x(fd, idx); - face->face.top = msm_fd_hw_get_result_y(fd, idx); - - half_face_size = (face->face.width >> 1); - if (face->face.left > half_face_size) - face->face.left -= half_face_size; - else - face->face.left = 0; - - half_face_size = (face->face.height >> 1); - if (face->face.top > half_face_size) - face->face.top -= half_face_size; - else - face->face.top = 0; -} - -/* - * msm_fd_wq_handler - Fd device workqueue handler. - * @work: Pointer to work struct. - * - * This function is bottom half of fd irq what it does: - * - * - Stop the fd engine. - * - Getter fd result and store in stats buffer. - * - If available schedule next buffer for processing. - * - Sent event to v4l2. - * - Release buffer from v4l2 queue. - */ -static void msm_fd_wq_handler(struct work_struct *work) -{ - struct msm_fd_buffer *active_buf; - struct msm_fd_stats *stats; - struct msm_fd_event *fd_event; - struct msm_fd_device *fd; - struct fd_ctx *ctx; - struct v4l2_event event; - int i; - - fd = container_of(work, struct msm_fd_device, work); - - active_buf = msm_fd_hw_get_active_buffer(fd); - if (!active_buf) { - /* This should never happen, something completely wrong */ - dev_err(fd->dev, "Oops no active buffer empty queue\n"); - return; - } - ctx = vb2_get_drv_priv(active_buf->vb.vb2_queue); - - /* Increment sequence number, 0 means sequence is not valid */ - ctx->sequence++; - if (unlikely(!ctx->sequence)) - ctx->sequence = 1; - - /* Fill face detection statistics */ - stats = &ctx->stats[ctx->sequence % MSM_FD_MAX_RESULT_BUFS]; - - /* First mark stats as invalid */ - atomic_set(&stats->frame_id, 0); - - stats->face_cnt = msm_fd_hw_get_face_count(fd); - for (i = 0; i < stats->face_cnt; i++) - msm_fd_fill_results(fd, &stats->face_data[i], i); - - /* Stats are ready, set correct frame id */ - atomic_set(&stats->frame_id, ctx->sequence); - - /* We have the data from fd hw, we can start next processing */ - msm_fd_hw_schedule_next_buffer(fd); - - /* Sent event */ - memset(&event, 0x00, sizeof(event)); - event.type = MSM_EVENT_FD; - fd_event = (struct msm_fd_event *)event.u.data; - fd_event->face_cnt = stats->face_cnt; - fd_event->buf_index = active_buf->vb.v4l2_buf.index; - fd_event->frame_id = ctx->sequence; - v4l2_event_queue_fh(&ctx->fh, &event); - - /* Return buffer to vb queue */ - active_buf->vb.v4l2_buf.sequence = ctx->fh.sequence; - vb2_buffer_done(&active_buf->vb, VB2_BUF_STATE_DONE); - - /* Release buffer from the device */ - msm_fd_hw_buffer_done(fd, active_buf); -} - -/* - * msm_fd_irq - Fd device irq handler. - * @irq: Pointer to work struct. - * @dev_id: Pointer to fd device. - */ -static irqreturn_t msm_fd_irq(int irq, void *dev_id) -{ - struct msm_fd_device *fd = dev_id; - - if (msm_fd_hw_is_finished(fd)) - queue_work(fd->work_queue, &fd->work); - else - dev_err(fd->dev, "Something wrong! FD still running\n"); - - return IRQ_HANDLED; -} - -/* - * fd_probe - Fd device probe method. - * @pdev: Pointer fd platform device. - */ -static int fd_probe(struct platform_device *pdev) -{ - struct msm_fd_device *fd; - int ret; - - /* Face detection device struct */ - fd = kzalloc(sizeof(struct msm_fd_device), GFP_KERNEL); - if (!fd) - return -ENOMEM; - - mutex_init(&fd->lock); - spin_lock_init(&fd->slock); - fd->dev = &pdev->dev; - - /* Get resources */ - ret = msm_fd_hw_get_mem_resources(pdev, fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail get resources\n"); - ret = -ENODEV; - goto error_mem_resources; - } - - fd->vdd = regulator_get(&pdev->dev, "vdd"); - if (IS_ERR(fd->vdd)) { - dev_err(&pdev->dev, "Fail to get vdd regulator\n"); - ret = -ENODEV; - goto error_get_regulator; - } - - ret = msm_fd_hw_get_clocks(fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail to get clocks\n"); - goto error_get_clocks; - } - - ret = msm_fd_hw_get_iommu(fd); - if (ret < 0) { - dev_err(&pdev->dev, "Fail to get iommu\n"); - goto error_iommu_get; - } - - fd->irq_num = platform_get_irq(pdev, 0); - if (fd->irq_num < 0) { - dev_err(&pdev->dev, "Can not get fd irq resource\n"); - ret = -ENODEV; - goto error_irq_request; - } - - ret = devm_request_irq(&pdev->dev, fd->irq_num, msm_fd_irq, - IRQF_TRIGGER_RISING, dev_name(&pdev->dev), fd); - if (ret) { - dev_err(&pdev->dev, "Can not claim IRQ %d\n", fd->irq_num); - goto error_irq_request; - } - - fd->work_queue = alloc_workqueue(MSM_FD_DRV_NAME, - WQ_HIGHPRI | WQ_NON_REENTRANT | WQ_UNBOUND, 0); - if (!fd->work_queue) { - dev_err(&pdev->dev, "Can not register workqueue\n"); - ret = -ENOMEM; - goto error_alloc_workqueue; - } - INIT_WORK(&fd->work, msm_fd_wq_handler); - INIT_LIST_HEAD(&fd->buf_queue); - - /* v4l2 device */ - ret = v4l2_device_register(&pdev->dev, &fd->v4l2_dev); - if (ret < 0) { - dev_err(&pdev->dev, "Failed to register v4l2 device\n"); - ret = -ENOENT; - goto error_v4l2_register; - } - - fd->video.fops = &fd_fops; - fd->video.ioctl_ops = &fd_ioctl_ops; - fd->video.minor = -1; - fd->video.release = video_device_release; - fd->video.v4l2_dev = &fd->v4l2_dev; - fd->video.vfl_dir = VFL_DIR_TX; - fd->video.vfl_type = VFL_TYPE_GRABBER; - strlcpy(fd->video.name, MSM_FD_DRV_NAME, sizeof(fd->video.name)); - - ret = video_register_device(&fd->video, VFL_TYPE_GRABBER, -1); - if (ret < 0) { - v4l2_err(&fd->v4l2_dev, "Failed to register video device\n"); - goto error_video_register; - } - - video_set_drvdata(&fd->video, fd); - - platform_set_drvdata(pdev, fd); - - return 0; - -error_video_register: - v4l2_device_unregister(&fd->v4l2_dev); -error_v4l2_register: - destroy_workqueue(fd->work_queue); -error_alloc_workqueue: - devm_free_irq(&pdev->dev, fd->irq_num, fd); -error_irq_request: - msm_fd_hw_put_iommu(fd); -error_iommu_get: - msm_fd_hw_put_clocks(fd); -error_get_clocks: - regulator_put(fd->vdd); -error_get_regulator: - msm_fd_hw_release_mem_resources(fd); -error_mem_resources: - kfree(fd); - return ret; -} - -/* - * fd_device_remove - Fd device remove method. - * @pdev: Pointer fd platform device. - */ -static int fd_device_remove(struct platform_device *pdev) -{ - struct msm_fd_device *fd; - - fd = platform_get_drvdata(pdev); - if (NULL == fd) { - dev_err(&pdev->dev, "Can not get fd drvdata\n"); - return 0; - } - video_unregister_device(&fd->video); - destroy_workqueue(fd->work_queue); - v4l2_device_unregister(&fd->v4l2_dev); - devm_free_irq(&pdev->dev, fd->irq_num, fd); - msm_fd_hw_put_iommu(fd); - msm_fd_hw_put_clocks(fd); - regulator_put(fd->vdd); - msm_fd_hw_release_mem_resources(fd); - kfree(fd); - - return 0; -} - -/* Device tree match struct */ -static const struct of_device_id msm_fd_dt_match[] = { - {.compatible = "qcom,face-detection"}, - {} -}; - -/* Fd platform driver definition */ -static struct platform_driver fd_driver = { - .probe = fd_probe, - .remove = fd_device_remove, - .driver = { - .name = MSM_FD_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_fd_dt_match, - }, -}; - -static int __init msm_fd_init_module(void) -{ - return platform_driver_register(&fd_driver); -} - -static void __exit msm_fd_exit_module(void) -{ - platform_driver_unregister(&fd_driver); -} - -module_init(msm_fd_init_module); -module_exit(msm_fd_exit_module); -MODULE_DESCRIPTION("MSM FD driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.h b/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.h deleted file mode 100644 index ed7d4c3a88c7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_dev.h +++ /dev/null @@ -1,245 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_DEV_H__ -#define __MSM_FD_DEV_H__ - -#include -#include -#include -#include - -/* Maximum number of result buffers */ -#define MSM_FD_MAX_RESULT_BUFS 5 -/* Max number of clocks defined in device tree */ -#define MSM_FD_MAX_CLK_NUM 10 -/* Max number of clock rates defined in device tree */ -#define MSM_FD_MAX_CLK_RATES 5 -/* Max number of faces which can be detected in one hw processing */ -#define MSM_FD_MAX_FACES_DETECTED 32 - -/* - * struct msm_fd_size - Structure contain FD size related values. - * @width: Image width. - * @height: Image height. - * @reg_val: Register value for this size. - * @work_size: Working buffer size in bytes for this size. - */ -struct msm_fd_size { - int width; - int height; - u32 reg_val; - int work_size; -}; - -/* - * struct msm_fd_setings - Structure contain FD settings values. - * @min_size_index: Minimum face size array index. - * @angle_index: Face detection angle array index. - * @direction_index: Face detection direction array index. - * @threshold: Face detection threshold value. - * @speed: Face detection speed value (it should match with clock rate index). - */ -struct msm_fd_setings { - unsigned int min_size_index; - unsigned int angle_index; - unsigned int direction_index; - unsigned int threshold; - unsigned int speed; -}; - -/* - * struct msm_fd_format - Structure contain FD format settings. - * @size: Pointer to fd size struct used for this format. - * @crop: V4l2 crop structure. - * @bytesperline: Bytes per line of input image buffer. - * @sizeimage: Size of input image buffer. - * @pixelformat: Pixel format of input image buffer. - */ -struct msm_fd_format { - struct msm_fd_size *size; - struct v4l2_rect crop; - int bytesperline; - int sizeimage; - u32 pixelformat; -}; - -/* - * struct msm_fd_mem_pool - Structure contain FD memory pool information. - * @fd_device: Pointer to fd device. - * @client: Pointer to ion client. - * @domain_num: Domain number associated with FD hw. - */ -struct msm_fd_mem_pool { - struct msm_fd_device *fd_device; - struct ion_client *client; - int domain_num; -}; - -/* - * struct msm_fd_buf_handle - Structure contain FD buffer handle information. - * @fd: ion FD from which this buffer is imported. - * @pool: Pointer to FD memory pool struct. - * @handle: Pointer to ion handle. - * @size: Size of the buffer. - * @addr: Adders of FD mmu mapped buffer. This address should be set to FD hw. - */ -struct msm_fd_buf_handle { - int fd; - struct msm_fd_mem_pool *pool; - void *handle; - unsigned long size; - ion_phys_addr_t addr; -}; - -/* - * struct msm_fd_buffer - Vb2 buffer wrapper structure. - * @vb: Videobuf 2 buffer structure. - * @active: Flag indicating if buffer currently used by FD hw. - * @completion: Completion need to wait on, if buffer is used by FD hw. - * @format: Format information of this buffer. - * @settings: Settings value of this buffer. - * @work_addr: Working buffer address need to be used when for this buffer. - * @list: Buffer is part of FD device processing queue - */ -struct msm_fd_buffer { - struct vb2_buffer vb; - atomic_t active; - struct completion completion; - struct msm_fd_format format; - struct msm_fd_setings settings; - ion_phys_addr_t work_addr; - struct list_head list; -}; - -/* - * struct msm_fd_stats - Structure contains FD result statistic information. - * @frame_id: Frame id for which statistic corresponds to. - * @face_cnt: Number of faces detected and included in face data. - * @face_data: Structure containing detected face data information. - */ -struct msm_fd_stats { - atomic_t frame_id; - u32 face_cnt; - struct msm_fd_face_data face_data[MSM_FD_MAX_FACES_DETECTED]; -}; - -/* - * struct fd_ctx - Structure contains per open file handle context. - * @fd_device: Pointer to fd device. - * @fh: V4l2 file handle. - * @vb2_q: Videobuf 2 queue. - * @sequence: Sequence number for this statistic. - * @format: Current format. - * @settings: Current settings. - * @mem_pool: FD hw memory pool. - * @stats: Pointer to statistic buffers. - * @work_buf: Working memory buffer handle. - * @wait_stop_stream: Pointer to completion to wait on stop stream. - */ -struct fd_ctx { - struct msm_fd_device *fd_device; - struct v4l2_fh fh; - struct vb2_queue vb2_q; - unsigned int sequence; - atomic_t subscribed_for_event; - struct msm_fd_format format; - struct msm_fd_setings settings; - struct msm_fd_mem_pool mem_pool; - struct msm_fd_stats *stats; - struct msm_fd_buf_handle work_buf; - struct completion *wait_stop_stream; -}; - -/* - * enum msm_fd_device_state - FD device state. - * @MSM_FD_DEVICE_IDLE: Device is idle, we can start with processing. - * @MSM_FD_DEVICE_RUNNING: Device is running, next processing will be - * scheduled from fd irq. - */ -enum msm_fd_device_state { - MSM_FD_DEVICE_IDLE, - MSM_FD_DEVICE_RUNNING, -}; - -/* - * enum msm_fd_mem_resources - FD device iomem resources. - * @MSM_FD_IOMEM_CORE: Index of fd core registers. - * @MSM_FD_IOMEM_MISC: Index of fd misc registers. - * @MSM_FD_IOMEM_VBIF: Index of fd vbif registers. - * @MSM_FD_IOMEM_LAST: Not valid. - */ -enum msm_fd_mem_resources { - MSM_FD_IOMEM_CORE, - MSM_FD_IOMEM_MISC, - MSM_FD_IOMEM_VBIF, - MSM_FD_IOMEM_LAST -}; - -/* - * struct msm_fd_device - FD device structure. - * @lock: Lock used for reference count. - * @slock: Spinlock used to protect FD device struct. - * @ref_count: Device reference count. - * @res_mem: Array of memory resources used by FD device. - * @iomem_base: Array of register mappings used by FD device. - * @vdd: Pointer to vdd regulator. - * @clk_num: Number of clocks attached to the device. - * @clk: Array of clock resources used by fd device. - * @clk_rates: Array of clock rates set. - * @bus_client: Memory access bus client. - * @iommu_domain: Pointer to FD device iommu domain handler. - * @iommu_domain_num: FD device iommu domain number. - * @iommu_attached_cnt: Iommu attached devices reference count. - * @iommu_dev: Pointer to Ion iommu device. - * @dev: Pointer to device struct. - * @v4l2_dev: V4l2 device. - * @video: Video device. - * @state: FD device state. - * @buf_queue: FD device processing queue. - * @work_queue: Pointer to FD device IRQ bottom half workqueue. - * @work: IRQ bottom half work struct. - */ -struct msm_fd_device { - struct mutex lock; - spinlock_t slock; - int ref_count; - - int irq_num; - struct resource *res_mem[MSM_FD_IOMEM_LAST]; - void __iomem *iomem_base[MSM_FD_IOMEM_LAST]; - struct resource *ioarea[MSM_FD_IOMEM_LAST]; - struct regulator *vdd; - - unsigned int clk_num; - struct clk *clk[MSM_FD_MAX_CLK_NUM]; - unsigned int clk_rates_num; - unsigned int clk_rates[MSM_FD_MAX_CLK_RATES][MSM_FD_MAX_CLK_NUM]; - - uint32_t bus_client; - - struct iommu_domain *iommu_domain; - int iommu_domain_num; - unsigned int iommu_attached_cnt; - - struct device *iommu_dev; - struct device *dev; - struct v4l2_device v4l2_dev; - struct video_device video; - - enum msm_fd_device_state state; - struct list_head buf_queue; - struct workqueue_struct *work_queue; - struct work_struct work; -}; - -#endif /* __MSM_FD_DEV_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.c b/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.c deleted file mode 100644 index d16f8d9a50cb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.c +++ /dev/null @@ -1,1182 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_fd_dev.h" -#include "msm_fd_hw.h" -#include "msm_fd_regs.h" - -/* Face detection processing timeout in ms */ -#define MSM_FD_PROCESSING_TIMEOUT_MS 500 - -/* Fd iommu partition definition */ -static struct msm_iova_partition msm_fd_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, -}; - -/* Fd iommu domain definition */ -static struct msm_iova_layout msm_fd_fw_layout = { - .partitions = &msm_fd_fw_partition, - .npartitions = 1, - .client_name = "fd_iommu", - .domain_flags = 0, -}; - -/* Face detection bus bandwidth definitions */ -static struct msm_bus_vectors msm_fd_bandwidth_vectors[] = { - { - .src = MSM_BUS_MASTER_VPU, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 450000000, - .ib = 900000000, - }, -}; - -static struct msm_bus_paths msm_fd_bus_client_config[] = { - { - ARRAY_SIZE(msm_fd_bandwidth_vectors), - msm_fd_bandwidth_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_fd_bus_scale_data = { - msm_fd_bus_client_config, - ARRAY_SIZE(msm_fd_bus_client_config), - .name = "msm_face_detect", -}; - -/* - * msm_fd_hw_read_reg - Fd read from register. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - */ -static inline u32 msm_fd_hw_read_reg(struct msm_fd_device *fd, - enum msm_fd_mem_resources base_idx, u32 reg) -{ - return readl_relaxed(fd->iomem_base[base_idx] + reg); -} - -/* - * msm_fd_hw_read_reg - Fd write to register. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - e @value: Value to be written. - */ -static inline void msm_fd_hw_write_reg(struct msm_fd_device *fd, - enum msm_fd_mem_resources base_idx, u32 reg, u32 value) -{ - writel_relaxed(value, fd->iomem_base[base_idx] + reg); -} - -/* - * msm_fd_hw_reg_clr - Fd clear register bits. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - * @clr_bits: Bits need to be clear from register. - */ -static inline void msm_fd_hw_reg_clr(struct msm_fd_device *fd, - enum msm_fd_mem_resources mmio_range, u32 reg, u32 clr_bits) -{ - u32 bits = msm_fd_hw_read_reg(fd, mmio_range, reg); - - msm_fd_hw_write_reg(fd, mmio_range, reg, (bits & ~clr_bits)); -} - -/* - * msm_fd_hw_reg_clr - Fd set register bits. - * @fd: Pointer to fd device. - * @base_idx: Fd memory resource index. - * @reg: Register addr need to be read from. - * @set_bits: Bits need to be set to register. - */ -static inline void msm_fd_hw_reg_set(struct msm_fd_device *fd, - enum msm_fd_mem_resources mmio_range, u32 reg, u32 set_bits) -{ - u32 bits = msm_fd_hw_read_reg(fd, mmio_range, reg); - - msm_fd_hw_write_reg(fd, mmio_range, reg, (bits | set_bits)); -} - -/* - * msm_fd_hw_reg_clr - Fd set size mode register. - * @fd: Pointer to fd device. - * @mode: Size mode to be set. - */ -static inline void msm_fd_hw_set_size_mode(struct msm_fd_device *fd, u32 mode) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_IMAGE_SIZE, mode); -} - -/* - * msm_fd_hw_reg_clr - Fd set crop registers. - * @fd: Pointer to fd device. - * @crop: Pointer to v4l2 crop struct containing the crop information - */ -static inline void msm_fd_hw_set_crop(struct msm_fd_device *fd, - struct v4l2_rect *crop) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_START_X, - (crop->top & MSM_FD_START_X_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_START_Y, - (crop->left & MSM_FD_START_Y_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_SIZE_X, - (crop->width & MSM_FD_SIZE_X_MASK)); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_SIZE_Y, - (crop->height & MSM_FD_SIZE_Y_MASK)); -} - -/* - * msm_fd_hw_reg_clr - Fd set bytes per line register. - * @fd: Pointer to fd device. - * @b: Bytes per line need to be set. - */ -static inline void msm_fd_hw_set_bytesperline(struct msm_fd_device *fd, u32 b) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_LINE_BYTES, - (b & MSM_FD_LINE_BYTES_MASK)); -} - -/* - * msm_fd_hw_reg_clr - Fd set image address. - * @fd: Pointer to fd device. - * @addr: Input image address need to be set. - */ -static inline void msm_fd_hw_set_image_addr(struct msm_fd_device *fd, u32 addr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_IMAGE_ADDR, addr); -} - -/* - * msm_fd_hw_set_work_addr - Fd set working buffer address. - * @fd: Pointer to fd device. - * @addr: Working buffer address need to be set. - */ -static inline void msm_fd_hw_set_work_addr(struct msm_fd_device *fd, u32 addr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_WORK_ADDR, addr); -} - -/* - * msm_fd_hw_set_direction_angle - Fd set face direction and face angle. - * @fd: Pointer to fd device. - * @direction: Face direction need to be set. - * @angle: Face angle need to be set. - */ -static inline void msm_fd_hw_set_direction_angle(struct msm_fd_device *fd, - u32 direction, u32 angle) -{ - u32 reg; - u32 value; - - value = direction | (angle ? 1 << (angle + 1) : 0); - if (value > MSM_FD_CONDT_DIR_MAX) - value = MSM_FD_CONDT_DIR_MAX; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT); - - reg &= ~MSM_FD_CONDT_DIR_MASK; - reg |= (value << MSM_FD_CONDT_DIR_SHIFT); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT, reg); -} - -/* - * msm_fd_hw_set_min_face - Fd set minimum face size register. - * @fd: Pointer to fd device. - * @size: Minimum face size need to be set. - */ -static inline void msm_fd_hw_set_min_face(struct msm_fd_device *fd, u32 size) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT); - - reg &= ~MSM_FD_CONDT_MIN_MASK; - reg |= (size << MSM_FD_CONDT_MIN_SHIFT); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONDT, reg); -} - -/* - * msm_fd_hw_set_threshold - Fd set detection threshold register. - * @fd: Pointer to fd device. - * @c: Maximum face count need to be set. - */ -static inline void msm_fd_hw_set_threshold(struct msm_fd_device *fd, u32 thr) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_DHINT, - (thr & MSM_FD_DHINT_MASK)); -} - -/* - * msm_fd_hw_srst - Sw reset control registers. - * @fd: Pointer to fd device. - * - * Before every processing we need to toggle this bit, - * This functions set sw reset control bit to 1/0. - */ -static inline void msm_fd_hw_srst(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, - MSM_FD_CONTROL_SRST); - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, 0); -} - -/* - * msm_fd_hw_get_face_count - Fd read face count register. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_get_face_count(struct msm_fd_device *fd) -{ - u32 reg; - u32 value; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_RESULT_CNT); - - value = reg & MSM_FD_RESULT_CNT_MASK; - if (value > MSM_FD_MAX_FACES_DETECTED) { - dev_warn(fd->dev, "Face count %d out of limit\n", value); - value = MSM_FD_MAX_FACES_DETECTED; - } - - return value; -} - -/* - * msm_fd_hw_run - Starts face detection engine. - * @fd: Pointer to fd device. - * - * Before call this function make sure that control sw reset is perfomed - * (see function msm_fd_hw_srst). - * NOTE: Engine need to be reset before started again. - */ -static inline void msm_fd_hw_run(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, - MSM_FD_CONTROL_RUN); -} - -/* - * msm_fd_hw_is_finished - Check if fd hw engine is done with processing. - * @fd: Pointer to fd device. - * - * NOTE: If finish bit is not set, we should not read the result. - */ -int msm_fd_hw_is_finished(struct msm_fd_device *fd) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL); - - return reg & MSM_FD_CONTROL_FINISH; -} - -/* - * msm_fd_hw_is_runnig - Check if fd hw engine is busy. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_is_runnig(struct msm_fd_device *fd) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL); - - return reg & MSM_FD_CONTROL_RUN; -} - -/* - * msm_fd_hw_get_result_x - Get fd result center x coordinate. - * @fd: Pointer to fd device. - * @idx: Result face index - */ -int msm_fd_hw_get_result_x(struct msm_fd_device *fd, int idx) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CENTER_X(idx)); - - return reg; -} - -/* - * msm_fd_hw_get_result_y - Get fd result center y coordinate. - * @fd: Pointer to fd device. - * @idx: Result face index - */ -int msm_fd_hw_get_result_y(struct msm_fd_device *fd, int idx) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CENTER_Y(idx)); - - return reg; -} - -/* - * msm_fd_hw_get_result_conf_size - Get fd result confident level and size. - * @fd: Pointer to fd device. - * @idx: Result face index. - * @conf: Pointer to confident value need to be filled. - * @size: Pointer to size value need to be filled. - */ -void msm_fd_hw_get_result_conf_size(struct msm_fd_device *fd, - int idx, u32 *conf, u32 *size) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_CONF_SIZE(idx)); - - *conf = (reg >> MSM_FD_RESULT_CONF_SHIFT) & MSM_FD_RESULT_CONF_MASK; - *size = (reg >> MSM_FD_RESULT_SIZE_SHIFT) & MSM_FD_RESULT_SIZE_MASK; -} - -/* - * msm_fd_hw_get_result_angle_pose - Get fd result angle and pose. - * @fd: Pointer to fd device. - * @idx: Result face index. - * @angle: Pointer to angle value need to be filled. - * @pose: Pointer to pose value need to be filled. - */ -void msm_fd_hw_get_result_angle_pose(struct msm_fd_device *fd, int idx, - u32 *angle, u32 *pose) -{ - u32 reg; - - reg = msm_fd_hw_read_reg(fd, MSM_FD_IOMEM_CORE, - MSM_FD_RESULT_ANGLE_POSE(idx)); - *angle = (reg >> MSM_FD_RESULT_ANGLE_SHIFT) & MSM_FD_RESULT_ANGLE_MASK; - *pose = (reg >> MSM_FD_RESULT_POSE_SHIFT) & MSM_FD_RESULT_POSE_MASK; -} - -/* - * msm_fd_hw_vbif_register - Configure and enable vbif interface. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_vbif_register(struct msm_fd_device *fd) -{ - - msm_fd_hw_reg_set(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_CLKON, 0x1); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_IN_RD_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_IN_WR_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_RD_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_WR_LIM_CONF0, 0x10); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_DDR_OUT_MAX_BURST, 0x0F); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_ARB_CTL, 0x30); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_AXI_AMEMTYPE_CONF0, 0x02); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_OUT_AXI_AOOO_EN, 0x10001); - - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_ROUND_ROBIN_QOS_ARB, 0x03); -} - -/* - * msm_fd_hw_vbif_unregister - Disable vbif interface. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_vbif_unregister(struct msm_fd_device *fd) -{ - msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_VBIF, - MSM_FD_VBIF_CLKON, 0x0); -} - -/* - * msm_fd_hw_release_mem_resources - Releases memory resources. - * @fd: Pointer to fd device. - */ -void msm_fd_hw_release_mem_resources(struct msm_fd_device *fd) -{ - int i; - - /* Prepare memory resources */ - for (i = 0; i < MSM_FD_IOMEM_LAST; i++) { - if (fd->iomem_base[i]) { - iounmap(fd->iomem_base[i]); - fd->iomem_base[i] = NULL; - } - if (fd->ioarea[i]) { - release_mem_region(fd->res_mem[i]->start, - resource_size(fd->res_mem[i])); - fd->ioarea[i] = NULL; - } - fd->res_mem[i] = NULL; - } -} - -/* - * msm_fd_hw_get_mem_resources - Get memory resources. - * @pdev: Pointer to fd platform device. - * @fd: Pointer to fd device. - * - * Get and ioremap platform memory resources. - */ -int msm_fd_hw_get_mem_resources(struct platform_device *pdev, - struct msm_fd_device *fd) -{ - int i; - int ret = 0; - - /* Prepare memory resources */ - for (i = 0; i < MSM_FD_IOMEM_LAST; i++) { - /* Get resources */ - fd->res_mem[i] = platform_get_resource(pdev, - IORESOURCE_MEM, i); - if (!fd->res_mem[i]) { - dev_err(fd->dev, "Fail get resource idx %d\n", - i); - ret = -ENODEV; - break; - } - - fd->ioarea[i] = request_mem_region(fd->res_mem[i]->start, - resource_size(fd->res_mem[i]), fd->res_mem[i]->name); - if (!fd->ioarea[i]) { - dev_err(fd->dev, "%s can not request mem\n", - fd->res_mem[i]->name); - ret = -ENODEV; - break; - } - - fd->iomem_base[i] = ioremap(fd->res_mem[i]->start, - resource_size(fd->res_mem[i])); - if (!fd->iomem_base[i]) { - dev_err(fd->dev, "%s can not remap region\n", - fd->res_mem[i]->name); - ret = -ENODEV; - break; - } - } - - if (ret < 0) - msm_fd_hw_release_mem_resources(fd); - - return ret; -} - -/* - * msm_fd_hw_get_iommu - Get fd iommu. - * @fd: Pointer to fd device. - * - * Registers and get fd iommu domain. - */ -int msm_fd_hw_get_iommu(struct msm_fd_device *fd) -{ - int ret; - - fd->iommu_domain_num = msm_register_domain(&msm_fd_fw_layout); - if (fd->iommu_domain_num < 0) { - dev_err(fd->dev, "Can not register iommu domain\n"); - ret = -ENODEV; - goto error; - } - - fd->iommu_domain = msm_get_iommu_domain(fd->iommu_domain_num); - if (!fd->iommu_domain) { - dev_err(fd->dev, "Can not get iommu domain\n"); - ret = -ENODEV; - goto error; - } - - fd->iommu_dev = msm_iommu_get_ctx("camera_fd"); - if (IS_ERR(fd->iommu_dev)) { - dev_err(fd->dev, "Can not get iommu device\n"); - ret = -EPROBE_DEFER; - goto error_iommu_get_dev; - } - - return 0; - -error_iommu_get_dev: - msm_unregister_domain(fd->iommu_domain); - fd->iommu_domain = NULL; - fd->iommu_domain_num = -1; -error: - return ret; -} - -/* - * msm_fd_hw_get_iommu - Put fd iommu. - * @fd: Pointer to fd device. - * - * Unregisters fd iommu domain. - */ -void msm_fd_hw_put_iommu(struct msm_fd_device *fd) -{ - msm_unregister_domain(fd->iommu_domain); - fd->iommu_domain = NULL; -} - -/* - * msm_fd_hw_get_clocks - Get fd clocks. - * @fd: Pointer to fd device. - * - * Read clock information from device tree and perform get clock. - */ -int msm_fd_hw_get_clocks(struct msm_fd_device *fd) -{ - const char *clk_name; - size_t cnt; - int clk_rates; - int i; - int ret; - - cnt = of_property_count_strings(fd->dev->of_node, "clock-names"); - if (cnt > MSM_FD_MAX_CLK_NUM) { - dev_err(fd->dev, "Exceed max number of clocks %zu\n", cnt); - return -EINVAL; - } - - clk_rates = 0; - for (i = 0; i < cnt; i++) { - ret = of_property_read_string_index(fd->dev->of_node, - "clock-names", i, &clk_name); - if (ret < 0) { - dev_err(fd->dev, "Can not read clock name %d\n", i); - goto error; - } - - fd->clk[i] = clk_get(fd->dev, clk_name); - if (IS_ERR(fd->clk[i])) { - ret = -ENOENT; - dev_err(fd->dev, "Error clock get %s\n", clk_name); - goto error; - } - dev_dbg(fd->dev, "Clock name idx %d %s\n", i, clk_name); - } - fd->clk_num = cnt; - - cnt = 0; - for (clk_rates = 0; clk_rates < MSM_FD_MAX_CLK_RATES; clk_rates++) { - for (i = 0; i < fd->clk_num; i++) { - ret = of_property_read_u32_index(fd->dev->of_node, - "clock-rates", cnt++, - &fd->clk_rates[clk_rates][i]); - if (ret < 0) - break; - dev_dbg(fd->dev, "Clock rate idx %d idx %d value %d\n", - clk_rates, i, fd->clk_rates[clk_rates][i]); - - } - if (ret < 0) - break; - } - fd->clk_rates_num = clk_rates; - if (fd->clk_rates_num == 0) { - ret = -ENOENT; - dev_err(fd->dev, "Can not get clock rates\n"); - goto error; - } - - return 0; -error: - for (; i > 0; i--) - clk_put(fd->clk[i - 1]); - - return ret; -} - -/* - * msm_fd_hw_get_clocks - Put fd clocks. - * @fd: Pointer to fd device. - */ -int msm_fd_hw_put_clocks(struct msm_fd_device *fd) -{ - int i; - - for (i = 0; i < fd->clk_num; i++) { - if (!IS_ERR_OR_NULL(fd->clk[i])) - clk_put(fd->clk[i]); - fd->clk_num = 0; - } - return 0; -} - -/* - * msm_fd_hw_set_clock_rate_idx - Set clock rate based on the index. - * @fd: Pointer to fd device. - * @idx: Clock Array index described in device tree. - */ -static int msm_fd_hw_set_clock_rate_idx(struct msm_fd_device *fd, - unsigned int idx) -{ - int ret; - long clk_rate; - int i; - - if (idx >= fd->clk_rates_num) - idx = fd->clk_rates_num - 1; - - for (i = 0; i < fd->clk_num; i++) { - - clk_rate = clk_round_rate(fd->clk[i], fd->clk_rates[idx][i]); - if (clk_rate < 0) { - dev_dbg(fd->dev, "Clk raund rate fail skip %d\n", i); - continue; - } - - ret = clk_set_rate(fd->clk[i], clk_rate); - if (ret < 0) { - dev_err(fd->dev, "Fail clock rate %ld\n", clk_rate); - return -EINVAL; - } - dev_dbg(fd->dev, "Clk rate %d-%ld idx %d\n", i, clk_rate, idx); - } - - return 0; -} -/* - * msm_fd_hw_enable_clocks - Prepare and enable fd clocks. - * @fd: Pointer to fd device. - */ -static int msm_fd_hw_enable_clocks(struct msm_fd_device *fd) -{ - int i; - int ret; - - for (i = 0; i < fd->clk_num; i++) { - ret = clk_prepare(fd->clk[i]); - if (ret < 0) { - dev_err(fd->dev, "clock prepare failed %d\n", i); - goto error; - } - - ret = clk_enable(fd->clk[i]); - if (ret < 0) { - dev_err(fd->dev, "clock enable %d\n", i); - clk_unprepare(fd->clk[i]); - goto error; - } - } - - return 0; -error: - for (; i > 0; i--) { - clk_disable(fd->clk[i - 1]); - clk_unprepare(fd->clk[i - 1]); - } - return ret; -} -/* - * msm_fd_hw_disable_clocks - Disable fd clock. - * @fd: Pointer to fd device. - */ -static void msm_fd_hw_disable_clocks(struct msm_fd_device *fd) -{ - int i; - - for (i = 0; i < fd->clk_num; i++) { - clk_disable(fd->clk[i]); - clk_unprepare(fd->clk[i]); - } -} - -/* - * msm_fd_hw_bus_request - Request bus for memory access. - * @fd: Pointer to fd device. - */ -static int msm_fd_hw_bus_request(struct msm_fd_device *fd) -{ - int ret; - - fd->bus_client = msm_bus_scale_register_client(&msm_fd_bus_scale_data); - if (!fd->bus_client) { - dev_err(fd->dev, "Fail to register bus client\n"); - return -ENOENT; - } - - ret = msm_bus_scale_client_update_request(fd->bus_client, 0); - if (ret < 0) { - dev_err(fd->dev, "Fail bus scale update %d\n", ret); - return -EINVAL; - } - - return 0; -} - -/* - * msm_fd_hw_bus_release - Release memory access bus. - * @fd: Pointer to fd device. - */ -static void msm_fd_hw_bus_release(struct msm_fd_device *fd) -{ - if (fd->bus_client) { - msm_bus_scale_unregister_client(fd->bus_client); - fd->bus_client = 0; - } -} - -/* - * msm_fd_hw_get - Get fd hw for performing any hw operation. - * @fd: Pointer to fd device. - * @clock_rate_idx: Clock rate index. - * - * Prepare fd hw for operation. Have reference count protected by - * fd device mutex. - */ -int msm_fd_hw_get(struct msm_fd_device *fd, unsigned int clock_rate_idx) -{ - int ret; - - mutex_lock(&fd->lock); - - if (fd->ref_count == 0) { - ret = msm_fd_hw_set_clock_rate_idx(fd, clock_rate_idx); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable vdd\n"); - goto error; - } - - ret = regulator_enable(fd->vdd); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable vdd\n"); - goto error; - } - - ret = msm_fd_hw_enable_clocks(fd); - if (ret < 0) { - dev_err(fd->dev, "Fail to enable clocks\n"); - goto error_clocks; - } - - ret = msm_fd_hw_bus_request(fd); - if (ret < 0) { - dev_err(fd->dev, "Fail bus request\n"); - goto error_bus_request; - } - msm_fd_hw_vbif_register(fd); - } - - fd->ref_count++; - mutex_unlock(&fd->lock); - - return 0; - -error_bus_request: - msm_fd_hw_disable_clocks(fd); -error_clocks: - regulator_disable(fd->vdd); -error: - mutex_unlock(&fd->lock); - return ret; -} - -/* - * msm_fd_hw_get - Put fd hw. - * @fd: Pointer to fd device. - * - * Release fd hw. Have reference count protected by - * fd device mutex. - */ -void msm_fd_hw_put(struct msm_fd_device *fd) -{ - mutex_lock(&fd->lock); - BUG_ON(fd->ref_count == 0); - - if (--fd->ref_count == 0) { - msm_fd_hw_vbif_unregister(fd); - msm_fd_hw_bus_release(fd); - msm_fd_hw_disable_clocks(fd); - regulator_disable(fd->vdd); - } - mutex_unlock(&fd->lock); -} - -/* - * msm_fd_hw_attach_iommu - Attach iommu to face detection engine. - * @fd: Pointer to fd device. - * - * Iommu attach have reference count protected by - * fd device mutex. - */ -static int msm_fd_hw_attach_iommu(struct msm_fd_device *fd) -{ - int ret; - - mutex_lock(&fd->lock); - - if (fd->iommu_attached_cnt == UINT_MAX) { - dev_err(fd->dev, "Max count reached! can not attach iommu\n"); - goto error; - } - - if (fd->iommu_attached_cnt == 0) { - ret = iommu_attach_device(fd->iommu_domain, fd->iommu_dev); - if (ret < 0) { - dev_err(fd->dev, "Can not attach iommu domain\n"); - goto error; - } - } - fd->iommu_attached_cnt++; - mutex_unlock(&fd->lock); - - return 0; - -error: - mutex_unlock(&fd->lock); - return ret; -} - -/* - * msm_fd_hw_detach_iommu - Detach iommu from face detection engine. - * @fd: Pointer to fd device. - * - * Iommu detach have reference count protected by - * fd device mutex. - */ -static void msm_fd_hw_detach_iommu(struct msm_fd_device *fd) -{ - mutex_lock(&fd->lock); - if (fd->iommu_attached_cnt == 0) { - dev_err(fd->dev, "There is no attached device\n"); - mutex_unlock(&fd->lock); - return; - } - - if (--fd->iommu_attached_cnt == 0) - iommu_detach_device(fd->iommu_domain, fd->iommu_dev); - - mutex_unlock(&fd->lock); -} - -/* - * msm_fd_hw_map_buffer - Map buffer to fd hw mmu. - * @pool: Pointer to fd memory pool. - * @fd: Ion fd. - * @buf: Fd buffer handle, for storing mapped buffer information. - * - * It will map ion fd to fd hw mmu. - */ -int msm_fd_hw_map_buffer(struct msm_fd_mem_pool *pool, int fd, - struct msm_fd_buf_handle *buf) -{ - int ret; - - if (!pool || fd < 0) - return -EINVAL; - - ret = msm_fd_hw_attach_iommu(pool->fd_device); - if (ret < 0) - goto error; - - buf->pool = pool; - buf->fd = fd; - - buf->handle = ion_import_dma_buf(pool->client, buf->fd); - if (IS_ERR_OR_NULL(buf->handle)) - goto error_import_dma; - - ret = ion_map_iommu(pool->client, buf->handle, pool->domain_num, - 0, SZ_4K, 0, &buf->addr, &buf->size, 0, 0); - if (ret < 0) - goto error_map_iommu; - - return buf->size; - -error_map_iommu: - ion_free(pool->client, buf->handle); -error_import_dma: - msm_fd_hw_detach_iommu(pool->fd_device); -error: - return -ENOMEM; -} - -/* - * msm_fd_hw_unmap_buffer - Unmap buffer from fd hw mmu. - * @buf: Fd buffer handle, for storing mapped buffer information. - */ -void msm_fd_hw_unmap_buffer(struct msm_fd_buf_handle *buf) -{ - if (buf->size) { - ion_unmap_iommu(buf->pool->client, buf->handle, - buf->pool->domain_num, 0); - msm_fd_hw_detach_iommu(buf->pool->fd_device); - } - - if (!IS_ERR_OR_NULL(buf->handle)) - ion_free(buf->pool->client, buf->handle); - - buf->fd = -1; - buf->pool = NULL; - buf->handle = NULL; -} - -/* - * msm_fd_hw_enable - Configure and enable fd hw. - * @fd: Fd device. - * @buffer: Buffer need to be processed. - * - * Configure and starts fd processing with given buffer. - * NOTE: Fd will not be enabled if engine is in running state. - */ -static int msm_fd_hw_enable(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - struct msm_fd_buf_handle *buf_handle = - buffer->vb.planes[0].mem_priv; - - if (msm_fd_hw_is_runnig(fd)) { - dev_err(fd->dev, "Device is busy we can not enable\n"); - return 0; - } - - msm_fd_hw_srst(fd); - msm_fd_hw_set_size_mode(fd, buffer->format.size->reg_val); - msm_fd_hw_set_crop(fd, &buffer->format.crop); - msm_fd_hw_set_bytesperline(fd, buffer->format.bytesperline); - msm_fd_hw_set_image_addr(fd, buf_handle->addr); - msm_fd_hw_set_work_addr(fd, buffer->work_addr); - msm_fd_hw_set_min_face(fd, buffer->settings.min_size_index); - msm_fd_hw_set_threshold(fd, buffer->settings.threshold); - msm_fd_hw_set_direction_angle(fd, buffer->settings.direction_index, - buffer->settings.angle_index); - msm_fd_hw_run(fd); - return 1; -} - -/* - * msm_fd_hw_try_enable - Try to enable fd hw. - * @fd: Fd device. - * @buffer: Buffer need to be processed. - * @state: Enable on device state - * - * It will enable fd hw if actual device state is equal with state argument. - */ -static int msm_fd_hw_try_enable(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer, enum msm_fd_device_state state) -{ - int enabled = 0; - - if (state == fd->state) { - - fd->state = MSM_FD_DEVICE_RUNNING; - atomic_set(&buffer->active, 1); - - msm_fd_hw_enable(fd, buffer); - enabled = 1; - } - return enabled; -} - -/* - * msm_fd_hw_next_buffer - Get next buffer from fd device processing queue. - * @fd: Fd device. - */ -static struct msm_fd_buffer *msm_fd_hw_next_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buffer = NULL; - - if (!list_empty(&fd->buf_queue)) - buffer = list_first_entry(&fd->buf_queue, - struct msm_fd_buffer, list); - - return buffer; -} - -/* - * msm_fd_hw_add_buffer - Add buffer to fd device processing queue. - * @fd: Fd device. - */ -void msm_fd_hw_add_buffer(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - spin_lock(&fd->slock); - - atomic_set(&buffer->active, 0); - init_completion(&buffer->completion); - - INIT_LIST_HEAD(&buffer->list); - list_add_tail(&buffer->list, &fd->buf_queue); - spin_unlock(&fd->slock); -} - -/* - * msm_fd_hw_remove_buffers_from_queue - Removes buffer from - * fd device processing queue. - * @fd: Fd device. - */ -void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd, - struct vb2_queue *vb2_q) -{ - struct msm_fd_buffer *curr_buff; - struct msm_fd_buffer *temp; - struct msm_fd_buffer *active_buffer; - unsigned long time; - - spin_lock(&fd->slock); - - active_buffer = NULL; - list_for_each_entry_safe(curr_buff, temp, &fd->buf_queue, list) { - if (curr_buff->vb.vb2_queue == vb2_q) { - - if (atomic_read(&curr_buff->active)) - active_buffer = curr_buff; - else - list_del(&curr_buff->list); - - } - } - spin_unlock(&fd->slock); - - /* We need to wait active buffer to finish */ - if (active_buffer) { - time = wait_for_completion_timeout(&active_buffer->completion, - msecs_to_jiffies(MSM_FD_PROCESSING_TIMEOUT_MS)); - if (!time) { - /* Remove active buffer */ - msm_fd_hw_get_active_buffer(fd); - /* Schedule if other buffers are present in device */ - msm_fd_hw_schedule_next_buffer(fd); - } - } - - return; -} - -/* - * msm_fd_hw_buffer_done - Mark as done and removes from processing queue. - * @fd: Fd device. - * @buffer: Fd buffer. - */ -int msm_fd_hw_buffer_done(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer) -{ - int ret = 0; - - spin_lock(&fd->slock); - - if (atomic_read(&buffer->active)) { - atomic_set(&buffer->active, 0); - complete_all(&buffer->completion); - } else { - dev_err(fd->dev, "Buffer is not active\n"); - ret = -1; - } - - spin_unlock(&fd->slock); - - return ret; -} - -/* - * msm_fd_hw_get_active_buffer - Get active buffer from fd processing queue. - * @fd: Fd device. - */ -struct msm_fd_buffer *msm_fd_hw_get_active_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buffer = NULL; - - spin_lock(&fd->slock); - if (!list_empty(&fd->buf_queue)) { - buffer = list_first_entry(&fd->buf_queue, - struct msm_fd_buffer, list); - list_del(&buffer->list); - } - spin_unlock(&fd->slock); - - return buffer; -} - -/* - * msm_fd_hw_schedule_and_start - Schedule active buffer and start processing. - * @fd: Fd device. - * - * This can be executed only when device is in idle state. - */ -int msm_fd_hw_schedule_and_start(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buf; - - spin_lock(&fd->slock); - buf = msm_fd_hw_next_buffer(fd); - if (buf) - msm_fd_hw_try_enable(fd, buf, MSM_FD_DEVICE_IDLE); - - spin_unlock(&fd->slock); - - return 0; -} - -/* - * msm_fd_hw_schedule_next_buffer - Schedule next buffer and start processing. - * @fd: Fd device. - * - * NOTE: This can be executed only when device is in running state. - */ -int msm_fd_hw_schedule_next_buffer(struct msm_fd_device *fd) -{ - struct msm_fd_buffer *buf; - int ret; - - spin_lock(&fd->slock); - - /* We can schedule next buffer only in running state */ - if (fd->state != MSM_FD_DEVICE_RUNNING) { - dev_err(fd->dev, "Can not schedule next buffer\n"); - spin_unlock(&fd->slock); - return -EBUSY; - } - - buf = msm_fd_hw_next_buffer(fd); - if (buf) { - ret = msm_fd_hw_try_enable(fd, buf, MSM_FD_DEVICE_RUNNING); - if (0 == ret) { - dev_err(fd->dev, "Ouch can not process next buffer\n"); - spin_unlock(&fd->slock); - return -EBUSY; - } - } else { - fd->state = MSM_FD_DEVICE_IDLE; - } - spin_unlock(&fd->slock); - - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.h b/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.h deleted file mode 100644 index 1483d9f74a41..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_hw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_HW_H__ -#define __MSM_FD_HW_H__ - -#include "msm_fd_dev.h" - -int msm_fd_hw_is_finished(struct msm_fd_device *fd); - -int msm_fd_hw_get_face_count(struct msm_fd_device *fd); - -int msm_fd_hw_get_result_x(struct msm_fd_device *fd, int idx); - -int msm_fd_hw_get_result_y(struct msm_fd_device *fd, int idx); - -void msm_fd_hw_get_result_conf_size(struct msm_fd_device *fd, - int idx, u32 *conf, u32 *size); - -void msm_fd_hw_get_result_angle_pose(struct msm_fd_device *fd, int idx, - u32 *angle, u32 *pose); - -void msm_fd_hw_release_mem_resources(struct msm_fd_device *fd); - -int msm_fd_hw_get_mem_resources(struct platform_device *pdev, - struct msm_fd_device *fd); - -int msm_fd_hw_get_iommu(struct msm_fd_device *fd); - -void msm_fd_hw_put_iommu(struct msm_fd_device *fd); - -int msm_fd_hw_get_clocks(struct msm_fd_device *fd); - -int msm_fd_hw_put_clocks(struct msm_fd_device *fd); - -int msm_fd_hw_get(struct msm_fd_device *fd, unsigned int clock_rate_idx); - -void msm_fd_hw_put(struct msm_fd_device *fd); - -int msm_fd_hw_map_buffer(struct msm_fd_mem_pool *pool, int fd, - struct msm_fd_buf_handle *buf); - -void msm_fd_hw_unmap_buffer(struct msm_fd_buf_handle *buf); - -void msm_fd_hw_add_buffer(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer); - -void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd, - struct vb2_queue *vb2_q); - -int msm_fd_hw_buffer_done(struct msm_fd_device *fd, - struct msm_fd_buffer *buffer); - -struct msm_fd_buffer *msm_fd_hw_get_active_buffer(struct msm_fd_device *fd); - -int msm_fd_hw_schedule_and_start(struct msm_fd_device *fd); - -int msm_fd_hw_schedule_next_buffer(struct msm_fd_device *fd); - -#endif /* __MSM_FD_HW_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_regs.h b/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_regs.h deleted file mode 100644 index ea47bb8fc84c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/fd/msm_fd_regs.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_FD_REGS_H__ -#define __MSM_FD_REGS_H__ - -/* FD core registers */ -#define MSM_FD_VERSION (0x38) - -#define MSM_FD_CONTROL (0x00) -#define MSM_FD_CONTROL_SRST (1 << 0) -#define MSM_FD_CONTROL_RUN (1 << 1) -#define MSM_FD_CONTROL_FINISH (1 << 2) - -#define MSM_FD_RESULT_CNT (0x04) -#define MSM_FD_RESULT_CNT_MASK (0x3F) - -#define MSM_FD_CONDT (0x08) -#define MSM_FD_CONDT_MIN_MASK (0x03) -#define MSM_FD_CONDT_MIN_SHIFT (0x00) -#define MSM_FD_CONDT_DIR_MAX (0x08) -#define MSM_FD_CONDT_DIR_MASK (0x3C) -#define MSM_FD_CONDT_DIR_SHIFT (0x02) - -#define MSM_FD_START_X (0x0C) -#define MSM_FD_START_X_MASK (0x3FF) - -#define MSM_FD_START_Y (0x10) -#define MSM_FD_START_Y_MASK (0x1FF) - -#define MSM_FD_SIZE_X (0x14) -#define MSM_FD_SIZE_X_MASK (0x3FF) - -#define MSM_FD_SIZE_Y (0x18) -#define MSM_FD_SIZE_Y_MASK (0x1FF) - -#define MSM_FD_DHINT (0x1C) -#define MSM_FD_DHINT_MASK (0xF) - -#define MSM_FD_IMAGE_ADDR (0x24) -#define MSM_FD_IMAGE_ADDR_ALIGN (0x8) - -#define MSM_FD_WORK_ADDR (0x28) -#define MSM_FD_WORK_ADDR_ALIGN (0x8) - -#define MSM_FD_IMAGE_SIZE (0x2C) -#define MSM_FD_IMAGE_SIZE_QVGA (0x0) -#define MSM_FD_IMAGE_SIZE_VGA (0x1) -#define MSM_FD_IMAGE_SIZE_WQVGA (0x2) -#define MSM_FD_IMAGE_SIZE_WVGA (0x3) - -#define MSM_FD_LINE_BYTES (0x30) -#define MSM_FD_LINE_BYTES_MASK (0x1FFF) -#define MSM_FD_LINE_BYTES_ALIGN (0x8) - -#define MSM_FD_RESULT_CENTER_X(x) (0x400 + (0x10 * (x))) - -#define MSM_FD_RESULT_CENTER_Y(x) (0x404 + (0x10 * (x))) - -#define MSM_FD_RESULT_CONF_SIZE(x) (0x408 + (0x10 * (x))) -#define MSM_FD_RESULT_SIZE_MASK (0x1FF) -#define MSM_FD_RESULT_SIZE_SHIFT (0x000) -#define MSM_FD_RESULT_CONF_MASK (0xF) -#define MSM_FD_RESULT_CONF_SHIFT (0x9) - -#define MSM_FD_RESULT_ANGLE_POSE(x) (0x40C + (0x10 * (x))) -#define MSM_FD_RESULT_ANGLE_MASK (0x1FF) -#define MSM_FD_RESULT_ANGLE_SHIFT (0x000) -#define MSM_FD_RESULT_POSE_MASK (0x7) -#define MSM_FD_RESULT_POSE_SHIFT (0x9) - -/* FD misc registers */ -#define MSM_FD_MISC_HW_VERSION (0x00) - -#define MSM_FD_MISC_SW_RESET (0x10) -#define MSM_FD_MISC_SW_RESET_SET (1 << 0) - -#define MSM_FD_MISC_FIFO_STATUS (0x14) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_DCNT_MAST (0x1F) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_DCNT_SHIFT (0) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_FULL (1 << 13) -#define MSM_FD_MISC_FIFO_STATUS_RFIFO_EMPTY (1 << 14) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_DCNT_MAST (0x1F) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_DCNT_SHIFT (16) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_EMPTY (1 << 29) -#define MSM_FD_MISC_FIFO_STATUS_WFIFO_FULL (1 << 30) - -#define MSM_FD_MISC_DATA_ENDIAN (0x18) -#define MSM_FD_MISC_DATA_ENDIAN_BYTE_SWAP_SET (1 << 0) - -#define MSM_FD_MISC_VBIF_REQ_PRIO (0x20) -#define MSM_FD_MISC_VBIF_REQ_PRIO_MASK (0x3) - -#define MSM_FD_MISC_VBIF_PRIO_LEVEL (0x24) -#define MSM_FD_MISC_VBIF_PRIO_LEVEL_MASK (0x3) - -#define MSM_FD_MISC_VBIF_MMU_PDIRECT (0x28) -#define MSM_FD_MISC_VBIF_MMU_PDIRECT_INCREMENT (1 << 0) - -#define MSM_FD_MISC_VBIF_IRQ_CLR (0x30) -#define MSM_FD_MISC_VBIF_IRQ_CLR_ALL (1 << 0) - -#define MSM_FD_MISC_VBIF_DONE_STATUS (0x34) -#define MSM_FD_MISC_VBIF_DONE_STATUS_WRITE (1 << 0) -#define MSM_FD_MISC_VBIF_DONE_STATUS_READ (1 << 1) - -#define MSM_FD_MISC_TEST_BUS_SEL (0x40) -#define MSM_FD_MISC_TEST_BUS_SEL_TEST_MODE_MASK (0xF) -#define MSM_FD_MISC_TEST_BUS_SEL_TEST_MODE_SHIFT (0) -#define MSM_FD_MISC_TEST_BUS_SEL_7_0_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_7_0_SHIFT (16) -#define MSM_FD_MISC_TEST_BUS_SEL_15_8_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_15_8_SHIFT (18) -#define MSM_FD_MISC_TEST_BUS_SEL_23_16_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_23_16_SHIFT (20) -#define MSM_FD_MISC_TEST_BUS_SEL_31_24_MASK (0x3) -#define MSM_FD_MISC_TEST_BUS_SEL_31_24_SHIFT (22) - -#define MSM_FD_MISC_AHB_TEST_EN (0x44) -#define MSM_FD_MISC_AHB_TEST_EN_MASK (0x3) - -#define MSM_FD_MISC_FD2VBIF_INT_TEST_SEL (0x48) -#define MSM_FD_MISC_FD2VBIF_INT_TEST_MASK (0xF) - -#define MSM_FD_MISC_TEST_BUS (0x4C) - -/* FD vbif registers */ -#define MSM_FD_VBIF_CLKON (0x04) -#define MSM_FD_VBIF_IN_RD_LIM_CONF0 (0xB0) -#define MSM_FD_VBIF_IN_WR_LIM_CONF0 (0xC0) -#define MSM_FD_VBIF_OUT_RD_LIM_CONF0 (0xD0) -#define MSM_FD_VBIF_OUT_WR_LIM_CONF0 (0xD4) -#define MSM_FD_VBIF_DDR_OUT_MAX_BURST (0xD8) -#define MSM_FD_VBIF_ARB_CTL (0xF0) -#define MSM_FD_VBIF_OUT_AXI_AMEMTYPE_CONF0 (0x160) -#define MSM_FD_VBIF_OUT_AXI_AOOO_EN (0x178) -#define MSM_FD_VBIF_OUT_AXI_AOOO (0x17c) -#define MSM_FD_VBIF_ROUND_ROBIN_QOS_ARB (0x124) - -#endif /* __MSM_FD_REGS_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_cam_sensor.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_cam_sensor.h deleted file mode 100755 index 7ae6c57ee0a5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_cam_sensor.h +++ /dev/null @@ -1,1131 +0,0 @@ -#ifndef __LINUX_MSM_CAM_SENSOR_H -#define __LINUX_MSM_CAM_SENSOR_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -#define I2C_SEQ_REG_SETTING_MAX 5 -#define I2C_SEQ_REG_DATA_MAX 256 -#define I2C_REG_DATA_MAX (8*1024) -#define MAX_CID 16 - -#define MSM_SENSOR_MCLK_8HZ 8000000 -#define MSM_SENSOR_MCLK_16HZ 16000000 -#define MSM_SENSOR_MCLK_24HZ 24000000 - -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define MAX_SENSOR_NAME 32 - -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 50 -#define MAX_ACTUATOR_REG_TBL_SIZE 50 -#define MAX_ACTUATOR_AF_TOTAL_STEPS 1024 - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define MSM_ACTUATOR_MOVE_SIGNED_FAR -1 -#define MSM_ACTUATOR_MOVE_SIGNED_NEAR 1 - -#define MAX_EEPROM_NAME 32 - -#define MAX_AF_ITERATIONS 3 -#define MAX_NUMBER_OF_STEPS 47 - -#define MAX_LED_TRIGGERS 3 -#define MSM_OIS_VER_SIZE (6) - -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_EXIF 9 -//Focus related enums -#define EXT_CAM_AF 11 -#define EXT_CAM_FOCUS 12 -#define EXT_CAM_SET_TOUCHAF_POS 13 -#define EXT_CAM_SET_AF_STATUS 14 -#define EXT_CAM_GET_AF_STATUS 15 -#define EXT_CAM_GET_AF_RESULT 16 -#define EXT_CAM_SET_AF_STOP 17 -#define EXT_CAM_FLASH_MODE 18 -#define EXT_CAM_SET_FLASH 19 -#define EXT_CAM_VT_MODE 20 - - -//************************************* Native functionalities for YUV sensor added -#define EXT_CAM_EV 1 -#define EXT_CAM_WB 2 -#define EXT_CAM_METERING 3 -#define EXT_CAM_ISO 4 -#define EXT_CAM_EFFECT 5 -#define EXT_CAM_SCENE_MODE 6 -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_CONTRAST 8 -#define EXT_CAM_EXIF 9 -#define EXT_CAM_SET_AE_AWB 10 - -//Exposure Compensation -#define CAMERA_EV_M4 0 -#define CAMERA_EV_M3 1 -#define CAMERA_EV_M2 2 -#define CAMERA_EV_M1 3 -#define CAMERA_EV_DEFAULT 4 -#define CAMERA_EV_P1 5 -#define CAMERA_EV_P2 6 -#define CAMERA_EV_P3 7 -#define CAMERA_EV_P4 8 - -//White Balance -#define CAMERA_WHITE_BALANCE_OFF 0 -#define CAMERA_WHITE_BALANCE_AUTO 1 -#define CAMERA_WHITE_BALANCE_INCANDESCENT 2 -#define CAMERA_WHITE_BALANCE_FLUORESCENT 3 -#define CAMERA_WHITE_BALANCE_DAYLIGHT 5 -#define CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT 6 - -//Metering -#define CAMERA_AVERAGE 0 -#define CAMERA_CENTER_WEIGHT 1 -#define CAMERA_SPOT 2 - -//ISO -#define CAMERA_ISO_MODE_AUTO 0 -#define CAMERA_ISO_MODE_50 1 -#define CAMERA_ISO_MODE_100 2 -#define CAMERA_ISO_MODE_200 3 -#define CAMERA_ISO_MODE_400 4 -#define CAMERA_ISO_MODE_800 5 - -//Effect -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -#define CAMERA_EFFECT_VINTAGE_WARM 12 -#define CAMERA_EFFECT_VINTAGE_COOL 13 -#define CAMERA_EFFECT_BLUE 14 -#define CAMERA_EFFECT_ORANGE 15 -#define CAMERA_EFFECT_GREEN 16 -#define CAMERA_EFFECT_BEAUTY 17 -#define CAMERA_EFFECT_MAX 18 -#else -#define CAMERA_EFFECT_WASHED 12 -#define CAMERA_EFFECT_VINTAGE_WARM 13 -#define CAMERA_EFFECT_VINTAGE_COLD 14 -#define CAMERA_EFFECT_POINT_COLOR_1 15 -#define CAMERA_EFFECT_POINT_COLOR_2 16 -#define CAMERA_EFFECT_POINT_COLOR_3 17 -#define CAMERA_EFFECT_POINT_COLOR_4 18 -#define CAMERA_EFFECT_CARTOONIZE 19 -#define CAMERA_EFFECT_MAX 20 -#endif - -//scene mode -#define CAMERA_SCENE_AUTO 0 -#define CAMERA_SCENE_LANDSCAPE 3 -#define CAMERA_SCENE_NIGHT 6 -#define CAMERA_SCENE_BEACH 7 -#define CAMERA_SCENE_PORTRAIT 8 -#define CAMERA_SCENE_SPORT 9 -#define CAMERA_SCENE_FIRE 11 -#define CAMERA_SCENE_SUNSET 12 -#define CAMERA_SCENE_PARTY 13 -#define CAMERA_SCENE_CANDLE 14 -#define CAMERA_SCENE_AGAINST_LIGHT 16 -#define CAMERA_SCENE_FALL 17 -#define CAMERA_SCENE_TEXT 19 -#define CAMERA_SCENE_DAWN 21 //need to check - - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -#define CAMERA_MODE_INIT 0 -#define CAMERA_MODE_PREVIEW 1 -#define CAMERA_MODE_CAPTURE 2 -#define CAMERA_MODE_RECORDING 3 - -//Flash modes -#define CAMERA_FLASH_OFF 0 -#define CAMERA_FLASH_ON 2 -#define CAMERA_FLASH_AUTO 1 -#define CAMERA_FLASH_TORCH 3 - -//AF modes -#define CAMERA_AF_AUTO 0 -#define CAMERA_AF_MACRO 2 -#define CAMERA_AF_OCR 3 - -enum flash_type { -#if !defined(CONFIG_FLED_SM5701) - LED_FLASH = 1, -#endif - STROBE_FLASH, - GPIO_FLASH -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_VARIABLE_LENGTH_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_BURST_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_VT_RESET, - SENSOR_GPIO_VT_STANDBY, - SENSOR_GPIO_EXT_VANA_POWER, - SENSOR_GPIO_EXT_CAMIO_EN, - SENSOR_GPIO_OIS_EN, - SENSOR_GPIO_OIS_RESET, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VAF, - CAM_VDDOIS,/*OIS_VDD_2P8*/ - CAM_VMOIS,/*OIS_VM_2P8*/ - CAM_VREG_MAX, -}; - -#if defined (CONFIG_CAMERA_SYSFS_V2) -enum msm_camera_cam_info_isp { - CAM_INFO_ISP_TYPE_INTERNAL = 0, - CAM_INFO_ISP_TYPE_EXTERNAL, - CAM_INFO_ISP_TYPE_SOC, -}; - -enum msm_camera_cam_info_cal_mem { - CAM_INFO_CAL_MEM_TYPE_NONE = 0, - CAM_INFO_CAL_MEM_TYPE_FROM, - CAM_INFO_CAL_MEM_TYPE_EEPROM, - CAM_INFO_CAL_MEM_TYPE_OTP, -}; - -enum msm_camera_cam_info_read_ver { - CAM_INFO_READ_VER_SYSFS = 0, - CAM_INFO_READ_VER_CAMON, -}; - -enum msm_camera_cam_info_core_voltage { - CAM_INFO_CORE_VOLT_NONE = 0, - CAM_INFO_CORE_VOLT_USE, -}; - -enum msm_camera_cam_info_upgrade { - CAM_INFO_FW_UPGRADE_NONE = 0, - CAM_INFO_FW_UPGRADE_SYSFS, - CAM_INFO_FW_UPGRADE_CAMON, -}; - -enum msm_camera_cam_info_companion { - CAM_INFO_COMPANION_NONE = 0, - CAM_INFO_COMPANION_USE, -}; - -enum msm_camera_cam_info_ois { - CAM_INFO_OIS_NONE = 0, - CAM_INFO_OIS_USE, -}; -#endif - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_RES_8, - MSM_SENSOR_RES_9, - MSM_SENSOR_RES_10, - MSM_SENSOR_RES_11, - MSM_SENSOR_RES_12, - MSM_SENSOR_RES_13, - MSM_SENSOR_INVALID_RES, -}; - -enum msm_camera_stream_type_t { - MSM_CAMERA_STREAM_PREVIEW, - MSM_CAMERA_STREAM_SNAPSHOT, - MSM_CAMERA_STREAM_VIDEO, - MSM_CAMERA_STREAM_INVALID, -}; - -enum sensor_sub_module_t { - SUB_MODULE_SENSOR, - SUB_MODULE_CHROMATIX, - SUB_MODULE_ACTUATOR, - SUB_MODULE_EEPROM, - SUB_MODULE_LED_FLASH, - SUB_MODULE_STROBE_FLASH, - SUB_MODULE_CSID, - SUB_MODULE_CSID_3D, - SUB_MODULE_CSIPHY, - SUB_MODULE_CSIPHY_3D, -#if defined(CONFIG_OIS) - SUB_MODULE_OIS, -#endif - SUB_MODULE_MAX, -}; - -enum { - MSM_CAMERA_EFFECT_MODE_OFF, - MSM_CAMERA_EFFECT_MODE_MONO, - MSM_CAMERA_EFFECT_MODE_NEGATIVE, - MSM_CAMERA_EFFECT_MODE_SOLARIZE, - MSM_CAMERA_EFFECT_MODE_SEPIA, - MSM_CAMERA_EFFECT_MODE_POSTERIZE, - MSM_CAMERA_EFFECT_MODE_WHITEBOARD, - MSM_CAMERA_EFFECT_MODE_BLACKBOARD, - MSM_CAMERA_EFFECT_MODE_AQUA, - MSM_CAMERA_EFFECT_MODE_EMBOSS, - MSM_CAMERA_EFFECT_MODE_SKETCH, - MSM_CAMERA_EFFECT_MODE_NEON, - MSM_CAMERA_EFFECT_MODE_MAX -}; - -enum { - MSM_CAMERA_WB_MODE_AUTO, - MSM_CAMERA_WB_MODE_CUSTOM, - MSM_CAMERA_WB_MODE_INCANDESCENT, - MSM_CAMERA_WB_MODE_FLUORESCENT, - MSM_CAMERA_WB_MODE_WARM_FLUORESCENT, - MSM_CAMERA_WB_MODE_DAYLIGHT, - MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT, - MSM_CAMERA_WB_MODE_TWILIGHT, - MSM_CAMERA_WB_MODE_SHADE, - MSM_CAMERA_WB_MODE_OFF, - MSM_CAMERA_WB_MODE_MAX -}; - -enum { - MSM_CAMERA_SCENE_MODE_OFF, - MSM_CAMERA_SCENE_MODE_AUTO, - MSM_CAMERA_SCENE_MODE_LANDSCAPE, - MSM_CAMERA_SCENE_MODE_SNOW, - MSM_CAMERA_SCENE_MODE_BEACH, - MSM_CAMERA_SCENE_MODE_SUNSET, - MSM_CAMERA_SCENE_MODE_NIGHT, - MSM_CAMERA_SCENE_MODE_PORTRAIT, - MSM_CAMERA_SCENE_MODE_BACKLIGHT, - MSM_CAMERA_SCENE_MODE_SPORTS, - MSM_CAMERA_SCENE_MODE_ANTISHAKE, - MSM_CAMERA_SCENE_MODE_FLOWERS, - MSM_CAMERA_SCENE_MODE_CANDLELIGHT, - MSM_CAMERA_SCENE_MODE_FIREWORKS, - MSM_CAMERA_SCENE_MODE_PARTY, - MSM_CAMERA_SCENE_MODE_NIGHT_PORTRAIT, - MSM_CAMERA_SCENE_MODE_THEATRE, - MSM_CAMERA_SCENE_MODE_ACTION, - MSM_CAMERA_SCENE_MODE_AR, - MSM_CAMERA_SCENE_MODE_FACE_PRIORITY, - MSM_CAMERA_SCENE_MODE_BARCODE, - MSM_CAMERA_SCENE_MODE_HDR, - MSM_CAMERA_SCENE_MODE_MAX -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, - CSID_RELEASE, - CSID_BOOSTOFF, -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, - CSIPHY_RELEASE, -}; - -enum camera_vreg_type { - REG_LDO, - REG_VS, - REG_GPIO, -}; - -enum sensor_af_e { - SENSOR_AF_CANCEL = 1, - SENSOR_AF_START, - SENSOR_AF_PRE_FLASH_ON, - SENSOR_AF_PRE_FLASH_OFF, - SENSOR_AF_PRE_FLASH_AE_STABLE, -}; - -struct msm_sensor_gpio_config { -enum msm_sensor_power_seq_gpio_t gpio_name; -uint8_t config_val; -}; - -enum sensor_af_t { - SENSOR_AF_FOCUSSED, - SENSOR_AF_NOT_FOCUSSED, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum cci_i2c_master_t { - MASTER_0, - MASTER_1, - MASTER_MAX, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -struct msm_sensor_info_t { - char sensor_name[MAX_SENSOR_NAME]; - uint32_t session_id; - int32_t subdev_id[SUB_MODULE_MAX]; - uint8_t is_mount_angle_valid; - uint32_t sensor_mount_angle; - int modes_supported; - enum camb_position_t position; -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint8_t data_type; - uint32_t delay; -}; - -struct msm_camera_i2c_burst_reg_array { - uint16_t reg_addr; - uint8_t *reg_burst_data; - uint16_t reg_data_size; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - void *reg_setting; - // KK ML ONLY struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_camera_i2c_array_write_config { - struct msm_camera_i2c_reg_setting conf_array; - uint16_t slave_addr; -}; - -struct msm_camera_i2c_read_config { - uint16_t slave_addr; - uint16_t reg_addr; - enum msm_camera_i2c_data_type data_type; - uint16_t *data; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -struct msm_camera_csi_lane_params { - uint16_t csi_lane_assign; - uint16_t csi_lane_mask; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct camera_vreg_t { - const char *reg_name; - enum camera_vreg_type type; - int min_voltage; - int max_voltage; - int op_mode; - uint32_t delay; -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - void *regulator[1]; -#endif -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_probe_succeed; - char subdev_name[32]; - struct msm_sensor_info_t sensor_info; -}; - -struct sensorb_cfg_data { - int cfgtype; - int flicker_type; - union { - struct msm_sensor_info_t sensor_info; - struct msm_sensor_init_params sensor_init_params; - void *setting; - } cfg; -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - union { - struct msm_camera_csiphy_params *csiphy_params; - struct msm_camera_csi_lane_params *csi_lane_params; - } cfg; -}; - -struct msm_ois_cal_info_t { - char cal_ver[MSM_OIS_VER_SIZE+1]; - uint16_t cal_checksum_rumba; - uint16_t cal_checksum_line; - uint8_t is_different_crc; -}; -struct msm_ois_cfg_data { - int cfgtype; - uint16_t reg_addr; - uint16_t read_data; - uint16_t write_data; - uint16_t set_mode_value; - uint8_t *version; - struct msm_ois_cal_info_t *ois_cal_info; -}; - -enum eeprom_cfg_type_t { - CFG_EEPROM_GET_INFO, - CFG_EEPROM_GET_CAL_DATA, - CFG_EEPROM_READ_CAL_DATA, - CFG_EEPROM_READ_DATA, - CFG_EEPROM_READ_COMPRESSED_DATA, - CFG_EEPROM_WRITE_DATA, - CFG_EEPROM_GET_ERASESIZE, - CFG_EEPROM_ERASE, - CFG_EEPROM_POWER_ON, - CFG_EEPROM_POWER_OFF, - CFG_EEPROM_READ_DATA_FROM_HW, - CFG_EEPROM_GET_MM_INFO, - CFG_EEPROM_GET_FW_VERSION_INFO, -}; - -struct eeprom_get_t { - uint32_t num_bytes; -}; - -struct eeprom_read_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t comp_size; -}; - -struct eeprom_write_t { - uint8_t *dbuffer; - uint32_t num_bytes; - uint32_t addr; - uint32_t *write_size; - uint8_t compress; -}; - -struct eeprom_erase_t { - uint32_t num_bytes; - uint32_t addr; -}; - -struct eeprom_get_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_size; -}; - -struct msm_eeprom_cfg_data { - enum eeprom_cfg_type_t cfgtype; - uint8_t is_supported; - union { - char eeprom_name[MAX_EEPROM_NAME]; - struct eeprom_get_t get_data; - struct eeprom_read_t read_data; - struct eeprom_write_t write_data; - struct eeprom_erase_t erase_data; - struct eeprom_get_cmm_t get_cmm_data; - } cfg; -}; - -#ifdef CONFIG_COMPAT -struct msm_sensor_power_setting32 { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - compat_uint_t config_val; - uint16_t delay; - compat_uptr_t data[10]; -}; - -struct msm_sensor_power_setting_array32 { - struct msm_sensor_power_setting32 power_setting_a[MAX_POWER_CONFIG]; - compat_uptr_t power_setting; - uint16_t size; - struct msm_sensor_power_setting32 - power_down_setting_a[MAX_POWER_CONFIG]; - compat_uptr_t power_down_setting; - uint16_t size_down; -}; - -struct msm_camera_sensor_slave_info32 { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - char ois_name[32]; - char flash_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array32 power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_flash_supported; - enum msm_sensor_output_format_t output_format; -}; - -struct msm_camera_csid_lut_params32 { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID]; - compat_uptr_t vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params32 { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - uint32_t csi_clk; - struct msm_camera_csid_lut_params32 lut_params; -}; - -struct msm_camera_csi2_params32 { - struct msm_camera_csid_params32 csid_params; - struct msm_camera_csiphy_params csiphy_params; - uint8_t csi_clk_scale_enable; -}; - -struct csid_cfg_data32 { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - compat_uptr_t csid_params; - } cfg; -}; - -struct eeprom_read_t32 { - compat_uptr_t dbuffer; - uint32_t num_bytes; -}; - -struct eeprom_write_t32 { - compat_uptr_t dbuffer; - uint32_t num_bytes; -}; - -struct msm_eeprom_cfg_data32 { - enum eeprom_cfg_type_t cfgtype; - uint8_t is_supported; - union { - char eeprom_name[MAX_EEPROM_NAME]; - struct eeprom_get_t get_data; - struct eeprom_read_t32 read_data; - struct eeprom_write_t32 write_data; - } cfg; -}; - -struct msm_camera_i2c_seq_reg_setting32 { - compat_uptr_t reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; -#endif - -enum msm_sensor_cfg_type_t { - CFG_SET_SLAVE_INFO, - CFG_SLAVE_READ_I2C, - CFG_WRITE_I2C_ARRAY, - CFG_SLAVE_WRITE_I2C_ARRAY, - CFG_WRITE_I2C_SEQ_ARRAY, - CFG_POWER_UP, - CFG_POWER_DOWN, - CFG_SET_STOP_STREAM_SETTING, - CFG_GET_SENSOR_INFO, - CFG_GET_SENSOR_INIT_PARAMS, - CFG_SET_INIT_SETTING, - CFG_SET_RESOLUTION, - CFG_SET_STOP_STREAM, - CFG_SET_START_STREAM, - CFG_SET_GPIO_STATE, - CFG_SET_SENSOR_OTP_CAL, // Randy 10.08 - CFG_SET_SATURATION, - CFG_SET_CONTRAST, - CFG_SET_SHARPNESS, - CFG_SET_ISO, - CFG_SET_EXPOSURE_COMPENSATION, - CFG_SET_ANTIBANDING, - CFG_SET_BESTSHOT_MODE, - CFG_SET_EFFECT, - CFG_SET_WHITE_BALANCE, - CFG_SET_AUTOFOCUS, - CFG_CANCEL_AUTOFOCUS, - CFG_SET_STREAM_TYPE, -}; - -enum msm_ois_cfg_type_t { - CFG_OIS_POWERDOWN, - CFG_OIS_POWERUP, - CFG_OIS_SET_MODE, - CFG_OIS_READ_MODULE_VER, - CFG_OIS_READ_PHONE_VER, - CFG_OIS_READ_CAL_INFO, - CFG_OIS_GET_FW_STATUS, - CFG_OIS_FW_UPDATE, -}; - -enum msm_actuator_cfg_type_t { - CFG_GET_ACTUATOR_INFO, - CFG_SET_ACTUATOR_INFO, - CFG_SET_DEFAULT_FOCUS, - CFG_MOVE_FOCUS, - CFG_SET_POSITION, - CFG_ACTUATOR_POWERDOWN, - CFG_ACTUATOR_POWERUP, - CFG_SET_ACTUATOR_SW_LANDING, - CFG_ACTUATOR_INIT, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HALL_EFFECT, - ACTUATOR_HVCM, - ACTUATOR_DW9804, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct msm_actuator_move_params_t { - int8_t dir; - int8_t sign_dir; - int16_t dest_step_pos; - int32_t num_steps; - uint16_t curr_lens_pos; - struct damping_params_t *ringing_params; -}; - -struct msm_actuator_tuning_params_t { - int16_t initial_code; - uint16_t pwd_step; - uint16_t region_size; - uint32_t total_steps; - struct region_params_t *region_params; -}; - -struct msm_actuator_params_t { - enum actuator_type act_type; - uint8_t reg_tbl_size; - uint16_t data_size; - uint16_t init_setting_size; - uint32_t i2c_addr; - enum msm_actuator_addr_type i2c_addr_type; - enum msm_actuator_data_type i2c_data_type; - struct msm_actuator_reg_params_t *reg_tbl_params; - struct reg_settings_t *init_settings; -}; - -struct msm_actuator_set_info_t { - struct msm_actuator_params_t actuator_params; - struct msm_actuator_tuning_params_t af_tuning_params; -}; - -struct msm_actuator_get_info_t { - uint32_t focal_length_num; - uint32_t focal_length_den; - uint32_t f_number_num; - uint32_t f_number_den; - uint32_t f_pix_num; - uint32_t f_pix_den; - uint32_t total_f_dist_num; - uint32_t total_f_dist_den; - uint32_t hor_view_angle_num; - uint32_t hor_view_angle_den; - uint32_t ver_view_angle_num; - uint32_t ver_view_angle_den; -}; - -enum af_camera_name { - ACTUATOR_MAIN_CAM_0, - ACTUATOR_MAIN_CAM_1, - ACTUATOR_MAIN_CAM_2, - ACTUATOR_MAIN_CAM_3, - ACTUATOR_MAIN_CAM_4, - ACTUATOR_MAIN_CAM_5, - ACTUATOR_WEB_CAM_0, - ACTUATOR_WEB_CAM_1, - ACTUATOR_WEB_CAM_2, -}; - - -struct msm_actuator_set_position_t { - uint16_t number_of_steps; - uint16_t pos[MAX_NUMBER_OF_STEPS]; - uint16_t delay[MAX_NUMBER_OF_STEPS]; -}; - -struct msm_actuator_cfg_data { - int cfgtype; - int sw_landing_type; - uint8_t is_af_supported; - union { - struct msm_actuator_move_params_t move; - struct msm_actuator_set_info_t set_info; - struct msm_actuator_get_info_t get_info; - struct msm_actuator_set_position_t setpos; - enum af_camera_name cam_name; - } cfg; -}; - -enum msm_actuator_sw_landing_type { - MSM_ACTUATOR_DEFAULT_SW_LANDING, - MSM_ACTUATOR_MULTI_TASKING_SW_LANDING, -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, - MSM_ACTUATOR_WRITE_DAC_SEQ, -}; - -enum msm_actuator_init_focus_type{ - MSM_ACTUATOR_INIT_FOCUS_DELAY = 0xDD, - MSM_ACTUATOR_INIT_FOCUS_READ_STATUS = 0xDC, -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -enum msm_camera_led_config_t { - MSM_CAMERA_LED_OFF, - MSM_CAMERA_LED_LOW, - MSM_CAMERA_LED_HIGH, - MSM_CAMERA_LED_INIT, - MSM_CAMERA_LED_RELEASE, - MSM_CAMERA_LED_PREFLASH, -}; - -struct msm_camera_led_cfg_t { - enum msm_camera_led_config_t cfgtype; - uint32_t torch_current; - uint32_t flash_current[MAX_LED_TRIGGERS]; -}; - -/* sensor init structures and enums */ -enum msm_sensor_init_cfg_type_t { - CFG_SINIT_PROBE, - CFG_SINIT_PROBE_DONE, - CFG_SINIT_PROBE_WAIT_DONE, -}; - -struct sensor_init_cfg_data { - enum msm_sensor_init_cfg_type_t cfgtype; - union { - void *setting; - } cfg; -}; - -struct ioctl_native_cmd { - unsigned short mode; - unsigned short address; - unsigned short value_1; - unsigned short value_2; - unsigned short value_3; -}; - -typedef struct -{ - unsigned short iso; - unsigned short shutterspeed; - unsigned short isFlashOn; -} exif_data_t; - -enum msm_cam_flicker_type { - MSM_CAM_FLICKER_50HZ, - MSM_CAM_FLICKER_60HZ, -}; - -#define VIDIOC_MSM_SENSOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data) - -#define VIDIOC_MSM_SENSOR_RELEASE \ - _IO('V', BASE_VIDIOC_PRIVATE + 2) - -#define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t) - -#define VIDIOC_MSM_CSIPHY_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data) - -#define VIDIOC_MSM_CSID_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data) - -#define VIDIOC_MSM_ACTUATOR_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data) - -#define VIDIOC_MSM_FLASH_LED_DATA_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t) - -#define VIDIOC_MSM_EEPROM_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data) - -#define VIDIOC_MSM_SENSOR_GET_AF_STATUS \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, uint32_t) - -#define VIDIOC_MSM_SENSOR_INIT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data) - -#define VIDIOC_MSM_SENSOR_NATIVE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct ioctl_native_cmd) - -#define VIDIOC_MSM_OIS_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_ois_cfg_data) - - -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camera.h deleted file mode 100644 index 73924371df5d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camera.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __LINUX_MSM_CAMERA_H -#define __LINUX_MSM_CAMERA_H - -#include -#include "../uapi/media/msm_camera.h" - -#endif /* __LINUX_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camsensor_sdk.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camsensor_sdk.h deleted file mode 100644 index d10617a27b58..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msm_camsensor_sdk.h +++ /dev/null @@ -1,335 +0,0 @@ -#ifndef __LINUX_MSM_CAMSENSOR_SDK_H -#define __LINUX_MSM_CAMSENSOR_SDK_H - -#include - -#define KVERSION 0x1 - -#define MAX_POWER_CONFIG 12 -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 -#define MAX_CID 16 -#define I2C_SEQ_REG_DATA_MAX 256 -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ - -#define MAX_ACTUATOR_REG_TBL_SIZE 8 -#define MAX_ACTUATOR_REGION 5 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define MAX_ACTUATOR_INIT_SET 12 -#define MAX_I2C_REG_SET 12 - -#define MAX_NAME_SIZE 32 -#define MAX_FLASH_NUM 8 - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, - SENSOR_I2C, -}; - -enum msm_camera_qup_i2c_write_batch_size_t { - MSM_CAMERA_I2C_BATCH_SIZE_1 = 1, - MSM_CAMERA_I2C_BATCH_SIZE_2, - MSM_CAMERA_I2C_BATCH_SIZE_3, - MSM_CAMERA_I2C_BATCH_SIZE_4, - MSM_CAMERA_I2C_BATCH_SIZE_5, - MSM_CAMERA_I2C_BATCH_SIZE_MAX, -}; - -enum msm_camera_qup_i2c_write_batch_t { - MSM_CAMREA_I2C_BATCH_DISABLE = 0, - MSM_CAMERA_I2C_BATCH_ENABLE, -}; - -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_DWORD_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_CUSTOM1, - SENSOR_GPIO_CUSTOM2, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VAF, - CAM_V_CUSTOM1, - CAM_V_CUSTOM2, - CAM_VREG_MAX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, -}; - -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, -}; - -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HVCM, -}; - -enum msm_flash_driver_type { - FLASH_DRIVER_PMIC, - FLASH_DRIVER_I2C, - FLASH_DRIVER_GPIO, - FLASH_DRIVER_DEFAULT -}; - -enum msm_flash_cfg_type_t { - CFG_FLASH_INIT, - CFG_FLASH_RELEASE, - CFG_FLASH_OFF, - CFG_FLASH_LOW, - CFG_FLASH_HIGH, -}; - -enum msm_sensor_output_format_t { - MSM_SENSOR_BAYER, - MSM_SENSOR_YCBCR, - MSM_SENSOR_META, -}; - -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting power_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting power_down_setting_a[MAX_POWER_CONFIG]; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - char ois_name[32]; - char flash_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_flash_supported; - enum msm_sensor_output_format_t output_format; -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; - enum msm_camera_qup_i2c_write_batch_t qup_i2c_batch; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID]; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - uint32_t csi_clk; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; - uint32_t csiphy_clk; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; -}; - -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; - /* qvalue for converting float type numbers to integer format */ - uint32_t qvalue; -}; - -struct reg_settings_t { - uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting_array { - struct msm_camera_i2c_reg_array reg_setting_a[MAX_I2C_REG_SET]; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; -#endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_camera.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_camera.h deleted file mode 100644 index d58a0b80f20e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_camera.h +++ /dev/null @@ -1,186 +0,0 @@ -#ifndef __LINUX_MSMB_CAMERA_H -#define __LINUX_MSMB_CAMERA_H - -#include -#include -#include - -#define MSM_CAM_V4L2_IOCTL_NOTIFY \ - _IOW('V', BASE_VIDIOC_PRIVATE + 30, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_META \ - _IOW('V', BASE_VIDIOC_PRIVATE + 31, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_CMD_ACK \ - _IOW('V', BASE_VIDIOC_PRIVATE + 32, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR \ - _IOW('V', BASE_VIDIOC_PRIVATE + 33, struct msm_v4l2_event_data) - -#define MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS \ - _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event) - -#define QCAMERA_DEVICE_GROUP_ID 1 -#define QCAMERA_VNODE_GROUP_ID 2 -#define MSM_CAMERA_NAME "msm_camera" -#define MSM_CONFIGURATION_NAME "msm_config" -#define MSM_CAMERA_DUMMY_NAME "msm_cam_dummy" - -#define MSM_CAMERA_SUBDEV_CSIPHY 0 -#define MSM_CAMERA_SUBDEV_CSID 1 -#define MSM_CAMERA_SUBDEV_ISPIF 2 -#define MSM_CAMERA_SUBDEV_VFE 3 -#define MSM_CAMERA_SUBDEV_AXI 4 -#define MSM_CAMERA_SUBDEV_VPE 5 -#define MSM_CAMERA_SUBDEV_SENSOR 6 -#define MSM_CAMERA_SUBDEV_ACTUATOR 7 -#define MSM_CAMERA_SUBDEV_EEPROM 8 -#define MSM_CAMERA_SUBDEV_CPP 9 -#define MSM_CAMERA_SUBDEV_CCI 10 -#define MSM_CAMERA_SUBDEV_LED_FLASH 11 -#define MSM_CAMERA_SUBDEV_STROBE_FLASH 12 -#define MSM_CAMERA_SUBDEV_BUF_MNGR 13 -#define MSM_CAMERA_SUBDEV_SENSOR_INIT 14 -#define MSM_CAMERA_SUBDEV_OIS 15 - -#define MSM_MAX_CAMERA_SENSORS 5 - -/* The below macro is defined to put an upper limit on maximum - * number of buffer requested per stream. In case of extremely - * large value for number of buffer due to data structure corruption - * we return error to avoid integer overflow. This value may be - * configured in future*/ -#define MSM_CAMERA_MAX_STREAM_BUF 40 - -/* featur base */ -#define MSM_CAMERA_FEATURE_BASE 0x00010000 -#define MSM_CAMERA_FEATURE_SHUTDOWN (MSM_CAMERA_FEATURE_BASE + 1) - -#define MSM_CAMERA_STATUS_BASE 0x00020000 -#define MSM_CAMERA_STATUS_FAIL (MSM_CAMERA_STATUS_BASE + 1) -#define MSM_CAMERA_STATUS_SUCCESS (MSM_CAMERA_STATUS_BASE + 2) - -/* event type */ -#define MSM_CAMERA_V4L2_EVENT_TYPE (V4L2_EVENT_PRIVATE_START + 0x00002000) - -/* event id */ -#define MSM_CAMERA_EVENT_MIN 0 -#define MSM_CAMERA_NEW_SESSION (MSM_CAMERA_EVENT_MIN + 1) -#define MSM_CAMERA_DEL_SESSION (MSM_CAMERA_EVENT_MIN + 2) -#define MSM_CAMERA_SET_PARM (MSM_CAMERA_EVENT_MIN + 3) -#define MSM_CAMERA_GET_PARM (MSM_CAMERA_EVENT_MIN + 4) -#define MSM_CAMERA_MAPPING_CFG (MSM_CAMERA_EVENT_MIN + 5) -#define MSM_CAMERA_MAPPING_SES (MSM_CAMERA_EVENT_MIN + 6) -#define MSM_CAMERA_MSM_NOTIFY (MSM_CAMERA_EVENT_MIN + 7) -#define MSM_CAMERA_EVENT_MAX (MSM_CAMERA_EVENT_MIN + 8) - -/* data.command */ -#define MSM_CAMERA_PRIV_S_CROP (V4L2_CID_PRIVATE_BASE + 1) -#define MSM_CAMERA_PRIV_G_CROP (V4L2_CID_PRIVATE_BASE + 2) -#define MSM_CAMERA_PRIV_G_FMT (V4L2_CID_PRIVATE_BASE + 3) -#define MSM_CAMERA_PRIV_S_FMT (V4L2_CID_PRIVATE_BASE + 4) -#define MSM_CAMERA_PRIV_TRY_FMT (V4L2_CID_PRIVATE_BASE + 5) -#define MSM_CAMERA_PRIV_METADATA (V4L2_CID_PRIVATE_BASE + 6) -#define MSM_CAMERA_PRIV_QUERY_CAP (V4L2_CID_PRIVATE_BASE + 7) -#define MSM_CAMERA_PRIV_STREAM_ON (V4L2_CID_PRIVATE_BASE + 8) -#define MSM_CAMERA_PRIV_STREAM_OFF (V4L2_CID_PRIVATE_BASE + 9) -#define MSM_CAMERA_PRIV_NEW_STREAM (V4L2_CID_PRIVATE_BASE + 10) -#define MSM_CAMERA_PRIV_DEL_STREAM (V4L2_CID_PRIVATE_BASE + 11) -#define MSM_CAMERA_PRIV_SHUTDOWN (V4L2_CID_PRIVATE_BASE + 12) -#define MSM_CAMERA_PRIV_STREAM_INFO_SYNC \ - (V4L2_CID_PRIVATE_BASE + 13) - -/* data.status - success */ -#define MSM_CAMERA_CMD_SUCESS 0x00000001 -#define MSM_CAMERA_BUF_MAP_SUCESS 0x00000002 - -/* data.status - error */ -#define MSM_CAMERA_ERR_EVT_BASE 0x00010000 -#define MSM_CAMERA_ERR_CMD_FAIL (MSM_CAMERA_ERR_EVT_BASE + 1) -#define MSM_CAMERA_ERR_MAPPING (MSM_CAMERA_ERR_EVT_BASE + 2) - -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 16 elements */ -struct msm_v4l2_event_data { - /*word 0*/ - unsigned int command; - /*word 1*/ - unsigned int status; - /*word 2*/ - unsigned int session_id; - /*word 3*/ - unsigned int stream_id; - /*word 4*/ - unsigned int map_op; - /*word 5*/ - unsigned int map_buf_idx; - /*word 6*/ - unsigned int notify; - /*word 7*/ - unsigned int arg_value; - /*word 8*/ - unsigned int ret_value; - /*word 9*/ - unsigned int v4l2_event_type; - /*word 10*/ - unsigned int v4l2_event_id; - /*word 11*/ - unsigned int nop5; - /*word 12*/ - unsigned int nop6; - /*word 13*/ - unsigned int nop7; - /*word 14*/ - unsigned int nop8; - /*word 15*/ - unsigned int nop9; -}; - -/* map to v4l2_format.fmt.raw_data */ -struct msm_v4l2_format_data { - enum v4l2_buf_type type; - unsigned int width; - unsigned int height; - unsigned int pixelformat; /* FOURCC */ - unsigned char num_planes; - unsigned int plane_sizes[VIDEO_MAX_PLANES]; -}; - -/* MSM Four-character-code (FOURCC) */ -#define msm_v4l2_fourcc(a, b, c, d)\ - ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) |\ - ((__u32)(d) << 24)) - -/* Composite stats */ -#define MSM_V4L2_PIX_FMT_STATS_COMB v4l2_fourcc('S', 'T', 'C', 'M') -/* AEC stats */ -#define MSM_V4L2_PIX_FMT_STATS_AE v4l2_fourcc('S', 'T', 'A', 'E') -/* AF stats */ -#define MSM_V4L2_PIX_FMT_STATS_AF v4l2_fourcc('S', 'T', 'A', 'F') -/* AWB stats */ -#define MSM_V4L2_PIX_FMT_STATS_AWB v4l2_fourcc('S', 'T', 'W', 'B') -/* IHIST stats */ -#define MSM_V4L2_PIX_FMT_STATS_IHST v4l2_fourcc('I', 'H', 'S', 'T') -/* Column count stats */ -#define MSM_V4L2_PIX_FMT_STATS_CS v4l2_fourcc('S', 'T', 'C', 'S') -/* Row count stats */ -#define MSM_V4L2_PIX_FMT_STATS_RS v4l2_fourcc('S', 'T', 'R', 'S') -/* Bayer Grid stats */ -#define MSM_V4L2_PIX_FMT_STATS_BG v4l2_fourcc('S', 'T', 'B', 'G') -/* Bayer focus stats */ -#define MSM_V4L2_PIX_FMT_STATS_BF v4l2_fourcc('S', 'T', 'B', 'F') -/* Bayer hist stats */ -#define MSM_V4L2_PIX_FMT_STATS_BHST v4l2_fourcc('B', 'H', 'S', 'T') - -enum smmu_attach_mode { - NON_SECURE_MODE, - SECURE_MODE, - MAX_PROTECTION_MODE, -}; - -struct msm_camera_smmu_attach_type { - enum smmu_attach_mode attach; -}; - -#endif /* __LINUX_MSMB_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_isp.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_isp.h deleted file mode 100644 index de942b879a48..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_isp.h +++ /dev/null @@ -1,528 +0,0 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSMB_ISP__ -#define __MSMB_ISP__ - -#include - -#define MAX_PLANES_PER_STREAM 3 -#define MAX_NUM_STREAM 7 - -#define ISP_VERSION_44 44 -#define ISP_VERSION_40 40 -#define ISP_VERSION_32 32 -#define ISP_NATIVE_BUF_BIT (0x10000 << 0) -#define ISP0_BIT (0x10000 << 1) -#define ISP1_BIT (0x10000 << 2) -#define ISP_META_CHANNEL_BIT (0x10000 << 3) -#define ISP_SCRATCH_BUF_BIT (0x10000 << 4) -#define ISP_PDAF_CHANNEL_BIT (0x10000 << 5) -#define ISP_STATS_STREAM_BIT 0x80000000 - -struct msm_vfe_cfg_cmd_list; - -#define MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR 0xCACFC - -enum ISP_START_PIXEL_PATTERN { - ISP_BAYER_RGRGRG, - ISP_BAYER_GRGRGR, - ISP_BAYER_BGBGBG, - ISP_BAYER_GBGBGB, - ISP_YUV_YCbYCr, - ISP_YUV_YCrYCb, - ISP_YUV_CbYCrY, - ISP_YUV_CrYCbY, - ISP_PIX_PATTERN_MAX -}; - -enum msm_vfe_plane_fmt { - Y_PLANE, - CB_PLANE, - CR_PLANE, - CRCB_PLANE, - CBCR_PLANE, - VFE_PLANE_FMT_MAX -}; - -enum msm_vfe_input_src { - VFE_PIX_0, - VFE_RAW_0, - VFE_RAW_1, - VFE_RAW_2, - VFE_SRC_MAX, -}; - -enum msm_vfe_axi_stream_src { - PIX_ENCODER, - PIX_VIEWFINDER, - CAMIF_RAW, - IDEAL_RAW, - RDI_INTF_0, - RDI_INTF_1, - RDI_INTF_2, - VFE_AXI_SRC_MAX -}; - -enum msm_vfe_frame_skip_pattern { - NO_SKIP, - EVERY_2FRAME, - EVERY_3FRAME, - EVERY_4FRAME, - EVERY_5FRAME, - EVERY_6FRAME, - EVERY_7FRAME, - EVERY_8FRAME, - EVERY_9FRAME, - EVERY_10FRAME, - EVERY_11FRAME, - EVERY_12FRAME, - EVERY_13FRAME, - EVERY_14FRAME, - EVERY_15FRAME, - EVERY_16FRAME, - EVERY_32FRAME, - SKIP_ALL, - MAX_SKIP, -}; - -enum msm_vfe_camif_input { - CAMIF_DISABLED, - CAMIF_PAD_REG_INPUT, - CAMIF_MIDDI_INPUT, - CAMIF_MIPI_INPUT, -}; - -struct msm_vfe_camif_subsample_cfg { - uint32_t irq_subsample_period; - uint32_t irq_subsample_pattern; - uint32_t pixel_skip; - uint32_t line_skip; -}; - -struct msm_vfe_camif_cfg { - uint32_t lines_per_frame; - uint32_t pixels_per_line; - uint32_t first_pixel; - uint32_t last_pixel; - uint32_t first_line; - uint32_t last_line; - uint32_t epoch_line0; - uint32_t epoch_line1; - enum msm_vfe_camif_input camif_input; - struct msm_vfe_camif_subsample_cfg subsample_cfg; -}; - -enum msm_vfe_inputmux { - CAMIF, - TESTGEN, - EXTERNAL_READ, -}; - -enum msm_vfe_stats_composite_group { - STATS_COMPOSITE_GRP_NONE, - STATS_COMPOSITE_GRP_1, - STATS_COMPOSITE_GRP_2, - STATS_COMPOSITE_GRP_MAX, -}; - -struct msm_vfe_pix_cfg { - struct msm_vfe_camif_cfg camif_cfg; - enum msm_vfe_inputmux input_mux; - enum ISP_START_PIXEL_PATTERN pixel_pattern; - uint32_t input_format; -}; - -struct msm_vfe_rdi_cfg { - uint8_t cid; - uint8_t frame_based; -}; - -struct msm_vfe_input_cfg { - union { - struct msm_vfe_pix_cfg pix_cfg; - struct msm_vfe_rdi_cfg rdi_cfg; - } d; - enum msm_vfe_input_src input_src; - uint32_t input_pix_clk; -}; - -struct msm_vfe_axi_plane_cfg { - uint32_t output_width; /*Include padding*/ - uint32_t output_height; - uint32_t output_stride; - uint32_t output_scan_lines; - uint32_t output_plane_format; /*Y/Cb/Cr/CbCr*/ - uint32_t plane_addr_offset; - uint8_t csid_src; /*RDI 0-2*/ - uint8_t rdi_cid;/*CID 1-16*/ -}; - -struct msm_vfe_axi_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - uint32_t vt_enable; - uint32_t output_format;/*Planar/RAW/Misc*/ - enum msm_vfe_axi_stream_src stream_src; /*CAMIF/IDEAL/RDIs*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - - uint32_t burst_count; - uint32_t hfr_mode; - uint8_t frame_base; - - uint32_t init_frame_drop; /*MAX 31 Frames*/ - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - uint8_t buf_divert; /* if TRUE no vb2 buf done. */ - /*Return values*/ - uint32_t axi_stream_handle; - uint32_t burst_len; -}; - -struct msm_vfe_axi_stream_release_cmd { - uint32_t stream_handle; -}; - -enum msm_vfe_axi_stream_cmd { - STOP_STREAM, - START_STREAM, - STOP_IMMEDIATELY, -}; - -struct msm_vfe_axi_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MAX_NUM_STREAM]; - enum msm_vfe_axi_stream_cmd cmd; -}; - -enum msm_vfe_axi_stream_update_type { - AXI_STREAM_UPDATE_INVALID, - ENABLE_STREAM_BUF_DIVERT, - DISABLE_STREAM_BUF_DIVERT, - UPDATE_STREAM_FRAMEDROP_PATTERN, - UPDATE_STREAM_AXI_CONFIG, - UPDATE_STREAM_REQUEST_FRAMES, -}; - -struct msm_vfe_axi_stream_cfg_update_info { - uint32_t stream_handle; - uint32_t output_format; - uint32_t request_frm_num; - enum msm_vfe_frame_skip_pattern skip_pattern; - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; -}; - -struct msm_vfe_axi_halt_cmd { - uint32_t stop_camif; //Boolean whether stop camif is to be done - uint32_t overflow_detected; -}; - -struct msm_vfe_axi_reset_cmd { - uint32_t blocking; //Boolean whether stop camif is to be done - unsigned long frame_id; -}; - -struct msm_vfe_axi_restart_cmd { - uint32_t enable_camif; //Boolean whether stop camif is to be done -}; - -struct msm_vfe_axi_stream_update_cmd { - uint32_t num_streams; - enum msm_vfe_axi_stream_update_type update_type; - struct msm_vfe_axi_stream_cfg_update_info update_info[MAX_NUM_STREAM]; -}; - -enum msm_isp_stats_type { - MSM_ISP_STATS_AEC, /* legacy based AEC */ - MSM_ISP_STATS_AF, /* legacy based AF */ - MSM_ISP_STATS_AWB, /* legacy based AWB */ - MSM_ISP_STATS_RS, /* legacy based RS */ - MSM_ISP_STATS_CS, /* legacy based CS */ - MSM_ISP_STATS_IHIST, /* legacy based HIST */ - MSM_ISP_STATS_SKIN, /* legacy based SKIN */ - MSM_ISP_STATS_BG, /* Bayer Grids */ - MSM_ISP_STATS_BF, /* Bayer Focus */ - MSM_ISP_STATS_BE, /* Bayer Exposure*/ - MSM_ISP_STATS_BHIST, /* Bayer Hist */ - MSM_ISP_STATS_BF_SCALE, /* Bayer Focus scale */ - MSM_ISP_STATS_MAX /* MAX */ -}; - -struct msm_vfe_stats_stream_request_cmd { - uint32_t session_id; - uint32_t stream_id; - enum msm_isp_stats_type stats_type; - uint32_t composite_flag; - uint32_t framedrop_pattern; - uint32_t irq_subsample_pattern; - uint32_t buffer_offset; - uint32_t stream_handle; -}; - -struct msm_vfe_stats_stream_release_cmd { - uint32_t stream_handle; -}; -struct msm_vfe_stats_stream_cfg_cmd { - uint8_t num_streams; - uint32_t stream_handle[MSM_ISP_STATS_MAX]; - uint8_t enable; - uint32_t stats_burst_len; -}; - -enum msm_vfe_reg_cfg_type { - VFE_WRITE, - VFE_WRITE_MB, - VFE_READ, - VFE_CFG_MASK, - VFE_WRITE_DMI_16BIT, - VFE_WRITE_DMI_32BIT, - VFE_WRITE_DMI_64BIT, - VFE_READ_DMI_16BIT, - VFE_READ_DMI_32BIT, - VFE_READ_DMI_64BIT, - GET_MAX_CLK_RATE, - GET_ISP_ID, - VFE_HW_UPDATE_LOCK, - VFE_HW_UPDATE_UNLOCK, - SET_WM_UB_SIZE, -}; - -struct msm_vfe_cfg_cmd2 { - uint16_t num_cfg; - uint16_t cmd_len; - uint32_t frame_id; - void __user *cfg_data; - void __user *cfg_cmd; -}; - -struct msm_vfe_cfg_cmd_list { - struct msm_vfe_cfg_cmd2 cfg_cmd; - struct msm_vfe_cfg_cmd_list *next; - uint32_t next_size; -}; - -struct msm_vfe_reg_rw_info { - uint32_t reg_offset; - uint32_t cmd_data_offset; - uint32_t len; -}; - -struct msm_vfe_reg_mask_info { - uint32_t reg_offset; - uint32_t mask; - uint32_t val; -}; - -struct msm_vfe_reg_dmi_info { - uint32_t hi_tbl_offset; /*Optional*/ - uint32_t lo_tbl_offset; /*Required*/ - uint32_t len; -}; - -struct msm_vfe_reg_cfg_cmd { - union { - struct msm_vfe_reg_rw_info rw_info; - struct msm_vfe_reg_mask_info mask_info; - struct msm_vfe_reg_dmi_info dmi_info; - } u; - - enum msm_vfe_reg_cfg_type cmd_type; -}; - -enum msm_isp_buf_type { - ISP_PRIVATE_BUF, - ISP_SHARE_BUF, - MAX_ISP_BUF_TYPE, -}; - -struct msm_isp_buf_request { - uint32_t session_id; - uint32_t stream_id; - uint8_t num_buf; - uint32_t handle; - enum msm_isp_buf_type buf_type; -}; - -struct msm_isp_qbuf_info { - uint32_t handle; - int32_t buf_idx; - /*Only used for prepare buffer*/ - struct v4l2_buffer buffer; - /*Only used for diverted buffer*/ - uint32_t dirty_buf; -}; - -struct msm_vfe_axi_src_state { - enum msm_vfe_input_src input_src; - uint32_t src_active; -}; - -enum msm_isp_event_idx { - ISP_REG_UPDATE = 0, - ISP_EPOCH_0 = 1, - ISP_EPOCH_1 = 2, - ISP_START_ACK = 3, - ISP_STOP_ACK = 4, - ISP_IRQ_VIOLATION = 5, - ISP_WM_BUS_OVERFLOW = 6, - ISP_STATS_OVERFLOW = 7, - ISP_CAMIF_ERROR = 8, - ISP_BUF_DONE = 9, - ISP_FE_RD_DONE = 10, - ISP_EVENT_MAX = 11 -}; - -#define ISP_EVENT_OFFSET 8 -#define ISP_EVENT_BASE (V4L2_EVENT_PRIVATE_START) -#define ISP_BUF_EVENT_BASE (ISP_EVENT_BASE + (1 << ISP_EVENT_OFFSET)) -#define ISP_STATS_EVENT_BASE (ISP_EVENT_BASE + (2 << ISP_EVENT_OFFSET)) -#define ISP_CAMIF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET)) -#define ISP_STREAM_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET)) -#define ISP_EVENT_REG_UPDATE (ISP_EVENT_BASE + ISP_REG_UPDATE) - -#define ISP_EVENT_EPOCH_0 (ISP_EVENT_BASE + ISP_EPOCH_0) -#define ISP_EVENT_EPOCH_1 (ISP_EVENT_BASE + ISP_EPOCH_1) -#define ISP_EVENT_START_ACK (ISP_EVENT_BASE + ISP_START_ACK) -#define ISP_EVENT_STOP_ACK (ISP_EVENT_BASE + ISP_STOP_ACK) -#define ISP_EVENT_IRQ_VIOLATION (ISP_EVENT_BASE + ISP_IRQ_VIOLATION) -#define ISP_EVENT_WM_BUS_OVERFLOW (ISP_EVENT_BASE + ISP_WM_BUS_OVERFLOW) -#define ISP_EVENT_STATS_OVERFLOW (ISP_EVENT_BASE + ISP_STATS_OVERFLOW) -#define ISP_EVENT_CAMIF_ERROR (ISP_EVENT_BASE + ISP_CAMIF_ERROR) -#define ISP_EVENT_SOF (ISP_CAMIF_EVENT_BASE) -#define ISP_EVENT_EOF (ISP_CAMIF_EVENT_BASE + 1) -#define ISP_EVENT_BUF_DONE (ISP_EVENT_BASE + ISP_BUF_DONE) -#define ISP_EVENT_BUF_DIVERT (ISP_BUF_EVENT_BASE) -#define ISP_EVENT_STATS_NOTIFY (ISP_STATS_EVENT_BASE) -#define ISP_EVENT_COMP_STATS_NOTIFY (ISP_EVENT_STATS_NOTIFY + MSM_ISP_STATS_MAX) - -#define ISP_EVENT_FE_READ_DONE (ISP_EVENT_BASE + ISP_FE_RD_DONE) -#define ISP_EVENT_STREAM_UPDATE_DONE (ISP_STREAM_EVENT_BASE) - -/* The msm_v4l2_event_data structure should match the - * v4l2_event.u.data field. - * should not exceed 64 bytes */ - -struct msm_isp_buf_event { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; - uint32_t output_format; - int8_t buf_idx; -}; -struct msm_isp_stats_event { - uint32_t stats_mask; /* 4 bytes */ - uint8_t stats_buf_idxs[MSM_ISP_STATS_MAX]; /* 11 bytes */ -}; - -struct msm_isp_stream_ack { - uint32_t session_id; - uint32_t stream_id; - uint32_t handle; -}; - -struct msm_isp_event_data { - /*Wall clock except for buffer divert events - *which use monotonic clock - */ - struct timeval timestamp; - /* Monotonic timestamp since bootup */ - struct timeval mono_timestamp; - enum msm_vfe_input_src input_intf; - uint32_t frame_id; - union { - struct msm_isp_stats_event stats; - struct msm_isp_buf_event buf_done; - } u; /* union can have max 52 bytes */ - uint32_t is_skip_pproc; -}; -#ifdef CONFIG_COMPAT -struct msm_isp_event_data32 { - struct compat_timeval timestamp; - struct compat_timeval mono_timestamp; - enum msm_vfe_input_src input_intf; - uint32_t frame_id; - union { - struct msm_isp_stats_event stats; - struct msm_isp_buf_event buf_done; - struct msm_isp_error_info error_info; - } u; -}; -#endif -#define V4L2_PIX_FMT_QBGGR8 v4l2_fourcc('Q', 'B', 'G', '8') -#define V4L2_PIX_FMT_QGBRG8 v4l2_fourcc('Q', 'G', 'B', '8') -#define V4L2_PIX_FMT_QGRBG8 v4l2_fourcc('Q', 'G', 'R', '8') -#define V4L2_PIX_FMT_QRGGB8 v4l2_fourcc('Q', 'R', 'G', '8') -#define V4L2_PIX_FMT_QBGGR10 v4l2_fourcc('Q', 'B', 'G', '0') -#define V4L2_PIX_FMT_QGBRG10 v4l2_fourcc('Q', 'G', 'B', '0') -#define V4L2_PIX_FMT_QGRBG10 v4l2_fourcc('Q', 'G', 'R', '0') -#define V4L2_PIX_FMT_QRGGB10 v4l2_fourcc('Q', 'R', 'G', '0') -#define V4L2_PIX_FMT_QBGGR12 v4l2_fourcc('Q', 'B', 'G', '2') -#define V4L2_PIX_FMT_QGBRG12 v4l2_fourcc('Q', 'G', 'B', '2') -#define V4L2_PIX_FMT_QGRBG12 v4l2_fourcc('Q', 'G', 'R', '2') -#define V4L2_PIX_FMT_QRGGB12 v4l2_fourcc('Q', 'R', 'G', '2') -#define V4L2_PIX_FMT_NV14 v4l2_fourcc('N', 'V', '1', '4') -#define V4L2_PIX_FMT_NV41 v4l2_fourcc('N', 'V', '4', '1') -#define V4L2_PIX_FMT_META v4l2_fourcc('Q', 'M', 'E', 'T') - -#define VIDIOC_MSM_VFE_REG_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2) - -#define VIDIOC_MSM_ISP_REQUEST_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+1, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_ENQUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+2, struct msm_isp_qbuf_info) - -#define VIDIOC_MSM_ISP_RELEASE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE+3, struct msm_isp_buf_request) - -#define VIDIOC_MSM_ISP_REQUEST_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+4, struct msm_vfe_axi_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+5, struct msm_vfe_axi_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+6, struct msm_vfe_axi_stream_release_cmd) - -#define VIDIOC_MSM_ISP_INPUT_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+7, struct msm_vfe_input_cfg) - -#define VIDIOC_MSM_ISP_SET_SRC_STATE \ - _IOWR('V', BASE_VIDIOC_PRIVATE+8, struct msm_vfe_axi_src_state) - -#define VIDIOC_MSM_ISP_REQUEST_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+9, \ - struct msm_vfe_stats_stream_request_cmd) - -#define VIDIOC_MSM_ISP_CFG_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+10, struct msm_vfe_stats_stream_cfg_cmd) - -#define VIDIOC_MSM_ISP_RELEASE_STATS_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+11, \ - struct msm_vfe_stats_stream_release_cmd) - -#define VIDIOC_MSM_ISP_REG_UPDATE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE+12, enum msm_vfe_input_src) - -#define VIDIOC_MSM_ISP_UPDATE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE+13, struct msm_vfe_axi_stream_update_cmd) - -#define VIDIOC_MSM_VFE_REG_LIST_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE+14, struct msm_vfe_cfg_cmd_list) - -#ifdef CONFIG_COMPAT -#define VIDIOC_MSM_ISP_BUF_DONE \ - _IOWR('V', BASE_VIDIOC_PRIVATE+21, struct msm_isp_event_data32) -#else -#define VIDIOC_MSM_ISP_BUF_DONE \ - _IOWR('V', BASE_VIDIOC_PRIVATE+21, struct msm_isp_event_data) -#endif -#endif /* __MSMB_ISP__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_ispif.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_ispif.h deleted file mode 100644 index 8eaa2d4c6fd4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_ispif.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef MSM_CAM_ISPIF_H -#define MSM_CAM_ISPIF_H - -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V3 0x30000000 - -enum msm_ispif_vfe_intf { - VFE0, - VFE1, - VFE_MAX -}; -#define VFE0_MASK (1 << VFE0) -#define VFE1_MASK (1 << VFE1) - -enum msm_ispif_intftype { - PIX0, - RDI0, - PIX1, - RDI1, - RDI2, - INTF_MAX -}; -#define MAX_PARAM_ENTRIES (INTF_MAX * 2) -#define MAX_CID_CH 8 -#define MAX_CID_CH_V2 3 - -#define PIX0_MASK (1 << PIX0) -#define PIX1_MASK (1 << PIX1) -#define RDI0_MASK (1 << RDI0) -#define RDI1_MASK (1 << RDI1) -#define RDI2_MASK (1 << RDI2) - - -enum msm_ispif_vc { - VC0, - VC1, - VC2, - VC3, - VC_MAX -}; - -enum msm_ispif_cid { - CID0, - CID1, - CID2, - CID3, - CID4, - CID5, - CID6, - CID7, - CID8, - CID9, - CID10, - CID11, - CID12, - CID13, - CID14, - CID15, - CID_MAX -}; - -enum msm_ispif_csid { - CSID0, - CSID1, - CSID2, - CSID3, - CSID_MAX -}; - -struct msm_ispif_params_entry { - enum msm_ispif_vfe_intf vfe_intf; - enum msm_ispif_intftype intftype; - int num_cids; - enum msm_ispif_cid cids[MAX_CID_CH_V2]; - enum msm_ispif_csid csid; - int crop_enable; - uint16_t crop_start_pixel; - uint16_t crop_end_pixel; -}; - -struct msm_ispif_param_data { - uint32_t num; - struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES]; -}; - -struct msm_isp_info { - uint32_t max_resolution; - uint32_t id; - uint32_t ver; -}; - -struct msm_ispif_vfe_info { - int num_vfe; - struct msm_isp_info info[VFE_MAX]; -}; - -enum ispif_cfg_type_t { - ISPIF_CLK_ENABLE, - ISPIF_CLK_DISABLE, - ISPIF_INIT, - ISPIF_CFG, - ISPIF_START_FRAME_BOUNDARY, - ISPIF_STOP_FRAME_BOUNDARY, - ISPIF_STOP_IMMEDIATELY, - ISPIF_RELEASE, - ISPIF_ENABLE_REG_DUMP, - ISPIF_SET_VFE_INFO, -}; - -struct ispif_cfg_data { - enum ispif_cfg_type_t cfg_type; - union { - int reg_dump; /* ISPIF_ENABLE_REG_DUMP */ - uint32_t csid_version; /* ISPIF_INIT */ - struct msm_ispif_vfe_info vfe_info; /* ISPIF_SET_VFE_INFO */ - struct msm_ispif_param_data params; /* CFG, START, STOP */ - }; -}; - -#define VIDIOC_MSM_ISPIF_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data) - -#endif /* MSM_CAM_ISPIF_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_pproc.h b/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_pproc.h deleted file mode 100644 index ac50b51f5cd0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/media/msmb_pproc.h +++ /dev/null @@ -1,362 +0,0 @@ -#ifndef __MSMB_PPROC_H -#define __MSMB_PPROC_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES VIDEO_MAX_PLANES - -#define MAX_NUM_CPP_STRIPS 8 -#define MSM_CPP_MAX_NUM_PLANES 3 -#define MSM_CPP_MIN_FRAME_LENGTH 13 -#define MSM_CPP_MAX_FRAME_LENGTH 2048 -#define MSM_CPP_MAX_FW_NAME_LEN 32 -#define MAX_FREQ_TBL 10 - - -enum msm_cpp_frame_type { - MSM_CPP_OFFLINE_FRAME, - MSM_CPP_REALTIME_FRAME, -}; - -enum msm_vpe_frame_type { - MSM_VPE_OFFLINE_FRAME, - MSM_VPE_REALTIME_FRAME, -}; - -struct msm_cpp_frame_strip_info { - int scale_v_en; - int scale_h_en; - - int upscale_v_en; - int upscale_h_en; - - int src_start_x; - int src_end_x; - int src_start_y; - int src_end_y; - - /* Padding is required for upscaler because it does not - * pad internally like other blocks, also needed for rotation - * rotation expects all the blocks in the stripe to be the same size - * Padding is done such that all the extra padded pixels - * are on the right and bottom - */ - int pad_bottom; - int pad_top; - int pad_right; - int pad_left; - - int v_init_phase; - int h_init_phase; - int h_phase_step; - int v_phase_step; - - int prescale_crop_width_first_pixel; - int prescale_crop_width_last_pixel; - int prescale_crop_height_first_line; - int prescale_crop_height_last_line; - - int postscale_crop_height_first_line; - int postscale_crop_height_last_line; - int postscale_crop_width_first_pixel; - int postscale_crop_width_last_pixel; - - int dst_start_x; - int dst_end_x; - int dst_start_y; - int dst_end_y; - - int bytes_per_pixel; - unsigned int source_address; - unsigned int destination_address; - unsigned int compl_destination_address; - unsigned int src_stride; - unsigned int dst_stride; - int rotate_270; - int horizontal_flip; - int vertical_flip; - int scale_output_width; - int scale_output_height; - int prescale_crop_en; - int postscale_crop_en; -}; - -struct msm_cpp_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; - uint32_t identity; -}; - -struct msm_cpp_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_cpp_buffer_info_t *buffer_info; -}; - -struct msm_cpp_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - struct msm_cpp_frame_strip_info *strip_info; - uint32_t msg_len; - uint32_t *cpp_cmd_msg; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - struct timeval in_time, out_time; - void *cookie; - int32_t *status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; -}; - -struct cpp_hw_info { - uint32_t cpp_hw_version; - uint32_t cpp_hw_caps; - unsigned long freq_tbl[MAX_FREQ_TBL]; - uint32_t freq_tbl_count; -}; - -struct msm_vpe_frame_strip_info { - uint32_t src_w; - uint32_t src_h; - uint32_t dst_w; - uint32_t dst_h; - uint32_t src_x; - uint32_t src_y; - uint32_t phase_step_x; - uint32_t phase_step_y; - uint32_t phase_init_x; - uint32_t phase_init_y; -}; - -struct msm_vpe_buffer_info_t { - int fd; - uint32_t index; - uint32_t offset; - uint8_t native_buff; - uint8_t processed_divert; -}; - -struct msm_vpe_stream_buff_info_t { - uint32_t identity; - uint32_t num_buffs; - struct msm_vpe_buffer_info_t *buffer_info; -}; - -struct msm_vpe_frame_info_t { - int32_t frame_id; - struct timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_vpe_frame_type frame_type; - struct msm_vpe_frame_strip_info strip_info; - int src_fd; - int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; - unsigned long src_phyaddr; - unsigned long dest_phyaddr; - unsigned long src_chroma_plane_offset; - unsigned long dest_chroma_plane_offset; - struct timeval in_time, out_time; - void *cookie; - - struct msm_vpe_buffer_info_t input_buffer_info; - struct msm_vpe_buffer_info_t output_buffer_info; -}; - -struct msm_pproc_queue_buf_info { - struct msm_buf_mngr_info buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t) - - -#define VIDIOC_MSM_VPE_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t) - -#define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0) -#define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1) - -struct msm_camera_v4l2_ioctl_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - void __user *ioctl_ptr; -}; - -#ifdef CONFIG_COMPAT -struct msm_cpp_frame_info32_t { - int32_t frame_id; - struct compat_timeval timestamp; - uint32_t inst_id; - uint32_t identity; - uint32_t client_id; - enum msm_cpp_frame_type frame_type; - uint32_t num_strips; - compat_caddr_t strip_info; - uint32_t msg_len; - compat_uint_t cpp_cmd_msg; - int src_fd; - int dst_fd; - struct compat_timeval in_time, out_time; - compat_caddr_t cookie; - compat_int_t status; - int32_t duplicate_output; - uint32_t duplicate_identity; - struct msm_cpp_buffer_info_t input_buffer_info; - struct msm_cpp_buffer_info_t output_buffer_info[2]; - struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2]; -}; - -struct msm_cpp_stream_buff_info32_t { - uint32_t identity; - uint32_t num_buffs; - compat_caddr_t buffer_info; -}; - -struct msm_pproc_queue_buf_info32_t { - struct msm_buf_mngr_info32_t buff_mgr_info; - uint8_t is_buf_dirty; -}; - -#define VIDIOC_MSM_CPP_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_LOAD_FIRMWARE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_GET_HW_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_FLUSH_QUEUE32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_CFG32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_TRANSACTION_SETUP32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_GET_INST_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_QUEUE_BUF32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_SET_CLOCK32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_ATTACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl32_t) - -#define VIDIOC_MSM_CPP_IOMMU_DETACH32 \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl32_t) - -struct msm_camera_v4l2_ioctl32_t { - uint32_t id; - uint32_t len; - int32_t trans_code; - compat_caddr_t ioctl_ptr; -}; -#endif - -#endif /* __MSMB_PPROC_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/soc/qcom/camera2.h b/drivers/media/platform/msm/camera_v2_j7lte/include/soc/qcom/camera2.h deleted file mode 100644 index 59d3d2155ba2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/soc/qcom/camera2.h +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __CAMERA2_H__ -#define __CAMERA2_H__ - -#include "../../media/msm_cam_sensor.h" -#include -#include -#include -#include -#include -#define MAX_SPECIAL_SUPPORT_SIZE 10 - -enum msm_camera_device_type_t { - MSM_CAMERA_I2C_DEVICE, - MSM_CAMERA_PLATFORM_DEVICE, - MSM_CAMERA_SPI_DEVICE, -}; - -enum msm_bus_perf_setting { - S_INIT, - S_PREVIEW, - S_VIDEO, - S_CAPTURE, - S_ZSL, - S_STEREO_VIDEO, - S_STEREO_CAPTURE, - S_DEFAULT, - S_LIVESHOT, - S_DUAL, - S_EXIT -}; - -struct msm_camera_slave_info { - uint16_t sensor_slave_addr; - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -struct msm_cam_clk_info { - const char *clk_name; - long clk_rate; - uint32_t delay; -}; - -struct msm_pinctrl_info { - struct pinctrl *pinctrl; - struct pinctrl_state *gpio_state_active; - struct pinctrl_state *gpio_state_suspend; - bool use_pinctrl; -}; - -struct msm_cam_clk_setting { - struct msm_cam_clk_info *clk_info; - uint16_t num_clk_info; - uint8_t enable; -}; - -struct v4l2_subdev_info { - enum v4l2_mbus_pixelcode code; - enum v4l2_colorspace colorspace; - uint16_t fmt; - uint16_t order; -}; - -struct msm_camera_power_ctrl_t { - struct device *dev; - struct msm_sensor_power_setting *power_setting; - uint16_t power_setting_size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t power_down_setting_size; - struct msm_camera_gpio_conf *gpio_conf; - struct camera_vreg_t *cam_vreg; - int num_vreg; - struct msm_camera_i2c_conf *i2c_conf; - struct msm_cam_clk_info *clk_info; - struct msm_pinctrl_info pinctrl_info; - uint8_t cam_pinctrl_status; - uint16_t clk_info_size; -}; - -struct msm_camera_sensor_board_info { - const char *sensor_name; - const char *eeprom_name; - const char *actuator_name; - const char *special_support_sensors[MAX_SPECIAL_SUPPORT_SIZE]; - int32_t special_support_size; - struct msm_camera_slave_info *slave_info; - struct msm_camera_csi_lane_params *csi_lane_params; - struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; - struct msm_actuator_info *actuator_info; - struct msm_sensor_info_t *sensor_info; - const char *misc_regulator; - struct msm_camera_power_ctrl_t power_info; - struct msm_camera_sensor_slave_info *cam_slave_info; -}; - -enum msm_camera_i2c_cmd_type { - MSM_CAMERA_I2C_CMD_WRITE, - MSM_CAMERA_I2C_CMD_POLL, -}; - -struct msm_camera_i2c_reg_conf { - uint16_t reg_addr; - uint16_t reg_data; - enum msm_camera_i2c_data_type dt; - enum msm_camera_i2c_cmd_type cmd_type; - int16_t mask; -}; - -struct msm_camera_i2c_conf_array { - struct msm_camera_i2c_reg_conf *conf; - uint16_t size; - uint16_t delay; - enum msm_camera_i2c_data_type data_type; -}; - -struct eeprom_map_t { - uint32_t valid_size; - uint32_t addr; - uint32_t addr_t; - uint32_t data; - uint32_t data_t; - uint32_t delay; -}; - -struct eeprom_slave_add_t { - uint32_t addr; -}; - -struct msm_eeprom_memory_map_t { - struct eeprom_map_t page; - struct eeprom_map_t pageen; - struct eeprom_map_t poll; - struct eeprom_map_t mem; - struct eeprom_slave_add_t saddr; -}; - -struct msm_eeprom_memory_block_t { - struct msm_eeprom_memory_map_t *map; - uint32_t num_map; /* number of map blocks */ - uint8_t *mapdata; - uint32_t num_data; /* size of total mapdata */ -}; - -struct msm_eeprom_cmm_t { - uint32_t cmm_support; - uint32_t cmm_compression; - uint32_t cmm_offset; - uint32_t cmm_size; -}; - -struct msm_eeprom_board_info { - const char *eeprom_name; - uint16_t i2c_slaveaddr; - struct msm_camera_power_ctrl_t power_info; - struct msm_eeprom_cmm_t cmm_data; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/include/uapi/media/msm_camera.h b/drivers/media/platform/msm/camera_v2_j7lte/include/uapi/media/msm_camera.h deleted file mode 100644 index 3aff71ef61d4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/include/uapi/media/msm_camera.h +++ /dev/null @@ -1,2280 +0,0 @@ -/* Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef __UAPI_MSM_CAMERA_H -#define __UAPI_MSM_CAMERA_H - -#ifdef MSM_CAMERA_BIONIC -#include -#endif -#include -#include -#include -#ifdef MSM_CAMERA_GCC -#include -#else -#include -#endif - -#include - -#define BIT(nr) (1UL << (nr)) - -#define MSM_CAM_IOCTL_MAGIC 'm' - -#define MAX_SERVER_PAYLOAD_LENGTH 8192 - -#define MSM_CAM_IOCTL_GET_SENSOR_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *) - -#define MSM_CAM_IOCTL_REGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *) - -#define MSM_CAM_IOCTL_UNREGISTER_PMEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned) - -#define MSM_CAM_IOCTL_CTRL_COMMAND \ - _IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_STATS \ - _IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *) - -#define MSM_CAM_IOCTL_GETFRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *) - -#define MSM_CAM_IOCTL_ENABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_CTRL_CMD_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *) - -#define MSM_CAM_IOCTL_CONFIG_CMD \ - _IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *) - -#define MSM_CAM_IOCTL_DISABLE_VFE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PAD_REG_RESET2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_VFE_APPS_RESET \ - _IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *) - -#define MSM_CAM_IOCTL_AXI_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *) - -#define MSM_CAM_IOCTL_GET_PICTURE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_frame *) - -#define MSM_CAM_IOCTL_SET_CROP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *) - -#define MSM_CAM_IOCTL_PICT_PP \ - _IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *) - -#define MSM_CAM_IOCTL_PICT_PP_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *) - -#define MSM_CAM_IOCTL_SENSOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_FLASH_LED_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 23) - -#define MSM_CAM_IOCTL_CTRL_COMMAND_2 \ - _IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *) - -#define MSM_CAM_IOCTL_AF_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 25, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_AF_CTRL_DONE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 26, struct msm_ctrl_cmt_t *) - -#define MSM_CAM_IOCTL_CONFIG_VPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 27, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_AXI_VPE_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 28, struct msm_camera_vpe_cfg_cmd *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 29, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_CHARGE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 30, uint32_t *) - -#define MSM_CAM_IOCTL_STROBE_FLASH_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 31) - -#define MSM_CAM_IOCTL_FLASH_CTRL \ - _IOW(MSM_CAM_IOCTL_MAGIC, 32, struct flash_ctrl_data *) - -#define MSM_CAM_IOCTL_ERROR_CONFIG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 33, uint32_t *) - -#define MSM_CAM_IOCTL_ABORT_CAPTURE \ - _IO(MSM_CAM_IOCTL_MAGIC, 34) - -#define MSM_CAM_IOCTL_SET_FD_ROI \ - _IOW(MSM_CAM_IOCTL_MAGIC, 35, struct fd_roi_info *) - -#define MSM_CAM_IOCTL_GET_CAMERA_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 36, struct msm_camera_info *) - -#define MSM_CAM_IOCTL_UNBLOCK_POLL_PIC_FRAME \ - _IO(MSM_CAM_IOCTL_MAGIC, 37) - -#define MSM_CAM_IOCTL_RELEASE_PIC_BUFFER \ - _IOW(MSM_CAM_IOCTL_MAGIC, 38, struct camera_enable_cmd *) - -#define MSM_CAM_IOCTL_PUT_ST_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 39, struct msm_camera_st_frame *) - -#define MSM_CAM_IOCTL_V4L2_EVT_NOTIFY \ - _IOW(MSM_CAM_IOCTL_MAGIC, 40, struct v4l2_event_and_payload) - -#define MSM_CAM_IOCTL_SET_MEM_MAP_INFO \ - _IOR(MSM_CAM_IOCTL_MAGIC, 41, struct msm_mem_map_info *) - -#define MSM_CAM_IOCTL_ACTUATOR_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 42, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_MCTL_POST_PROC \ - _IOW(MSM_CAM_IOCTL_MAGIC, 43, struct msm_mctl_post_proc_cmd *) - -#define MSM_CAM_IOCTL_RESERVE_FREE_FRAME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 44, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_RELEASE_FREE_FRAME \ - _IOR(MSM_CAM_IOCTL_MAGIC, 45, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_PICT_PP_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 46, struct msm_pp_frame *) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_S_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 47, struct v4l2_control) - -#define MSM_CAM_IOCTL_SENSOR_V4l2_QUERY_CTRL \ - _IOR(MSM_CAM_IOCTL_MAGIC, 48, struct v4l2_queryctrl) - -#define MSM_CAM_IOCTL_GET_KERNEL_SYSTEM_TIME \ - _IOW(MSM_CAM_IOCTL_MAGIC, 49, struct timeval *) - -#define MSM_CAM_IOCTL_SET_VFE_OUTPUT_TYPE \ - _IOW(MSM_CAM_IOCTL_MAGIC, 50, uint32_t *) - -#define MSM_CAM_IOCTL_MCTL_DIVERT_DONE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 51, struct msm_cam_evt_divert_frame *) - -#define MSM_CAM_IOCTL_GET_ACTUATOR_INFO \ - _IOW(MSM_CAM_IOCTL_MAGIC, 52, struct msm_actuator_cfg_data *) - -#define MSM_CAM_IOCTL_EEPROM_IO_CFG \ - _IOW(MSM_CAM_IOCTL_MAGIC, 53, struct msm_eeprom_cfg_data *) - -#define MSM_CAM_IOCTL_ISPIF_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 54, struct ispif_cfg_data *) - -#define MSM_CAM_IOCTL_STATS_REQBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 55, struct msm_stats_reqbuf *) - -#define MSM_CAM_IOCTL_STATS_ENQUEUEBUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 56, struct msm_stats_buf_info *) - -#define MSM_CAM_IOCTL_STATS_FLUSH_BUFQ \ - _IOR(MSM_CAM_IOCTL_MAGIC, 57, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_SET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 58, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_UNSET_MCTL_SDEV \ - _IOW(MSM_CAM_IOCTL_MAGIC, 59, struct msm_mctl_set_sdev_data *) - -#define MSM_CAM_IOCTL_GET_INST_HANDLE \ - _IOR(MSM_CAM_IOCTL_MAGIC, 60, uint32_t *) - -#define MSM_CAM_IOCTL_STATS_UNREG_BUF \ - _IOR(MSM_CAM_IOCTL_MAGIC, 61, struct msm_stats_flush_bufq *) - -#define MSM_CAM_IOCTL_CSIC_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 62, struct csic_cfg_data *) - -#define MSM_CAM_IOCTL_CSID_IO_CFG \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 63, struct csid_cfg_data *) - -#define MSM_CAM_IOCTL_CSIPHY_IO_CFG \ - _IOR(MSM_CAM_IOCTL_MAGIC, 64, struct csiphy_cfg_data *) - -#define MSM_CAM_IOCTL_OEM \ - _IOW(MSM_CAM_IOCTL_MAGIC, 65, struct sensor_cfg_data *) - -#define MSM_CAM_IOCTL_AXI_INIT \ - _IOWR(MSM_CAM_IOCTL_MAGIC, 66, uint8_t *) - -#define MSM_CAM_IOCTL_AXI_RELEASE \ - _IO(MSM_CAM_IOCTL_MAGIC, 67) - -struct v4l2_event_and_payload { - struct v4l2_event evt; - uint32_t payload_length; - uint32_t transaction_id; - void *payload; -}; - -struct msm_stats_reqbuf { - int num_buf; /* how many buffers requested */ - int stats_type; /* stats type */ -}; - -struct msm_stats_flush_bufq { - int stats_type; /* enum msm_stats_enum_type */ -}; - -struct msm_mctl_pp_cmd { - int32_t id; - uint16_t length; - void *value; -}; - -struct msm_mctl_post_proc_cmd { - int32_t type; - struct msm_mctl_pp_cmd cmd; -}; - -#define MSM_CAMERA_LED_OFF 0 -#define MSM_CAMERA_LED_LOW 1 -#define MSM_CAMERA_LED_HIGH 2 -#define MSM_CAMERA_LED_INIT 3 -#define MSM_CAMERA_LED_RELEASE 4 - -#define MSM_CAMERA_STROBE_FLASH_NONE 0 -#define MSM_CAMERA_STROBE_FLASH_XENON 1 - -#define MSM_MAX_CAMERA_SENSORS 5 -#define MAX_SENSOR_NAME 32 -#define MAX_CAM_NAME_SIZE 32 -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 32 -#define MAX_ACTUATOR_TYPE_SIZE 32 -#define MAX_ACTUATOR_REG_TBL_SIZE 8 - - -#define MSM_MAX_CAMERA_CONFIGS 2 - -#define PP_SNAP 0x01 -#define PP_RAW_SNAP ((0x01)<<1) -#define PP_PREV ((0x01)<<2) -#define PP_THUMB ((0x01)<<3) -#define PP_MASK (PP_SNAP|PP_RAW_SNAP|PP_PREV|PP_THUMB) - -#define MSM_CAM_CTRL_CMD_DONE 0 -#define MSM_CAM_SENSOR_VFE_CMD 1 - -/* Should be same as VIDEO_MAX_PLANES in videodev2.h */ -#define MAX_PLANES 8 - -/***************************************************** - * structure - *****************************************************/ - -/* define five type of structures for userspace <==> kernel - * space communication: - * command 1 - 2 are from userspace ==> kernel - * command 3 - 4 are from kernel ==> userspace - * - * 1. control command: control command(from control thread), - * control status (from config thread); - */ -struct msm_ctrl_cmd { - uint16_t type; - uint16_t length; - void *value; - uint16_t status; - uint32_t timeout_ms; - int resp_fd; /* FIXME: to be used by the kernel, pass-through for now */ - int vnode_id; /* video dev id. Can we overload resp_fd? */ - int queue_idx; - uint32_t evt_id; - uint32_t stream_type; /* used to pass value to qcamera server */ - int config_ident; /*used as identifier for config node*/ -}; - -struct msm_cam_evt_msg { - unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */ - unsigned short msg_id; - unsigned int len; /* size in, number of bytes out */ - uint32_t frame_id; - void *data; - struct timespec timestamp; -}; - -struct msm_pp_frame_sp { - /* phy addr of the buffer */ - unsigned long phy_addr; - uint32_t y_off; - uint32_t cbcr_off; - /* buffer length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame_mp { - /* phy addr of the plane */ - unsigned long phy_addr; - /* offset of plane data */ - uint32_t data_offset; - /* plane length */ - uint32_t length; - int32_t fd; - uint32_t addr_offset; - /* mapped addr */ - unsigned long vaddr; -}; - -struct msm_pp_frame { - uint32_t handle; /* stores vb cookie */ - uint32_t frame_id; - unsigned short buf_idx; - int path; - unsigned short image_type; - unsigned short num_planes; /* 1 for sp */ - struct timeval timestamp; - union { - struct msm_pp_frame_sp sp; - struct msm_pp_frame_mp mp[MAX_PLANES]; - }; - int node_type; - uint32_t inst_handle; -}; - -struct msm_pp_crop { - uint32_t src_x; - uint32_t src_y; - uint32_t src_w; - uint32_t src_h; - uint32_t dst_x; - uint32_t dst_y; - uint32_t dst_w; - uint32_t dst_h; - uint8_t update_flag; -}; - -struct msm_mctl_pp_frame_cmd { - uint32_t cookie; - uint8_t vpe_output_action; - struct msm_pp_frame src_frame; - struct msm_pp_frame dest_frame; - struct msm_pp_crop crop; - int path; -}; - -struct msm_cam_evt_divert_frame { - unsigned short image_mode; - unsigned short op_mode; - unsigned short inst_idx; - unsigned short node_idx; - struct msm_pp_frame frame; - int do_pp; -}; - -struct msm_mctl_pp_cmd_ack_event { - uint32_t cmd; /* VPE_CMD_ZOOM? */ - int status; /* 0 done, < 0 err */ - uint32_t cookie; /* daemon's cookie */ -}; - -struct msm_mctl_pp_event_info { - int32_t event; - union { - struct msm_mctl_pp_cmd_ack_event ack; - }; -}; - -struct msm_isp_event_ctrl { - unsigned short resptype; - union { - struct msm_cam_evt_msg isp_msg; - struct msm_ctrl_cmd ctrl; - struct msm_cam_evt_divert_frame div_frame; - struct msm_mctl_pp_event_info pp_event_info; - } isp_data; -}; - -#define MSM_CAM_RESP_CTRL 0 -#define MSM_CAM_RESP_STAT_EVT_MSG 1 -#define MSM_CAM_RESP_STEREO_OP_1 2 -#define MSM_CAM_RESP_STEREO_OP_2 3 -#define MSM_CAM_RESP_V4L2 4 -#define MSM_CAM_RESP_DIV_FRAME_EVT_MSG 5 -#define MSM_CAM_RESP_DONE_EVENT 6 -#define MSM_CAM_RESP_MCTL_PP_EVENT 7 -#define MSM_CAM_RESP_MAX 8 - -#define MSM_CAM_APP_NOTIFY_EVENT 0 -#define MSM_CAM_APP_NOTIFY_ERROR_EVENT 1 - -/* this one is used to send ctrl/status up to config thread */ - -struct msm_stats_event_ctrl { - /* 0 - ctrl_cmd from control thread, - * 1 - stats/event kernel, - * 2 - V4L control or read request */ - int resptype; - int timeout_ms; - struct msm_ctrl_cmd ctrl_cmd; - /* struct vfe_event_t stats_event; */ - struct msm_cam_evt_msg stats_event; -}; - -/* 2. config command: config command(from config thread); */ -struct msm_camera_cfg_cmd { - /* what to config: - * 1 - sensor config, 2 - vfe config */ - uint16_t cfg_type; - - /* sensor config type */ - uint16_t cmd_type; - uint16_t queue; - uint16_t length; - void *value; -}; - -#define CMD_GENERAL 0 -#define CMD_AXI_CFG_OUT1 1 -#define CMD_AXI_CFG_SNAP_O1_AND_O2 2 -#define CMD_AXI_CFG_OUT2 3 -#define CMD_PICT_T_AXI_CFG 4 -#define CMD_PICT_M_AXI_CFG 5 -#define CMD_RAW_PICT_AXI_CFG 6 - -#define CMD_FRAME_BUF_RELEASE 7 -#define CMD_PREV_BUF_CFG 8 -#define CMD_SNAP_BUF_RELEASE 9 -#define CMD_SNAP_BUF_CFG 10 -#define CMD_STATS_DISABLE 11 -#define CMD_STATS_AEC_AWB_ENABLE 12 -#define CMD_STATS_AF_ENABLE 13 -#define CMD_STATS_AEC_ENABLE 14 -#define CMD_STATS_AWB_ENABLE 15 -#define CMD_STATS_ENABLE 16 - -#define CMD_STATS_AXI_CFG 17 -#define CMD_STATS_AEC_AXI_CFG 18 -#define CMD_STATS_AF_AXI_CFG 19 -#define CMD_STATS_AWB_AXI_CFG 20 -#define CMD_STATS_RS_AXI_CFG 21 -#define CMD_STATS_CS_AXI_CFG 22 -#define CMD_STATS_IHIST_AXI_CFG 23 -#define CMD_STATS_SKIN_AXI_CFG 24 - -#define CMD_STATS_BUF_RELEASE 25 -#define CMD_STATS_AEC_BUF_RELEASE 26 -#define CMD_STATS_AF_BUF_RELEASE 27 -#define CMD_STATS_AWB_BUF_RELEASE 28 -#define CMD_STATS_RS_BUF_RELEASE 29 -#define CMD_STATS_CS_BUF_RELEASE 30 -#define CMD_STATS_IHIST_BUF_RELEASE 31 -#define CMD_STATS_SKIN_BUF_RELEASE 32 - -#define UPDATE_STATS_INVALID 33 -#define CMD_AXI_CFG_SNAP_GEMINI 34 -#define CMD_AXI_CFG_SNAP 35 -#define CMD_AXI_CFG_PREVIEW 36 -#define CMD_AXI_CFG_VIDEO 37 - -#define CMD_STATS_IHIST_ENABLE 38 -#define CMD_STATS_RS_ENABLE 39 -#define CMD_STATS_CS_ENABLE 40 -#define CMD_VPE 41 -#define CMD_AXI_CFG_VPE 42 -#define CMD_AXI_CFG_ZSL 43 -#define CMD_AXI_CFG_SNAP_VPE 44 -#define CMD_AXI_CFG_SNAP_THUMB_VPE 45 - -#define CMD_CONFIG_PING_ADDR 46 -#define CMD_CONFIG_PONG_ADDR 47 -#define CMD_CONFIG_FREE_BUF_ADDR 48 -#define CMD_AXI_CFG_ZSL_ALL_CHNLS 49 -#define CMD_AXI_CFG_VIDEO_ALL_CHNLS 50 -#define CMD_VFE_BUFFER_RELEASE 51 -#define CMD_VFE_PROCESS_IRQ 52 -#define CMD_STATS_BG_ENABLE 53 -#define CMD_STATS_BF_ENABLE 54 -#define CMD_STATS_BHIST_ENABLE 55 -#define CMD_STATS_BG_BUF_RELEASE 56 -#define CMD_STATS_BF_BUF_RELEASE 57 -#define CMD_STATS_BHIST_BUF_RELEASE 58 -#define CMD_VFE_PIX_SOF_COUNT_UPDATE 59 -#define CMD_VFE_COUNT_PIX_SOF_ENABLE 60 -#define CMD_STATS_BE_ENABLE 61 -#define CMD_STATS_BE_BUF_RELEASE 62 - -#define CMD_AXI_CFG_PRIM BIT(8) -#define CMD_AXI_CFG_PRIM_ALL_CHNLS BIT(9) -#define CMD_AXI_CFG_SEC BIT(10) -#define CMD_AXI_CFG_SEC_ALL_CHNLS BIT(11) -#define CMD_AXI_CFG_TERT1 BIT(12) -#define CMD_AXI_CFG_TERT2 BIT(13) - -#define CMD_AXI_START 0xE1 -#define CMD_AXI_STOP 0xE2 -#define CMD_AXI_RESET 0xE3 -#define CMD_AXI_ABORT 0xE4 - - - -#define AXI_CMD_PREVIEW BIT(0) -#define AXI_CMD_CAPTURE BIT(1) -#define AXI_CMD_RECORD BIT(2) -#define AXI_CMD_ZSL BIT(3) -#define AXI_CMD_RAW_CAPTURE BIT(4) -#define AXI_CMD_LIVESHOT BIT(5) - -/* vfe config command: config command(from config thread)*/ -struct msm_vfe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -struct msm_vpe_cfg_cmd { - int cmd_type; - uint16_t length; - void *value; -}; - -#define MAX_CAMERA_ENABLE_NAME_LEN 32 -struct camera_enable_cmd { - char name[MAX_CAMERA_ENABLE_NAME_LEN]; -}; - -#define MSM_PMEM_OUTPUT1 0 -#define MSM_PMEM_OUTPUT2 1 -#define MSM_PMEM_OUTPUT1_OUTPUT2 2 -#define MSM_PMEM_THUMBNAIL 3 -#define MSM_PMEM_MAINIMG 4 -#define MSM_PMEM_RAW_MAINIMG 5 -#define MSM_PMEM_AEC_AWB 6 -#define MSM_PMEM_AF 7 -#define MSM_PMEM_AEC 8 -#define MSM_PMEM_AWB 9 -#define MSM_PMEM_RS 10 -#define MSM_PMEM_CS 11 -#define MSM_PMEM_IHIST 12 -#define MSM_PMEM_SKIN 13 -#define MSM_PMEM_VIDEO 14 -#define MSM_PMEM_PREVIEW 15 -#define MSM_PMEM_VIDEO_VPE 16 -#define MSM_PMEM_C2D 17 -#define MSM_PMEM_MAINIMG_VPE 18 -#define MSM_PMEM_THUMBNAIL_VPE 19 -#define MSM_PMEM_BAYER_GRID 20 -#define MSM_PMEM_BAYER_FOCUS 21 -#define MSM_PMEM_BAYER_HIST 22 -#define MSM_PMEM_BAYER_EXPOSURE 23 -#define MSM_PMEM_MAX 24 - -#define STAT_AEAW 0 -#define STAT_AEC 1 -#define STAT_AF 2 -#define STAT_AWB 3 -#define STAT_RS 4 -#define STAT_CS 5 -#define STAT_IHIST 6 -#define STAT_SKIN 7 -#define STAT_BG 8 -#define STAT_BF 9 -#define STAT_BE 10 -#define STAT_BHIST 11 -#define STAT_MAX 12 - -#define FRAME_PREVIEW_OUTPUT1 0 -#define FRAME_PREVIEW_OUTPUT2 1 -#define FRAME_SNAPSHOT 2 -#define FRAME_THUMBNAIL 3 -#define FRAME_RAW_SNAPSHOT 4 -#define FRAME_MAX 5 - -enum msm_stats_enum_type { - MSM_STATS_TYPE_AEC, /* legacy based AEC */ - MSM_STATS_TYPE_AF, /* legacy based AF */ - MSM_STATS_TYPE_AWB, /* legacy based AWB */ - MSM_STATS_TYPE_RS, /* legacy based RS */ - MSM_STATS_TYPE_CS, /* legacy based CS */ - MSM_STATS_TYPE_IHIST, /* legacy based HIST */ - MSM_STATS_TYPE_SKIN, /* legacy based SKIN */ - MSM_STATS_TYPE_BG, /* Bayer Grids */ - MSM_STATS_TYPE_BF, /* Bayer Focus */ - MSM_STATS_TYPE_BE, /* Bayer Exposure*/ - MSM_STATS_TYPE_BHIST, /* Bayer Hist */ - MSM_STATS_TYPE_AE_AW, /* legacy stats for vfe 2.x*/ - MSM_STATS_TYPE_COMP, /* Composite stats */ - MSM_STATS_TYPE_MAX /* MAX */ -}; - -struct msm_stats_buf_info { - int type; /* msm_stats_enum_type */ - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; - int buf_idx; -}; - -struct msm_pmem_info { - int type; - int fd; - void *vaddr; - uint32_t offset; - uint32_t len; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - uint8_t active; -}; - -struct outputCfg { - uint32_t height; - uint32_t width; - - uint32_t window_height_firstline; - uint32_t window_height_lastline; -}; - -#define VIDEO_NODE 0 -#define MCTL_NODE 1 - -#define OUTPUT_1 0 -#define OUTPUT_2 1 -#define OUTPUT_1_AND_2 2 /* snapshot only */ -#define OUTPUT_1_AND_3 3 /* video */ -#define CAMIF_TO_AXI_VIA_OUTPUT_2 4 -#define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 5 -#define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6 -#define OUTPUT_1_2_AND_3 7 -#define OUTPUT_ALL_CHNLS 8 -#define OUTPUT_VIDEO_ALL_CHNLS 9 -#define OUTPUT_ZSL_ALL_CHNLS 10 -#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_ZSL_ALL_CHNLS - -#define OUTPUT_PRIM BIT(8) -#define OUTPUT_PRIM_ALL_CHNLS BIT(9) -#define OUTPUT_SEC BIT(10) -#define OUTPUT_SEC_ALL_CHNLS BIT(11) -#define OUTPUT_TERT1 BIT(12) -#define OUTPUT_TERT2 BIT(13) - - - -#define MSM_FRAME_PREV_1 0 -#define MSM_FRAME_PREV_2 1 -#define MSM_FRAME_ENC 2 - -#define OUTPUT_TYPE_P BIT(0) -#define OUTPUT_TYPE_T BIT(1) -#define OUTPUT_TYPE_S BIT(2) -#define OUTPUT_TYPE_V BIT(3) -#define OUTPUT_TYPE_L BIT(4) -#define OUTPUT_TYPE_ST_L BIT(5) -#define OUTPUT_TYPE_ST_R BIT(6) -#define OUTPUT_TYPE_ST_D BIT(7) -#define OUTPUT_TYPE_R BIT(8) -#define OUTPUT_TYPE_R1 BIT(9) -#define OUTPUT_TYPE_SAEC BIT(10) -#define OUTPUT_TYPE_SAFC BIT(11) -#define OUTPUT_TYPE_SAWB BIT(12) -#define OUTPUT_TYPE_IHST BIT(13) -#define OUTPUT_TYPE_CSTA BIT(14) - -struct fd_roi_info { - void *info; - int info_len; -}; - -struct msm_mem_map_info { - uint32_t cookie; - uint32_t length; - uint32_t mem_type; -}; - -#define MSM_MEM_MMAP 0 -#define MSM_MEM_USERPTR 1 -#define MSM_PLANE_MAX 8 -#define MSM_PLANE_Y 0 -#define MSM_PLANE_UV 1 - -struct msm_frame { - struct timespec ts; - int path; - int type; - unsigned long buffer; - uint32_t phy_offset; - uint32_t y_off; - uint32_t cbcr_off; - uint32_t planar0_off; - uint32_t planar1_off; - uint32_t planar2_off; - int fd; - - void *cropinfo; - int croplen; - uint32_t error_code; - struct fd_roi_info roi_info; - uint32_t frame_id; - int stcam_quality_ind; - uint32_t stcam_conv_value; - - struct ion_allocation_data ion_alloc; - struct ion_fd_data fd_data; - int ion_dev_fd; -}; - -enum msm_st_frame_packing { - SIDE_BY_SIDE_HALF, - SIDE_BY_SIDE_FULL, - TOP_DOWN_HALF, - TOP_DOWN_FULL, -}; - -struct msm_st_crop { - uint32_t in_w; - uint32_t in_h; - uint32_t out_w; - uint32_t out_h; -}; - -struct msm_st_half { - uint32_t buf_p0_off; - uint32_t buf_p1_off; - uint32_t buf_p0_stride; - uint32_t buf_p1_stride; - uint32_t pix_x_off; - uint32_t pix_y_off; - struct msm_st_crop stCropInfo; -}; - -struct msm_st_frame { - struct msm_frame buf_info; - int type; - enum msm_st_frame_packing packing; - struct msm_st_half L; - struct msm_st_half R; - int frame_id; -}; - -#define MSM_CAMERA_ERR_MASK (0xFFFFFFFF & 1) - -struct stats_buff { - unsigned long buff; - int fd; -}; - -struct msm_stats_buf { - uint8_t awb_ymin; - struct stats_buff aec; - struct stats_buff awb; - struct stats_buff af; - struct stats_buff be; - struct stats_buff ihist; - struct stats_buff rs; - struct stats_buff cs; - struct stats_buff skin; - int type; - uint32_t status_bits; - unsigned long buffer; - int fd; - int length; - struct ion_handle *handle; - uint32_t frame_id; - int buf_idx; -}; -#define MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT 0 -/* video capture mode in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_PREVIEW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+1) -/* extendedmode for video recording in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_VIDEO \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+2) -/* extendedmode for the full size main image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_MAIN (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+3) -/* extendedmode for the thumb nail image in VIDIOC_S_PARM */ -#define MSM_V4L2_EXT_CAPTURE_MODE_THUMBNAIL \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+4) -/* ISP_PIX_OUTPUT1: no pp, directly send output1 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+5) -/* ISP_PIX_OUTPUT2: no pp, directly send output2 buf to user */ -#define MSM_V4L2_EXT_CAPTURE_MODE_ISP_PIX_OUTPUT2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+6) -/* raw image type */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RAW \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+7) -/* RDI dump */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+8) -/* RDI dump 1 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI1 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+9) -/* RDI dump 2 */ -#define MSM_V4L2_EXT_CAPTURE_MODE_RDI2 \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+10) -#define MSM_V4L2_EXT_CAPTURE_MODE_AEC \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+11) -#define MSM_V4L2_EXT_CAPTURE_MODE_AWB \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+12) -#define MSM_V4L2_EXT_CAPTURE_MODE_AF \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+13) -#define MSM_V4L2_EXT_CAPTURE_MODE_IHIST \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+14) -#define MSM_V4L2_EXT_CAPTURE_MODE_CS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+15) -#define MSM_V4L2_EXT_CAPTURE_MODE_RS \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+16) -#define MSM_V4L2_EXT_CAPTURE_MODE_CSTA \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+17) -#define MSM_V4L2_EXT_CAPTURE_MODE_V2X_LIVESHOT \ - (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+18) -#define MSM_V4L2_EXT_CAPTURE_MODE_MAX (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+19) - - -#define MSM_V4L2_PID_MOTION_ISO V4L2_CID_PRIVATE_BASE -#define MSM_V4L2_PID_EFFECT (V4L2_CID_PRIVATE_BASE+1) -#define MSM_V4L2_PID_HJR (V4L2_CID_PRIVATE_BASE+2) -#define MSM_V4L2_PID_LED_MODE (V4L2_CID_PRIVATE_BASE+3) -#define MSM_V4L2_PID_PREP_SNAPSHOT (V4L2_CID_PRIVATE_BASE+4) -#define MSM_V4L2_PID_EXP_METERING (V4L2_CID_PRIVATE_BASE+5) -#define MSM_V4L2_PID_ISO (V4L2_CID_PRIVATE_BASE+6) -#define MSM_V4L2_PID_CAM_MODE (V4L2_CID_PRIVATE_BASE+7) -#define MSM_V4L2_PID_LUMA_ADAPTATION (V4L2_CID_PRIVATE_BASE+8) -#define MSM_V4L2_PID_BEST_SHOT (V4L2_CID_PRIVATE_BASE+9) -#define MSM_V4L2_PID_FOCUS_MODE (V4L2_CID_PRIVATE_BASE+10) -#define MSM_V4L2_PID_BL_DETECTION (V4L2_CID_PRIVATE_BASE+11) -#define MSM_V4L2_PID_SNOW_DETECTION (V4L2_CID_PRIVATE_BASE+12) -#define MSM_V4L2_PID_CTRL_CMD (V4L2_CID_PRIVATE_BASE+13) -#define MSM_V4L2_PID_EVT_SUB_INFO (V4L2_CID_PRIVATE_BASE+14) -#define MSM_V4L2_PID_STROBE_FLASH (V4L2_CID_PRIVATE_BASE+15) -#define MSM_V4L2_PID_INST_HANDLE (V4L2_CID_PRIVATE_BASE+16) -#define MSM_V4L2_PID_MMAP_INST (V4L2_CID_PRIVATE_BASE+17) -#define MSM_V4L2_PID_PP_PLANE_INFO (V4L2_CID_PRIVATE_BASE+18) -#define MSM_V4L2_PID_MAX MSM_V4L2_PID_PP_PLANE_INFO - -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_DEFAULT 0 -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_PREVIEW (MSM_V4L2_CAM_OP_DEFAULT+1) -/* camera operation mode for video recording - two frame output queues */ -#define MSM_V4L2_CAM_OP_VIDEO (MSM_V4L2_CAM_OP_DEFAULT+2) -/* camera operation mode for standard shapshot - two frame output queues */ -#define MSM_V4L2_CAM_OP_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+3) -/* camera operation mode for zsl shapshot - three output queues */ -#define MSM_V4L2_CAM_OP_ZSL (MSM_V4L2_CAM_OP_DEFAULT+4) -/* camera operation mode for raw snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_RAW (MSM_V4L2_CAM_OP_DEFAULT+5) -/* camera operation mode for jpeg snapshot - one frame output queue */ -#define MSM_V4L2_CAM_OP_JPEG_CAPTURE (MSM_V4L2_CAM_OP_DEFAULT+6) - - -#define MSM_V4L2_VID_CAP_TYPE 0 -#define MSM_V4L2_STREAM_ON 1 -#define MSM_V4L2_STREAM_OFF 2 -#define MSM_V4L2_SNAPSHOT 3 -#define MSM_V4L2_QUERY_CTRL 4 -#define MSM_V4L2_GET_CTRL 5 -#define MSM_V4L2_SET_CTRL 6 -#define MSM_V4L2_QUERY 7 -#define MSM_V4L2_GET_CROP 8 -#define MSM_V4L2_SET_CROP 9 -#define MSM_V4L2_OPEN 10 -#define MSM_V4L2_CLOSE 11 -#define MSM_V4L2_SET_CTRL_CMD 12 -#define MSM_V4L2_EVT_SUB_MASK 13 -#define MSM_V4L2_PRIVATE_CMD 14 -#define MSM_V4L2_MAX 15 -#define V4L2_CAMERA_EXIT 43 - -struct crop_info { - void *info; - int len; -}; - -struct msm_postproc { - int ftnum; - struct msm_frame fthumnail; - int fmnum; - struct msm_frame fmain; -}; - -struct msm_snapshot_pp_status { - void *status; -}; - -#define CFG_SET_MODE 0 -#define CFG_SET_EFFECT 1 -#define CFG_START 2 -#define CFG_PWR_UP 3 -#define CFG_PWR_DOWN 4 -#define CFG_WRITE_EXPOSURE_GAIN 5 -#define CFG_SET_DEFAULT_FOCUS 6 -#define CFG_MOVE_FOCUS 7 -#define CFG_REGISTER_TO_REAL_GAIN 8 -#define CFG_REAL_TO_REGISTER_GAIN 9 -#define CFG_SET_FPS 10 -#define CFG_SET_PICT_FPS 11 -#define CFG_SET_BRIGHTNESS 12 -#define CFG_SET_CONTRAST 13 -#define CFG_SET_ZOOM 14 -#define CFG_SET_EXPOSURE_MODE 15 -#define CFG_SET_WB 16 -#define CFG_SET_ANTIBANDING 17 -#define CFG_SET_EXP_GAIN 18 -#define CFG_SET_PICT_EXP_GAIN 19 -#define CFG_SET_LENS_SHADING 20 -#define CFG_GET_PICT_FPS 21 -#define CFG_GET_PREV_L_PF 22 -#define CFG_GET_PREV_P_PL 23 -#define CFG_GET_PICT_L_PF 24 -#define CFG_GET_PICT_P_PL 25 -#define CFG_GET_AF_MAX_STEPS 26 -#define CFG_GET_PICT_MAX_EXP_LC 27 -#define CFG_SEND_WB_INFO 28 -#define CFG_SENSOR_INIT 29 -#define CFG_GET_3D_CALI_DATA 30 -#define CFG_GET_CALIB_DATA 31 -#define CFG_GET_OUTPUT_INFO 32 -#define CFG_GET_EEPROM_INFO 33 -#define CFG_GET_EEPROM_DATA 34 -#define CFG_SET_ACTUATOR_INFO 35 -#define CFG_GET_ACTUATOR_INFO 36 -/* TBD: QRD */ -#define CFG_SET_SATURATION 37 -#define CFG_SET_SHARPNESS 38 -#define CFG_SET_TOUCHAEC 39 -#define CFG_SET_AUTO_FOCUS 40 -#define CFG_SET_AUTOFLASH 41 -#define CFG_SET_EXPOSURE_COMPENSATION 42 -#define CFG_SET_ISO 43 -#define CFG_START_STREAM 44 -#define CFG_STOP_STREAM 45 -#define CFG_GET_CSI_PARAMS 46 -#define CFG_POWER_UP 47 -#define CFG_POWER_DOWN 48 -#define CFG_WRITE_I2C_ARRAY 49 -#define CFG_READ_I2C_ARRAY 50 -#define CFG_PCLK_CHANGE 51 -#define CFG_CONFIG_VREG_ARRAY 52 -#define CFG_CONFIG_CLK_ARRAY 53 -#define CFG_GPIO_OP 54 -#define CFG_MAX 55 - - -#define MOVE_NEAR 0 -#define MOVE_FAR 1 - -#define SENSOR_PREVIEW_MODE 0 -#define SENSOR_SNAPSHOT_MODE 1 -#define SENSOR_RAW_SNAPSHOT_MODE 2 -#define SENSOR_HFR_60FPS_MODE 3 -#define SENSOR_HFR_90FPS_MODE 4 -#define SENSOR_HFR_120FPS_MODE 5 - -#define SENSOR_QTR_SIZE 0 -#define SENSOR_FULL_SIZE 1 -#define SENSOR_QVGA_SIZE 2 -#define SENSOR_INVALID_SIZE 3 - -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#define CAMERA_EFFECT_FADED 12 -#define CAMERA_EFFECT_VINTAGECOOL 13 -#define CAMERA_EFFECT_VINTAGEWARM 14 -#define CAMERA_EFFECT_ACCENT_BLUE 15 -#define CAMERA_EFFECT_ACCENT_GREEN 16 -#define CAMERA_EFFECT_ACCENT_ORANGE 17 -#define CAMERA_EFFECT_MAX 18 - -/* QRD */ -#define CAMERA_EFFECT_BW 10 -#define CAMERA_EFFECT_BLUISH 12 -#define CAMERA_EFFECT_REDDISH 13 -#define CAMERA_EFFECT_GREENISH 14 - -/* QRD */ -#define CAMERA_ANTIBANDING_OFF 0 -#define CAMERA_ANTIBANDING_50HZ 2 -#define CAMERA_ANTIBANDING_60HZ 1 -#define CAMERA_ANTIBANDING_AUTO 3 - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - -#define CAMERA_BRIGHTNESS_LV0 0 -#define CAMERA_BRIGHTNESS_LV1 1 -#define CAMERA_BRIGHTNESS_LV2 2 -#define CAMERA_BRIGHTNESS_LV3 3 -#define CAMERA_BRIGHTNESS_LV4 4 -#define CAMERA_BRIGHTNESS_LV5 5 -#define CAMERA_BRIGHTNESS_LV6 6 -#define CAMERA_BRIGHTNESS_LV7 7 -#define CAMERA_BRIGHTNESS_LV8 8 - - -#define CAMERA_SATURATION_LV0 0 -#define CAMERA_SATURATION_LV1 1 -#define CAMERA_SATURATION_LV2 2 -#define CAMERA_SATURATION_LV3 3 -#define CAMERA_SATURATION_LV4 4 -#define CAMERA_SATURATION_LV5 5 -#define CAMERA_SATURATION_LV6 6 -#define CAMERA_SATURATION_LV7 7 -#define CAMERA_SATURATION_LV8 8 - -#define CAMERA_SHARPNESS_LV0 0 -#define CAMERA_SHARPNESS_LV1 3 -#define CAMERA_SHARPNESS_LV2 6 -#define CAMERA_SHARPNESS_LV3 9 -#define CAMERA_SHARPNESS_LV4 12 -#define CAMERA_SHARPNESS_LV5 15 -#define CAMERA_SHARPNESS_LV6 18 -#define CAMERA_SHARPNESS_LV7 21 -#define CAMERA_SHARPNESS_LV8 24 -#define CAMERA_SHARPNESS_LV9 27 -#define CAMERA_SHARPNESS_LV10 30 - -#define CAMERA_SETAE_AVERAGE 0 -#define CAMERA_SETAE_CENWEIGHT 1 - -#define CAMERA_WB_AUTO 1 /* This list must match aeecamera.h */ -#define CAMERA_WB_CUSTOM 2 -#define CAMERA_WB_INCANDESCENT 3 -#define CAMERA_WB_FLUORESCENT 4 -#define CAMERA_WB_DAYLIGHT 5 -#define CAMERA_WB_CLOUDY_DAYLIGHT 6 -#define CAMERA_WB_TWILIGHT 7 -#define CAMERA_WB_SHADE 8 - -#define CAMERA_EXPOSURE_COMPENSATION_LV0 12 -#define CAMERA_EXPOSURE_COMPENSATION_LV1 6 -#define CAMERA_EXPOSURE_COMPENSATION_LV2 0 -#define CAMERA_EXPOSURE_COMPENSATION_LV3 -6 -#define CAMERA_EXPOSURE_COMPENSATION_LV4 -12 - -enum msm_v4l2_saturation_level { - MSM_V4L2_SATURATION_L0, - MSM_V4L2_SATURATION_L1, - MSM_V4L2_SATURATION_L2, - MSM_V4L2_SATURATION_L3, - MSM_V4L2_SATURATION_L4, - MSM_V4L2_SATURATION_L5, - MSM_V4L2_SATURATION_L6, - MSM_V4L2_SATURATION_L7, - MSM_V4L2_SATURATION_L8, - MSM_V4L2_SATURATION_L9, - MSM_V4L2_SATURATION_L10, -}; - -enum msm_v4l2_contrast_level { - MSM_V4L2_CONTRAST_L0, - MSM_V4L2_CONTRAST_L1, - MSM_V4L2_CONTRAST_L2, - MSM_V4L2_CONTRAST_L3, - MSM_V4L2_CONTRAST_L4, - MSM_V4L2_CONTRAST_L5, - MSM_V4L2_CONTRAST_L6, - MSM_V4L2_CONTRAST_L7, - MSM_V4L2_CONTRAST_L8, - MSM_V4L2_CONTRAST_L9, - MSM_V4L2_CONTRAST_L10, -}; - - -enum msm_v4l2_exposure_level { - MSM_V4L2_EXPOSURE_N2, - MSM_V4L2_EXPOSURE_N1, - MSM_V4L2_EXPOSURE_D, - MSM_V4L2_EXPOSURE_P1, - MSM_V4L2_EXPOSURE_P2, -}; - -enum msm_v4l2_sharpness_level { - MSM_V4L2_SHARPNESS_L0, - MSM_V4L2_SHARPNESS_L1, - MSM_V4L2_SHARPNESS_L2, - MSM_V4L2_SHARPNESS_L3, - MSM_V4L2_SHARPNESS_L4, - MSM_V4L2_SHARPNESS_L5, - MSM_V4L2_SHARPNESS_L6, -}; - -enum msm_v4l2_expo_metering_mode { - MSM_V4L2_EXP_FRAME_AVERAGE, - MSM_V4L2_EXP_CENTER_WEIGHTED, - MSM_V4L2_EXP_SPOT_METERING, -}; - -enum msm_v4l2_iso_mode { - MSM_V4L2_ISO_AUTO = 0, - MSM_V4L2_ISO_DEBLUR, - MSM_V4L2_ISO_100, - MSM_V4L2_ISO_200, - MSM_V4L2_ISO_400, - MSM_V4L2_ISO_800, - MSM_V4L2_ISO_1600, -}; - -enum msm_v4l2_wb_mode { - MSM_V4L2_WB_OFF, - MSM_V4L2_WB_AUTO , - MSM_V4L2_WB_CUSTOM, - MSM_V4L2_WB_INCANDESCENT, - MSM_V4L2_WB_FLUORESCENT, - MSM_V4L2_WB_DAYLIGHT, - MSM_V4L2_WB_CLOUDY_DAYLIGHT, -}; - -enum msm_v4l2_special_effect { - MSM_V4L2_EFFECT_OFF, - MSM_V4L2_EFFECT_MONO, - MSM_V4L2_EFFECT_NEGATIVE, - MSM_V4L2_EFFECT_SOLARIZE, - MSM_V4L2_EFFECT_SEPIA, - MSM_V4L2_EFFECT_POSTERAIZE, - MSM_V4L2_EFFECT_WHITEBOARD, - MSM_V4L2_EFFECT_BLACKBOARD, - MSM_V4L2_EFFECT_AQUA, - MSM_V4L2_EFFECT_EMBOSS, - MSM_V4L2_EFFECT_SKETCH, - MSM_V4L2_EFFECT_NEON, - MSM_V4L2_EFFECT_MAX, -}; - -enum msm_v4l2_power_line_frequency { - MSM_V4L2_POWER_LINE_OFF, - MSM_V4L2_POWER_LINE_60HZ, - MSM_V4L2_POWER_LINE_50HZ, - MSM_V4L2_POWER_LINE_AUTO, -}; - -#define CAMERA_ISO_TYPE_AUTO 0 -#define CAMEAR_ISO_TYPE_HJR 1 -#define CAMEAR_ISO_TYPE_100 2 -#define CAMERA_ISO_TYPE_200 3 -#define CAMERA_ISO_TYPE_400 4 -#define CAMEAR_ISO_TYPE_800 5 -#define CAMERA_ISO_TYPE_1600 6 - -struct sensor_pict_fps { - uint16_t prevfps; - uint16_t pictfps; -}; - -struct exp_gain_cfg { - uint16_t gain; - uint32_t line; -}; - -struct focus_cfg { - int32_t steps; - int dir; -}; - -struct fps_cfg { - uint16_t f_mult; - uint16_t fps_div; - uint32_t pict_fps_div; -}; -struct wb_info_cfg { - uint16_t red_gain; - uint16_t green_gain; - uint16_t blue_gain; -}; -struct sensor_3d_exp_cfg { - uint16_t gain; - uint32_t line; - uint16_t r_gain; - uint16_t b_gain; - uint16_t gr_gain; - uint16_t gb_gain; - uint16_t gain_adjust; -}; -struct sensor_3d_cali_data_t{ - unsigned char left_p_matrix[3][4][8]; - unsigned char right_p_matrix[3][4][8]; - unsigned char square_len[8]; - unsigned char focal_len[8]; - unsigned char pixel_pitch[8]; - uint16_t left_r; - uint16_t left_b; - uint16_t left_gb; - uint16_t left_af_far; - uint16_t left_af_mid; - uint16_t left_af_short; - uint16_t left_af_5um; - uint16_t left_af_50up; - uint16_t left_af_50down; - uint16_t right_r; - uint16_t right_b; - uint16_t right_gb; - uint16_t right_af_far; - uint16_t right_af_mid; - uint16_t right_af_short; - uint16_t right_af_5um; - uint16_t right_af_50up; - uint16_t right_af_50down; -}; -struct sensor_init_cfg { - uint8_t prev_res; - uint8_t pict_res; -}; - -struct sensor_calib_data { - /* Color Related Measurements */ - uint16_t r_over_g; - uint16_t b_over_g; - uint16_t gr_over_gb; - - /* Lens Related Measurements */ - uint16_t macro_2_inf; - uint16_t inf_2_macro; - uint16_t stroke_amt; - uint16_t af_pos_1m; - uint16_t af_pos_inf; -}; - -enum msm_sensor_resolution_t { - MSM_SENSOR_RES_FULL, - MSM_SENSOR_RES_QTR, - MSM_SENSOR_RES_2, - MSM_SENSOR_RES_3, - MSM_SENSOR_RES_4, - MSM_SENSOR_RES_5, - MSM_SENSOR_RES_6, - MSM_SENSOR_RES_7, - MSM_SENSOR_INVALID_RES, -}; - -struct msm_sensor_output_info_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; - uint32_t vt_pixel_clk; - uint32_t op_pixel_clk; - uint16_t binning_factor; -}; - -struct sensor_output_info_t { - struct msm_sensor_output_info_t *output_info; - uint16_t num_info; -}; - -struct msm_sensor_exp_gain_info_t { - uint16_t coarse_int_time_addr; - uint16_t global_gain_addr; - uint16_t vert_offset; -}; - -struct msm_sensor_output_reg_addr_t { - uint16_t x_output; - uint16_t y_output; - uint16_t line_length_pclk; - uint16_t frame_length_lines; -}; - -struct sensor_driver_params_type { - struct msm_camera_i2c_reg_setting *init_settings; - uint16_t init_settings_size; - struct msm_camera_i2c_reg_setting *mode_settings; - uint16_t mode_settings_size; - struct msm_sensor_output_reg_addr_t *sensor_output_reg_addr; - struct msm_camera_i2c_reg_setting *start_settings; - struct msm_camera_i2c_reg_setting *stop_settings; - struct msm_camera_i2c_reg_setting *groupon_settings; - struct msm_camera_i2c_reg_setting *groupoff_settings; - struct msm_sensor_exp_gain_info_t *sensor_exp_gain_info; - struct msm_sensor_output_info_t *output_info; -}; - -struct mirror_flip { - int32_t x_mirror; - int32_t y_flip; -}; - -struct cord { - uint32_t x; - uint32_t y; -}; - -struct msm_eeprom_data_t { - void *eeprom_data; - uint16_t index; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct csi_lane_params_t { - uint16_t csi_lane_assign; - uint8_t csi_lane_mask; - uint8_t csi_if; - uint8_t csid_core[2]; - uint8_t csi_phy_sel; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; -}; - -struct msm_camera_csi2_params { - struct msm_camera_csid_params csid_params; - struct msm_camera_csiphy_params csiphy_params; -}; - -enum msm_camera_csi_data_format { - CSI_8BIT, - CSI_10BIT, - CSI_12BIT, -}; - -struct msm_camera_csi_params { - enum msm_camera_csi_data_format data_format; - uint8_t lane_cnt; - uint8_t lane_assign; - uint8_t settle_cnt; - uint8_t dpcm_scheme; -}; - -enum csic_cfg_type_t { - CSIC_INIT, - CSIC_CFG, -}; - -struct csic_cfg_data { - enum csic_cfg_type_t cfgtype; - struct msm_camera_csi_params *csic_params; -}; - -enum csid_cfg_type_t { - CSID_INIT, - CSID_CFG, -}; - -struct csid_cfg_data { - enum csid_cfg_type_t cfgtype; - union { - uint32_t csid_version; - struct msm_camera_csid_params *csid_params; - } cfg; -}; - -enum csiphy_cfg_type_t { - CSIPHY_INIT, - CSIPHY_CFG, -}; - -struct csiphy_cfg_data { - enum csiphy_cfg_type_t cfgtype; - struct msm_camera_csiphy_params *csiphy_params; -}; - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - -#define ISPIF_STREAM(intf, action, vfe) (((intf)<> 24) : 0xFF) - -#define CLR_IMG_MODE(handle) (handle &= 0xFF00FFFF) -#define SET_IMG_MODE(handle, data) \ - (handle |= ((0x1 << 23) | ((data & 0x7F) << 16))) -#define GET_IMG_MODE(handle) \ - ((handle & 0x800000) ? ((handle & 0x7F0000) >> 16) : 0xFF) - -#define CLR_MCTLPP_INST_IDX(handle) (handle &= 0xFFFF00FF) -#define SET_MCTLPP_INST_IDX(handle, data) \ - (handle |= ((0x1 << 15) | ((data & 0x7F) << 8))) -#define GET_MCTLPP_INST_IDX(handle) \ - ((handle & 0x8000) ? ((handle & 0x7F00) >> 8) : 0xFF) - -#define CLR_VIDEO_INST_IDX(handle) (handle &= 0xFFFFFF00) -#define GET_VIDEO_INST_IDX(handle) \ - ((handle & 0x80) ? (handle & 0x7F) : 0xFF) -#define SET_VIDEO_INST_IDX(handle, data) \ - (handle |= (0x1 << 7) | (data & 0x7F)) - -#endif /* __UAPI_MSM_CAMERA_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/isp/Makefile deleted file mode 100644 index 218bd9b16b59..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_isp.o msm_buf_mgr.o msm_isp_util.o msm_isp_axi_util.o msm_isp_stats_util.o -obj-$(CONFIG_MSMB_CAMERA) += msm_isp44.o msm_isp40.o msm_isp32.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.c deleted file mode 100644 index 10d7aee23435..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.c +++ /dev/null @@ -1,962 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include "../include/media/msm_camera.h" -#include - -#include - -#include "msm.h" -#include "msm_buf_mgr.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_isp_bufq *msm_isp_get_bufq( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - uint32_t bufq_index = bufq_handle & 0xFF; - if (bufq_index > buf_mgr->num_buf_q) - return bufq; - - bufq = &buf_mgr->bufq[bufq_index]; - if (bufq->bufq_handle == bufq_handle) - return bufq; - - return NULL; -} - -static struct msm_isp_buffer *msm_isp_get_buf_ptr( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return buf_info; - } - - if (bufq->num_bufs <= buf_index) { - pr_err("%s: Invalid buf index\n", __func__); - return buf_info; - } - buf_info = &bufq->bufs[buf_index]; - return buf_info; -} - -static uint32_t msm_isp_get_buf_handle( - struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - if ((buf_mgr->buf_handle_cnt << 8) == 0) - buf_mgr->buf_handle_cnt++; - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) - return 0; - } - - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].bufq_handle == 0) { - memset(&buf_mgr->bufq[i], - 0, sizeof(struct msm_isp_bufq)); - buf_mgr->bufq[i].bufq_handle = - (++buf_mgr->buf_handle_cnt) << 8 | i; - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_free_buf_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = - msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) - return -EINVAL; - memset(bufq, 0, sizeof(struct msm_isp_bufq)); - return 0; -} - -static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info, - struct v4l2_buffer *v4l2_buf) -{ - int i, rc = -1; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < v4l2_buf->length; i++) { - mapped_info = &buf_info->mapped_info[i]; - mapped_info->handle = - ion_import_dma_buf(buf_mgr->client, - v4l2_buf->m.planes[i].m.userptr); - if (IS_ERR_OR_NULL(mapped_info->handle)) { - pr_err("%s: buf has null/error ION handle %pK\n", - __func__, mapped_info->handle); - goto ion_map_error; - } - if (ion_map_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0, SZ_4K, - 0, &(mapped_info->paddr), - &(mapped_info->len), 0, 0) < 0) { - rc = -EINVAL; - pr_err("%s: cannot map address", __func__); - ion_free(buf_mgr->client, mapped_info->handle); - goto ion_map_error; - } - mapped_info->paddr += v4l2_buf->m.planes[i].data_offset; - CDBG("%s: plane: %d addr:%lu\n", - __func__, i, (unsigned long int)(mapped_info->paddr)); - - buf_pending = kzalloc(sizeof(struct buffer_cmd), GFP_ATOMIC); - if (!buf_pending) { - pr_err("No free memory for buf_pending\n"); - return rc; - } - - buf_pending->mapped_info = mapped_info; - list_add_tail(&buf_pending->list, &buf_mgr->buffer_q); - } - buf_info->num_planes = v4l2_buf->length; - return 0; -ion_map_error: - for (--i; i >= 0; i--) { - mapped_info = &buf_info->mapped_info[i]; - ion_unmap_iommu(buf_mgr->client, mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - } - return rc; -} - -static void msm_isp_unprepare_v4l2_buf( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buffer *buf_info) -{ - int i; - struct msm_isp_buffer_mapped_info *mapped_info; - struct buffer_cmd *buf_pending = NULL; - - for (i = 0; i < buf_info->num_planes; i++) { - mapped_info = &buf_info->mapped_info[i]; - - list_for_each_entry(buf_pending, &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - - if (buf_pending->mapped_info == mapped_info) { - ion_unmap_iommu(buf_mgr->client, - mapped_info->handle, - buf_mgr->iommu_domain_num, 0); - ion_free(buf_mgr->client, mapped_info->handle); - - list_del_init(&buf_pending->list); - kfree(buf_pending); - break; - } - } - } - return; -} - -static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info, struct vb2_buffer *vb2_buf) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - struct v4l2_buffer *buf = NULL; - struct v4l2_plane *plane = NULL; - - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("Invalid buffer prepare\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_info->bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - rc = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - - if (buf_info->state != MSM_ISP_BUFFER_STATE_INITIALIZED) { - pr_err("%s: Invalid buffer state: %d\n", - __func__, buf_info->state); - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (vb2_buf) { - buf = &vb2_buf->v4l2_buf; - buf_info->vb2_buf = vb2_buf; - } else { - buf = &info->buffer; - plane = - kzalloc(sizeof(struct v4l2_plane) * buf->length, - GFP_KERNEL); - if (!plane) { - pr_err("%s: Cannot alloc plane: %d\n", - __func__, buf_info->state); - return rc; - } - if (copy_from_user(plane, - (void __user *)(buf->m.planes), - sizeof(struct v4l2_plane) * buf->length)) { - kfree(plane); - return rc; - } - buf->m.planes = plane; - } - - rc = msm_isp_prepare_v4l2_buf(buf_mgr, buf_info, buf); - if (rc < 0) { - pr_err("%s: Prepare buffer error\n", __func__); - kfree(plane); - return rc; - } - spin_lock_irqsave(&bufq->bufq_lock, flags); - buf_info->state = MSM_ISP_BUFFER_STATE_PREPARED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - kfree(plane); - return rc; -} - -static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, - uint32_t buf_handle) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - bufq = msm_isp_get_bufq(buf_mgr, buf_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, buf_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (buf_info->state == MSM_ISP_BUFFER_STATE_UNUSED || - buf_info->state == - MSM_ISP_BUFFER_STATE_INITIALIZED) - continue; - - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } - msm_isp_unprepare_v4l2_buf(buf_mgr, buf_info); - } - return 0; -} - -static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_buffer *temp_buf_info; - struct msm_isp_bufq *bufq = NULL; - struct vb2_buffer *vb2_buf = NULL; - struct buffer_cmd *buf_pending = NULL; - struct msm_isp_buffer_mapped_info *mped_info_tmp1; - struct msm_isp_buffer_mapped_info *mped_info_tmp2; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (!bufq->bufq_handle) { - pr_err("%s: Invalid bufq handle\n", __func__); - return rc; - } - - *buf_info = NULL; - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - list_for_each_entry(temp_buf_info, - &bufq->share_head, share_list) { - if (!temp_buf_info->buf_used[id]) { - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count++; - if (temp_buf_info->buf_get_count == - bufq->buf_client_count) - list_del_init( - &temp_buf_info->share_list); - if (temp_buf_info->buf_reuse_flag) { - kfree(temp_buf_info); - } else { - *buf_info = temp_buf_info; - rc = 0; - } - spin_unlock_irqrestore( - &bufq->bufq_lock, flags); - return rc; - } - } - } - - switch (BUF_SRC(bufq->stream_id)) { - case MSM_ISP_BUFFER_SRC_NATIVE: - list_for_each_entry(temp_buf_info, &bufq->head, list) { - if (temp_buf_info->state == - MSM_ISP_BUFFER_STATE_QUEUED) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &temp_buf_info->mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - /* found one buf */ - list_del_init( - &temp_buf_info->list); - *buf_info = temp_buf_info; - break; - } - } - break; - } - } - break; - case MSM_ISP_BUFFER_SRC_HAL: - vb2_buf = buf_mgr->vb2_ops->get_buf( - bufq->session_id, bufq->stream_id); - if (vb2_buf) { - if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { - - list_for_each_entry(buf_pending, - &buf_mgr->buffer_q, list) { - if (!buf_pending) - break; - mped_info_tmp1 = - buf_pending->mapped_info; - mped_info_tmp2 = - &bufq->bufs[vb2_buf->v4l2_buf.index] - .mapped_info[0]; - - if (mped_info_tmp1 == mped_info_tmp2 - && (mped_info_tmp1->len == - mped_info_tmp2->len) - && (mped_info_tmp1->paddr == - mped_info_tmp2->paddr)) { - *buf_info = - &bufq->bufs[vb2_buf->v4l2_buf.index]; - (*buf_info)->vb2_buf = vb2_buf; - break; - } - } - } else { - pr_err("%s: Incorrect buf index %d\n", - __func__, vb2_buf->v4l2_buf.index); - rc = -EINVAL; - } - } - break; - case MSM_ISP_BUFFER_SRC_SCRATCH: - /* In scratch buf case we have only on buffer in queue. - * We return every time same buffer. */ - *buf_info = list_entry(bufq->head.next, typeof(**buf_info), - list); - break; - default: - pr_err("%s: Incorrect buf source.\n", __func__); - rc = -EINVAL; - return rc; - } - - if (!(*buf_info)) { - if (bufq->buf_type == ISP_SHARE_BUF) { - temp_buf_info = kzalloc( - sizeof(struct msm_isp_buffer), GFP_ATOMIC); - if (temp_buf_info) { - temp_buf_info->buf_reuse_flag = 1; - temp_buf_info->buf_used[id] = 1; - temp_buf_info->buf_get_count = 1; - list_add_tail(&temp_buf_info->share_list, - &bufq->share_head); - } else - rc = -ENOMEM; - } - } else { - (*buf_info)->state = MSM_ISP_BUFFER_STATE_DEQUEUED; - if (bufq->buf_type == ISP_SHARE_BUF) { - memset((*buf_info)->buf_used, 0, - sizeof(uint8_t) * bufq->buf_client_count); - (*buf_info)->buf_used[id] = 1; - (*buf_info)->buf_get_count = 1; - (*buf_info)->buf_put_count = 0; - (*buf_info)->buf_reuse_flag = 0; - list_add_tail(&(*buf_info)->share_list, - &bufq->share_head); - } - rc = 0; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; -} - -static int msm_isp_put_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - switch (buf_info->state) { - case MSM_ISP_BUFFER_STATE_PREPARED: - if (MSM_ISP_BUFFER_SRC_SCRATCH == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - case MSM_ISP_BUFFER_STATE_DEQUEUED: - case MSM_ISP_BUFFER_STATE_DIVERTED: - if (MSM_ISP_BUFFER_SRC_NATIVE == BUF_SRC(bufq->stream_id)) - list_add_tail(&buf_info->list, &bufq->head); - else if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) - buf_mgr->vb2_ops->put_buf(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_DISPATCHED: - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - rc = 0; - break; - case MSM_ISP_BUFFER_STATE_QUEUED: - rc = 0; - break; - default: - pr_err("%s: incorrect state = %d", - __func__, buf_info->state); - break; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return rc; -} - -static int msm_isp_buf_done(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - enum msm_isp_buffer_state state; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - state = buf_info->state; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - if (state == MSM_ISP_BUFFER_STATE_DEQUEUED || - state == MSM_ISP_BUFFER_STATE_DIVERTED) { - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - buf_info->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - if (MSM_ISP_BUFFER_SRC_HAL == BUF_SRC(bufq->stream_id)) { - buf_info->vb2_buf->v4l2_buf.timestamp = *tv; - buf_info->vb2_buf->v4l2_buf.sequence = frame_id; - buf_info->vb2_buf->v4l2_buf.reserved = output_format; - buf_mgr->vb2_ops->buf_done(buf_info->vb2_buf, - bufq->session_id, bufq->stream_id); - } else { - rc = msm_isp_put_buf(buf_mgr, buf_info->bufq_handle, - buf_info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - - return 0; -} - -static int msm_isp_flush_buf(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type) -{ - int rc = -1, i; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - for (i = 0; i < bufq->num_bufs; i++) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, i); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - continue; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (flush_type == MSM_ISP_BUFFER_FLUSH_DIVERTED && - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } else if (flush_type == MSM_ISP_BUFFER_FLUSH_ALL && - (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED || - buf_info->state == MSM_ISP_BUFFER_STATE_DIVERTED || - buf_info->state == MSM_ISP_BUFFER_STATE_DISPATCHED)) { - buf_info->state = MSM_ISP_BUFFER_STATE_QUEUED; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - } - return 0; -} - -static int msm_isp_buf_divert(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id) -{ - int rc = -1; - unsigned long flags; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq\n"); - return rc; - } - - buf_info = msm_isp_get_buf_ptr(buf_mgr, bufq_handle, buf_index); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - - spin_lock_irqsave(&bufq->bufq_lock, flags); - if (bufq->buf_type == ISP_SHARE_BUF) { - buf_info->buf_put_count++; - if (buf_info->buf_put_count != ISP_SHARE_BUF_CLIENT) { - rc = buf_info->buf_put_count; - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - return rc; - } - } - - if (buf_info->state == MSM_ISP_BUFFER_STATE_DEQUEUED) { - buf_info->state = MSM_ISP_BUFFER_STATE_DIVERTED; - buf_info->tv = tv; - buf_info->frame_id = frame_id; - } - spin_unlock_irqrestore(&bufq->bufq_lock, flags); - - return 0; -} - -static int msm_isp_buf_enqueue(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info) -{ - int rc = -1, buf_state; - struct msm_isp_bufq *bufq = NULL; - struct msm_isp_buffer *buf_info = NULL; - buf_state = msm_isp_buf_prepare(buf_mgr, info, NULL); - if (buf_state < 0) { - pr_err("%s: Buf prepare failed\n", __func__); - return -EINVAL; - } - - if (buf_state == MSM_ISP_BUFFER_STATE_DIVERTED) { - buf_info = msm_isp_get_buf_ptr(buf_mgr, - info->handle, info->buf_idx); - if (!buf_info) { - pr_err("%s: buf not found\n", __func__); - return rc; - } - if (info->dirty_buf) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (BUF_SRC(bufq->stream_id)) - pr_err("%s: Invalid native buffer state\n", - __func__); - else - rc = msm_isp_buf_done(buf_mgr, - info->handle, info->buf_idx, - buf_info->tv, buf_info->frame_id, 0); - } - } else { - bufq = msm_isp_get_bufq(buf_mgr, info->handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return rc; - } - if (MSM_ISP_BUFFER_SRC_HAL != BUF_SRC(bufq->stream_id)) { - rc = msm_isp_put_buf(buf_mgr, - info->handle, info->buf_idx); - if (rc < 0) { - pr_err("%s: Buf put failed\n", __func__); - return rc; - } - } - } - return rc; -} - -static int msm_isp_get_bufq_handle(struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id) -{ - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - if (buf_mgr->bufq[i].session_id == session_id && - buf_mgr->bufq[i].stream_id == stream_id) { - return buf_mgr->bufq[i].bufq_handle; - } - } - return 0; -} - -static int msm_isp_get_buf_src(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src) -{ - struct msm_isp_bufq *bufq = NULL; - - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("%s: Invalid bufq\n", __func__); - return -EINVAL; - } - *buf_src = BUF_SRC(bufq->stream_id); - - return 0; -} - -static int msm_isp_request_bufq(struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request) -{ - int rc = -1, i; - struct msm_isp_bufq *bufq = NULL; - CDBG("%s: E\n", __func__); - - if (!buf_request->num_buf || buf_request->num_buf > VIDEO_MAX_FRAME) { - pr_err("Invalid buffer request\n"); - return rc; - } - - buf_request->handle = msm_isp_get_buf_handle(buf_mgr, - buf_request->session_id, buf_request->stream_id); - if (!buf_request->handle) { - pr_err("Invalid buffer handle\n"); - return rc; - } - - bufq = msm_isp_get_bufq(buf_mgr, buf_request->handle); - if (!bufq) { - pr_err("Invalid buffer queue\n"); - return rc; - } - - bufq->bufs = kzalloc(sizeof(struct msm_isp_buffer) * - buf_request->num_buf, GFP_KERNEL); - if (!bufq->bufs) { - pr_err("No free memory for buf info\n"); - msm_isp_free_buf_handle(buf_mgr, buf_request->handle); - return rc; - } - - spin_lock_init(&bufq->bufq_lock); - bufq->bufq_handle = buf_request->handle; - bufq->session_id = buf_request->session_id; - bufq->stream_id = buf_request->stream_id; - bufq->num_bufs = buf_request->num_buf; - bufq->buf_type = buf_request->buf_type; - if (bufq->buf_type == ISP_SHARE_BUF) - bufq->buf_client_count = ISP_SHARE_BUF_CLIENT; - INIT_LIST_HEAD(&bufq->head); - INIT_LIST_HEAD(&bufq->share_head); - for (i = 0; i < buf_request->num_buf; i++) { - bufq->bufs[i].state = MSM_ISP_BUFFER_STATE_INITIALIZED; - bufq->bufs[i].bufq_handle = bufq->bufq_handle; - bufq->bufs[i].buf_idx = i; - } - - return 0; -} - -static int msm_isp_release_bufq(struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle) -{ - struct msm_isp_bufq *bufq = NULL; - int rc = -1; - bufq = msm_isp_get_bufq(buf_mgr, bufq_handle); - if (!bufq) { - pr_err("Invalid bufq release\n"); - return rc; - } - - msm_isp_buf_unprepare(buf_mgr, bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq_handle); - return 0; -} - -static void msm_isp_release_all_bufq( - struct msm_isp_buf_mgr *buf_mgr) -{ - struct msm_isp_bufq *bufq = NULL; - int i; - for (i = 0; i < buf_mgr->num_buf_q; i++) { - bufq = &buf_mgr->bufq[i]; - if (!bufq->bufq_handle) - continue; - msm_isp_buf_unprepare(buf_mgr, bufq->bufq_handle); - - kfree(bufq->bufs); - msm_isp_free_buf_handle(buf_mgr, bufq->bufq_handle); - } -} - -static void msm_isp_register_ctx(struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx) -{ - int i; - buf_mgr->num_iommu_ctx = num_iommu_ctx; - for (i = 0; i < num_iommu_ctx; i++) - buf_mgr->iommu_ctx[i] = iommu_ctx[i]; -} - -static int msm_isp_attach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int rc, i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) { - rc = iommu_attach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); - if (rc) { - pr_err("%s: Iommu attach error\n", __func__); - return -EINVAL; - } - } - return 0; -} - -static void msm_isp_detach_ctx(struct msm_isp_buf_mgr *buf_mgr) -{ - int i; - for (i = 0; i < buf_mgr->num_iommu_ctx; i++) - iommu_detach_device(buf_mgr->iommu_domain, - buf_mgr->iommu_ctx[i]); -} - -static int msm_isp_init_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q) -{ - int rc = -1; - if (buf_mgr->open_count++) - return 0; - - if (!num_buf_q) { - pr_err("Invalid buffer queue number\n"); - return rc; - } - CDBG("%s: E\n", __func__); - - msm_isp_attach_ctx(buf_mgr); - INIT_LIST_HEAD(&buf_mgr->buffer_q); - buf_mgr->num_buf_q = num_buf_q; - buf_mgr->bufq = - kzalloc(sizeof(struct msm_isp_bufq) * num_buf_q, - GFP_KERNEL); - if (!buf_mgr->bufq) { - pr_err("Bufq malloc error\n"); - goto bufq_error; - } - buf_mgr->client = msm_ion_client_create(ctx_name); - buf_mgr->buf_handle_cnt = 0; - return 0; -bufq_error: - return rc; -} - -static int msm_isp_deinit_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr) -{ - if (--buf_mgr->open_count) - return 0; - msm_isp_release_all_bufq(buf_mgr); - ion_client_destroy(buf_mgr->client); - kfree(buf_mgr->bufq); - buf_mgr->num_buf_q = 0; - msm_isp_detach_ctx(buf_mgr); - return 0; -} - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg) -{ - switch (cmd) { - case VIDIOC_MSM_ISP_REQUEST_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->request_buf(buf_mgr, buf_req); - break; - } - case VIDIOC_MSM_ISP_ENQUEUE_BUF: { - struct msm_isp_qbuf_info *qbuf_info = arg; - buf_mgr->ops->enqueue_buf(buf_mgr, qbuf_info); - break; - } - case VIDIOC_MSM_ISP_RELEASE_BUF: { - struct msm_isp_buf_request *buf_req = arg; - buf_mgr->ops->release_buf(buf_mgr, buf_req->handle); - break; - } - } - return 0; -} - -static struct msm_isp_buf_ops isp_buf_ops = { - .request_buf = msm_isp_request_bufq, - .enqueue_buf = msm_isp_buf_enqueue, - .release_buf = msm_isp_release_bufq, - .get_bufq_handle = msm_isp_get_bufq_handle, - .get_buf_src = msm_isp_get_buf_src, - .get_buf = msm_isp_get_buf, - .put_buf = msm_isp_put_buf, - .flush_buf = msm_isp_flush_buf, - .buf_done = msm_isp_buf_done, - .buf_divert = msm_isp_buf_divert, - .register_ctx = msm_isp_register_ctx, - .buf_mgr_init = msm_isp_init_isp_buf_mgr, - .buf_mgr_deinit = msm_isp_deinit_isp_buf_mgr, -}; - -int msm_isp_create_isp_buf_mgr( - struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, - struct msm_iova_layout *iova_layout) -{ - int rc = 0; - if (buf_mgr->init_done) - return rc; - - buf_mgr->iommu_domain_num = msm_register_domain(iova_layout); - if (buf_mgr->iommu_domain_num < 0) { - pr_err("%s: Invalid iommu domain number\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->iommu_domain = msm_get_iommu_domain( - buf_mgr->iommu_domain_num); - if (!buf_mgr->iommu_domain) { - pr_err("%s: Invalid iommu domain\n", __func__); - rc = -1; - goto iommu_domain_error; - } - - buf_mgr->ops = &isp_buf_ops; - buf_mgr->vb2_ops = vb2_ops; - buf_mgr->init_done = 1; - buf_mgr->open_count = 0; - return 0; -iommu_domain_error: - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.h deleted file mode 100644 index b98067e44151..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_buf_mgr.h +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_ISP_BUF_H_ -#define _MSM_ISP_BUF_H_ - -#include "../include/media/msmb_isp.h" -#include -#include "msm_sd.h" - -/* Buffer type could be userspace / HAL. - * Userspase could provide native or scratch buffer. */ -#define BUF_SRC(id) ( \ - (id & ISP_SCRATCH_BUF_BIT) ? MSM_ISP_BUFFER_SRC_SCRATCH : \ - (id & ISP_NATIVE_BUF_BIT) ? MSM_ISP_BUFFER_SRC_NATIVE : \ - MSM_ISP_BUFFER_SRC_HAL) - -#define ISP_SHARE_BUF_CLIENT 2 - -struct msm_isp_buf_mgr; - -enum msm_isp_buffer_src_t { - MSM_ISP_BUFFER_SRC_HAL, - MSM_ISP_BUFFER_SRC_NATIVE, - MSM_ISP_BUFFER_SRC_SCRATCH, - MSM_ISP_BUFFER_SRC_MAX, -}; - -enum msm_isp_buffer_state { - MSM_ISP_BUFFER_STATE_UNUSED, /* not used */ - MSM_ISP_BUFFER_STATE_INITIALIZED, /* REQBUF done */ - MSM_ISP_BUFFER_STATE_PREPARED, /* BUF mapped */ - MSM_ISP_BUFFER_STATE_QUEUED, /* buf queued */ - MSM_ISP_BUFFER_STATE_DEQUEUED, /* in use in VFE */ - MSM_ISP_BUFFER_STATE_DIVERTED, /* Sent to other hardware*/ - MSM_ISP_BUFFER_STATE_DISPATCHED, /* Sent to HAL*/ -}; - -enum msm_isp_buffer_flush_t { - MSM_ISP_BUFFER_FLUSH_DIVERTED, - MSM_ISP_BUFFER_FLUSH_ALL, -}; - -struct msm_isp_buffer_mapped_info { - unsigned long len; - dma_addr_t paddr; - struct ion_handle *handle; -}; - -struct buffer_cmd { - struct list_head list; - struct msm_isp_buffer_mapped_info *mapped_info; -}; - -struct msm_isp_buffer { - /*Common Data structure*/ - int num_planes; - struct msm_isp_buffer_mapped_info mapped_info[VIDEO_MAX_PLANES]; - int buf_idx; - uint32_t bufq_handle; - uint32_t frame_id; - struct timeval *tv; - - /*Native buffer*/ - struct list_head list; - enum msm_isp_buffer_state state; - - /*Vb2 buffer data*/ - struct vb2_buffer *vb2_buf; - - /*Share buffer cache state*/ - struct list_head share_list; - uint8_t buf_used[ISP_SHARE_BUF_CLIENT]; - uint8_t buf_get_count; - uint8_t buf_put_count; - uint8_t buf_reuse_flag; -}; - -struct msm_isp_bufq { - uint32_t session_id; - uint32_t stream_id; - uint32_t num_bufs; - uint32_t bufq_handle; - enum msm_isp_buf_type buf_type; - struct msm_isp_buffer *bufs; - spinlock_t bufq_lock; - - /*Native buffer queue*/ - struct list_head head; - /*Share buffer cache queue*/ - struct list_head share_head; - uint8_t buf_client_count; -}; - -struct msm_isp_buf_ops { - int (*request_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_buf_request *buf_request); - - int (*enqueue_buf) (struct msm_isp_buf_mgr *buf_mgr, - struct msm_isp_qbuf_info *info); - - int (*release_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle); - - int (*get_bufq_handle) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t session_id, uint32_t stream_id); - - int (*get_buf_src) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t *buf_src); - - int (*get_buf) (struct msm_isp_buf_mgr *buf_mgr, uint32_t id, - uint32_t bufq_handle, struct msm_isp_buffer **buf_info); - - int (*put_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index); - - int (*flush_buf) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, enum msm_isp_buffer_flush_t flush_type); - - int (*buf_done) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id, uint32_t output_format); - int (*buf_divert) (struct msm_isp_buf_mgr *buf_mgr, - uint32_t bufq_handle, uint32_t buf_index, - struct timeval *tv, uint32_t frame_id); - void (*register_ctx) (struct msm_isp_buf_mgr *buf_mgr, - struct device **iommu_ctx, int num_iommu_ctx); - int (*buf_mgr_init) (struct msm_isp_buf_mgr *buf_mgr, - const char *ctx_name, uint16_t num_buf_q); - int (*buf_mgr_deinit) (struct msm_isp_buf_mgr *buf_mgr); -}; - -struct msm_isp_buf_mgr { - int init_done; - uint32_t open_count; - spinlock_t lock; - uint16_t num_buf_q; - struct msm_isp_bufq *bufq; - - struct ion_client *client; - struct msm_isp_buf_ops *ops; - uint32_t buf_handle_cnt; - - struct msm_sd_req_vb2_q *vb2_ops; - - /*IOMMU specific*/ - int iommu_domain_num; - struct iommu_domain *iommu_domain; - - int num_iommu_ctx; - struct device *iommu_ctx[2]; - struct list_head buffer_q; -}; - -int msm_isp_create_isp_buf_mgr(struct msm_isp_buf_mgr *buf_mgr, - struct msm_sd_req_vb2_q *vb2_ops, struct msm_iova_layout *iova_layout); - -int msm_isp_proc_buf_cmd(struct msm_isp_buf_mgr *buf_mgr, - unsigned int cmd, void *arg); - -#endif /* _MSM_ISP_BUF_H_ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.c deleted file mode 100644 index f2586f872f80..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.c +++ /dev/null @@ -1,317 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_isp.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_sd.h" -#include "msm_isp44.h" -#include "msm_isp40.h" -#include "msm_isp32.h" - -static struct msm_sd_req_vb2_q vfe_vb2_ops; - -static const struct of_device_id msm_vfe_dt_match[] = { - { - .compatible = "qcom,vfe44", - .data = &vfe44_hw_info, - }, - { - .compatible = "qcom,vfe40", - .data = &vfe40_hw_info, - }, - { - .compatible = "qcom,vfe32", - .data = &vfe32_hw_info, - }, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_vfe_dt_match); - -static const struct platform_device_id msm_vfe_dev_id[] = { - {"msm_vfe32", (kernel_ulong_t) &vfe32_hw_info}, - {} -}; - -#define MAX_OVERFLOW_COUNTERS 15 -#define OVERFLOW_LENGTH 512 -#define OVERFLOW_BUFFER_LENGTH 32 -static struct msm_isp_buf_mgr vfe_buf_mgr; -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats); -static char *stats_str[MAX_OVERFLOW_COUNTERS] = { - "imgmaster0_overflow_cnt", - "imgmaster1_overflow_cnt", - "imgmaster2_overflow_cnt", - "imgmaster3_overflow_cnt", - "imgmaster4_overflow_cnt", - "imgmaster5_overflow_cnt", - "imgmaster6_overflow_cnt", - "be_overflow_cnt", - "bg_overflow_cnt", - "bf_overflow_cnt", - "awb_overflow_cnt", - "rs_overflow_cnt", - "cs_overflow_cnt", - "ihist_overflow_cnt", - "skinbhist_overflow_cnt", -}; - -static int vfe_debugfs_statistics_open(struct inode *inode, struct file *file) -{ - file->private_data = inode->i_private; - return 0; -} - -static ssize_t vfe_debugfs_statistics_read(struct file *t_file, char *t_char, - size_t t_size_t, loff_t *t_loff_t) -{ - int i; - char name[OVERFLOW_LENGTH] = {0}; - int *ptr; - char buffer[OVERFLOW_BUFFER_LENGTH] = {0}; - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - ptr = (int *)stats; - - for (i = 0; i < MAX_OVERFLOW_COUNTERS; i++) { - strlcat(name, stats_str[i], sizeof(name)); - strlcat(name, " ", sizeof(name)); - snprintf(buffer, sizeof(buffer), "%d", ptr[i]); - strlcat(name, buffer, sizeof(name)); - strlcat(name, "\r\n", sizeof(name)); - } - return simple_read_from_buffer(t_char, t_size_t, - t_loff_t, name, strlen(name)); -} - -static ssize_t vfe_debugfs_statistics_write(struct file *t_file, - const char *t_char, size_t t_size_t, loff_t *t_loff_t) -{ - struct msm_isp_statistics *stats = (struct msm_isp_statistics *) - t_file->private_data; - memset(stats, 0, sizeof(struct msm_isp_statistics)); - - return sizeof(struct msm_isp_statistics); -} - -static const struct file_operations vfe_debugfs_error = { - .open = vfe_debugfs_statistics_open, - .read = vfe_debugfs_statistics_read, - .write = vfe_debugfs_statistics_write, -}; - -static int msm_isp_enable_debugfs(struct msm_isp_statistics *stats) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_isp", NULL); - if (!debugfs_base) - return -ENOMEM; - if (!debugfs_create_file("stats", S_IRUGO | S_IWUSR, debugfs_base, - stats, &vfe_debugfs_error)) - return -ENOMEM; - return 0; -} -static long msm_isp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } -} - -static long msm_isp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_isp_subdev_do_ioctl); -} - -static struct v4l2_file_operations msm_isp_v4l2_subdev_fops = { -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_isp_subdev_fops_ioctl, -#endif - .unlocked_ioctl = msm_isp_subdev_fops_ioctl -}; - -static int vfe_probe(struct platform_device *pdev) -{ - struct vfe_device *vfe_dev; - /*struct msm_cam_subdev_info sd_info;*/ - const struct of_device_id *match_dev; - int rc = 0; - - struct msm_iova_partition vfe_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vfe_layout = { - .partitions = &vfe_partition, - .npartitions = 1, - .client_name = "vfe", - .domain_flags = 0, - }; - - vfe_dev = kzalloc(sizeof(struct vfe_device), GFP_KERNEL); - if (!vfe_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - vfe_dev->stats = kzalloc(sizeof(struct msm_isp_statistics), GFP_KERNEL); - if (!vfe_dev->stats) { - pr_err("%s: no enough memory\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - match_dev = of_match_device(msm_vfe_dt_match, &pdev->dev); - if (!match_dev) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - vfe_dev->hw_info = - (struct msm_vfe_hardware_info *) match_dev->data; - } else { - vfe_dev->hw_info = (struct msm_vfe_hardware_info *) - platform_get_device_id(pdev)->driver_data; - } - - if (!vfe_dev->hw_info) { - pr_err("%s: No vfe hardware info\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - ISP_DBG("%s: device id = %d\n", __func__, pdev->id); - - vfe_dev->pdev = pdev; - rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); - if (rc < 0) { - pr_err("%s: failed to get platform resources\n", __func__); - kfree(vfe_dev); - return -ENOMEM; - } - - INIT_LIST_HEAD(&vfe_dev->tasklet_q); - tasklet_init(&vfe_dev->vfe_tasklet, - msm_isp_do_tasklet, (unsigned long)vfe_dev); - - v4l2_subdev_init(&vfe_dev->subdev.sd, vfe_dev->hw_info->subdev_ops); - vfe_dev->subdev.sd.internal_ops = - vfe_dev->hw_info->subdev_internal_ops; - snprintf(vfe_dev->subdev.sd.name, - ARRAY_SIZE(vfe_dev->subdev.sd.name), - "vfe"); - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vfe_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vfe_dev->subdev.sd, vfe_dev); - platform_set_drvdata(pdev, &vfe_dev->subdev.sd); - mutex_init(&vfe_dev->realtime_mutex); - mutex_init(&vfe_dev->core_mutex); - spin_lock_init(&vfe_dev->tasklet_lock); - spin_lock_init(&vfe_dev->shared_data_lock); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spin_lock_init(&vfe_dev->sof_lock); -#endif - media_entity_init(&vfe_dev->subdev.sd.entity, 0, NULL, 0); - vfe_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vfe_dev->subdev.sd.entity.group_id = MSM_CAMERA_SUBDEV_VFE; - vfe_dev->subdev.sd.entity.name = pdev->name; - vfe_dev->subdev.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x2; - rc = msm_sd_register(&vfe_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - kfree(vfe_dev); - goto end; - } - - msm_isp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_isp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_isp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_isp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vfe_dev->subdev.sd.devnode->fops = &msm_isp_v4l2_subdev_fops; - - vfe_dev->buf_mgr = &vfe_buf_mgr; - v4l2_subdev_notify(&vfe_dev->subdev.sd, - MSM_SD_NOTIFY_REQ_CB, &vfe_vb2_ops); - rc = msm_isp_create_isp_buf_mgr(vfe_dev->buf_mgr, - &vfe_vb2_ops, &vfe_layout); - if (rc < 0) { - pr_err("%s: Unable to create buffer manager\n", __func__); - kfree(vfe_dev); - return -EINVAL; - } - msm_isp_enable_debugfs(vfe_dev->stats); - vfe_dev->buf_mgr->ops->register_ctx(vfe_dev->buf_mgr, - &vfe_dev->iommu_ctx[0], vfe_dev->hw_info->num_iommu_ctx); - vfe_dev->vfe_open_cnt = 0; -end: - return rc; -} - -static struct platform_driver vfe_driver = { - .probe = vfe_probe, - .driver = { - .name = "msm_vfe", - .owner = THIS_MODULE, - .of_match_table = msm_vfe_dt_match, - }, - .id_table = msm_vfe_dev_id, -}; - -static int __init msm_vfe_init_module(void) -{ - return platform_driver_register(&vfe_driver); -} - -static void __exit msm_vfe_exit_module(void) -{ - platform_driver_unregister(&vfe_driver); -} - -module_init(msm_vfe_init_module); -module_exit(msm_vfe_exit_module); -MODULE_DESCRIPTION("MSM VFE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.h deleted file mode 100644 index 524fd3f2ec91..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp.h +++ /dev/null @@ -1,541 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VFE_H__ -#define __MSM_VFE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "../media/msmb_isp.h" -#include -#include -#include "msm_buf_mgr.h" - -#define VFE40_8974V1_VERSION 0x10000018 -#define VFE40_8974V2_VERSION 0x1001001A -#define VFE40_8974V3_VERSION 0x1001001B -#define VFE40_8x26_VERSION 0x20000013 -#define VFE40_8x26V2_VERSION 0x20010014 -#define VFE40_8916_VERSION 0x10030000 -#define VFE40_8939_VERSION 0x10040000 - -#define MAX_IOMMU_CTX 2 -#define MAX_NUM_WM 7 -#define MAX_NUM_RDI 3 -#define MAX_NUM_RDI_MASTER 3 -#define MAX_NUM_COMPOSITE_MASK 4 -#define MAX_NUM_STATS_COMP_MASK 2 -#define MAX_INIT_FRAME_DROP 31 -#define ISP_Q2 (1 << 2) - -#define AVTIMER_MSW_PHY_ADDR 0xFE05300C -#define AVTIMER_LSW_PHY_ADDR 0xFE053008 -#define AVTIMER_MSW_PHY_ADDR_8916 0x7706010 -#define AVTIMER_LSW_PHY_ADDR_8916 0x770600C -#define AVTIMER_MODE_CTL_PHY_ADDR_8916 0x7706040 -/*AVTimer h/w is configured to generate 27Mhz ticks*/ -#define AVTIMER_TICK_SCALER_8916 27 -#define AVTIMER_ITERATION_CTR 16 - -#define VFE_PING_FLAG 0xFFFFFFFF -#define VFE_PONG_FLAG 0x0 - -#define VFE_MAX_CFG_TIMEOUT 3000 -#define VFE_CLK_INFO_MAX 16 -#define STATS_COMP_BIT_MASK 0xFF0000 - -struct vfe_device; -struct msm_vfe_axi_stream; -struct msm_vfe_stats_stream; - -struct vfe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum msm_isp_pack_fmt { - QCOM, - MIPI, - DPCM6, - DPCM8, - PLAIN8, - PLAIN16, - MAX_ISP_PACK_FMT, -}; - -enum msm_isp_camif_update_state { - NO_UPDATE, - ENABLE_CAMIF, - DISABLE_CAMIF, - DISABLE_CAMIF_IMMEDIATELY -}; - -enum msm_isp_reset_type { - ISP_RST_HARD, - ISP_RST_SOFT, - ISP_RST_MAX -}; - -struct msm_isp_timestamp { - /*Monotonic clock for v4l2 buffer*/ - struct timeval buf_time; - /*Monotonic clock for VT */ - struct timeval vt_time; - /*Wall clock for userspace event*/ - struct timeval event_time; -}; - -struct msm_vfe_irq_ops { - void (*read_irq_status) (struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1); - void (*process_reg_update) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_epoch_irq)(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_reset_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_halt_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1); - void (*process_camif_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_axi_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); - void (*process_stats_irq) (struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -}; - -struct msm_vfe_axi_ops { - void (*reload_wm) (struct vfe_device *vfe_dev, - uint32_t reload_mask); - void (*enable_wm) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable); - int32_t (*cfg_io_format) (struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, - uint32_t io_format); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_comp_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx); - void (*clear_wm_xbar_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); - long (*halt) (struct vfe_device *vfe_dev, uint32_t blocking); -}; - -struct msm_vfe_core_ops { - void (*reg_update) (struct vfe_device *vfe_dev, uint32_t input_src); - long (*reset_hw) (struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, - uint32_t blocking); - int (*init_hw) (struct vfe_device *vfe_dev); - void (*init_hw_reg) (struct vfe_device *vfe_dev); - void (*release_hw) (struct vfe_device *vfe_dev); - void (*cfg_camif) (struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg); - void (*update_camif_state) (struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state); - void (*cfg_rdi_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src); - int (*get_platform_data) (struct vfe_device *vfe_dev); - void (*get_error_mask) (uint32_t *error_mask0, uint32_t *error_mask1); - void (*process_error_status) (struct vfe_device *vfe_dev); - void (*get_overflow_mask) (uint32_t *overflow_mask); - void (*get_irq_mask) (struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask); - void (*restore_irq_mask) (struct vfe_device *vfe_dev); - void (*get_halt_restart_mask) (uint32_t *irq0_mask, - uint32_t *irq1_mask); - void (*init_vbif_counters) (struct vfe_device *vfe_dev); - void (*vbif_clear_counters) (struct vfe_device *vfe_dev); - void (*vbif_read_counters) (struct vfe_device *vfe_dev); -}; -struct msm_vfe_stats_ops { - int (*get_stats_idx) (enum msm_isp_stats_type stats_type); - int (*check_streams) (struct msm_vfe_stats_stream *stream_info); - void (*cfg_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_framedrop) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*cfg_comp_mask) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - void (*cfg_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_irq_mask) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - void (*clear_wm_reg) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info); - - void (*cfg_ub) (struct vfe_device *vfe_dev); - - void (*enable_module) (struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable); - - void (*update_ping_pong_addr) (struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr); - - uint32_t (*get_frame_id) (struct vfe_device *vfe_dev); - uint32_t (*get_wm_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_comp_mask) (uint32_t irq_status0, uint32_t irq_status1); - uint32_t (*get_pingpong_status) (struct vfe_device *vfe_dev); -}; - -struct msm_vfe_ops { - struct msm_vfe_irq_ops irq_ops; - struct msm_vfe_axi_ops axi_ops; - struct msm_vfe_core_ops core_ops; - struct msm_vfe_stats_ops stats_ops; -}; - -struct msm_vfe_hardware_info { - int num_iommu_ctx; - int vfe_clk_idx; - struct msm_vfe_ops vfe_ops; - struct msm_vfe_axi_hardware_info *axi_hw_info; - struct msm_vfe_stats_hardware_info *stats_hw_info; - struct v4l2_subdev_internal_ops *subdev_internal_ops; - struct v4l2_subdev_ops *subdev_ops; - uint32_t dmi_reg_offset; -}; - -struct msm_vfe_axi_hardware_info { - uint8_t num_wm; - uint8_t num_rdi; - uint8_t num_rdi_master; - uint8_t num_comp_mask; - uint32_t min_wm_ub; -}; - -enum msm_vfe_axi_state { - AVALIABLE, - INACTIVE, - ACTIVE, - PAUSED, - START_PENDING, - STOP_PENDING, - PAUSE_PENDING, - RESUME_PENDING, - STARTING, - STOPPING, - PAUSING, - RESUMING, -}; - -enum msm_vfe_axi_cfg_update_state { - NO_AXI_CFG_UPDATE, - APPLYING_UPDATE_RESUME, - UPDATE_REQUESTED, -}; - -#define VFE_NO_DROP 0xFFFFFFFF -#define VFE_DROP_EVERY_2FRAME 0x55555555 -#define VFE_DROP_EVERY_4FRAME 0x11111111 -#define VFE_DROP_EVERY_8FRAME 0x01010101 -#define VFE_DROP_EVERY_16FRAME 0x00010001 -#define VFE_DROP_EVERY_32FRAME 0x00000001 - -enum msm_vfe_axi_stream_type { - CONTINUOUS_STREAM, - BURST_STREAM, -}; - -struct msm_vfe_axi_stream { - uint32_t frame_id; - enum msm_vfe_axi_state state; - enum msm_vfe_axi_stream_src stream_src; - uint8_t num_planes; - uint8_t wm[MAX_PLANES_PER_STREAM]; - uint32_t output_format;/*Planar/RAW/Misc*/ - struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM]; - uint8_t comp_mask_index; - struct msm_isp_buffer *buf[2]; - uint32_t session_id; - uint32_t stream_id; - uint32_t bufq_handle; - uint32_t bufq_scratch_handle; - uint32_t stream_handle; - uint32_t request_frm_num; - uint8_t buf_divert; - enum msm_vfe_axi_stream_type stream_type; - uint32_t vt_enable; - uint32_t frame_based; - uint32_t framedrop_period; - uint32_t framedrop_pattern; - uint32_t num_burst_capture;/*number of frame to capture*/ - uint32_t init_frame_drop; - uint32_t burst_frame_count;/*number of sof before burst stop*/ - uint8_t framedrop_update; - spinlock_t lock; - - /*Bandwidth calculation info*/ - uint32_t max_width; - /*Based on format plane size in Q2. e.g NV12 = 1.5*/ - uint32_t format_factor; - uint32_t bandwidth; - - /*Run time update variables*/ - uint32_t runtime_init_frame_drop; - uint32_t runtime_burst_frame_count;/*number of sof before burst stop*/ - uint32_t runtime_num_burst_capture; - uint8_t runtime_framedrop_update; - uint32_t runtime_output_format; - enum msm_vfe_frame_skip_pattern frame_skip_pattern; - -}; - -enum msm_vfe_overflow_state { - NO_OVERFLOW, - OVERFLOW_DETECTED, - HALT_REQUESTED, - RESTART_REQUESTED, -}; - -struct msm_vfe_axi_composite_info { - uint32_t stream_handle; - uint32_t stream_composite_mask; -}; - -struct msm_vfe_src_info { - uint32_t frame_id; - uint8_t active; - uint8_t pix_stream_count; - uint8_t raw_stream_count; - enum msm_vfe_inputmux input_mux; - uint32_t width; - long pixel_clock; - uint32_t session_id; - uint32_t input_format;/*V4L2 pix format with bayer pattern*/ - uint32_t last_updt_frm_id; -}; - -enum msm_wm_ub_cfg_type { - MSM_WM_UB_CFG_DEFAULT, - MSM_WM_UB_EQUAL_SLICING, - MSM_WM_UB_CFG_MAX_NUM -}; -#define MAX_SESSIONS 5 -struct msm_vfe_axi_shared_data { - struct msm_vfe_axi_hardware_info *hw_info; - struct msm_vfe_axi_stream stream_info[MAX_NUM_STREAM]; - uint32_t free_wm[MAX_NUM_WM]; - uint32_t wm_image_size[MAX_NUM_WM]; - enum msm_wm_ub_cfg_type wm_ub_cfg_policy; - uint8_t num_used_wm; - uint8_t num_active_stream; - struct msm_vfe_axi_composite_info - composite_info[MAX_NUM_COMPOSITE_MASK]; - uint8_t num_used_composite_mask; - uint32_t stream_update; - atomic_t axi_cfg_update; - enum msm_isp_camif_update_state pipeline_update; - struct msm_vfe_src_info src_info[VFE_SRC_MAX]; - uint16_t stream_handle_cnt; - uint16_t current_frame_src_mask[MAX_SESSIONS]; - uint16_t session_frame_src_mask[MAX_SESSIONS]; - unsigned int frame_id[MAX_SESSIONS]; - uint32_t event_mask; - uint32_t burst_len; -}; - -struct msm_vfe_stats_hardware_info { - uint32_t stats_capability_mask; - uint8_t *stats_ping_pong_offset; - uint8_t num_stats_type; - uint8_t num_stats_comp_mask; -}; - -enum msm_vfe_stats_state { - STATS_AVALIABLE, - STATS_INACTIVE, - STATS_ACTIVE, - STATS_START_PENDING, - STATS_STOP_PENDING, - STATS_STARTING, - STATS_STOPPING, -}; - -struct msm_vfe_stats_stream { - uint32_t session_id; - uint32_t stream_id; - uint32_t stream_handle; - uint32_t composite_flag; - enum msm_isp_stats_type stats_type; - enum msm_vfe_stats_state state; - uint32_t framedrop_pattern; - uint32_t framedrop_period; - uint32_t irq_subsample_pattern; - - uint32_t buffer_offset; - struct msm_isp_buffer *buf[2]; - uint32_t bufq_handle; -}; - -struct msm_vfe_stats_shared_data { - struct msm_vfe_stats_stream stream_info[MSM_ISP_STATS_MAX]; - uint8_t num_active_stream; - atomic_t stats_comp_mask[MAX_NUM_STATS_COMP_MASK]; - uint16_t stream_handle_cnt; - atomic_t stats_update; - uint32_t stats_mask; - uint32_t stats_burst_len; -}; - -struct msm_vfe_tasklet_queue_cmd { - struct list_head list; - uint32_t vfeInterruptStatus0; - uint32_t vfeInterruptStatus1; - struct msm_isp_timestamp ts; - uint8_t cmd_used; -}; - -#define MSM_VFE_TASKLETQ_SIZE 200 - -struct msm_vfe_error_info { - atomic_t overflow_state; - uint32_t overflow_recover_irq_mask0; - uint32_t overflow_recover_irq_mask1; - uint32_t error_mask0; - uint32_t error_mask1; - uint32_t violation_status; - uint32_t camif_status; - uint32_t stream_framedrop_count[MAX_NUM_STREAM]; - uint32_t stats_framedrop_count[MSM_ISP_STATS_MAX]; - uint32_t info_dump_frame_count; - uint32_t error_count; -}; - -struct msm_isp_statistics { - int32_t imagemaster0_overflow; - int32_t imagemaster1_overflow; - int32_t imagemaster2_overflow; - int32_t imagemaster3_overflow; - int32_t imagemaster4_overflow; - int32_t imagemaster5_overflow; - int32_t imagemaster6_overflow; - int32_t be_overflow; - int32_t bg_overflow; - int32_t bf_overflow; - int32_t awb_overflow; - int32_t rs_overflow; - int32_t cs_overflow; - int32_t ihist_overflow; - int32_t skinbhist_overflow; -}; - -struct msm_vbif_cntrs { - int previous_write_val; - int vfe_total_iter; - int fb_err_lvl; - int total_vbif_cnt_2; -}; - -struct vfe_device { - struct platform_device *pdev; - struct msm_sd_subdev subdev; - struct resource *vfe_irq; - struct resource *vfe_mem; - struct resource *vfe_vbif_mem; - struct resource *vfe_io; - struct resource *vfe_vbif_io; - void __iomem *vfe_base; - void __iomem *vfe_vbif_base; - - struct device *iommu_ctx[MAX_IOMMU_CTX]; - - struct regulator *fs_vfe; - struct clk **vfe_clk; - uint32_t num_clk; - - uint32_t bus_perf_client; - - struct completion reset_complete; - struct completion halt_complete; - struct completion stream_config_complete; - struct completion stats_config_complete; - struct mutex realtime_mutex; - struct mutex core_mutex; - - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - spinlock_t shared_data_lock; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - spinlock_t sof_lock; -#endif - struct list_head tasklet_q; - struct tasklet_struct vfe_tasklet; - struct msm_vfe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VFE_TASKLETQ_SIZE]; - uint32_t vfe_hw_version; - struct msm_vfe_hardware_info *hw_info; - struct msm_vfe_axi_shared_data axi_data; - struct msm_vfe_stats_shared_data stats_data; - struct msm_vfe_error_info error_info; - struct msm_isp_buf_mgr *buf_mgr; - int dump_reg; - int vfe_clk_idx; - uint32_t vfe_open_cnt; - uint8_t vt_enable; - void __iomem *p_avtimer_msw; - void __iomem *p_avtimer_lsw; - void __iomem *p_avtimer_ctl; - uint8_t avtimer_scaler; - uint8_t ignore_error; - struct msm_isp_statistics *stats; - struct msm_vbif_cntrs vbif_cntrs; - uint32_t vfe_ub_size; - uint32_t frame_id; - uint32_t eof_event_occur; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.c deleted file mode 100644 index 55cc514cf8a9..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.c +++ /dev/null @@ -1,1353 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp32.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#define VFE32_BURST_LEN 2 -#define VFE32_UB_SIZE 1024 -#define VFE32_EQUAL_SLICE_UB 194 -#define VFE32_AXI_SLICE_UB 792 -#define VFE32_WM_BASE(idx) (0x4C + 0x18 * idx) -#define VFE32_RDI_BASE(idx) (idx ? 0x734 + 0x4 * (idx - 1) : 0x06FC) -#define VFE32_XBAR_BASE(idx) (0x40 + 0x4 * (idx / 4)) -#define VFE32_XBAR_SHIFT(idx) ((idx % 4) * 8) -#define VFE32_PING_PONG_BASE(wm, ping_pong) \ - (VFE32_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13}; - -#define VFE32_NUM_STATS_TYPE 7 -#define VFE32_STATS_BASE(idx) (0xF4 + 0xC * idx) -#define VFE32_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE32_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE32_CLK_IDX 0 -#define MSM_ISP32_TOTAL_WM_UB 792 -/*792 double word*/ - -static struct msm_cam_clk_info msm_vfe32_1_clk_info[] = { - /*vfe32 clock info for B-family: 8610 */ - {"vfe_clk_src", 266670000}, - {"vfe_clk", -1}, - {"vfe_ahb_clk", -1}, - {"csi_vfe_clk", -1}, - {"bus_clk", -1}, -}; - -static struct msm_cam_clk_info msm_vfe32_2_clk_info[] = { - /*vfe32 clock info for A-family: 8960 */ - {"vfe_clk", 266667000}, - {"vfe_pclk", -1}, - {"csi_vfe_clk", -1}, -}; - -static int msm_vfe32_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - vfe_dev->vfe_clk_idx = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe32_1_clk_info, - vfe_dev->vfe_clk, ARRAY_SIZE(msm_vfe32_1_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 1); - if (rc < 0) - goto clk_enable_failed; - else - vfe_dev->vfe_clk_idx = 2; - } else - vfe_dev->vfe_clk_idx = 1; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe32_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_base); - if (vfe_dev->vfe_clk_idx == 1) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_1_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_1_clk_info), 0); - if (vfe_dev->vfe_clk_idx == 2) - msm_cam_clk_enable(&vfe_dev->pdev->dev, - msm_vfe32_2_clk_info, vfe_dev->vfe_clk, - ARRAY_SIZE(msm_vfe32_2_clk_info), 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe32_init_hardware_reg(struct vfe_device *vfe_dev) -{ - /* CGC_OVERRIDE */ - msm_camera_io_w(0x07FFFFFF, vfe_dev->vfe_base + 0xC); - /* BUS_CFG */ - msm_camera_io_w(0x00000009, vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(0x01000025, vfe_dev->vfe_base + 0x1C); - msm_camera_io_w_mb(0x1CFFFFFF, vfe_dev->vfe_base + 0x20); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(0x1FFFFFFF, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x0, vfe_dev->vfe_base+0x6FC); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(1)); - msm_camera_io_w(0x10000000, vfe_dev->vfe_base + VFE32_RDI_BASE(2)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(0)); - msm_camera_io_w(0x0, vfe_dev->vfe_base + VFE32_XBAR_BASE(4)); - -} - -static void msm_vfe32_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & BIT(23)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe32_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 24)) { - msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - } -} - -static void msm_vfe32_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x18)) - return; - if (irq_status0 & (1 << 3)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe32_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x1F)) - return; - - if (irq_status0 & BIT(0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } -} - -static void msm_vfe32_process_violation_status(struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & BIT(0)) - pr_err("%s: black violation\n", __func__); - if (violation_status & BIT(1)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & BIT(2)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & BIT(3)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & BIT(4)) - pr_err("%s: crop violation\n", __func__); - if (violation_status & BIT(5)) - pr_err("%s: scale violation\n", __func__); - if (violation_status & BIT(6)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & BIT(7)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & BIT(8)) - pr_err("%s: matrix violation\n", __func__); - if (violation_status & BIT(9)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & BIT(10)) - pr_err("%s: la violation\n", __func__); - if (violation_status & BIT(11)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & BIT(12)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & BIT(13)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & BIT(14)) - pr_err("%s: asf violation\n", __func__); - if (violation_status & BIT(15)) - pr_err("%s: scale y violation\n", __func__); - if (violation_status & BIT(16)) - pr_err("%s: scale cbcr violation\n", __func__); - if (violation_status & BIT(17)) - pr_err("%s: chroma subsample violation\n", __func__); - if (violation_status & BIT(18)) - pr_err("%s: framedrop enc y violation\n", __func__); - if (violation_status & BIT(19)) - pr_err("%s: framedrop enc cbcr violation\n", __func__); - if (violation_status & BIT(20)) - pr_err("%s: framedrop view y violation\n", __func__); - if (violation_status & BIT(21)) - pr_err("%s: framedrop view cbcr violation\n", __func__); - if (violation_status & BIT(22)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & BIT(23)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & BIT(24)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe32_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & BIT(0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & BIT(1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & BIT(2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & BIT(3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & BIT(4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & BIT(5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & BIT(6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & BIT(7)) { - pr_err("%s: violation\n", __func__); - msm_vfe32_process_violation_status(vfe_dev); - } - if (error_status1 & BIT(8)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err("%s: image master 0 bus overflow\n", __func__); - } - if (error_status1 & BIT(9)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err("%s: image master 1 bus overflow\n", __func__); - } - if (error_status1 & BIT(10)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err("%s: image master 2 bus overflow\n", __func__); - } - if (error_status1 & BIT(11)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err("%s: image master 3 bus overflow\n", __func__); - } - if (error_status1 & BIT(12)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err("%s: image master 4 bus overflow\n", __func__); - } - if (error_status1 & BIT(13)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err("%s: image master 5 bus overflow\n", __func__); - } - if (error_status1 & BIT(14)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err("%s: image master 6 bus overflow\n", __func__); - } - if (error_status1 & BIT(15)) { - vfe_dev->stats->bg_overflow++; - pr_err("%s: status ae/bg bus overflow\n", __func__); - } - if (error_status1 & BIT(16)) { - vfe_dev->stats->bf_overflow++; - pr_err("%s: status af/bf bus overflow\n", __func__); - } - if (error_status1 & BIT(17)) { - vfe_dev->stats->awb_overflow++; - pr_err("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & BIT(18)) { - vfe_dev->stats->rs_overflow++; - pr_err("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & BIT(19)) { - vfe_dev->stats->cs_overflow++; - pr_err("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & BIT(20)) { - vfe_dev->stats->ihist_overflow++; - pr_err("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & BIT(21)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err("%s: status skin bhist bus overflow\n", __func__); - } - if (error_status1 & BIT(22)) - pr_err("%s: axi error\n", __func__); -} - -static void msm_vfe32_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x24); - msm_camera_io_w_mb(*irq_status1, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x18); - - if (*irq_status1 & BIT(0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x204); - - if (*irq_status1 & BIT(7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x7B4); -} - -static void msm_vfe32_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0x20) && !(irq_status1 & 0x1C000000)) - return; - - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status1 & BIT(26)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status1 & BIT(27)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status1 & BIT(28)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - - return; -} - -static void msm_vfe32_reg_update( - struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x260); -} - -static uint32_t msm_vfe32_reset_values[ISP_RST_MAX] = { - 0x3FF, /* ISP_RST_HARD reset everything */ - 0x3EF /* ISP_RST_SOFT same as HARD RESET */ -}; - -static long msm_vfe32_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe32_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0x4); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x3EF, vfe_dev->vfe_base + 0x4); - } - return rc; -} - -static void msm_vfe32_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - if (!vfe_dev->pdev->dev.of_node) { - /*vfe32 A-family: 8960*/ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x38); - } else { - /*vfe32 B-family: 8610*/ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x28); - msm_camera_io_w(0x1C800000, vfe_dev->vfe_base + 0x20); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x9AAAAAAA , vfe_dev->vfe_base + 0x600); - msm_camera_io_w(reload_mask, vfe_dev->vfe_base + 0x38); - } -} - -static void msm_vfe32_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE32_WM_BASE(wm_idx)); -} - -static void msm_vfe32_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x34); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x34); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(comp_mask_index + 21); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~BIT(stream_info->wm[0] + 6); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); -} - -static void msm_vfe32_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x504); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x508); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x514); - msm_camera_io_w(framedrop_period, vfe_dev->vfe_base + 0x518); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + 0x520); - } - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x260); -} - -static void msm_vfe32_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src == PIX_ENCODER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x50C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x510); - } else if (stream_info->stream_src == PIX_VIEWFINDER) { - msm_camera_io_w(0, vfe_dev->vfe_base + 0x51C); - msm_camera_io_w(0, vfe_dev->vfe_base + 0x520); - } -} - -static int32_t msm_vfe32_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_fmt = 0, pack_reg = 0; - uint32_t io_format_reg; - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x6F8); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x6F8); - return 0; -} - -static void msm_vfe32_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x14); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, - vfe_dev->vfe_base + 0x1EC); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x1F0); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x1F4); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x6FC); - val &= 0xFFFFFFFC; - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x6FC); -} - -static void msm_vfe32_update_camif_state( - struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - val |= 0x19; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x1C); - msm_camera_io_w_mb(0xA, vfe_dev->vfe_base + 0x200); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x1E4); - bus_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data.src_info[ - VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x1E4); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x1E0); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x1E0); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe32_cfg_rdi_reg(struct vfe_device *vfe_dev, - struct msm_vfe_rdi_cfg *rdi_cfg, enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE32_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE32_RDI_BASE(rdi)); - -} - -static void msm_vfe32_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1) << 4 | VFE32_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - } - return; -} - -static void msm_vfe32_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE32_WM_BASE(stream_info->wm[plane_idx]); - /* FRAME BASED */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x10); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - return; -} - -static void msm_vfe32_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 5; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 3; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= BIT(1); /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x60; - break; - case IDEAL_RAW: - xbar_cfg = 0x80; - break; - case RDI_INTF_0: - xbar_cfg = 0xA0; - break; - case RDI_INTF_1: - xbar_cfg = 0xC0; - break; - case RDI_INTF_2: - xbar_cfg = 0xE0; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - } - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - return; -} - -static void msm_vfe32_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = msm_camera_io_r(vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFF << VFE32_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, vfe_dev->vfe_base + VFE32_XBAR_BASE(wm)); -} - -static void msm_vfe32_cfg_axi_ub_equal_default(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint32_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP32_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (uint64_t)(axi_data->wm_image_size[i] * - prop_size); - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | - (wm_ub_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += wm_ub_size; - } else { - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE32_WM_BASE(i) + 0xC); - } - } -} - -static void msm_vfe32_cfg_axi_ub_equal_slicing(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t final_ub_slice_size; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (ub_offset + VFE32_EQUAL_SLICE_UB > VFE32_AXI_SLICE_UB) { - final_ub_slice_size = VFE32_AXI_SLICE_UB - ub_offset; - msm_camera_io_w(ub_offset << 16 | - (final_ub_slice_size - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += final_ub_slice_size; - } else { - msm_camera_io_w(ub_offset << 16 | - (VFE32_EQUAL_SLICE_UB - 1), vfe_dev->vfe_base + - VFE32_WM_BASE(i) + 0xC); - ub_offset += VFE32_EQUAL_SLICE_UB; - } - } -} - -static void msm_vfe32_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe32_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe32_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe32_update_ping_pong_addr(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe32_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - uint32_t halt_mask; - uint32_t axi_busy_flag = false; - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x1D8); - if (blocking) { - axi_busy_flag = true; - } - while (axi_busy_flag) { - if (msm_camera_io_r( - vfe_dev->vfe_base + 0x1DC) & 0x1) - axi_busy_flag = false; - } - msm_camera_io_w_mb(0, vfe_dev->vfe_base + 0x1D8); - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); - halt_mask &= 0xFEFFFFFF; - /* Disable AXI IRQ */ - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x20); - return 0; -} - -static uint32_t msm_vfe32_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 6) & 0x7F; -} - -static uint32_t msm_vfe32_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 21) & 0x7; -} - -static uint32_t msm_vfe32_get_pingpong_status(struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x180); -} - -static int msm_vfe32_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_AEC: - case MSM_ISP_STATS_BG: - return 0; - case MSM_ISP_STATS_AF: - case MSM_ISP_STATS_BF: - return 1; - case MSM_ISP_STATS_AWB: - return 2; - case MSM_ISP_STATS_RS: - return 3; - case MSM_ISP_STATS_CS: - return 4; - case MSM_ISP_STATS_IHIST: - return 5; - case MSM_ISP_STATS_SKIN: - case MSM_ISP_STATS_BHIST: - return 6; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe32_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe32_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - return; -} - -static void msm_vfe32_stats_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask |= BIT(STATS_IDX(stream_info->stream_handle) + 13); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - irq_mask &= ~(BIT(STATS_IDX(stream_info->stream_handle) + 13)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x1C); - return; -} - -static void msm_vfe32_stats_cfg_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_clear_wm_reg(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - /*Nothing to configure for VFE3.x*/ - return; -} - -static void msm_vfe32_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE32_UB_SIZE; - uint32_t ub_size[VFE32_NUM_STATS_TYPE] = { - 107, /*MSM_ISP_STATS_BG*/ - 92, /*MSM_ISP_STATS_BF*/ - 2, /*MSM_ISP_STATS_AWB*/ - 7, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 2, /*MSM_ISP_STATS_IHIST*/ - 7, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE32_STATS_BASE(i) + 0x8); - } - return; -} - -static void msm_vfe32_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE32_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - module_cfg_mask |= 1 << (5 + i); - break; - case 5: - module_cfg_mask |= 1 << 16; - break; - case 6: - module_cfg_mask |= 1 << 19; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x10); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x10); -} - -static void msm_vfe32_stats_update_ping_pong_addr(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE32_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe32_stats_get_wm_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 13) & 0x7F; -} - -static void msm_vfe32_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x002FFF7E; -} - -static void msm_vfe32_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x1C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x1C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x20); -} - -static void msm_vfe32_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = 0x0; - *irq1_mask = 0x01800000; -} - -static uint32_t msm_vfe32_stats_get_comp_mask(uint32_t irq_status0, - uint32_t irq_status1) -{ - return (irq_status0 >> 24) & 0x1; -} - -static uint32_t msm_vfe32_stats_get_frame_id(struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe32_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe_imgwr"); - else - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - if (!vfe_dev->pdev->dev.of_node) - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe_misc"); - else - vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe0"); - - if (!vfe_dev->iommu_ctx[1]) { - pr_err("%s: no iommux ctx resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe32_get_error_mask(uint32_t *error_mask0, - uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x007FFFFF; -} - -struct msm_vfe_axi_hardware_info msm_vfe32_axi_hw_info = { - .num_wm = 5, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe32_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_AEC | 1 << MSM_ISP_STATS_BG | - 1 << MSM_ISP_STATS_AF | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_SKIN | 1 << MSM_ISP_STATS_BHIST, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE32_NUM_STATS_TYPE, - .num_stats_comp_mask = 0, -}; - -static struct v4l2_subdev_core_ops msm_vfe32_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe32_subdev_ops = { - .core = &msm_vfe32_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe32_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe32_hw_info = { - .num_iommu_ctx = 2, - .vfe_clk_idx = VFE32_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe32_read_irq_status, - .process_camif_irq = msm_vfe32_process_camif_irq, - .process_reset_irq = msm_vfe32_process_reset_irq, - .process_halt_irq = msm_vfe32_process_halt_irq, - .process_reg_update = msm_vfe32_process_reg_update, - .process_epoch_irq = msm_vfe32_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe32_axi_reload_wm, - .enable_wm = msm_vfe32_axi_enable_wm, - .cfg_io_format = msm_vfe32_cfg_io_format, - .cfg_comp_mask = msm_vfe32_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe32_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe32_cfg_framedrop, - .clear_framedrop = msm_vfe32_clear_framedrop, - .cfg_wm_reg = msm_vfe32_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe32_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe32_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe32_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe32_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_get_comp_mask, - .get_wm_mask = msm_vfe32_get_wm_mask, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - .halt = msm_vfe32_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe32_reg_update, - .cfg_camif = msm_vfe32_cfg_camif, - .update_camif_state = msm_vfe32_update_camif_state, - .cfg_rdi_reg = msm_vfe32_cfg_rdi_reg, - .reset_hw = msm_vfe32_reset_hardware, - .init_hw = msm_vfe32_init_hardware, - .init_hw_reg = msm_vfe32_init_hardware_reg, - .release_hw = msm_vfe32_release_hardware, - .get_platform_data = msm_vfe32_get_platform_data, - .get_error_mask = msm_vfe32_get_error_mask, - .get_overflow_mask = msm_vfe32_get_overflow_mask, - .get_irq_mask = msm_vfe32_get_irq_mask, - .restore_irq_mask = msm_vfe32_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe32_get_halt_restart_mask, - .process_error_status = msm_vfe32_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe32_get_stats_idx, - .check_streams = msm_vfe32_stats_check_streams, - .cfg_comp_mask = msm_vfe32_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe32_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe32_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe32_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe32_stats_clear_wm_reg, - .cfg_ub = msm_vfe32_stats_cfg_ub, - .enable_module = msm_vfe32_stats_enable_module, - .update_ping_pong_addr = - msm_vfe32_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe32_stats_get_comp_mask, - .get_wm_mask = msm_vfe32_stats_get_wm_mask, - .get_frame_id = msm_vfe32_stats_get_frame_id, - .get_pingpong_status = msm_vfe32_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x5A0, - .axi_hw_info = &msm_vfe32_axi_hw_info, - .stats_hw_info = &msm_vfe32_stats_hw_info, - .subdev_ops = &msm_vfe32_subdev_ops, - .subdev_internal_ops = &msm_vfe32_internal_ops, -}; -EXPORT_SYMBOL(vfe32_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.h deleted file mode 100644 index 05350486271d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp32.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP32_H__ -#define __MSM_ISP32_H__ - -extern struct msm_vfe_hardware_info vfe32_hw_info; -#endif /* __MSM_ISP32_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.c deleted file mode 100644 index 418152f3b8c2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.c +++ /dev/null @@ -1,1882 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_isp40.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define VFE40_BURST_LEN 1 -#define VFE40_BURST_LEN_8916_VERSION 2 -#define VFE40_BURST_LEN_8939_VERSION 3 -#define VFE40_STATS_BURST_LEN 1 -#define VFE40_STATS_BURST_LEN_8916_VERSION 2 -#define VFE40_UB_SIZE 1536 /* 1536 * 128 bits = 24KB */ -#define VFE40_UB_SIZE_8916 2048 /* 2048 * 128 bits = 32KB */ -#define VFE40_UB_SIZE_8939 3072 /* 3072 * 128 bits = 48KB */ -#define VFE40_EQUAL_SLICE_UB 190 /* (UB_SIZE - STATS SIZE)/6 */ -#define VFE40_EQUAL_SLICE_UB_8916 276 -#define VFE40_EQUAL_SLICE_UB_8939 446 -#define VFE40_TOTAL_WM_UB 1144 /* UB_SIZE - STATS SIZE */ -#define VFE40_TOTAL_WM_UB_8916 1656 -#define VFE40_TOTAL_WM_UB_8939 2680 - - -/* STATS_SIZE (BE + BG + BF+ RS + CS + IHIST + BHIST ) = 392 */ -#define VFE40_STATS_SIZE 392 -#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE40_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE40_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE40_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE40_PING_PONG_BASE(wm, ping_pong) \ - (VFE40_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 8, 9, 10, 11, 12, 13, 14, 15}; - -#define VFE40_NUM_STATS_TYPE 8 -#define VFE40_STATS_BASE(idx) (0x168 + 0x18 * idx) -#define VFE40_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE40_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE40_VBIF_CLKON 0x4 -#define VFE40_VBIF_FIXED_SORT_EN 0x30 -#define VFE40_VBIF_FIXED_SORT_SEL0 0x34 -#define VFE40_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE40_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE40_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE40_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE40_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE40_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE40_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE40_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE40_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE40_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE40_VBIF_ARB_CTL 0xF0 -#define VFE40_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE40_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE40_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE40_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE40_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE40_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE40_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE40_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE40_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE40_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE40_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE40_CLK_IDX 1 -/*Iterations for averaging outstanding writes counts*/ -#define MAX_NUM_FRAMES 10 -/* Maximum outstanding writes to avoid image master bus -overflows*/ -#define MAX_OUT_WRITES_LEVEL 4000000 - -static struct msm_cam_clk_info msm_vfe40_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe40_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE40_8974V1_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26_VERSION || - vfe_dev->vfe_hw_version == VFE40_8x26V2_VERSION) { - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAAAAAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0002AAAA, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8974V2_VERSION || - vfe_dev->vfe_hw_version == VFE40_8974V3_VERSION) { - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA9AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA9, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION || - vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xAAA5AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001AAA5, vfebase + VFE40_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe40_init_vbif_parms_8974_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x01010101, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10010110, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00001010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_OCMEM_OUT_MAX_BURST); - msm_camera_io_w(0x00000030, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000001, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8974_v2(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE40_VBIF_CLKON); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_ARB_CTL); - msm_camera_io_w(0x00000FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x0FFF0FFF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - msm_camera_io_w(0x00002222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF1); - return; -} - -static void msm_vfe40_init_vbif_parms_8x26(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10101010, - vfe_vbif_base + VFE40_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_RD_LIM_CONF0); - msm_camera_io_w(0x00000010, - vfe_vbif_base + VFE40_VBIF_OUT_WR_LIM_CONF0); - msm_camera_io_w(0x00000707, - vfe_vbif_base + VFE40_VBIF_DDR_OUT_MAX_BURST); - msm_camera_io_w(0x000000FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO_EN); - msm_camera_io_w(0x00FF00FF, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AOOO); - msm_camera_io_w(0x00000003, - vfe_vbif_base + VFE40_VBIF_ROUND_ROBIN_QOS_ARB); - msm_camera_io_w(0x22222222, - vfe_vbif_base + VFE40_VBIF_OUT_AXI_AMEMTYPE_CONF0); - return; -} - -static void msm_vfe40_init_vbif_parms_8939(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x00000fff, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_EN); - msm_camera_io_w(0x00555000, - vfe_vbif_base + VFE40_VBIF_FIXED_SORT_SEL0); - return; -} - -static void msm_vfe40_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8974V1_VERSION: - msm_vfe40_init_vbif_parms_8974_v1(vfe_dev); - break; - case VFE40_8974V2_VERSION: - case VFE40_8974V3_VERSION: - msm_vfe40_init_vbif_parms_8974_v2(vfe_dev); - break; - case VFE40_8x26_VERSION: - case VFE40_8x26V2_VERSION: - msm_vfe40_init_vbif_parms_8x26(vfe_dev); - break; - case VFE40_8916_VERSION: - /*Reset hardware values are correct vbif values. - So no need to set*/ - break; - case VFE40_8939_VERSION: - msm_vfe40_init_vbif_parms_8939(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } - -} - -static int msm_vfe40_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, - &msm_vfe40_clk_info[0]); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe40_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe40_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe40_init_hardware_reg(struct vfe_device *vfe_dev) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - msm_vfe40_init_qos_parms(vfe_dev); - msm_vfe40_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0x3FFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000009, vfe_dev->vfe_base + 0x50); - /* Changing the bus config MAL length to 1024 bits */ - msm_camera_io_w(0x90000009, vfe_dev->vfe_base + 0x50); - /* Enabling MAL for each WM*/ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x78); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x9C); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0xC0); - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0xE4); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - /* Enable EPOCH IRQ for 100 frame lines*/ - irq_mask |= BIT(3); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x640000, vfe_dev->vfe_base + 0x318); - msm_camera_io_w(vfe_dev->stats_data.stats_mask, - vfe_dev->vfe_base + 0x44); - -} - -static void msm_vfe40_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe40_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe40_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int cnt; - - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - cnt = vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count; - if (cnt > 0 && vfe_dev->axi_data.src_info[VFE_PIX_0].pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) { - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->hw_info->vfe_ops.core_ops. - vbif_read_counters(vfe_dev); - } - } -} - -static void msm_vfe40_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status & (1 << 0)) - pr_err("%s: camif violation\n", __func__); - if (violation_status & (1 << 1)) - pr_err("%s: black violation\n", __func__); - if (violation_status & (1 << 2)) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status & (1 << 3)) - pr_err("%s: demux violation\n", __func__); - if (violation_status & (1 << 4)) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status & (1 << 5)) - pr_err("%s: wb violation\n", __func__); - if (violation_status & (1 << 6)) - pr_err("%s: clf violation\n", __func__); - if (violation_status & (1 << 7)) - pr_err("%s: color correct violation\n", __func__); - if (violation_status & (1 << 8)) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status & (1 << 9)) - pr_err("%s: la violation\n", __func__); - if (violation_status & (1 << 10)) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status & (1 << 11)) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status & (1 << 12)) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status & (1 << 13)) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status & (1 << 14)) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status & (1 << 15)) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status & (1 << 16)) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status & (1 << 17)) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status & (1 << 18)) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status & (1 << 19)) - pr_err("%s: asf enc violation\n", __func__); - if (violation_status & (1 << 20)) - pr_err("%s: asf view violation\n", __func__); - if (violation_status & (1 << 21)) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status & (1 << 22)) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status & (1 << 23)) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status & (1 << 24)) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status & (1 << 25)) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status & (1 << 26)) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status & (1 << 27)) - pr_err("%s: realign buf cr violation\n", __func__); -} - -static void msm_vfe40_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err_ratelimited("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err_ratelimited("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err_ratelimited("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err_ratelimited("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err_ratelimited("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err_ratelimited("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err_ratelimited("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err_ratelimited("%s: violation\n", __func__); - msm_vfe40_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) { - vfe_dev->stats->imagemaster0_overflow++; - pr_err_ratelimited("%s: image master 0 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 10)) { - vfe_dev->stats->imagemaster1_overflow++; - pr_err_ratelimited("%s: image master 1 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 11)) { - vfe_dev->stats->imagemaster2_overflow++; - pr_err_ratelimited("%s: image master 2 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 12)) { - vfe_dev->stats->imagemaster3_overflow++; - pr_err_ratelimited("%s: image master 3 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 13)) { - vfe_dev->stats->imagemaster4_overflow++; - pr_err_ratelimited("%s: image master 4 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 14)) { - vfe_dev->stats->imagemaster5_overflow++; - pr_err_ratelimited("%s: image master 5 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 15)) { - vfe_dev->stats->imagemaster6_overflow++; - pr_err_ratelimited("%s: image master 6 bus overflow\n", - __func__); - } - if (error_status1 & (1 << 16)) { - vfe_dev->stats->be_overflow++; - pr_err_ratelimited("%s: status be bus overflow\n", __func__); - } - if (error_status1 & (1 << 17)) { - vfe_dev->stats->bg_overflow++; - pr_err_ratelimited("%s: status bg bus overflow\n", __func__); - } - if (error_status1 & (1 << 18)) { - vfe_dev->stats->bf_overflow++; - pr_err_ratelimited("%s: status bf bus overflow\n", __func__); - } - if (error_status1 & (1 << 19)) { - vfe_dev->stats->awb_overflow++; - pr_err_ratelimited("%s: status awb bus overflow\n", __func__); - } - if (error_status1 & (1 << 20)) { - vfe_dev->stats->rs_overflow++; - pr_err_ratelimited("%s: status rs bus overflow\n", __func__); - } - if (error_status1 & (1 << 21)) { - vfe_dev->stats->cs_overflow++; - pr_err_ratelimited("%s: status cs bus overflow\n", __func__); - } - if (error_status1 & (1 << 22)) { - vfe_dev->stats->ihist_overflow++; - pr_err_ratelimited("%s: status ihist bus overflow\n", __func__); - } - if (error_status1 & (1 << 23)) { - vfe_dev->stats->skinbhist_overflow++; - pr_err_ratelimited("%s: status skin bhist bus overflow\n", - __func__); - } -} - -static void msm_vfe40_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - /* - * Ignore composite 2/3 irq which is used for dual VFE only - */ - - if (*irq_status0 & 0x6000000) - *irq_status0 &= ~(0x18000000); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x18000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x18000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status |= - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe40_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - return; -} - -static void msm_vfe40_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); -} - -static uint32_t msm_vfe40_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - - -static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev , - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe40_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(1000)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe40_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe40_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE40_WM_BASE(wm_idx)); -} - -static void msm_vfe40_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - - /* - * For dual VFE, composite 2/3 interrupt is used to trigger - * microcontroller to update certain VFE registers - */ - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask |= BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask |= BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_VIEWFINDER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 16); - irq_mask &= ~BIT(27); - } - - if (stream_info->plane_cfg[0].plane_addr_offset && - stream_info->stream_src == PIX_ENCODER) { - comp_mask &= ~(axi_data->composite_info[comp_mask_index]. - stream_composite_mask << 24); - irq_mask &= ~BIT(28); - } - - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_init_vbif_cntrs(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - - msm_camera_io_w(0x15, vfe_dev->vfe_vbif_base + 0x340); - msm_camera_io_w(0x40, vfe_dev->vfe_vbif_base + 0x344); - msm_camera_io_w(0x78, vfe_dev->vfe_vbif_base + 0x348); - - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - break; - default: - break; - } -} - -void msm_vfe40_vbif_clear_cnt(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE40_8916_VERSION: - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - break; - default: - break; - } -} - -void msm_vfe40_vbif_read_cnt_epoch(struct vfe_device *vfe_dev) -{ - uint32_t vbif_cnt_0_l = 0; - uint32_t vbif_cnt_1_l = 0; - uint32_t vbif_cnt_2_l = 0; - struct msm_vbif_cntrs *vbif_cntrs = &vfe_dev->vbif_cntrs; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - - if (vfe_dev->axi_data.frame_id[session_id]%2 > 0) { - /*Disable counters before reading*/ - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x308); - /*Read counters*/ - vbif_cnt_0_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x360); - vbif_cnt_1_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x364); - vbif_cnt_2_l = msm_camera_io_r(vfe_dev->vfe_vbif_base + 0x368); - /*clear counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x320); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x324); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x328); - msm_camera_io_w(0x0, vfe_dev->vfe_vbif_base + 0x328); - /*Enable counters*/ - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x300); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x304); - msm_camera_io_w(0x1, vfe_dev->vfe_vbif_base + 0x308); - - vbif_cntrs->total_vbif_cnt_2 += vbif_cnt_2_l; - vbif_cntrs->vfe_total_iter++; - - ISP_DBG("%s: VBIF cntr0 = %d, cntr1 = %d, cntr 2 = %d", - __func__, vbif_cnt_0_l, vbif_cnt_1_l, vbif_cnt_2_l); - - if ((vbif_cnt_2_l > 0) & (vbif_cntrs->previous_write_val > 0)) { - if ((vbif_cnt_2_l > (10 * - vbif_cntrs->previous_write_val)) - | (vbif_cnt_2_l > MAX_OUT_WRITES_LEVEL)) - vbif_cntrs->fb_err_lvl = 3; - else if (vbif_cnt_2_l > (5 * - vbif_cntrs->previous_write_val)) - vbif_cntrs->fb_err_lvl = 2; - else if (vbif_cnt_2_l > (2 * - (vbif_cntrs->previous_write_val))) - vbif_cntrs->fb_err_lvl = 1; - else - vbif_cntrs->fb_err_lvl = 0; - } - if ((vbif_cntrs->previous_write_val == 0) & - (vbif_cnt_2_l > 0)) { - vbif_cntrs->previous_write_val = vbif_cnt_2_l; - } - - if (vbif_cntrs->vfe_total_iter == MAX_NUM_FRAMES) { - vbif_cntrs->previous_write_val = - (vbif_cntrs->total_vbif_cnt_2)/MAX_NUM_FRAMES; - vbif_cntrs->vfe_total_iter = 0; - vbif_cntrs->total_vbif_cnt_2 = 0; - } - } -} - -static void msm_vfe40_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE40_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe40_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE40_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe40_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe40_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - val |= 0xF7; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x640000, vfe_dev->vfe_base + 0x318); - - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x2F4); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe40_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE40_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE40_RDI_BASE(rdi)); -} - -static void msm_vfe40_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t burst_len; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - burst_len = VFE40_BURST_LEN_8916_VERSION; - else if(vfe_dev->vfe_hw_version == VFE40_8939_VERSION) - burst_len = VFE40_BURST_LEN_8939_VERSION; - else - burst_len = VFE40_BURST_LEN; - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - (stream_info->plane_cfg[ - plane_idx].output_height - 1) << 4 | - burst_len; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ - return; -} - -static void msm_vfe40_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE40_WM_BASE(stream_info->wm[plane_idx]); - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); - return; -} - -static void msm_vfe40_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - return; -} - -static void msm_vfe40_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE40_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE40_XBAR_BASE(wm)); -} - -static void msm_vfe40_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t total_wm_ub; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - total_wm_ub = VFE40_TOTAL_WM_UB_8916; - else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION) - total_wm_ub = VFE40_TOTAL_WM_UB_8939; - else - total_wm_ub = VFE40_TOTAL_WM_UB; - - prop_size = total_wm_ub - - axi_data->hw_info->min_wm_ub * num_used_wms; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - uint64_t delta = 0; - uint64_t temp = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(temp, total_image_size); - delta = temp; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe40_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t equal_slice_ub; - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) - equal_slice_ub = VFE40_EQUAL_SLICE_UB_8916; - else - equal_slice_ub = VFE40_EQUAL_SLICE_UB; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (equal_slice_ub - 1), - vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10); - ub_offset += equal_slice_ub; - } -} - -static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe40_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe40_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - long rc = 0; - /* Keep only restart mask and halt mask*/ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x28); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x2C); - /* Clear IRQ Status*/ - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(0xFEFFFFFF, vfe_dev->vfe_base + 0x34); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - if (blocking) { - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } - return rc; -} - -static uint32_t msm_vfe40_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static void msm_vfe40_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x00FFFE7E; -} - -static void msm_vfe40_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x28); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x2C); -} - -static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} - -static uint32_t msm_vfe40_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe40_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe40_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return 0; - case MSM_ISP_STATS_BG: - return 1; - case MSM_ISP_STATS_BF: - return 2; - case MSM_ISP_STATS_AWB: - return 3; - case MSM_ISP_STATS_RS: - return 4; - case MSM_ISP_STATS_CS: - return 5; - case MSM_ISP_STATS_IHIST: - return 6; - case MSM_ISP_STATS_BHIST: - return 7; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe40_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - return 0; -} - -static void msm_vfe40_stats_cfg_comp_mask(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - stats_mask = stats_mask & 0xFF; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - stats_comp = &stats_data->stats_comp_mask[i]; - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (stats_mask << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - stats_mask)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(stats_mask << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - vfe_dev->stats_data.stats_mask = reg_mask; - return; - } -} - -static void msm_vfe40_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 16); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 16)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe40_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE40_STATS_BASE(stats_idx); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe40_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t ub_offset = vfe_dev->vfe_ub_size; - uint32_t stats_burst_len = stats_data->stats_burst_len; - - uint32_t ub_size[VFE40_NUM_STATS_TYPE] = { - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION; - ub_offset = VFE40_UB_SIZE_8916; - } else if (vfe_dev->vfe_hw_version == VFE40_8939_VERSION) { - stats_burst_len = VFE40_STATS_BURST_LEN_8916_VERSION; - ub_offset = VFE40_UB_SIZE_8939; - } else { - stats_burst_len = VFE40_STATS_BURST_LEN; - ub_offset = VFE40_UB_SIZE; - } - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(stats_burst_len << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE40_STATS_BASE(i) + 0xC); - } -} - -static void msm_vfe40_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - - for (i = 0; i < VFE40_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - module_cfg_mask |= 1 << (5 + i); - break; - case 6: - module_cfg_mask |= 1 << 15; - break; - case 7: - module_cfg_mask |= 1 << 18; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); -} - -static void msm_vfe40_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE40_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe40_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 16) & 0xFF; -} - -static uint32_t msm_vfe40_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe40_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe40_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x00FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe40_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE40_NUM_STATS_TYPE, - .num_stats_comp_mask = 2, -}; - -static struct v4l2_subdev_core_ops msm_vfe40_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe40_subdev_ops = { - .core = &msm_vfe40_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe40_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe40_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE40_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe40_read_irq_status, - .process_camif_irq = msm_vfe40_process_camif_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_halt_irq = msm_vfe40_process_halt_irq, - .process_reset_irq = msm_vfe40_process_reset_irq, - .process_reg_update = msm_vfe40_process_reg_update, - .process_epoch_irq = msm_vfe40_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe40_axi_reload_wm, - .enable_wm = msm_vfe40_axi_enable_wm, - .cfg_io_format = msm_vfe40_cfg_io_format, - .cfg_comp_mask = msm_vfe40_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe40_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe40_cfg_framedrop, - .clear_framedrop = msm_vfe40_clear_framedrop, - .cfg_wm_reg = msm_vfe40_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe40_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe40_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe40_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe40_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_get_comp_mask, - .get_wm_mask = msm_vfe40_get_wm_mask, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - .halt = msm_vfe40_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe40_reg_update, - .cfg_camif = msm_vfe40_cfg_camif, - .update_camif_state = msm_vfe40_update_camif_state, - .cfg_rdi_reg = msm_vfe40_cfg_rdi_reg, - .reset_hw = msm_vfe40_reset_hardware, - .init_hw = msm_vfe40_init_hardware, - .init_hw_reg = msm_vfe40_init_hardware_reg, - .release_hw = msm_vfe40_release_hardware, - .get_platform_data = msm_vfe40_get_platform_data, - .get_error_mask = msm_vfe40_get_error_mask, - .get_overflow_mask = msm_vfe40_get_overflow_mask, - .get_irq_mask = msm_vfe40_get_irq_mask, - .restore_irq_mask = msm_vfe40_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe40_get_halt_restart_mask, - .process_error_status = msm_vfe40_process_error_status, - .init_vbif_counters = msm_vfe40_init_vbif_cntrs, - .vbif_clear_counters = msm_vfe40_vbif_clear_cnt, - .vbif_read_counters = msm_vfe40_vbif_read_cnt_epoch, - }, - .stats_ops = { - .get_stats_idx = msm_vfe40_get_stats_idx, - .check_streams = msm_vfe40_stats_check_streams, - .cfg_comp_mask = msm_vfe40_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe40_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe40_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe40_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe40_stats_clear_wm_reg, - .cfg_ub = msm_vfe40_stats_cfg_ub, - .enable_module = msm_vfe40_stats_enable_module, - .update_ping_pong_addr = - msm_vfe40_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe40_stats_get_comp_mask, - .get_wm_mask = msm_vfe40_stats_get_wm_mask, - .get_frame_id = msm_vfe40_stats_get_frame_id, - .get_pingpong_status = msm_vfe40_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe40_axi_hw_info, - .stats_hw_info = &msm_vfe40_stats_hw_info, - .subdev_ops = &msm_vfe40_subdev_ops, - .subdev_internal_ops = &msm_vfe40_internal_ops, -}; -EXPORT_SYMBOL(vfe40_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.h deleted file mode 100644 index e9b151816a37..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp40.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP40_H__ -#define __MSM_ISP40_H__ - -extern struct msm_vfe_hardware_info vfe40_hw_info; -#endif /* __MSM_ISP40_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.c deleted file mode 100644 index a8d8085d9405..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.c +++ /dev/null @@ -1,1513 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp44.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -/*#define CONFIG_MSM_ISP_DBG*/ -#undef CDBG -#ifdef CONFIG_MSM_ISP_DBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_AWB 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE44_8084V1_VERSION 0x4000000A - -#define VFE44_BURST_LEN 3 -#define VFE44_STATS_BURST_LEN 2 -#define VFE44_UB_SIZE 2048 -#define VFE44_EQUAL_SLICE_UB 228 -#define VFE44_WM_BASE(idx) (0x6C + 0x24 * idx) -#define VFE44_RDI_BASE(idx) (0x2E8 + 0x4 * idx) -#define VFE44_XBAR_BASE(idx) (0x58 + 0x4 * (idx / 2)) -#define VFE44_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE44_PING_PONG_BASE(wm, ping_pong) \ - (VFE44_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) - -static uint8_t stats_pingpong_offset_map[] = { - 7, 8, 9, 10, 11, 12, 13, 14, 15}; - -#define SHIFT_BF_SCALE_BIT 1 -#define VFE44_NUM_STATS_COMP 2 -#define VFE44_NUM_STATS_TYPE 9 -#define VFE44_STATS_BASE(idx) \ - ((idx) == STATS_IDX_BF_SCALE ? 0xA0C : (0x168 + 0x18 * (idx-1))) -#define VFE44_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE44_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE44_VBIF_CLKON 0x4 -#define VFE44_VBIF_IN_RD_LIM_CONF0 0xB0 -#define VFE44_VBIF_IN_RD_LIM_CONF1 0xB4 -#define VFE44_VBIF_IN_RD_LIM_CONF2 0xB8 -#define VFE44_VBIF_IN_WR_LIM_CONF0 0xC0 -#define VFE44_VBIF_IN_WR_LIM_CONF1 0xC4 -#define VFE44_VBIF_IN_WR_LIM_CONF2 0xC8 -#define VFE44_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define VFE44_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define VFE44_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define VFE44_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define VFE44_VBIF_ARB_CTL 0xF0 -#define VFE44_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define VFE44_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 -#define VFE44_VBIF_OUT_AXI_AOOO_EN 0x178 -#define VFE44_VBIF_OUT_AXI_AOOO 0x17C - -#define VFE44_BUS_BDG_QOS_CFG_0 0x000002C4 -#define VFE44_BUS_BDG_QOS_CFG_1 0x000002C8 -#define VFE44_BUS_BDG_QOS_CFG_2 0x000002CC -#define VFE44_BUS_BDG_QOS_CFG_3 0x000002D0 -#define VFE44_BUS_BDG_QOS_CFG_4 0x000002D4 -#define VFE44_BUS_BDG_QOS_CFG_5 0x000002D8 -#define VFE44_BUS_BDG_QOS_CFG_6 0x000002DC -#define VFE44_BUS_BDG_QOS_CFG_7 0x000002E0 - -#define VFE44_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe44_clk_info[VFE_CLK_INFO_MAX]; - -static void msm_vfe44_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - - if (vfe_dev->vfe_hw_version == VFE44_8084V1_VERSION) { - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_0); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_1); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_2); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_3); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_4); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_5); - msm_camera_io_w(0xFEA9FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_6); - msm_camera_io_w(0x0001FEA9, vfebase + VFE44_BUS_BDG_QOS_CFG_7); - } else { - BUG(); - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - } -} - -static void msm_vfe44_init_vbif_parms_8084_v1(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - msm_camera_io_w(0x1, - vfe_vbif_base + VFE44_VBIF_CLKON); - msm_camera_io_w(0x00100000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF0); - msm_camera_io_w(0x00001000, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF1); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_RD_LIM_CONF2); - msm_camera_io_w(0x10000010, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF0); - msm_camera_io_w(0x10100000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF1); - msm_camera_io_w(0x00101000, - vfe_vbif_base + VFE44_VBIF_IN_WR_LIM_CONF2); - msm_camera_io_w(0x3, - vfe_vbif_base + VFE44_VBIF_ROUND_ROBIN_QOS_ARB); -} - -static void msm_vfe44_init_vbif_parms(struct vfe_device *vfe_dev) -{ - switch (vfe_dev->vfe_hw_version) { - case VFE44_8084V1_VERSION: - msm_vfe44_init_vbif_parms_8084_v1(vfe_dev); - break; - default: - BUG(); - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - break; - } - -} - -static int msm_vfe44_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe44_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe44_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - iounmap(vfe_dev->vfe_base); - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe44_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe44_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe44_init_qos_parms(vfe_dev); - msm_vfe44_init_vbif_parms(vfe_dev); - /* CGC_OVERRIDE */ - msm_camera_io_w(0xFBFFFFFF, vfe_dev->vfe_base + 0x14); - msm_camera_io_w(0xC001FF7F, vfe_dev->vfe_base + 0x974); - /* BUS_CFG */ - msm_camera_io_w(0x10000001, vfe_dev->vfe_base + 0x50); - msm_camera_io_w(0xE00000F3, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x2C); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x30); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); -} - -static void msm_vfe44_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) - complete(&vfe_dev->reset_complete); -} - -static void msm_vfe44_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) - complete(&vfe_dev->halt_complete); -} - -static void msm_vfe44_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe44_process_camif_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xF)) - return; - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - msm_isp_update_framedrop_reg(vfe_dev); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe44_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - if (!violation_status) - return; - - if (violation_status == 0) - pr_err("%s: camif violation\n", __func__); - if (violation_status == 1) - pr_err("%s: black violation\n", __func__); - if (violation_status == 2) - pr_err("%s: rolloff violation\n", __func__); - if (violation_status == 3) - pr_err("%s: demux violation\n", __func__); - if (violation_status == 4) - pr_err("%s: demosaic violation\n", __func__); - if (violation_status == 5) - pr_err("%s: wb violation\n", __func__); - if (violation_status == 6) - pr_err("%s: clf violation\n", __func__); - if (violation_status == 7) - pr_err("%s: color correct violation\n", __func__); - if (violation_status == 8) - pr_err("%s: rgb lut violation\n", __func__); - if (violation_status == 9) - pr_err("%s: la violation\n", __func__); - if (violation_status == 10) - pr_err("%s: chroma enhance violation\n", __func__); - if (violation_status == 11) - pr_err("%s: chroma supress mce violation\n", __func__); - if (violation_status == 12) - pr_err("%s: skin enhance violation\n", __func__); - if (violation_status == 13) - pr_err("%s: color tranform enc violation\n", __func__); - if (violation_status == 14) - pr_err("%s: color tranform view violation\n", __func__); - if (violation_status == 15) - pr_err("%s: scale enc y violation\n", __func__); - if (violation_status == 16) - pr_err("%s: scale enc cbcr violation\n", __func__); - if (violation_status == 17) - pr_err("%s: scale view y violation\n", __func__); - if (violation_status == 18) - pr_err("%s: scale view cbcr violation\n", __func__); - if (violation_status == 21) - pr_err("%s: crop enc y violation\n", __func__); - if (violation_status == 22) - pr_err("%s: crop enc cbcr violation\n", __func__); - if (violation_status == 23) - pr_err("%s: crop view y violation\n", __func__); - if (violation_status == 24) - pr_err("%s: crop view cbcr violation\n", __func__); - if (violation_status == 25) - pr_err("%s: realign buf y violation\n", __func__); - if (violation_status == 26) - pr_err("%s: realign buf cb violation\n", __func__); - if (violation_status == 27) - pr_err("%s: realign buf cr violation\n", __func__); - if (violation_status == 28) - pr_err("%s: ltm violation\n", __func__); - if (violation_status == 29) - pr_err("%s: ltm cov violation\n", __func__); - if (violation_status == 30) - pr_err("%s: abf violation\n", __func__); - if (violation_status == 31) - pr_err("%s: bpc violation\n", __func__); -} - -static void msm_vfe44_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe44_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status awb bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe44_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x38); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x30); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x34); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); - if (*irq_status0 & 0x10000000) { - pr_err_ratelimited("%s: Protection triggered\n", __func__); - *irq_status0 &= ~(0x10000000); - } - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x31C); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x48); - -} - -static void msm_vfe44_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev); - //msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || (input_src & (1 << VFE_RAW_1)) || (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, input_src); - } - return; -} -static void msm_vfe44_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x378); -} - -static uint32_t msm_vfe44_reset_values[ISP_RST_MAX] = -{ - 0x1FF, /* ISP_RST_HARD reset everything */ - 0x1EF /* ISP_RST_SOFT all modules without registers */ -}; - -static long msm_vfe44_reset_hardware(struct vfe_device *vfe_dev, - enum msm_isp_reset_type reset_type, uint32_t blocking) -{ - uint32_t rst_val; - long rc = 0; - if (reset_type >= ISP_RST_MAX) { - pr_err("%s: Error Invalid parameter\n", __func__); - reset_type = ISP_RST_HARD; - } - rst_val = msm_vfe44_reset_values[reset_type]; - init_completion(&vfe_dev->reset_complete); - if (blocking) { - msm_camera_io_w_mb(rst_val, vfe_dev->vfe_base + 0xC); - rc = wait_for_completion_interruptible_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0xC); - } - return rc; -} - -static void msm_vfe44_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x4C); -} - -static void msm_vfe44_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - val = msm_camera_io_r(vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE44_WM_BASE(wm_idx)); -} - -static void msm_vfe44_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x40); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x40); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE44_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x378); -} - -static void msm_vfe44_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE44_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe44_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int bpp, bpp_reg = 0, pack_reg = 0; - enum msm_isp_pack_fmt pack_fmt = 0; - uint32_t io_format_reg; /*io format register bit*/ - bpp = msm_isp_get_bit_per_pixel(io_format); - if (bpp < 0) { - pr_err("%s:%d invalid io_format %d bpp %d", __func__, __LINE__, - io_format, bpp); - return -EINVAL; - } - - switch (bpp) { - case 8: - bpp_reg = 0; - break; - case 10: - bpp_reg = 1 << 0; - break; - case 12: - bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - if (stream_src == IDEAL_RAW) { - /*use io_format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - switch (pack_fmt) { - case QCOM: - pack_reg = 0x0; - break; - case MIPI: - pack_reg = 0x1; - break; - case DPCM6: - pack_reg = 0x2; - break; - case DPCM8: - pack_reg = 0x3; - break; - case PLAIN8: - pack_reg = 0x4; - break; - case PLAIN16: - pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt!\n", __func__); - return -EINVAL; - } - } - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x54); - switch (stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x54); - return 0; -} - -static void msm_vfe44_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(pix_cfg->input_mux << 16 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x1C); - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x300); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x304); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x308); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x314); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2E8); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2E8); - - switch (pix_cfg->input_mux) { - case CAMIF: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F4); - break; - case TESTGEN: - val = 0x01; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x93C); - break; - case EXTERNAL_READ: - default: - pr_err("%s: not supported input_mux %d\n", - __func__, pix_cfg->input_mux); - break; - } -} - -static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - if (update_state == NO_UPDATE) - return; - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - val |= 0xF5; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x28); - msm_camera_io_w_mb(0x200, vfe_dev->vfe_base + 0x318); - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x2F8); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x2F8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x2, vfe_dev->vfe_base + 0x2F4); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - } -} - -static void msm_vfe44_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - rdi_reg_cfg &= ~(BIT(16 + rdi)); - rdi_reg_cfg |= rdi_cfg->frame_based << (16 + rdi); - msm_camera_io_w(rdi_reg_cfg, - vfe_dev->vfe_base + VFE44_RDI_BASE(0)); - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x70003; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE44_RDI_BASE(rdi)); -} - -static void msm_vfe44_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - if (!stream_info->frame_based) { - msm_camera_io_w(0x0, vfe_dev->vfe_base + wm_base); - /*WR_IMAGE_SIZE*/ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+1)/2 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - - /*WR_BUFFER_CFG*/ - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_stride) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } else { - msm_camera_io_w(0x2, vfe_dev->vfe_base + wm_base); - val = (stream_info->plane_cfg[plane_idx].output_height - 1); - val = (((val & 0xfff) << 2) | ((val >> 12) & 0x3)); - val = val << 2 | - msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[ - plane_idx].output_width) << 16 | - VFE44_BURST_LEN; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe44_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE44_WM_BASE(stream_info->wm[plane_idx]); - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /*WR_IMAGE_SIZE*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /*WR_BUFFER_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe44_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /*SINGLE_STREAM_SEL*/ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - xbar_cfg |= 0x3 << 4; /*PAIR_STREAM_SWAP_CTRL*/ - break; - } - xbar_cfg |= 0x1 << 1; /*PAIR_STREAM_EN*/ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /*VIEW_STREAM_EN*/ - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0x500; - break; - case RDI_INTF_1: - xbar_cfg = 0x600; - break; - case RDI_INTF_2: - xbar_cfg = 0x700; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -static void msm_vfe44_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE44_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE44_XBAR_BASE(wm)); -} - -#define MSM_ISP44_TOTAL_WM_UB 1203 - -static void msm_vfe44_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint32_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - prop_size = MSM_ISP44_TOTAL_WM_UB - - axi_data->hw_info->min_wm_ub * num_used_wms; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = - (axi_data->wm_image_size[i] * - prop_size)/total_image_size; - wm_ub_size = axi_data->hw_info->min_wm_ub + delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe44_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (VFE44_EQUAL_SLICE_UB - 1), - vfe_dev->vfe_base + VFE44_WM_BASE(i) + 0x10); - ub_offset += VFE44_EQUAL_SLICE_UB; - } -} - -static void msm_vfe44_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe44_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe44_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe44_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static long msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) -{ - uint32_t halt_mask; - halt_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x2C); - halt_mask |= (1 << 8); - msm_camera_io_w_mb(halt_mask, vfe_dev->vfe_base + 0x2C); - init_completion(&vfe_dev->halt_complete); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); - return wait_for_completion_interruptible_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); -} - -static uint32_t msm_vfe44_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe44_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe44_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x268); -} - -static int msm_vfe44_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_BE: - return STATS_IDX_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_AWB: - return STATS_IDX_AWB; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe44_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe44_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t reg_mask, comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - reg_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - comp_stats_mask = reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_add(stats_mask, stats_comp); - } else { - - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_sub((1 << STATS_IDX_BF_SCALE), - stats_comp); - - /* - * Check if comp mask in reg is valid - * and contains this stat - */ - - if (!comp_stats_mask || - !((comp_stats_mask >> (16 + i*8)) & - mask_bf_scale)) - continue; - - atomic_sub(stats_mask, stats_comp); - reg_mask &= ~(mask_bf_scale << (16 + i*8)); - } - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(reg_mask, vfe_dev->vfe_base + 0x44); - return; - } -} - -static void msm_vfe44_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x28); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x28); -} - -static void msm_vfe44_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - /*WR_ADDR_CFG*/ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE44_STATS_BASE(stats_idx); - /* BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /*WR_ADDR_CFG*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /*WR_IRQ_FRAMEDROP_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /*WR_IRQ_SUBSAMPLE_PATTERN*/ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe44_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = VFE44_UB_SIZE; - uint32_t ub_size[VFE44_NUM_STATS_TYPE] = { - 128, /*MSM_ISP_STATS_BF_SCALE*/ - 64, /*MSM_ISP_STATS_BE*/ - 128, /*MSM_ISP_STATS_BG*/ - 128, /*MSM_ISP_STATS_BF*/ - 16, /*MSM_ISP_STATS_AWB*/ - 8, /*MSM_ISP_STATS_RS*/ - 16, /*MSM_ISP_STATS_CS*/ - 16, /*MSM_ISP_STATS_IHIST*/ - 16, /*MSM_ISP_STATS_BHIST*/ - }; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE44_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE44_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe44_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE44_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_BE: - case STATS_IDX_BG: - case STATS_IDX_BF: - case STATS_IDX_AWB: - case STATS_IDX_RS: - case STATS_IDX_CS: - module_cfg_mask |= 1 << (4 + i); - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 15; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 18; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 2; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x18); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x18); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x888); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x888); -} - -static void msm_vfe44_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE44_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe44_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe44_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe44_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - uint32_t session_id = 0; - session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - return vfe_dev->axi_data.frame_id[session_id]; -} - -static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe44_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static struct msm_vfe_axi_hardware_info msm_vfe44_axi_hw_info = { - .num_wm = 5, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 64, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe44_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_AWB | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE44_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE44_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe44_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe44_subdev_ops = { - .core = &msm_vfe44_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe44_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe44_hw_info = { - .num_iommu_ctx = 1, - .vfe_clk_idx = VFE44_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe44_read_irq_status, - .process_camif_irq = msm_vfe44_process_camif_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_halt_irq = msm_vfe44_process_halt_irq, - .process_reset_irq = msm_vfe44_process_reset_irq, - .process_reg_update = msm_vfe44_process_reg_update, - .process_epoch_irq = msm_vfe44_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe44_axi_reload_wm, - .enable_wm = msm_vfe44_axi_enable_wm, - .cfg_io_format = msm_vfe44_cfg_io_format, - .cfg_comp_mask = msm_vfe44_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe44_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe44_cfg_framedrop, - .clear_framedrop = msm_vfe44_clear_framedrop, - .cfg_wm_reg = msm_vfe44_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe44_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe44_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe44_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe44_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_get_comp_mask, - .get_wm_mask = msm_vfe44_get_wm_mask, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - .halt = msm_vfe44_axi_halt, - }, - .core_ops = { - .reg_update = msm_vfe44_reg_update, - .cfg_camif = msm_vfe44_cfg_camif, - .update_camif_state = msm_vfe44_update_camif_state, - .cfg_rdi_reg = msm_vfe44_cfg_rdi_reg, - .reset_hw = msm_vfe44_reset_hardware, - .init_hw = msm_vfe44_init_hardware, - .init_hw_reg = msm_vfe44_init_hardware_reg, - .release_hw = msm_vfe44_release_hardware, - .get_platform_data = msm_vfe44_get_platform_data, - .get_error_mask = msm_vfe44_get_error_mask, - .process_error_status = msm_vfe44_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe44_get_stats_idx, - .check_streams = msm_vfe44_stats_check_streams, - .cfg_comp_mask = msm_vfe44_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe44_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe44_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe44_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe44_stats_clear_wm_reg, - .cfg_ub = msm_vfe44_stats_cfg_ub, - .enable_module = msm_vfe44_stats_enable_module, - .update_ping_pong_addr = - msm_vfe44_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe44_stats_get_comp_mask, - .get_wm_mask = msm_vfe44_stats_get_wm_mask, - .get_frame_id = msm_vfe44_stats_get_frame_id, - .get_pingpong_status = msm_vfe44_get_pingpong_status, - }, - }, - .dmi_reg_offset = 0x918, - .axi_hw_info = &msm_vfe44_axi_hw_info, - .stats_hw_info = &msm_vfe44_stats_hw_info, - .subdev_ops = &msm_vfe44_subdev_ops, - .subdev_internal_ops = &msm_vfe44_internal_ops, -}; -EXPORT_SYMBOL(vfe44_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.h deleted file mode 100644 index 7bd630d4ef4d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp44.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP44_H__ -#define __MSM_ISP44_H__ - -extern struct msm_vfe_hardware_info vfe44_hw_info; -#endif /* __MSM_ISP44_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.c deleted file mode 100644 index e16c175eba83..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.c +++ /dev/null @@ -1,1942 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp46.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_HDR_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_HDR_BHIST 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE46_8994V1_VERSION 0x60000000 - -#define VFE46_BURST_LEN 3 -#define VFE46_FETCH_BURST_LEN 3 -#define VFE46_STATS_BURST_LEN 3 -#define VFE46_UB_SIZE_VFE0 2048 -#define VFE46_UB_SIZE_VFE1 1536 -#define VFE46_UB_STATS_SIZE 144 -#define MSM_ISP46_TOTAL_IMAGE_UB_VFE0 (VFE46_UB_SIZE_VFE0 - VFE46_UB_STATS_SIZE) -#define MSM_ISP46_TOTAL_IMAGE_UB_VFE1 (VFE46_UB_SIZE_VFE1 - VFE46_UB_STATS_SIZE) -#define VFE46_WM_BASE(idx) (0xA0 + 0x24 * idx) -#define VFE46_RDI_BASE(idx) (0x39C + 0x4 * idx) -#define VFE46_XBAR_BASE(idx) (0x90 + 0x4 * (idx / 2)) -#define VFE46_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE46_PING_PONG_BASE(wm, ping_pong) \ - (VFE46_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) -#define SHIFT_BF_SCALE_BIT 1 -#define VFE46_NUM_STATS_COMP 2 -#define VFE46_BUS_RD_CGC_OVERRIDE_BIT 16 - -static uint32_t stats_base_addr[] = { - 0x1E4, /* BF_SCALE */ - 0x19C, /* HDR_BE */ - 0x1F0, /* BG */ - 0x1CC, /* BF */ - 0x1B4, /* HDR_BHIST */ - 0x220, /* RS */ - 0x238, /* CS */ - 0x250, /* IHIST */ - 0x208, /* BHIST (SKIN_BHIST) */ -}; - -static uint8_t stats_pingpong_offset_map[] = { - 11, /* BF_SCALE */ - 8, /* HDR_BE */ - 12, /* BG */ - 10, /* BF */ - 9, /* HDR_BHIST */ - 14, /* RS */ - 15, /* CS */ - 16, /* IHIST */ - 13, /* BHIST (SKIN_BHIST) */ -}; - -#define VFE46_NUM_STATS_TYPE 9 -#define VFE46_STATS_BASE(idx) (stats_base_addr[idx]) -#define VFE46_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE46_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE46_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE46_BUS_BDG_QOS_CFG_BASE 0x378 -#define VFE46_BUS_BDG_QOS_CFG_NUM 8 -#define VFE46_BUS_BDG_DS_CFG_BASE 0xBD8 -#define VFE46_BUS_BDG_DS_CFG_NUM 17 - -#define VFE46_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe46_clk_info[VFE_CLK_INFO_MAX]; - -static uint32_t vfe46_qos_settings_8994_v1[] = { - 0xAAA9AAA9, /* QOS_CFG_0 */ - 0xAAA9AAA9, /* QOS_CFG_1 */ - 0xAAA9AAA9, /* QOS_CFG_2 */ - 0xAAA9AAA9, /* QOS_CFG_3 */ - 0xAAA9AAA9, /* QOS_CFG_4 */ - 0xAAA9AAA9, /* QOS_CFG_5 */ - 0xAAA9AAA9, /* QOS_CFG_6 */ - 0x0001AAA9, /* QOS_CFG_7 */ -}; - -static uint32_t vfe46_ds_settings_8994_v1[] = { - 0x44441111, /* DS_CFG_0 */ - 0x44441111, /* DS_CFG_1 */ - 0x44441111, /* DS_CFG_2 */ - 0x44441111, /* DS_CFG_3 */ - 0x44441111, /* DS_CFG_4 */ - 0x44441111, /* DS_CFG_5 */ - 0x44441111, /* DS_CFG_6 */ - 0x44441111, /* DS_CFG_7 */ - 0x44441111, /* DS_CFG_8 */ - 0x44441111, /* DS_CFG_9 */ - 0x44441111, /* DS_CFG_10 */ - 0x44441111, /* DS_CFG_11 */ - 0x44441111, /* DS_CFG_12 */ - 0x44441111, /* DS_CFG_13 */ - 0x44441111, /* DS_CFG_14 */ - 0x44441111, /* DS_CFG_15 */ - 0x00000103, /* DS_CFG_16 */ -}; - -static void msm_vfe46_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *qos_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) - qos_settings = vfe46_qos_settings_8994_v1; - - if (qos_settings == NULL) { - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE46_BUS_BDG_QOS_CFG_NUM; i++) - msm_camera_io_w(qos_settings[i], - vfebase + VFE46_BUS_BDG_QOS_CFG_BASE + i * 4); - } -} - -static void msm_vfe46_init_vbif_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) { - msm_camera_io_w(0x3, - vfe_vbif_base + VFE46_VBIF_ROUND_ROBIN_QOS_ARB); - } else { - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } -} - -static void msm_vfe46_init_danger_safe_parms( - struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *ds_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE46_8994V1_VERSION) - ds_settings = vfe46_ds_settings_8994_v1; - - if (ds_settings == NULL) { - pr_err("%s: DS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE46_BUS_BDG_DS_CFG_NUM; i++) - msm_camera_io_w(ds_settings[i], - vfebase + VFE46_BUS_BDG_DS_CFG_BASE + i * 4); - } -} - -static int msm_vfe46_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe46_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe46_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe46_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe46_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe46_init_qos_parms(vfe_dev); - msm_vfe46_init_vbif_parms(vfe_dev); - msm_vfe46_init_danger_safe_parms(vfe_dev); - /* MODULE_LENS_CGC_OVERRIDE */ - msm_camera_io_w(0x00000182, vfe_dev->vfe_base + 0x2C); - /* MODULE_COLOR_CGC_OVERRIDE */ - msm_camera_io_w(0x00000018, vfe_dev->vfe_base + 0x34); - /* BUS_CFG */ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x84); - /* IRQ_MASK/CLEAR */ - msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0xE1FFFFFF, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(vfe_dev->stats_data.reg_mask, - vfe_dev->vfe_base + 0x78); -} - -static void msm_vfe46_clear_status_reg(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(0x80000000, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x58); -} - -static void msm_vfe46_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) { - complete(&vfe_dev->reset_complete); - vfe_dev->reset_pending = 0; - } -} - -static void msm_vfe46_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) { - complete(&vfe_dev->halt_complete); - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - } -} - -static void msm_vfe46_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe46_process_input_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x100000F)) - return; - - if (irq_status0 & (1 << 24)) { - ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__); - msm_isp_fetch_engine_done_notify(vfe_dev, - &vfe_dev->fetch_engine_info); - } - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, - (1 << VFE_PIX_0)); - msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe46_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - - if (violation_status > 39) { - pr_err("%s: invalid violation status %d\n", - __func__, violation_status); - return; - } - - pr_err("%s: VFE pipeline violation status %d\n", __func__, - violation_status); -} - -static void msm_vfe46_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe46_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status hdr be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status hdr bhist bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe46_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x3D0); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x7C); - -} - -static void msm_vfe46_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, input_src); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || - atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev, input_src); - msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || - (input_src & (1 << VFE_RAW_1)) || - (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, input_src); - } - return; -} - -static void msm_vfe46_reg_update(struct vfe_device *vfe_dev, - uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x3D8); -} - -static long msm_vfe46_reset_hardware(struct vfe_device *vfe_dev, - uint32_t first_start, uint32_t blocking_call) -{ - long rc = 0; - init_completion(&vfe_dev->reset_complete); - - if (blocking_call) - vfe_dev->reset_pending = 1; - - if (first_start) { - msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0x18); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0x0001FFFF); - } - - if (blocking_call) { - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - if (rc <= 0) { - pr_err("%s:%d failed: reset timeout\n", __func__, - __LINE__); - vfe_dev->reset_pending = 0; - } - } - - return rc; -} - -static void msm_vfe46_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x80); -} - -static void msm_vfe46_axi_update_cgc_override(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - if (enable) - val |= (1 << wm_idx); - else - val &= ~(1 << wm_idx); - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x3C); -} - -static void msm_vfe46_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - val = msm_camera_io_r(vfe_dev->vfe_base + VFE46_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE46_WM_BASE(wm_idx)); -} - -static void msm_vfe46_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE46_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3D8); -} - -static void msm_vfe46_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE46_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe46_convert_bpp_to_reg(int32_t bpp, uint32_t *bpp_reg) -{ - int rc = 0; - switch (bpp) { - case 8: - *bpp_reg = 0; - break; - case 10: - *bpp_reg = 0x1; - break; - case 12: - *bpp_reg = 0x2; - break; - case 14: - *bpp_reg = 0x3; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - return rc; -} - -static int32_t msm_vfe46_convert_io_fmt_to_reg( - enum msm_isp_pack_fmt pack_format, uint32_t *pack_reg) -{ - int rc = 0; - - switch (pack_format) { - case QCOM: - *pack_reg = 0x0; - break; - case MIPI: - *pack_reg = 0x1; - break; - case DPCM6: - *pack_reg = 0x2; - break; - case DPCM8: - *pack_reg = 0x3; - break; - case PLAIN8: - *pack_reg = 0x4; - break; - case PLAIN16: - *pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt %d!\n", __func__, pack_format); - return -EINVAL; - } - - return rc; -} -static int32_t msm_vfe46_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int rc = 0; - int bpp = 0, read_bpp = 0; - enum msm_isp_pack_fmt pack_fmt = 0, read_pack_fmt = 0; - uint32_t bpp_reg = 0, pack_reg = 0; - uint32_t read_bpp_reg = 0, read_pack_reg = 0; - uint32_t io_format_reg = 0; /*io format register bit*/ - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x88); - - /*input config*/ - if ((stream_src < RDI_INTF_0) && - (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == - EXTERNAL_READ)) { - read_bpp = msm_isp_get_bit_per_pixel( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe46_convert_bpp_to_reg(read_bpp, &read_bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! in_bpp %d rc %d\n", - __func__, read_bpp, rc); - return rc; - } - - read_pack_fmt = msm_isp_get_pack_format( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe46_convert_io_fmt_to_reg( - read_pack_fmt, &read_pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - /*use input format(v4l2_pix_fmt) to get pack format*/ - io_format_reg &= 0xFFC8FFFF; - io_format_reg |= (read_bpp_reg << 20 | read_pack_reg << 16); - } - - bpp = msm_isp_get_bit_per_pixel(io_format); - rc = msm_vfe46_convert_bpp_to_reg(bpp, &bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! bpp %d rc = %d\n", - __func__, bpp, rc); - return rc; - } - - switch (stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - /*use output format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - rc = msm_vfe46_convert_io_fmt_to_reg(pack_fmt, &pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x88); - return 0; -} - -static int msm_vfe46_start_fetch_engine(struct vfe_device *vfe_dev, - void *arg) -{ - int rc = 0; - uint32_t bufq_handle; - struct msm_isp_buffer *buf = NULL; - struct msm_vfe_fetch_eng_start *fe_cfg = arg; - - if (vfe_dev->fetch_engine_info.is_busy == 1) { - pr_err("%s: fetch engine busy\n", __func__); - return -EINVAL; - } - - /* There is other option of passing buffer address from user, - in such case, driver needs to map the buffer and use it*/ - bufq_handle = vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, fe_cfg->session_id, fe_cfg->stream_id); - vfe_dev->fetch_engine_info.bufq_handle = bufq_handle; - vfe_dev->fetch_engine_info.session_id = fe_cfg->session_id; - vfe_dev->fetch_engine_info.stream_id = fe_cfg->stream_id; - - rc = vfe_dev->buf_mgr->ops->get_buf_by_index( - vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf); - if (rc < 0) { - pr_err("%s: No fetch buffer\n", __func__); - return -EINVAL; - } - vfe_dev->fetch_engine_info.buf_idx = fe_cfg->buf_idx; - vfe_dev->fetch_engine_info.is_busy = 1; - - msm_camera_io_w(buf->mapped_info[0].paddr, vfe_dev->vfe_base + 0x268); - - msm_camera_io_w_mb(0x100000, vfe_dev->vfe_base + 0x80); - msm_camera_io_w_mb(0x200000, vfe_dev->vfe_base + 0x80); - - ISP_DBG("%s:VFE%d Fetch Engine ready\n", __func__, vfe_dev->pdev->id); - buf->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - - return 0; -} - -static void msm_vfe46_cfg_fetch_engine(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t x_size_word, temp; - struct msm_vfe_fetch_engine_cfg *fe_cfg = NULL; - - if (pix_cfg->input_mux == EXTERNAL_READ) { - fe_cfg = &pix_cfg->fetch_engine_cfg; - pr_debug("%s:VFE%d wd x ht buf = %d x %d, fe = %d x %d\n", - __func__, vfe_dev->pdev->id, fe_cfg->buf_width, - fe_cfg->buf_height, - fe_cfg->fetch_width, fe_cfg->fetch_height); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x84); - temp &= 0xFFFFFFFD; - temp |= (1 << 1); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x84); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - temp &= 0xFEFFFFFF; - temp |= (1 << 24); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x5C); - - temp = fe_cfg->fetch_height - 1; - msm_camera_io_w(temp & 0x3FFF, vfe_dev->vfe_base + 0x278); - - x_size_word = msm_isp_cal_word_per_line( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format, - fe_cfg->fetch_width); - msm_camera_io_w((x_size_word - 1) << 16, - vfe_dev->vfe_base + 0x27C); - - msm_camera_io_w(x_size_word << 16 | - (temp & 0x3FFF) << 2 | VFE46_FETCH_BURST_LEN, - vfe_dev->vfe_base + 0x280); - - temp = ((fe_cfg->buf_width - 1) & 0x3FFF) << 16 | - ((fe_cfg->buf_height - 1) & 0x3FFF); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x284); - - /* need to use formulae to calculate MAIN_UNPACK_PATTERN*/ - msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x288); - msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x2A4); - - vfe_dev->hw_info->vfe_ops.axi_ops.update_cgc_override(vfe_dev, - VFE46_BUS_RD_CGC_OVERRIDE_BIT, 1); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - temp |= 2 << 5; - temp |= 128 << 8; - temp |= pix_cfg->pixel_pattern; - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x50); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - } else { - pr_err("%s: Invalid mux configuration - mux: %d", __func__, - pix_cfg->input_mux); - } -} - -static void msm_vfe46_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - msm_camera_io_w(pix_cfg->input_mux << 5 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x50); - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x3B4); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x3B8); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x3BC); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x3C8); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x39C); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x39C); -} - -static void msm_vfe46_cfg_input_mux(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t core_cfg = 0; - uint32_t val = 0; - - core_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - core_cfg &= 0xFFFFFF9F; - - switch (pix_cfg->input_mux) { - case CAMIF: - core_cfg |= 0x0 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_camif(vfe_dev, pix_cfg); - break; - case TESTGEN: - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - val |= (1 << 31); - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3C); - - /* CAMIF and TESTGEN will both go thorugh CAMIF*/ - core_cfg |= 0x1 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_camif(vfe_dev, pix_cfg); - break; - case EXTERNAL_READ: - core_cfg |= 0x2 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe46_cfg_fetch_engine(vfe_dev, pix_cfg); - break; - default: - pr_err("%s: Unsupported input mux %d\n", - __func__, pix_cfg->input_mux); - break; - } - return; -} - -static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - val |= 0xF5; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x3CC); - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3AC); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3AC); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x3A8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - /* testgen GO*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - /* testgen OFF*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } -} - -static void msm_vfe46_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE46_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x03; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE46_RDI_BASE(rdi)); -} - -static void msm_vfe46_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE46_WM_BASE(stream_info->wm[plane_idx]); - - val = msm_camera_io_r(vfe_dev->vfe_base + wm_base + 0xC); - val &= ~0x2; - if (stream_info->frame_based) - val |= 0x2; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - if (!stream_info->frame_based) { - /* WR_IMAGE_SIZE */ - val = - ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+3)/4 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - val = VFE46_BURST_LEN | - (stream_info->plane_cfg[plane_idx].output_height - 1) << - 2 | - ((msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride)+1)/2) << 16; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - } - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe46_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE46_WM_BASE(stream_info->wm[plane_idx]); - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /* WR_IMAGE_SIZE */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe46_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /* SINGLE_STREAM_SEL */ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - /* PAIR_STREAM_SWAP_CTRL */ - xbar_cfg |= 0x3 << 4; - break; - } - xbar_cfg |= 0x1 << 2; /* PAIR_STREAM_EN */ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /* VIEW_STREAM_EN */ - else if (stream_info->stream_src == PIX_VIDEO) - xbar_cfg |= 0x2; - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0xC00; - break; - case RDI_INTF_1: - xbar_cfg = 0xD00; - break; - case RDI_INTF_2: - xbar_cfg = 0xE00; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE46_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE46_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); -} - -static void msm_vfe46_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE46_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE46_XBAR_BASE(wm)); -} - - -static void msm_vfe46_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->pdev->id == ISP_VFE0) { - prop_size = MSM_ISP46_TOTAL_IMAGE_UB_VFE0 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - prop_size = MSM_ISP46_TOTAL_IMAGE_UB_VFE1 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe46_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t ub_equal_slice = 0; - if (vfe_dev->pdev->id == ISP_VFE0) { - ub_equal_slice = MSM_ISP46_TOTAL_IMAGE_UB_VFE0 / - axi_data->hw_info->num_wm; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - ub_equal_slice = MSM_ISP46_TOTAL_IMAGE_UB_VFE1 / - axi_data->hw_info->num_wm; - } else { - pr_err("%s: incorrect VFE device\n ", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (ub_equal_slice - 1), - vfe_dev->vfe_base + VFE46_WM_BASE(i) + 0x10); - ub_offset += ub_equal_slice; - } -} - -static void msm_vfe46_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe46_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe46_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe46_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE46_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - int rc = 0; - - /* Keep only halt and restart mask */ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x60); - - /*Clear IRQ Status0, only leave reset irq mask*/ - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - - /*Clear IRQ Status1, only leave halt irq mask*/ - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - - /*push clear cmd*/ - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - if (blocking) { - init_completion(&vfe_dev->halt_complete); - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - rc = wait_for_completion_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } else { - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - } - - /* if any stream is waiting for update, signal complete */ - if (vfe_dev->axi_data.stream_update) { - ISP_DBG("%s: complete stream update\n", __func__); - msm_isp_axi_stream_update(vfe_dev, 0xF); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, 0xF); - } - - if (atomic_read(&vfe_dev->stats_data.stats_update)) { - ISP_DBG("%s: complete on stats update\n", __func__); - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - } - - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - ISP_DBG("%s: complete on axi config update\n", __func__); - msm_isp_axi_cfg_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - } - - return rc; -} - -static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, - uint32_t blocking, uint32_t enable_camif) -{ - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x3CC); - /* Start AXI */ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - - if (enable_camif) { - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - - return 0; -} - -static uint32_t msm_vfe46_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe46_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe46_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x2A8); -} - -static int msm_vfe46_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_HDR_BE: - return STATS_IDX_HDR_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_HDR_BHIST: - return STATS_IDX_HDR_BHIST; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe46_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe46_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask < 1) - /* no stats composite masks */ - return; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - stats_data->reg_mask = - msm_camera_io_r(vfe_dev->vfe_base + 0x78); - comp_stats_mask = - stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - stats_data->reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_set(stats_comp, stats_mask | - atomic_read(stats_comp)); - break; - - } else { - - if (!(atomic_read(stats_comp) & stats_mask)) - continue; - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_set(stats_comp, - ~(1 << STATS_IDX_BF_SCALE) & - atomic_read(stats_comp)); - - atomic_set(stats_comp, - ~stats_mask & atomic_read(stats_comp)); - stats_data->reg_mask &= ~(mask_bf_scale << (16 + i*8)); - break; - } - } - - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, stats_data->reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x78); - return; -} - -static void msm_vfe46_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe46_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE46_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe46_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE46_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe46_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t ub_size[VFE46_NUM_STATS_TYPE] = { - 16, /* MSM_ISP_STATS_BF_SCALE */ - 16, /* MSM_ISP_STATS_HDR_BE */ - 16, /* MSM_ISP_STATS_BG */ - 16, /* MSM_ISP_STATS_BF */ - 16, /* MSM_ISP_STATS_HDR_BHIST */ - 16, /* MSM_ISP_STATS_RS */ - 16, /* MSM_ISP_STATS_CS */ - 16, /* MSM_ISP_STATS_IHIST */ - 16, /* MSM_ISP_STATS_BHIST */ - }; - if (vfe_dev->pdev->id == ISP_VFE1) { - ub_offset = VFE46_UB_SIZE_VFE1; - } else if (vfe_dev->pdev->id == ISP_VFE0) { - ub_offset = VFE46_UB_SIZE_VFE0; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE46_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE46_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe46_stats_update_cgc_override(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, cgc_mask = 0; - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - cgc_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - cgc_mask |= (1 << 1); - break; - case STATS_IDX_BF: - cgc_mask |= (1 << 2); - break; - case STATS_IDX_BG: - cgc_mask |= (1 << 3); - break; - case STATS_IDX_BHIST: - cgc_mask |= (1 << 4); - break; - case STATS_IDX_RS: - cgc_mask |= (1 << 5); - break; - case STATS_IDX_CS: - cgc_mask |= (1 << 6); - break; - case STATS_IDX_IHIST: - cgc_mask |= (1 << 7); - break; - case STATS_IDX_BF_SCALE: - cgc_mask |= (1 << 2); - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - /* CGC override */ - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - if (enable) - module_cfg |= cgc_mask; - else - module_cfg &= ~cgc_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x30); -} - -static void msm_vfe46_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE46_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - module_cfg_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - module_cfg_mask |= 1 << 1; - break; - case STATS_IDX_BF: - module_cfg_mask |= 1 << 2; - break; - case STATS_IDX_BG: - module_cfg_mask |= 1 << 3; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 4; - break; - case STATS_IDX_RS: - module_cfg_mask |= 1 << 5; - break; - case STATS_IDX_CS: - module_cfg_mask |= 1 << 6; - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 7; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 5; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x44); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x9B8); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x9B8); -} - -static void msm_vfe46_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE46_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe46_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe46_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe46_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; -} - -static int msm_vfe46_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - if (vfe_dev->hw_info->num_iommu_secure_ctx) { - vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); - if (!vfe_dev->iommu_secure_ctx[0]) { - pr_err("%s: cannot get secure iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe46_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static void msm_vfe46_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x01FFFE7E; -} - -static void msm_vfe46_get_rdi_wm_mask(struct vfe_device *vfe_dev, - uint32_t *rdi_wm_mask) -{ - *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; -} - -static void msm_vfe46_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x60); -} - -static void msm_vfe46_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x60); -} - - -static void msm_vfe46_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} -static struct msm_vfe_axi_hardware_info msm_vfe46_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 96, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe46_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_HDR_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_HDR_BHIST | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE46_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE46_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe46_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe46_subdev_ops = { - .core = &msm_vfe46_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe46_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe46_hw_info = { - .num_iommu_ctx = 1, - .num_iommu_secure_ctx = 1, - .vfe_clk_idx = VFE46_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe46_read_irq_status, - .process_camif_irq = msm_vfe46_process_input_irq, - .process_reset_irq = msm_vfe46_process_reset_irq, - .process_halt_irq = msm_vfe46_process_halt_irq, - .process_reset_irq = msm_vfe46_process_reset_irq, - .process_reg_update = msm_vfe46_process_reg_update, - .process_epoch_irq = msm_vfe46_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe46_axi_reload_wm, - .enable_wm = msm_vfe46_axi_enable_wm, - .cfg_io_format = msm_vfe46_cfg_io_format, - .cfg_comp_mask = msm_vfe46_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe46_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe46_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe46_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe46_cfg_framedrop, - .clear_framedrop = msm_vfe46_clear_framedrop, - .cfg_wm_reg = msm_vfe46_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe46_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe46_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe46_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe46_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe46_update_ping_pong_addr, - .get_comp_mask = msm_vfe46_get_comp_mask, - .get_wm_mask = msm_vfe46_get_wm_mask, - .get_pingpong_status = msm_vfe46_get_pingpong_status, - .halt = msm_vfe46_axi_halt, - .restart = msm_vfe46_axi_restart, - .update_cgc_override = - msm_vfe46_axi_update_cgc_override, - }, - .core_ops = { - .reg_update = msm_vfe46_reg_update, - .cfg_input_mux = msm_vfe46_cfg_input_mux, - .update_camif_state = msm_vfe46_update_camif_state, - .start_fetch_eng = msm_vfe46_start_fetch_engine, - .cfg_rdi_reg = msm_vfe46_cfg_rdi_reg, - .reset_hw = msm_vfe46_reset_hardware, - .init_hw = msm_vfe46_init_hardware, - .init_hw_reg = msm_vfe46_init_hardware_reg, - .clear_status_reg = msm_vfe46_clear_status_reg, - .release_hw = msm_vfe46_release_hardware, - .get_platform_data = msm_vfe46_get_platform_data, - .get_error_mask = msm_vfe46_get_error_mask, - .get_overflow_mask = msm_vfe46_get_overflow_mask, - .get_rdi_wm_mask = msm_vfe46_get_rdi_wm_mask, - .get_irq_mask = msm_vfe46_get_irq_mask, - .restore_irq_mask = msm_vfe46_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe46_get_halt_restart_mask, - .process_error_status = msm_vfe46_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe46_get_stats_idx, - .check_streams = msm_vfe46_stats_check_streams, - .cfg_comp_mask = msm_vfe46_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe46_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe46_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe46_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe46_stats_clear_wm_reg, - .cfg_ub = msm_vfe46_stats_cfg_ub, - .enable_module = msm_vfe46_stats_enable_module, - .update_ping_pong_addr = - msm_vfe46_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe46_stats_get_comp_mask, - .get_wm_mask = msm_vfe46_stats_get_wm_mask, - .get_frame_id = msm_vfe46_stats_get_frame_id, - .get_pingpong_status = msm_vfe46_get_pingpong_status, - .update_cgc_override = - msm_vfe46_stats_update_cgc_override, - }, - }, - .dmi_reg_offset = 0xACC, - .axi_hw_info = &msm_vfe46_axi_hw_info, - .stats_hw_info = &msm_vfe46_stats_hw_info, - .subdev_ops = &msm_vfe46_subdev_ops, - .subdev_internal_ops = &msm_vfe46_internal_ops, -}; -EXPORT_SYMBOL(vfe46_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.h deleted file mode 100644 index bf8739318d41..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp46.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP46_H__ -#define __MSM_ISP46_H__ - -extern struct msm_vfe_hardware_info vfe46_hw_info; -#endif /* __MSM_ISP46_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.c deleted file mode 100644 index 9503aac9544a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.c +++ /dev/null @@ -1,1933 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include - -#include "msm_isp47.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_isp.h" -#include "msm.h" -#include "msm_camera_io_util.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) - -#define STATS_IDX_BF_SCALE 0 -#define STATS_IDX_HDR_BE 1 -#define STATS_IDX_BG 2 -#define STATS_IDX_BF 3 -#define STATS_IDX_HDR_BHIST 4 -#define STATS_IDX_RS 5 -#define STATS_IDX_CS 6 -#define STATS_IDX_IHIST 7 -#define STATS_IDX_BHIST 8 - -#define VFE47_8996V1_VERSION 0x60000000 - -#define VFE47_BURST_LEN 3 -#define VFE47_FETCH_BURST_LEN 3 -#define VFE47_STATS_BURST_LEN 3 -#define VFE47_UB_SIZE_VFE0 2048 -#define VFE47_UB_SIZE_VFE1 1536 -#define VFE47_UB_STATS_SIZE 144 -#define MSM_ISP47_TOTAL_IMAGE_UB_VFE0 (VFE47_UB_SIZE_VFE0 - VFE47_UB_STATS_SIZE) -#define MSM_ISP47_TOTAL_IMAGE_UB_VFE1 (VFE47_UB_SIZE_VFE1 - VFE47_UB_STATS_SIZE) -#define VFE47_WM_BASE(idx) (0xA0 + 0x24 * idx) -#define VFE47_RDI_BASE(idx) (0x39C + 0x4 * idx) -#define VFE47_XBAR_BASE(idx) (0x90 + 0x4 * (idx / 2)) -#define VFE47_XBAR_SHIFT(idx) ((idx%2) ? 16 : 0) -#define VFE47_PING_PONG_BASE(wm, ping_pong) \ - (VFE47_WM_BASE(wm) + 0x4 * (1 + (~(ping_pong >> wm) & 0x1))) -#define SHIFT_BF_SCALE_BIT 1 -#define VFE47_NUM_STATS_COMP 2 - -static uint32_t stats_base_addr[] = { - 0x1E4, /* BF_SCALE */ - 0x19C, /* HDR_BE */ - 0x1F0, /* BG */ - 0x1CC, /* BF */ - 0x1B4, /* HDR_BHIST */ - 0x220, /* RS */ - 0x238, /* CS */ - 0x250, /* IHIST */ - 0x208, /* BHIST (SKIN_BHIST) */ -}; - -static uint8_t stats_pingpong_offset_map[] = { - 11, /* BF_SCALE */ - 8, /* HDR_BE */ - 12, /* BG */ - 10, /* BF */ - 9, /* HDR_BHIST */ - 14, /* RS */ - 15, /* CS */ - 16, /* IHIST */ - 13, /* BHIST (SKIN_BHIST) */ -}; - -#define VFE47_NUM_STATS_TYPE 9 -#define VFE47_STATS_BASE(idx) (stats_base_addr[idx]) -#define VFE47_STATS_PING_PONG_BASE(idx, ping_pong) \ - (VFE47_STATS_BASE(idx) + 0x4 * \ - (~(ping_pong >> (stats_pingpong_offset_map[idx])) & 0x1)) - -#define VFE47_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define VFE47_BUS_BDG_QOS_CFG_BASE 0x378 -#define VFE47_BUS_BDG_QOS_CFG_NUM 8 -#define VFE47_BUS_BDG_DS_CFG_BASE 0xBD8 -#define VFE47_BUS_BDG_DS_CFG_NUM 17 - -#define VFE47_CLK_IDX 2 -static struct msm_cam_clk_info msm_vfe47_clk_info[VFE_CLK_INFO_MAX]; - -static uint32_t vfe47_qos_settings_8996_v1[] = { - 0xAAA9AAA9, /* QOS_CFG_0 */ - 0xAAA9AAA9, /* QOS_CFG_1 */ - 0xAAA9AAA9, /* QOS_CFG_2 */ - 0xAAA9AAA9, /* QOS_CFG_3 */ - 0xAAA9AAA9, /* QOS_CFG_4 */ - 0xAAA9AAA9, /* QOS_CFG_5 */ - 0xAAA9AAA9, /* QOS_CFG_6 */ - 0x0001AAA9, /* QOS_CFG_7 */ -}; - -static uint32_t vfe47_ds_settings_8996_v1[] = { - 0x44441111, /* DS_CFG_0 */ - 0x44441111, /* DS_CFG_1 */ - 0x44441111, /* DS_CFG_2 */ - 0x44441111, /* DS_CFG_3 */ - 0x44441111, /* DS_CFG_4 */ - 0x44441111, /* DS_CFG_5 */ - 0x44441111, /* DS_CFG_6 */ - 0x44441111, /* DS_CFG_7 */ - 0x44441111, /* DS_CFG_8 */ - 0x44441111, /* DS_CFG_9 */ - 0x44441111, /* DS_CFG_10 */ - 0x44441111, /* DS_CFG_11 */ - 0x44441111, /* DS_CFG_12 */ - 0x44441111, /* DS_CFG_13 */ - 0x44441111, /* DS_CFG_14 */ - 0x44441111, /* DS_CFG_15 */ - 0x00000103, /* DS_CFG_16 */ -}; - -static void msm_vfe47_init_qos_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *qos_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) - qos_settings = vfe47_qos_settings_8996_v1; - - if (qos_settings == NULL) { - pr_err("%s: QOS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE47_BUS_BDG_QOS_CFG_NUM; i++) - msm_camera_io_w(qos_settings[i], - vfebase + VFE47_BUS_BDG_QOS_CFG_BASE + i * 4); - } -} - -static void msm_vfe47_init_vbif_parms(struct vfe_device *vfe_dev) -{ - void __iomem *vfe_vbif_base = vfe_dev->vfe_vbif_base; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) { - msm_camera_io_w(0x3, - vfe_vbif_base + VFE47_VBIF_ROUND_ROBIN_QOS_ARB); - } else { - pr_err("%s: VBIF is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } -} - -static void msm_vfe47_init_danger_safe_parms( - struct vfe_device *vfe_dev) -{ - void __iomem *vfebase = vfe_dev->vfe_base; - uint32_t *ds_settings = NULL; - - if (vfe_dev->vfe_hw_version >= VFE47_8996V1_VERSION) - ds_settings = vfe47_ds_settings_8996_v1; - - if (ds_settings == NULL) { - pr_err("%s: DS is NOT configured for HW Version %x\n", - __func__, vfe_dev->vfe_hw_version); - BUG(); - } else { - uint32_t i; - for (i = 0; i < VFE47_BUS_BDG_DS_CFG_NUM; i++) - msm_camera_io_w(ds_settings[i], - vfebase + VFE47_BUS_BDG_DS_CFG_BASE + i * 4); - } -} - -static int msm_vfe47_init_hardware(struct vfe_device *vfe_dev) -{ - int rc = -1; - - rc = msm_isp_init_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (vfe_dev->fs_vfe) { - rc = regulator_enable(vfe_dev->fs_vfe); - if (rc) { - pr_err("%s: Regulator enable failed\n", __func__); - goto fs_failed; - } - } - - rc = msm_isp_get_clk_info(vfe_dev, vfe_dev->pdev, msm_vfe47_clk_info); - if (rc < 0) { - pr_err("msm_isp_get_clk_info() failed\n"); - goto fs_failed; - } - if (vfe_dev->num_clk <= 0) { - pr_err("%s: Invalid num of clock\n", __func__); - goto fs_failed; - } else { - vfe_dev->vfe_clk = - kzalloc(sizeof(struct clk *) * vfe_dev->num_clk, - GFP_KERNEL); - if (!vfe_dev->vfe_clk) { - pr_err("%s:%d No memory\n", __func__, __LINE__); - return -ENOMEM; - } - } - rc = msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 1); - if (rc < 0) - goto clk_enable_failed; - - vfe_dev->vfe_base = ioremap(vfe_dev->vfe_mem->start, - resource_size(vfe_dev->vfe_mem)); - if (!vfe_dev->vfe_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vfe_remap_failed; - } - - vfe_dev->vfe_vbif_base = ioremap(vfe_dev->vfe_vbif_mem->start, - resource_size(vfe_dev->vfe_vbif_mem)); - if (!vfe_dev->vfe_vbif_base) { - rc = -ENOMEM; - pr_err("%s: vfe ioremap failed\n", __func__); - goto vbif_remap_failed; - } - - rc = request_irq(vfe_dev->vfe_irq->start, msm_isp_process_irq, - IRQF_TRIGGER_RISING, "vfe", vfe_dev); - if (rc < 0) { - pr_err("%s: irq request failed\n", __func__); - goto irq_req_failed; - } - return rc; -irq_req_failed: - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; -vbif_remap_failed: - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; -vfe_remap_failed: - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); -clk_enable_failed: - if (vfe_dev->fs_vfe) - regulator_disable(vfe_dev->fs_vfe); - kfree(vfe_dev->vfe_clk); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -bus_scale_register_failed: - return rc; -} - -static void msm_vfe47_release_hardware(struct vfe_device *vfe_dev) -{ - free_irq(vfe_dev->vfe_irq->start, vfe_dev); - tasklet_kill(&vfe_dev->vfe_tasklet); - iounmap(vfe_dev->vfe_vbif_base); - vfe_dev->vfe_vbif_base = NULL; - iounmap(vfe_dev->vfe_base); - vfe_dev->vfe_base = NULL; - msm_cam_clk_enable(&vfe_dev->pdev->dev, msm_vfe47_clk_info, - vfe_dev->vfe_clk, vfe_dev->num_clk, 0); - kfree(vfe_dev->vfe_clk); - regulator_disable(vfe_dev->fs_vfe); - msm_isp_deinit_bandwidth_mgr(ISP_VFE0 + vfe_dev->pdev->id); -} - -static void msm_vfe47_init_hardware_reg(struct vfe_device *vfe_dev) -{ - msm_vfe47_init_qos_parms(vfe_dev); - msm_vfe47_init_vbif_parms(vfe_dev); - msm_vfe47_init_danger_safe_parms(vfe_dev); - /* MODULE_LENS_CGC_OVERRIDE */ - msm_camera_io_w(0x00000383, vfe_dev->vfe_base + 0x2C); - /* MODULE_COLOR_CGC_OVERRIDE */ - msm_camera_io_w(0x0000001C, vfe_dev->vfe_base + 0x34); - /* BUS_CFG */ - msm_camera_io_w(0x00000001, vfe_dev->vfe_base + 0x84); - /* IRQ_MASK/CLEAR */ - msm_camera_io_w(0xE00000F1, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0xE1FFFFFF, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(vfe_dev->stats_data.reg_mask, - vfe_dev->vfe_base + 0x78); -} - -static void msm_vfe47_clear_status_reg(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(0x80000000, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x60); - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x58); -} - -static void msm_vfe47_process_reset_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status0 & (1 << 31)) { - complete(&vfe_dev->reset_complete); - vfe_dev->reset_pending = 0; - } -} - -static void msm_vfe47_process_halt_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - if (irq_status1 & (1 << 8)) { - complete(&vfe_dev->halt_complete); - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - } -} - -static void msm_vfe47_process_epoch_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0xc)) - return; - if (irq_status0 & (1 << 2)) - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); -} - -static void msm_vfe47_process_input_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - if (!(irq_status0 & 0x100000F)) - return; - - if (irq_status0 & (1 << 24)) { - ISP_DBG("%s: Fetch Engine Read IRQ\n", __func__); - msm_isp_fetch_engine_done_notify(vfe_dev, - &vfe_dev->fetch_engine_info); - } - - if (irq_status0 & (1 << 0)) { - ISP_DBG("%s: SOF IRQ\n", __func__); - if (vfe_dev->axi_data.src_info[VFE_PIX_0].raw_stream_count > 0 - && vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count == 0) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_PIX_0, ts); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, - (1 << VFE_PIX_0)); - msm_isp_update_framedrop_reg(vfe_dev, (1 << VFE_PIX_0)); - } - } - if (irq_status0 & (1 << 1)) - ISP_DBG("%s: EOF IRQ\n", __func__); - if (irq_status0 & (1 << 2)) - ISP_DBG("%s: EPOCH0 IRQ\n", __func__); - if (irq_status0 & (1 << 3)) - ISP_DBG("%s: EPOCH1 IRQ\n", __func__); -} - -static void msm_vfe47_process_violation_status( - struct vfe_device *vfe_dev) -{ - uint32_t violation_status = vfe_dev->error_info.violation_status; - - if (violation_status > 39) { - pr_err("%s: invalid violation status %d\n", - __func__, violation_status); - return; - } - - pr_err("%s: VFE pipeline violation status %d\n", __func__, - violation_status); -} - -static void msm_vfe47_process_error_status(struct vfe_device *vfe_dev) -{ - uint32_t error_status1 = vfe_dev->error_info.error_mask1; - - if (error_status1 & (1 << 0)) - pr_err("%s: camif error status: 0x%x\n", - __func__, vfe_dev->error_info.camif_status); - if (error_status1 & (1 << 1)) - pr_err("%s: stats bhist overwrite\n", __func__); - if (error_status1 & (1 << 2)) - pr_err("%s: stats cs overwrite\n", __func__); - if (error_status1 & (1 << 3)) - pr_err("%s: stats ihist overwrite\n", __func__); - if (error_status1 & (1 << 4)) - pr_err("%s: realign buf y overflow\n", __func__); - if (error_status1 & (1 << 5)) - pr_err("%s: realign buf cb overflow\n", __func__); - if (error_status1 & (1 << 6)) - pr_err("%s: realign buf cr overflow\n", __func__); - if (error_status1 & (1 << 7)) { - pr_err("%s: violation\n", __func__); - msm_vfe47_process_violation_status(vfe_dev); - } - if (error_status1 & (1 << 9)) - pr_err("%s: image master 0 bus overflow\n", __func__); - if (error_status1 & (1 << 10)) - pr_err("%s: image master 1 bus overflow\n", __func__); - if (error_status1 & (1 << 11)) - pr_err("%s: image master 2 bus overflow\n", __func__); - if (error_status1 & (1 << 12)) - pr_err("%s: image master 3 bus overflow\n", __func__); - if (error_status1 & (1 << 13)) - pr_err("%s: image master 4 bus overflow\n", __func__); - if (error_status1 & (1 << 14)) - pr_err("%s: image master 5 bus overflow\n", __func__); - if (error_status1 & (1 << 15)) - pr_err("%s: image master 6 bus overflow\n", __func__); - if (error_status1 & (1 << 16)) - pr_err("%s: status hdr be bus overflow\n", __func__); - if (error_status1 & (1 << 17)) - pr_err("%s: status bg bus overflow\n", __func__); - if (error_status1 & (1 << 18)) - pr_err("%s: status bf bus overflow\n", __func__); - if (error_status1 & (1 << 19)) - pr_err("%s: status hdr bhist bus overflow\n", __func__); - if (error_status1 & (1 << 20)) - pr_err("%s: status rs bus overflow\n", __func__); - if (error_status1 & (1 << 21)) - pr_err("%s: status cs bus overflow\n", __func__); - if (error_status1 & (1 << 22)) - pr_err("%s: status ihist bus overflow\n", __func__); - if (error_status1 & (1 << 23)) - pr_err("%s: status skin bhist bus overflow\n", __func__); - if (error_status1 & (1 << 24)) - pr_err("%s: status bf scale bus overflow\n", __func__); -} - -static void msm_vfe47_read_irq_status(struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - *irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C); - *irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70); - msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(*irq_status1, vfe_dev->vfe_base + 0x68); - msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); - - if (*irq_status1 & (1 << 0)) - vfe_dev->error_info.camif_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x3D0); - - if (*irq_status1 & (1 << 7)) - vfe_dev->error_info.violation_status = - msm_camera_io_r(vfe_dev->vfe_base + 0x7C); - -} - -static void msm_vfe47_process_reg_update(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - uint8_t input_src = 0x0; - if (!(irq_status0 & 0xF0)) - return; - - if (irq_status0 & BIT(4)) { - msm_isp_notify(vfe_dev, ISP_EVENT_REG_UPDATE, VFE_PIX_0, ts); - input_src |= (1 << VFE_PIX_0); - } - if (irq_status0 & BIT(5)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_0, ts); - input_src |= (1 << VFE_RAW_0); - } - if (irq_status0 & BIT(6)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_1, ts); - input_src |= (1 << VFE_RAW_1); - } - if (irq_status0 & BIT(7)) { - msm_isp_notify(vfe_dev, ISP_EVENT_SOF, VFE_RAW_2, ts); - input_src |= (1 << VFE_RAW_2); - } - - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, input_src); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - if (vfe_dev->axi_data.stream_update || - atomic_read(&vfe_dev->stats_data.stats_update) || - atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - if (input_src & (1 << VFE_PIX_0)) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - msm_isp_update_framedrop_reg(vfe_dev, input_src); - msm_isp_update_stats_framedrop_reg(vfe_dev); - msm_isp_update_error_frame_count(vfe_dev); - if ((input_src & (1 << VFE_RAW_0)) || - (input_src & (1 << VFE_RAW_1)) || - (input_src & (1 << VFE_RAW_2))) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, input_src); - } - return; -} - -static void msm_vfe47_reg_update(struct vfe_device *vfe_dev, uint32_t input_src) -{ - msm_camera_io_w_mb(input_src, vfe_dev->vfe_base + 0x3D8); -} - -static long msm_vfe47_reset_hardware(struct vfe_device *vfe_dev, - uint32_t first_start, uint32_t blocking_call) -{ - long rc = 0; - init_completion(&vfe_dev->reset_complete); - - if (blocking_call) - vfe_dev->reset_pending = 1; - - if (first_start) { - msm_camera_io_w_mb(0x1FF, vfe_dev->vfe_base + 0x18); - } else { - msm_camera_io_w_mb(0x1EF, vfe_dev->vfe_base + 0x18); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0x0001FFFF); - } - - if (blocking_call) { - rc = wait_for_completion_timeout( - &vfe_dev->reset_complete, msecs_to_jiffies(50)); - if (rc <= 0) { - pr_err("%s:%d failed: reset timeout\n", __func__, - __LINE__); - vfe_dev->reset_pending = 0; - } - } - - return rc; -} - -static void msm_vfe47_axi_reload_wm( - struct vfe_device *vfe_dev, uint32_t reload_mask) -{ - msm_camera_io_w_mb(reload_mask, vfe_dev->vfe_base + 0x80); -} - -static void msm_vfe47_axi_update_cgc_override(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - if (enable) - val |= (1 << wm_idx); - else - val &= ~(1 << wm_idx); - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x3C); -} - -static void msm_vfe47_axi_enable_wm(struct vfe_device *vfe_dev, - uint8_t wm_idx, uint8_t enable) -{ - uint32_t val; - - val = msm_camera_io_r(vfe_dev->vfe_base + VFE47_WM_BASE(wm_idx)); - if (enable) - val |= 0x1; - else - val &= ~0x1; - msm_camera_io_w_mb(val, - vfe_dev->vfe_base + VFE47_WM_BASE(wm_idx)); -} - -static void msm_vfe47_axi_cfg_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t comp_mask, comp_mask_index = - stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - comp_mask |= (axi_data->composite_info[comp_mask_index]. - stream_composite_mask << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (comp_mask_index + 25); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_clear_comp_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t comp_mask, comp_mask_index = stream_info->comp_mask_index; - uint32_t irq_mask; - - comp_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x74); - comp_mask &= ~(0x7F << (comp_mask_index * 8)); - msm_camera_io_w(comp_mask, vfe_dev->vfe_base + 0x74); - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (comp_mask_index + 25)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_cfg_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (stream_info->wm[0] + 8); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_axi_clear_wm_irq_mask(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (stream_info->wm[0] + 8)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_cfg_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i, temp; - uint32_t framedrop_pattern = 0, framedrop_period = 0; - - if (stream_info->runtime_init_frame_drop == 0) { - framedrop_pattern = stream_info->framedrop_pattern; - framedrop_period = stream_info->framedrop_period; - } - - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_burst_frame_count == 0) { - framedrop_pattern = 0; - framedrop_period = 0; - } - - for (i = 0; i < stream_info->num_planes; i++) { - msm_camera_io_w(framedrop_pattern, vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0x1C); - temp = msm_camera_io_r(vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0xC); - temp &= 0xFFFFFF83; - msm_camera_io_w(temp | framedrop_period << 2, - vfe_dev->vfe_base + VFE47_WM_BASE(stream_info->wm[i]) + 0xC); - } - - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3D8); -} - -static void msm_vfe47_clear_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - uint32_t i; - - for (i = 0; i < stream_info->num_planes; i++) - msm_camera_io_w(0, vfe_dev->vfe_base + - VFE47_WM_BASE(stream_info->wm[i]) + 0x1C); -} - -static int32_t msm_vfe47_convert_bpp_to_reg(int32_t bpp, uint32_t *bpp_reg) -{ - int rc = 0; - switch (bpp) { - case 8: - *bpp_reg = 0; - break; - case 10: - *bpp_reg = 1 << 0; - break; - case 12: - *bpp_reg = 1 << 1; - break; - default: - pr_err("%s:%d invalid bpp %d", __func__, __LINE__, bpp); - return -EINVAL; - } - - return rc; -} - -static int32_t msm_vfe47_convert_io_fmt_to_reg( - enum msm_isp_pack_fmt pack_format, uint32_t *pack_reg) -{ - int rc = 0; - - switch (pack_format) { - case QCOM: - *pack_reg = 0x0; - break; - case MIPI: - *pack_reg = 0x1; - break; - case DPCM6: - *pack_reg = 0x2; - break; - case DPCM8: - *pack_reg = 0x3; - break; - case PLAIN8: - *pack_reg = 0x4; - break; - case PLAIN16: - *pack_reg = 0x5; - break; - default: - pr_err("%s: invalid pack fmt %d!\n", __func__, pack_format); - return -EINVAL; - } - - return rc; -} -static int32_t msm_vfe47_cfg_io_format(struct vfe_device *vfe_dev, - enum msm_vfe_axi_stream_src stream_src, uint32_t io_format) -{ - int rc = 0; - int bpp = 0, read_bpp = 0; - enum msm_isp_pack_fmt pack_fmt = 0, read_pack_fmt = 0; - uint32_t bpp_reg = 0, pack_reg = 0; - uint32_t read_bpp_reg = 0, read_pack_reg = 0; - uint32_t io_format_reg = 0; /*io format register bit*/ - - io_format_reg = msm_camera_io_r(vfe_dev->vfe_base + 0x88); - - /*input config*/ - if ((stream_src < RDI_INTF_0) && - (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == - EXTERNAL_READ)) { - read_bpp = msm_isp_get_bit_per_pixel( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe47_convert_bpp_to_reg(read_bpp, &read_bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! in_bpp %d rc %d\n", - __func__, read_bpp, rc); - return rc; - } - - read_pack_fmt = msm_isp_get_pack_format( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format); - rc = msm_vfe47_convert_io_fmt_to_reg( - read_pack_fmt, &read_pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - /*use input format(v4l2_pix_fmt) to get pack format*/ - io_format_reg &= 0xFFC8FFFF; - io_format_reg |= (read_bpp_reg << 20 | read_pack_reg << 16); - } - - bpp = msm_isp_get_bit_per_pixel(io_format); - rc = msm_vfe47_convert_bpp_to_reg(bpp, &bpp_reg); - if (rc < 0) { - pr_err("%s: convert_bpp_to_reg err! bpp %d rc = %d\n", - __func__, bpp, rc); - return rc; - } - - switch (stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: - case CAMIF_RAW: - io_format_reg &= 0xFFFFCFFF; - io_format_reg |= bpp_reg << 12; - break; - case IDEAL_RAW: - /*use output format(v4l2_pix_fmt) to get pack format*/ - pack_fmt = msm_isp_get_pack_format(io_format); - rc = msm_vfe47_convert_io_fmt_to_reg(pack_fmt, &pack_reg); - if (rc < 0) { - pr_err("%s: convert_io_fmt_to_reg err! rc = %d\n", - __func__, rc); - return rc; - } - io_format_reg &= 0xFFFFFFC8; - io_format_reg |= bpp_reg << 4 | pack_reg; - break; - case RDI_INTF_0: - case RDI_INTF_1: - case RDI_INTF_2: - default: - pr_err("%s: Invalid stream source\n", __func__); - return -EINVAL; - } - msm_camera_io_w(io_format_reg, vfe_dev->vfe_base + 0x88); - return 0; -} - -static int msm_vfe47_start_fetch_engine(struct vfe_device *vfe_dev, - void *arg) -{ - int rc = 0; - uint32_t bufq_handle; - struct msm_isp_buffer *buf = NULL; - struct msm_vfe_fetch_eng_start *fe_cfg = arg; - - if (vfe_dev->fetch_engine_info.is_busy == 1) { - pr_err("%s: fetch engine busy\n", __func__); - return -EINVAL; - } - - /* There is other option of passing buffer address from user, - in such case, driver needs to map the buffer and use it*/ - bufq_handle = vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, fe_cfg->session_id, fe_cfg->stream_id); - vfe_dev->fetch_engine_info.bufq_handle = bufq_handle; - vfe_dev->fetch_engine_info.session_id = fe_cfg->session_id; - vfe_dev->fetch_engine_info.stream_id = fe_cfg->stream_id; - - rc = vfe_dev->buf_mgr->ops->get_buf_by_index( - vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf); - if (rc < 0) { - pr_err("%s: No fetch buffer\n", __func__); - return -EINVAL; - } - vfe_dev->fetch_engine_info.buf_idx = fe_cfg->buf_idx; - vfe_dev->fetch_engine_info.is_busy = 1; - - msm_camera_io_w(buf->mapped_info[0].paddr, vfe_dev->vfe_base + 0x268); - - msm_camera_io_w_mb(0x100000, vfe_dev->vfe_base + 0x80); - msm_camera_io_w_mb(0x200000, vfe_dev->vfe_base + 0x80); - - ISP_DBG("%s:VFE%d Fetch Engine ready\n", __func__, vfe_dev->pdev->id); - buf->state = MSM_ISP_BUFFER_STATE_DISPATCHED; - - return 0; -} - -static void msm_vfe47_cfg_fetch_engine(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t x_size_word, temp; - struct msm_vfe_fetch_engine_cfg *fe_cfg = NULL; - - if (pix_cfg->input_mux == EXTERNAL_READ) { - fe_cfg = &pix_cfg->fetch_engine_cfg; - pr_debug("%s:VFE%d wd x ht buf = %d x %d, fe = %d x %d\n", - __func__, vfe_dev->pdev->id, fe_cfg->buf_width, - fe_cfg->buf_height, - fe_cfg->fetch_width, fe_cfg->fetch_height); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x84); - temp &= 0xFFFFFFFD; - temp |= (1 << 1); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x84); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - temp &= 0xFEFFFFFF; - temp |= (1 << 24); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x5C); - - temp = fe_cfg->fetch_height - 1; - msm_camera_io_w(temp & 0x3FFF, vfe_dev->vfe_base + 0x278); - - x_size_word = msm_isp_cal_word_per_line( - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format, - fe_cfg->fetch_width); - msm_camera_io_w((x_size_word - 1) << 16, - vfe_dev->vfe_base + 0x27C); - - msm_camera_io_w(x_size_word << 16 | - (temp & 0x3FFF) << 2 | VFE47_FETCH_BURST_LEN, - vfe_dev->vfe_base + 0x280); - - temp = ((fe_cfg->buf_width - 1) & 0x3FFF) << 16 | - ((fe_cfg->buf_height - 1) & 0x3FFF); - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x284); - - /* need to use formulae to calculate MAIN_UNPACK_PATTERN*/ - msm_camera_io_w(0xF6543210, vfe_dev->vfe_base + 0x288); - msm_camera_io_w(0xF, vfe_dev->vfe_base + 0x2A4); - - temp = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - temp |= 2 << 5; - temp |= 128 << 8; - temp |= pix_cfg->pixel_pattern; - msm_camera_io_w(temp, vfe_dev->vfe_base + 0x50); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - } else { - pr_err("%s: Invalid mux configuration - mux: %d", __func__, - pix_cfg->input_mux); - } -} - -static void msm_vfe47_cfg_camif(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint16_t first_pixel, last_pixel, first_line, last_line; - struct msm_vfe_camif_cfg *camif_cfg = &pix_cfg->camif_cfg; - uint32_t val; - - msm_camera_io_w(pix_cfg->input_mux << 5 | pix_cfg->pixel_pattern, - vfe_dev->vfe_base + 0x50); - - first_pixel = camif_cfg->first_pixel; - last_pixel = camif_cfg->last_pixel; - first_line = camif_cfg->first_line; - last_line = camif_cfg->last_line; - - msm_camera_io_w(camif_cfg->lines_per_frame << 16 | - camif_cfg->pixels_per_line, vfe_dev->vfe_base + 0x3B4); - - msm_camera_io_w(first_pixel << 16 | last_pixel, - vfe_dev->vfe_base + 0x3B8); - - msm_camera_io_w(first_line << 16 | last_line, - vfe_dev->vfe_base + 0x3BC); - - msm_camera_io_w(0xFFFFFFFF, vfe_dev->vfe_base + 0x3C8); - - val = msm_camera_io_r(vfe_dev->vfe_base + 0x39C); - val |= camif_cfg->camif_input; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x39C); -} - -static void msm_vfe47_cfg_input_mux(struct vfe_device *vfe_dev, - struct msm_vfe_pix_cfg *pix_cfg) -{ - uint32_t core_cfg = 0; - uint32_t val = 0; - - core_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x50); - core_cfg &= 0xFFFFFF9F; - - switch (pix_cfg->input_mux) { - case CAMIF: - core_cfg |= 0x0 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_camif(vfe_dev, pix_cfg); - break; - case TESTGEN: - /* Change CGC override */ - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3C); - val |= (1 << 31); - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3C); - - /* CAMIF and TESTGEN will both go thorugh CAMIF*/ - core_cfg |= 0x1 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_camif(vfe_dev, pix_cfg); - break; - case EXTERNAL_READ: - core_cfg |= 0x2 << 5; - msm_camera_io_w_mb(core_cfg, vfe_dev->vfe_base + 0x50); - msm_vfe47_cfg_fetch_engine(vfe_dev, pix_cfg); - break; - default: - pr_err("%s: Unsupported input mux %d\n", - __func__, pix_cfg->input_mux); - break; - } - return; -} - -static void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state update_state) -{ - uint32_t val; - bool bus_en, vfe_en; - - if (update_state == NO_UPDATE) - return; - - if (update_state == ENABLE_CAMIF) { - val = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - val |= 0xF5; - msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x5C); - msm_camera_io_w_mb(0x200, vfe_dev->vfe_base + 0x4A0); - bus_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].raw_stream_count > 0) ? 1 : 0); - vfe_en = - ((vfe_dev->axi_data. - src_info[VFE_PIX_0].pix_stream_count > 0) ? 1 : 0); - val = msm_camera_io_r(vfe_dev->vfe_base + 0x3AC); - val &= 0xFFFFFF3F; - val = val | bus_en << 7 | vfe_en << 6; - msm_camera_io_w(val, vfe_dev->vfe_base + 0x3AC); - msm_camera_io_w_mb(0x4, vfe_dev->vfe_base + 0x3A8); - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; - /* testgen GO*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF) { - msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - /* testgen OFF*/ - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } else if (update_state == DISABLE_CAMIF_IMMEDIATELY) { - msm_camera_io_w_mb(0x6, vfe_dev->vfe_base + 0x3A8); - vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) - msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); - } -} - -static void msm_vfe47_cfg_rdi_reg( - struct vfe_device *vfe_dev, struct msm_vfe_rdi_cfg *rdi_cfg, - enum msm_vfe_input_src input_src) -{ - uint8_t rdi = input_src - VFE_RAW_0; - uint32_t rdi_reg_cfg; - - rdi_reg_cfg = msm_camera_io_r( - vfe_dev->vfe_base + VFE47_RDI_BASE(rdi)); - rdi_reg_cfg &= 0x03; - rdi_reg_cfg |= (rdi * 3) << 28 | rdi_cfg->cid << 4 | 0x4; - msm_camera_io_w( - rdi_reg_cfg, vfe_dev->vfe_base + VFE47_RDI_BASE(rdi)); -} - -static void msm_vfe47_axi_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - uint32_t val; - uint32_t wm_base = VFE47_WM_BASE(stream_info->wm[plane_idx]); - - val = msm_camera_io_r(vfe_dev->vfe_base + wm_base + 0xC); - val &= ~0x2; - if (stream_info->frame_based) - val |= 0x2; - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - if (!stream_info->frame_based) { - /* WR_IMAGE_SIZE */ - val = ((msm_isp_cal_word_per_line( - stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_width)+3)/4 - 1) << 16 | - (stream_info->plane_cfg[plane_idx]. - output_height - 1); - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - val = VFE47_BURST_LEN | - (stream_info->plane_cfg[plane_idx].output_height - 1) << - 2 | - ((msm_isp_cal_word_per_line(stream_info->output_format, - stream_info->plane_cfg[plane_idx]. - output_stride)+1)/2) << 16; - } - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + wm_base + 0x20); - /* TD: Add IRQ subsample pattern */ -} - -static void msm_vfe47_axi_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint32_t val = 0; - uint32_t wm_base = VFE47_WM_BASE(stream_info->wm[plane_idx]); - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0xC); - /* WR_IMAGE_SIZE */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x14); - /* WR_BUFFER_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x18); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + wm_base + 0x20); -} - -static void msm_vfe47_axi_cfg_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, - uint8_t plane_idx) -{ - struct msm_vfe_axi_plane_cfg *plane_cfg = - &stream_info->plane_cfg[plane_idx]; - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_cfg = 0; - uint32_t xbar_reg_cfg = 0; - - switch (stream_info->stream_src) { - case PIX_VIDEO: - case PIX_ENCODER: - case PIX_VIEWFINDER: { - if (plane_cfg->output_plane_format != CRCB_PLANE && - plane_cfg->output_plane_format != CBCR_PLANE) { - /* SINGLE_STREAM_SEL */ - xbar_cfg |= plane_cfg->output_plane_format << 8; - } else { - switch (stream_info->output_format) { - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV16: - /* PAIR_STREAM_SWAP_CTRL */ - xbar_cfg |= 0x3 << 4; - break; - } - xbar_cfg |= 0x1 << 2; /* PAIR_STREAM_EN */ - } - if (stream_info->stream_src == PIX_VIEWFINDER) - xbar_cfg |= 0x1; /* VIEW_STREAM_EN */ - else if (stream_info->stream_src == PIX_VIDEO) - xbar_cfg |= 0x2; - break; - } - case CAMIF_RAW: - xbar_cfg = 0x300; - break; - case IDEAL_RAW: - xbar_cfg = 0x400; - break; - case RDI_INTF_0: - xbar_cfg = 0xC00; - break; - case RDI_INTF_1: - xbar_cfg = 0xD00; - break; - case RDI_INTF_2: - xbar_cfg = 0xE00; - break; - default: - pr_err("%s: Invalid stream src\n", __func__); - break; - } - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE47_XBAR_SHIFT(wm)); - xbar_reg_cfg |= (xbar_cfg << VFE47_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); -} - -static void msm_vfe47_axi_clear_wm_xbar_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint8_t plane_idx) -{ - uint8_t wm = stream_info->wm[plane_idx]; - uint32_t xbar_reg_cfg = 0; - - xbar_reg_cfg = - msm_camera_io_r(vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); - xbar_reg_cfg &= ~(0xFFFF << VFE47_XBAR_SHIFT(wm)); - msm_camera_io_w(xbar_reg_cfg, - vfe_dev->vfe_base + VFE47_XBAR_BASE(wm)); -} - - -static void msm_vfe47_cfg_axi_ub_equal_default( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = - &vfe_dev->axi_data; - uint32_t total_image_size = 0; - uint8_t num_used_wms = 0; - uint32_t prop_size = 0; - uint32_t wm_ub_size; - uint64_t delta; - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i] > 0) { - num_used_wms++; - total_image_size += axi_data->wm_image_size[i]; - } - } - if (vfe_dev->pdev->id == ISP_VFE0) { - prop_size = MSM_ISP47_TOTAL_IMAGE_UB_VFE0 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - prop_size = MSM_ISP47_TOTAL_IMAGE_UB_VFE1 - - axi_data->hw_info->min_wm_ub * num_used_wms; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (axi_data->free_wm[i]) { - delta = (uint64_t)axi_data->wm_image_size[i] * - (uint64_t)prop_size; - do_div(delta, total_image_size); - wm_ub_size = axi_data->hw_info->min_wm_ub + - (uint32_t)delta; - msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1), - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - ub_offset += wm_ub_size; - } else - msm_camera_io_w(0, - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - } -} - -static void msm_vfe47_cfg_axi_ub_equal_slicing( - struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t ub_equal_slice = 0; - if (vfe_dev->pdev->id == ISP_VFE0) { - ub_equal_slice = MSM_ISP47_TOTAL_IMAGE_UB_VFE0 / - axi_data->hw_info->num_wm; - } else if (vfe_dev->pdev->id == ISP_VFE1) { - ub_equal_slice = MSM_ISP47_TOTAL_IMAGE_UB_VFE1 / - axi_data->hw_info->num_wm; - } else { - pr_err("%s: incorrect VFE device\n ", __func__); - } - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - msm_camera_io_w(ub_offset << 16 | (ub_equal_slice - 1), - vfe_dev->vfe_base + VFE47_WM_BASE(i) + 0x10); - ub_offset += ub_equal_slice; - } -} - -static void msm_vfe47_cfg_axi_ub(struct vfe_device *vfe_dev) -{ - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT; - if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING) - msm_vfe47_cfg_axi_ub_equal_slicing(vfe_dev); - else - msm_vfe47_cfg_axi_ub_equal_default(vfe_dev); -} - -static void msm_vfe47_update_ping_pong_addr( - struct vfe_device *vfe_dev, - uint8_t wm_idx, uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE47_PING_PONG_BASE(wm_idx, pingpong_status)); -} - -static int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, - uint32_t blocking) -{ - int rc = 0; - - /* Keep only halt and restart mask */ - msm_camera_io_w(BIT(31), vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(BIT(8), vfe_dev->vfe_base + 0x60); - - /*Clear IRQ Status0, only leave reset irq mask*/ - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - - /*Clear IRQ Status1, only leave halt irq mask*/ - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - - /*push clear cmd*/ - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - - if (blocking) { - init_completion(&vfe_dev->halt_complete); - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - rc = wait_for_completion_timeout( - &vfe_dev->halt_complete, msecs_to_jiffies(500)); - } else { - /* Halt AXI Bus Bridge */ - msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x374); - } - - /* if any stream is waiting for update, signal complete */ - if (vfe_dev->axi_data.stream_update) { - ISP_DBG("%s: complete stream update\n", __func__); - msm_isp_axi_stream_update(vfe_dev, 0xF); - if (vfe_dev->axi_data.stream_update) - msm_isp_axi_stream_update(vfe_dev, 0xF); - } - - if (atomic_read(&vfe_dev->stats_data.stats_update)) { - ISP_DBG("%s: complete on stats update\n", __func__); - msm_isp_stats_stream_update(vfe_dev); - if (atomic_read(&vfe_dev->stats_data.stats_update)) - msm_isp_stats_stream_update(vfe_dev); - } - - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) { - ISP_DBG("%s: complete on axi config update\n", __func__); - msm_isp_axi_cfg_update(vfe_dev); - if (atomic_read(&vfe_dev->axi_data.axi_cfg_update)) - msm_isp_axi_cfg_update(vfe_dev); - } - - return rc; -} - -static int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, - uint32_t blocking, uint32_t enable_camif) -{ - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); - msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); - msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); - msm_camera_io_w_mb(0x200, vfe_dev->vfe_base + 0x4A0); - /* Start AXI */ - msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); - - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - - if (enable_camif) { - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - - return 0; -} - -static uint32_t msm_vfe47_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 8) & 0x7F; -} - -static uint32_t msm_vfe47_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 25) & 0xF; -} - -static uint32_t msm_vfe47_get_pingpong_status( - struct vfe_device *vfe_dev) -{ - return msm_camera_io_r(vfe_dev->vfe_base + 0x2A8); -} - -static int msm_vfe47_get_stats_idx(enum msm_isp_stats_type stats_type) -{ - switch (stats_type) { - case MSM_ISP_STATS_HDR_BE: - return STATS_IDX_HDR_BE; - case MSM_ISP_STATS_BG: - return STATS_IDX_BG; - case MSM_ISP_STATS_BF: - return STATS_IDX_BF; - case MSM_ISP_STATS_HDR_BHIST: - return STATS_IDX_HDR_BHIST; - case MSM_ISP_STATS_RS: - return STATS_IDX_RS; - case MSM_ISP_STATS_CS: - return STATS_IDX_CS; - case MSM_ISP_STATS_IHIST: - return STATS_IDX_IHIST; - case MSM_ISP_STATS_BHIST: - return STATS_IDX_BHIST; - case MSM_ISP_STATS_BF_SCALE: - return STATS_IDX_BF_SCALE; - default: - pr_err("%s: Invalid stats type\n", __func__); - return -EINVAL; - } -} - -static int msm_vfe47_stats_check_streams( - struct msm_vfe_stats_stream *stream_info) -{ - if (stream_info[STATS_IDX_BF].state == - STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != - STATS_AVALIABLE) { - pr_err("%s: does not support BF_SCALE while BF is disabled\n", - __func__); - return -EINVAL; - } - if (stream_info[STATS_IDX_BF].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF_SCALE].state != STATS_AVALIABLE && - stream_info[STATS_IDX_BF].composite_flag != - stream_info[STATS_IDX_BF_SCALE].composite_flag) { - pr_err("%s: Different composite flag for BF and BF_SCALE\n", - __func__); - return -EINVAL; - } - return 0; -} - -static void msm_vfe47_stats_cfg_comp_mask( - struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - uint32_t comp_stats_mask, mask_bf_scale; - uint32_t i = 0; - atomic_t *stats_comp; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask < 1) - /* no stats composite masks */ - return; - - if (vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask > - MAX_NUM_STATS_COMP_MASK) { - pr_err("%s: num of comp masks %d exceed max %d\n", - __func__, - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask, - MAX_NUM_STATS_COMP_MASK); - return; - } - - /* BF scale is controlled by BF also so ignore bit 0 of BF scale */ - stats_mask = stats_mask & 0x1FF; - mask_bf_scale = stats_mask >> SHIFT_BF_SCALE_BIT; - - for (i = 0; - i < vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; i++) { - stats_comp = &stats_data->stats_comp_mask[i]; - stats_data->reg_mask = - msm_camera_io_r(vfe_dev->vfe_base + 0x78); - comp_stats_mask = - stats_data->reg_mask & (STATS_COMP_BIT_MASK << (i*8)); - - if (enable) { - if (comp_stats_mask) - continue; - - stats_data->reg_mask |= (mask_bf_scale << (16 + i*8)); - atomic_set(stats_comp, stats_mask | - atomic_read(stats_comp)); - break; - - } else { - - if (!(atomic_read(stats_comp) & stats_mask)) - continue; - if (stats_mask & (1 << STATS_IDX_BF_SCALE) && - atomic_read(stats_comp) & - (1 << STATS_IDX_BF_SCALE)) - atomic_set(stats_comp, - ~(1 << STATS_IDX_BF_SCALE) & - atomic_read(stats_comp)); - - atomic_set(stats_comp, - ~stats_mask & atomic_read(stats_comp)); - stats_data->reg_mask &= ~(mask_bf_scale << (16 + i*8)); - break; - } - } - - ISP_DBG("%s: comp_mask: %x atomic stats[0]: %x %x\n", - __func__, stats_data->reg_mask, - atomic_read(&stats_data->stats_comp_mask[0]), - atomic_read(&stats_data->stats_comp_mask[1])); - - msm_camera_io_w(stats_data->reg_mask, vfe_dev->vfe_base + 0x78); - return; -} - -static void msm_vfe47_stats_cfg_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask |= 1 << (STATS_IDX(stream_info->stream_handle) + 15); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_stats_clear_wm_irq_mask( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t irq_mask; - - irq_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - irq_mask &= ~(1 << (STATS_IDX(stream_info->stream_handle) + 15)); - msm_camera_io_w(irq_mask, vfe_dev->vfe_base + 0x5C); -} - -static void msm_vfe47_stats_cfg_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE47_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(stream_info->framedrop_period << 2, - vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(stream_info->framedrop_pattern, - vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(0xFFFFFFFF, - vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe47_stats_clear_wm_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - uint32_t val = 0; - int stats_idx = STATS_IDX(stream_info->stream_handle); - uint32_t stats_base = VFE47_STATS_BASE(stats_idx); - - /* - * BF_SCALE does not have its own WR_ADDR_CFG, - * IRQ_FRAMEDROP_PATTERN and IRQ_SUBSAMPLE_PATTERN; - * it's using the same from BF. - */ - if (stats_idx == STATS_IDX_BF_SCALE) - return; - - /* WR_ADDR_CFG */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x8); - /* WR_IRQ_FRAMEDROP_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x10); - /* WR_IRQ_SUBSAMPLE_PATTERN */ - msm_camera_io_w(val, vfe_dev->vfe_base + stats_base + 0x14); -} - -static void msm_vfe47_stats_cfg_ub(struct vfe_device *vfe_dev) -{ - int i; - uint32_t ub_offset = 0; - uint32_t ub_size[VFE47_NUM_STATS_TYPE] = { - 16, /* MSM_ISP_STATS_BF_SCALE */ - 16, /* MSM_ISP_STATS_HDR_BE */ - 16, /* MSM_ISP_STATS_BG */ - 16, /* MSM_ISP_STATS_BF */ - 16, /* MSM_ISP_STATS_HDR_BHIST */ - 16, /* MSM_ISP_STATS_RS */ - 16, /* MSM_ISP_STATS_CS */ - 16, /* MSM_ISP_STATS_IHIST */ - 16, /* MSM_ISP_STATS_BHIST */ - }; - if (vfe_dev->pdev->id == ISP_VFE1) { - ub_offset = VFE47_UB_SIZE_VFE1; - } else if (vfe_dev->pdev->id == ISP_VFE0) { - ub_offset = VFE47_UB_SIZE_VFE0; - } else { - pr_err("%s: incorrect VFE device\n", __func__); - } - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - ub_offset -= ub_size[i]; - msm_camera_io_w(VFE47_STATS_BURST_LEN << 30 | - ub_offset << 16 | (ub_size[i] - 1), - vfe_dev->vfe_base + VFE47_STATS_BASE(i) + - ((i == STATS_IDX_BF_SCALE) ? 0x8 : 0xC)); - } -} - -static void msm_vfe47_stats_update_cgc_override(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, cgc_mask = 0; - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - cgc_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - cgc_mask |= (1 << 1); - break; - case STATS_IDX_BF: - cgc_mask |= (1 << 2); - break; - case STATS_IDX_BG: - cgc_mask |= (1 << 3); - break; - case STATS_IDX_BHIST: - cgc_mask |= (1 << 4); - break; - case STATS_IDX_RS: - cgc_mask |= (1 << 5); - break; - case STATS_IDX_CS: - cgc_mask |= (1 << 6); - break; - case STATS_IDX_IHIST: - cgc_mask |= (1 << 7); - break; - case STATS_IDX_BF_SCALE: - cgc_mask |= (1 << 2); - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - /* CGC override */ - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x30); - if (enable) - module_cfg |= cgc_mask; - else - module_cfg &= ~cgc_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x30); -} - -static void msm_vfe47_stats_enable_module(struct vfe_device *vfe_dev, - uint32_t stats_mask, uint8_t enable) -{ - int i; - uint32_t module_cfg, module_cfg_mask = 0; - uint32_t stats_cfg, stats_cfg_mask = 0; - - for (i = 0; i < VFE47_NUM_STATS_TYPE; i++) { - if ((stats_mask >> i) & 0x1) { - switch (i) { - case STATS_IDX_HDR_BE: - module_cfg_mask |= 1; - break; - case STATS_IDX_HDR_BHIST: - module_cfg_mask |= 1 << 1; - break; - case STATS_IDX_BF: - module_cfg_mask |= 1 << 2; - break; - case STATS_IDX_BG: - module_cfg_mask |= 1 << 3; - break; - case STATS_IDX_BHIST: - module_cfg_mask |= 1 << 4; - break; - case STATS_IDX_RS: - module_cfg_mask |= 1 << 5; - break; - case STATS_IDX_CS: - module_cfg_mask |= 1 << 6; - break; - case STATS_IDX_IHIST: - module_cfg_mask |= 1 << 7; - break; - case STATS_IDX_BF_SCALE: - stats_cfg_mask |= 1 << 5; - break; - default: - pr_err("%s: Invalid stats mask\n", __func__); - return; - } - } - } - - module_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x44); - if (enable) - module_cfg |= module_cfg_mask; - else - module_cfg &= ~module_cfg_mask; - msm_camera_io_w(module_cfg, vfe_dev->vfe_base + 0x44); - - stats_cfg = msm_camera_io_r(vfe_dev->vfe_base + 0x9B8); - if (enable) - stats_cfg |= stats_cfg_mask; - else - stats_cfg &= ~stats_cfg_mask; - msm_camera_io_w(stats_cfg, vfe_dev->vfe_base + 0x9B8); -} - -static void msm_vfe47_stats_update_ping_pong_addr( - struct vfe_device *vfe_dev, struct msm_vfe_stats_stream *stream_info, - uint32_t pingpong_status, dma_addr_t paddr) -{ - uint32_t paddr32 = (paddr & 0xFFFFFFFF); - int stats_idx = STATS_IDX(stream_info->stream_handle); - - msm_camera_io_w(paddr32, vfe_dev->vfe_base + - VFE47_STATS_PING_PONG_BASE(stats_idx, pingpong_status)); -} - -static uint32_t msm_vfe47_stats_get_wm_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 15) & 0x1FF; -} - -static uint32_t msm_vfe47_stats_get_comp_mask( - uint32_t irq_status0, uint32_t irq_status1) -{ - return (irq_status0 >> 29) & 0x3; -} - -static uint32_t msm_vfe47_stats_get_frame_id( - struct vfe_device *vfe_dev) -{ - return vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id; -} - -static int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) -{ - int rc = 0; - - vfe_dev->vfe_mem = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_MEM, "vfe"); - if (!vfe_dev->vfe_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_vbif_mem = platform_get_resource_byname( - vfe_dev->pdev, - IORESOURCE_MEM, "vfe_vbif"); - if (!vfe_dev->vfe_vbif_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->vfe_irq = platform_get_resource_byname(vfe_dev->pdev, - IORESOURCE_IRQ, "vfe"); - if (!vfe_dev->vfe_irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->fs_vfe = regulator_get(&vfe_dev->pdev->dev, "vdd"); - if (IS_ERR(vfe_dev->fs_vfe)) { - pr_err("%s: Regulator get failed %ld\n", __func__, - PTR_ERR(vfe_dev->fs_vfe)); - vfe_dev->fs_vfe = NULL; - rc = -ENODEV; - goto vfe_no_resource; - } - - vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe"); - if (!vfe_dev->iommu_ctx[0]) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - if (vfe_dev->hw_info->num_iommu_secure_ctx) { - vfe_dev->iommu_secure_ctx[0] = msm_iommu_get_ctx("vfe_secure"); - if (!vfe_dev->iommu_secure_ctx[0]) { - pr_err("%s: cannot get secure iommu_ctx\n", __func__); - rc = -ENODEV; - goto vfe_no_resource; - } - } - -vfe_no_resource: - return rc; -} - -static void msm_vfe47_get_error_mask( - uint32_t *error_mask0, uint32_t *error_mask1) -{ - *error_mask0 = 0x00000000; - *error_mask1 = 0x01FFFEFF; -} - -static void msm_vfe47_get_overflow_mask(uint32_t *overflow_mask) -{ - *overflow_mask = 0x01FFFE7E; -} - -static void msm_vfe47_get_rdi_wm_mask(struct vfe_device *vfe_dev, - uint32_t *rdi_wm_mask) -{ - *rdi_wm_mask = vfe_dev->axi_data.rdi_wm_mask; -} - -static void msm_vfe47_get_irq_mask(struct vfe_device *vfe_dev, - uint32_t *irq0_mask, uint32_t *irq1_mask) -{ - *irq0_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x5C); - *irq1_mask = msm_camera_io_r(vfe_dev->vfe_base + 0x60); -} - -static void msm_vfe47_restore_irq_mask(struct vfe_device *vfe_dev) -{ - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask0, - vfe_dev->vfe_base + 0x5C); - msm_camera_io_w(vfe_dev->error_info.overflow_recover_irq_mask1, - vfe_dev->vfe_base + 0x60); -} - - -static void msm_vfe47_get_halt_restart_mask(uint32_t *irq0_mask, - uint32_t *irq1_mask) -{ - *irq0_mask = BIT(31); - *irq1_mask = BIT(8); -} -static struct msm_vfe_axi_hardware_info msm_vfe47_axi_hw_info = { - .num_wm = 7, - .num_comp_mask = 3, - .num_rdi = 3, - .num_rdi_master = 3, - .min_wm_ub = 96, -}; - -static struct msm_vfe_stats_hardware_info msm_vfe47_stats_hw_info = { - .stats_capability_mask = - 1 << MSM_ISP_STATS_HDR_BE | 1 << MSM_ISP_STATS_BF | - 1 << MSM_ISP_STATS_BG | 1 << MSM_ISP_STATS_BHIST | - 1 << MSM_ISP_STATS_HDR_BHIST | 1 << MSM_ISP_STATS_IHIST | - 1 << MSM_ISP_STATS_RS | 1 << MSM_ISP_STATS_CS | - 1 << MSM_ISP_STATS_BF_SCALE, - .stats_ping_pong_offset = stats_pingpong_offset_map, - .num_stats_type = VFE47_NUM_STATS_TYPE, - .num_stats_comp_mask = VFE47_NUM_STATS_COMP, -}; - -static struct v4l2_subdev_core_ops msm_vfe47_subdev_core_ops = { - .ioctl = msm_isp_ioctl, - .subscribe_event = msm_isp_subscribe_event, - .unsubscribe_event = msm_isp_unsubscribe_event, -}; - -static struct v4l2_subdev_ops msm_vfe47_subdev_ops = { - .core = &msm_vfe47_subdev_core_ops, -}; - -static struct v4l2_subdev_internal_ops msm_vfe47_internal_ops = { - .open = msm_isp_open_node, - .close = msm_isp_close_node, -}; - -struct msm_vfe_hardware_info vfe47_hw_info = { - .num_iommu_ctx = 1, - .num_iommu_secure_ctx = 1, - .vfe_clk_idx = VFE47_CLK_IDX, - .vfe_ops = { - .irq_ops = { - .read_irq_status = msm_vfe47_read_irq_status, - .process_camif_irq = msm_vfe47_process_input_irq, - .process_reset_irq = msm_vfe47_process_reset_irq, - .process_halt_irq = msm_vfe47_process_halt_irq, - .process_reset_irq = msm_vfe47_process_reset_irq, - .process_reg_update = msm_vfe47_process_reg_update, - .process_epoch_irq = msm_vfe47_process_epoch_irq, - .process_axi_irq = msm_isp_process_axi_irq, - .process_stats_irq = msm_isp_process_stats_irq, - }, - .axi_ops = { - .reload_wm = msm_vfe47_axi_reload_wm, - .enable_wm = msm_vfe47_axi_enable_wm, - .cfg_io_format = msm_vfe47_cfg_io_format, - .cfg_comp_mask = msm_vfe47_axi_cfg_comp_mask, - .clear_comp_mask = msm_vfe47_axi_clear_comp_mask, - .cfg_wm_irq_mask = msm_vfe47_axi_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe47_axi_clear_wm_irq_mask, - .cfg_framedrop = msm_vfe47_cfg_framedrop, - .clear_framedrop = msm_vfe47_clear_framedrop, - .cfg_wm_reg = msm_vfe47_axi_cfg_wm_reg, - .clear_wm_reg = msm_vfe47_axi_clear_wm_reg, - .cfg_wm_xbar_reg = msm_vfe47_axi_cfg_wm_xbar_reg, - .clear_wm_xbar_reg = msm_vfe47_axi_clear_wm_xbar_reg, - .cfg_ub = msm_vfe47_cfg_axi_ub, - .update_ping_pong_addr = - msm_vfe47_update_ping_pong_addr, - .get_comp_mask = msm_vfe47_get_comp_mask, - .get_wm_mask = msm_vfe47_get_wm_mask, - .get_pingpong_status = msm_vfe47_get_pingpong_status, - .halt = msm_vfe47_axi_halt, - .restart = msm_vfe47_axi_restart, - .update_cgc_override = - msm_vfe47_axi_update_cgc_override, - }, - .core_ops = { - .reg_update = msm_vfe47_reg_update, - .cfg_input_mux = msm_vfe47_cfg_input_mux, - .update_camif_state = msm_vfe47_update_camif_state, - .start_fetch_eng = msm_vfe47_start_fetch_engine, - .cfg_rdi_reg = msm_vfe47_cfg_rdi_reg, - .reset_hw = msm_vfe47_reset_hardware, - .init_hw = msm_vfe47_init_hardware, - .init_hw_reg = msm_vfe47_init_hardware_reg, - .clear_status_reg = msm_vfe47_clear_status_reg, - .release_hw = msm_vfe47_release_hardware, - .get_platform_data = msm_vfe47_get_platform_data, - .get_error_mask = msm_vfe47_get_error_mask, - .get_overflow_mask = msm_vfe47_get_overflow_mask, - .get_rdi_wm_mask = msm_vfe47_get_rdi_wm_mask, - .get_irq_mask = msm_vfe47_get_irq_mask, - .restore_irq_mask = msm_vfe47_restore_irq_mask, - .get_halt_restart_mask = - msm_vfe47_get_halt_restart_mask, - .process_error_status = msm_vfe47_process_error_status, - }, - .stats_ops = { - .get_stats_idx = msm_vfe47_get_stats_idx, - .check_streams = msm_vfe47_stats_check_streams, - .cfg_comp_mask = msm_vfe47_stats_cfg_comp_mask, - .cfg_wm_irq_mask = msm_vfe47_stats_cfg_wm_irq_mask, - .clear_wm_irq_mask = msm_vfe47_stats_clear_wm_irq_mask, - .cfg_wm_reg = msm_vfe47_stats_cfg_wm_reg, - .clear_wm_reg = msm_vfe47_stats_clear_wm_reg, - .cfg_ub = msm_vfe47_stats_cfg_ub, - .enable_module = msm_vfe47_stats_enable_module, - .update_ping_pong_addr = - msm_vfe47_stats_update_ping_pong_addr, - .get_comp_mask = msm_vfe47_stats_get_comp_mask, - .get_wm_mask = msm_vfe47_stats_get_wm_mask, - .get_frame_id = msm_vfe47_stats_get_frame_id, - .get_pingpong_status = msm_vfe47_get_pingpong_status, - .update_cgc_override = - msm_vfe47_stats_update_cgc_override, - }, - }, - .dmi_reg_offset = 0xACC, - .axi_hw_info = &msm_vfe47_axi_hw_info, - .stats_hw_info = &msm_vfe47_stats_hw_info, - .subdev_ops = &msm_vfe47_subdev_ops, - .subdev_internal_ops = &msm_vfe47_internal_ops, -}; -EXPORT_SYMBOL(vfe47_hw_info); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.h deleted file mode 100644 index 12b079678dc1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp47.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISP47_H__ -#define __MSM_ISP47_H__ - -extern struct msm_vfe_hardware_info vfe47_hw_info; -#endif /* __MSM_ISP47_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.c deleted file mode 100644 index 1c3694a601b3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.c +++ /dev/null @@ -1,1967 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_camera_io_util.h" - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) -#define FAST_ISP_STREAM_OFF -#endif - -#define SRC_TO_INTF(src) \ - ((src < RDI_INTF_0) ? VFE_PIX_0 : \ - (VFE_RAW_0 + src - RDI_INTF_0)) - -#define HANDLE_TO_IDX(handle) (handle & 0xFF) - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MIN_IB 1700000000 - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int i, rc = -1; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == AVALIABLE) - break; - } - - if (i == MAX_NUM_STREAM) { - pr_err("%s: No free stream\n", __func__); - return rc; - } - - if ((axi_data->stream_handle_cnt << 8) == 0) - axi_data->stream_handle_cnt++; - - stream_cfg_cmd->axi_stream_handle = - (++axi_data->stream_handle_cnt) << 8 | i; - - memset(&axi_data->stream_info[i], 0, - sizeof(struct msm_vfe_axi_stream)); - spin_lock_init(&axi_data->stream_info[i].lock); - axi_data->stream_info[i].session_id = stream_cfg_cmd->session_id; - axi_data->stream_info[i].stream_id = stream_cfg_cmd->stream_id; - axi_data->stream_info[i].buf_divert = stream_cfg_cmd->buf_divert; - axi_data->stream_info[i].state = INACTIVE; - axi_data->stream_info[i].stream_handle = - stream_cfg_cmd->axi_stream_handle; - return 0; -} - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx) -{ - if (axi_data->stream_info[stream_idx].state != AVALIABLE) { - axi_data->stream_info[stream_idx].state = AVALIABLE; - axi_data->stream_info[stream_idx].stream_handle = 0; - } else { - pr_err("%s: stream does not exist\n", __func__); - } -} - -int msm_isp_validate_axi_request(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - int rc = -1, i; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid axi_stream_handle\n", __func__); - return rc; - } - switch (stream_cfg_cmd->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - stream_info->num_planes = 1; - stream_info->format_factor = ISP_Q2; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - stream_info->num_planes = 2; - stream_info->format_factor = 1.5 * ISP_Q2; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - return rc; - } - - if (axi_data->hw_info->num_wm - axi_data->num_used_wm < - stream_info->num_planes) { - pr_err("%s: No free write masters\n", __func__); - return rc; - } - - if ((stream_info->num_planes > 1) && - (axi_data->hw_info->num_comp_mask - - axi_data->num_used_composite_mask < 1)) { - pr_err("%s: No free composite mask\n", __func__); - return rc; - } - - if (stream_cfg_cmd->init_frame_drop >= MAX_INIT_FRAME_DROP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - if (stream_cfg_cmd->frame_skip_pattern >= MAX_SKIP) { - pr_err("%s: Invalid skip pattern\n", __func__); - return rc; - } - - for (i = 0; i < stream_info->num_planes; i++) { - stream_info->plane_cfg[i] = stream_cfg_cmd->plane_cfg[i]; - stream_info->max_width = max(stream_info->max_width, - stream_cfg_cmd->plane_cfg[i].output_width); - } - - stream_info->output_format = stream_cfg_cmd->output_format; - stream_info->runtime_output_format = stream_info->output_format; - stream_info->stream_src = stream_cfg_cmd->stream_src; - stream_info->frame_based = stream_cfg_cmd->frame_base; - return 0; -} - -static uint32_t msm_isp_axi_get_plane_size( - struct msm_vfe_axi_stream *stream_info, int plane_idx) -{ - uint32_t size = 0; - struct msm_vfe_axi_plane_cfg *plane_cfg = stream_info->plane_cfg; - switch (stream_info->output_format) { - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - /* TODO: fix me */ - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - if (plane_cfg[plane_idx].output_plane_format == Y_PLANE) - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - else - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - size = plane_cfg[plane_idx].output_height * - plane_cfg[plane_idx].output_width; - break; - /*TD: Add more image format*/ - default: - pr_err("%s: Invalid output format\n", __func__); - break; - } - return size; -} - -void msm_isp_axi_reserve_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - for (i = 0; i < stream_info->num_planes; i++) { - for (j = 0; j < axi_data->hw_info->num_wm; j++) { - if (!axi_data->free_wm[j]) { - axi_data->free_wm[j] = - stream_info->stream_handle; - axi_data->wm_image_size[j] = - msm_isp_axi_get_plane_size( - stream_info, i); - axi_data->num_used_wm++; - break; - } - } - stream_info->wm[i] = j; - } -} - -void msm_isp_axi_free_wm(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) { - axi_data->free_wm[stream_info->wm[i]] = 0; - axi_data->num_used_wm--; - } -} - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - uint8_t comp_mask = 0; - for (i = 0; i < stream_info->num_planes; i++) - comp_mask |= 1 << stream_info->wm[i]; - - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - if (!axi_data->composite_info[i].stream_handle) { - axi_data->composite_info[i].stream_handle = - stream_info->stream_handle; - axi_data->composite_info[i]. - stream_composite_mask = comp_mask; - axi_data->num_used_composite_mask++; - break; - } - } - stream_info->comp_mask_index = i; - return; -} - -void msm_isp_axi_free_comp_mask(struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - axi_data->composite_info[stream_info->comp_mask_index]. - stream_composite_mask = 0; - axi_data->composite_info[stream_info->comp_mask_index]. - stream_handle = 0; - axi_data->num_used_composite_mask--; -} - -int msm_isp_axi_get_bufq_handles( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - - if (stream_info->stream_id & ISP_SCRATCH_BUF_BIT) { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id & ~ISP_SCRATCH_BUF_BIT); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - - stream_info->bufq_scratch_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_scratch_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } else { - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: Stream 0x%x has no valid buffer queue\n", - __func__, (unsigned int)stream_info->stream_id); - rc = -EINVAL; - return rc; - } - } - return rc; -} - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int rc = 0, i; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - enum msm_vfe_axi_state valid_state = - (stream_cfg_cmd->cmd == START_STREAM) ? INACTIVE : ACTIVE; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state != valid_state) { - if ((stream_info->state == PAUSING || - stream_info->state == PAUSED || - stream_info->state == RESUME_PENDING || - stream_info->state == RESUMING) && - (stream_cfg_cmd->cmd == STOP_STREAM || - stream_cfg_cmd->cmd == STOP_IMMEDIATELY)) { - stream_info->state = ACTIVE; - } else { - pr_err("%s: Invalid stream state: %d\n", - __func__, stream_info->state); - spin_unlock_irqrestore( - &stream_info->lock, flags); - rc = -EINVAL; - break; - } - } - spin_unlock_irqrestore(&stream_info->lock, flags); - - if (stream_cfg_cmd->cmd == START_STREAM) { - rc = msm_isp_axi_get_bufq_handles(vfe_dev, stream_info); - if (rc) - break; - } - } - return rc; -} - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - - if (stream_info->runtime_framedrop_update) { - stream_info->runtime_init_frame_drop--; - if (stream_info->runtime_init_frame_drop == 0) { - stream_info->runtime_framedrop_update = 0; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - } - } - if (stream_info->stream_type == BURST_STREAM) { - stream_info->runtime_burst_frame_count--; - if (stream_info->runtime_burst_frame_count == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - } - } - } -} - -static void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - stream_info->runtime_init_frame_drop = stream_info->init_frame_drop; - stream_info->runtime_burst_frame_count = - stream_info->burst_frame_count; - stream_info->runtime_num_burst_capture = - stream_info->num_burst_capture; - stream_info->runtime_framedrop_update = stream_info->framedrop_update; - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(vfe_dev, stream_info); -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data event_data; - uint32_t session_id; - unsigned long flags; - uint16_t session_mask = 0; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - session_mask = vfe_dev->axi_data.session_frame_src_mask[session_id]; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - - if (!(session_mask & (1 << frame_src))) { - /*pr_err("%s: Ignoring the Sof for the source INTF %d\n", - __func__, (1 << frame_src));*/ - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - /*pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - session_mask, - session_id);*/ - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - session_mask)) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - switch (event_type) { - case ISP_EVENT_SOF: - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - break; - default: - break; - } - event_data.input_intf = session_mask; - event_data.frame_id = vfe_dev->axi_data.frame_id[session_id]; - event_data.timestamp = ts->event_time; - event_data.mono_timestamp = ts->buf_time; - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); - /*pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]);*/ - } -} -#else -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts) { - struct msm_isp_event_data event_data; - uint32_t session_id; - - session_id = vfe_dev->axi_data.src_info[frame_src].session_id; - if (!(vfe_dev->axi_data.session_frame_src_mask[session_id] - & (1 << frame_src))) { - pr_err("%s: Ignoring the Sof for the sourece INTF %d\n", - __func__, (1 << frame_src)); - return; - } - vfe_dev->axi_data.current_frame_src_mask[session_id] |= - (1 << frame_src); - pr_debug("%s: current mask 0x%X , session mask 0x%X, session_id %d\n", - __func__, - vfe_dev->axi_data.current_frame_src_mask[session_id], - vfe_dev->axi_data.session_frame_src_mask[session_id], - session_id); - if ((vfe_dev->axi_data.current_frame_src_mask[session_id] == - vfe_dev->axi_data.session_frame_src_mask[session_id])) { - vfe_dev->axi_data.current_frame_src_mask[session_id] = 0; - switch (event_type) { - case ISP_EVENT_SOF: - vfe_dev->axi_data.frame_id[session_id]++; - if (vfe_dev->axi_data.frame_id[session_id] == 0) - vfe_dev->axi_data.frame_id[session_id] = 1; - break; - default: - break; - } - event_data.input_intf = - vfe_dev->axi_data.session_frame_src_mask[session_id]; - event_data.frame_id = vfe_dev->axi_data.frame_id[session_id]; - event_data.timestamp = ts->event_time; - event_data.mono_timestamp = ts->buf_time; - - //pr_err("%s: AAAAA SOF frame id = %u\n", - // __func__, vfe_dev->axi_data.frame_id[session_id]); - vfe_dev->frame_id = vfe_dev->axi_data.frame_id[session_id]; - vfe_dev->eof_event_occur = 0; - msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data); - pr_debug("%s: frame id %d\n", __func__, - vfe_dev->axi_data.frame_id[session_id]); - } -} - -#endif - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd) -{ - uint32_t framedrop_period = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - } else { - pr_err("%s: Invalid stream handle",__func__); - return; - } - - framedrop_period = msm_isp_get_framedrop_period( - stream_cfg_cmd->frame_skip_pattern); - - stream_info->frame_skip_pattern = - stream_cfg_cmd->frame_skip_pattern; - if (stream_cfg_cmd->frame_skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (stream_cfg_cmd->init_frame_drop < framedrop_period) { - stream_info->framedrop_pattern <<= - stream_cfg_cmd->init_frame_drop; - stream_info->init_frame_drop = 0; - stream_info->framedrop_update = 0; - } else { - stream_info->init_frame_drop = stream_cfg_cmd->init_frame_drop; - stream_info->framedrop_update = 1; - } - - if (stream_cfg_cmd->burst_count > 0) { - stream_info->stream_type = BURST_STREAM; - stream_info->num_burst_capture = - stream_cfg_cmd->burst_count; - stream_info->burst_frame_count = - stream_cfg_cmd->init_frame_drop + - (stream_cfg_cmd->burst_count - 1) * - framedrop_period + 1; - } else { - stream_info->stream_type = CONTINUOUS_STREAM; - stream_info->burst_frame_count = 0; - stream_info->num_burst_capture = 0; - } -} - -void msm_isp_calculate_bandwidth( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info) -{ - if (stream_info->stream_src < RDI_INTF_0) { - stream_info->bandwidth = - (axi_data->src_info[VFE_PIX_0].pixel_clock / - axi_data->src_info[VFE_PIX_0].width) * - stream_info->max_width; - stream_info->bandwidth = stream_info->bandwidth * - stream_info->format_factor / ISP_Q2; - } else { - int rdi = SRC_TO_INTF(stream_info->stream_src); - stream_info->bandwidth = axi_data->src_info[rdi].pixel_clock; - } -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_start_avtimer(void) -{ - avcs_core_open(); - avcs_core_disable_power_collapse(1); -} -#else -void msm_isp_start_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - uint32_t io_format = 0, avtimer_scaler = 0; - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - rc = msm_isp_axi_create_stream( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - rc = msm_isp_validate_axi_request( - &vfe_dev->axi_data, stream_cfg_cmd); - if (rc) { - pr_err("%s: Request validation failed\n", __func__); - if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM) - msm_isp_axi_destroy_stream(&vfe_dev->axi_data,HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)); - return rc; - } - stream_info = &vfe_dev->axi_data. - stream_info[HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle)]; - msm_isp_axi_reserve_wm(&vfe_dev->axi_data, stream_info); - - if (stream_info->stream_src < RDI_INTF_0) { - io_format = vfe_dev->axi_data.src_info[VFE_PIX_0].input_format; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - if (stream_info->stream_src == CAMIF_RAW && - io_format != stream_info->output_format) - pr_warn("%s: Overriding input format\n", - __func__); - - io_format = stream_info->output_format; - } - rc = vfe_dev->hw_info->vfe_ops.axi_ops.cfg_io_format( - vfe_dev, stream_info->stream_src, io_format); - if (rc) { - pr_err("%s: cfg io format failed\n", __func__); - msm_isp_axi_free_wm(&vfe_dev->axi_data, - stream_info); - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX( - stream_cfg_cmd->axi_stream_handle)); - return rc; - } - } - - msm_isp_calculate_framedrop(&vfe_dev->axi_data, stream_cfg_cmd); - stream_info->vt_enable = stream_cfg_cmd->vt_enable; - axi_data->burst_len = stream_cfg_cmd->burst_len; - - if (stream_info->vt_enable) { - vfe_dev->vt_enable = stream_info->vt_enable; - msm_isp_start_avtimer(); - if (vfe_dev->vfe_hw_version == VFE40_8916_VERSION) { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR_8916, 4); - vfe_dev->p_avtimer_ctl = - ioremap(AVTIMER_MODE_CTL_PHY_ADDR_8916, 4); - if (vfe_dev->p_avtimer_ctl) { - avtimer_scaler = - msm_camera_io_r(vfe_dev->p_avtimer_ctl); - /*If bit 2 is set, it indicates AVTimer - ticks are scaled*/ - if (avtimer_scaler & 0x00000002) - vfe_dev->avtimer_scaler = - AVTIMER_TICK_SCALER_8916; - } - } else { - vfe_dev->p_avtimer_lsw = - ioremap(AVTIMER_LSW_PHY_ADDR, 4); - vfe_dev->p_avtimer_msw = - ioremap(AVTIMER_MSW_PHY_ADDR, 4); - } - } - if (stream_info->num_planes > 1) { - msm_isp_axi_reserve_comp_mask( - &vfe_dev->axi_data, stream_info); - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_comp_mask(vfe_dev, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_xbar_reg(vfe_dev, stream_info, i); - } - return rc; -} - -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_axi_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_stream_cfg_cmd stream_cfg; - - if (HANDLE_TO_IDX(stream_release_cmd->stream_handle) >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream handle\n", __func__); - return -EINVAL; - } - stream_info = &axi_data->stream_info[HANDLE_TO_IDX(stream_release_cmd->stream_handle)]; - - if (stream_info->state == AVALIABLE) { - pr_err("%s: Stream already released\n", __func__); - return -EINVAL; - } else if (stream_info->state != INACTIVE) { - stream_cfg.cmd = STOP_STREAM; - stream_cfg.num_streams = 1; - stream_cfg.stream_handle[0] = stream_release_cmd->stream_handle; - msm_isp_cfg_axi_stream(vfe_dev, (void *) &stream_cfg); - } - - for (i = 0; i < stream_info->num_planes; i++) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_reg(vfe_dev, stream_info, i); - - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_xbar_reg(vfe_dev, stream_info, i); - } - - if (stream_info->num_planes > 1) { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_comp_mask(vfe_dev, stream_info); - msm_isp_axi_free_comp_mask(&vfe_dev->axi_data, stream_info); - } else { - vfe_dev->hw_info->vfe_ops.axi_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - } - - vfe_dev->hw_info->vfe_ops.axi_ops.clear_framedrop(vfe_dev, stream_info); - msm_isp_axi_free_wm(axi_data, stream_info); - - msm_isp_axi_destroy_stream(&vfe_dev->axi_data, - HANDLE_TO_IDX(stream_release_cmd->stream_handle)); - - return rc; -} - -static void msm_isp_axi_stream_enable_cfg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - if (stream_info->state == INACTIVE) - return; - for (i = 0; i < stream_info->num_planes; i++) { - if (stream_info->state == START_PENDING || - stream_info->state == RESUME_PENDING) - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 1); - else { - vfe_dev->hw_info->vfe_ops.axi_ops. - enable_wm(vfe_dev, stream_info->wm[i], 0); - /* Issue a reg update for Raw Snapshot Case - * since we dont have reg update ack - */ - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - vfe_dev->hw_info->vfe_ops.core_ops. - reg_update(vfe_dev, (1 << VFE_PIX_0)); - } - } - } - - if (stream_info->state == START_PENDING) - axi_data->num_active_stream++; - else if (stream_info->state == STOP_PENDING) - axi_data->num_active_stream--; -} - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || - axi_data->stream_info[i].state == - STOP_PENDING) { - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == - START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || - axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = - axi_data->stream_info[i].state == STARTING ? - ACTIVE : INACTIVE; - } - } - - if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF || - (vfe_dev->axi_data.pipeline_update == - DISABLE_CAMIF_IMMEDIATELY)) { - vfe_dev->hw_info->vfe_ops.stats_ops. - enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } - - vfe_dev->axi_data.stream_update--; - if (vfe_dev->axi_data.stream_update == 0) - complete(&vfe_dev->stream_config_complete); -} - -static void msm_isp_reload_ping_pong_offset(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i, j; - uint32_t flag; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - flag = i ? VFE_PONG_FLAG : VFE_PING_FLAG; - for (j = 0; j < stream_info->num_planes; j++) { - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[j], flag, - buf->mapped_info[j].paddr + - stream_info->plane_cfg[j].plane_addr_offset); - } - } -} - -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev) -{ - int i, j; - uint32_t update_state; - unsigned long flags; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->stream_type == BURST_STREAM || - stream_info->state == AVALIABLE) - continue; - spin_lock_irqsave(&stream_info->lock, flags); - if (stream_info->state == PAUSING) { - /*AXI Stopped, apply update*/ - stream_info->state = PAUSED; - msm_isp_reload_ping_pong_offset(vfe_dev, stream_info); - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - /*Resume AXI*/ - stream_info->state = RESUME_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, &axi_data->stream_info[i]); - stream_info->state = RESUMING; - } else if (stream_info->state == RESUMING) { - stream_info->runtime_output_format = - stream_info->output_format; - stream_info->state = ACTIVE; - } - spin_unlock_irqrestore(&stream_info->lock, flags); - } - - update_state = atomic_dec_return(&axi_data->axi_cfg_update); -} - -static void msm_isp_cfg_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf = stream_info->buf[0]; - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - VFE_PONG_FLAG, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - stream_info->buf[1] = buf; -} - -static void msm_isp_get_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - uint32_t pingpong_bit = 0, i; - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - for (i = 0; i < stream_info->num_planes; i++) { - if (pingpong_bit != - (~(pingpong_status >> stream_info->wm[i]) & 0x1)) { - pr_warn("%s: Write master ping pong mismatch. Status: 0x%x\n", - __func__, pingpong_status); - } - } - *done_buf = stream_info->buf[pingpong_bit]; -} - -static int msm_isp_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, uint32_t pingpong_status) -{ - int i, rc = -1; - struct msm_isp_buffer *buf = NULL; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = 0; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - if (stream_idx >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream_idx",__func__); - return rc; - } - if (stream_info->bufq_scratch_handle && !stream_info->request_frm_num) - bufq_handle = stream_info->bufq_scratch_handle; - else - bufq_handle = stream_info->bufq_handle; - - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - - if (rc < 0) { - vfe_dev->error_info.stream_framedrop_count[stream_idx]++; - return rc; - } - - if (stream_info->bufq_scratch_handle && - bufq_handle == stream_info->bufq_handle) - stream_info->request_frm_num--; - - if (buf->num_planes != stream_info->num_planes) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - for (i = 0; i < stream_info->num_planes; i++) - vfe_dev->hw_info->vfe_ops.axi_ops.update_ping_pong_addr( - vfe_dev, stream_info->wm[i], - pingpong_status, buf->mapped_info[i].paddr + - stream_info->plane_cfg[i].plane_addr_offset); - pingpong_bit = (~(pingpong_status >> stream_info->wm[0]) & 0x1); - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -static inline void msm_isp_get_vt_tstamp(struct vfe_device *vfe_dev, - struct msm_isp_timestamp *time_stamp) -{ - uint32_t avtimer_msw_1st = 0, avtimer_lsw = 0; - uint32_t avtimer_msw_2nd = 0; - uint64_t av_timer_tick = 0; - - if (!vfe_dev->p_avtimer_msw || !vfe_dev->p_avtimer_lsw) { - pr_err("%s: ioremap failed\n", __func__); - return; - } - - do { - avtimer_msw_1st = msm_camera_io_r(vfe_dev->p_avtimer_msw); - avtimer_lsw = msm_camera_io_r(vfe_dev->p_avtimer_lsw); - avtimer_msw_2nd = msm_camera_io_r(vfe_dev->p_avtimer_msw); - } while (avtimer_msw_1st != avtimer_msw_2nd); - av_timer_tick = ((uint64_t)avtimer_msw_1st << 32) | avtimer_lsw; - do_div(av_timer_tick, vfe_dev->avtimer_scaler); - avtimer_lsw = do_div(av_timer_tick, USEC_PER_SEC); - time_stamp->vt_time.tv_sec = (uint32_t)(av_timer_tick); - time_stamp->vt_time.tv_usec = avtimer_lsw; -} - -static void msm_isp_process_done_buf(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info, struct msm_isp_buffer *buf, - struct msm_isp_timestamp *ts) -{ - int rc; - struct msm_isp_event_data buf_event; - struct timeval *time_stamp; - uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle); - uint32_t session_id = vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)].session_id; - uint32_t frame_id = vfe_dev->axi_data.frame_id[session_id]; - uint32_t buf_src; - memset(&buf_event, 0, sizeof(buf_event)); - - if (stream_idx >= MAX_NUM_STREAM) { - pr_err("%s: Invalid stream_idx", __func__); - return; - } - - if (buf && ts) { - if (vfe_dev->vt_enable) { - msm_isp_get_vt_tstamp(vfe_dev, ts); - time_stamp = &ts->vt_time; - } - else - time_stamp = &ts->buf_time; - - rc = vfe_dev->buf_mgr->ops->get_buf_src(vfe_dev->buf_mgr, - buf->bufq_handle, &buf_src); - if (stream_info->buf_divert && rc == 0 && - buf_src != MSM_ISP_BUFFER_SRC_SCRATCH) { - rc = vfe_dev->buf_mgr->ops->buf_divert(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id); - /* Buf divert return value represent whether the buf - * can be diverted. A positive return value means - * other ISP hardware is still processing the frame. - */ - if (rc == 0) { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = *time_stamp; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.handle = - stream_info->bufq_handle; - buf_event.u.buf_done.buf_idx = buf->buf_idx; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DIVERT + stream_idx, - &buf_event); - } - } else { - buf_event.input_intf = - SRC_TO_INTF(stream_info->stream_src); - buf_event.frame_id = frame_id; - buf_event.timestamp = ts->buf_time; - buf_event.u.buf_done.session_id = - stream_info->session_id; - buf_event.u.buf_done.stream_id = - stream_info->stream_id; - buf_event.u.buf_done.output_format = - stream_info->runtime_output_format; - msm_isp_send_event(vfe_dev, - ISP_EVENT_BUF_DONE, &buf_event); - vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx, - time_stamp, frame_id, - stream_info->runtime_output_format); - } - } -} - -static enum msm_isp_camif_update_state - msm_isp_get_camif_update_state(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint8_t pix_stream_cnt = 0, cur_pix_stream_cnt; - cur_pix_stream_cnt = - axi_data->src_info[VFE_PIX_0].pix_stream_count + - axi_data->src_info[VFE_PIX_0].raw_stream_count; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - pix_stream_cnt++; - } - - if (pix_stream_cnt) { - if (cur_pix_stream_cnt == 0 && pix_stream_cnt && - stream_cfg_cmd->cmd == START_STREAM) - return ENABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_STREAM) - return DISABLE_CAMIF; - else if (cur_pix_stream_cnt && - (cur_pix_stream_cnt - pix_stream_cnt) == 0 && - stream_cfg_cmd->cmd == STOP_IMMEDIATELY) - return DISABLE_CAMIF_IMMEDIATELY; - } - return NO_UPDATE; -} - -static void msm_isp_update_camif_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src >= RDI_INTF_0) - continue; - if (stream_info->stream_src == PIX_ENCODER || - stream_info->stream_src == PIX_VIEWFINDER || - stream_info->stream_src == IDEAL_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count--; - } else if (stream_info->stream_src == CAMIF_RAW) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count--; - } - } -} - -static void msm_isp_update_rdi_output_count( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd) -{ - int i; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) { - return; - } - stream_info = - &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - if (stream_info->stream_src < RDI_INTF_0) - continue; - if (stream_info->stream_src == RDI_INTF_0) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_1) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count--; - } else if (stream_info->stream_src == RDI_INTF_2) { - if (stream_cfg_cmd->cmd == START_STREAM) - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count++; - else - vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count--; - } - - } -} - -uint8_t msm_isp_get_curr_stream_cnt( - struct vfe_device *vfe_dev) -{ - uint8_t curr_stream_cnt = 0; - curr_stream_cnt = vfe_dev->axi_data.src_info[VFE_RAW_0]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_1]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_RAW_2]. - raw_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - pix_stream_count + vfe_dev->axi_data.src_info[VFE_PIX_0]. - raw_stream_count; - - return curr_stream_cnt; -} - -void msm_camera_io_dump_2(void __iomem *addr, int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - ISP_DBG("%s: %p %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - ISP_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - ISP_DBG("%s\n", line_str); -} - -/*Factor in Q2 format*/ -#define ISP_DEFAULT_FORMAT_FACTOR 6 -#define ISP_BUS_UTILIZATION_FACTOR 6 -static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) -{ - int i, rc = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; - uint32_t num_pix_streams = 0; - uint32_t num_rdi_streams = 0; - uint32_t total_streams = 0; - uint64_t total_bandwidth = 0; - uint64_t ib_total_bandwidth = 0; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state == ACTIVE || - stream_info->state == START_PENDING) { - if (stream_info->stream_src < RDI_INTF_0) { - total_pix_bandwidth += stream_info->bandwidth; - num_pix_streams++; - } else { - total_rdi_bandwidth += stream_info->bandwidth; - num_rdi_streams++; - } - } - } - if (num_pix_streams > 0) - total_pix_bandwidth = total_pix_bandwidth / - num_pix_streams * (num_pix_streams - 1) + - ((unsigned long)axi_data->src_info[VFE_PIX_0]. - pixel_clock) * ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2; - total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; - total_streams = num_pix_streams + num_rdi_streams; - if (total_streams == 1) { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2 - MSM_ISP_MIN_IB; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - (total_bandwidth - MSM_ISP_MIN_AB) , ib_total_bandwidth); - } - else { - ib_total_bandwidth = total_bandwidth * - ISP_BUS_UTILIZATION_FACTOR / ISP_Q2; - if(ib_total_bandwidth < MIN_IB) - ib_total_bandwidth = MIN_IB; - rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, - total_bandwidth, ib_total_bandwidth); - } - if (rc < 0) - pr_err("%s: update failed\n", __func__); - - return rc; -} - -static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev, - enum msm_isp_camif_update_state camif_update) -{ - int rc; - unsigned long flags; - spin_lock_irqsave(&vfe_dev->shared_data_lock, flags); - init_completion(&vfe_dev->stream_config_complete); - vfe_dev->axi_data.pipeline_update = camif_update; -#if defined(FAST_ISP_STREAM_OFF) - vfe_dev->axi_data.stream_update = 1; -#else - vfe_dev->axi_data.stream_update = 2; -#endif - spin_unlock_irqrestore(&vfe_dev->shared_data_lock, flags); - rc = wait_for_completion_timeout( - &vfe_dev->stream_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_init_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int rc = 0; - /*Set address for both PING & PONG register */ - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", - __func__); - return rc; - } - - /* For burst stream of one capture, only one buffer - * is allocated. Duplicate ping buffer address to pong - * buffer to ensure hardware write to a valid address - */ - if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture <= 1) { - msm_isp_cfg_pong_address(vfe_dev, stream_info); - } else { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", - __func__); - return rc; - } - } - return rc; -} - -static void msm_isp_deinit_stream_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream *stream_info) -{ - int i; - for (i = 0; i < 2; i++) { - struct msm_isp_buffer *buf; - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -static void msm_isp_get_stream_wm_mask( - struct msm_vfe_axi_stream *stream_info, - uint32_t *wm_reload_mask) -{ - int i; - for (i = 0; i < stream_info->num_planes; i++) - *wm_reload_mask |= (1 << stream_info->wm[i]); -} - -#if defined(FAST_ISP_STREAM_OFF) -static void msm_isp_axi_stream_update_new(struct vfe_device *vfe_dev, enum msm_isp_camif_update_state camif_update) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (axi_data->stream_info[i].state == START_PENDING || axi_data->stream_info[i].state == STOP_PENDING) { - msm_isp_axi_stream_enable_cfg(vfe_dev, &axi_data->stream_info[i]); - axi_data->stream_info[i].state = axi_data->stream_info[i].state == START_PENDING ? STARTING : STOPPING; - } else if (axi_data->stream_info[i].state == STARTING || axi_data->stream_info[i].state == STOPPING) { - axi_data->stream_info[i].state = axi_data->stream_info[i].state == STARTING ? ACTIVE : INACTIVE; - } - } - - if (camif_update == DISABLE_CAMIF) { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module(vfe_dev, 0xFF, 0); - vfe_dev->axi_data.pipeline_update = NO_UPDATE; - } - -} -#endif - -static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t src_state, wait_for_complete = 0; - uint32_t wm_reload_mask = 0x0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - stream_info->frame_id = 0; - src_state = axi_data->src_info[ - SRC_TO_INTF(stream_info->stream_src)].active; - - msm_isp_calculate_bandwidth(axi_data, stream_info); - msm_isp_reset_framedrop(vfe_dev, stream_info); - msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask); - rc = msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])); - return rc; - } - - stream_info->state = START_PENDING; - if (src_state) { - wait_for_complete = 1; - } else { - if (vfe_dev->dump_reg) - msm_camera_io_dump_2(vfe_dev->vfe_base, 0x900); - - /*Configure AXI start bits to start immediately*/ - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = ACTIVE; - } - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].session_id = - stream_info->session_id; - vfe_dev->axi_data. - session_frame_src_mask[stream_info->session_id] |= - (1 << SRC_TO_INTF(stream_info->stream_src)); - vfe_dev->axi_data.src_info[ - SRC_TO_INTF(stream_info->stream_src)].frame_id = 0; - } - msm_isp_update_stream_bandwidth(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, wm_reload_mask); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - - vfe_dev->hw_info->vfe_ops.core_ops.init_vbif_counters(vfe_dev); - - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - if (camif_update == ENABLE_CAMIF) { - vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id = 0; - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, camif_update); - } - if (vfe_dev->axi_data.src_info[VFE_RAW_0].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_0].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_1].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_1].frame_id = 0; - else if (vfe_dev->axi_data.src_info[VFE_RAW_2].raw_stream_count > 0) - vfe_dev->axi_data.src_info[VFE_RAW_2].frame_id = 0; - -#if defined(FAST_ISP_STREAM_OFF) - if (wait_for_complete){ - msm_isp_axi_stream_update_new(vfe_dev, camif_update); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - } -#else - if (wait_for_complete) - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif - - return rc; -} - -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info = NULL; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - unsigned long flags; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM || - stream_cfg_cmd->num_streams == 0) - return -EINVAL; - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (cur_stream_cnt > 0) - wait_for_complete = 1; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count + vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count) >= 1) - skip_session_mask_update = 1; - else - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - } - - if (wait_for_complete) { - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } else { - pr_err("%s: Stop Immediately! stream_id=%d\n", __func__, - stream_info->stream_id); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - spin_lock_irqsave(&vfe_dev->sof_lock, flags); - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - spin_unlock_irqrestore(&vfe_dev->sof_lock, flags); - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - - if (cur_stream_cnt == 0) { - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#else -static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd, - enum msm_isp_camif_update_state camif_update) -{ - int i, rc = 0; - uint8_t wait_for_complete = 0, cur_stream_cnt = 0; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint16_t session_mask = 0; - uint32_t session_id = 0; - uint8_t skip_session_mask_update = 0; - - if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - - stream_info->state = STOP_PENDING; - if (stream_info->stream_src == CAMIF_RAW || - stream_info->stream_src == IDEAL_RAW) { - /* We dont get reg update IRQ for raw snapshot - * so frame skip cant be ocnfigured - */ - wait_for_complete = 1; - } else if (stream_info->stream_type == BURST_STREAM && - stream_info->runtime_num_burst_capture == 0) { - /* Configure AXI writemasters to stop immediately - * since for burst case, write masters already skip - * all frames. - */ - if (stream_info->stream_src == RDI_INTF_0 || - stream_info->stream_src == RDI_INTF_1 || - stream_info->stream_src == RDI_INTF_2) - wait_for_complete = 1; - else { - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - } - } else { - wait_for_complete = 1; - } - session_id = stream_info->session_id; - if (!session_mask) - session_mask = vfe_dev->axi_data. - session_frame_src_mask[session_id]; - if (SRC_TO_INTF(stream_info->stream_src) == VFE_PIX_0) { - if ((vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - pix_stream_count <= 1) && (vfe_dev->axi_data. - src_info[SRC_TO_INTF(stream_info->stream_src)]. - raw_stream_count <= 1)) { - session_mask &= - ~(1 << SRC_TO_INTF( - stream_info->stream_src)); - if (stream_info->stream_type == - BURST_STREAM) - skip_session_mask_update = 1; - } - } else { - session_mask &= - ~(1 << SRC_TO_INTF(stream_info->stream_src)); - } - - } - if (wait_for_complete) { - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); -#if defined(FAST_ISP_STREAM_OFF) - msm_isp_axi_stream_update_new(vfe_dev, DISABLE_CAMIF); - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, NO_UPDATE); -#else - rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update); -#endif - if (rc < 0) { - pr_err("%s: wait for config done failed\n", __func__); - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX( - stream_cfg_cmd->stream_handle[i])]; - stream_info->state = STOP_PENDING; - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, 0xF); - msm_isp_axi_stream_enable_cfg(vfe_dev, stream_info); - stream_info->state = INACTIVE; - } - } - } - if (!skip_session_mask_update) { - if (session_mask == 0) - vfe_dev->axi_data.frame_id[session_id] = 0; - vfe_dev->axi_data. - session_frame_src_mask[session_id] = session_mask; - } - msm_isp_update_stream_bandwidth(vfe_dev); - if (camif_update == DISABLE_CAMIF) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF); - else if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); - msm_isp_update_rdi_output_count(vfe_dev, stream_cfg_cmd); - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - if (camif_update == DISABLE_CAMIF_IMMEDIATELY) - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - vfe_dev->hw_info->vfe_ops.core_ops. - reset_hw(vfe_dev, ISP_RST_HARD, 1); - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])]; - msm_isp_deinit_stream_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} -#endif - - -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - enum msm_isp_camif_update_state camif_update; - - rc = msm_isp_axi_check_stream_state(vfe_dev, stream_cfg_cmd); - if (rc < 0) { - pr_err("%s: Invalid stream state\n", __func__); - return rc; - } - - if (axi_data->num_active_stream == 0) { - /*Configure UB*/ - vfe_dev->hw_info->vfe_ops.axi_ops.cfg_ub(vfe_dev); - } - camif_update = msm_isp_get_camif_update_state(vfe_dev, stream_cfg_cmd); - - if (stream_cfg_cmd->cmd == START_STREAM) - rc = msm_isp_start_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - else - rc = msm_isp_stop_axi_stream( - vfe_dev, stream_cfg_cmd, camif_update); - - if (rc < 0) - pr_err("%s: start/stop stream failed\n", __func__); - return rc; -} - -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i, j; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream_update_cmd *update_cmd = arg; - struct msm_vfe_axi_stream_cfg_update_info *update_info; - - if (update_cmd->update_type == UPDATE_STREAM_AXI_CONFIG && - atomic_read(&axi_data->axi_cfg_update)) { - pr_err("%s: AXI stream config updating\n", __func__); - return -EBUSY; - } - - /*num_stream is uint32 and update_info[] bound by MAX_NUM_STREAM*/ - if (update_cmd->num_streams > MAX_NUM_STREAM) - return -EINVAL; - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - /*check array reference bounds*/ - if (HANDLE_TO_IDX(update_info->stream_handle) >= MAX_NUM_STREAM) { - return -EINVAL; - } - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - if (stream_info->state != ACTIVE && - stream_info->state != INACTIVE) { - pr_err("%s: Invalid stream state\n", __func__); - return -EINVAL; - } - if (stream_info->state == ACTIVE && - stream_info->stream_type == BURST_STREAM && - (1 != update_cmd->num_streams || - UPDATE_STREAM_FRAMEDROP_PATTERN != - update_cmd->update_type)) { - pr_err("%s: Cannot update active burst stream\n", - __func__); - return -EINVAL; - } - } - - for (i = 0; i < update_cmd->num_streams; i++) { - update_info = &update_cmd->update_info[i]; - stream_info = &axi_data->stream_info[ - HANDLE_TO_IDX(update_info->stream_handle)]; - - switch (update_cmd->update_type) { - case ENABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 1; - break; - case DISABLE_STREAM_BUF_DIVERT: - stream_info->buf_divert = 0; - vfe_dev->buf_mgr->ops->flush_buf(vfe_dev->buf_mgr, - stream_info->bufq_handle, - MSM_ISP_BUFFER_FLUSH_DIVERTED); - break; - case UPDATE_STREAM_FRAMEDROP_PATTERN: { - uint32_t framedrop_period = - msm_isp_get_framedrop_period( - update_info->skip_pattern); - stream_info->runtime_init_frame_drop = 0; - if (update_info->skip_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_framedrop(vfe_dev, stream_info); - break; - } - case UPDATE_STREAM_AXI_CONFIG: { - for (j = 0; j < stream_info->num_planes; j++) { - stream_info->plane_cfg[j] = - update_info->plane_cfg[j]; - } - stream_info->output_format = update_info->output_format; - if (stream_info->state == ACTIVE) { - stream_info->state = PAUSE_PENDING; - msm_isp_axi_stream_enable_cfg( - vfe_dev, stream_info); - stream_info->state = PAUSING; - atomic_set(&axi_data->axi_cfg_update, - UPDATE_REQUESTED); - } else { - for (j = 0; j < stream_info->num_planes; j++) - vfe_dev->hw_info->vfe_ops.axi_ops. - cfg_wm_reg(vfe_dev, stream_info, j); - stream_info->runtime_output_format = - stream_info->output_format; - } - break; - } - case UPDATE_STREAM_REQUEST_FRAMES: { - stream_info->request_frm_num += - update_info->request_frm_num; - break; - } - default: - pr_err("%s: Invalid update type\n", __func__); - return -EINVAL; - } - } - return rc; -} - -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, rc = 0; - struct msm_isp_buffer *done_buf = NULL; - uint32_t comp_mask = 0, wm_mask = 0; - uint32_t pingpong_status, stream_idx; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_composite_info *comp_info; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - uint32_t frame_id = 0; - - comp_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_comp_mask(irq_status0, irq_status1); - wm_mask = vfe_dev->hw_info->vfe_ops.axi_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(comp_mask || wm_mask)) - return; - - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - pingpong_status = - vfe_dev->hw_info->vfe_ops.axi_ops.get_pingpong_status(vfe_dev); - for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) { - rc = 0; - comp_info = &axi_data->composite_info[i]; - if (comp_mask & (1 << i)) { - stream_idx = HANDLE_TO_IDX(comp_info->stream_handle); - if ((!comp_info->stream_handle) || (stream_idx >= MAX_NUM_STREAM)) { - pr_err("%s: Invalid handle for composite irq\n", - __func__); - } else { - stream_idx = - HANDLE_TO_IDX(comp_info->stream_handle); - stream_info = - &axi_data->stream_info[stream_idx]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, - stream_info->frame_id); - return; - } - stream_info->frame_id = frame_id; - - if (stream_info->stream_type == BURST_STREAM) - stream_info-> - runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == - CONTINUOUS_STREAM || - stream_info-> - runtime_num_burst_capture >= 1) { - rc = msm_isp_cfg_ping_pong_address( - vfe_dev, stream_info, - pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - wm_mask &= ~(comp_info->stream_composite_mask); - } - - for (i = 0; i < axi_data->hw_info->num_wm; i++) { - if (wm_mask & (1 << i)) { - stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]); - if ((!axi_data->free_wm[i]) || (stream_idx >= MAX_NUM_STREAM)) { - pr_err("%s: Invalid handle for wm irq\n", - __func__); - continue; - } - stream_info = &axi_data->stream_info[stream_idx]; - frame_id = vfe_dev->axi_data. - frame_id[stream_info->session_id]; - ISP_DBG("%s: stream%d frame id: 0x%x\n", - __func__, - stream_idx, stream_info->frame_id); - if (stream_info->frame_id >= frame_id) { - pr_err("%s: Session frm id %d cur frm id %d\n", - __func__, frame_id, stream_info->frame_id); - return; - } - - if (stream_info->stream_type == BURST_STREAM) - stream_info->runtime_num_burst_capture--; - - msm_isp_get_done_buf(vfe_dev, stream_info, - pingpong_status, &done_buf); - if (stream_info->stream_type == CONTINUOUS_STREAM || - stream_info->runtime_num_burst_capture > 1) { - rc = msm_isp_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status); - } - if (done_buf && !rc) - msm_isp_process_done_buf(vfe_dev, - stream_info, done_buf, ts); - } - } - return; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.h deleted file mode 100644 index 8ef7583af592..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_axi_util.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_AXI_UTIL_H__ -#define __MSM_ISP_AXI_UTIL_H__ - -#include "msm_isp.h" - -int msm_isp_axi_create_stream( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_destroy_stream( - struct msm_vfe_axi_shared_data *axi_data, int stream_idx); - -int msm_isp_validate_axi_request( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -void msm_isp_axi_reserve_wm( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -void msm_isp_axi_reserve_comp_mask( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream *stream_info); - -int msm_isp_axi_check_stream_state( - struct vfe_device *vfe_dev, - struct msm_vfe_axi_stream_cfg_cmd *stream_cfg_cmd); - -void msm_isp_calculate_framedrop( - struct msm_vfe_axi_shared_data *axi_data, - struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd); - -int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); -void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev); - -void msm_isp_axi_stream_update(struct vfe_device *vfe_dev); - -void msm_isp_update_framedrop_reg(struct vfe_device *vfe_dev); -void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type, - enum msm_vfe_input_src frame_src, struct msm_isp_timestamp *ts); -void msm_isp_process_axi_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) -uint8_t msm_isp_get_curr_stream_cnt(struct vfe_device *vfe_dev); -#endif -#endif /* __MSM_ISP_AXI_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.c deleted file mode 100644 index 50b1940fc34c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.c +++ /dev/null @@ -1,575 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include "msm_isp_util.h" -#include "msm_isp_stats_util.h" - -static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info, uint32_t pingpong_status, - struct msm_isp_buffer **done_buf) -{ - int rc = -1; - struct msm_isp_buffer *buf; - uint32_t pingpong_bit = 0; - uint32_t bufq_handle = stream_info->bufq_handle; - uint32_t stats_pingpong_offset; - - if (STATS_IDX(stream_info->stream_handle) >= - vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, - STATS_IDX(stream_info->stream_handle)); - return -EINVAL; - } - - stats_pingpong_offset = - vfe_dev->hw_info->stats_hw_info->stats_ping_pong_offset[ - STATS_IDX(stream_info->stream_handle)]; - - pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); - rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, - vfe_dev->pdev->id, bufq_handle, &buf); - if (rc < 0) { - vfe_dev->error_info.stats_framedrop_count[ - STATS_IDX(stream_info->stream_handle)]++; - return rc; - } - - if (buf->num_planes != 1) { - pr_err("%s: Invalid buffer\n", __func__); - rc = -EINVAL; - goto buf_error; - } - - vfe_dev->hw_info->vfe_ops.stats_ops.update_ping_pong_addr( - vfe_dev, stream_info, - pingpong_status, buf->mapped_info[0].paddr + - stream_info->buffer_offset); - - if (stream_info->buf[pingpong_bit] && done_buf) - *done_buf = stream_info->buf[pingpong_bit]; - - stream_info->buf[pingpong_bit] = buf; - return 0; -buf_error: - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - return rc; -} - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts) -{ - int i, j, rc; - struct msm_isp_event_data buf_event; - struct msm_isp_stats_event *stats_event = &buf_event.u.stats; - struct msm_isp_buffer *done_buf; - struct msm_vfe_stats_stream *stream_info = NULL; - uint32_t session_id = vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t pingpong_status; - uint32_t comp_stats_type_mask = 0, atomic_stats_mask = 0; - uint32_t stats_comp_mask = 0, stats_irq_mask = 0; - uint32_t num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - stats_comp_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_comp_mask(irq_status0, irq_status1); - stats_irq_mask = vfe_dev->hw_info->vfe_ops.stats_ops. - get_wm_mask(irq_status0, irq_status1); - if (!(stats_comp_mask || stats_irq_mask)) - return; - ISP_DBG("%s: status: 0x%x\n", __func__, irq_status0); - - /* - * If any of composite mask is set, clear irq bits from mask, - * they will be restored by comp mask - */ - if (stats_comp_mask) { - for (j = 0; j < num_stats_comp_mask; j++) { - stats_irq_mask &= ~atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - } - } - - for (j = 0; j < num_stats_comp_mask; j++) { - atomic_stats_mask = atomic_read( - &vfe_dev->stats_data.stats_comp_mask[j]); - if (!stats_comp_mask) { - stats_irq_mask &= ~atomic_stats_mask; - } else { - /* restore irq bits from composite mask */ - if (stats_comp_mask & (1 << j)) - stats_irq_mask |= atomic_stats_mask; - } - /* if no irq bits set from this composite mask continue*/ - if (!stats_irq_mask) - continue; - memset(&buf_event, 0, sizeof(struct msm_isp_event_data)); - buf_event.timestamp = ts->event_time; - buf_event.frame_id = - vfe_dev->axi_data.frame_id[session_id]; - buf_event.input_intf = VFE_PIX_0; - pingpong_status = vfe_dev->hw_info-> - vfe_ops.stats_ops.get_pingpong_status(vfe_dev); - - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; - i++) { - if (!(stats_irq_mask & (1 << i))) - continue; - stream_info = &vfe_dev->stats_data.stream_info[i]; - done_buf = NULL; - msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, pingpong_status, &done_buf); - if (done_buf) { - rc = vfe_dev->buf_mgr->ops->buf_divert( - vfe_dev->buf_mgr, done_buf->bufq_handle, - done_buf->buf_idx, &ts->buf_time, - vfe_dev->axi_data. - frame_id[session_id]); - if (rc != 0) - continue; - - stats_event->stats_buf_idxs - [stream_info->stats_type] = - done_buf->buf_idx; - if (!stream_info->composite_flag) { - stats_event->stats_mask = - 1 << stream_info->stats_type; - ISP_DBG("%s: stats frameid: 0x%x %d\n", - __func__, buf_event.frame_id, - stream_info->stats_type); - msm_isp_send_event(vfe_dev, - ISP_EVENT_STATS_NOTIFY + - stream_info->stats_type, - &buf_event); - } else { - comp_stats_type_mask |= - 1 << stream_info->stats_type; - } - } - stats_irq_mask &= ~(1 << i); - } - - if (comp_stats_type_mask) { - ISP_DBG("%s: comp_stats frameid: 0x%x, 0x%x\n", - __func__, buf_event.frame_id, - comp_stats_type_mask); - stats_event->stats_mask = comp_stats_type_mask; - msm_isp_send_event(vfe_dev, - ISP_EVENT_COMP_STATS_NOTIFY, &buf_event); - comp_stats_type_mask = 0; - } - } -} - -int msm_isp_stats_create_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd) -{ - int rc = -1; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t stats_idx; - - if (!(vfe_dev->hw_info->stats_hw_info->stats_capability_mask & - (1 << stream_req_cmd->stats_type))) { - pr_err("%s: Stats type not supported\n", __func__); - return rc; - } - - stats_idx = vfe_dev->hw_info->vfe_ops.stats_ops. - get_stats_idx(stream_req_cmd->stats_type); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state != STATS_AVALIABLE) { - pr_err("%s: Stats already requested\n", __func__); - return rc; - } - - if (stream_req_cmd->framedrop_pattern >= MAX_SKIP) { - pr_err("%s: Invalid framedrop pattern\n", __func__); - return rc; - } - - if (stream_req_cmd->irq_subsample_pattern >= MAX_SKIP) { - pr_err("%s: Invalid irq subsample pattern\n", __func__); - return rc; - } - - stream_info->session_id = stream_req_cmd->session_id; - stream_info->stream_id = stream_req_cmd->stream_id; - stream_info->composite_flag = stream_req_cmd->composite_flag; - stream_info->stats_type = stream_req_cmd->stats_type; - stream_info->buffer_offset = stream_req_cmd->buffer_offset; - stream_info->framedrop_pattern = stream_req_cmd->framedrop_pattern; - stream_info->irq_subsample_pattern = - stream_req_cmd->irq_subsample_pattern; - stream_info->state = STATS_INACTIVE; - - if ((vfe_dev->stats_data.stream_handle_cnt << 8) == 0) - vfe_dev->stats_data.stream_handle_cnt++; - - stream_req_cmd->stream_handle = - (++vfe_dev->stats_data.stream_handle_cnt) << 8 | stats_idx; - - stream_info->stream_handle = stream_req_cmd->stream_handle; - return 0; -} - -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_request_cmd *stream_req_cmd = arg; - struct msm_vfe_stats_stream *stream_info = NULL; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - uint32_t framedrop_period; - uint32_t stats_idx; - - rc = msm_isp_stats_create_stream(vfe_dev, stream_req_cmd); - if (rc < 0) { - pr_err("%s: create stream failed\n", __func__); - return rc; - } - - stats_idx = STATS_IDX(stream_req_cmd->stream_handle); - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - - framedrop_period = msm_isp_get_framedrop_period( - stream_req_cmd->framedrop_pattern); - - if (stream_req_cmd->framedrop_pattern == SKIP_ALL) - stream_info->framedrop_pattern = 0x0; - else - stream_info->framedrop_pattern = 0x1; - stream_info->framedrop_period = framedrop_period - 1; - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - cfg_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_wm_reg(vfe_dev, stream_info); - return rc; -} - -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = -1; - struct msm_vfe_stats_stream_cfg_cmd stream_cfg_cmd; - struct msm_vfe_stats_stream_release_cmd *stream_release_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - int stats_idx = STATS_IDX(stream_release_cmd->stream_handle); - struct msm_vfe_stats_stream *stream_info = NULL; - - if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, stats_idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[stats_idx]; - if (stream_info->state == STATS_AVALIABLE) { - pr_err("%s: stream already release\n", __func__); - return rc; - } else if (stream_info->state != STATS_INACTIVE) { - stream_cfg_cmd.enable = 0; - stream_cfg_cmd.num_streams = 1; - stream_cfg_cmd.stream_handle[0] = - stream_release_cmd->stream_handle; - rc = msm_isp_cfg_stats_stream(vfe_dev, &stream_cfg_cmd); - } - - if (!stream_info->composite_flag) - vfe_dev->hw_info->vfe_ops.stats_ops. - clear_wm_irq_mask(vfe_dev, stream_info); - - vfe_dev->hw_info->vfe_ops.stats_ops.clear_wm_reg(vfe_dev, stream_info); - memset(stream_info, 0, sizeof(struct msm_vfe_stats_stream)); - return 0; -} - -static int msm_isp_init_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int rc = 0; - stream_info->bufq_handle = - vfe_dev->buf_mgr->ops->get_bufq_handle( - vfe_dev->buf_mgr, stream_info->session_id, - stream_info->stream_id); - if (stream_info->bufq_handle == 0) { - pr_err("%s: no buf configured for stream: 0x%x\n", - __func__, stream_info->stream_handle); - return -EINVAL; - } - - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PING_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for ping\n", __func__); - return rc; - } - rc = msm_isp_stats_cfg_ping_pong_address(vfe_dev, - stream_info, VFE_PONG_FLAG, NULL); - if (rc < 0) { - pr_err("%s: No free buffer for pong\n", __func__); - return rc; - } - return rc; -} - -static void msm_isp_deinit_stats_ping_pong_reg( - struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream *stream_info) -{ - int i; - struct msm_isp_buffer *buf; - for (i = 0; i < 2; i++) { - buf = stream_info->buf[i]; - if (buf) - vfe_dev->buf_mgr->ops->put_buf(vfe_dev->buf_mgr, - buf->bufq_handle, buf->buf_idx); - } -} - -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev) -{ - int i; - uint32_t stats_mask = 0, comp_stats_mask = 0; - uint32_t enable = 0; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - for (i = 0; i < vfe_dev->hw_info->stats_hw_info->num_stats_type; i++) { - if (stats_data->stream_info[i].state == STATS_START_PENDING || - stats_data->stream_info[i].state == - STATS_STOP_PENDING) { - stats_mask |= i; - enable = stats_data->stream_info[i].state == - STATS_START_PENDING ? 1 : 0; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_START_PENDING ? - STATS_STARTING : STATS_STOPPING; - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, BIT(i), enable); - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, BIT(i), enable); - } else if (stats_data->stream_info[i].state == STATS_STARTING || - stats_data->stream_info[i].state == STATS_STOPPING) { - if (stats_data->stream_info[i].composite_flag) - comp_stats_mask |= i; - stats_data->stream_info[i].state = - stats_data->stream_info[i].state == - STATS_STARTING ? STATS_ACTIVE : STATS_INACTIVE; - } - } - atomic_sub(1, &stats_data->stats_update); - if (!atomic_read(&stats_data->stats_update)) - complete(&vfe_dev->stats_config_complete); -} - -static int msm_isp_stats_wait_for_cfg_done(struct vfe_device *vfe_dev) -{ - int rc; - init_completion(&vfe_dev->stats_config_complete); - atomic_set(&vfe_dev->stats_data.stats_update, 2); - rc = wait_for_completion_timeout( - &vfe_dev->stats_config_complete, - msecs_to_jiffies(VFE_MAX_CFG_TIMEOUT)); - if (rc == 0) { - pr_err("%s: wait timeout\n", __func__); - rc = -1; - } else { - rc = 0; - } - return rc; -} - -static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - rc = vfe_dev->hw_info->vfe_ops.stats_ops.check_streams( - stats_data->stream_info); - if (rc < 0) - return rc; - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - rc = msm_isp_init_stats_ping_pong_reg(vfe_dev, stream_info); - if (rc < 0) { - pr_err("%s: No buffer for stream%d\n", __func__, idx); - return rc; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_START_PENDING; - else - stream_info->state = STATS_ACTIVE; - - stats_data->num_active_stream++; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - - } - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 1); - } - } - return rc; -} - -static int msm_isp_stop_stats_stream(struct vfe_device *vfe_dev, - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd) -{ - int i, rc = 0; - uint32_t stats_mask = 0, idx; - uint32_t comp_stats_mask[MAX_NUM_STATS_COMP_MASK] = {0}; - uint32_t num_stats_comp_mask = 0; - struct msm_vfe_stats_stream *stream_info; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - num_stats_comp_mask = - vfe_dev->hw_info->stats_hw_info->num_stats_comp_mask; - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - if (stream_info->stream_handle != - stream_cfg_cmd->stream_handle[i]) { - pr_err("%s: Invalid stream handle: 0x%x received\n", - __func__, stream_cfg_cmd->stream_handle[i]); - continue; - } - - if (stream_info->composite_flag > num_stats_comp_mask) { - pr_err("%s: comp grp %d exceed max %d\n", - __func__, stream_info->composite_flag, - num_stats_comp_mask); - return -EINVAL; - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) - stream_info->state = STATS_STOP_PENDING; - else - stream_info->state = STATS_INACTIVE; - - stats_data->num_active_stream--; - stats_mask |= 1 << idx; - - if (stream_info->composite_flag > 0) - comp_stats_mask[stream_info->composite_flag-1] |= - 1 << idx; - - ISP_DBG("%s: stats_mask %x %x active streams %d\n", - __func__, comp_stats_mask[0], - comp_stats_mask[1], - stats_data->num_active_stream); - } - - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - rc = msm_isp_stats_wait_for_cfg_done(vfe_dev); - } else { - vfe_dev->hw_info->vfe_ops.stats_ops.enable_module( - vfe_dev, stats_mask, stream_cfg_cmd->enable); - for (i = 0; i < num_stats_comp_mask; i++) { - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_comp_mask( - vfe_dev, comp_stats_mask[i], 0); - } - } - - for (i = 0; i < stream_cfg_cmd->num_streams; i++) { - idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]); - - if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) { - pr_err("%s Invalid stats index %d", __func__, idx); - return -EINVAL; - } - - stream_info = &stats_data->stream_info[idx]; - msm_isp_deinit_stats_ping_pong_reg(vfe_dev, stream_info); - } - return rc; -} - -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_stats_stream_cfg_cmd *stream_cfg_cmd = arg; - struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data; - stats_data->stats_burst_len = stream_cfg_cmd->stats_burst_len; - - if (vfe_dev->stats_data.num_active_stream == 0) - vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev); - - if (stream_cfg_cmd->enable) - rc = msm_isp_start_stats_stream(vfe_dev, stream_cfg_cmd); - else - rc = msm_isp_stop_stats_stream(vfe_dev, stream_cfg_cmd); - - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.h deleted file mode 100644 index 7b4c4b4eb0dc..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_stats_util.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_STATS_UTIL_H__ -#define __MSM_ISP_STATS_UTIL_H__ - -#include "msm_isp.h" -#define STATS_IDX(idx) (idx & 0xFF) - -void msm_isp_process_stats_irq(struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1, - struct msm_isp_timestamp *ts); -void msm_isp_stats_stream_update(struct vfe_device *vfe_dev); -int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg); -int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg); -#endif /* __MSM_ISP_STATS_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.c deleted file mode 100644 index a2ec4d0fe54f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.c +++ /dev/null @@ -1,1668 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include -#include -#include - -#include "msm.h" -#include "msm_isp_util.h" -#include "msm_isp_axi_util.h" -#include "msm_isp_stats_util.h" -#include "msm_camera_io_util.h" - -#define MAX_ISP_V4l2_EVENTS 100 -static DEFINE_MUTEX(bandwidth_mgr_mutex); -static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr; - -#define MSM_ISP_MIN_AB 450000000 -#define MSM_ISP_MIN_IB 900000000 -#define MSM_MIN_REQ_VFE_CPP_BW 1700000000 - -#define VFE40_8974V2_VERSION 0x1001001A - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_BOOST -#endif - -#ifdef CAMERA_BOOST -#define MBYTE (1ULL << 20) - -#define BW_MBPS(_bw) \ -{ \ - .vectors = &(struct msm_bus_vectors){ \ - .src = 1, \ - .dst = 512, \ - .ib = (_bw) * MBYTE, \ - .ab = 0, \ - }, \ - .num_paths = 1, \ -} - -static struct msm_bus_paths bw_level_tbl[] = { - [0] = BW_MBPS(381), /* At least 50 MHz on bus. */ - [1] = BW_MBPS(4066), /* At least 533 MHz on bus. */ -}; - -static struct msm_bus_scale_pdata bus_client_pdata = { - .usecase = bw_level_tbl, - .num_usecases = ARRAY_SIZE(bw_level_tbl), - .active_only = 1, - .name = "Camera_boost", -}; - -static u32 bus_client; -#endif - -static bool camera_boost_flag = true; -int32_t msm_isp_camera_boost(bool flag){ - camera_boost_flag = flag; - return 0; -} -EXPORT_SYMBOL(msm_isp_camera_boost); - -static struct msm_bus_vectors msm_isp_init_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_isp_ping_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_vectors msm_isp_pong_vectors[] = { - { - .src = MSM_BUS_MASTER_VFE, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = MSM_ISP_MIN_AB, - .ib = MSM_ISP_MIN_IB, - }, -}; - -static struct msm_bus_paths msm_isp_bus_client_config[] = { - { - ARRAY_SIZE(msm_isp_init_vectors), - msm_isp_init_vectors, - }, - { - ARRAY_SIZE(msm_isp_ping_vectors), - msm_isp_ping_vectors, - }, - { - ARRAY_SIZE(msm_isp_pong_vectors), - msm_isp_pong_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_isp_bus_client_pdata = { - msm_isp_bus_client_config, - ARRAY_SIZE(msm_isp_bus_client_config), - .name = "msm_camera_isp", -}; - -static void msm_isp_print_fourcc_error(const char *origin, - uint32_t fourcc_format) -{ - int i; - char text[5]; - text[4] = '\0'; - for (i = 0; i < 4; i++) { - text[i] = (char)(((fourcc_format) >> (i * 8)) & 0xFF); - if ((text[i] < '0') || (text[i] > 'z')) { - pr_err("%s: Invalid output format %d (unprintable)\n", - origin, fourcc_format); - return; - } - } - pr_err("%s: Invalid output format %s\n", - origin, text); - return; -} - -#ifdef CONFIG_COMPAT -struct msm_vfe_cfg_cmd2_32 { - uint16_t num_cfg; - uint16_t cmd_len; - compat_caddr_t cfg_data; - compat_caddr_t cfg_cmd; -}; - -#define VIDIOC_MSM_VFE_REG_CFG_COMPAT \ - _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2_32) -#endif /* CONFIG_COMPAT */ - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client) -{ - int rc = 0; - mutex_lock(&bandwidth_mgr_mutex); - isp_bandwidth_mgr.client_info[client].active = 1; - if (isp_bandwidth_mgr.use_count++) { - mutex_unlock(&bandwidth_mgr_mutex); - return rc; - } - isp_bandwidth_mgr.bus_client = - msm_bus_scale_register_client(&msm_isp_bus_client_pdata); - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s: client register failed\n", __func__); - mutex_unlock(&bandwidth_mgr_mutex); - return -EINVAL; - } - - isp_bandwidth_mgr.bus_vector_active_idx = 1; - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - -#ifdef CAMERA_BOOST - if (!bus_client && camera_boost_flag) { - bus_client = msm_bus_scale_register_client(&bus_client_pdata); - msm_bus_scale_client_update_request(bus_client, 1); - } -#endif - - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib) -{ - int i; - struct msm_bus_paths *path; - mutex_lock(&bandwidth_mgr_mutex); - if (!isp_bandwidth_mgr.use_count || - !isp_bandwidth_mgr.bus_client) { - pr_err("%s:error bandwidth manager inactive use_cnt:%d bus_clnt:%d\n", - __func__, isp_bandwidth_mgr.use_count, - isp_bandwidth_mgr.bus_client); - return -EINVAL; - } - - isp_bandwidth_mgr.client_info[client].ab = ab; - isp_bandwidth_mgr.client_info[client].ib = ib; - ALT_VECTOR_IDX(isp_bandwidth_mgr.bus_vector_active_idx); - path = - &(msm_isp_bus_client_pdata.usecase[ - isp_bandwidth_mgr.bus_vector_active_idx]); - path->vectors[0].ab = MSM_ISP_MIN_AB; - path->vectors[0].ib = MSM_ISP_MIN_IB; - for (i = 0; i < MAX_ISP_CLIENT; i++) { - if (isp_bandwidth_mgr.client_info[i].active) { - path->vectors[0].ab += - isp_bandwidth_mgr.client_info[i].ab; - path->vectors[0].ib += - isp_bandwidth_mgr.client_info[i].ib; - } - } - /* All the clients combined i.e. VFE + CPP should use at least - minimum recommended bandwidth */ - if (path->vectors[0].ib < MSM_MIN_REQ_VFE_CPP_BW) - path->vectors[0].ib = MSM_MIN_REQ_VFE_CPP_BW; - msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, - isp_bandwidth_mgr.bus_vector_active_idx); - mutex_unlock(&bandwidth_mgr_mutex); - return 0; -} - -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client) -{ - mutex_lock(&bandwidth_mgr_mutex); - memset(&isp_bandwidth_mgr.client_info[client], 0, - sizeof(struct msm_isp_bandwidth_info)); - if (--isp_bandwidth_mgr.use_count) { - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - if (!isp_bandwidth_mgr.bus_client) { - pr_err("%s:%d error: bus client invalid\n", __func__, __LINE__); - mutex_unlock(&bandwidth_mgr_mutex); - return; - } - - msm_bus_scale_client_update_request( - isp_bandwidth_mgr.bus_client, 0); - msm_bus_scale_unregister_client(isp_bandwidth_mgr.bus_client); - -#ifdef CAMERA_BOOST - if(bus_client){ - msm_bus_scale_client_update_request(bus_client, 0); - msm_bus_scale_unregister_client(bus_client); - bus_client = 0; - } -#endif - - isp_bandwidth_mgr.bus_client = 0; - mutex_unlock(&bandwidth_mgr_mutex); -} - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern) -{ - switch (frame_skip_pattern) { - case NO_SKIP: - case EVERY_2FRAME: - case EVERY_3FRAME: - case EVERY_4FRAME: - case EVERY_5FRAME: - case EVERY_6FRAME: - case EVERY_7FRAME: - case EVERY_8FRAME: - return frame_skip_pattern + 1; - case EVERY_16FRAME: - return 16; - break; - case EVERY_32FRAME: - return 32; - break; - case SKIP_ALL: - return 1; - default: - return 1; - } - return 1; -} - -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info) -{ - uint32_t count; - int i, rc; - uint32_t rates[VFE_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - ISP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > VFE_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - VFE_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(vfe_clk_info[i].clk_name)); - ISP_DBG("clock-names[%d] = %s\n", i, vfe_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - vfe_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - ISP_DBG("clk_rate[%d] = %ld\n", i, vfe_clk_info[i].clk_rate); - } - vfe_dev->num_clk = count; - return 0; -} - -static inline void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp) -{ - struct timespec ts; - ktime_get_ts(&ts); - time_stamp->buf_time.tv_sec = ts.tv_sec; - time_stamp->buf_time.tv_usec = ts.tv_nsec/1000; - do_gettimeofday(&(time_stamp->event_time)); -} - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - rc = v4l2_event_subscribe(fh, sub, MAX_ISP_V4l2_EVENTS, NULL); - if (rc == 0) { - if (sub->type == V4L2_EVENT_ALL) { - int i; - - vfe_dev->axi_data.event_mask = 0; - for (i = 0; i < ISP_EVENT_MAX; i++) - vfe_dev->axi_data.event_mask |= (1 << i); - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask |= (1 << event_idx); - } - } - return rc; -} - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - int rc = 0; - - rc = v4l2_event_unsubscribe(fh, sub); - if (sub->type == V4L2_EVENT_ALL) { - vfe_dev->axi_data.event_mask = 0; - } else { - int event_idx = sub->type - ISP_EVENT_BASE; - - vfe_dev->axi_data.event_mask &= ~(1 << event_idx); - } - return rc; -} - -static int msm_isp_get_max_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int clk_idx = 0; - unsigned long max_value = ~0; - long round_rate = 0; - - if (!vfe_dev || !rate) { - pr_err("%s:%d failed: vfe_dev %pK rate %pK\n", __func__, __LINE__, - vfe_dev, rate); - return -EINVAL; - } - - *rate = 0; - if (!vfe_dev->hw_info) { - pr_err("%s:%d failed: vfe_dev->hw_info %pK\n", __func__, - __LINE__, vfe_dev->hw_info); - return -EINVAL; - } - - clk_idx = vfe_dev->hw_info->vfe_clk_idx; - if (clk_idx >= vfe_dev->num_clk) { - pr_err("%s:%d failed: clk_idx %d max array size %d\n", - __func__, __LINE__, clk_idx, - vfe_dev->num_clk); - return -EINVAL; - } - - round_rate = clk_round_rate(vfe_dev->vfe_clk[clk_idx], max_value); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return -EINVAL; - } - - *rate = round_rate; - return 0; -} - -static int msm_isp_set_clk_rate(struct vfe_device *vfe_dev, long *rate) -{ - int rc = 0; - int clk_idx = vfe_dev->hw_info->vfe_clk_idx; - long round_rate = - clk_round_rate(vfe_dev->vfe_clk[clk_idx], *rate); - if (round_rate < 0) { - pr_err("%s: Invalid vfe clock rate\n", __func__); - return round_rate; - } - - rc = clk_set_rate(vfe_dev->vfe_clk[clk_idx], round_rate); - if (rc < 0) { - pr_err("%s: Vfe set rate error\n", __func__); - return rc; - } - *rate = round_rate; - return 0; -} - -int msm_isp_cfg_pix(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[VFE_PIX_0].active) { - pr_err("%s: pixel path is active\n", __func__); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux = - input_cfg->d.pix_cfg.input_mux; - vfe_dev->axi_data.src_info[VFE_PIX_0].width = - input_cfg->d.pix_cfg.camif_cfg.pixels_per_line; - - rc = msm_isp_set_clk_rate(vfe_dev, - &vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock); - if (rc < 0) { - pr_err("%s: clock set rate failed\n", __func__); - return rc; - } - - vfe_dev->axi_data.src_info[VFE_PIX_0].input_format = - input_cfg->d.pix_cfg.input_format; - - vfe_dev->hw_info->vfe_ops.core_ops.cfg_camif( - vfe_dev, &input_cfg->d.pix_cfg); - return rc; -} - -int msm_isp_cfg_rdi(struct vfe_device *vfe_dev, - struct msm_vfe_input_cfg *input_cfg) -{ - int rc = 0; - if (vfe_dev->axi_data.src_info[input_cfg->input_src].active) { - pr_err("%s: RAW%d path is active\n", __func__, - input_cfg->input_src - VFE_RAW_0); - return -EINVAL; - } - - vfe_dev->axi_data.src_info[input_cfg->input_src].pixel_clock = - input_cfg->input_pix_clk; - vfe_dev->hw_info->vfe_ops.core_ops.cfg_rdi_reg( - vfe_dev, &input_cfg->d.rdi_cfg, input_cfg->input_src); - return rc; -} - -int msm_isp_cfg_input(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_input_cfg *input_cfg = arg; - - switch (input_cfg->input_src) { - case VFE_PIX_0: - rc = msm_isp_cfg_pix(vfe_dev, input_cfg); - break; - case VFE_RAW_0: - case VFE_RAW_1: - case VFE_RAW_2: - rc = msm_isp_cfg_rdi(vfe_dev, input_cfg); - break; - default: - pr_err("%s: Invalid input source\n", __func__); - rc = -EINVAL; - } - return rc; -} - -static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - - /* use real time mutex for hard real-time ioctls such as - * buffer operations and register updates. - * Use core mutex for other ioctls that could take - * longer time to complete such as start/stop ISP streams - * which blocks until the hardware start/stop streaming - */ - ISP_DBG("%s cmd: %d\n", __func__, _IOC_TYPE(cmd)); - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_VFE_REG_LIST_CFG: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_cmd_list(vfe_dev, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_BUF: - case VIDIOC_MSM_ISP_ENQUEUE_BUF: - case VIDIOC_MSM_ISP_RELEASE_BUF: { - mutex_lock(&vfe_dev->realtime_mutex); - rc = msm_isp_proc_buf_cmd(vfe_dev->buf_mgr, cmd, arg); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - case VIDIOC_MSM_ISP_REQUEST_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_INPUT_CFG: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_input(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_REG_UPDATE_CMD: - if (arg) { - enum msm_vfe_input_src frame_src = *((enum msm_vfe_input_src *)arg); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << frame_src)); - } - break; - case VIDIOC_MSM_ISP_SET_SRC_STATE: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_set_src_state(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_REQUEST_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_request_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_RELEASE_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_release_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_CFG_STATS_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_cfg_stats_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case VIDIOC_MSM_ISP_UPDATE_STREAM: - mutex_lock(&vfe_dev->core_mutex); - rc = msm_isp_update_axi_stream(vfe_dev, arg); - mutex_unlock(&vfe_dev->core_mutex); - break; - case MSM_SD_SHUTDOWN: - while (vfe_dev->vfe_open_cnt != 0) - msm_isp_close_node(sd, NULL); - break; - - default: - pr_err_ratelimited("%s: Invalid ISP command\n", __func__); - rc = -EINVAL; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_isp_ioctl_compat(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc = 0; - void __user *up; - if (is_compat_task()) { - up = compat_ptr((unsigned long)arg); - arg = up; - } - - switch (cmd) { - case VIDIOC_MSM_VFE_REG_CFG_COMPAT: { - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - struct msm_vfe_cfg_cmd2 proc_cmd; - struct msm_vfe_cfg_cmd2_32 *proc_cmd_ptr32; - mutex_lock(&vfe_dev->realtime_mutex); - proc_cmd_ptr32 = (struct msm_vfe_cfg_cmd2_32 *) - compat_ptr((unsigned long)arg); - proc_cmd.num_cfg = proc_cmd_ptr32->num_cfg; - proc_cmd.cmd_len = proc_cmd_ptr32->cmd_len; - proc_cmd.cfg_data = compat_ptr(proc_cmd_ptr32->cfg_data); - proc_cmd.cfg_cmd = compat_ptr(proc_cmd_ptr32->cfg_cmd); - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd); - mutex_unlock(&vfe_dev->realtime_mutex); - break; - } - default: - return msm_isp_ioctl_unlocked(sd, cmd, arg); - } - - return rc; -} - -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_compat(sd, cmd, arg); -} -#else /* CONFIG_COMPAT */ -long msm_isp_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - return msm_isp_ioctl_unlocked(sd, cmd, arg); -} -#endif /* CONFIG_COMPAT */ - -static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd, - uint32_t *cfg_data, uint32_t cmd_len) -{ - if (!vfe_dev || !reg_cfg_cmd) { - pr_err("%s:%d failed: vfe_dev %pK reg_cfg_cmd %pK\n", __func__, - __LINE__, vfe_dev, reg_cfg_cmd); - return -EINVAL; - } - if ((reg_cfg_cmd->cmd_type != VFE_CFG_MASK) && - (!cfg_data || !cmd_len)) { - pr_err("%s:%d failed: cmd type %d cfg_data %pK cmd_len %d\n", - __func__, __LINE__, reg_cfg_cmd->cmd_type, cfg_data, - cmd_len); - return -EINVAL; - } - - /* Validate input parameters */ - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: - case VFE_READ: - case VFE_WRITE_MB: { - if ((reg_cfg_cmd->u.rw_info.reg_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.reg_offset + - reg_cfg_cmd->u.rw_info.len) > - resource_size(vfe_dev->vfe_mem))) { - pr_err("%s:%d reg_offset %d len %d res %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.reg_offset, - reg_cfg_cmd->u.rw_info.len, - (uint32_t)resource_size(vfe_dev->vfe_mem)); - return -EINVAL; - } - - if ((reg_cfg_cmd->u.rw_info.cmd_data_offset > - (UINT_MAX - reg_cfg_cmd->u.rw_info.len)) || - ((reg_cfg_cmd->u.rw_info.cmd_data_offset + - reg_cfg_cmd->u.rw_info.len) > cmd_len)) { - pr_err("%s:%d cmd_data_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.rw_info.cmd_data_offset, - reg_cfg_cmd->u.rw_info.len, cmd_len); - return -EINVAL; - } - break; - } - - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT || - reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - if ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset <= - reg_cfg_cmd->u.dmi_info.lo_tbl_offset) || - (reg_cfg_cmd->u.dmi_info.hi_tbl_offset - - reg_cfg_cmd->u.dmi_info.lo_tbl_offset != - (sizeof(uint32_t)))) { - pr_err("%s:%d hi %d lo %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset); - return -EINVAL; - } - if (reg_cfg_cmd->u.dmi_info.len <= sizeof(uint32_t)) { - pr_err("%s:%d len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.len); - return -EINVAL; - } - if (((UINT_MAX - - reg_cfg_cmd->u.dmi_info.hi_tbl_offset) < - (reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t))) || - ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset + - reg_cfg_cmd->u.dmi_info.len - - sizeof(uint32_t)) > cmd_len)) { - pr_err("%s:%d hi_tbl_offset %d len %d cmd %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.hi_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - } - if ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset > - (UINT_MAX - reg_cfg_cmd->u.dmi_info.len)) || - ((reg_cfg_cmd->u.dmi_info.lo_tbl_offset + - reg_cfg_cmd->u.dmi_info.len) > cmd_len)) { - pr_err("%s:%d lo_tbl_offset %d len %d cmd_len %d\n", - __func__, __LINE__, - reg_cfg_cmd->u.dmi_info.lo_tbl_offset, - reg_cfg_cmd->u.dmi_info.len, cmd_len); - return -EINVAL; - } - break; - } - - default: - break; - } - - switch (reg_cfg_cmd->cmd_type) { - case VFE_WRITE: { - msm_camera_io_memcpy(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_WRITE_MB: { - msm_camera_io_memcpy_mb(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset, - cfg_data + reg_cfg_cmd->u.rw_info.cmd_data_offset/4, - reg_cfg_cmd->u.rw_info.len); - break; - } - case VFE_CFG_MASK: { - uint32_t temp; - if ((UINT_MAX - sizeof(temp) < - reg_cfg_cmd->u.mask_info.reg_offset) || - (resource_size(vfe_dev->vfe_mem) < - reg_cfg_cmd->u.mask_info.reg_offset + - sizeof(temp))) { - pr_err("%s: VFE_CFG_MASK: Invalid length\n", __func__); - return -EINVAL; - } - temp = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - - temp &= ~reg_cfg_cmd->u.mask_info.mask; - temp |= reg_cfg_cmd->u.mask_info.val; - msm_camera_io_w(temp, vfe_dev->vfe_base + - reg_cfg_cmd->u.mask_info.reg_offset); - break; - } - case VFE_WRITE_DMI_16BIT: - case VFE_WRITE_DMI_32BIT: - case VFE_WRITE_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = *lo_tbl_ptr++; - if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_16BIT) { - lo_val1 = lo_val & 0x0000FFFF; - lo_val = (lo_val & 0xFFFF0000)>>16; - msm_camera_io_w(lo_val1, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } else if (reg_cfg_cmd->cmd_type == - VFE_WRITE_DMI_64BIT) { - lo_tbl_ptr++; - hi_val = *hi_tbl_ptr; - hi_tbl_ptr = hi_tbl_ptr + 2; - msm_camera_io_w(hi_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - } - msm_camera_io_w(lo_val, vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - } - break; - } - case VFE_READ_DMI_16BIT: - case VFE_READ_DMI_32BIT: - case VFE_READ_DMI_64BIT: { - int i; - uint32_t *hi_tbl_ptr = NULL, *lo_tbl_ptr = NULL; - uint32_t hi_val, lo_val, lo_val1; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.hi_tbl_offset/4; - } - lo_tbl_ptr = cfg_data + - reg_cfg_cmd->u.dmi_info.lo_tbl_offset/4; - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) - reg_cfg_cmd->u.dmi_info.len = - reg_cfg_cmd->u.dmi_info.len / 2; - - for (i = 0; i < reg_cfg_cmd->u.dmi_info.len/4; i++) { - lo_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_16BIT) { - lo_val1 = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset + 0x4); - lo_val |= lo_val1 << 16; - } - *lo_tbl_ptr++ = lo_val; - if (reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) { - hi_val = msm_camera_io_r(vfe_dev->vfe_base + - vfe_dev->hw_info->dmi_reg_offset); - *hi_tbl_ptr = hi_val; - hi_tbl_ptr += 2; - lo_tbl_ptr++; - } - } - break; - } - case VFE_HW_UPDATE_LOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - uint32_t update_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id; - if (vfe_dev->axi_data.frame_id[session_id] != *cfg_data - || update_id == *cfg_data) { - pr_err("hw update lock failed,acquire id %u\n", - *cfg_data); - pr_err("hw update lock failed,current id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - pr_err("hw update lock failed,last id %u\n", - update_id); - return -EINVAL; - } - break; - } - case VFE_HW_UPDATE_UNLOCK: { - uint32_t session_id = - vfe_dev->axi_data.src_info[VFE_PIX_0].session_id; - if (vfe_dev->axi_data.frame_id[session_id] - != *cfg_data) { - pr_err("hw update across frame boundary,begin id %u\n", - *cfg_data); - pr_err("hw update across frame boundary,end id %u\n", - vfe_dev->axi_data.frame_id[session_id]); - } - vfe_dev->axi_data.src_info[VFE_PIX_0].last_updt_frm_id = - vfe_dev->axi_data.frame_id[session_id]; - break; - } - case VFE_READ: { - int i; - uint32_t *data_ptr = cfg_data + - reg_cfg_cmd->u.rw_info.cmd_data_offset/4; - for (i = 0; i < reg_cfg_cmd->u.rw_info.len/4; i++) { - if ((data_ptr < cfg_data) || - (UINT_MAX / sizeof(*data_ptr) < - (data_ptr - cfg_data)) || - (sizeof(*data_ptr) * (data_ptr - cfg_data) >= - cmd_len)) - return -EINVAL; - *data_ptr++ = msm_camera_io_r(vfe_dev->vfe_base + - reg_cfg_cmd->u.rw_info.reg_offset); - reg_cfg_cmd->u.rw_info.reg_offset += 4; - } - break; - } - case GET_MAX_CLK_RATE: { - int rc = 0; - - if (cmd_len < sizeof(unsigned long)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(unsigned long)); - return -EINVAL; - } - rc = msm_isp_get_max_clk_rate(vfe_dev, - (unsigned long *)cfg_data); - if (rc < 0) { - pr_err("%s:%d failed: rc %d\n", __func__, __LINE__, rc); - return -EINVAL; - } - break; - } - case GET_ISP_ID: { - uint32_t *isp_id = NULL; - - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %u\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - - isp_id = (uint32_t *)cfg_data; - *isp_id = vfe_dev->pdev->id; - break; - } - case SET_WM_UB_SIZE: { - if (cmd_len < sizeof(uint32_t)) { - pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", - __func__, __LINE__, cmd_len, - sizeof(uint32_t)); - return -EINVAL; - } - vfe_dev->vfe_ub_size = *cfg_data; - break; - } - } - return 0; -} - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0, i; - struct msm_vfe_cfg_cmd2 *proc_cmd = arg; - struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd; - uint32_t *cfg_data = NULL; - - if (!proc_cmd->num_cfg) { - pr_err("%s: Passed num_cfg as 0\n", __func__); - return -EINVAL; - } - - reg_cfg_cmd = kzalloc(sizeof(struct msm_vfe_reg_cfg_cmd)* - proc_cmd->num_cfg, GFP_KERNEL); - if (!reg_cfg_cmd) { - pr_err("%s: reg_cfg alloc failed\n", __func__); - rc = -ENOMEM; - goto reg_cfg_failed; - } - - if (copy_from_user(reg_cfg_cmd, - (void __user *)(proc_cmd->cfg_cmd), - sizeof(struct msm_vfe_reg_cfg_cmd) * proc_cmd->num_cfg)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - - if (proc_cmd->cmd_len > 0) { - cfg_data = kzalloc(proc_cmd->cmd_len, GFP_KERNEL); - if (!cfg_data) { - pr_err("%s: cfg_data alloc failed\n", __func__); - rc = -ENOMEM; - goto cfg_data_failed; - } - - if (copy_from_user(cfg_data, - (void __user *)(proc_cmd->cfg_data), - proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - } - - //pr_err("%s: platform_id=%u, kernel_id=%u\n", __func__,proc_cmd->frame_id, vfe_dev->frame_id); - if( (vfe_dev->frame_id == proc_cmd->frame_id && vfe_dev->eof_event_occur != 1) - || proc_cmd->frame_id == 0) { - for (i = 0; i < proc_cmd->num_cfg; i++) - msm_isp_send_hw_cmd(vfe_dev, ®_cfg_cmd[i], cfg_data, proc_cmd->cmd_len); - } else{ - rc = MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR; - pr_err("%s: skip hw update, platform_id=%u, kernel_id=%u, eof_event_occur=%u\n", - __func__,proc_cmd->frame_id, vfe_dev->frame_id, vfe_dev->eof_event_occur); - } - - if (copy_to_user(proc_cmd->cfg_data, - cfg_data, proc_cmd->cmd_len)) { - rc = -EFAULT; - goto copy_cmd_failed; - } - -copy_cmd_failed: - kfree(cfg_data); -cfg_data_failed: - kfree(reg_cfg_cmd); -reg_cfg_failed: - return rc; -} - -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg) -{ - int rc = 0; - struct msm_vfe_cfg_cmd_list *proc_cmd = - (struct msm_vfe_cfg_cmd_list *)arg; - struct msm_vfe_cfg_cmd_list cmd, cmd_next; - - if (!vfe_dev || !arg) { - pr_err("%s:%d failed: vfe_dev %pK arg %pK", __func__, __LINE__, - vfe_dev, arg); - return -EINVAL; - } - - rc = msm_isp_proc_cmd(vfe_dev, &proc_cmd->cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = *proc_cmd; - - while (cmd.next) { - if (cmd.next_size != sizeof(struct msm_vfe_cfg_cmd_list)) { - pr_err("%s:%d failed: next size %u != expected %zu\n", - __func__, __LINE__, cmd.next_size, - sizeof(struct msm_vfe_cfg_cmd_list)); - break; - } - if (copy_from_user(&cmd_next, (void __user *)cmd.next, - sizeof(struct msm_vfe_cfg_cmd_list))) { - rc = -EFAULT; - continue; - } - - rc = msm_isp_proc_cmd(vfe_dev, &cmd_next.cfg_cmd); - if (rc < 0) - pr_err("%s:%d failed: rc %d", __func__, __LINE__, rc); - - cmd = cmd_next; - } - return rc; -} - -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t event_type, - struct msm_isp_event_data *event_data) -{ - struct v4l2_event isp_event; - memset(&isp_event, 0, sizeof(struct v4l2_event)); - isp_event.id = 0; - isp_event.type = event_type; - memcpy(&isp_event.u.data[0], event_data, - sizeof(struct msm_isp_event_data)); - v4l2_event_queue(vfe_dev->subdev.sd.devnode, &isp_event); - return 0; -} - -#define CAL_WORD(width, M, N) ((width * M + N - 1) / N) - -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line) -{ - int val = -1; - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - val = CAL_WORD(pixel_per_line, 5, 32); - break; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - val = CAL_WORD(pixel_per_line, 3, 16); - break; - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - val = CAL_WORD(pixel_per_line, 1, 6); - break; - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - val = CAL_WORD(pixel_per_line, 1, 5); - break; - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - val = CAL_WORD(pixel_per_line, 1, 8); - break; - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - val = CAL_WORD(pixel_per_line, 2, 8); - break; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return val; -} - -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - return MIPI; - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - return QCOM; - default: - msm_isp_print_fourcc_error(__func__, output_format); - break; - } - return -EINVAL; -} - -int msm_isp_get_bit_per_pixel(uint32_t output_format) -{ - switch (output_format) { - case V4L2_PIX_FMT_Y4: - return 4; - case V4L2_PIX_FMT_Y6: - return 6; - case V4L2_PIX_FMT_SBGGR8: - case V4L2_PIX_FMT_SGBRG8: - case V4L2_PIX_FMT_SGRBG8: - case V4L2_PIX_FMT_SRGGB8: - case V4L2_PIX_FMT_QBGGR8: - case V4L2_PIX_FMT_QGBRG8: - case V4L2_PIX_FMT_QGRBG8: - case V4L2_PIX_FMT_QRGGB8: - case V4L2_PIX_FMT_JPEG: - case V4L2_PIX_FMT_META: - case V4L2_PIX_FMT_NV12: - case V4L2_PIX_FMT_NV21: - case V4L2_PIX_FMT_NV14: - case V4L2_PIX_FMT_NV41: - case V4L2_PIX_FMT_YVU410: - case V4L2_PIX_FMT_YVU420: - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_YYUV: - case V4L2_PIX_FMT_YVYU: - case V4L2_PIX_FMT_UYVY: - case V4L2_PIX_FMT_VYUY: - case V4L2_PIX_FMT_YUV422P: - case V4L2_PIX_FMT_YUV411P: - case V4L2_PIX_FMT_Y41P: - case V4L2_PIX_FMT_YUV444: - case V4L2_PIX_FMT_YUV555: - case V4L2_PIX_FMT_YUV565: - case V4L2_PIX_FMT_YUV32: - case V4L2_PIX_FMT_YUV410: - case V4L2_PIX_FMT_YUV420: - case V4L2_PIX_FMT_GREY: - case V4L2_PIX_FMT_PAL8: - case V4L2_PIX_FMT_UV8: - case MSM_V4L2_PIX_FMT_META: - return 8; - case V4L2_PIX_FMT_SBGGR10: - case V4L2_PIX_FMT_SGBRG10: - case V4L2_PIX_FMT_SGRBG10: - case V4L2_PIX_FMT_SRGGB10: - case V4L2_PIX_FMT_QBGGR10: - case V4L2_PIX_FMT_QGBRG10: - case V4L2_PIX_FMT_QGRBG10: - case V4L2_PIX_FMT_QRGGB10: - case V4L2_PIX_FMT_Y10: - case V4L2_PIX_FMT_Y10BPACK: - return 10; - case V4L2_PIX_FMT_SBGGR12: - case V4L2_PIX_FMT_SGBRG12: - case V4L2_PIX_FMT_SGRBG12: - case V4L2_PIX_FMT_SRGGB12: - case V4L2_PIX_FMT_QBGGR12: - case V4L2_PIX_FMT_QGBRG12: - case V4L2_PIX_FMT_QGRBG12: - case V4L2_PIX_FMT_QRGGB12: - case V4L2_PIX_FMT_Y12: - return 12; - case V4L2_PIX_FMT_NV16: - case V4L2_PIX_FMT_NV61: - case V4L2_PIX_FMT_Y16: - return 16; - /*TD: Add more image format*/ - default: - msm_isp_print_fourcc_error(__func__, output_format); -#if defined(CONFIG_SENSOR_8_BPP) - return 8; -#else - return -EINVAL; -#endif - } -} - -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev) -{ - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - error_info->info_dump_frame_count++; -} - -void msm_isp_process_error_info(struct vfe_device *vfe_dev) -{ - int i; - uint8_t num_stats_type = - vfe_dev->hw_info->stats_hw_info->num_stats_type; - struct msm_vfe_error_info *error_info = &vfe_dev->error_info; - static DEFINE_RATELIMIT_STATE(rs, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - static DEFINE_RATELIMIT_STATE(rs_stats, - DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); - - if (error_info->error_count == 1 || - !(error_info->info_dump_frame_count % 100)) { - vfe_dev->hw_info->vfe_ops.core_ops. - process_error_status(vfe_dev); - error_info->error_mask0 = 0; - error_info->error_mask1 = 0; - error_info->camif_status = 0; - error_info->violation_status = 0; - for (i = 0; i < MAX_NUM_STREAM; i++) { - if (error_info->stream_framedrop_count[i] != 0 && - __ratelimit(&rs)) { - pr_err("%s: Stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stream_framedrop_count[i]); - error_info->stream_framedrop_count[i] = 0; - } - } - for (i = 0; i < num_stats_type; i++) { - if (error_info->stats_framedrop_count[i] != 0 && - __ratelimit(&rs_stats)) { - pr_err("%s: Stats stream[%d]: dropped %d frames\n", - __func__, i, - error_info->stats_framedrop_count[i]); - error_info->stats_framedrop_count[i] = 0; - } - } - } -} - -static inline void msm_isp_update_error_info(struct vfe_device *vfe_dev, - uint32_t error_mask0, uint32_t error_mask1) -{ - vfe_dev->error_info.error_mask0 |= error_mask0; - vfe_dev->error_info.error_mask1 |= error_mask1; - vfe_dev->error_info.error_count++; -} - -static inline void msm_isp_process_overflow_irq( - struct vfe_device *vfe_dev, - uint32_t *irq_status0, uint32_t *irq_status1) -{ - uint32_t overflow_mask; - uint32_t halt_restart_mask0, halt_restart_mask1; -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - uint8_t cur_stream_cnt = 0; -#endif - /*Mask out all other irqs if recovery is started*/ - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - *irq_status0 &= halt_restart_mask0; - *irq_status1 &= halt_restart_mask1; - return; - } - - /*Check if any overflow bit is set*/ - vfe_dev->hw_info->vfe_ops.core_ops. - get_overflow_mask(&overflow_mask); - overflow_mask &= *irq_status1; - if (overflow_mask) { -#if defined(CONFIG_SR200PC20) && defined(CONFIG_SR544) - cur_stream_cnt = msm_isp_get_curr_stream_cnt(vfe_dev); - if (cur_stream_cnt == 0) { - /* When immediate stop is issued during streamoff and - AXI bridge is halted, if write masters are still - active, then it's possible to get overflow Irq - because WM is still writing pixels into UB, but UB - has no way to write into bus. Since everything is - being stopped anyway, skip the overflow recovery */ - return; - } -#endif - pr_err("%s: Bus overflow detected: 0x%x\n", - __func__, overflow_mask); - atomic_set(&vfe_dev->error_info.overflow_state, - OVERFLOW_DETECTED); - pr_err("%s: Start bus overflow recovery\n", __func__); - /*Store current IRQ mask*/ - vfe_dev->hw_info->vfe_ops.core_ops.get_irq_mask(vfe_dev, - &vfe_dev->error_info.overflow_recover_irq_mask0, - &vfe_dev->error_info.overflow_recover_irq_mask1); - /*Stop CAMIF Immediately*/ - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY); - /*Halt the hardware & Clear all other IRQ mask*/ - vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, HALT_REQUESTED); - *irq_status0 = 0; - *irq_status1 = 0; - } -} - -static inline void msm_isp_reset_burst_count( - struct vfe_device *vfe_dev) -{ - int i; - struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; - struct msm_vfe_axi_stream *stream_info; - struct msm_vfe_axi_stream_request_cmd framedrop_info; - memset(&framedrop_info, 0, sizeof(struct msm_vfe_axi_stream_request_cmd)); - for (i = 0; i < MAX_NUM_STREAM; i++) { - stream_info = &axi_data->stream_info[i]; - if (stream_info->state != ACTIVE) - continue; - if (stream_info->stream_type == BURST_STREAM && - stream_info->num_burst_capture != 0) { - framedrop_info.axi_stream_handle = i; - framedrop_info.burst_count = - stream_info->num_burst_capture; - framedrop_info.frame_skip_pattern = - stream_info->frame_skip_pattern; - framedrop_info.init_frame_drop = 0; - msm_isp_calculate_framedrop(&vfe_dev->axi_data, - &framedrop_info); - } - } -} - -static void msm_isp_process_overflow_recovery( - struct vfe_device *vfe_dev, - uint32_t irq_status0, uint32_t irq_status1) -{ - uint32_t halt_restart_mask0, halt_restart_mask1; - vfe_dev->hw_info->vfe_ops.core_ops. - get_halt_restart_mask(&halt_restart_mask0, - &halt_restart_mask1); - irq_status0 &= halt_restart_mask0; - irq_status1 &= halt_restart_mask1; - if (irq_status0 == 0 && irq_status1 == 0) - return; - - switch (atomic_read(&vfe_dev->error_info.overflow_state)) { - case HALT_REQUESTED: { - pr_err("%s: Halt done, Restart Pending\n", __func__); - /*Reset the hardware*/ - vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_SOFT, 0); - /*Update overflow state*/ - atomic_set(&vfe_dev->error_info.overflow_state, - RESTART_REQUESTED); - } - break; - case RESTART_REQUESTED: { - pr_err("%s: Restart done, Resuming\n", __func__); - /*Reset the burst stream frame drop pattern, in the - *case where bus overflow happens during the burstshot, - *the framedrop pattern might be updated after reg update - *to skip all the frames after the burst shot. The burst shot - *might not be completed due to the overflow, so the framedrop - *pattern need to change back to the original settings in order - *to recovr from overflow. - */ - msm_isp_reset_burst_count(vfe_dev); - vfe_dev->hw_info->vfe_ops.axi_ops. - reload_wm(vfe_dev, 0xFFFFFFFF); - vfe_dev->hw_info->vfe_ops.core_ops.restore_irq_mask(vfe_dev); - vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, (1 << VFE_PIX_0)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); - vfe_dev->hw_info->vfe_ops.core_ops. - update_camif_state(vfe_dev, ENABLE_CAMIF); - } - break; - case NO_OVERFLOW: - case OVERFLOW_DETECTED: - default: - break; - } -} - -irqreturn_t msm_isp_process_irq(int irq_num, void *data) -{ - unsigned long flags; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - uint32_t irq_status0, irq_status1; - uint32_t error_mask0, error_mask1; - - vfe_dev->hw_info->vfe_ops.irq_ops. - read_irq_status(vfe_dev, &irq_status0, &irq_status1); - if ((irq_status0 == 0) && (irq_status1 == 0)) { - pr_err_ratelimited("%s: irq_status0 & 1 are both 0\n", - __func__); - return IRQ_HANDLED; - } - msm_isp_process_overflow_irq(vfe_dev, - &irq_status0, &irq_status1); - vfe_dev->hw_info->vfe_ops.core_ops. - get_error_mask(&error_mask0, &error_mask1); - error_mask0 &= irq_status0; - error_mask1 &= irq_status1; - irq_status0 &= ~error_mask0; - irq_status1 &= ~error_mask1; - if (!vfe_dev->ignore_error && - ((error_mask0 != 0) || (error_mask1 != 0))) - msm_isp_update_error_info(vfe_dev, error_mask0, error_mask1); - - if ((irq_status0 == 0) && (irq_status1 == 0) && - (!(((error_mask0 != 0) || (error_mask1 != 0)) && - vfe_dev->error_info.error_count == 1))) { - ISP_DBG("%s: irq status 0 and 1 = 0, also error irq hadnled!\n", - __func__); - return IRQ_HANDLED; - } - - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = &vfe_dev->tasklet_queue_cmd[vfe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err_ratelimited("%s: Tasklet queue overflow: %d\n", - __func__, vfe_dev->pdev->id); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vfe_dev->irq_cnt); - } - queue_cmd->vfeInterruptStatus0 = irq_status0; - queue_cmd->vfeInterruptStatus1 = irq_status1; - msm_isp_get_timestamp(&queue_cmd->ts); - queue_cmd->cmd_used = 1; - vfe_dev->taskletq_idx = - (vfe_dev->taskletq_idx + 1) % MSM_VFE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vfe_dev->tasklet_q); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - tasklet_schedule(&vfe_dev->vfe_tasklet); - return IRQ_HANDLED; -} - -void msm_isp_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vfe_device *vfe_dev = (struct vfe_device *) data; - struct msm_vfe_irq_ops *irq_ops = &vfe_dev->hw_info->vfe_ops.irq_ops; - struct msm_vfe_tasklet_queue_cmd *queue_cmd; - struct msm_isp_timestamp ts; - uint32_t irq_status0, irq_status1; - while (atomic_read(&vfe_dev->irq_cnt)) { - spin_lock_irqsave(&vfe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vfe_dev->tasklet_q, - struct msm_vfe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vfe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vfe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status0 = queue_cmd->vfeInterruptStatus0; - irq_status1 = queue_cmd->vfeInterruptStatus1; - ts = queue_cmd->ts; - spin_unlock_irqrestore(&vfe_dev->tasklet_lock, flags); - if (atomic_read(&vfe_dev->error_info.overflow_state) != - NO_OVERFLOW) { - pr_err_ratelimited("There is Overflow, kicking up recovery !!!!"); - msm_isp_process_overflow_recovery(vfe_dev, - irq_status0, irq_status1); - continue; - } - ISP_DBG("%s: status0: 0x%x status1: 0x%x\n", - __func__, irq_status0, irq_status1); - irq_ops->process_reset_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_halt_irq(vfe_dev, - irq_status0, irq_status1); - irq_ops->process_camif_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_axi_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_stats_irq(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_reg_update(vfe_dev, - irq_status0, irq_status1, &ts); - irq_ops->process_epoch_irq(vfe_dev, - irq_status0, irq_status1, &ts); - msm_isp_process_error_info(vfe_dev); - } -} - -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg) -{ - struct msm_vfe_axi_src_state *src_state = arg; - if (src_state->input_src >= VFE_SRC_MAX) - return -EINVAL; - vfe_dev->axi_data.src_info[src_state->input_src].active = - src_state->src_active; - return 0; -} - -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - long rc; - ISP_DBG("%s\n", __func__); - - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (vfe_dev->vfe_open_cnt++) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) { - pr_err("%s: init hardware failed\n", __func__); - vfe_dev->vfe_open_cnt--; - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EBUSY; - } - - rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev, - ISP_RST_HARD, 1); - if (rc <= 0) { - pr_err("%s: reset timeout\n", __func__); - vfe_dev->vfe_open_cnt--; - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - vfe_dev->vfe_hw_version = msm_camera_io_r(vfe_dev->vfe_base); - ISP_DBG("%s: HW Version: 0x%x\n", __func__, vfe_dev->vfe_hw_version); - - vfe_dev->hw_info->vfe_ops.core_ops.init_hw_reg(vfe_dev); - - vfe_dev->buf_mgr->ops->buf_mgr_init(vfe_dev->buf_mgr, "msm_isp", 28); - - memset(&vfe_dev->axi_data, 0, sizeof(struct msm_vfe_axi_shared_data)); - memset(&vfe_dev->stats_data, 0, - sizeof(struct msm_vfe_stats_shared_data)); - memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); - vfe_dev->axi_data.hw_info = vfe_dev->hw_info->axi_hw_info; - vfe_dev->taskletq_idx = 0; - vfe_dev->vt_enable = 0; - vfe_dev->p_avtimer_lsw = NULL; - vfe_dev->p_avtimer_msw = NULL; - vfe_dev->p_avtimer_ctl = NULL; - vfe_dev->avtimer_scaler = 1; /*No scaling*/ - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} - -#if 0 //CONFIG_MSM_AVTIMER -void msm_isp_end_avtimer(void) -{ - avcs_core_disable_power_collapse(0); -} -#else -void msm_isp_end_avtimer(void) -{ - pr_err("AV Timer is not supported\n"); -} -#endif - -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - long rc; - struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd); - ISP_DBG("%s\n", __func__); - mutex_lock(&vfe_dev->realtime_mutex); - mutex_lock(&vfe_dev->core_mutex); - - if (!vfe_dev->vfe_open_cnt) { - pr_err("%s invalid state open cnt %d\n", __func__, - vfe_dev->vfe_open_cnt); - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return -EINVAL; - } - - if (--vfe_dev->vfe_open_cnt) { - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; - } - - rc = vfe_dev->hw_info->vfe_ops.axi_ops.halt(vfe_dev, 1); - if (rc <= 0) - pr_err("%s: halt timeout rc=%ld\n", __func__, rc); - - vfe_dev->buf_mgr->ops->buf_mgr_deinit(vfe_dev->buf_mgr); - vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev); - if (vfe_dev->vt_enable) { - iounmap(vfe_dev->p_avtimer_lsw); - iounmap(vfe_dev->p_avtimer_msw); - iounmap(vfe_dev->p_avtimer_ctl); - msm_isp_end_avtimer(); - vfe_dev->vt_enable = 0; - vfe_dev->avtimer_scaler = 1; - } - mutex_unlock(&vfe_dev->core_mutex); - mutex_unlock(&vfe_dev->realtime_mutex); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.h b/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.h deleted file mode 100644 index da1a968d8be6..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/isp/msm_isp_util.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef __MSM_ISP_UTIL_H__ -#define __MSM_ISP_UTIL_H__ - -#include "msm_isp.h" -#include "../include/soc/qcom/camera2.h" - -/* #define CONFIG_MSM_ISP_DBG 1 */ - -#ifdef CONFIG_MSM_ISP_DBG -#define ISP_DBG(fmt, args...) printk(fmt, ##args) -#else -#define ISP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define ALT_VECTOR_IDX(x) {x = 3 - x; } -struct msm_isp_bandwidth_info { - uint32_t active; - uint64_t ab; - uint64_t ib; -}; - -enum msm_isp_hw_client { - ISP_VFE0, - ISP_VFE1, - ISP_CPP, - MAX_ISP_CLIENT, -}; - -struct msm_isp_bandwidth_mgr { - uint32_t bus_client; - uint32_t bus_vector_active_idx; - uint32_t use_count; - struct msm_isp_bandwidth_info client_info[MAX_ISP_CLIENT]; -}; - -uint32_t msm_isp_get_framedrop_period( - enum msm_vfe_frame_skip_pattern frame_skip_pattern); - -int msm_isp_init_bandwidth_mgr(enum msm_isp_hw_client client); -int msm_isp_update_bandwidth(enum msm_isp_hw_client client, - uint64_t ab, uint64_t ib); -void msm_isp_deinit_bandwidth_mgr(enum msm_isp_hw_client client); - -int msm_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub); - -int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg); -int msm_isp_send_event(struct vfe_device *vfe_dev, - uint32_t type, struct msm_isp_event_data *event_data); -int msm_isp_cal_word_per_line(uint32_t output_format, - uint32_t pixel_per_line); -int msm_isp_get_bit_per_pixel(uint32_t output_format); -enum msm_isp_pack_fmt msm_isp_get_pack_format(uint32_t output_format); -irqreturn_t msm_isp_process_irq(int irq_num, void *data); -int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg); -void msm_isp_do_tasklet(unsigned long data); -void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev); -void msm_isp_process_error_info(struct vfe_device *vfe_dev); -int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); -long msm_isp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg); -int msm_isp_proc_cmd_list(struct vfe_device *vfe_dev, void *arg); -int msm_isp_get_clk_info(struct vfe_device *vfe_dev, - struct platform_device *pdev, struct msm_cam_clk_info *vfe_clk_info); - -#endif /* __MSM_ISP_UTIL_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/ispif/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/ispif/Makefile deleted file mode 100644 index 04ff5848b62b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/ispif/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_ispif.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.c b/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.c deleted file mode 100644 index 3b0ac5ce8886..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.c +++ /dev/null @@ -1,1364 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_isp.h" - -#include "msm_ispif.h" -#include "msm.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" - -#ifdef CONFIG_MSM_ISPIF_V1 -#include "msm_ispif_hwreg_v1.h" -#else -#include "msm_ispif_hwreg_v2.h" -#endif - -#define V4L2_IDENT_ISPIF 50001 -#define MSM_ISPIF_DRV_NAME "msm_ispif" - -#define ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY 0x00 -#define ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY 0x01 -#define ISPIF_INTF_CMD_DISABLE_IMMEDIATELY 0x02 - -#define ISPIF_TIMEOUT_SLEEP_US 1000 -#define ISPIF_TIMEOUT_ALL_US 1000000 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static void msm_ispif_io_dump_reg(struct ispif_device *ispif) -{ - if (!ispif->enb_dump_reg) - return; - msm_camera_io_dump(ispif->base, 0x250); -} - - -static inline int msm_ispif_is_intf_valid(uint32_t csid_version, - enum msm_ispif_vfe_intf intf_type) -{ - return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) || - (intf_type >= VFE_MAX)) ? false : true; -} - -static struct msm_cam_clk_info ispif_8626_reset_clk_info[] = { - {"ispif_ahb_clk", NO_SET_RATE}, - {"camss_top_ahb_clk", NO_SET_RATE}, - {"csi0_ahb_clk", NO_SET_RATE}, - {"csi0_src_clk", NO_SET_RATE}, - {"csi0_phy_clk", NO_SET_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_ahb_clk", NO_SET_RATE}, - {"csi1_src_clk", NO_SET_RATE}, - {"csi1_phy_clk", NO_SET_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"camss_vfe_vfe_clk", NO_SET_RATE}, - {"camss_csi_vfe_clk", NO_SET_RATE}, -}; - -static struct msm_cam_clk_info ispif_8974_ahb_clk_info[ISPIF_CLK_INFO_MAX]; - -static struct msm_cam_clk_info ispif_8974_reset_clk_info[] = { - {"csi0_src_clk", INIT_RATE}, - {"csi0_clk", NO_SET_RATE}, - {"csi0_pix_clk", NO_SET_RATE}, - {"csi0_rdi_clk", NO_SET_RATE}, - {"csi1_src_clk", INIT_RATE}, - {"csi1_clk", NO_SET_RATE}, - {"csi1_pix_clk", NO_SET_RATE}, - {"csi1_rdi_clk", NO_SET_RATE}, - {"csi2_src_clk", INIT_RATE}, - {"csi2_clk", NO_SET_RATE}, - {"csi2_pix_clk", NO_SET_RATE}, - {"csi2_rdi_clk", NO_SET_RATE}, - {"csi3_src_clk", INIT_RATE}, - {"csi3_clk", NO_SET_RATE}, - {"csi3_pix_clk", NO_SET_RATE}, - {"csi3_rdi_clk", NO_SET_RATE}, - {"vfe0_clk_src", INIT_RATE}, - {"camss_vfe_vfe0_clk", NO_SET_RATE}, - {"camss_csi_vfe0_clk", NO_SET_RATE}, - {"vfe1_clk_src", INIT_RATE}, - {"camss_vfe_vfe1_clk", NO_SET_RATE}, - {"camss_csi_vfe1_clk", NO_SET_RATE}, -}; - -static int msm_ispif_reset_hw(struct ispif_device *ispif) -{ - int rc = 0; - long timeout = 0; - struct clk *reset_clk[ARRAY_SIZE(ispif_8974_reset_clk_info)]; - struct clk *reset_clk1[ARRAY_SIZE(ispif_8626_reset_clk_info)]; - ispif->clk_idx = 0; - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 1); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 1); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } else { - /* This is set when device is 8x26 */ - ispif->clk_idx = 2; - } - } else { - /* This is set when device is 8974 */ - ispif->clk_idx = 1; - } - - init_completion(&ispif->reset_complete[VFE0]); - if (ispif->hw_num_isps > 1) - init_completion(&ispif->reset_complete[VFE1]); - - /* initiate reset of ISPIF */ - msm_camera_io_w(ISPIF_RST_CMD_MASK, - ispif->base + ISPIF_RST_CMD_ADDR); - if (ispif->hw_num_isps > 1) - msm_camera_io_w(ISPIF_RST_CMD_1_MASK, - ispif->base + ISPIF_RST_CMD_1_ADDR); - - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE0], msecs_to_jiffies(500)); - CDBG("%s: VFE0 done\n", __func__); - - if (timeout <= 0) { - pr_err("%s: VFE0 reset wait timeout\n", __func__); - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) - pr_err("%s: VFE0 reset wait timeout\n", - __func__); - } - return -ETIMEDOUT; - } - - if (ispif->hw_num_isps > 1) { - timeout = wait_for_completion_timeout( - &ispif->reset_complete[VFE1], - msecs_to_jiffies(500)); - CDBG("%s: VFE1 done\n", __func__); - if (timeout <= 0) { - pr_err("%s: VFE1 reset wait timeout\n", __func__); - msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - return -ETIMEDOUT; - } - } - - if (ispif->clk_idx == 1) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_reset_clk_info, reset_clk, - ARRAY_SIZE(ispif_8974_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - if (ispif->clk_idx == 2) { - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8626_reset_clk_info, reset_clk1, - ARRAY_SIZE(ispif_8626_reset_clk_info), 0); - if (rc < 0) { - pr_err("%s: cannot disable clock, error = %d", - __func__, rc); - } - } - - return rc; -} - -int msm_ispif_get_ahb_clk_info(struct ispif_device *ispif_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[ISPIF_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CDBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - count = ISPIF_AHB_CLK_INFO; - if (count > ISPIF_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - ISPIF_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(ispif_8974_ahb_clk_info[i].clk_name)); - CDBG("clock-names[%d] = %s\n", - i, ispif_8974_ahb_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - ispif_8974_ahb_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - CDBG("clk_rate[%d] = %ld\n", i, - ispif_8974_ahb_clk_info[i].clk_rate); - } - ispif_dev->num_clk = count; - return 0; -} - -static int msm_ispif_clk_ahb_enable(struct ispif_device *ispif, int enable) -{ - int rc = 0; - - if (ispif->csid_version < CSID_VERSION_V30) { - /* Older ISPIF versiond don't need ahb clokc */ - return 0; - } - - rc = msm_ispif_get_ahb_clk_info(ispif, ispif->pdev); - if (rc < 0) { - pr_err("%s: msm_isp_get_clk_info() failed", __func__); - return -EFAULT; - } - - rc = msm_cam_clk_enable(&ispif->pdev->dev, - ispif_8974_ahb_clk_info, ispif->ahb_clk, - ispif->num_clk, enable); - if (rc < 0) { - pr_err("%s: cannot enable clock, error = %d", - __func__, rc); - } - - return rc; -} - -static int msm_ispif_reset(struct ispif_device *ispif) -{ - int rc = 0; - int i; - - BUG_ON(!ispif); - - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - for (i = 0; i < ispif->vfe_info.num_vfe; i++) { - - msm_camera_io_w(1 << PIX0_LINE_BUF_EN_BIT, - ispif->base + ISPIF_VFE_m_CTRL_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_0(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_1(i)); - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_IRQ_MASK_2(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(i)); - msm_camera_io_w(0xFFFFFFFF, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(i)); - - msm_camera_io_w(0, ispif->base + ISPIF_VFE_m_INPUT_SEL(i)); - - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(i)); - msm_camera_io_w(ISPIF_STOP_INTF_IMMEDIATELY, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(i)); - pr_debug("%s: base %lx", __func__, (unsigned long)ispif->base); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 1)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_RDI_INTF_n_CID_MASK(i, 2)); - - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 0)); - msm_camera_io_w(0, ispif->base + - ISPIF_VFE_m_PIX_INTF_n_CROP(i, 1)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static int msm_ispif_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_ISPIF; - chip->revision = 0; - return 0; -} - -static void msm_ispif_sel_csid_core(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_INPUT_SEL(vfe_intf)); - switch (intftype) { - case PIX0: - data &= ~(BIT(1) | BIT(0)); - data |= (uint32_t) csid; - break; - case RDI0: - data &= ~(BIT(5) | BIT(4)); - data |= ((uint32_t) csid) << 4; - break; - case PIX1: - data &= ~(BIT(9) | BIT(8)); - data |= ((uint32_t) csid) << 8; - break; - case RDI1: - data &= ~(BIT(13) | BIT(12)); - data |= ((uint32_t) csid) << 12; - break; - case RDI2: - data &= ~(BIT(21) | BIT(20)); - data |= ((uint32_t) csid) << 20; - break; - } - - msm_camera_io_w_mb(data, ispif->base + - ISPIF_VFE_m_INPUT_SEL(vfe_intf)); -} - -static void msm_ispif_enable_crop(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf, uint16_t start_pixel, - uint16_t end_pixel) -{ - uint32_t data; - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - data = msm_camera_io_r(ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - data |= (1 << (intftype + 7)); - if (intftype == PIX0) - data |= 1 << PIX0_LINE_BUF_EN_BIT; - msm_camera_io_w(data, - ispif->base + ISPIF_VFE_m_CTRL_0(vfe_intf)); - - if (intftype == PIX0) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 0)); - else if (intftype == PIX1) - msm_camera_io_w_mb(start_pixel | (end_pixel << 16), - ispif->base + ISPIF_VFE_m_PIX_INTF_n_CROP(vfe_intf, 1)); - else { - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } -} - -static void msm_ispif_enable_intf_cids(struct ispif_device *ispif, - uint8_t intftype, uint16_t cid_mask, uint8_t vfe_intf, uint8_t enable) -{ - uint32_t intf_addr, data; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - - switch (intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_CID_MASK(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, intftype); - BUG_ON(1); - return; - } - - data = msm_camera_io_r(ispif->base + intf_addr); - if (enable) - data |= (uint32_t) cid_mask; - else - data &= ~((uint32_t) cid_mask); - msm_camera_io_w_mb(data, ispif->base + intf_addr); -} - -static int msm_ispif_validate_intf_status(struct ispif_device *ispif, - uint8_t intftype, uint8_t vfe_intf) -{ - int rc = 0; - uint32_t data = 0; - - BUG_ON(!ispif); - - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0)); - break; - case RDI0: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0)); - break; - case PIX1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI1: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1)); - break; - case RDI2: - data = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2)); - break; - } - if ((data & 0xf) != 0xf) - rc = -EBUSY; - return rc; -} - -static void msm_ispif_select_clk_mux(struct ispif_device *ispif, - uint8_t intftype, uint8_t csid, uint8_t vfe_intf) -{ - uint32_t data = 0; - - switch (intftype) { - case PIX0: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf << (vfe_intf * 8)); - data |= (csid << (vfe_intf * 8)); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI0: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (vfe_intf * 12)); - data |= (csid << (vfe_intf * 12)); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case PIX1: - data = msm_camera_io_r(ispif->clk_mux_base); - data &= ~(0xf0 << (vfe_intf * 8)); - data |= (csid << (4 + (vfe_intf * 8))); - msm_camera_io_w(data, ispif->clk_mux_base); - break; - - case RDI1: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (4 + (vfe_intf * 12))); - data |= (csid << (4 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - - case RDI2: - data = msm_camera_io_r(ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - data &= ~(0xf << (8 + (vfe_intf * 12))); - data |= (csid << (8 + (vfe_intf * 12))); - msm_camera_io_w(data, ispif->clk_mux_base + - ISPIF_RDI_CLK_MUX_SEL_ADDR); - break; - } - CDBG("%s intftype %d data %x\n", __func__, intftype, data); - mb(); - return; -} - -static uint16_t msm_ispif_get_cids_mask_from_cfg( - struct msm_ispif_params_entry *entry) -{ - int i; - uint16_t cids_mask = 0; - - BUG_ON(!entry); - - for (i = 0; i < entry->num_cids; i++) - cids_mask |= (1 << entry->cids[i]); - - return cids_mask; -} - -static int msm_ispif_config(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0, i = 0; - uint16_t cid_mask; - enum msm_ispif_intftype intftype; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, - vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return -EINVAL; - } - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - msm_camera_io_w(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - msm_camera_io_w_mb(0x0, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - } - - for (i = 0; i < params->num; i++) { - intftype = params->entries[i].intftype; - - vfe_intf = params->entries[i].vfe_intf; - - CDBG("%s intftype %x, vfe_intf %d, csid %d\n", __func__, - intftype, vfe_intf, params->entries[i].csid); - - if ((intftype >= INTF_MAX) || - (vfe_intf >= ispif->vfe_info.num_vfe) || - (ispif->csid_version <= CSID_VERSION_V22 && - (vfe_intf > VFE0))) { - pr_err("%s: VFEID %d and CSID version %d mismatch\n", - __func__, vfe_intf, ispif->csid_version); - return -EINVAL; - } - - if (ispif->csid_version >= CSID_VERSION_V30) - msm_ispif_select_clk_mux(ispif, intftype, - params->entries[i].csid, vfe_intf); - - rc = msm_ispif_validate_intf_status(ispif, intftype, vfe_intf); - if (rc) { - pr_err("%s:validate_intf_status failed, rc = %d\n", - __func__, rc); - return rc; - } - - msm_ispif_sel_csid_core(ispif, intftype, - params->entries[i].csid, vfe_intf); - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, intftype, - cid_mask, vfe_intf, 1); - if (params->entries[i].crop_enable) - msm_ispif_enable_crop(ispif, intftype, vfe_intf, - params->entries[i].crop_start_pixel, - params->entries[i].crop_end_pixel); - } - - for (vfe_intf = 0; vfe_intf < 2; vfe_intf++) { - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_0(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_1_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_1(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_MASK_2(vfe_intf)); - - msm_camera_io_w(ISPIF_IRQ_STATUS_2_MASK, ispif->base + - ISPIF_VFE_m_IRQ_CLEAR_2(vfe_intf)); - } - - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - return rc; -} - -static void msm_ispif_intf_cmd(struct ispif_device *ispif, uint32_t cmd_bits, - struct msm_ispif_param_data *params) -{ - uint8_t vc; - int i, k; - enum msm_ispif_intftype intf_type; - enum msm_ispif_cid cid; - enum msm_ispif_vfe_intf vfe_intf; - - BUG_ON(!ispif); - BUG_ON(!params); - - for (i = 0; i < params->num; i++) { - vfe_intf = params->entries[i].vfe_intf; - if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - return; - } - if (params->entries[i].num_cids > MAX_CID_CH) { - pr_err("%s: out of range of cid_num %d\n", - __func__, params->entries[i].num_cids); - return; - } - } - - for (i = 0; i < params->num; i++) { - intf_type = params->entries[i].intftype; - vfe_intf = params->entries[i].vfe_intf; - for (k = 0; k < params->entries[i].num_cids; k++) { - cid = params->entries[i].cids[k]; - vc = cid / 4; - if (intf_type == RDI2) { - /* zero out two bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 &= - ~(0x3 << (vc * 2 + 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd1 |= - (cmd_bits << (vc * 2 + 8)); - } else { - /* zero 2 bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd &= - ~(0x3 << (vc * 2 + intf_type * 8)); - /* set cmd bits */ - ispif->applied_intf_cmd[vfe_intf].intf_cmd |= - (cmd_bits << (vc * 2 + intf_type * 8)); - } - } - - /* cmd for PIX0, PIX1, RDI0, RDI1 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd, - ispif->base + ISPIF_VFE_m_INTF_CMD_0(vfe_intf)); - - /* cmd for RDI2 */ - if (ispif->applied_intf_cmd[vfe_intf].intf_cmd1 != 0xFFFFFFFF) - msm_camera_io_w_mb( - ispif->applied_intf_cmd[vfe_intf].intf_cmd1, - ispif->base + ISPIF_VFE_m_INTF_CMD_1(vfe_intf)); - } -} - -static int msm_ispif_stop_immediately(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_DISABLE_IMMEDIATELY, params); - - /* after stop the interface we need to unmask the CID enable bits */ - for (i = 0; i < params->num; i++) { - cid_mask = msm_ispif_get_cids_mask_from_cfg( - ¶ms->entries[i]); - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, params->entries[i].vfe_intf, 0); - } - - return rc; -} - -static int msm_ispif_start_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int rc = 0; - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - msm_ispif_intf_cmd(ispif, ISPIF_INTF_CMD_ENABLE_FRAME_BOUNDARY, params); - - return rc; -} - -static int msm_ispif_stop_frame_boundary(struct ispif_device *ispif, - struct msm_ispif_param_data *params) -{ - int i, rc = 0; - uint16_t cid_mask = 0; - uint32_t intf_addr; - enum msm_ispif_vfe_intf vfe_intf; - uint32_t stop_flag = 0; - - BUG_ON(!ispif); - BUG_ON(!params); - - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - if (params->num > MAX_PARAM_ENTRIES) { - pr_err("%s: invalid param entries %d\n", __func__, - params->num); - rc = -EINVAL; - return rc; - } - - for (i = 0; i < params->num; i++) { - if (!msm_ispif_is_intf_valid(ispif->csid_version, - params->entries[i].vfe_intf)) { - pr_err("%s: invalid interface type\n", __func__); - rc = -EINVAL; - goto end; - } - } - - msm_ispif_intf_cmd(ispif, - ISPIF_INTF_CMD_DISABLE_FRAME_BOUNDARY, params); - - for (i = 0; i < params->num; i++) { - cid_mask = - msm_ispif_get_cids_mask_from_cfg(¶ms->entries[i]); - vfe_intf = params->entries[i].vfe_intf; - - switch (params->entries[i].intftype) { - case PIX0: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 0); - break; - case RDI0: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 0); - break; - case PIX1: - intf_addr = ISPIF_VFE_m_PIX_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI1: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 1); - break; - case RDI2: - intf_addr = ISPIF_VFE_m_RDI_INTF_n_STATUS(vfe_intf, 2); - break; - default: - pr_err("%s: invalid intftype=%d\n", __func__, - params->entries[i].intftype); - rc = -EPERM; - goto end; - } - - rc = readl_poll_timeout(ispif->base + intf_addr, stop_flag, - (stop_flag & 0xF) == 0xF, - ISPIF_TIMEOUT_SLEEP_US, - ISPIF_TIMEOUT_ALL_US); - if (rc < 0) - goto end; - - /* disable CIDs in CID_MASK register */ - msm_ispif_enable_intf_cids(ispif, params->entries[i].intftype, - cid_mask, vfe_intf, 0); - } - -end: - return rc; -} - -static void ispif_process_irq(struct ispif_device *ispif, - struct ispif_irq_status *out, enum msm_ispif_vfe_intf vfe_id) -{ - BUG_ON(!ispif); - BUG_ON(!out); - - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_PIX_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[PIX0]++; - } - if (out[vfe_id].ispifIrqStatus0 & - ISPIF_IRQ_STATUS_RDI0_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI0]++; - } - if (out[vfe_id].ispifIrqStatus1 & - ISPIF_IRQ_STATUS_RDI1_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI1]++; - } - if (out[vfe_id].ispifIrqStatus2 & - ISPIF_IRQ_STATUS_RDI2_SOF_MASK) { - ispif->sof_count[vfe_id].sof_cnt[RDI2]++; - } -} - -static inline void msm_ispif_read_irq_status(struct ispif_irq_status *out, - void *data) -{ - struct ispif_device *ispif = (struct ispif_device *)data; - - BUG_ON(!ispif); - BUG_ON(!out); - - out[VFE0].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE0)); - - out[VFE0].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE0)); - msm_camera_io_w(out[VFE0].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE0)); - - out[VFE0].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE0)); - msm_camera_io_w_mb(out[VFE0].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE0)); - - if (ispif->vfe_info.num_vfe > 1) { - out[VFE1].ispifIrqStatus0 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_0(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus0, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_0(VFE1)); - - out[VFE1].ispifIrqStatus1 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_1(VFE1)); - msm_camera_io_w(out[VFE1].ispifIrqStatus1, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_1(VFE1)); - - out[VFE1].ispifIrqStatus2 = msm_camera_io_r(ispif->base + - ISPIF_VFE_m_IRQ_STATUS_2(VFE1)); - msm_camera_io_w_mb(out[VFE1].ispifIrqStatus2, - ispif->base + ISPIF_VFE_m_IRQ_CLEAR_2(VFE1)); - } - msm_camera_io_w_mb(ISPIF_IRQ_GLOBAL_CLEAR_CMD, ispif->base + - ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR); - - if (out[VFE0].ispifIrqStatus0 & ISPIF_IRQ_STATUS_MASK) { - if (out[VFE0].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE0]); - - if (out[VFE0].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 pix0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi0 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi1 overflow.\n", __func__); - - if (out[VFE0].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE0 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE0); - } - if (ispif->hw_num_isps > 1) { - if (out[VFE1].ispifIrqStatus0 & RESET_DONE_IRQ) - complete(&ispif->reset_complete[VFE1]); - - if (out[VFE1].ispifIrqStatus0 & PIX_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 pix0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus0 & RAW_INTF_0_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi0 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus1 & RAW_INTF_1_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi1 overflow.\n", __func__); - - if (out[VFE1].ispifIrqStatus2 & RAW_INTF_2_OVERFLOW_IRQ) - pr_err("%s: VFE1 rdi2 overflow.\n", __func__); - - ispif_process_irq(ispif, out, VFE1); - } -} - -static irqreturn_t msm_io_ispif_irq(int irq_num, void *data) -{ - struct ispif_irq_status irq[VFE_MAX]; - - msm_ispif_read_irq_status(irq, data); - return IRQ_HANDLED; -} - -static int msm_ispif_set_vfe_info(struct ispif_device *ispif, - struct msm_ispif_vfe_info *vfe_info) -{ - memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info)); - if (ispif->vfe_info.num_vfe > ispif->hw_num_isps) - return -EINVAL; - return 0; -} - -static int msm_ispif_init(struct ispif_device *ispif, - uint32_t csid_version) -{ - int rc = 0; - - BUG_ON(!ispif); - - if (ispif->ispif_state == ISPIF_POWER_UP) { - pr_err("%s: ispif already initted state = %d\n", __func__, - ispif->ispif_state); - rc = -EPERM; - return rc; - } - - /* can we set to zero? */ - ispif->applied_intf_cmd[VFE0].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE0].intf_cmd1 = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd = 0xFFFFFFFF; - ispif->applied_intf_cmd[VFE1].intf_cmd1 = 0xFFFFFFFF; - memset(ispif->sof_count, 0, sizeof(ispif->sof_count)); - - ispif->csid_version = csid_version; - - if (ispif->csid_version >= CSID_VERSION_V30) { - if (!ispif->clk_mux_mem || !ispif->clk_mux_io) { - pr_err("%s csi clk mux mem %pK io %pK\n", __func__, - ispif->clk_mux_mem, ispif->clk_mux_io); - rc = -ENOMEM; - return rc; - } - ispif->clk_mux_base = ioremap(ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem)); - if (!ispif->clk_mux_base) { - pr_err("%s: clk_mux_mem ioremap failed\n", __func__); - rc = -ENOMEM; - return rc; - } - } - - ispif->base = ioremap(ispif->mem->start, - resource_size(ispif->mem)); - if (!ispif->base) { - rc = -ENOMEM; - pr_err("%s: nomem\n", __func__); - goto end; - } - rc = request_irq(ispif->irq->start, msm_io_ispif_irq, - IRQF_TRIGGER_RISING, "ispif", ispif); - if (rc) { - pr_err("%s: request_irq error = %d\n", __func__, rc); - goto error_irq; - } - - rc = msm_ispif_clk_ahb_enable(ispif, 1); - if (rc) { - pr_err("%s: ahb_clk enable failed", __func__); - goto error_ahb; - } - - msm_ispif_reset_hw(ispif); - - rc = msm_ispif_reset(ispif); - if (rc == 0) { - ispif->ispif_state = ISPIF_POWER_UP; - CDBG("%s: power up done\n", __func__); - goto end; - } - -error_ahb: - free_irq(ispif->irq->start, ispif); -error_irq: - iounmap(ispif->base); - -end: - return rc; -} - -static void msm_ispif_release(struct ispif_device *ispif) -{ - BUG_ON(!ispif); - - if (!ispif->base) { - pr_err("%s: ispif base is NULL\n", __func__); - return; - } - - if (ispif->ispif_state != ISPIF_POWER_UP) { - pr_err("%s: ispif invalid state %d\n", __func__, - ispif->ispif_state); - return; - } - - /* make sure no streaming going on */ - msm_ispif_reset(ispif); - - msm_ispif_clk_ahb_enable(ispif, 0); - - free_irq(ispif->irq->start, ispif); - - iounmap(ispif->base); - - iounmap(ispif->clk_mux_base); - - ispif->ispif_state = ISPIF_POWER_DOWN; -} - -static long msm_ispif_cmd(struct v4l2_subdev *sd, void *arg) -{ - long rc = 0; - struct ispif_cfg_data *pcdata = (struct ispif_cfg_data *)arg; - struct ispif_device *ispif = - (struct ispif_device *)v4l2_get_subdevdata(sd); - - BUG_ON(!sd); - BUG_ON(!pcdata); - - mutex_lock(&ispif->mutex); - switch (pcdata->cfg_type) { - case ISPIF_ENABLE_REG_DUMP: - ispif->enb_dump_reg = pcdata->reg_dump; /* save dump config */ - break; - case ISPIF_INIT: - rc = msm_ispif_init(ispif, pcdata->csid_version); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_CFG: - rc = msm_ispif_config(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_START_FRAME_BOUNDARY: - rc = msm_ispif_start_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_FRAME_BOUNDARY: - rc = msm_ispif_stop_frame_boundary(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_STOP_IMMEDIATELY: - rc = msm_ispif_stop_immediately(ispif, &pcdata->params); - msm_ispif_io_dump_reg(ispif); - break; - case ISPIF_RELEASE: - msm_ispif_release(ispif); - break; - case ISPIF_SET_VFE_INFO: - rc = msm_ispif_set_vfe_info(ispif, &pcdata->vfe_info); - break; - default: - pr_err("%s: invalid cfg_type\n", __func__); - rc = -EINVAL; - break; - } - mutex_unlock(&ispif->mutex); - return rc; -} -static struct v4l2_file_operations msm_ispif_v4l2_subdev_fops; - -static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ -#ifdef CONFIG_COMPAT - void __user *up; - if (is_compat_task()) { - up = (void __user *)compat_ptr((unsigned long)arg); - arg = up; - } -#endif - - switch (cmd) { - case VIDIOC_MSM_ISPIF_CFG: - return msm_ispif_cmd(sd, arg); - case MSM_SD_SHUTDOWN: - return 0; - default: - pr_err_ratelimited("%s: invalid cmd 0x%x received\n", - __func__, cmd); - return -ENOIOCTLCMD; - } -} - -static long msm_ispif_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - return msm_ispif_subdev_ioctl(sd, cmd, arg); -} - -static long msm_ispif_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_ispif_subdev_do_ioctl); -} - -static int ispif_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - mutex_lock(&ispif->mutex); - /* mem remap is done in init when the clock is on */ - ispif->open_cnt++; - mutex_unlock(&ispif->mutex); - return 0; -} - -static int ispif_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct ispif_device *ispif = v4l2_get_subdevdata(sd); - - if (!ispif) { - pr_err("%s: invalid input\n", __func__); - return -EINVAL; - } - - mutex_lock(&ispif->mutex); - if (ispif->open_cnt == 0) { - pr_err("%s: Invalid close\n", __func__); - rc = -ENODEV; - goto end; - } - ispif->open_cnt--; - if (ispif->open_cnt == 0) - msm_ispif_release(ispif); -end: - mutex_unlock(&ispif->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ispif_subdev_core_ops = { - .g_chip_ident = &msm_ispif_subdev_g_chip_ident, - .ioctl = &msm_ispif_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_ispif_subdev_ops = { - .core = &msm_ispif_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_ispif_internal_ops = { - .open = ispif_open_node, - .close = ispif_close_node, -}; - -static int ispif_probe(struct platform_device *pdev) -{ - int rc; - struct ispif_device *ispif; - - ispif = kzalloc(sizeof(struct ispif_device), GFP_KERNEL); - if (!ispif) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,num-isps", &ispif->hw_num_isps); - if (rc) - /* backward compatibility */ - ispif->hw_num_isps = 1; - /* not an error condition */ - rc = 0; - } - - mutex_init(&ispif->mutex); - ispif->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "ispif"); - if (!ispif->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "ispif"); - if (!ispif->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto error; - } - ispif->io = request_mem_region(ispif->mem->start, - resource_size(ispif->mem), pdev->name); - if (!ispif->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto error; - } - ispif->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csi_clk_mux"); - if (ispif->clk_mux_mem) { - ispif->clk_mux_io = request_mem_region( - ispif->clk_mux_mem->start, - resource_size(ispif->clk_mux_mem), - ispif->clk_mux_mem->name); - if (!ispif->clk_mux_io) - pr_err("%s: no valid csi_mux region\n", __func__); - } - - v4l2_subdev_init(&ispif->msm_sd.sd, &msm_ispif_subdev_ops); - ispif->msm_sd.sd.internal_ops = &msm_ispif_internal_ops; - ispif->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - - snprintf(ispif->msm_sd.sd.name, - ARRAY_SIZE(ispif->msm_sd.sd.name), MSM_ISPIF_DRV_NAME); - v4l2_set_subdevdata(&ispif->msm_sd.sd, ispif); - - platform_set_drvdata(pdev, &ispif->msm_sd.sd); - - media_entity_init(&ispif->msm_sd.sd.entity, 0, NULL, 0); - ispif->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ispif->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ISPIF; - ispif->msm_sd.sd.entity.name = pdev->name; - ispif->msm_sd.close_seq = MSM_SD_CLOSE_1ST_CATEGORY | 0x1; - rc = msm_sd_register(&ispif->msm_sd); - if (rc) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto error; - } - msm_ispif_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_ispif_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_ispif_v4l2_subdev_fops.unlocked_ioctl = msm_ispif_subdev_fops_ioctl; - msm_ispif_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_ispif_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; -#ifdef CONFIG_COMPAT - msm_ispif_v4l2_subdev_fops.compat_ioctl32 = msm_ispif_subdev_fops_ioctl; -#endif - - ispif->pdev = pdev; - ispif->ispif_state = ISPIF_POWER_DOWN; - ispif->open_cnt = 0; - return 0; - -error: - mutex_destroy(&ispif->mutex); - kfree(ispif); - return rc; -} - -static const struct of_device_id msm_ispif_dt_match[] = { - {.compatible = "qcom,ispif"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ispif_dt_match); - -static struct platform_driver ispif_driver = { - .probe = ispif_probe, - .driver = { - .name = MSM_ISPIF_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_ispif_dt_match, - }, -}; - -static int __init msm_ispif_init_module(void) -{ - return platform_driver_register(&ispif_driver); -} - -static void __exit msm_ispif_exit_module(void) -{ - platform_driver_unregister(&ispif_driver); -} - -module_init(msm_ispif_init_module); -module_exit(msm_ispif_exit_module); -MODULE_DESCRIPTION("MSM ISP Interface driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.h b/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.h deleted file mode 100755 index 180b0ce5a445..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_ISPIF_H -#define MSM_ISPIF_H - -#include -#include -#include -#include "../include/media/msmb_ispif.h" -#include "msm_sd.h" - -#define ISPIF_CLK_INFO_MAX 16 -#define ISPIF_AHB_CLK_INFO 2 - -struct ispif_irq_status { - uint32_t ispifIrqStatus0; - uint32_t ispifIrqStatus1; - uint32_t ispifIrqStatus2; -}; - -enum msm_ispif_state_t { - ISPIF_POWER_UP, - ISPIF_POWER_DOWN, -}; -struct ispif_sof_count { - uint32_t sof_cnt[INTF_MAX]; -}; - -struct ispif_intf_cmd { - uint32_t intf_cmd; - uint32_t intf_cmd1; -}; - -struct ispif_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint8_t start_ack_pending; - uint32_t csid_version; - int enb_dump_reg; - uint32_t open_cnt; - struct ispif_sof_count sof_count[VFE_MAX]; - struct ispif_intf_cmd applied_intf_cmd[VFE_MAX]; - enum msm_ispif_state_t ispif_state; - struct msm_ispif_vfe_info vfe_info; - struct clk *ahb_clk[ISPIF_CLK_INFO_MAX]; - struct completion reset_complete[VFE_MAX]; - uint32_t hw_num_isps; - uint32_t num_clk; - uint32_t clk_idx; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v1.h b/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v1.h deleted file mode 100644 index 91af7cb2c4fb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v1.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V1_H__ -#define __MSM_ISPIF_HWREG_V1_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x0000 -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x0124 -#define PIX0_LINE_BUF_EN_BIT 0 - -#define ISPIF_VFE(m) (0x0) - -#define ISPIF_VFE_m_CTRL_0(m) (0x0008 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x0100 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x010C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x0118 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x0108 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x0114 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x0120 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x0104 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x0110 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x011C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x000C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x0004 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x0030 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x0010 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x0014 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x20) : 0) \ - + 8*(n)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x0290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x001C + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x0020 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x24) : 0) \ - + 0xc*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x0024 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x0028 + ISPIF_VFE(m) + \ - ((n > 0) ? (0x34) : 0) \ - + 8*(n)) - -/* Defines for compatibility with newer ISPIF versions */ -#define ISPIF_RST_CMD_1_ADDR (0x0000) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x0000 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x0000 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x0000 + ISPIF_VFE(m)) - - - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define RDI_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define AHB_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define PIX_1_CLK_DOMAIN_RST BIT(26) -#define RDI_2_CLK_DOMAIN_RST BIT(25) -#define RDI_2_MISR_RST_STB BIT(20) -#define RDI_2_VFE_RST_STB BIT(19) -#define RDI_2_CSID_RST_STB BIT(18) -#define RDI_1_MISR_RST_STB BIT(14) -#define RDI_1_VFE_RST_STB BIT(13) -#define RDI_1_CSID_RST_STB BIT(12) -#define PIX_1_VFE_RST_STB BIT(10) -#define PIX_1_CSID_RST_STB BIT(9) -#define RDI_0_MISR_RST_STB BIT(8) -#define RDI_0_VFE_RST_STB BIT(7) -#define RDI_0_CSID_RST_STB BIT(6) -#define PIX_0_MISR_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE1C77FF -#define ISPIF_RST_CMD_1_MASK 0xFFFFFFFF /* undefined */ - -/* irq_mask_0 */ -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RESET_DONE_IRQ BIT(27) -/* irq_mask_1 */ -#define PIX_INTF_1_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -/* irq_mask_2 */ -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x000249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x000249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x000001 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA -#endif /* __MSM_ISPIF_HWREG_V1_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v2.h b/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v2.h deleted file mode 100644 index 3cc21a7dce6d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/ispif/msm_ispif_hwreg_v2.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_ISPIF_HWREG_V2_H__ -#define __MSM_ISPIF_HWREG_V2_H__ - -/* common registers */ -#define ISPIF_RST_CMD_ADDR 0x008 -#define ISPIF_RST_CMD_1_ADDR 0x00C -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x01C -#define PIX0_LINE_BUF_EN_BIT 6 - -#define ISPIF_VFE(m) ((m) * 0x200) - -#define ISPIF_VFE_m_CTRL_0(m) (0x200 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_0(m) (0x208 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_1(m) (0x20C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_MASK_2(m) (0x210 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_0(m) (0x21C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_1(m) (0x220 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_STATUS_2(m) (0x224 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_0(m) (0x230 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_1(m) (0x234 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_IRQ_CLEAR_2(m) (0x238 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INPUT_SEL(m) (0x244 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_0(m) (0x248 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_INTF_CMD_1(m) (0x24C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_INTF_n_CID_MASK(m, n) (0x254 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_CID_MASK(m, n) (0x264 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_CROP(m, n) (0x278 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_THRESHOLD(m) (0x288 + ISPIF_VFE(m)) -#define ISPIF_VFE_m_OUTPUT_SEL(m) (0x28C + ISPIF_VFE(m)) -#define ISPIF_VFE_m_PIX_OUTPUT_n_MISR(m, n) (0x290 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_0(m, n) (0x298 + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_RDI_OUTPUT_n_MISR_1(m, n) (0x29C + ISPIF_VFE(m) + 8*(n)) -#define ISPIF_VFE_m_PIX_INTF_n_STATUS(m, n) (0x2C0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_RDI_INTF_n_STATUS(m, n) (0x2D0 + ISPIF_VFE(m) + 4*(n)) -#define ISPIF_VFE_m_3D_DESKEW_SIZE(m) (0x2E4 + ISPIF_VFE(m)) - -/* CSID CLK MUX SEL REGISTERS */ -#define ISPIF_RDI_CLK_MUX_SEL_ADDR 0x8 - -/*ISPIF RESET BITS*/ -#define VFE_CLK_DOMAIN_RST BIT(31) -#define PIX_1_CLK_DOMAIN_RST BIT(30) -#define PIX_CLK_DOMAIN_RST BIT(29) -#define RDI_2_CLK_DOMAIN_RST BIT(28) -#define RDI_1_CLK_DOMAIN_RST BIT(27) -#define RDI_CLK_DOMAIN_RST BIT(26) -#define AHB_CLK_DOMAIN_RST BIT(25) -#define RDI_2_VFE_RST_STB BIT(12) -#define RDI_2_CSID_RST_STB BIT(11) -#define RDI_1_VFE_RST_STB BIT(10) -#define RDI_1_CSID_RST_STB BIT(9) -#define RDI_0_VFE_RST_STB BIT(8) -#define RDI_0_CSID_RST_STB BIT(7) -#define PIX_1_VFE_RST_STB BIT(6) -#define PIX_1_CSID_RST_STB BIT(5) -#define PIX_0_VFE_RST_STB BIT(4) -#define PIX_0_CSID_RST_STB BIT(3) -#define SW_REG_RST_STB BIT(2) -#define MISC_LOGIC_RST_STB BIT(1) -#define STROBED_RST_EN BIT(0) - -#define ISPIF_RST_CMD_MASK 0xFE0F1FFF -#define ISPIF_RST_CMD_1_MASK 0xFC0F1FF9 - -#define PIX_INTF_0_OVERFLOW_IRQ BIT(12) -#define RAW_INTF_0_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_1_OVERFLOW_IRQ BIT(25) -#define RAW_INTF_2_OVERFLOW_IRQ BIT(12) -#define RESET_DONE_IRQ BIT(27) - -#define ISPIF_IRQ_STATUS_MASK 0x0A493249 -#define ISPIF_IRQ_STATUS_1_MASK 0x02493249 -#define ISPIF_IRQ_STATUS_2_MASK 0x00001249 - -#define ISPIF_IRQ_STATUS_PIX_SOF_MASK 0x249 -#define ISPIF_IRQ_STATUS_RDI0_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI1_SOF_MASK 0x492000 -#define ISPIF_IRQ_STATUS_RDI2_SOF_MASK 0x249 - -#define ISPIF_IRQ_GLOBAL_CLEAR_CMD 0x1 - -#define ISPIF_STOP_INTF_IMMEDIATELY 0xAAAAAAAA - -#endif /* __MSM_ISPIF_HWREG_V2_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/Makefile deleted file mode 100644 index 4898bfac48ec..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -GCC_VERSION := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc) - -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/jpeg_10 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io - -obj-$(CONFIG_MSMB_JPEG) += msm_jpeg_dev.o msm_jpeg_sync.o msm_jpeg_core.o msm_jpeg_hw.o msm_jpeg_platform.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_common.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_common.h deleted file mode 100644 index 634becafc575..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_common.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_COMMON_H -#define MSM_JPEG_COMMON_H - -#ifdef MSM_JPEG_DEBUG -#define JPEG_DBG(fmt, args...) pr_info(fmt, ##args) -#else -#define JPEG_DBG(fmt, args...) do { } while (0) -#endif - -#define JPEG_PR_ERR pr_err -#define JPEG_DBG_HIGH pr_debug - -enum JPEG_MODE { - JPEG_MODE_DISABLE, - JPEG_MODE_OFFLINE, - JPEG_MODE_REALTIME, - JPEG_MODE_REALTIME_ROTATION -}; - -enum JPEG_ROTATION { - JPEG_ROTATION_0, - JPEG_ROTATION_90, - JPEG_ROTATION_180, - JPEG_ROTATION_270 -}; - -#endif /* MSM_JPEG_COMMON_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.c b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.c deleted file mode 100644 index 52011346fb80..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.c +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (c) 2012-2013,The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size) { - unsigned long flags; - int rc = 0; - int tm = 500; /*500ms*/ - JPEG_DBG("%s:%d] reset", __func__, __LINE__); - memset(&pgmn_dev->fe_pingpong_buf, 0, - sizeof(pgmn_dev->fe_pingpong_buf)); - pgmn_dev->fe_pingpong_buf.is_fe = 1; - memset(&pgmn_dev->we_pingpong_buf, 0, - sizeof(pgmn_dev->we_pingpong_buf)); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - msm_jpeg_hw_reset(base, size); - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - rc = wait_event_interruptible_timeout( - pgmn_dev->reset_wait, - pgmn_dev->reset_done_ack, - msecs_to_jiffies(tm)); - - if (!pgmn_dev->reset_done_ack) { - JPEG_DBG("%s: reset ACK failed %d", __func__, rc); - return -EBUSY; - } - - JPEG_DBG("%s: reset_done_ack rc %d", __func__, rc); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 0; - pgmn_dev->state = MSM_JPEG_RESET; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - - return 0; -} - -void msm_jpeg_core_release(struct msm_jpeg_device *pgmn_dev, - int domain_num) { - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf_status[i] && - pgmn_dev->release_buf) - msm_jpeg_platform_p2v(pgmn_dev, - pgmn_dev->we_pingpong_buf.buf[i].file, - &pgmn_dev->we_pingpong_buf.buf[i].handle, - domain_num); - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } -} - -void msm_jpeg_core_init(struct msm_jpeg_device *pgmn_dev) -{ - init_waitqueue_head(&pgmn_dev->reset_wait); - spin_lock_init(&pgmn_dev->reset_lock); -} - -int msm_jpeg_core_fe_start(struct msm_jpeg_device *pgmn_dev) -{ - msm_jpeg_hw_fe_start(pgmn_dev->base); - return 0; -} - -/* fetch engine */ -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) -{ - if (0 == buf->cbcr_len) - buf->cbcr_buffer_addr = 0x0; - JPEG_DBG("%s:%d] 0x%08x %d 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, buf->y_len, - (int) buf->cbcr_buffer_addr, buf->cbcr_len); - return msm_jpeg_hw_pingpong_update(&pgmn_dev->fe_pingpong_buf, buf, - pgmn_dev->base); -} - -void *msm_jpeg_core_fe_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->fe_pingpong_buf); -} - -/* write engine */ -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf) { - JPEG_DBG("%s:%d] 0x%08x 0x%08x %d\n", __func__, __LINE__, - (int) buf->y_buffer_addr, (int) buf->cbcr_buffer_addr, - buf->y_len); - pgmn_dev->we_pingpong_buf.buf[0] = *buf; - pgmn_dev->we_pingpong_buf.buf_status[0] = 1; - msm_jpeg_hw_we_buffer_update( - &pgmn_dev->we_pingpong_buf.buf[0], 0, pgmn_dev->base); - - return 0; -} - -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf) -{ - int i = 0; - for (i = 0; i < 2; i++) { - if (pgmn_dev->we_pingpong_buf.buf[i].y_buffer_addr - == buf->y_buffer_addr) - pgmn_dev->we_pingpong_buf.buf_status[i] = 0; - } - return 0; -} - -void *msm_jpeg_core_we_pingpong_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - return msm_jpeg_hw_pingpong_irq(&pgmn_dev->we_pingpong_buf); -} - -void *msm_jpeg_core_framedone_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - struct msm_jpeg_hw_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - buf_p = msm_jpeg_hw_pingpong_active_buffer( - &pgmn_dev->we_pingpong_buf); - if (buf_p && !pgmn_dev->decode_flag) { - buf_p->framedone_len = - msm_jpeg_hw_encode_output_size(pgmn_dev->base); - JPEG_DBG("%s:%d] framedone_len %d\n", __func__, __LINE__, - buf_p->framedone_len); - } - - return buf_p; -} - -void *msm_jpeg_core_reset_ack_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - /* @todo return the status back to msm_jpeg_core_reset */ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return NULL; -} - -void *msm_jpeg_core_err_irq(int jpeg_irq_status, - struct msm_jpeg_device *pgmn_dev) -{ - JPEG_PR_ERR("%s: Error %x\n", __func__, jpeg_irq_status); - return NULL; -} - -static int (*msm_jpeg_irq_handler) (int, void *, void *); - -void msm_jpeg_core_return_buffers(struct msm_jpeg_device *pgmn_dev, - int jpeg_irq_status) -{ - void *data = NULL; - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - pgmn_dev, data); - data = msm_jpeg_core_we_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_WE, - pgmn_dev, data); -} - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context) -{ - void *data = NULL; - unsigned long flags; - int jpeg_irq_status; - struct msm_jpeg_device *pgmn_dev = (struct msm_jpeg_device *)context; - - JPEG_DBG("%s:%d] irq_num = %d\n", __func__, __LINE__, irq_num); - - jpeg_irq_status = msm_jpeg_hw_irq_get_status(pgmn_dev->base); - - JPEG_DBG("%s:%d] jpeg_irq_status = %0x\n", __func__, __LINE__, - jpeg_irq_status); - - /*For reset and framedone IRQs, clear all bits*/ - if (pgmn_dev->state == MSM_JPEG_IDLE) { - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else if (jpeg_irq_status & 0x10000000) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - } else if (jpeg_irq_status & 0x1) { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - } else { - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - jpeg_irq_status, pgmn_dev->base); - } - - if (msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status)) { - /* send fe ping pong irq */ - JPEG_DBG_HIGH("%s:%d] Session done\n", __func__, __LINE__); - data = msm_jpeg_core_fe_pingpong_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_FE, - context, data); - data = msm_jpeg_core_framedone_irq(jpeg_irq_status, - pgmn_dev); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_FRAMEDONE, - context, data); - pgmn_dev->state = MSM_JPEG_INIT; - } - if (msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status)) { - data = msm_jpeg_core_reset_ack_irq(jpeg_irq_status, - pgmn_dev); - spin_lock_irqsave(&pgmn_dev->reset_lock, flags); - pgmn_dev->reset_done_ack = 1; - spin_unlock_irqrestore(&pgmn_dev->reset_lock, flags); - wake_up(&pgmn_dev->reset_wait); - if (msm_jpeg_irq_handler) - msm_jpeg_irq_handler( - MSM_JPEG_HW_MASK_COMP_RESET_ACK, - context, data); - } - - /* Unexpected/unintended HW interrupt */ - if (msm_jpeg_hw_irq_is_err(jpeg_irq_status)) { - if (pgmn_dev->state != MSM_JPEG_EXECUTING) { - /*Clear all the bits and ignore the IRQ*/ - JPEG_DBG_HIGH("%s %d ] Error IRQ received state %d", - __func__, __LINE__, pgmn_dev->state); - JPEG_DBG_HIGH("%s %d ] Ignoring the Error", __func__, - __LINE__); - msm_jpeg_hw_irq_clear(JPEG_IRQ_CLEAR_BMSK, - JPEG_IRQ_CLEAR_ALL, pgmn_dev->base); - return IRQ_HANDLED; - } else { - if (pgmn_dev->decode_flag) - msm_jpeg_decode_status(pgmn_dev->base); - msm_jpeg_core_return_buffers(pgmn_dev, jpeg_irq_status); - data = msm_jpeg_core_err_irq(jpeg_irq_status, pgmn_dev); - if (msm_jpeg_irq_handler) { - msm_jpeg_irq_handler(MSM_JPEG_HW_MASK_COMP_ERR, - context, data); - } - } - } - - return IRQ_HANDLED; -} - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)) -{ - msm_jpeg_irq_handler = irq_handler; -} - -void msm_jpeg_core_irq_remove(void) -{ - msm_jpeg_irq_handler = NULL; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.h deleted file mode 100644 index 212eaff91d88..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_core.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_CORE_H -#define MSM_JPEG_CORE_H - -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_sync.h" - -#define msm_jpeg_core_buf msm_jpeg_hw_buf - -irqreturn_t msm_jpeg_core_irq(int irq_num, void *context); - -void msm_jpeg_core_irq_install(int (*irq_handler) (int, void *, void *)); -void msm_jpeg_core_irq_remove(void); - -int msm_jpeg_core_fe_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_update(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf); -int msm_jpeg_core_we_buf_reset(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_hw_buf *buf); - -int msm_jpeg_core_reset(struct msm_jpeg_device *pgmn_dev, uint8_t op_mode, - void *base, int size); -int msm_jpeg_core_fe_start(struct msm_jpeg_device *); - -void msm_jpeg_core_release(struct msm_jpeg_device *, int); -void msm_jpeg_core_init(struct msm_jpeg_device *); -#endif /* MSM_JPEG_CORE_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_dev.c b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_dev.c deleted file mode 100644 index 34273d90b8c4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_dev.c +++ /dev/null @@ -1,315 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" - -#define MSM_JPEG_NAME "jpeg" -#define DEV_NAME_LEN 10 - -static int msm_jpeg_open(struct inode *inode, struct file *filp) -{ - int rc = 0; - - struct msm_jpeg_device *pgmn_dev = container_of(inode->i_cdev, - struct msm_jpeg_device, cdev); - filp->private_data = pgmn_dev; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_open(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - - return rc; -} - -static int msm_jpeg_release(struct inode *inode, struct file *filp) -{ - int rc; - - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG(KERN_INFO "%s:%d]\n", __func__, __LINE__); - - rc = __msm_jpeg_release(pgmn_dev); - - JPEG_DBG(KERN_INFO "%s:%d] %s open_count = %d\n", __func__, __LINE__, - filp->f_path.dentry->d_name.name, pgmn_dev->open_count); - return rc; -} -#ifdef CONFIG_COMPAT -static long msm_jpeg_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_compat_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} -#endif -static long msm_jpeg_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = filp->private_data; - - JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__, - __LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, arg); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return rc; -} - -static const struct file_operations msm_jpeg_fops = { - .owner = THIS_MODULE, - .open = msm_jpeg_open, - .release = msm_jpeg_release, - .unlocked_ioctl = msm_jpeg_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = msm_jpeg_compat_ioctl, -#endif -}; - - -int msm_jpeg_subdev_init(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - - JPEG_DBG("%s:%d: jpeg_sd=0x%x pgmn_dev=0x%x\n", - __func__, __LINE__, (uint32_t)jpeg_sd, (uint32_t)pgmn_dev); - rc = __msm_jpeg_open(pgmn_dev); - JPEG_DBG("%s:%d: rc=%d\n", - __func__, __LINE__, rc); - return rc; -} - -static long msm_jpeg_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - long rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)sd->host_priv; - - JPEG_DBG("%s: cmd=%d\n", __func__, cmd); - - JPEG_DBG("%s: pgmn_dev 0x%x", __func__, (uint32_t)pgmn_dev); - - JPEG_DBG("%s: Calling __msm_jpeg_ioctl\n", __func__); - - rc = __msm_jpeg_ioctl(pgmn_dev, cmd, (unsigned long)arg); - pr_debug("%s: X\n", __func__); - return rc; -} - -void msm_jpeg_subdev_release(struct v4l2_subdev *jpeg_sd) -{ - int rc; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *)jpeg_sd->host_priv; - JPEG_DBG("%s:pgmn_dev=0x%x", __func__, (uint32_t)pgmn_dev); - rc = __msm_jpeg_release(pgmn_dev); - JPEG_DBG("%s:rc=%d", __func__, rc); -} - -static const struct v4l2_subdev_core_ops msm_jpeg_subdev_core_ops = { - .ioctl = msm_jpeg_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_jpeg_subdev_ops = { - .core = &msm_jpeg_subdev_core_ops, -}; - -static int msm_jpeg_init_dev(struct platform_device *pdev) -{ - int rc = -1; - struct device *dev; - struct msm_jpeg_device *msm_jpeg_device_p; - char devname[DEV_NAME_LEN]; - - msm_jpeg_device_p = kzalloc(sizeof(struct msm_jpeg_device), GFP_ATOMIC); - if (!msm_jpeg_device_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - msm_jpeg_device_p->pdev = pdev; - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - - snprintf(devname, sizeof(devname), "%s%d", MSM_JPEG_NAME, pdev->id); - - rc = __msm_jpeg_init(msm_jpeg_device_p); - if (rc < -1) { - JPEG_PR_ERR("%s: initialization failed\n", __func__); - goto fail; - } - - v4l2_subdev_init(&msm_jpeg_device_p->subdev, &msm_jpeg_subdev_ops); - v4l2_set_subdev_hostdata(&msm_jpeg_device_p->subdev, msm_jpeg_device_p); - JPEG_DBG("%s: msm_jpeg_device_p 0x%x", __func__, - (uint32_t)msm_jpeg_device_p); - - rc = alloc_chrdev_region(&msm_jpeg_device_p->msm_jpeg_devno, 0, 1, - devname); - if (rc < 0) { - JPEG_PR_ERR("%s: failed to allocate chrdev\n", __func__); - goto fail_1; - } - - if (!msm_jpeg_device_p->msm_jpeg_class) { - msm_jpeg_device_p->msm_jpeg_class = - class_create(THIS_MODULE, devname); - if (IS_ERR(msm_jpeg_device_p->msm_jpeg_class)) { - rc = PTR_ERR(msm_jpeg_device_p->msm_jpeg_class); - JPEG_PR_ERR("%s: create device class failed\n", - __func__); - goto fail_2; - } - } - - dev = device_create(msm_jpeg_device_p->msm_jpeg_class, NULL, - MKDEV(MAJOR(msm_jpeg_device_p->msm_jpeg_devno), - MINOR(msm_jpeg_device_p->msm_jpeg_devno)), NULL, - "%s%d", MSM_JPEG_NAME, pdev->id); - if (IS_ERR(dev)) { - JPEG_PR_ERR("%s: error creating device\n", __func__); - rc = -ENODEV; - goto fail_3; - } - - cdev_init(&msm_jpeg_device_p->cdev, &msm_jpeg_fops); - msm_jpeg_device_p->cdev.owner = THIS_MODULE; - msm_jpeg_device_p->cdev.ops = - (const struct file_operations *) &msm_jpeg_fops; - rc = cdev_add(&msm_jpeg_device_p->cdev, - msm_jpeg_device_p->msm_jpeg_devno, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: error adding cdev\n", __func__); - rc = -ENODEV; - goto fail_4; - } - - platform_set_drvdata(pdev, &msm_jpeg_device_p); - - JPEG_DBG("%s %s%d: success\n", __func__, MSM_JPEG_NAME, pdev->id); - - return rc; - -fail_4: - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - -fail_3: - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - -fail_2: - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - -fail_1: - __msm_jpeg_exit(msm_jpeg_device_p); - return rc; - -fail: - kfree(msm_jpeg_device_p); - return rc; - -} - -static void msm_jpeg_exit(struct msm_jpeg_device *msm_jpeg_device_p) -{ - cdev_del(&msm_jpeg_device_p->cdev); - device_destroy(msm_jpeg_device_p->msm_jpeg_class, - msm_jpeg_device_p->msm_jpeg_devno); - class_destroy(msm_jpeg_device_p->msm_jpeg_class); - unregister_chrdev_region(msm_jpeg_device_p->msm_jpeg_devno, 1); - - __msm_jpeg_exit(msm_jpeg_device_p); -} - -static int __msm_jpeg_probe(struct platform_device *pdev) -{ - return msm_jpeg_init_dev(pdev); -} - -static int __msm_jpeg_remove(struct platform_device *pdev) -{ - struct msm_jpeg_device *msm_jpegd_device_p; - - msm_jpegd_device_p = platform_get_drvdata(pdev); - if (msm_jpegd_device_p) - msm_jpeg_exit(msm_jpegd_device_p); - - return 0; -} - -static const struct of_device_id msm_jpeg_dt_match[] = { - {.compatible = "qcom,jpeg"}, - {}, -}; - -MODULE_DEVICE_TABLE(of, msm_jpeg_dt_match); - -static struct platform_driver msm_jpeg_driver = { - .probe = __msm_jpeg_probe, - .remove = __msm_jpeg_remove, - .driver = { - .name = "msm_jpeg", - .owner = THIS_MODULE, - .of_match_table = msm_jpeg_dt_match, - }, -}; - -static int __init msm_jpeg_driver_init(void) -{ - int rc; - rc = platform_driver_register(&msm_jpeg_driver); - return rc; -} - -static void __exit msm_jpeg_driver_exit(void) -{ - platform_driver_unregister(&msm_jpeg_driver); -} - -MODULE_DESCRIPTION("msm jpeg jpeg driver"); - -module_init(msm_jpeg_driver_init); -module_exit(msm_jpeg_driver_exit); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.c b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.c deleted file mode 100644 index 95c0e9e84748..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.c +++ /dev/null @@ -1,416 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include "msm_jpeg_hw.h" -#include "msm_jpeg_common.h" - -#include - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *base) -{ - int buf_free_index = -1; - - if (!pingpong_hw->buf_status[0]) { - buf_free_index = 0; - } else if (!pingpong_hw->buf_status[1]) { - buf_free_index = 1; - } else { - JPEG_PR_ERR("%s:%d: pingpong buffer busy\n", - __func__, __LINE__); - return -EBUSY; - } - - pingpong_hw->buf[buf_free_index] = *buf; - pingpong_hw->buf_status[buf_free_index] = 1; - - if (pingpong_hw->is_fe) { - /* it is fe */ - msm_jpeg_hw_fe_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } else { - /* it is we */ - msm_jpeg_hw_we_buffer_update( - &pingpong_hw->buf[buf_free_index], buf_free_index, - base); - } - return 0; -} - -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) { - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - pingpong_hw->buf_status[pingpong_hw->buf_active_index] = 0; - } - - pingpong_hw->buf_active_index = !pingpong_hw->buf_active_index; - - return (void *) buf_p; -} - -void *msm_jpeg_hw_pingpong_active_buffer( - struct msm_jpeg_hw_pingpong *pingpong_hw) -{ - struct msm_jpeg_hw_buf *buf_p = NULL; - - if (pingpong_hw->buf_status[pingpong_hw->buf_active_index]) - buf_p = &pingpong_hw->buf[pingpong_hw->buf_active_index]; - - return (void *) buf_p; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_get_status[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, JPEG_IRQ_STATUS_ADDR, - JPEG_IRQ_STATUS_BMSK, {0} }, -}; - -int msm_jpeg_hw_irq_get_status(void *base) -{ - uint32_t n_irq_status = 0; - n_irq_status = msm_jpeg_hw_read(&hw_cmd_irq_get_status[0], base); - return n_irq_status; -} - -struct msm_jpeg_hw_cmd hw_cmd_encode_output_size[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_READ, 1, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR, - JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK, {0} } , -}; - -long msm_jpeg_hw_encode_output_size(void *base) -{ - uint32_t encode_output_size = 0; - - encode_output_size = msm_jpeg_hw_read(&hw_cmd_encode_output_size[0], - base); - - return encode_output_size; -} - -struct msm_jpeg_hw_cmd hw_cmd_irq_clear[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_CLEAR_BMSK, {JPEG_IRQ_CLEAR_ALL} }, -}; - -void msm_jpeg_hw_irq_clear(uint32_t mask, uint32_t data, void *base) -{ - JPEG_DBG("%s:%d] mask %0x data %0x", __func__, __LINE__, mask, data); - hw_cmd_irq_clear[0].mask = mask; - hw_cmd_irq_clear[0].data = data; - msm_jpeg_hw_write(&hw_cmd_irq_clear[0], base); -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_CMD_CLEAR_WRITE_PLN_QUEUES} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_OFFSET_ADDR, - JPEG_PLN0_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_RD_PNTR_ADDR, - JPEG_PLN0_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_RD_PNTR_ADDR, - JPEG_PLN1_RD_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_OFFSET_ADDR, - JPEG_PLN1_RD_OFFSET_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_RD_PNTR_ADDR, - JPEG_PLN2_RD_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_fe_ping_update[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->y_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - hw_cmd_p->data = p_input->pln2_addr; - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_fe_start[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_CMD_ADDR, - JPEG_CMD_BMSK, {JPEG_OFFLINE_CMD_START} }, -}; - -void msm_jpeg_hw_fe_start(void *base) -{ - msm_jpeg_hw_write(&hw_cmd_fe_start[0], base); - - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_we_ping_update[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN0_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN1_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_PLN2_WR_PNTR_ADDR, - JPEG_PLN0_WR_PNTR_BMSK, {0} }, -}; - -void msm_jpeg_decode_status(void *base) -{ - uint32_t data; - data = readl_relaxed(base + JPEG_DECODE_MCUS_DECODED_STATUS); - JPEG_DBG_HIGH("Decode MCUs decode status %u", data); - data = readl_relaxed(base + JPEG_DECODE_BITS_CONSUMED_STATUS); - JPEG_DBG_HIGH("Decode bits consumed status %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_Y_STATE); - JPEG_DBG_HIGH("Decode prediction Y state %u", data); - data = readl_relaxed(base + JPEG_DECODE_PRED_C_STATE); - JPEG_DBG_HIGH("Decode prediction C state %u", data); - data = readl_relaxed(base + JPEG_DECODE_RSM_STATE); - JPEG_DBG_HIGH("Decode prediction RSM state %u", data); -} - - -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *base) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (pingpong_index == 0) { - hw_cmd_p = &hw_cmd_we_ping_update[0]; - hw_cmd_p->data = p_input->y_buffer_addr; - JPEG_DBG_HIGH("%s Output pln0 buffer address is %x\n", __func__, - p_input->y_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->cbcr_buffer_addr; - JPEG_DBG_HIGH("%s Output pln1 buffer address is %x\n", __func__, - p_input->cbcr_buffer_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - hw_cmd_p->data = p_input->pln2_addr; - JPEG_DBG_HIGH("%s Output pln2 buffer address is %x\n", __func__, - p_input->pln2_addr); - msm_jpeg_hw_write(hw_cmd_p++, base); - } - return; -} - -struct msm_jpeg_hw_cmd hw_cmd_reset[] = { - /* type, repeat n times, offset, mask, data or pdata */ - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_DISABLE_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_CLEAR_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_CLEAR_ALL} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_IRQ_MASK_ADDR, - JPEG_IRQ_MASK_BMSK, {JPEG_IRQ_ALLSOURCES_ENABLE} }, - {MSM_JPEG_HW_CMD_TYPE_WRITE, 1, JPEG_RESET_CMD_ADDR, - JPEG_RESET_CMD_RMSK, {JPEG_RESET_DEFAULT} }, -}; - -void msm_jpeg_hw_reset(void *base, int size) -{ - struct msm_jpeg_hw_cmd *hw_cmd_p; - - hw_cmd_p = &hw_cmd_reset[0]; - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p++, base); - wmb(); - msm_jpeg_hw_write(hw_cmd_p, base); - wmb(); - - return; -} - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - data = readl_relaxed(paddr); - data &= hw_cmd_p->mask; - - return data; -} - -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *hw_cmd_p, - void *jpeg_region_base) -{ - uint32_t *paddr; - uint32_t old_data, new_data; - - paddr = jpeg_region_base + hw_cmd_p->offset; - - if (hw_cmd_p->mask == 0xffffffff) { - old_data = 0; - } else { - old_data = readl_relaxed(paddr); - old_data &= ~hw_cmd_p->mask; - } - - new_data = hw_cmd_p->data & hw_cmd_p->mask; - new_data |= old_data; - writel_relaxed(new_data, paddr); -} - -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us, - void *base) -{ - int tm = hw_cmd_p->n; - uint32_t data; - uint32_t wait_data = hw_cmd_p->data & hw_cmd_p->mask; - - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data != wait_data) { - while (tm) { - udelay(m_us); - data = msm_jpeg_hw_read(hw_cmd_p, base); - if (data == wait_data) - break; - tm--; - } - } - hw_cmd_p->data = data; - return tm; -} - -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *hw_cmd_p, int m_us) -{ - int tm = hw_cmd_p->n; - while (tm) { - udelay(m_us); - tm--; - } -} - -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *hw_cmd_p, uint32_t m_cmds, - uint32_t max_size, void *base) -{ - int is_copy_to_user = 0; - uint32_t data; - - while (m_cmds--) { - if (hw_cmd_p->offset >= max_size) { - JPEG_PR_ERR("%s:%d] %d exceed hw region %d\n", __func__, - __LINE__, hw_cmd_p->offset, max_size); - return -EFAULT; - } - if (hw_cmd_p->offset & 0x3) { - JPEG_PR_ERR("%s:%d] %d Invalid alignment\n", __func__, - __LINE__, hw_cmd_p->offset); - return -EFAULT; - } - - switch (hw_cmd_p->type) { - case MSM_JPEG_HW_CMD_TYPE_READ: - hw_cmd_p->data = msm_jpeg_hw_read(hw_cmd_p, base); - is_copy_to_user = 1; - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE: - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_WRITE_OR: - data = msm_jpeg_hw_read(hw_cmd_p, base); - hw_cmd_p->data = (hw_cmd_p->data & hw_cmd_p->mask) | - data; - msm_jpeg_hw_write(hw_cmd_p, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_MWAIT: - msm_jpeg_hw_wait(hw_cmd_p, 1000, base); - break; - - case MSM_JPEG_HW_CMD_TYPE_UDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1); - break; - - case MSM_JPEG_HW_CMD_TYPE_MDELAY: - msm_jpeg_hw_delay(hw_cmd_p, 1000); - break; - - default: - JPEG_PR_ERR("wrong hw command type\n"); - break; - } - - hw_cmd_p++; - } - return is_copy_to_user; -} - -void msm_jpeg_io_dump(void *base, int size) -{ - char line_str[128], *p_str; - void __iomem *addr = (void __iomem *)base; - int i; - u32 *p = (u32 *) addr; - u32 data; - JPEG_DBG_HIGH("%s:%d] %pK %d", __func__, __LINE__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08lx: ", (unsigned long)p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - JPEG_DBG_HIGH("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - JPEG_DBG_HIGH("%s\n", line_str); -} - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.h deleted file mode 100644 index c3c5bd77231c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_H -#define MSM_JPEG_HW_H - -#include -#include "msm_jpeg_hw_reg.h" -#include -#include - -struct msm_jpeg_hw_buf { - struct msm_jpeg_buf vbuf; - struct file *file; - uint32_t framedone_len; - uint32_t y_buffer_addr; - uint32_t y_len; - uint32_t cbcr_buffer_addr; - uint32_t cbcr_len; - uint32_t num_of_mcu_rows; - struct ion_handle *handle; - uint32_t pln2_addr; - uint32_t pln2_len; -}; - -struct msm_jpeg_hw_pingpong { - uint8_t is_fe; /* 1: fe; 0: we */ - struct msm_jpeg_hw_buf buf[2]; - int buf_status[2]; - int buf_active_index; -}; - -int msm_jpeg_hw_pingpong_update(struct msm_jpeg_hw_pingpong *pingpong_hw, - struct msm_jpeg_hw_buf *buf, void *); -void *msm_jpeg_hw_pingpong_irq(struct msm_jpeg_hw_pingpong *pingpong_hw); -void *msm_jpeg_hw_pingpong_active_buffer(struct msm_jpeg_hw_pingpong - *pingpong_hw); - -void msm_jpeg_hw_irq_clear(uint32_t, uint32_t, void *); -int msm_jpeg_hw_irq_get_status(void *); -long msm_jpeg_hw_encode_output_size(void *); -#define MSM_JPEG_HW_MASK_COMP_FRAMEDONE \ - MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK -#define MSM_JPEG_HW_MASK_COMP_FE \ - MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK -#define MSM_JPEG_HW_MASK_COMP_WE \ - (MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK | \ - MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK) -#define MSM_JPEG_HW_MASK_COMP_RESET_ACK \ - MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK -#define MSM_JPEG_HW_MASK_COMP_ERR \ - (MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ | \ - MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM | \ - MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK) - -#define msm_jpeg_hw_irq_is_frame_done(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FRAMEDONE) -#define msm_jpeg_hw_irq_is_fe_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_FE) -#define msm_jpeg_hw_irq_is_we_pingpong(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_WE) -#define msm_jpeg_hw_irq_is_reset_ack(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_RESET_ACK) -#define msm_jpeg_hw_irq_is_err(jpeg_irq_status) \ - (jpeg_irq_status & MSM_JPEG_HW_MASK_COMP_ERR) - -void msm_jpeg_hw_fe_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); -void msm_jpeg_hw_we_buffer_update(struct msm_jpeg_hw_buf *p_input, - uint8_t pingpong_index, void *); - -void msm_jpeg_hw_we_buffer_cfg(uint8_t is_realtime); - -void msm_jpeg_hw_fe_start(void *); -void msm_jpeg_hw_clk_cfg(void); - -void msm_jpeg_hw_reset(void *base, int size); -void msm_jpeg_hw_irq_cfg(void); - -uint32_t msm_jpeg_hw_read(struct msm_jpeg_hw_cmd *, void *); -void msm_jpeg_hw_write(struct msm_jpeg_hw_cmd *, void *); -int msm_jpeg_hw_wait(struct msm_jpeg_hw_cmd *, int, void *); -void msm_jpeg_hw_delay(struct msm_jpeg_hw_cmd *, int); -int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *, uint32_t , - uint32_t , void *); -void msm_jpeg_hw_region_dump(int size); -void msm_jpeg_io_dump(void *base, int size); -void msm_jpeg_decode_status(void *base); - -#endif /* MSM_JPEG_HW_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw_reg.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw_reg.h deleted file mode 100644 index 4fbab4b3ea71..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_hw_reg.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_HW_REG_H -#define MSM_JPEG_HW_REG_H - -#define JPEG_REG_BASE 0 - -#define MSM_JPEG_HW_IRQ_MASK_ADDR 0x00000018 -#define MSM_JPEG_HW_IRQ_MASK_RMSK 0xFFFFFFFF -#define MSM_JPEG_HW_IRQ_ENABLE 0xFFFFFFFF - -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_MASK 0x00000001 -#define MSM_JPEG_HW_IRQ_STATUS_FRAMEDONE_SHIFT 0x00000000 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RD_DONE_SHIFT 0x00000001 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_MASK 0x00000004 -#define MSM_JPEG_HW_IRQ_STATUS_FE_RTOVF_SHIFT 0x00000002 - -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_MASK 0x00000008 -#define MSM_JPEG_HW_IRQ_STATUS_FE_VFE_OVERFLOW_SHIFT 0x00000003 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_MASK 0x00000010 -#define MSM_JPEG_HW_IRQ_STATUS_WE_Y_PINGPONG_SHIFT 0x00000004 - -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_MASK 0x00000020 -#define MSM_JPEG_HW_IRQ_STATUS_WE_CBCR_PINGPONG_SHIFT 0x00000005 - -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_MASK 0x10000000 -#define MSM_JPEG_HW_IRQ_STATUS_RESET_ACK_SHIFT 0x0000000a - -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_MASK 0x00000800 -#define MSM_JPEG_HW_IRQ_STATUS_BUS_ERROR_SHIFT 0x0000000b - -#define MSM_JPEG_HW_IRQ_STATUS_DCD_UNESCAPED_FF (0x1<<19) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_HUFFMAN_ERROR (0x1<<20) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_COEFFICIENT_ERR (0x1<<21) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_BIT_STUFF (0x1<<22) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_SCAN_UNDERFLOW (0x1<<23) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM (0x1<<24) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_INVALID_RSM_SEQ (0x1<<25) -#define MSM_JPEG_HW_IRQ_STATUS_DCD_MISSING_RSM (0x1<<26) -#define MSM_JPEG_HW_IRQ_STATUS_VIOLATION_MASK (0x1<<29) - -#define JPEG_OFFLINE_CMD_START 0x00000001 - -#define JPEG_RESET_DEFAULT 0x00032013 - -#define JPEG_IRQ_DISABLE_ALL 0x00000000 -#define JPEG_IRQ_CLEAR_ALL 0xFFFFFFFF - -#define JPEG_PLN0_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000038) -#define JPEG_PLN0_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN0_RD_OFFSET_ADDR 0x0000003C -#define JPEG_PLN0_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN1_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000044) -#define JPEG_PLN1_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_RD_OFFSET_ADDR 0x00000048 -#define JPEG_PLN1_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_PLN2_RD_PNTR_ADDR (JPEG_REG_BASE + 0x00000050) -#define JPEG_PLN2_RD_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_RD_OFFSET_ADDR 0x00000054 -#define JPEG_PLN2_RD_OFFSET_BMSK 0x1FFFFFFF - -#define JPEG_CMD_ADDR (JPEG_REG_BASE + 0x00000010) -#define JPEG_CMD_BMSK 0x00000FFF -#define JPEG_CMD_CLEAR_WRITE_PLN_QUEUES 0x700 - -#define JPEG_PLN0_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000cc) -#define JPEG_PLN0_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN1_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D0) -#define JPEG_PLN1_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_PLN2_WR_PNTR_ADDR (JPEG_REG_BASE + 0x000000D4) -#define JPEG_PLN2_WR_PNTR_BMSK 0xFFFFFFFF - -#define JPEG_IRQ_MASK_ADDR (JPEG_REG_BASE + 0x00000018) -#define JPEG_IRQ_MASK_BMSK 0xFFFFFFFF -#define JPEG_IRQ_ALLSOURCES_ENABLE 0xFFFFFFFF - -#define JPEG_IRQ_CLEAR_ADDR (JPEG_REG_BASE + 0x0000001c) -#define JPEG_IRQ_CLEAR_BMSK 0xFFFFFFFF - -#define JPEG_RESET_CMD_ADDR (JPEG_REG_BASE + 0x00000008) -#define JPEG_RESET_CMD_RMSK 0xFFFFFFFF - -#define JPEG_IRQ_STATUS_ADDR (JPEG_REG_BASE + 0x00000020) -#define JPEG_IRQ_STATUS_BMSK 0xFFFFFFFF - -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_ADDR (JPEG_REG_BASE + 0x00000180) -#define JPEG_ENCODE_OUTPUT_SIZE_STATUS_BMSK 0x1FFFFFFF - -#define JPEG_DECODE_MCUS_DECODED_STATUS (JPEG_REG_BASE + 0x00000258) -#define JPEG_DECODE_BITS_CONSUMED_STATUS (JPEG_REG_BASE + 0x0000025C) -#define JPEG_DECODE_PRED_Y_STATE (JPEG_REG_BASE + 0x00000260) -#define JPEG_DECODE_PRED_C_STATE (JPEG_REG_BASE + 0x00000264) -#define JPEG_DECODE_RSM_STATE (JPEG_REG_BASE + 0x00000268) - -#define JPEG_HW_VERSION (JPEG_REG_BASE + 0x00000000) - -#define VBIF_BASE_ADDRESS 0xFDA60000 -#define VBIF_REGION_SIZE 0xC30 -#define JPEG_VBIF_CLKON 0x4 -#define JPEG_VBIF_IN_RD_LIM_CONF0 0xB0 -#define JPEG_VBIF_IN_RD_LIM_CONF1 0xB4 -#define JPEG_VBIF_IN_RD_LIM_CONF2 0xB8 -#define JPEG_VBIF_IN_WR_LIM_CONF0 0xC0 -#define JPEG_VBIF_IN_WR_LIM_CONF1 0xC4 -#define JPEG_VBIF_IN_WR_LIM_CONF2 0xC8 -#define JPEG_VBIF_OUT_RD_LIM_CONF0 0xD0 -#define JPEG_VBIF_OUT_WR_LIM_CONF0 0xD4 -#define JPEG_VBIF_DDR_OUT_MAX_BURST 0xD8 -#define JPEG_VBIF_OCMEM_OUT_MAX_BURST 0xDC -#define JPEG_VBIF_ARB_CTL 0xF0 -#define JPEG_VBIF_OUT_AXI_AOOO_EN 0x178 -#define JPEG_VBIF_OUT_AXI_AOOO 0x17c -#define JPEG_VBIF_ROUND_ROBIN_QOS_ARB 0x124 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x160 -#define JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1 0x164 - -#endif /* MSM_JPEG_HW_REG_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.c b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.c deleted file mode 100644 index 1243d8b42fef..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.c +++ /dev/null @@ -1,460 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "msm_jpeg_platform.h" -#include "msm_jpeg_sync.h" -#include "msm_jpeg_common.h" -#include "msm_jpeg_hw.h" -#include "msm_camera_io_util.h" - -#define JPEG_CLK_INFO_MAX 16 - -static struct msm_cam_clk_info jpeg_8x_clk_info[JPEG_CLK_INFO_MAX]; - -static int msm_jpeg_get_clk_info(struct msm_jpeg_device *jpeg_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[JPEG_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - JPEG_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > JPEG_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - JPEG_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(jpeg_8x_clk_info[i].clk_name)); - JPEG_DBG("clock-names[%d] = %s\n", - i, jpeg_8x_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - jpeg_8x_clk_info[i].clk_rate = - (rates[i] == 0) ? -1 : rates[i]; - JPEG_DBG("clk_rate[%d] = %ld\n", - i, jpeg_8x_clk_info[i].clk_rate); - } - jpeg_dev->num_clk = count; - return 0; -} - - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate) -{ - int rc = 0; - struct clk *jpeg_clk; - - jpeg_clk = clk_get(&pgmn_dev->pdev->dev, "core_clk"); - if (IS_ERR(jpeg_clk)) { - JPEG_PR_ERR("%s get failed\n", "core_clk"); - rc = PTR_ERR(jpeg_clk); - return rc; - } - - rc = clk_set_rate(jpeg_clk, clk_rate); - - return rc; -} - -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num) -{ - ion_unmap_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0); - ion_free(pgmn_dev->jpeg_client, *ionhandle); - *ionhandle = NULL; -} - -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file_p, struct ion_handle **ionhandle, - int domain_num) { - dma_addr_t paddr; - unsigned long size; - int rc; - *ionhandle = ion_import_dma_buf(pgmn_dev->jpeg_client, fd); - if (IS_ERR_OR_NULL(*ionhandle)) - return 0; - - rc = ion_map_iommu(pgmn_dev->jpeg_client, *ionhandle, domain_num, 0, - SZ_4K, 0, &paddr, (unsigned long *)&size, 0, 0); - JPEG_DBG("%s:%d] addr 0x%x size %ld", __func__, __LINE__, - (uint32_t)paddr, size); - - if (rc < 0) { - JPEG_PR_ERR("%s: ion_map_iommu fd %d error %d\n", __func__, fd, - rc); - goto error1; - } - - /* validate user input */ - if (len > size) { - JPEG_PR_ERR("%s: invalid offset + len\n", __func__); - goto error1; - } - - return paddr; -error1: - ion_free(pgmn_dev->jpeg_client, *ionhandle); - return 0; -} - -static void set_vbif_params(struct msm_jpeg_device *pgmn_dev, - void *jpeg_vbif_base) -{ - writel_relaxed(0x1, - jpeg_vbif_base + JPEG_VBIF_CLKON); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_RD_LIM_CONF2); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF0); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF1); - writel_relaxed(0x10101010, - jpeg_vbif_base + JPEG_VBIF_IN_WR_LIM_CONF2); - writel_relaxed(0x00001010, - jpeg_vbif_base + JPEG_VBIF_OUT_RD_LIM_CONF0); - writel_relaxed(0x00000110, - jpeg_vbif_base + JPEG_VBIF_OUT_WR_LIM_CONF0); - writel_relaxed(0x00000707, - jpeg_vbif_base + JPEG_VBIF_DDR_OUT_MAX_BURST); - writel_relaxed(0x7, - jpeg_vbif_base + JPEG_VBIF_OCMEM_OUT_MAX_BURST); - writel_relaxed(0x00000030, - jpeg_vbif_base + JPEG_VBIF_ARB_CTL); - writel_relaxed(0x00000FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO_EN); - writel_relaxed(0x0FFF0FFF, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AOOO); - /*FE and WE QOS configuration need to be set when - QOS RR arbitration is enabled*/ - if (pgmn_dev->hw_version != JPEG_8974_V1) - writel_relaxed(0x00000003, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - else - writel_relaxed(0x00000001, - jpeg_vbif_base + JPEG_VBIF_ROUND_ROBIN_QOS_ARB); - - writel_relaxed(0x22222222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF0); - writel_relaxed(0x2222, - jpeg_vbif_base + JPEG_VBIF_OUT_AXI_AMEMTYPE_CONF1); -} - -static struct msm_bus_vectors msm_jpeg_init_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = 0, - .ib = 0, - }, -}; - -static struct msm_bus_vectors msm_jpeg_vectors[] = { - { - .src = MSM_BUS_MASTER_JPEG, - .dst = MSM_BUS_SLAVE_EBI_CH0, - .ab = JPEG_CLK_RATE * 2.5, - .ib = JPEG_CLK_RATE * 2.5, - }, -}; - -static struct msm_bus_paths msm_jpeg_bus_client_config[] = { - { - ARRAY_SIZE(msm_jpeg_init_vectors), - msm_jpeg_init_vectors, - }, - { - ARRAY_SIZE(msm_jpeg_vectors), - msm_jpeg_vectors, - }, -}; - -static struct msm_bus_scale_pdata msm_jpeg_bus_client_pdata = { - msm_jpeg_bus_client_config, - ARRAY_SIZE(msm_jpeg_bus_client_config), - .name = "msm_jpeg", -}; - -#ifdef CONFIG_MSM_IOMMU -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - int rc = iommu_attach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - if (rc < 0) { - JPEG_PR_ERR("%s: Device attach failed\n", __func__); - return -ENODEV; - } - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - int i; - - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - JPEG_DBG("%s:%d] dom 0x%lx ctx 0x%lx", __func__, __LINE__, - (unsigned long)pgmn_dev->domain, - (unsigned long)pgmn_dev->iommu_ctx_arr[i]); - iommu_detach_device(pgmn_dev->domain, - pgmn_dev->iommu_ctx_arr[i]); - } - return 0; -} -#else -static int msm_jpeg_attach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -static int msm_jpeg_detach_iommu(struct msm_jpeg_device *pgmn_dev) -{ - return 0; -} -#endif - - - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context) -{ - int rc = -1; - int jpeg_irq; - struct resource *jpeg_mem, *vbif_mem, *jpeg_io, *jpeg_irq_res; - void *jpeg_base; - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - pgmn_dev->state = MSM_JPEG_IDLE; - - jpeg_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!jpeg_mem) { - JPEG_PR_ERR("%s: jpeg no mem resource?\n", __func__); - return -ENODEV; - } - - vbif_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!vbif_mem) { - JPEG_PR_ERR("%s: vbif no mem resource?\n", __func__); - return -ENODEV; - } - - jpeg_irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!jpeg_irq_res) { - JPEG_PR_ERR("no irq resource?\n"); - return -ENODEV; - } - jpeg_irq = jpeg_irq_res->start; - JPEG_DBG("%s base address: 0x%x, jpeg irq number: %d\n", __func__, - jpeg_mem->start, jpeg_irq); - - pgmn_dev->jpeg_bus_client = - msm_bus_scale_register_client(&msm_jpeg_bus_client_pdata); - if (!pgmn_dev->jpeg_bus_client) { - JPEG_PR_ERR("%s: Registration Failed!\n", __func__); - pgmn_dev->jpeg_bus_client = 0; - return -EINVAL; - } - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 1); - - jpeg_io = request_mem_region(jpeg_mem->start, - resource_size(jpeg_mem), pdev->name); - if (!jpeg_io) { - JPEG_PR_ERR("%s: region already claimed\n", __func__); - return -EBUSY; - } - - jpeg_base = ioremap(jpeg_mem->start, resource_size(jpeg_mem)); - if (!jpeg_base) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_remap; - } - - pgmn_dev->jpeg_fs = regulator_get(&pgmn_dev->pdev->dev, "vdd"); - rc = regulator_enable(pgmn_dev->jpeg_fs); - if (rc) { - JPEG_PR_ERR("%s:%d]jpeg regulator get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - if (msm_jpeg_get_clk_info(pgmn_dev, pgmn_dev->pdev) < 0) { - JPEG_PR_ERR("%s:%d]jpeg clock get failed\n", - __func__, __LINE__); - goto fail_fs; - } - - rc = msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 1); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - goto fail_clk; - } - - pgmn_dev->hw_version = readl_relaxed(jpeg_base + - JPEG_HW_VERSION); - JPEG_DBG_HIGH("%s:%d] jpeg HW version 0x%x", __func__, __LINE__, - pgmn_dev->hw_version); - - pgmn_dev->jpeg_vbif = ioremap(vbif_mem->start, resource_size(vbif_mem)); - if (!pgmn_dev->jpeg_vbif) { - rc = -ENOMEM; - JPEG_PR_ERR("%s: ioremap failed\n", __func__); - goto fail_vbif; - } - - JPEG_DBG("%s:%d] jpeg_vbif 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->jpeg_vbif); - - rc = msm_jpeg_attach_iommu(pgmn_dev); - if (rc < 0) - goto fail_iommu; - - set_vbif_params(pgmn_dev, pgmn_dev->jpeg_vbif); - - rc = request_irq(jpeg_irq, handler, IRQF_TRIGGER_RISING, "jpeg", - context); - if (rc) { - JPEG_PR_ERR("%s: request_irq failed, %d\n", __func__, - jpeg_irq); - goto fail_request_irq; - } - - *mem = jpeg_mem; - *base = jpeg_base; - *irq = jpeg_irq; - - pgmn_dev->jpeg_client = msm_ion_client_create("camera/jpeg"); - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - - pgmn_dev->state = MSM_JPEG_INIT; - return rc; - -fail_request_irq: - msm_jpeg_detach_iommu(pgmn_dev); - -fail_iommu: - iounmap(pgmn_dev->jpeg_vbif); - - -fail_vbif: - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - -fail_clk: - rc = regulator_disable(pgmn_dev->jpeg_fs); - if (!rc) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, rc); - pgmn_dev->jpeg_fs = NULL; - -fail_fs: - iounmap(jpeg_base); - -fail_remap: - release_mem_region(jpeg_mem->start, resource_size(jpeg_mem)); - JPEG_DBG("%s:%d] fail\n", __func__, __LINE__); - return rc; -} - -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context) -{ - int result = 0; - - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - free_irq(irq, context); - - msm_jpeg_detach_iommu(pgmn_dev); - - if (pgmn_dev->jpeg_bus_client) { - msm_bus_scale_client_update_request( - pgmn_dev->jpeg_bus_client, 0); - msm_bus_scale_unregister_client(pgmn_dev->jpeg_bus_client); - } - - msm_cam_clk_enable(&pgmn_dev->pdev->dev, jpeg_8x_clk_info, - pgmn_dev->jpeg_clk, pgmn_dev->num_clk, 0); - JPEG_DBG("%s:%d] clock disbale done", __func__, __LINE__); - - if (pgmn_dev->jpeg_fs) { - result = regulator_disable(pgmn_dev->jpeg_fs); - if (!result) - regulator_put(pgmn_dev->jpeg_fs); - else - JPEG_PR_ERR("%s:%d] regulator disable failed %d", - __func__, __LINE__, result); - pgmn_dev->jpeg_fs = NULL; - } - iounmap(pgmn_dev->jpeg_vbif); - iounmap(base); - release_mem_region(mem->start, resource_size(mem)); - ion_client_destroy(pgmn_dev->jpeg_client); - pgmn_dev->state = MSM_JPEG_IDLE; - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return result; -} - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.h deleted file mode 100644 index b59c41f8780c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_platform.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_JPEG_PLATFORM_H -#define MSM_JPEG_PLATFORM_H - -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#define JPEG_CLK_RATE 266670000 - -int msm_jpeg_platform_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - long clk_rate); -void msm_jpeg_platform_p2v(struct msm_jpeg_device *pgmn_dev, struct file *file, - struct ion_handle **ionhandle, int domain_num); -uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd, - uint32_t len, struct file **file, struct ion_handle **ionhandle, - int domain_num); - -int msm_jpeg_platform_clk_enable(void); -int msm_jpeg_platform_clk_disable(void); - -int msm_jpeg_platform_init(struct platform_device *pdev, - struct resource **mem, - void **base, - int *irq, - irqreturn_t (*handler) (int, void *), - void *context); -int msm_jpeg_platform_release(struct resource *mem, void *base, int irq, - void *context); - -#endif /* MSM_JPEG_PLATFORM_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.c b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.c deleted file mode 100644 index fac3da77d26f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.c +++ /dev/null @@ -1,1292 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_sync.h" -#include "msm_jpeg_core.h" -#include "msm_jpeg_platform.h" -#include "msm_jpeg_common.h" - -#define JPEG_REG_SIZE 0x308 -#define JPEG_DEV_CNT 3 -#define JPEG_DEC_ID 2 -#define UINT32_MAX (0xFFFFFFFFU) - -#ifdef CONFIG_COMPAT -#define MSM_JPEG_IOCTL_RESET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_INPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 6, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 8, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_OUTPUT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 9, struct msm_jpeg_buf32) - -#define MSM_JPEG_IOCTL_EVT_GET32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd32) - -#define MSM_JPEG_IOCTL_TEST_DUMP_REGION32 \ - _IOW(MSM_JPEG_IOCTL_MAGIC, 15, compat_ulong_t) - -struct msm_jpeg_ctrl_cmd32 { - uint32_t type; - uint32_t len; - compat_uptr_t value; -}; -struct msm_jpeg_buf32 { - uint32_t type; - int fd; - - compat_uptr_t vaddr; - - uint32_t y_off; - uint32_t y_len; - uint32_t framedone_len; - - uint32_t cbcr_off; - uint32_t cbcr_len; - - uint32_t num_of_mcu_rows; - uint32_t offset; - uint32_t pln2_off; - uint32_t pln2_len; -}; - -#endif - - -inline void msm_jpeg_q_init(char const *name, struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, name); - q_p->name = name; - spin_lock_init(&q_p->lck); - INIT_LIST_HEAD(&q_p->q); - init_waitqueue_head(&q_p->wait); - q_p->unblck = 0; -} - -inline void *msm_jpeg_q_out(struct msm_jpeg_q *q_p) -{ - unsigned long flags; - struct msm_jpeg_q_entry *q_entry_p = NULL; - void *data = NULL; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - spin_lock_irqsave(&q_p->lck, flags); - if (!list_empty(&q_p->q)) { - q_entry_p = list_first_entry(&q_p->q, struct msm_jpeg_q_entry, - list); - list_del_init(&q_entry_p->list); - } - spin_unlock_irqrestore(&q_p->lck, flags); - - if (q_entry_p) { - data = q_entry_p->data; - kfree(q_entry_p); - } else { - JPEG_DBG("%s:%d] %s no entry\n", __func__, __LINE__, - q_p->name); - } - - return data; -} - -inline int msm_jpeg_q_in(struct msm_jpeg_q *q_p, void *data) -{ - unsigned long flags; - - struct msm_jpeg_q_entry *q_entry_p; - - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - - q_entry_p = kmalloc(sizeof(struct msm_jpeg_q_entry), GFP_ATOMIC); - if (!q_entry_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - q_entry_p->data = data; - - spin_lock_irqsave(&q_p->lck, flags); - list_add_tail(&q_entry_p->list, &q_p->q); - spin_unlock_irqrestore(&q_p->lck, flags); - - return 0; -} - -inline int msm_jpeg_q_in_buf(struct msm_jpeg_q *q_p, - struct msm_jpeg_core_buf *buf) -{ - struct msm_jpeg_core_buf *buf_p; - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s: no mem\n", __func__); - return -EFAULT; - } - - memcpy(buf_p, buf, sizeof(struct msm_jpeg_core_buf)); - - msm_jpeg_q_in(q_p, buf_p); - return 0; -} - -inline int msm_jpeg_q_wait(struct msm_jpeg_q *q_p) -{ - long tm = MAX_SCHEDULE_TIMEOUT; /* 500ms */ - int rc; - - JPEG_DBG("%s:%d] %s wait\n", __func__, __LINE__, q_p->name); - rc = wait_event_interruptible_timeout(q_p->wait, - (!list_empty_careful(&q_p->q) || q_p->unblck), - msecs_to_jiffies(tm)); - JPEG_DBG("%s:%d] %s wait done\n", __func__, __LINE__, q_p->name); - if (list_empty_careful(&q_p->q)) { - if (rc == 0) { - rc = -ETIMEDOUT; - JPEG_PR_ERR("%s:%d] %s timeout\n", __func__, __LINE__, - q_p->name); - } else if (q_p->unblck) { - JPEG_DBG("%s:%d] %s unblock is true\n", __func__, - __LINE__, q_p->name); - q_p->unblck = 0; - rc = -ECANCELED; - } else if (rc < 0) { - JPEG_PR_ERR("%s:%d] %s rc %d\n", __func__, __LINE__, - q_p->name, rc); - } - } - return rc; -} - -inline int msm_jpeg_q_wakeup(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - wake_up(&q_p->wait); - return 0; -} - -inline int msm_jpeg_q_unblock(struct msm_jpeg_q *q_p) -{ - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - q_p->unblck = 1; - wake_up(&q_p->wait); - return 0; -} - -inline void msm_jpeg_outbuf_q_cleanup(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_q *q_p, int domain_num) -{ - struct msm_jpeg_core_buf *buf_p; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - buf_p = msm_jpeg_q_out(q_p); - if (buf_p) { - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, - &buf_p->handle, domain_num); - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(buf_p); - } - } while (buf_p); - q_p->unblck = 0; -} - -inline void msm_jpeg_q_cleanup(struct msm_jpeg_q *q_p) -{ - void *data; - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - do { - data = msm_jpeg_q_out(q_p); - if (data) { - JPEG_DBG("%s:%d] %s\n", __func__, __LINE__, q_p->name); - kfree(data); - } - } while (data); - q_p->unblck = 0; -} - -/*************** event queue ****************/ - -int msm_jpeg_framedone_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (buf_in) { - buf_in->vbuf.framedone_len = buf_in->framedone_len; - buf_in->vbuf.type = MSM_JPEG_EVT_SESSION_DONE; - JPEG_DBG("%s:%d] 0x%08x %d framedone_len %d\n", - __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len, - buf_in->vbuf.framedone_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, buf_in); - } else { - JPEG_PR_ERR("%s:%d] no output return buffer\n", - __func__, __LINE__); - rc = -1; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - return rc; -} - -int msm_jpeg_evt_get(struct msm_jpeg_device *pgmn_dev, - void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->evt_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->evt_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no buffer\n", __func__, __LINE__); - return -EAGAIN; - } - - memset(&ctrl_cmd, 0, sizeof(ctrl_cmd)); - ctrl_cmd.type = buf_p->vbuf.type; - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) ctrl_cmd.value, ctrl_cmd.len); - - if (copy_to_user(to, &ctrl_cmd, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_evt_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->evt_q); - return 0; -} - -void msm_jpeg_reset_ack_irq(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d]\n", __func__, __LINE__); -} - -void msm_jpeg_err_irq(struct msm_jpeg_device *pgmn_dev, - int event) -{ - int rc = 0; - struct msm_jpeg_core_buf buf; - - JPEG_PR_ERR("%s:%d] error: %d\n", __func__, __LINE__, event); - - buf.vbuf.type = MSM_JPEG_EVT_ERR; - rc = msm_jpeg_q_in_buf(&pgmn_dev->evt_q, &buf); - if (!rc) - rc = msm_jpeg_q_wakeup(&pgmn_dev->evt_q); - - if (!rc) - JPEG_PR_ERR("%s:%d] err err\n", __func__, __LINE__); - - return; -} - -/*************** output queue ****************/ - -int msm_jpeg_we_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - int rc = 0; - struct msm_jpeg_core_buf *buf_out; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->output_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no output return buffer\n", __func__, - __LINE__); - rc = -1; - return rc; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_out->y_buffer_addr, buf_out->y_len); - rc = msm_jpeg_core_we_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - msm_jpeg_core_we_buf_reset(pgmn_dev, buf_in); - JPEG_DBG("%s:%d] no output buffer\n", __func__, __LINE__); - rc = -2; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->output_rtn_q); - - return rc; -} - -int msm_jpeg_output_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - msm_jpeg_q_wait(&pgmn_dev->output_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->output_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no output buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_output_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->output_rtn_q); - return 0; -} - -int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_buf buf_cmd; - struct msm_jpeg_core_buf *buf_p; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] vaddr = 0x%08x y_len = %d\n, fd = %d", - __func__, __LINE__, (int) buf_cmd.vaddr, buf_cmd.y_len, - buf_cmd.fd); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + buf_cmd.pln2_len, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num); - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s:%d]After v2p pln0_addr %x pln0_len %d", - __func__, __LINE__, buf_p->y_buffer_addr, - buf_cmd.y_len); - - JPEG_DBG("pl1_len %d, pln1_addr %x, pln2_adrr %x,pln2_len %d", - buf_cmd.cbcr_len, buf_p->cbcr_buffer_addr, - buf_p->pln2_addr, buf_cmd.pln2_len); - - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->output_buf_q, buf_p); - return 0; -} - -/*************** input queue ****************/ - -int msm_jpeg_fe_pingpong_irq(struct msm_jpeg_device *pgmn_dev, - struct msm_jpeg_core_buf *buf_in) -{ - struct msm_jpeg_core_buf *buf_out; - int rc = 0; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - if (buf_in) { - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_in->y_buffer_addr, buf_in->y_len); - rc = msm_jpeg_q_in_buf(&pgmn_dev->input_rtn_q, buf_in); - } else { - JPEG_DBG("%s:%d] no input return buffer\n", __func__, - __LINE__); - rc = -EFAULT; - } - - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - rc = msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - msm_jpeg_core_fe_start(pgmn_dev); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, __LINE__); - rc = -EFAULT; - } - - if (buf_in) - rc = msm_jpeg_q_wakeup(&pgmn_dev->input_rtn_q); - - return rc; -} - -int msm_jpeg_input_get(struct msm_jpeg_device *pgmn_dev, void __user *to) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_wait(&pgmn_dev->input_rtn_q); - buf_p = msm_jpeg_q_out(&pgmn_dev->input_rtn_q); - - if (!buf_p) { - JPEG_DBG("%s:%d] no input buffer return\n", - __func__, __LINE__); - return -EAGAIN; - } - - buf_cmd = buf_p->vbuf; - msm_jpeg_platform_p2v(pgmn_dev, buf_p->file, &buf_p->handle, - pgmn_dev->domain_num); - kfree(buf_p); - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) { - JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_input_get_unblock(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_q_unblock(&pgmn_dev->input_rtn_q); - return 0; -} - -int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev, - void __user *arg) -{ - struct msm_jpeg_core_buf *buf_p; - struct msm_jpeg_buf buf_cmd; - memset(&buf_cmd, 0x0, sizeof(struct msm_jpeg_buf)); - - if (copy_from_user(&buf_cmd, arg, sizeof(struct msm_jpeg_buf))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - buf_p = kmalloc(sizeof(struct msm_jpeg_core_buf), GFP_ATOMIC); - if (!buf_p) { - JPEG_PR_ERR("%s:%d] no mem\n", __func__, __LINE__); - return -EFAULT; - } - - JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__, - (int) buf_cmd.vaddr, buf_cmd.y_len); - - buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd, - buf_cmd.y_len + buf_cmd.cbcr_len + - buf_cmd.pln2_len + buf_cmd.offset, - &buf_p->file, &buf_p->handle, pgmn_dev->domain_num) + - buf_cmd.offset + buf_cmd.y_off; - buf_p->y_len = buf_cmd.y_len; - buf_p->cbcr_len = buf_cmd.cbcr_len; - buf_p->pln2_len = buf_cmd.pln2_len; - buf_p->num_of_mcu_rows = buf_cmd.num_of_mcu_rows; - - if (buf_cmd.cbcr_len) - buf_p->cbcr_buffer_addr = buf_p->y_buffer_addr + - buf_cmd.y_len + buf_cmd.cbcr_off; - else - buf_p->cbcr_buffer_addr = 0x0; - - if (buf_cmd.pln2_len) - buf_p->pln2_addr = buf_p->cbcr_buffer_addr + - buf_cmd.cbcr_len + buf_cmd.pln2_off; - else - buf_p->pln2_addr = 0x0; - - JPEG_DBG("%s: y_addr=%x, y_len=%x, cbcr_addr=%x, cbcr_len=%d", - __func__, buf_p->y_buffer_addr, buf_p->y_len, - buf_p->cbcr_buffer_addr, buf_p->cbcr_len); - JPEG_DBG("pln2_addr = %x, pln2_len = %d, fd =%d\n", - buf_p->pln2_addr, buf_p->pln2_len, buf_cmd.fd); - - if (!buf_p->y_buffer_addr) { - JPEG_PR_ERR("%s:%d] v2p wrong\n", __func__, __LINE__); - kfree(buf_p); - return -EFAULT; - } - buf_p->vbuf = buf_cmd; - - msm_jpeg_q_in(&pgmn_dev->input_buf_q, buf_p); - - return 0; -} - -int msm_jpeg_irq(int event, void *context, void *data) -{ - struct msm_jpeg_device *pgmn_dev = - (struct msm_jpeg_device *) context; - - switch (event) { - case MSM_JPEG_EVT_SESSION_DONE: - msm_jpeg_framedone_irq(pgmn_dev, data); - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_FE: - msm_jpeg_fe_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_WE: - msm_jpeg_we_pingpong_irq(pgmn_dev, data); - break; - - case MSM_JPEG_HW_MASK_COMP_RESET_ACK: - msm_jpeg_reset_ack_irq(pgmn_dev); - break; - - case MSM_JPEG_HW_MASK_COMP_ERR: - default: - msm_jpeg_err_irq(pgmn_dev, event); - break; - } - - return 0; -} - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev) -{ - int rc; - - mutex_lock(&pgmn_dev->lock); - if (pgmn_dev->open_count) { - /* only open once */ - JPEG_PR_ERR("%s:%d] busy\n", __func__, __LINE__); - mutex_unlock(&pgmn_dev->lock); - return -EBUSY; - } - pgmn_dev->open_count++; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_irq_install(msm_jpeg_irq); - rc = msm_jpeg_platform_init(pgmn_dev->pdev, - &pgmn_dev->mem, &pgmn_dev->base, - &pgmn_dev->irq, msm_jpeg_core_irq, pgmn_dev); - if (rc) { - JPEG_PR_ERR("%s:%d] platform_init fail %d\n", __func__, - __LINE__, rc); - return rc; - } - - JPEG_DBG("%s:%d] platform resources - mem %pK, base %pK, irq %d\n", - __func__, __LINE__, - pgmn_dev->mem, pgmn_dev->base, pgmn_dev->irq); - pgmn_dev->res_size = resource_size(pgmn_dev->mem); - - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_q_cleanup(&pgmn_dev->input_buf_q); - msm_jpeg_core_init(pgmn_dev); - - JPEG_DBG("%s:%d] success\n", __func__, __LINE__); - return rc; -} - -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - mutex_lock(&pgmn_dev->lock); - if (!pgmn_dev->open_count) { - JPEG_PR_ERR(KERN_ERR "%s: not opened\n", __func__); - mutex_unlock(&pgmn_dev->lock); - return -EINVAL; - } - pgmn_dev->open_count--; - mutex_unlock(&pgmn_dev->lock); - - msm_jpeg_core_release(pgmn_dev, pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->evt_q); - msm_jpeg_q_cleanup(&pgmn_dev->output_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->output_buf_q, - pgmn_dev->domain_num); - msm_jpeg_q_cleanup(&pgmn_dev->input_rtn_q); - msm_jpeg_outbuf_q_cleanup(pgmn_dev, &pgmn_dev->input_buf_q, - pgmn_dev->domain_num); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - if (pgmn_dev->open_count) - JPEG_PR_ERR(KERN_ERR "%s: multiple opens\n", __func__); - - msm_jpeg_platform_release(pgmn_dev->mem, pgmn_dev->base, - pgmn_dev->irq, pgmn_dev); - - JPEG_DBG("%s:%d]\n", __func__, __LINE__); - return 0; -} - -int msm_jpeg_ioctl_hw_cmd(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - struct msm_jpeg_hw_cmd hw_cmd; - int is_copy_to_user; - - if (copy_from_user(&hw_cmd, arg, sizeof(struct msm_jpeg_hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1, - pgmn_dev->res_size, pgmn_dev->base); - JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x,pdata %x\n", - __func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset, - hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, &hw_cmd, sizeof(hw_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - } else { - return is_copy_to_user; - } - - return 0; -} - -int msm_jpeg_ioctl_hw_cmds(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int is_copy_to_user; - uint32_t len; - uint32_t m; - struct msm_jpeg_hw_cmds *hw_cmds_p; - struct msm_jpeg_hw_cmd *hw_cmd_p; - - if (copy_from_user(&m, arg, sizeof(m))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - if ((m == 0) || (m > ((UINT32_MAX - sizeof(struct msm_jpeg_hw_cmds)) / - sizeof(struct msm_jpeg_hw_cmd)))) { - JPEG_PR_ERR("%s:%d] m_cmds out of range\n", __func__, __LINE__); - return -EFAULT; - } - - len = sizeof(struct msm_jpeg_hw_cmds) + - sizeof(struct msm_jpeg_hw_cmd) * (m - 1); - hw_cmds_p = kmalloc(len, GFP_KERNEL); - if (!hw_cmds_p) { - JPEG_PR_ERR("%s:%d] no mem %d\n", __func__, __LINE__, len); - return -EFAULT; - } - - if (copy_from_user(hw_cmds_p, arg, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - - hw_cmd_p = (struct msm_jpeg_hw_cmd *) &(hw_cmds_p->hw_cmd); - - is_copy_to_user = msm_jpeg_hw_exec_cmds(hw_cmd_p, m, - pgmn_dev->res_size, pgmn_dev->base); - - if (is_copy_to_user >= 0) { - if (copy_to_user(arg, hw_cmds_p, len)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - kfree(hw_cmds_p); - return -EFAULT; - } - } else { - kfree(hw_cmds_p); - return is_copy_to_user; - } - kfree(hw_cmds_p); - return 0; -} - -int msm_jpeg_start(struct msm_jpeg_device *pgmn_dev, void * __user arg) -{ - struct msm_jpeg_core_buf *buf_out; - struct msm_jpeg_core_buf *buf_out_free[2] = {NULL, NULL}; - int i, rc; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - pgmn_dev->release_buf = 1; - for (i = 0; i < 2; i++) { - buf_out = msm_jpeg_q_out(&pgmn_dev->input_buf_q); - - if (buf_out) { - msm_jpeg_core_fe_buf_update(pgmn_dev, buf_out); - kfree(buf_out); - } else { - JPEG_DBG("%s:%d] no input buffer\n", __func__, - __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) { - buf_out_free[i] = msm_jpeg_q_out(&pgmn_dev->output_buf_q); - - if (buf_out_free[i]) { - msm_jpeg_core_we_buf_update(pgmn_dev, buf_out_free[i]); - pgmn_dev->release_buf = 0; - } else { - JPEG_DBG("%s:%d] no output buffer\n", - __func__, __LINE__); - break; - } - } - - for (i = 0; i < 2; i++) - kfree(buf_out_free[i]); - - pgmn_dev->state = MSM_JPEG_EXECUTING; - JPEG_DBG_HIGH("%s:%d] START\n", __func__, __LINE__); - wmb(); - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, arg); - wmb(); - - JPEG_DBG("%s:%d]", __func__, __LINE__); - return rc; -} - -int msm_jpeg_ioctl_reset(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - int rc; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - - if (pgmn_dev->state == MSM_JPEG_INIT) { - if (copy_from_user(&ctrl_cmd, arg, sizeof(ctrl_cmd))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - pgmn_dev->op_mode = ctrl_cmd.type; - - rc = msm_jpeg_core_reset(pgmn_dev, pgmn_dev->op_mode, pgmn_dev->base, - resource_size(pgmn_dev->mem)); - } else { - JPEG_PR_ERR("%s:%d] JPEG not been initialized Wrong state\n", - __func__, __LINE__); - rc = -1; - } - return rc; -} - -int msm_jpeg_ioctl_test_dump_region(struct msm_jpeg_device *pgmn_dev, - unsigned long arg) -{ - JPEG_DBG("%s:%d] Enter\n", __func__, __LINE__); - msm_jpeg_io_dump(pgmn_dev->base, JPEG_REG_SIZE); - return 0; -} - -int msm_jpeg_ioctl_set_clk_rate(struct msm_jpeg_device *pgmn_dev, - void * __user arg) -{ - long clk_rate; - int rc; - - if ((pgmn_dev->state != MSM_JPEG_INIT) && - (pgmn_dev->state != MSM_JPEG_RESET)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - if (get_user(clk_rate, (unsigned int __user *)arg)) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - JPEG_DBG("%s:%d] Requested clk rate %ld\n", __func__, __LINE__, - clk_rate); - if (clk_rate < 0) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - rc = msm_jpeg_platform_set_clk_rate(pgmn_dev, clk_rate); - if (rc < 0) { - JPEG_PR_ERR("%s: clk failed rc = %d\n", __func__, rc); - return -EFAULT; - } - - return 0; -} -#ifdef CONFIG_COMPAT -int msm_jpeg_get_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - if (copy_from_user(&ctrl_cmd32, arg, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - ctrl_cmd->type = ctrl_cmd32.type; - ctrl_cmd->len = ctrl_cmd32.len; - temp = (unsigned long) ctrl_cmd32.value; - ctrl_cmd->value = (void *) temp; - - return 0; -} -int msm_jpeg_put_compat_ctrl_cmd(struct msm_jpeg_ctrl_cmd *ctrl_cmd, - void __user *arg) -{ - struct msm_jpeg_ctrl_cmd32 ctrl_cmd32; - unsigned long temp; - - ctrl_cmd32.type = ctrl_cmd->type; - ctrl_cmd32.len = ctrl_cmd->len; - temp = (unsigned long) ctrl_cmd->value; - ctrl_cmd32.value = (compat_uptr_t) temp; - - if (copy_from_user(arg, &ctrl_cmd32, - sizeof(struct msm_jpeg_ctrl_cmd32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - - return 0; -} - -int msm_jpeg_get_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - if (copy_from_user(&jpeg_buf32, arg, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - jpeg_buf->type = jpeg_buf32.type; - jpeg_buf->fd = jpeg_buf32.fd; - temp = (unsigned long) jpeg_buf32.vaddr; - jpeg_buf->vaddr = (void *) temp; - jpeg_buf->y_off = jpeg_buf32.y_off; - jpeg_buf->y_len = jpeg_buf32.y_len; - jpeg_buf->framedone_len = jpeg_buf32.framedone_len; - jpeg_buf->cbcr_off = jpeg_buf32.cbcr_off; - jpeg_buf->cbcr_len = jpeg_buf32.cbcr_len; - jpeg_buf->num_of_mcu_rows = jpeg_buf32.num_of_mcu_rows; - jpeg_buf->offset = jpeg_buf32.offset; - jpeg_buf->pln2_off = jpeg_buf32.pln2_off; - jpeg_buf->pln2_len = jpeg_buf32.pln2_len; - - return 0; -} -int msm_jpeg_put_jpeg_buf(struct msm_jpeg_buf *jpeg_buf, - void __user *arg) -{ - struct msm_jpeg_buf32 jpeg_buf32; - unsigned long temp; - - jpeg_buf32.type = jpeg_buf->type; - jpeg_buf32.fd = jpeg_buf->fd; - temp = (unsigned long) jpeg_buf->vaddr; - jpeg_buf32.vaddr = (compat_uptr_t) temp; - jpeg_buf32.y_off = jpeg_buf->y_off; - jpeg_buf32.y_len = jpeg_buf->y_len; - jpeg_buf32.framedone_len = jpeg_buf->framedone_len; - jpeg_buf32.cbcr_off = jpeg_buf->cbcr_off; - jpeg_buf32.cbcr_len = jpeg_buf->cbcr_len; - jpeg_buf32.num_of_mcu_rows = jpeg_buf->num_of_mcu_rows; - jpeg_buf32.offset = jpeg_buf->offset; - jpeg_buf32.pln2_off = jpeg_buf->pln2_off; - jpeg_buf32.pln2_len = jpeg_buf->pln2_len; - - if (copy_to_user(arg, &jpeg_buf32, sizeof(struct msm_jpeg_buf32))) { - JPEG_PR_ERR("%s:%d] failed\n", __func__, __LINE__); - return -EFAULT; - } - return 0; -} - -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - struct msm_jpeg_ctrl_cmd ctrl_cmd; - struct msm_jpeg_buf jpeg_buf; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET32: - rc = msm_jpeg_get_compat_ctrl_cmd(&ctrl_cmd, - (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) &ctrl_cmd); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET32: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE32: - rc = msm_jpeg_get_jpeg_buf(&jpeg_buf, (void __user *) arg); - if (rc < 0) - break; - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) &jpeg_buf); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET32: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) &jpeg_buf); - if (rc < 0) - break; - rc = msm_jpeg_put_jpeg_buf(&jpeg_buf, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET32: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) &ctrl_cmd); - if (rc < 0) - break; - msm_jpeg_put_compat_ctrl_cmd(&ctrl_cmd, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION32: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, - (void __user *) arg); - break; - - default: - JPEG_PR_ERR(KERN_INFO "%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#else -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - return 0; -} -#endif - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg) -{ - int rc = 0; - switch (cmd) { - case MSM_JPEG_IOCTL_GET_HW_VERSION: - JPEG_DBG("%s:%d] VERSION 1\n", __func__, __LINE__); - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_RESET: - rc = msm_jpeg_ioctl_reset(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_STOP: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - pgmn_dev->state = MSM_JPEG_STOPPED; - break; - - case MSM_JPEG_IOCTL_START: - rc = msm_jpeg_start(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE: - rc = msm_jpeg_input_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET: - rc = msm_jpeg_input_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK: - rc = msm_jpeg_input_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE: - rc = msm_jpeg_output_buf_enqueue(pgmn_dev, - (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET: - rc = msm_jpeg_output_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK: - rc = msm_jpeg_output_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_EVT_GET: - rc = msm_jpeg_evt_get(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_EVT_GET_UNBLOCK: - rc = msm_jpeg_evt_get_unblock(pgmn_dev); - break; - - case MSM_JPEG_IOCTL_HW_CMD: - rc = msm_jpeg_ioctl_hw_cmd(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_HW_CMDS: - rc = msm_jpeg_ioctl_hw_cmds(pgmn_dev, (void __user *) arg); - break; - - case MSM_JPEG_IOCTL_TEST_DUMP_REGION: - rc = msm_jpeg_ioctl_test_dump_region(pgmn_dev, arg); - break; - - case MSM_JPEG_IOCTL_SET_CLK_RATE: - rc = msm_jpeg_ioctl_set_clk_rate(pgmn_dev, (void __user *) arg); - break; - default: - pr_err_ratelimited("%s:%d] cmd = %d not supported\n", - __func__, __LINE__, _IOC_NR(cmd)); - rc = -EINVAL; - break; - } - return rc; -} -#ifdef CONFIG_MSM_IOMMU -static int camera_register_domain(void) -{ - struct msm_iova_partition camera_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - - struct msm_iova_layout camera_fw_layout = { - .partitions = &camera_fw_partition, - .npartitions = 1, - .client_name = "camera_jpeg", - .domain_flags = 0, - }; - return msm_register_domain(&camera_fw_layout); -} -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev) -{ - int rc = 0; - int idx = 0; -#ifdef CONFIG_MSM_IOMMU - int i = 0, j = 0; - char *iommu_name[JPEG_DEV_CNT] = {"jpeg_enc0", "jpeg_enc1", - "jpeg_dec"}; -#endif - - mutex_init(&pgmn_dev->lock); - - pr_err("%s:%d] Jpeg Device id %d", __func__, __LINE__, - pgmn_dev->pdev->id); - idx = pgmn_dev->pdev->id; - pgmn_dev->idx = idx; - pgmn_dev->iommu_cnt = 1; - pgmn_dev->decode_flag = (idx == JPEG_DEC_ID); - - msm_jpeg_q_init("evt_q", &pgmn_dev->evt_q); - msm_jpeg_q_init("output_rtn_q", &pgmn_dev->output_rtn_q); - msm_jpeg_q_init("output_buf_q", &pgmn_dev->output_buf_q); - msm_jpeg_q_init("input_rtn_q", &pgmn_dev->input_rtn_q); - msm_jpeg_q_init("input_buf_q", &pgmn_dev->input_buf_q); - -#ifdef CONFIG_MSM_IOMMU - j = (pgmn_dev->iommu_cnt <= 1) ? idx : 0; - /*get device context for IOMMU*/ - for (i = 0; i < pgmn_dev->iommu_cnt; i++) { - pgmn_dev->iommu_ctx_arr[i] = msm_iommu_get_ctx(iommu_name[j]); - JPEG_DBG("%s:%d] name %s", __func__, __LINE__, iommu_name[j]); - JPEG_DBG("%s:%d] ctx 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->iommu_ctx_arr[i]); - if (!pgmn_dev->iommu_ctx_arr[i]) { - JPEG_PR_ERR("%s: No iommu fw context found\n", - __func__); - goto error; - } - j++; - } - pgmn_dev->domain_num = camera_register_domain(); - JPEG_DBG("%s:%d] dom_num 0x%x", __func__, __LINE__, - pgmn_dev->domain_num); - if (pgmn_dev->domain_num < 0) { - JPEG_PR_ERR("%s: could not register domain\n", __func__); - goto error; - } - pgmn_dev->domain = msm_get_iommu_domain(pgmn_dev->domain_num); - JPEG_DBG("%s:%d] dom 0x%x", __func__, __LINE__, - (uint32_t)pgmn_dev->domain); - if (!pgmn_dev->domain) { - JPEG_PR_ERR("%s: cannot find domain\n", __func__); - goto error; - } -#endif - - return rc; -#ifdef CONFIG_MSM_IOMMU -error: -#endif - mutex_destroy(&pgmn_dev->lock); - return -EFAULT; -} - -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev) -{ - mutex_destroy(&pgmn_dev->lock); - kfree(pgmn_dev); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.h b/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.h deleted file mode 100644 index 1698f17175c0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/jpeg_10/msm_jpeg_sync.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - - - -#ifndef MSM_JPEG_SYNC_H -#define MSM_JPEG_SYNC_H - -#include -#include -#include -#include -#include -#include -#include "msm_jpeg_hw.h" - -#define JPEG_8974_V1 0x10000000 -#define JPEG_8974_V2 0x10010000 - -enum msm_jpeg_state { - MSM_JPEG_INIT, - MSM_JPEG_RESET, - MSM_JPEG_EXECUTING, - MSM_JPEG_STOPPED, - MSM_JPEG_IDLE -}; - -struct msm_jpeg_q { - char const *name; - struct list_head q; - spinlock_t lck; - wait_queue_head_t wait; - int unblck; -}; - -struct msm_jpeg_q_entry { - struct list_head list; - void *data; -}; - -struct msm_jpeg_device { - struct platform_device *pdev; - struct resource *mem; - int irq; - void *base; - struct clk *jpeg_clk[5]; - struct regulator *jpeg_fs; - uint32_t hw_version; - - struct device *device; - struct cdev cdev; - struct mutex lock; - char open_count; - uint8_t op_mode; - - /* event queue including frame done & err indications - */ - struct msm_jpeg_q evt_q; - - /* output return queue - */ - struct msm_jpeg_q output_rtn_q; - - /* output buf queue - */ - struct msm_jpeg_q output_buf_q; - - /* input return queue - */ - struct msm_jpeg_q input_rtn_q; - - /* input buf queue - */ - struct msm_jpeg_q input_buf_q; - - struct v4l2_subdev subdev; - - struct class *msm_jpeg_class; - - dev_t msm_jpeg_devno; - - /*iommu domain and context*/ - int domain_num; - int idx; - struct iommu_domain *domain; - struct device *iommu_ctx_arr[3]; - int iommu_cnt; - int decode_flag; - struct ion_client *jpeg_client; - void *jpeg_vbif; - int release_buf; - struct msm_jpeg_hw_pingpong fe_pingpong_buf; - struct msm_jpeg_hw_pingpong we_pingpong_buf; - int we_pingpong_index; - int reset_done_ack; - spinlock_t reset_lock; - wait_queue_head_t reset_wait; - uint32_t res_size; - uint32_t jpeg_bus_client; - uint32_t num_clk; - enum msm_jpeg_state state; -}; - -int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_release(struct msm_jpeg_device *pgmn_dev); - -long __msm_jpeg_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); - -#ifdef CONFIG_COMPAT -long __msm_jpeg_compat_ioctl(struct msm_jpeg_device *pgmn_dev, - unsigned int cmd, unsigned long arg); -#endif - -int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev); -int __msm_jpeg_exit(struct msm_jpeg_device *pgmn_dev); - -#endif /* MSM_JPEG_SYNC_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm.c b/drivers/media/platform/msm/camera_v2_j7lte/msm.c deleted file mode 100644 index ee9aa8da4b2a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm.c +++ /dev/null @@ -1,1204 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm.h" -#include "msm_vb2.h" -#include "msm_sd.h" -#include - - -static struct v4l2_device *msm_v4l2_dev; -static struct list_head ordered_sd_list; - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -static struct pm_qos_request msm_v4l2_pm_qos_request; -#endif - -static struct msm_queue_head *msm_session_q; - -/* config node envent queue */ -static struct v4l2_fh *msm_eventq; -spinlock_t msm_eventq_lock; - -static struct pid *msm_pid; -spinlock_t msm_pid_lock; -static int module_init_status; -struct msm_cam_dummy_queue { - wait_queue_head_t state_wait; -}; -static struct msm_cam_dummy_queue cam_dummy_queue; - -#define msm_dequeue(queue, type, member) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if ((node) && (&node->member) && (&node->member.next)) \ - list_del_init(&node->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - node; \ -}) - -#define msm_delete_sd_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node->sd == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_delete_entry(queue, type, member, q_node) ({ \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node == q_node) { \ - __q->len--; \ - list_del_init(&node->member); \ - kzfree(node); \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -}) - -#define msm_queue_drain(queue, type, member) do { \ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node; \ - spin_lock_irqsave(&__q->lock, flags); \ - while (!list_empty(&__q->list)) { \ - __q->len--; \ - node = list_first_entry(&__q->list, \ - type, member); \ - if (node) { \ - if (&node->member) \ - list_del_init(&node->member); \ - kzfree(node); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0); - -typedef int (*msm_queue_func)(void *d1, void *d2); -#define msm_queue_traverse_action(queue, type, member, func, data) do {\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - msm_queue_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if (node && __f) { \ - __f(node, data); \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ -} while (0) - -typedef int (*msm_queue_find_func)(void *d1, void *d2); -#define msm_queue_find(queue, type, member, func, data) ({\ - unsigned long flags; \ - struct msm_queue_head *__q = (queue); \ - type *node = 0; \ - typeof(node) __ret = NULL; \ - msm_queue_find_func __f = (func); \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - list_for_each_entry(node, &__q->list, member) \ - if ((__f) && __f(node, data)) { \ - __ret = node; \ - break; \ - } \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - __ret; \ -}) - -static void msm_init_queue(struct msm_queue_head *qhead) -{ - BUG_ON(!qhead); - - INIT_LIST_HEAD(&qhead->list); - spin_lock_init(&qhead->lock); - qhead->len = 0; - qhead->max = 0; -} - -static void msm_enqueue(struct msm_queue_head *qhead, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&qhead->lock, flags); - qhead->len++; - if (qhead->len > qhead->max) - qhead->max = qhead->len; - list_add_tail(entry, &qhead->list); - spin_unlock_irqrestore(&qhead->lock, flags); -} - -/* index = session id */ -static inline int __msm_queue_find_session(void *d1, void *d2) -{ - struct msm_session *session = d1; - return (session->session_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_stream(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - return (stream->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -static inline int __msm_queue_find_command_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *ack = d1; - return (ack->stream_id == *(unsigned int *)d2) ? 1 : 0; -} - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -static void msm_pm_qos_add_request(void) -{ - pr_err("%s: add request",__func__); - pm_qos_add_request(&msm_v4l2_pm_qos_request, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); -} - -static void msm_pm_qos_remove_request(void) -{ - pr_err("%s: remove request",__func__); - msm_v4l2_pm_qos_request.type = PM_QOS_REQ_AFFINE_CORES; - msm_v4l2_pm_qos_request.cpus_affine.bits[0] = 0xF0; - - pm_qos_remove_request(&msm_v4l2_pm_qos_request); -} - -void msm_pm_qos_update_request(int val) -{ - pr_err("%s: update request %d",__func__,val); - pm_qos_update_request(&msm_v4l2_pm_qos_request, val); -} -#endif - -struct msm_session *msm_session_find(unsigned int session_id) -{ - struct msm_session *session; - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) - return NULL; - return session; -} - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - stream = kzalloc(sizeof(*stream), GFP_KERNEL); - if (!stream) - return -ENOMEM; - - stream->stream_id = stream_id; - stream->vb2_q = q; - spin_lock_init(&stream->stream_lock); - msm_enqueue(&session->stream_q, &stream->list); - session->stream_q.len++; - - INIT_LIST_HEAD(&stream->queued_list); - - return 0; -} - -void msm_delete_stream(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session = NULL; - struct msm_stream *stream = NULL; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return; - spin_lock_irqsave(&(session->stream_q.lock), flags); - list_del_init(&stream->list); - session->stream_q.len--; - spin_unlock_irqrestore(&(session->stream_q.lock), flags); - kzfree(stream); -} - -static void msm_sd_unregister_subdev(struct video_device *vdev) -{ - struct v4l2_subdev *sd = video_get_drvdata(vdev); - sd->devnode = NULL; - kzfree(vdev); -} - -static inline int __msm_sd_register_subdev(struct v4l2_subdev *sd) -{ - int rc = 0; - struct video_device *vdev; - - if (!msm_v4l2_dev || !sd || !sd->name[0]) - return -EINVAL; - - rc = v4l2_device_register_subdev(msm_v4l2_dev, sd); - if (rc < 0) - return rc; - - /* Register a device node for every subdev marked with the - * V4L2_SUBDEV_FL_HAS_DEVNODE flag. - */ - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE)) - return rc; - - vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); - if (!vdev) { - rc = -ENOMEM; - goto clean_up; - } - - video_set_drvdata(vdev, sd); - strlcpy(vdev->name, sd->name, sizeof(vdev->name)); - vdev->v4l2_dev = msm_v4l2_dev; - vdev->fops = &v4l2_subdev_fops; - vdev->release = msm_sd_unregister_subdev; - rc = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1, - sd->owner); - if (rc < 0) { - kzfree(vdev); - goto clean_up; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - sd->entity.info.v4l.major = VIDEO_MAJOR; - sd->entity.info.v4l.minor = vdev->minor; - sd->entity.name = video_device_node_name(vdev); -#endif - sd->devnode = vdev; - return 0; - -clean_up: - if (sd->devnode) - video_unregister_device(sd->devnode); - return rc; -} - -static void msm_add_sd_in_position(struct msm_sd_subdev *msm_subdev, - struct list_head *sd_list) -{ - struct msm_sd_subdev *temp_sd; - - list_for_each_entry(temp_sd, sd_list, list) { - if (msm_subdev->close_seq < temp_sd->close_seq) { - list_add_tail(&msm_subdev->list, &temp_sd->list); - return; - } - } - list_add_tail(&msm_subdev->list, sd_list); -} - -int msm_sd_register(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - if (WARN_ON(!msm_v4l2_dev) || WARN_ON(!msm_v4l2_dev->dev)) - return -EIO; - - msm_add_sd_in_position(msm_subdev, &ordered_sd_list); - return __msm_sd_register_subdev(&msm_subdev->sd); -} - -int msm_sd_unregister(struct msm_sd_subdev *msm_subdev) -{ - if (WARN_ON(!msm_subdev)) - return -EINVAL; - - v4l2_device_unregister_subdev(&msm_subdev->sd); - return 0; -} - -int msm_cam_get_module_init_status(void) -{ - int rc; - pr_warn("msm_cam_get_module_init_status : start\n"); - if (module_init_status == 1) - return 0; - while (1) { - rc = wait_event_interruptible(cam_dummy_queue.state_wait, - (module_init_status == 1)); - if (rc == -ETIMEDOUT) - continue; - else if (rc == 0) - break; - } - pr_err("msm_cam_get_module_init_status : end %d\n", rc); - return 0; -} - -int msm_create_session(unsigned int session_id, struct video_device *vdev) -{ - struct msm_session *session = NULL; - - if (!msm_session_q) { - pr_err("%s : session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - session = kzalloc(sizeof(*session), GFP_KERNEL); - if (!session) { - pr_err("%s : Memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - session->session_id = session_id; - session->event_q.vdev = vdev; - msm_init_queue(&session->command_ack_q); - msm_init_queue(&session->stream_q); - msm_enqueue(msm_session_q, &session->list); - mutex_init(&session->lock); - mutex_init(&session->lock_q); - return 0; -} - -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - - if (!msm_session_q) { - pr_err("%s : Session queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) { - pr_err("%s : Session not found Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - mutex_lock(&session->lock); - cmd_ack = kzalloc(sizeof(*cmd_ack), GFP_KERNEL); - if (!cmd_ack) { - mutex_unlock(&session->lock); - pr_err("%s : memory not available Line %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - msm_init_queue(&cmd_ack->command_q); - INIT_LIST_HEAD(&cmd_ack->list); - init_completion(&cmd_ack->wait_complete); - cmd_ack->stream_id = stream_id; - - msm_enqueue(&session->command_ack_q, &cmd_ack->list); - session->command_ack_q.len++; - mutex_unlock(&session->lock); - return 0; -} - -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id) -{ - struct msm_session *session; - struct msm_command_ack *cmd_ack; - unsigned long flags; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return; - mutex_lock(&session->lock); - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, __msm_queue_find_command_ack_q, - &stream_id); - if (!cmd_ack) { - mutex_unlock(&session->lock); - return; - } - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - spin_lock_irqsave(&(session->command_ack_q.lock), flags); - list_del_init(&cmd_ack->list); - kzfree(cmd_ack); - session->command_ack_q.len--; - spin_unlock_irqrestore(&(session->command_ack_q.lock), flags); - mutex_unlock(&session->lock); -} - -static inline int __msm_sd_close_subdevs(struct msm_sd_subdev *msm_sd, - struct msm_sd_close_ioctl *sd_close) -{ - struct v4l2_subdev *sd; - sd = &msm_sd->sd; - pr_debug("%s: Shutting down subdev %s", __func__, sd->name); - - v4l2_subdev_call(sd, core, ioctl, MSM_SD_SHUTDOWN, sd_close); - v4l2_subdev_call(sd, core, s_power, 0); - - return 0; -} - -static inline int __msm_destroy_session_streams(void *d1, void *d2) -{ - struct msm_stream *stream = d1; - pr_err("%s: Error: Destroyed list is not empty\n", __func__); - INIT_LIST_HEAD(&stream->queued_list); - return 0; -} - -static void msm_destroy_session_streams(struct msm_session *session) -{ - - if (!session) - return; - - msm_queue_traverse_action(&session->stream_q, struct msm_stream, list, - __msm_destroy_session_streams, NULL); - - msm_queue_drain(&session->stream_q, struct msm_stream, list); -} - -static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2) -{ - struct msm_command_ack *cmd_ack = d1; - - if (!(&cmd_ack->command_q)) - return 0; - - msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); - - return 0; -} - -static void msm_remove_session_cmd_ack_q(struct msm_session *session) -{ - if ((!session) || !(&session->command_ack_q)) - return; - - mutex_lock(&session->lock); - /* to ensure error handling purpose, it needs to detach all subdevs - * which are being connected to streams */ - msm_queue_traverse_action(&session->command_ack_q, - struct msm_command_ack, list, - __msm_remove_session_cmd_ack_q, NULL); - - msm_queue_drain(&session->command_ack_q, struct msm_command_ack, list); - - mutex_unlock(&session->lock); -} - -int msm_destroy_session(unsigned int session_id) -{ - struct msm_session *session; - struct v4l2_subdev *buf_mgr_subdev; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return -EINVAL; - - msm_destroy_session_streams(session); - msm_remove_session_cmd_ack_q(session); - mutex_destroy(&session->lock); - mutex_destroy(&session->lock_q); - msm_delete_entry(msm_session_q, struct msm_session, - list, session); - buf_mgr_subdev = msm_buf_mngr_get_subdev(); - if (buf_mgr_subdev) { - v4l2_subdev_call(buf_mgr_subdev, core, ioctl, - MSM_SD_SHUTDOWN, NULL); - } else { - pr_err("%s: Buff manger device node is NULL\n", __func__); - } - - return 0; -} - -static int __msm_close_destry_session_notify_apps(void *d1, void *d2) -{ - struct v4l2_event event; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event.u.data[0]; - struct msm_session *session = d1; - - event.type = MSM_CAMERA_V4L2_EVENT_TYPE; - event.id = MSM_CAMERA_MSM_NOTIFY; - event_data->command = MSM_CAMERA_PRIV_SHUTDOWN; - - v4l2_event_queue(session->event_q.vdev, &event); - - return 0; -} - -static long msm_private_ioctl(struct file *file, void *fh, - bool valid_prio, unsigned int cmd, void *arg) -{ - int rc = 0; - struct msm_v4l2_event_data *event_data = arg; - struct v4l2_event event; - struct msm_session *session; - unsigned int session_id; - unsigned int stream_id; - unsigned long spin_flags = 0; - - if (cmd == MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS) { - module_init_status = *(int *) arg; - if (module_init_status) - wake_up(&cam_dummy_queue.state_wait); - return rc; - } - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - - if (!session) - return -EINVAL; - - switch (cmd) { - case MSM_CAM_V4L2_IOCTL_NOTIFY: { - if (WARN_ON(!session->event_q.vdev)) { - rc = -EFAULT; - break; - } - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - v4l2_event_queue(session->event_q.vdev, - &event); - } - break; - - case MSM_CAM_V4L2_IOCTL_CMD_ACK: { - struct msm_command_ack *cmd_ack; - struct msm_command *ret_cmd; - - ret_cmd = kzalloc(sizeof(*ret_cmd), GFP_KERNEL); - if (!ret_cmd) { - rc = -ENOMEM; - break; - } - - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, - &stream_id); - if (WARN_ON(!cmd_ack)) { - kzfree(ret_cmd); - rc = -EFAULT; - break; - } - - spin_lock_irqsave(&(session->command_ack_q.lock), - spin_flags); - event.type = event_data->v4l2_event_type; - event.id = event_data->v4l2_event_id; - memcpy(&event.u.data, event_data, - sizeof(struct msm_v4l2_event_data)); - memcpy(&ret_cmd->event, &event, sizeof(struct v4l2_event)); - msm_enqueue(&cmd_ack->command_q, &ret_cmd->list); - complete(&cmd_ack->wait_complete); - spin_unlock_irqrestore(&(session->command_ack_q.lock), - spin_flags); - } - break; - - case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR: - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, - struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - break; - - default: - rc = -ENOTTY; - break; - } - - return rc; -} - -static int msm_unsubscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static int msm_subscribe_event(struct v4l2_fh *fh, - const struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, 5, NULL); -} - -static const struct v4l2_ioctl_ops g_msm_ioctl_ops = { - .vidioc_subscribe_event = msm_subscribe_event, - .vidioc_unsubscribe_event = msm_unsubscribe_event, - .vidioc_default = msm_private_ioctl, -}; - -static unsigned int msm_poll(struct file *f, - struct poll_table_struct *pll_table) -{ - int rc = 0; - struct v4l2_fh *eventq = f->private_data; - - BUG_ON(!eventq); - - poll_wait(f, &eventq->wait, pll_table); - - if (v4l2_event_pending(eventq)) - rc = POLLIN | POLLRDNORM; - - return rc; -} - -static void msm_print_event_error(struct v4l2_event *event) -{ - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - - pr_err("Evt_type=%x Evt_id=%d Evt_cmd=%x\n", event->type, - event->id, event_data->command); - pr_err("Evt_session_id=%d Evt_stream_id=%d Evt_arg=%d\n", - event_data->session_id, event_data->stream_id, - event_data->arg_value); -} - -/* something seriously wrong if msm_close is triggered - * !!! user space imaging server is shutdown !!! - */ -int msm_post_event(struct v4l2_event *event, int timeout) -{ - int rc = 0; - struct video_device *vdev; - struct msm_session *session; - struct msm_v4l2_event_data *event_data = - (struct msm_v4l2_event_data *)&event->u.data[0]; - struct msm_command_ack *cmd_ack; - struct msm_command *cmd; - int session_id, stream_id; - unsigned long flags = 0; - int wait_count = 2000; - - session_id = event_data->session_id; - stream_id = event_data->stream_id; - - spin_lock_irqsave(&msm_eventq_lock, flags); - if (!msm_eventq) { - spin_unlock_irqrestore(&msm_eventq_lock, flags); - pr_err("%s : msm event queue not available Line %d\n", - __func__, __LINE__); - return -ENODEV; - } - spin_unlock_irqrestore(&msm_eventq_lock, flags); - - vdev = msm_eventq->vdev; - - /* send to imaging server and wait for ACK */ - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (WARN_ON(!session)) { - pr_err("%s : session not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - mutex_lock(&session->lock); - cmd_ack = msm_queue_find(&session->command_ack_q, - struct msm_command_ack, list, - __msm_queue_find_command_ack_q, &stream_id); - if (WARN_ON(!cmd_ack)) { - mutex_unlock(&session->lock); - pr_err("%s : cmd_ack not found Line %d\n", - __func__, __LINE__); - return -EIO; - } - - /*re-init wait_complete */ - INIT_COMPLETION(cmd_ack->wait_complete); - - v4l2_event_queue(vdev, event); - - if (timeout < 0) { - mutex_unlock(&session->lock); - pr_err("%s : timeout cannot be negative Line %d\n", - __func__, __LINE__); - return rc; - } - - /* should wait on session based condition */ - do { - rc = wait_for_completion_timeout(&cmd_ack->wait_complete, - msecs_to_jiffies(timeout)); - wait_count--; - if(rc != -ERESTARTSYS) - break; - usleep(1000); /* wait for 2ms */ - } while(wait_count > 0); - - if (list_empty_careful(&cmd_ack->command_q.list)) { - if (!rc) { - pr_err("%s: Timed out\n", __func__); - msm_print_event_error(event); - rc = -ETIMEDOUT; - } else { - pr_err("%s: Error: No timeout but list empty!", - __func__); - msm_print_event_error(event); - mutex_unlock(&session->lock); - return -EINVAL; - } - } - - cmd = msm_dequeue(&cmd_ack->command_q, - struct msm_command, list); - if (!cmd) { - mutex_unlock(&session->lock); - pr_err("%s : cmd dequeue failed Line %d\n", - __func__, __LINE__); - return -EINVAL; - } - - event_data = (struct msm_v4l2_event_data *)cmd->event.u.data; - - /* compare cmd_ret and event */ - if (WARN_ON(event->type != cmd->event.type) || - WARN_ON(event->id != cmd->event.id)) { - pr_err("%s : Either event type or id didnot match Line %d\n", - __func__, __LINE__); - pr_err("%s : event->type %d event->id %d\n", __func__, - event->type, event->id); - pr_err("%s : cmd->event.type %d cmd->event.id %d\n", __func__, - cmd->event.type, cmd->event.id); - rc = -EINVAL; - } - - *event = cmd->event; - - kzfree(cmd); - mutex_unlock(&session->lock); - return rc; -} - -static int msm_close(struct file *filep) -{ - int rc = 0; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - struct msm_sd_close_ioctl sd_close; - struct msm_sd_subdev *msm_sd; - - /*stop all hardware blocks immediately*/ - if (!list_empty(&msm_v4l2_dev->subdevs)) - list_for_each_entry(msm_sd, &ordered_sd_list, list) - __msm_sd_close_subdevs(msm_sd, &sd_close); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* remove msm_v4l2_pm_qos_request */ - msm_pm_qos_remove_request(); -#endif - - /* send v4l2_event to HAL next*/ - msm_queue_traverse_action(msm_session_q, struct msm_session, list, - __msm_close_destry_session_notify_apps, NULL); - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = NULL; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - v4l2_fh_release(filep); - - spin_lock_irqsave(&msm_pid_lock, flags); - put_pid(msm_pid); - msm_pid = NULL; - spin_unlock_irqrestore(&msm_pid_lock, flags); - - atomic_set(&pvdev->opened, 0); - - return rc; -} - -static inline void msm_list_switch(struct list_head *l1, - struct list_head *l2) -{ - l1->next = l2->next; - l2->prev = l1->prev; - l1->prev->next = l2; - l2->next->prev = l1; - l1->prev = l2; - l2->next = l1; -} - -static int msm_open(struct file *filep) -{ - int rc; - unsigned long flags; - struct msm_video_device *pvdev = video_drvdata(filep); - BUG_ON(!pvdev); - - /* !!! only ONE open is allowed !!! */ - if (atomic_read(&pvdev->opened)) - return -EBUSY; - - atomic_set(&pvdev->opened, 1); - - spin_lock_irqsave(&msm_pid_lock, flags); - msm_pid = get_pid(task_pid(current)); - spin_unlock_irqrestore(&msm_pid_lock, flags); - - /* create event queue */ - rc = v4l2_fh_open(filep); - if (rc < 0) - return rc; - - spin_lock_irqsave(&msm_eventq_lock, flags); - msm_eventq = filep->private_data; - spin_unlock_irqrestore(&msm_eventq_lock, flags); - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) - /* register msm_v4l2_pm_qos_request */ - msm_pm_qos_add_request(); -#endif - - return rc; -} - -static struct v4l2_file_operations msm_fops = { - .owner = THIS_MODULE, - .open = msm_open, - .poll = msm_poll, - .release = msm_close, - .ioctl = video_ioctl2, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = video_ioctl2, -#endif -}; - -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return ERR_PTR(-EINVAL); - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - - if (!stream) - return ERR_PTR(-EINVAL); - - return stream; -} - -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id) -{ - struct msm_session *session; - struct msm_stream *stream; - - session = msm_queue_find(msm_session_q, struct msm_session, - list, __msm_queue_find_session, &session_id); - if (!session) - return NULL; - - stream = msm_queue_find(&session->stream_q, struct msm_stream, - list, __msm_queue_find_stream, &stream_id); - if (!stream) - return NULL; - - return stream->vb2_q; -} - -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q) -{ - struct msm_session *session; - struct msm_stream *stream; - unsigned long flags1; - unsigned long flags2; - spin_lock_irqsave(&msm_session_q->lock, flags1); - list_for_each_entry(session, &(msm_session_q->list), list) { - spin_lock_irqsave(&(session->stream_q.lock), flags2); - list_for_each_entry( - stream, &(session->stream_q.list), list) { - if (stream->vb2_q == q) { - spin_unlock_irqrestore - (&(session->stream_q.lock), flags2); - spin_unlock_irqrestore - (&msm_session_q->lock, flags1); - return stream; - } - } - spin_unlock_irqrestore(&(session->stream_q.lock), flags2); - } - spin_unlock_irqrestore(&msm_session_q->lock, flags1); - return NULL; -} - -static struct v4l2_subdev *msm_sd_find(const char *name) -{ - unsigned long flags; - struct v4l2_subdev *subdev = NULL; - struct v4l2_subdev *subdev_out = NULL; - - spin_lock_irqsave(&msm_v4l2_dev->lock, flags); - if (!list_empty(&msm_v4l2_dev->subdevs)) { - list_for_each_entry(subdev, &msm_v4l2_dev->subdevs, list) - if (!strcmp(name, subdev->name)) { - subdev_out = subdev; - break; - } - } - spin_unlock_irqrestore(&msm_v4l2_dev->lock, flags); - - return subdev_out; -} - -static void msm_sd_notify(struct v4l2_subdev *sd, - unsigned int notification, void *arg) -{ - int rc = 0; - struct v4l2_subdev *subdev = NULL; - - BUG_ON(!sd); - BUG_ON(!arg); - - /* Check if subdev exists before processing*/ - if (!msm_sd_find(sd->name)) - return; - - switch (notification) { - case MSM_SD_NOTIFY_GET_SD: { - struct msm_sd_req_sd *get_sd = arg; - - get_sd->subdev = msm_sd_find(get_sd->name); - /* TODO: might need to add ref count on ret_sd */ - } - break; - - case MSM_SD_NOTIFY_PUT_SD: { - struct msm_sd_req_sd *put_sd = arg; - subdev = msm_sd_find(put_sd->name); - } - break; - - case MSM_SD_NOTIFY_REQ_CB: { - struct msm_sd_req_vb2_q *req_sd = arg; - rc = msm_vb2_request_cb(req_sd); - if (rc < 0) - return; - } - break; - - default: - break; - } -} - -static int msm_probe(struct platform_device *pdev) -{ - struct msm_video_device *pvdev; - int rc = 0; - - msm_v4l2_dev = kzalloc(sizeof(*msm_v4l2_dev), - GFP_KERNEL); - if (WARN_ON(!msm_v4l2_dev)) { - rc = -ENOMEM; - goto probe_end; - } - - pvdev = kzalloc(sizeof(struct msm_video_device), - GFP_KERNEL); - if (WARN_ON(!pvdev)) { - rc = -ENOMEM; - goto pvdev_fail; - } - - pvdev->vdev = video_device_alloc(); - if (WARN_ON(!pvdev->vdev)) { - rc = -ENOMEM; - goto video_fail; - } - -#if defined(CONFIG_MEDIA_CONTROLLER) - msm_v4l2_dev->mdev = kzalloc(sizeof(struct media_device), - GFP_KERNEL); - if (!msm_v4l2_dev->mdev) { - rc = -ENOMEM; - goto mdev_fail; - } - strlcpy(msm_v4l2_dev->mdev->model, MSM_CONFIGURATION_NAME, - sizeof(msm_v4l2_dev->mdev->model)); - msm_v4l2_dev->mdev->dev = &(pdev->dev); - - rc = media_device_register(msm_v4l2_dev->mdev); - if (WARN_ON(rc < 0)) - goto media_fail; - - if (WARN_ON((rc == media_entity_init(&pvdev->vdev->entity, - 0, NULL, 0)) < 0)) - goto entity_fail; - - pvdev->vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; - pvdev->vdev->entity.group_id = QCAMERA_VNODE_GROUP_ID; -#endif - - msm_v4l2_dev->notify = msm_sd_notify; - - pvdev->vdev->v4l2_dev = msm_v4l2_dev; - - rc = v4l2_device_register(&(pdev->dev), pvdev->vdev->v4l2_dev); - if (WARN_ON(rc < 0)) - goto register_fail; - - strlcpy(pvdev->vdev->name, "msm-config", sizeof(pvdev->vdev->name)); - pvdev->vdev->release = video_device_release; - pvdev->vdev->fops = &msm_fops; - pvdev->vdev->ioctl_ops = &g_msm_ioctl_ops; - pvdev->vdev->minor = -1; - pvdev->vdev->vfl_type = VFL_TYPE_GRABBER; - rc = video_register_device(pvdev->vdev, - VFL_TYPE_GRABBER, -1); - if (WARN_ON(rc < 0)) - goto v4l2_fail; - -#if defined(CONFIG_MEDIA_CONTROLLER) - /* FIXME: How to get rid of this messy? */ - pvdev->vdev->entity.name = video_device_node_name(pvdev->vdev); -#endif - - atomic_set(&pvdev->opened, 0); - video_set_drvdata(pvdev->vdev, pvdev); - - msm_session_q = kzalloc(sizeof(*msm_session_q), GFP_KERNEL); - if (WARN_ON(!msm_session_q)) - goto v4l2_fail; - - msm_init_queue(msm_session_q); - spin_lock_init(&msm_eventq_lock); - spin_lock_init(&msm_pid_lock); - INIT_LIST_HEAD(&ordered_sd_list); - init_waitqueue_head(&cam_dummy_queue.state_wait); - goto probe_end; - -v4l2_fail: - v4l2_device_unregister(pvdev->vdev->v4l2_dev); -register_fail: -#if defined(CONFIG_MEDIA_CONTROLLER) - media_entity_cleanup(&pvdev->vdev->entity); -entity_fail: - media_device_unregister(msm_v4l2_dev->mdev); -media_fail: - kzfree(msm_v4l2_dev->mdev); -mdev_fail: -#endif - video_device_release(pvdev->vdev); -video_fail: - kzfree(pvdev); -pvdev_fail: - kzfree(msm_v4l2_dev); -probe_end: - return rc; -} - -static const struct of_device_id msm_dt_match[] = { - {.compatible = "qcom,msm-cam"}, - {} -} - -MODULE_DEVICE_TABLE(of, msm_dt_match); - -static struct platform_driver msm_driver = { - .probe = msm_probe, - .driver = { - .name = "msm", - .owner = THIS_MODULE, - .of_match_table = msm_dt_match, - }, -}; - -static int __init msm_init(void) -{ - return platform_driver_register(&msm_driver); -} - -static void __exit msm_exit(void) -{ - platform_driver_unregister(&msm_driver); -} - - -module_init(msm_init); -module_exit(msm_exit); -MODULE_DESCRIPTION("MSM V4L2 Camera"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm.h b/drivers/media/platform/msm/camera_v2_j7lte/msm.h deleted file mode 100644 index ca07c0419458..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_H -#define _MSM_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/media/msmb_camera.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define MSM_POST_EVT_TIMEOUT 40000 -#else -#define MSM_POST_EVT_TIMEOUT 5000 -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -enum CAMERA_TUNING -{ -NORMAL_MODE, -REAR_TUNING, -FRONT_TUNING, -REAR_FRONT_TUNING -}; -#endif - -#define MSM_POST_EVT_NOTIMEOUT 0xFFFFFFFF -#define MSM_CAMERA_STREAM_CNT_BITS 32 - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -#define CAMERA_DISABLE_PC_LATENCY 200 -#define CAMERA_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE -#endif - -struct msm_video_device { - struct video_device *vdev; - atomic_t opened; -}; - -struct msm_queue_head { - struct list_head list; - spinlock_t lock; - int len; - int max; -}; - -/** msm_event: - * - * event sent by imaging server - **/ -struct msm_event { - struct video_device *vdev; - atomic_t on_heap; -}; - -struct msm_command { - struct list_head list; - struct v4l2_event event; - atomic_t on_heap; -}; - -/** struct msm_command_ack - * - * Object of command_ack_q, which is - * created per open operation - * - * contains struct msm_command - **/ -struct msm_command_ack { - struct list_head list; - struct msm_queue_head command_q; - struct completion wait_complete; - int stream_id; -}; - -struct msm_v4l2_subdev { - /* FIXME: for session close and error handling such - * as daemon shutdown */ - int close_sequence; -}; - -struct msm_session { - struct list_head list; - - /* session index */ - unsigned int session_id; - - /* event queue sent by imaging server */ - struct msm_event event_q; - - /* ACK by imaging server. Object type of - * struct msm_command_ack per open, - * assumption is application can send - * command on every opened video node */ - struct msm_queue_head command_ack_q; - - /* real streams(either data or metadate) owned by one - * session struct msm_stream */ - struct msm_queue_head stream_q; - struct mutex lock; - struct mutex lock_q; -}; - -#if !defined(CONFIG_ARCH_MSM8939) && !defined(CONFIG_ARCH_MSM8929) -void msm_pm_qos_update_request(int val); -#endif - -int msm_cam_get_module_init_status(void); -int msm_post_event(struct v4l2_event *event, int timeout); -int msm_create_session(unsigned int session, struct video_device *vdev); -int msm_destroy_session(unsigned int session_id); - -int msm_create_stream(unsigned int session_id, - unsigned int stream_id, struct vb2_queue *q); -void msm_delete_stream(unsigned int session_id, unsigned int stream_id); -int msm_create_command_ack_q(unsigned int session_id, unsigned int stream_id); -void msm_delete_command_ack_q(unsigned int session_id, unsigned int stream_id); -struct msm_stream *msm_get_stream(unsigned int session_id, - unsigned int stream_id); -struct vb2_queue *msm_get_stream_vb2q(unsigned int session_id, - unsigned int stream_id); -struct msm_stream *msm_get_stream_from_vb2q(struct vb2_queue *q); -struct msm_session *msm_session_find(unsigned int session_id); -#endif /*_MSM_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/Makefile deleted file mode 100644 index a527c122b631..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -obj-$(CONFIG_MSMB_CAMERA) += msm_generic_buf_mgr.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.c b/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.c deleted file mode 100644 index eb385616d75d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.c +++ /dev/null @@ -1,352 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include "msm_generic_buf_mgr.h" - -static struct msm_buf_mngr_device *msm_buf_mngr_dev; - -struct v4l2_subdev *msm_buf_mngr_get_subdev(void) -{ - return &msm_buf_mngr_dev->subdev.sd; -} - -static int32_t msm_buf_mngr_get_buf(struct msm_buf_mngr_device *buf_mngr_dev, - void __user *argp) -{ - unsigned long flags; - struct msm_buf_mngr_info *buf_info = - (struct msm_buf_mngr_info *)argp; - struct msm_get_bufs *new_entry = - kzalloc(sizeof(struct msm_get_bufs), GFP_KERNEL); - - if (!new_entry) { - pr_err("%s:No mem\n", __func__); - return -ENOMEM; - } - INIT_LIST_HEAD(&new_entry->entry); - new_entry->vb2_buf = buf_mngr_dev->vb2_ops.get_buf(buf_info->session_id, - buf_info->stream_id); - if (!new_entry->vb2_buf) { - pr_debug("%s:Get buf is null\n", __func__); - kfree(new_entry); - return -EINVAL; - } - new_entry->session_id = buf_info->session_id; - new_entry->stream_id = buf_info->stream_id; - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_add_tail(&new_entry->entry, &buf_mngr_dev->buf_qhead); - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - buf_info->index = new_entry->vb2_buf->v4l2_buf.index; - return 0; -} - -static int32_t msm_buf_mngr_buf_done(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - bufs->vb2_buf->v4l2_buf.sequence = buf_info->frame_id; - bufs->vb2_buf->v4l2_buf.timestamp = buf_info->timestamp; - bufs->vb2_buf->v4l2_buf.reserved = 0; - ret = buf_mngr_dev->vb2_ops.buf_done - (bufs->vb2_buf, - buf_info->session_id, - buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - - -static int32_t msm_buf_mngr_put_buf(struct msm_buf_mngr_device *buf_mngr_dev, - struct msm_buf_mngr_info *buf_info) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - int32_t ret = -EINVAL; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - list_for_each_entry_safe(bufs, save, &buf_mngr_dev->buf_qhead, entry) { - if ((bufs->session_id == buf_info->session_id) && - (bufs->stream_id == buf_info->stream_id) && - (bufs->vb2_buf->v4l2_buf.index == buf_info->index)) { - ret = buf_mngr_dev->vb2_ops.put_buf(bufs->vb2_buf, - buf_info->session_id, buf_info->stream_id); - list_del_init(&bufs->entry); - kfree(bufs); - break; - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); - return ret; -} - -static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *buf_mngr_dev) -{ - unsigned long flags; - struct msm_get_bufs *bufs, *save; - - spin_lock_irqsave(&buf_mngr_dev->buf_q_spinlock, flags); - if (!list_empty(&buf_mngr_dev->buf_qhead)) { - list_for_each_entry_safe(bufs, - save, &buf_mngr_dev->buf_qhead, entry) { - pr_err("%s: Error delete invalid bufs =%x, ses_id=%d, str_id=%d, idx=%d\n", - __func__, (unsigned int)bufs, bufs->session_id, - bufs->stream_id, bufs->vb2_buf->v4l2_buf.index); - list_del_init(&bufs->entry); - kfree(bufs); - } - } - spin_unlock_irqrestore(&buf_mngr_dev->buf_q_spinlock, flags); -} - -static int msm_generic_buf_mngr_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static int msm_generic_buf_mngr_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) -{ - int rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENODEV; - return rc; - } - return rc; -} - -static long msm_buf_mngr_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_buf_mngr_device *buf_mngr_dev = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - - if (!buf_mngr_dev) { - pr_err("%s buf manager device NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - rc = msm_buf_mngr_get_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - rc = msm_buf_mngr_buf_done(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = msm_buf_mngr_put_buf(buf_mngr_dev, argp); - break; - case VIDIOC_MSM_BUF_MNGR_INIT: - rc = msm_generic_buf_mngr_open(sd, NULL); - break; - case VIDIOC_MSM_BUF_MNGR_DEINIT: - rc = msm_generic_buf_mngr_close(sd, NULL); - break; - case MSM_SD_SHUTDOWN: - msm_buf_mngr_sd_shutdown(buf_mngr_dev); - break; - default: - return -ENOIOCTLCMD; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - int32_t rc = 0; - - void __user *up = compat_ptr(arg); - - struct msm_buf_mngr_info32_t *buf_info32 = NULL; - struct msm_buf_mngr_info *buf_info; - - if (copy_from_user(buf_info32, (void __user *)up, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - buf_info->session_id = buf_info32->session_id; - buf_info->stream_id = buf_info32->stream_id; - buf_info->frame_id = buf_info32->frame_id; - buf_info->index = buf_info32->index; - buf_info->timestamp.tv_sec = (long) buf_info32->timestamp.tv_sec; - buf_info->timestamp.tv_usec = (long) buf_info32->timestamp.tv_usec; - - /* Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's - * except VIDIOC_MSM_CPP_CFG32, which needs special - * processing - */ - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_GET_BUF; - break; - case VIDIOC_MSM_BUF_MNGR_BUF_DONE32: - cmd = VIDIOC_MSM_BUF_MNGR_BUF_DONE; - break; - case VIDIOC_MSM_BUF_MNGR_PUT_BUF32: - cmd = VIDIOC_MSM_BUF_MNGR_PUT_BUF; - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - switch (cmd) { - case VIDIOC_MSM_BUF_MNGR_GET_BUF: - case VIDIOC_MSM_BUF_MNGR_BUF_DONE: - case VIDIOC_MSM_BUF_MNGR_PUT_BUF: - rc = v4l2_subdev_call(sd, core, ioctl, cmd, buf_info); - break; - default: - pr_debug("%s : unsupported compat type", __func__); - break; - } - - buf_info32->session_id = buf_info->session_id; - buf_info32->stream_id = buf_info->stream_id; - buf_info32->index = buf_info->index; - buf_info32->timestamp.tv_sec = (int32_t) buf_info->timestamp.tv_sec; - buf_info32->timestamp.tv_usec = (int32_t) buf_info->timestamp.tv_usec; - - if (copy_to_user((void __user *)up, buf_info32, - sizeof(struct msm_buf_mngr_info32_t))) - return -EFAULT; - - return 0; -} -#endif - -static struct v4l2_subdev_core_ops msm_buf_mngr_subdev_core_ops = { - .ioctl = msm_buf_mngr_subdev_ioctl, -}; - -static const struct v4l2_subdev_internal_ops - msm_generic_buf_mngr_subdev_internal_ops = { - .open = msm_generic_buf_mngr_open, - .close = msm_generic_buf_mngr_close, -}; - -static const struct v4l2_subdev_ops msm_buf_mngr_subdev_ops = { - .core = &msm_buf_mngr_subdev_core_ops, -}; - -static const struct of_device_id msm_buf_mngr_dt_match[] = { - {.compatible = "qcom,msm_buf_mngr"}, - {} -}; - -static struct v4l2_file_operations msm_buf_v4l2_subdev_fops; - -static long msm_bmgr_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); -} - - -static long msm_buf_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_bmgr_subdev_do_ioctl); -} - -static int32_t __init msm_buf_mngr_init(void) -{ - int32_t rc = 0; - msm_buf_mngr_dev = kzalloc(sizeof(*msm_buf_mngr_dev), - GFP_KERNEL); - if (WARN_ON(!msm_buf_mngr_dev)) { - pr_err("%s: not enough memory", __func__); - return -ENOMEM; - } - /* Sub-dev */ - v4l2_subdev_init(&msm_buf_mngr_dev->subdev.sd, - &msm_buf_mngr_subdev_ops); - - msm_buf_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_buf_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_buf_v4l2_subdev_fops.unlocked_ioctl = msm_buf_subdev_fops_ioctl; - msm_buf_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_buf_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - -#ifdef CONFIG_COMPAT - msm_buf_v4l2_subdev_fops.compat_ioctl32 = - msm_bmgr_subdev_fops_compat_ioctl; -#endif - snprintf(msm_buf_mngr_dev->subdev.sd.name, - ARRAY_SIZE(msm_buf_mngr_dev->subdev.sd.name), "msm_buf_mngr"); - msm_buf_mngr_dev->subdev.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - v4l2_set_subdevdata(&msm_buf_mngr_dev->subdev.sd, msm_buf_mngr_dev); - - media_entity_init(&msm_buf_mngr_dev->subdev.sd.entity, 0, NULL, 0); - msm_buf_mngr_dev->subdev.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_buf_mngr_dev->subdev.sd.entity.group_id = - MSM_CAMERA_SUBDEV_BUF_MNGR; - msm_buf_mngr_dev->subdev.sd.internal_ops = - &msm_generic_buf_mngr_subdev_internal_ops; - msm_buf_mngr_dev->subdev.close_seq = MSM_SD_CLOSE_4TH_CATEGORY; - rc = msm_sd_register(&msm_buf_mngr_dev->subdev); - if (rc != 0) { - pr_err("%s: msm_sd_register error = %d\n", __func__, rc); - goto end; - } - - msm_buf_mngr_dev->subdev.sd.devnode->fops = &msm_buf_v4l2_subdev_fops; - - v4l2_subdev_notify(&msm_buf_mngr_dev->subdev.sd, MSM_SD_NOTIFY_REQ_CB, - &msm_buf_mngr_dev->vb2_ops); - - INIT_LIST_HEAD(&msm_buf_mngr_dev->buf_qhead); - spin_lock_init(&msm_buf_mngr_dev->buf_q_spinlock); -end: - return rc; -} - -static void __exit msm_buf_mngr_exit(void) -{ - kfree(msm_buf_mngr_dev); -} - -module_init(msm_buf_mngr_init); -module_exit(msm_buf_mngr_exit); -MODULE_DESCRIPTION("MSM Buffer Manager"); -MODULE_LICENSE("GPL v2"); - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.h b/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.h deleted file mode 100644 index 754c8a078960..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_buf_mgr/msm_generic_buf_mgr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_BUF_GENERIC_MNGR_H__ -#define __MSM_BUF_GENERIC_MNGR_H__ - -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include - -#include "msm.h" -#include "msm_sd.h" - -struct msm_get_bufs { - struct list_head entry; - struct vb2_buffer *vb2_buf; - uint32_t session_id; - uint32_t stream_id; -}; - -struct msm_buf_mngr_device { - struct list_head buf_qhead; - spinlock_t buf_q_spinlock; - struct msm_sd_subdev subdev; - struct msm_sd_req_vb2_q vb2_ops; -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_sd.h b/drivers/media/platform/msm/camera_v2_j7lte/msm_sd.h deleted file mode 100644 index 9ab74f4a6ce1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_sd.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_SD_H -#define _MSM_SD_H - -#include -#include "include/media/msmb_camera.h" - -/* NOTE: this header file should ONLY be included by subdev drivers */ - -struct msm_sd_close_ioctl { - unsigned int session; - unsigned int stream; -}; - -#define MSM_SD_CLOSE_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 26, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 27, struct msm_sd_close_ioctl) - -#define MSM_SD_CLOSE_SESSION_AND_STREAM \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 28, struct msm_sd_close_ioctl) - -#define MSM_SD_SHUTDOWN \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 29, struct msm_sd_close_ioctl) - -/* - * This is used to install Sequence in msm_sd_register. - * During msm_close, proper close sequence will be triggered. - * For example: - * - * close_sequence = 0x00100001 (ISP) - * close_sequence = 0x00100002 (ISP) - * close_sequence = 0x00100003 (ISP) - * close_sequence = 0x00200001 (sensor) - * close_sequence = 0x00200002 (sensor) - * close_sequence = 0x00200003 (sensor) - */ -#define MSM_SD_CLOSE_1ST_CATEGORY 0x00010000 -#define MSM_SD_CLOSE_2ND_CATEGORY 0x00020000 -#define MSM_SD_CLOSE_3RD_CATEGORY 0x00030000 -#define MSM_SD_CLOSE_4TH_CATEGORY 0x00040000 - -struct msm_sd_subdev { - struct v4l2_subdev sd; - int close_seq; - struct list_head list; -}; - -struct msm_sd_req_sd { - char *name; - struct v4l2_subdev *subdev; -}; - -struct msm_sd_req_vb2_q { - struct vb2_buffer *(*get_buf)(int session_id, unsigned int stream_id); - struct vb2_queue *(*get_vb2_queue)(int session_id, - unsigned int stream_id); - int (*put_buf)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); - int (*buf_done)(struct vb2_buffer *vb2_buf, int session_id, - unsigned int stream_id); -}; - -#define MSM_SD_NOTIFY_GET_SD 0x00000001 -#define MSM_SD_NOTIFY_PUT_SD 0x00000002 -#define MSM_SD_NOTIFY_REQ_CB 0x00000003 - -int msm_sd_register(struct msm_sd_subdev *msm_subdev); -int msm_sd_unregister(struct msm_sd_subdev *sd); -struct v4l2_subdev *msm_sd_get_subdev(struct v4l2_subdev *sd, - const char *get_name); -void msm_sd_put_subdev(struct v4l2_subdev *sd, struct v4l2_subdev *put); - -#endif /*_MSM_SD_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/Makefile deleted file mode 100644 index c2fc3bc03b09..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/msm_vb2 -obj-$(CONFIG_MSMB_CAMERA) += msm_vb2.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.c b/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.c deleted file mode 100644 index 6e9336a20d29..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "msm_vb2.h" - -static int msm_vb2_queue_setup(struct vb2_queue *q, - const struct v4l2_format *fmt, - unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) -{ - int i; - struct msm_v4l2_format_data *data = q->drv_priv; - - if (!data) { - pr_err("%s: drv_priv NULL\n", __func__); - return -EINVAL; - } - if (data->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { - if (WARN_ON(data->num_planes > VIDEO_MAX_PLANES)) - return -EINVAL; - - *num_planes = data->num_planes; - - for (i = 0; i < data->num_planes; i++) - sizes[i] = data->plane_sizes[i]; - } else { - pr_err("%s: Unsupported buf type :%d\n", __func__, - data->type); - return -EINVAL; - } - return 0; -} - -int msm_vb2_buf_init(struct vb2_buffer *vb) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2_buf; - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s: Couldn't find stream\n", __func__); - return -EINVAL; - } - msm_vb2_buf = container_of(vb, struct msm_vb2_buffer, vb2_buf); - msm_vb2_buf->in_freeq = 0; - - return 0; -} - -static void msm_vb2_buf_queue(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_add_tail(&msm_vb2->list, &stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static int msm_vb2_buf_finish(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - struct msm_vb2_buffer *msm_vb2_entry, *temp; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2_buf NULL", __func__, __LINE__); - return -EINVAL; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return -EINVAL; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - list_for_each_entry_safe(msm_vb2_entry, temp, &(stream->queued_list), - list) { - if (msm_vb2_entry == msm_vb2) { - list_del_init(&msm_vb2_entry->list); - break; - } - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return 0; -} - -static void msm_vb2_buf_cleanup(struct vb2_buffer *vb) -{ - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - unsigned long flags; - - msm_vb2 = container_of(vb, struct msm_vb2_buffer, vb2_buf); - - if (!msm_vb2) { - pr_err("%s:%d] vb2 NULL", __func__, __LINE__); - return; - } - - stream = msm_get_stream_from_vb2q(vb->vb2_queue); - if (!stream) { - pr_err("%s:%d] NULL stream", __func__, __LINE__); - return; - } - - spin_lock_irqsave(&stream->stream_lock, flags); - INIT_LIST_HEAD(&stream->queued_list); - spin_unlock_irqrestore(&stream->stream_lock, flags); -} - -static struct vb2_ops msm_vb2_get_q_op = { - .queue_setup = msm_vb2_queue_setup, - .buf_init = msm_vb2_buf_init, - .buf_queue = msm_vb2_buf_queue, - .buf_cleanup = msm_vb2_buf_cleanup, - .buf_finish = msm_vb2_buf_finish, -}; - - -struct vb2_ops *msm_vb2_get_q_ops(void) -{ - return &msm_vb2_get_q_op; -} - -static void *msm_vb2_dma_contig_get_userptr(void *alloc_ctx, - unsigned long vaddr, unsigned long size, int write) -{ - struct msm_vb2_private_data *priv; - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) - return ERR_PTR(-ENOMEM); - priv->vaddr = (void *)vaddr; - priv->size = size; - priv->alloc_ctx = alloc_ctx; - return priv; -} - -static void msm_vb2_dma_contig_put_userptr(void *buf_priv) -{ - kzfree(buf_priv); -} - -static struct vb2_mem_ops msm_vb2_get_q_mem_op = { - .get_userptr = msm_vb2_dma_contig_get_userptr, - .put_userptr = msm_vb2_dma_contig_put_userptr, -}; - -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void) -{ - return &msm_vb2_get_q_mem_op; -} - -static struct vb2_queue *msm_vb2_get_queue(int session_id, - unsigned int stream_id) -{ - return msm_get_stream_vb2q(session_id, stream_id); -} - -static struct vb2_buffer *msm_vb2_get_buf(int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - struct msm_vb2_buffer *msm_vb2 = NULL; - unsigned long flags; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return NULL; - - spin_lock_irqsave(&stream->stream_lock, flags); - - if (!stream->vb2_q) { - pr_err("%s: stream q not available\n", __func__); - goto end; - } - - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf->state != VB2_BUF_STATE_ACTIVE) - continue; - - if (msm_vb2->in_freeq) - continue; - - msm_vb2->in_freeq = 1; - goto end; - } - msm_vb2 = NULL; - vb2_buf = NULL; -end: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return vb2_buf; -} - -static int msm_vb2_put_buf(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - struct msm_stream *stream; - struct msm_vb2_buffer *msm_vb2; - int rc = 0; - unsigned long flags; - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return -EINVAL; - - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - if (msm_vb2->in_freeq) { - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s: VB buffer is null\n", __func__); - rc = -EINVAL; - } - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -static int msm_vb2_buf_done(struct vb2_buffer *vb, int session_id, - unsigned int stream_id) -{ - unsigned long flags; - struct msm_vb2_buffer *msm_vb2; - struct msm_stream *stream; - struct vb2_buffer *vb2_buf = NULL; - int rc = 0; - - stream = msm_get_stream(session_id, stream_id); - if (IS_ERR_OR_NULL(stream)) - return 0; - spin_lock_irqsave(&stream->stream_lock, flags); - if (vb) { - list_for_each_entry(msm_vb2, &(stream->queued_list), list) { - vb2_buf = &(msm_vb2->vb2_buf); - if (vb2_buf == vb) - break; - } - if (vb2_buf != vb) { - pr_err("%s:%d VB buffer is INVALID vb=%x, ses_id=%d, str_id=%d\n", - __func__, __LINE__, (unsigned int)vb, - session_id, stream_id); - rc = -EINVAL; - goto out; - } - msm_vb2 = - container_of(vb, struct msm_vb2_buffer, vb2_buf); - /* put buf before buf done */ - if (msm_vb2->in_freeq) { - vb2_buffer_done(vb, VB2_BUF_STATE_DONE); - msm_vb2->in_freeq = 0; - rc = 0; - } else - rc = -EINVAL; - } else { - pr_err("%s:%d VB buffer is NULL for ses_id=%d, str_id=%d\n", - __func__, __LINE__, session_id, stream_id); - rc = -EINVAL; - } -out: - spin_unlock_irqrestore(&stream->stream_lock, flags); - return rc; -} - -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req) -{ - if (!req) { - pr_err("%s: suddev is null\n", __func__); - return -EINVAL; - } - - req->get_buf = msm_vb2_get_buf; - req->get_vb2_queue = msm_vb2_get_queue; - req->put_buf = msm_vb2_put_buf; - req->buf_done = msm_vb2_buf_done; - - return 0; -} - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.h b/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.h deleted file mode 100644 index e4b7c670a8d1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/msm_vb2/msm_vb2.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef _MSM_VB_H -#define _MSM_VB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/media/msmb_camera.h" -#include -#include "msm.h" -#include "msm_sd.h" - -struct msm_vb2_buffer { - /* - * vb2 buffer has to be first in the structure - * because both v4l2 frameworks and driver directly - * cast msm_vb2_buffer to a vb2_buf. - */ - struct vb2_buffer vb2_buf; - struct list_head list; - int in_freeq; -}; - -struct msm_vb2_private_data { - void *vaddr; - unsigned long size; - /* Offset of the plane inside the buffer */ - void *alloc_ctx; -}; - -struct msm_stream { - struct list_head list; - - /* stream index per session, same - * as stream_id but set through s_parm */ - unsigned int stream_id; - /* vb2 buffer handling */ - struct vb2_queue *vb2_q; - spinlock_t stream_lock; - struct list_head queued_list; -}; - -struct vb2_ops *msm_vb2_get_q_ops(void); -struct vb2_mem_ops *msm_vb2_get_q_mem_ops(void); -int msm_vb2_request_cb(struct msm_sd_req_vb2_q *req_sd); - -#endif /*_MSM_VB_H */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/pproc/Makefile deleted file mode 100644 index 4193adc173f7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_MSMB_CAMERA) += cpp/ -obj-$(CONFIG_MSMB_CAMERA) += vpe/ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/Makefile deleted file mode 100644 index 15d9b98023c4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/isp/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSM_CPP) += msm_cpp.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.c deleted file mode 100644 index 2e556434ccb2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.c +++ /dev/null @@ -1,2315 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-CPP %s:%d " fmt, __func__, __LINE__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_camera.h" -#include -#include "../../include/media/msmb_pproc.h" -#include -#include "msm_cpp.h" -#include "msm_isp_util.h" -#include "msm_camera_io_util.h" -#include - -#define MSM_CPP_DRV_NAME "msm_cpp" - -#define MSM_CPP_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_CPP_DBG 0 - -#define ENABLE_CPP_LOW 0 - -#define CPP_CMD_TIMEOUT_MS 300 - -#define MSM_CPP_CORE_CLK_IDX 4 -#define MSM_MICRO_IFACE_CLK_IDX 7 - -#define MSM_CPP_NOMINAL_CLOCK 266670000 -#define MSM_CPP_TURBO_CLOCK 320000000 - -#define CPP_FW_VERSION_1_2_0 0x10020000 -#define CPP_FW_VERSION_1_4_0 0x10040000 -#define CPP_FW_VERSION_1_6_0 0x10060000 -#define CPP_FW_VERSION_1_8_0 0x10080000 - -/* stripe information offsets in frame command */ -#define STRIPE_BASE_FW_1_2_0 130 -#define STRIPE_BASE_FW_1_4_0 140 -#define STRIPE_BASE_FW_1_6_0 464 - - -/* dump the frame command before writing to the hardware */ -#define MSM_CPP_DUMP_FRM_CMD 0 - -#define CPP_CLK_INFO_MAX 16 - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info); - -#if CONFIG_MSM_CPP_DBG -#define CPP_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CPP_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define CPP_LOW(fmt, args...) do { \ - if (ENABLE_CPP_LOW) \ - pr_info(fmt, ##args); \ - } while (0) - -#define ERR_USER_COPY(to) pr_err("copy %s user\n", \ - ((to) ? "to" : "from")) -#define ERR_COPY_FROM_USER() ERR_USER_COPY(0) - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ -}) - -struct msm_cpp_timer_data_t { - struct cpp_device *cpp_dev; - struct msm_cpp_frame_info_t *processed_frame; -}; - -struct msm_cpp_timer_t { - atomic_t used; - struct msm_cpp_timer_data_t data; - struct timer_list cpp_timer; -}; - -struct msm_cpp_timer_t cpp_timer; - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - CPP_DBG("E\n"); - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_info("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - CPP_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -#define msm_cpp_empty_list(queue, member) { \ - unsigned long flags; \ - struct msm_queue_cmd *qcmd = NULL; \ - if (queue) { \ - spin_lock_irqsave(&queue->lock, flags); \ - while (!list_empty(&queue->list)) { \ - queue->len--; \ - qcmd = list_first_entry(&queue->list, \ - struct msm_queue_cmd, member); \ - list_del_init(&qcmd->member); \ - kfree(qcmd); \ - } \ - spin_unlock_irqrestore(&queue->lock, flags); \ - } \ -} - -static struct msm_cam_clk_info cpp_clk_info[CPP_CLK_INFO_MAX]; - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev); -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin); -static void cpp_timer_callback(unsigned long data); - -uint8_t induce_error; -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev); - -static void msm_cpp_write(u32 data, void __iomem *cpp_base) -{ - writel_relaxed((data), cpp_base + MSM_CPP_MICRO_FIFO_RX_DATA); -} - -static uint32_t msm_cpp_read(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - do { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_STAT); - } while (((tmp & 0x2) == 0x0) && (retry++ < 10)) ; - if (retry < 10) { - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_TX_DATA); - CPP_DBG("Read data: 0%x\n", tmp); - } else { - CPP_DBG("Read failed\n"); - tmp = 0xDEADBEEF; - } - - return tmp; -} - -static struct msm_cpp_buff_queue_info_t *msm_cpp_get_buff_queue_entry( - struct cpp_device *cpp_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if ((cpp_dev->buff_queue[i].used == 1) && - (cpp_dev->buff_queue[i].session_id == session_id) && - (cpp_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &cpp_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_cpp_get_phy_addr(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff, int *fd) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - *fd = buff->map_info.buff_info.fd; - break; - } - } - - return phy_add; -} - -static unsigned long msm_cpp_queue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue, - struct msm_cpp_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_cpp_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_cpp_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(cpp_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto QUEUE_BUFF_ERROR1; - } - rc = ion_map_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto QUEUE_BUFF_ERROR2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -QUEUE_BUFF_ERROR2: - ion_free(cpp_dev->client, buff->map_info.ion_handle); -QUEUE_BUFF_ERROR1: - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_cpp_dequeue_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_map_list_t *buff) -{ - - ion_unmap_iommu(cpp_dev->client, buff->map_info.ion_handle, - cpp_dev->domain_num, 0); - ion_free(cpp_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_cpp_fetch_buffer_info(struct cpp_device *cpp_dev, - struct msm_cpp_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id, int *fd) -{ - unsigned long phy_addr = 0; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_cpp_get_phy_addr(cpp_dev, buff_queue_info, - buffer_info->index, native_buff, fd); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - buffer_info); - *fd = buffer_info->fd; - } - return phy_addr; -} - -static int32_t msm_cpp_enqueue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_cpp_queue_buffer_info(cpp_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_cpp_dequeue_buff_info_list(struct cpp_device *cpp_dev, - struct msm_cpp_buff_queue_info_t *buff_queue_info) -{ - struct msm_cpp_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_cpp_dequeue_buffer_info(cpp_dev, buff); - } - - return 0; -} - -static int32_t msm_cpp_add_buff_queue_entry(struct cpp_device *cpp_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 0) { - buff_queue_info = &cpp_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_cpp_free_buff_queue_entry(struct cpp_device *cpp_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_cpp_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_cpp_create_buff_queue(struct cpp_device *cpp_dev, - uint32_t num_buffq) -{ - struct msm_cpp_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_cpp_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (cpp_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - cpp_dev->buff_queue = buff_queue; - cpp_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_cpp_delete_buff_queue(struct cpp_device *cpp_dev) -{ - uint32_t i; - - for (i = 0; i < cpp_dev->num_buffq; i++) { - if (cpp_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - msm_cpp_dequeue_buff_info_list - (cpp_dev, &cpp_dev->buff_queue[i]); - msm_cpp_free_buff_queue_entry(cpp_dev, - cpp_dev->buff_queue[i].session_id, - cpp_dev->buff_queue[i].stream_id); - } - } - kzfree(cpp_dev->buff_queue); - cpp_dev->buff_queue = NULL; - cpp_dev->num_buffq = 0; - return; -} - -static void msm_cpp_poll(void __iomem *cpp_base, u32 val) -{ - uint32_t tmp, retry = 0; - do { - usleep_range(1000, 2000); - tmp = msm_cpp_read(cpp_base); - if (tmp != 0xDEADBEEF) - CPP_LOW("poll: 0%x\n", tmp); - } while ((tmp != val) && (retry++ < MSM_CPP_POLL_RETRIES)); - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll finished\n"); - else - pr_err("Poll failed: expect: 0x%x\n", val); -} - -static void msm_cpp_poll_rx_empty(void __iomem *cpp_base) -{ - uint32_t tmp, retry = 0; - - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - while (((tmp & 0x2) != 0x0) && (retry++ < MSM_CPP_POLL_RETRIES)) { - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to read rx fifo.*/ - usleep_range(200, 300); - tmp = msm_camera_io_r(cpp_base + MSM_CPP_MICRO_FIFO_RX_STAT); - } - - if (retry < MSM_CPP_POLL_RETRIES) - CPP_LOW("Poll rx empty\n"); - else - pr_err("Poll rx empty failed\n"); -} - -void cpp_release_ion_client(struct kref *ref) -{ - struct cpp_device *cpp_dev = container_of(ref, - struct cpp_device, refcount); - pr_err("Calling ion_client_destroy\n"); - ion_client_destroy(cpp_dev->client); -} - -static int cpp_init_mem(struct cpp_device *cpp_dev) -{ - int rc = 0; - - kref_init(&cpp_dev->refcount); - kref_get(&cpp_dev->refcount); - cpp_dev->client = msm_ion_client_create("cpp"); - - CPP_DBG("E\n"); - if (!cpp_dev->domain) { - pr_err("domain / iommu context not found\n"); - return -ENODEV; - } - - CPP_DBG("X\n"); - return rc; -} - -static void cpp_deinit_mem(struct cpp_device *cpp_dev) -{ - CPP_DBG("E\n"); - kref_put(&cpp_dev->refcount, cpp_release_ion_client); - CPP_DBG("X\n"); -} - -static irqreturn_t msm_cpp_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t tx_level; - uint32_t irq_status; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - irq_status = msm_camera_io_r(cpp_dev->base + MSM_CPP_MICRO_IRQGEN_STAT); - CPP_DBG("status: 0x%x\n", irq_status); - if (irq_status & 0x8) { - tx_level = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_STAT) >> 2; - for (i = 0; i < tx_level; i++) { - tx_fifo[i] = msm_camera_io_r(cpp_dev->base + - MSM_CPP_MICRO_FIFO_TX_DATA); - } - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = &cpp_dev->tasklet_queue_cmd[cpp_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - pr_err("%s: cpp tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &cpp_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - queue_cmd->tx_level = tx_level; - memset(&queue_cmd->tx_fifo[0], 0, sizeof(queue_cmd->tx_fifo)); - for (i = 0; i < tx_level; i++) - queue_cmd->tx_fifo[i] = tx_fifo[i]; - - queue_cmd->cmd_used = 1; - cpp_dev->taskletq_idx = - (cpp_dev->taskletq_idx + 1) % MSM_CPP_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &cpp_dev->tasklet_q); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - tasklet_schedule(&cpp_dev->cpp_tasklet); - } else if (irq_status & 0x7C0) { - pr_err("%s: fatal error: 0x%x\n", __func__, irq_status); - pr_err("%s: DEBUG_SP: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_err("%s: DEBUG_T: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_err("%s: DEBUG_N: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_err("%s: DEBUG_R: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_err("%s: DEBUG_OPPC: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_err("%s: DEBUG_MO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_err("%s: DEBUG_TIMER0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_err("%s: DEBUG_TIMER1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_err("%s: DEBUG_GPI: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_err("%s: DEBUG_GPO: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_err("%s: DEBUG_T0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_err("%s: DEBUG_R0: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_err("%s: DEBUG_T1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_err("%s: DEBUG_R1: 0x%x\n", __func__, - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - } - msm_camera_io_w(irq_status, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - return IRQ_HANDLED; -} - -void msm_cpp_do_tasklet(unsigned long data) -{ - unsigned long flags; - uint32_t irq_status; - uint32_t tx_level; - uint32_t msg_id, cmd_len; - uint32_t i; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - struct cpp_device *cpp_dev = (struct cpp_device *) data; - struct msm_cpp_tasklet_queue_cmd *queue_cmd; - struct msm_cpp_timer_t *timer = NULL; - - while (atomic_read(&cpp_dev->irq_cnt)) { - spin_lock_irqsave(&cpp_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&cpp_dev->tasklet_q, - struct msm_cpp_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&cpp_dev->irq_cnt, 0); - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &cpp_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - irq_status = queue_cmd->irq_status; - tx_level = queue_cmd->tx_level; - for (i = 0; i < tx_level; i++) - tx_fifo[i] = queue_cmd->tx_fifo[i]; - - spin_unlock_irqrestore(&cpp_dev->tasklet_lock, flags); - - for (i = 0; i < tx_level; i++) { - if (tx_fifo[i] == MSM_CPP_MSG_ID_CMD) { - cmd_len = tx_fifo[i+1]; - msg_id = tx_fifo[i+2]; - if ((msg_id == MSM_CPP_MSG_ID_FRAME_ACK) - && (atomic_read(&cpp_timer.used))) { - CPP_DBG("Frame done!!\n"); - /* delete CPP timer */ - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } else if ((msg_id == - MSM_CPP_MSG_ID_FRAME_NACK) - && (atomic_read(&cpp_timer.used))) { - pr_err("NACK error from hw!!\n"); - CPP_DBG("delete timer.\n"); - timer = &cpp_timer; - atomic_set(&timer->used, 0); - del_timer(&timer->cpp_timer); - timer->data.processed_frame = NULL; - msm_cpp_notify_frame_done(cpp_dev); - } - i += cmd_len + 2; - } - } - } -} -static void cpp_get_clk_freq_tbl(struct clk *clk, struct cpp_hw_info *hw_info) -{ - uint32_t count; - signed long freq_tbl_entry = 0; - - if ((clk == NULL) || (hw_info == NULL) || (clk->ops == NULL) || - (clk->ops->list_rate == NULL)) { - pr_err("Bad parameter\n"); - return; - } - - for (count = 0; count < MAX_FREQ_TBL; count++) { - freq_tbl_entry = clk->ops->list_rate(clk, count); - if (freq_tbl_entry >= 0) - hw_info->freq_tbl[count] = freq_tbl_entry; - else - break; - } - - hw_info->freq_tbl_count = count; -} - -static int cpp_init_hardware(struct cpp_device *cpp_dev) -{ - int rc = 0; - rc = msm_isp_init_bandwidth_mgr(ISP_CPP); - if (rc < 0) { - pr_err("%s: Bandwidth registration Failed!\n", __func__); - goto bus_scale_register_failed; - } - - if (cpp_dev->fs_cpp == NULL) { - cpp_dev->fs_cpp = - regulator_get(&cpp_dev->pdev->dev, "vdd"); - if (IS_ERR(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd get failed %ld\n", - PTR_ERR(cpp_dev->fs_cpp)); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } else if (regulator_enable(cpp_dev->fs_cpp)) { - pr_err("Regulator cpp vdd enable failed\n"); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - goto fs_failed; - } - } - - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX] = - clk_get(&cpp_dev->pdev->dev, - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - if (IS_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX])) { - pr_err("%s get failed\n", - cpp_clk_info[MSM_MICRO_IFACE_CLK_IDX].clk_name); - rc = - PTR_ERR(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_ASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", - __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments - and this was the smallest number which works. This - sleep is needed to leave enough time for Microcontroller - to resets all its registers.*/ - usleep_range(10000, 12000); - - rc = clk_reset(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX], - CLK_RESET_DEASSERT); - if (rc) { - pr_err("%s:micro_iface_clk assert failed\n", __func__); - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - goto remap_failed; - } - /*Below usleep values are chosen based on experiments and - this was the smallest number which works. This sleep is - needed to leave enough time for Microcontroller to - resets all its registers.*/ - usleep_range(1000, 1200); - - clk_put(cpp_dev->cpp_clk[MSM_MICRO_IFACE_CLK_IDX]); - } - - rc = msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto clk_failed; - } - - cpp_dev->base = ioremap(cpp_dev->mem->start, - resource_size(cpp_dev->mem)); - if (!cpp_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto remap_failed; - } - - cpp_dev->vbif_base = ioremap(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - if (!cpp_dev->vbif_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto vbif_remap_failed; - } - - cpp_dev->cpp_hw_base = ioremap(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - if (!cpp_dev->cpp_hw_base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto cpp_hw_remap_failed; - } - - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = request_irq(cpp_dev->irq->start, msm_cpp_irq, - IRQF_TRIGGER_RISING, "cpp", cpp_dev); - if (rc < 0) { - pr_err("irq request fail\n"); - goto req_irq_fail; - } - cpp_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_INIT, NULL); - if (rc < 0) { - pr_err("buf mngr init failed\n"); - free_irq(cpp_dev->irq->start, cpp_dev); - goto req_irq_fail; - } - } - - cpp_dev->hw_info.cpp_hw_version = - msm_camera_io_r(cpp_dev->cpp_hw_base); - pr_info("CPP HW Version: 0x%x\n", cpp_dev->hw_info.cpp_hw_version); - cpp_dev->hw_info.cpp_hw_caps = - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4); - cpp_get_clk_freq_tbl(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - &cpp_dev->hw_info); - pr_debug("CPP HW Caps: 0x%x\n", cpp_dev->hw_info.cpp_hw_caps); - msm_camera_io_w(0x1, cpp_dev->vbif_base + 0x4); - cpp_dev->taskletq_idx = 0; - atomic_set(&cpp_dev->irq_cnt, 0); - msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE); - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - cpp_dev->stream_cnt = 0; - if (cpp_dev->hw_info.cpp_hw_version != CPP_HW_VERSION_4_0_0) { - if (cpp_dev->is_firmware_loaded == 1) { - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - msm_camera_io_w_mb(0x7C8, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - } - } else { - msm_camera_io_w(0x1, - cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w_mb(0x7C8, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR); - } - return rc; -req_irq_fail: - iounmap(cpp_dev->cpp_hw_base); -cpp_hw_remap_failed: - iounmap(cpp_dev->vbif_base); -vbif_remap_failed: - iounmap(cpp_dev->base); -remap_failed: - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); -clk_failed: - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); -fs_failed: - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -bus_scale_register_failed: - return rc; -} - -static void cpp_release_hardware(struct cpp_device *cpp_dev) -{ - int32_t rc; - if (cpp_dev->state != CPP_STATE_BOOT) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_DEINIT, NULL); - if (rc < 0) { - pr_err("error in buf mngr deinit\n"); - rc = -EINVAL; - } - free_irq(cpp_dev->irq->start, cpp_dev); - tasklet_kill(&cpp_dev->cpp_tasklet); - atomic_set(&cpp_dev->irq_cnt, 0); - } - msm_cpp_delete_buff_queue(cpp_dev); - iounmap(cpp_dev->base); - iounmap(cpp_dev->vbif_base); - iounmap(cpp_dev->cpp_hw_base); - msm_cam_clk_enable(&cpp_dev->pdev->dev, cpp_clk_info, - cpp_dev->cpp_clk, cpp_dev->num_clk, 0); - regulator_disable(cpp_dev->fs_cpp); - regulator_put(cpp_dev->fs_cpp); - cpp_dev->fs_cpp = NULL; - if (cpp_dev->stream_cnt > 0) { - pr_err("error: stream count active\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - } - cpp_dev->stream_cnt = 0; - msm_isp_deinit_bandwidth_mgr(ISP_CPP); -} - -static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin) -{ - uint32_t i; - uint32_t *ptr_bin = NULL; - int32_t rc = -EFAULT; - const struct firmware *fw = NULL; - struct device *dev = &cpp_dev->pdev->dev; - - msm_camera_io_w(0x1, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - - if (fw_name_bin) { - pr_debug("%s: FW file: %s\n", __func__, fw_name_bin); - rc = request_firmware(&fw, fw_name_bin, dev); - if (rc) { - dev_err(dev, - "Fail to loc blob %s from dev %pK, Error: %d\n", - fw_name_bin, dev, rc); - } - if (NULL != fw) - ptr_bin = (uint32_t *)fw->data; - - msm_camera_io_w(0x1, cpp_dev->base + - MSM_CPP_MICRO_BOOT_START); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_camera_io_w(0xFFFFFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - /*Start firmware loading*/ - msm_cpp_write(MSM_CPP_CMD_FW_LOAD, cpp_dev->base); - if (fw) - msm_cpp_write(fw->size, cpp_dev->base); - else - msm_cpp_write(MSM_CPP_END_ADDRESS, cpp_dev->base); - msm_cpp_write(MSM_CPP_START_ADDRESS, cpp_dev->base); - - if (ptr_bin) { - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < fw->size/4; i++) { - msm_cpp_write(*ptr_bin, cpp_dev->base); - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - ptr_bin++; - } - } - if (fw) - release_firmware(fw); - msm_camera_io_w_mb(0x00, cpp_dev->cpp_hw_base + 0xC); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_OK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - } - - /*Trigger MC to jump to start address*/ - msm_cpp_write(MSM_CPP_CMD_EXEC_JUMP, cpp_dev->base); - msm_cpp_write(MSM_CPP_JUMP_ADDRESS, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x1); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_JUMP_ACK); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Get Bootloader Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_BOOTLOADER_VER, cpp_dev->base); - pr_info("MC Bootloader Version: 0x%x\n", - msm_cpp_read(cpp_dev->base)); - - /*Get Firmware Version*/ - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_CMD, cpp_dev->base); - msm_cpp_write(0x1, cpp_dev->base); - msm_cpp_write(MSM_CPP_CMD_GET_FW_VER, cpp_dev->base); - msm_cpp_write(MSM_CPP_MSG_ID_TRAILER, cpp_dev->base); - - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD); - msm_cpp_poll(cpp_dev->base, 0x2); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_FW_VER); - cpp_dev->fw_version = msm_cpp_read(cpp_dev->base); - pr_info("CPP FW Version: 0x%08x\n", cpp_dev->fw_version); - msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER); - - /*Disable MC clock*/ - /*msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_CLKEN_CTL);*/ -} - -static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc; - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - CPP_DBG("E\n"); - - mutex_lock(&cpp_dev->mutex); - if (cpp_dev->cpp_open_cnt == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free CPP instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 0) { - cpp_dev->cpp_subscribe_list[i].active = 1; - cpp_dev->cpp_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("No free instance\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - CPP_DBG("open %d %pK\n", i, &fh->vfh); - cpp_dev->cpp_open_cnt++; - if (cpp_dev->cpp_open_cnt == 1) { - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) { - cpp_dev->cpp_open_cnt--; - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - mutex_unlock(&cpp_dev->mutex); - return rc; - } - - iommu_attach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_init_mem(cpp_dev); - cpp_dev->state = CPP_STATE_IDLE; - } - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_device_queue *processing_q = NULL; - struct msm_device_queue *eventData_q = NULL; - - if (!cpp_dev) { - pr_err("failed: cpp_dev %pK\n", cpp_dev); - return -EINVAL; - } - - mutex_lock(&cpp_dev->mutex); - - processing_q = &cpp_dev->processing_q; - eventData_q = &cpp_dev->eventData_q; - - if (cpp_dev->cpp_open_cnt == 0) { - mutex_unlock(&cpp_dev->mutex); - return 0; - } - - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].active == 1) { - cpp_dev->cpp_subscribe_list[i].active = 0; - cpp_dev->cpp_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_CPP_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&cpp_dev->mutex); - return -ENODEV; - } - - cpp_dev->cpp_open_cnt--; - if (cpp_dev->cpp_open_cnt == 0) { - pr_debug("irq_status: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4)); - pr_debug("DEBUG_SP: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x40)); - pr_debug("DEBUG_T: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x44)); - pr_debug("DEBUG_N: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x48)); - pr_debug("DEBUG_R: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x4C)); - pr_debug("DEBUG_OPPC: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x50)); - pr_debug("DEBUG_MO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x54)); - pr_debug("DEBUG_TIMER0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x60)); - pr_debug("DEBUG_TIMER1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x64)); - pr_debug("DEBUG_GPI: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x70)); - pr_debug("DEBUG_GPO: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x74)); - pr_debug("DEBUG_T0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x80)); - pr_debug("DEBUG_R0: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x84)); - pr_debug("DEBUG_T1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x88)); - pr_debug("DEBUG_R1: 0x%x\n", - msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C)); - msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL); - cpp_deinit_mem(cpp_dev); - iommu_detach_device(cpp_dev->domain, cpp_dev->iommu_ctx); - cpp_release_hardware(cpp_dev); - msm_cpp_empty_list(processing_q, list_frame); - msm_cpp_empty_list(eventData_q, list_eventdata); - cpp_dev->state = CPP_STATE_OFF; - } - - mutex_unlock(&cpp_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_cpp_internal_ops = { - .open = cpp_open_node, - .close = cpp_close_node, -}; - -static int msm_cpp_buffer_ops(struct cpp_device *cpp_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(cpp_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_debug("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_queue_cmd *event_qcmd = NULL; - struct msm_cpp_frame_info_t *processed_frame = NULL; - struct msm_device_queue *queue = &cpp_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - frame_qcmd = msm_dequeue(queue, list_frame); - if (frame_qcmd) { - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("Insufficient memory. return"); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - CPP_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&cpp_dev->eventData_q, &event_qcmd->list_eventdata); - - if (!processed_frame->output_buffer_info[0].processed_divert && - !processed_frame->output_buffer_info[0].native_buff) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[0].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - - if (processed_frame->duplicate_output && - !processed_frame-> - output_buffer_info[1].processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((processed_frame->duplicate_identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->duplicate_identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info[1].index; - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error putting buffer\n"); - rc = -EINVAL; - } - } - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_CPP_FRAME_DONE; - v4l2_event_queue(cpp_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -#if MSM_CPP_DUMP_FRM_CMD -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - int i; - pr_info("-- start: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - for (i = 0; i < frame_info->msg_len; i++) - pr_err("msg[%03d] = 0x%08x\n", i, frame_info->cpp_cmd_msg[i]); - pr_info("-- end: cpp frame cmd for identity=0x%x, frame_id=%d --\n", - frame_info->identity, - frame_info->frame_id); - return 0; -} -#else -static int msm_cpp_dump_frame_cmd(struct msm_cpp_frame_info_t *frame_info) -{ - return 0; -} -#endif - - -static void msm_cpp_do_timeout_work(struct work_struct *work) -{ - int ret; - uint32_t i = 0; - struct msm_cpp_frame_info_t *this_frame = NULL; - - pr_err("cpp_timer_callback called. (jiffies=%lu)\n", - jiffies); - if (!work) { - pr_err("Invalid work:%pK\n", work); - return; - } - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - - disable_irq(cpp_timer.data.cpp_dev->irq->start); - pr_err("Reloading firmware\n"); - if (!atomic_read(&cpp_timer.used)) { - pr_err("Delayed trigger, IRQ serviced\n"); - return; - } - atomic_set(&cpp_timer.used, 0); - cpp_load_fw(cpp_timer.data.cpp_dev, - cpp_timer.data.cpp_dev->fw_name_bin); - pr_err("Firmware loading done\n"); - enable_irq(cpp_timer.data.cpp_dev->irq->start); - msm_camera_io_w_mb(0x8, cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w_mb(0xFFFF, - cpp_timer.data.cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - - this_frame = cpp_timer.data.processed_frame; - atomic_set(&cpp_timer.used, 1); - pr_err("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - pr_err("Rescheduling for identity=0x%x, frame_id=%03d\n", - this_frame->identity, this_frame->frame_id); - msm_cpp_write(0x6, cpp_timer.data.cpp_dev->base); - msm_cpp_dump_frame_cmd(this_frame); - for (i = 0; i < this_frame->msg_len; i++) - msm_cpp_write(this_frame->cpp_cmd_msg[i], - cpp_timer.data.cpp_dev->base); - return; -} - -void cpp_timer_callback(unsigned long data) -{ - struct msm_cpp_work_t *work = - cpp_timer.data.cpp_dev->work; - queue_work(cpp_timer.data.cpp_dev->timer_wq, - (struct work_struct *)work); -} - -static int msm_cpp_send_frame_to_hardware(struct cpp_device *cpp_dev, - struct msm_queue_cmd *frame_qcmd) -{ - uint32_t i; - int32_t rc = -EAGAIN; - int ret; - struct msm_cpp_frame_info_t *process_frame; - - if (cpp_dev->processing_q.len < MAX_CPP_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&cpp_dev->processing_q, - &frame_qcmd->list_frame); - - cpp_timer.data.processed_frame = process_frame; - atomic_set(&cpp_timer.used, 1); - /* install timer for cpp timeout */ - CPP_DBG("Installing cpp_timer\n"); - setup_timer(&cpp_timer.cpp_timer, - cpp_timer_callback, (unsigned long)&cpp_timer); - CPP_DBG("Starting timer to fire in %d ms. (jiffies=%lu)\n", - CPP_CMD_TIMEOUT_MS, jiffies); - ret = mod_timer(&cpp_timer.cpp_timer, - jiffies + msecs_to_jiffies(CPP_CMD_TIMEOUT_MS)); - if (ret) - pr_err("error in mod_timer\n"); - - msm_cpp_write(0x6, cpp_dev->base); - msm_cpp_dump_frame_cmd(process_frame); - msm_cpp_poll_rx_empty(cpp_dev->base); - for (i = 0; i < process_frame->msg_len; i++) { - if (i % MSM_CPP_RX_FIFO_LEVEL == 0) - msm_cpp_poll_rx_empty(cpp_dev->base); - if ((induce_error) && (i == 1)) { - pr_err("Induce error\n"); - msm_cpp_write(process_frame->cpp_cmd_msg[i]-1, - cpp_dev->base); - induce_error--; - } else - msm_cpp_write(process_frame->cpp_cmd_msg[i], - cpp_dev->base); - } - do_gettimeofday(&(process_frame->in_time)); - rc = 0; - } - if (rc < 0) - pr_err("process queue full. drop frame\n"); - return rc; -} - -static int msm_cpp_flush_frames(struct cpp_device *cpp_dev) -{ - return 0; -} - -static int msm_cpp_cfg(struct cpp_device *cpp_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_cpp_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_cpp_frame_info_t), GFP_KERNEL); - uint32_t *cpp_frame_msg; - unsigned long in_phyaddr, out_phyaddr0, out_phyaddr1; - uint16_t num_stripes = 0; - struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info; - int32_t status = 0; - int32_t stripe_base = 0; - - int in_fd; - - int i = 0; - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = (copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR1; - } - - if ((new_frame->msg_len == 0) || - (new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) { - pr_err("%s:%d: Invalid frame len:%d\n", __func__, - __LINE__, new_frame->msg_len); - rc = -EINVAL; - goto ERROR1; - } - - cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len, - GFP_KERNEL); - if (!cpp_frame_msg) { - pr_err("Insufficient memory. return"); - rc = -ENOMEM; - goto ERROR1; - } - - rc = (copy_from_user(cpp_frame_msg, - (void __user *)new_frame->cpp_cmd_msg, - sizeof(uint32_t)*new_frame->msg_len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR2; - } - - new_frame->cpp_cmd_msg = cpp_frame_msg; - if (cpp_frame_msg == NULL || - (new_frame->msg_len < MSM_CPP_MIN_FRAME_LENGTH)) { - pr_err("%s %d Length is not correct or frame message is missing\n", - __func__, __LINE__); - return -EINVAL; - } - if (cpp_frame_msg[new_frame->msg_len - 1] != MSM_CPP_MSG_ID_TRAILER) { - pr_err("%s %d Invalid frame message\n", __func__, __LINE__); - return -EINVAL; - } - - in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), &in_fd); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto ERROR2; - } - - if (new_frame->output_buffer_info[0].native_buff == 0) { - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & - 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR2; - } - new_frame->output_buffer_info[0].index = buff_mgr_info.index; - } - - out_phyaddr0 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[0], - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF), - &new_frame->output_buffer_info[0].fd); - if (!out_phyaddr0) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto ERROR3; - } - out_phyaddr1 = out_phyaddr0; - - /* get buffer for duplicate output */ - if (new_frame->duplicate_output) { - CPP_DBG("duplication enabled, dup_id=0x%x", - new_frame->duplicate_identity); - memset(&new_frame->output_buffer_info[1], 0, - sizeof(struct msm_cpp_buffer_info_t)); - memset(&dup_buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - dup_buff_mgr_info.session_id = - ((new_frame->duplicate_identity >> 16) & 0xFFFF); - dup_buff_mgr_info.stream_id = - (new_frame->duplicate_identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &dup_buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_debug("error getting buffer rc:%d\n", rc); - goto ERROR3; - } - new_frame->output_buffer_info[1].index = - dup_buff_mgr_info.index; - out_phyaddr1 = msm_cpp_fetch_buffer_info(cpp_dev, - &new_frame->output_buffer_info[1], - ((new_frame->duplicate_identity >> 16) & 0xFFFF), - (new_frame->duplicate_identity & 0xFFFF), - &new_frame->output_buffer_info[1].fd); - if (!out_phyaddr1) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &dup_buff_mgr_info); - goto ERROR3; - } - /* set duplicate enable bit */ - cpp_frame_msg[5] |= 0x1; - CPP_DBG("out_phyaddr1= %08x\n", (uint32_t)out_phyaddr1); - } - - num_stripes = ((cpp_frame_msg[12] >> 20) & 0x3FF) + - ((cpp_frame_msg[12] >> 10) & 0x3FF) + - (cpp_frame_msg[12] & 0x3FF); - - if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_2_0) { - stripe_base = STRIPE_BASE_FW_1_2_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_4_0) { - stripe_base = STRIPE_BASE_FW_1_4_0; - } else if ((cpp_dev->fw_version & 0xffff0000) == CPP_FW_VERSION_1_6_0) { - stripe_base = STRIPE_BASE_FW_1_6_0; - } else { - pr_err("invalid fw version %08x", cpp_dev->fw_version); - //goto ERROR3; - } - if ((stripe_base + num_stripes*27 + 1) != new_frame->msg_len) { - pr_err("Invalid frame message\n"); - rc = -EINVAL; - goto ERROR3; - } - - for (i = 0; i < num_stripes; i++) { - cpp_frame_msg[stripe_base + 5 + i*27] += - (uint32_t) in_phyaddr; - cpp_frame_msg[stripe_base + 11 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 12 + i * 27] += - (uint32_t) out_phyaddr1; - cpp_frame_msg[stripe_base + 13 + i * 27] += - (uint32_t) out_phyaddr0; - cpp_frame_msg[stripe_base + 14 + i * 27] += - (uint32_t) out_phyaddr1; - } - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto ERROR3; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_cpp_send_frame_to_hardware(cpp_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto ERROR4; - } - - ioctl_ptr->trans_code = rc; - status = rc; - rc = (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - rc = -EINVAL; - goto ERROR4; - } - return rc; -ERROR4: - kfree(frame_qcmd); -ERROR3: - if (new_frame->output_buffer_info[0].native_buff == 0) - msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -ERROR2: - kfree(cpp_frame_msg); -ERROR1: - ioctl_ptr->trans_code = rc; - status = rc; - if (copy_to_user((void __user *)new_frame->status, &status, - sizeof(int32_t))) - pr_err("error cannot copy error\n"); - kfree(new_frame); - return rc; -} - -long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - if ((ioctl_ptr == NULL) || (ioctl_ptr->ioctl_ptr == NULL)) { - pr_err("ioctl_ptr is null\n"); - return -EINVAL; - } - if (cpp_dev == NULL) { - pr_err("cpp_dev is null\n"); - return -EINVAL; - } - if (_IOC_DIR(cmd) == _IOC_NONE) { - pr_err("Invalid ioctl/subdev cmd %u", cmd); - return -EINVAL; - } - mutex_lock(&cpp_dev->mutex); - CPP_DBG("E cmd: 0x%x\n", cmd); - switch (cmd) { - case VIDIOC_MSM_CPP_GET_HW_INFO: { - CPP_DBG("VIDIOC_MSM_CPP_GET_HW_INFO\n"); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - &cpp_dev->hw_info, - sizeof(struct cpp_hw_info))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - break; - } - - case VIDIOC_MSM_CPP_LOAD_FIRMWARE: { - CPP_DBG("VIDIOC_MSM_CPP_LOAD_FIRMWARE\n"); - if (cpp_dev->is_firmware_loaded == 0) { - if (cpp_dev->fw_name_bin != NULL) { - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - } - if ((ioctl_ptr->len == 0) || - (ioctl_ptr->len > MSM_CPP_MAX_FW_NAME_LEN)) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - cpp_dev->fw_name_bin = kzalloc(ioctl_ptr->len+1, - GFP_KERNEL); - if (!cpp_dev->fw_name_bin) { - pr_err("%s:%d: malloc error\n", __func__, - __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr=NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - rc = (copy_from_user(cpp_dev->fw_name_bin, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(cpp_dev->fw_name_bin); - cpp_dev->fw_name_bin = NULL; - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - *(cpp_dev->fw_name_bin+ioctl_ptr->len) = '\0'; - disable_irq(cpp_dev->irq->start); - cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin); - enable_irq(cpp_dev->irq->start); - cpp_dev->is_firmware_loaded = 1; - } - break; - } - case VIDIOC_MSM_CPP_CFG: - CPP_DBG("VIDIOC_MSM_CPP_CFG\n"); - rc = msm_cpp_cfg(cpp_dev, ioctl_ptr); - break; - case VIDIOC_MSM_CPP_FLUSH_QUEUE: - CPP_DBG("VIDIOC_MSM_CPP_FLUSH_QUEUE\n"); - rc = msm_cpp_flush_frames(cpp_dev); - break; - case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO: - case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_cpp_stream_buff_info_t *u_stream_buff_info; - struct msm_cpp_stream_buff_info_t k_stream_buff_info; - CPP_DBG("VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO\n"); - if (sizeof(struct msm_cpp_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (u_stream_buff_info->num_buffs == 0) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - - if (k_stream_buff_info.num_buffs > MSM_CAMERA_MAX_STREAM_BUF) { - pr_err("%s:%d: unexpected large num buff requested\n", - __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t), GFP_KERNEL); - if (ZERO_OR_NULL_PTR(k_stream_buff_info.buffer_info)) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_cpp_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - rc = msm_cpp_add_buff_queue_entry(cpp_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - } - if (!rc) - rc = msm_cpp_enqueue_buff_info_list(cpp_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - - if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) { - cpp_dev->stream_cnt++; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_cpp_buff_queue_info_t *buff_queue_info; - CPP_DBG("VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO\n"); - - if (ioctl_ptr->len != sizeof(uint32_t)) - return -EINVAL; - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_cpp_get_buff_queue_entry(cpp_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - msm_cpp_dequeue_buff_info_list(cpp_dev, buff_queue_info); - rc = msm_cpp_free_buff_queue_entry(cpp_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - if (cpp_dev->stream_cnt > 0) { - cpp_dev->stream_cnt--; - pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt); - if (cpp_dev->stream_cnt == 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, 0, 0); - if (rc < 0) - pr_err("Bandwidth Reset Failed!\n"); - } - } else { - pr_err("error: stream count underflow %d\n", - cpp_dev->stream_cnt); - } - break; - } - case VIDIOC_MSM_CPP_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &cpp_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_cpp_frame_info_t *process_frame; - CPP_DBG("VIDIOC_MSM_CPP_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - if (!event_qcmd) { - pr_err("no queue cmd available"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - process_frame = event_qcmd->command; - CPP_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_cpp_frame_info_t))) { - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - kfree(process_frame->cpp_cmd_msg); - kfree(process_frame); - kfree(event_qcmd); - break; - } - case VIDIOC_MSM_CPP_SET_CLOCK: { - struct msm_cpp_clock_settings_t clock_settings; - unsigned long clock_rate = 0; - CPP_DBG("VIDIOC_MSM_CPP_SET_CLOCK\n"); - if (ioctl_ptr->len == 0) { - pr_err("ioctl_ptr->len is 0\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->ioctl_ptr == NULL) { - pr_err("ioctl_ptr->ioctl_ptr is NULL\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (ioctl_ptr->len != sizeof(struct msm_cpp_clock_settings_t)) { - pr_err("Not valid ioctl_ptr->len\n"); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&clock_settings, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - - if (clock_settings.clock_rate > 0) { - rc = msm_isp_update_bandwidth(ISP_CPP, - clock_settings.avg, - clock_settings.inst); - if (rc < 0) { - pr_err("Bandwidth Set Failed!\n"); - msm_isp_update_bandwidth(ISP_CPP, 0, 0); - mutex_unlock(&cpp_dev->mutex); - return -EINVAL; - } - clock_rate = clk_round_rate( - cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_settings.clock_rate); - if (clock_rate != clock_settings.clock_rate) - pr_err("clock rate differ from settings\n"); - - clk_set_rate(cpp_dev->cpp_clk[MSM_CPP_CORE_CLK_IDX], - clock_rate); - } - break; - } - case MSM_SD_SHUTDOWN: - CPP_DBG("MSM_SD_SHUTDOWN\n"); - mutex_unlock(&cpp_dev->mutex); - while (cpp_dev->cpp_open_cnt != 0) - cpp_close_node(sd, NULL); - mutex_lock(&cpp_dev->mutex); - rc = 0; - break; - case VIDIOC_MSM_CPP_QUEUE_BUF: { - struct msm_pproc_queue_buf_info queue_buf_info; - CPP_DBG("VIDIOC_MSM_CPP_QUEUE_BUF\n"); - rc = (copy_from_user(&queue_buf_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_pproc_queue_buf_info)) ? - -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - - if (queue_buf_info.is_buf_dirty) { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &queue_buf_info.buff_mgr_info); - } else { - rc = msm_cpp_buffer_ops(cpp_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &queue_buf_info.buff_mgr_info); - } - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EINVAL; - } - - break; - } - case VIDIOC_MSM_CPP_POP_STREAM_BUFFER: { - struct msm_buf_mngr_info buff_mgr_info; - struct msm_cpp_frame_info_t frame_info; - rc = (copy_from_user(&frame_info, - (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_cpp_frame_info_t)) ? -EFAULT : 0); - if (rc) { - ERR_COPY_FROM_USER(); - break; - } - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = - ((frame_info.identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (frame_info.identity & 0xFFFF); - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - rc = -EAGAIN; - pr_err("error getting buffer rc:%d\n", rc); - break; - } - buff_mgr_info.frame_id = frame_info.frame_id; - rc = msm_cpp_buffer_ops(cpp_dev, VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("error in buf done\n"); - rc = -EAGAIN; - } - break; - } - default: - pr_err_ratelimited("invalid value: cmd=0x%x\n", cmd); - break; - } - mutex_unlock(&cpp_dev->mutex); - CPP_DBG("X\n"); - return rc; -} - -int msm_cpp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_subscribe(fh, sub, MAX_CPP_V4l2_EVENTS, NULL); -} - -int msm_cpp_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - CPP_DBG("Called\n"); - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_cpp_subdev_core_ops = { - .ioctl = msm_cpp_subdev_ioctl, - .subscribe_event = msm_cpp_subscribe_event, - .unsubscribe_event = msm_cpp_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_cpp_subdev_ops = { - .core = &msm_cpp_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_cpp_v4l2_subdev_fops; - -static long msm_cpp_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - - case VIDIOC_MSM_CPP_GET_INST_INFO: { - uint32_t i; - struct cpp_device *cpp_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_cpp_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_cpp_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_CPP_INSTANCE; i++) { - if (cpp_dev->cpp_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_cpp_frame_info_t))) { - return -EINVAL; - } - } - break; - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_cpp_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_cpp_subdev_do_ioctl); -} - -static int cpp_register_domain(void) -{ - struct msm_iova_partition cpp_fw_partition = { - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout cpp_fw_layout = { - .partitions = &cpp_fw_partition, - .npartitions = 1, - .client_name = "camera_cpp", - .domain_flags = 0, - }; - - return msm_register_domain(&cpp_fw_layout); -} - -static int msm_cpp_get_clk_info(struct cpp_device *cpp_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CPP_CLK_INFO_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - - CPP_DBG("count = %d\n", count); - if (count == 0) { - pr_err("no clocks found in device tree, count=%d", count); - return 0; - } - - if (count > CPP_CLK_INFO_MAX) { - pr_err("invalid count=%d, max is %d\n", count, - CPP_CLK_INFO_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cpp_clk_info[i].clk_name)); - CPP_DBG("clock-names[%d] = %s\n", i, cpp_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cpp_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CPP_DBG("clk_rate[%d] = %ld\n", i, cpp_clk_info[i].clk_rate); - } - cpp_dev->num_clk = count; - return 0; -} - - -static int cpp_probe(struct platform_device *pdev) -{ - struct cpp_device *cpp_dev; - int rc = 0; - CPP_DBG("E"); - cpp_dev = kzalloc(sizeof(struct cpp_device), GFP_KERNEL); - if (!cpp_dev) { - pr_err("no enough memory\n"); - return -ENOMEM; - } - - cpp_dev->cpp_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(cpp_clk_info), GFP_KERNEL); - if (!cpp_dev->cpp_clk) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto ERROR1; - } - - v4l2_subdev_init(&cpp_dev->msm_sd.sd, &msm_cpp_subdev_ops); - cpp_dev->msm_sd.sd.internal_ops = &msm_cpp_internal_ops; - snprintf(cpp_dev->msm_sd.sd.name, ARRAY_SIZE(cpp_dev->msm_sd.sd.name), - "cpp"); - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - cpp_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&cpp_dev->msm_sd.sd, cpp_dev); - platform_set_drvdata(pdev, &cpp_dev->msm_sd.sd); - mutex_init(&cpp_dev->mutex); - spin_lock_init(&cpp_dev->tasklet_lock); - - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - cpp_dev->pdev = pdev; - - cpp_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp"); - if (!cpp_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->vbif_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_vbif"); - if (!cpp_dev->vbif_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->cpp_hw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cpp_hw"); - if (!cpp_dev->cpp_hw_mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cpp"); - if (!cpp_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto ERROR2; - } - - cpp_dev->io = request_mem_region(cpp_dev->mem->start, - resource_size(cpp_dev->mem), pdev->name); - if (!cpp_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto ERROR2; - } - - cpp_dev->domain_num = cpp_register_domain(); - if (cpp_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->domain = - msm_get_iommu_domain(cpp_dev->domain_num); - if (!cpp_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto ERROR3; - } - - cpp_dev->iommu_ctx = msm_iommu_get_ctx("cpp"); - if (IS_ERR(cpp_dev->iommu_ctx)) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -EPROBE_DEFER; - goto ERROR3; - } - - if (msm_cpp_get_clk_info(cpp_dev, pdev) < 0) { - pr_err("msm_cpp_get_clk_info() failed\n"); - goto ERROR3; - } - - media_entity_init(&cpp_dev->msm_sd.sd.entity, 0, NULL, 0); - cpp_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - cpp_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CPP; - cpp_dev->msm_sd.sd.entity.name = pdev->name; - cpp_dev->msm_sd.close_seq = MSM_SD_CLOSE_3RD_CATEGORY; - msm_sd_register(&cpp_dev->msm_sd); - msm_cpp_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_cpp_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_cpp_v4l2_subdev_fops.unlocked_ioctl = msm_cpp_subdev_fops_ioctl; - msm_cpp_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_cpp_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - cpp_dev->msm_sd.sd.devnode->fops = &msm_cpp_v4l2_subdev_fops; - cpp_dev->msm_sd.sd.entity.revision = cpp_dev->msm_sd.sd.devnode->num; - cpp_dev->state = CPP_STATE_BOOT; - - rc = cpp_init_hardware(cpp_dev); - if (rc < 0) - goto CPP_PROBE_INIT_ERROR; - - msm_camera_io_w(0x0, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_MASK); - msm_camera_io_w(0xFFFF, cpp_dev->base + - MSM_CPP_MICRO_IRQGEN_CLR); - msm_camera_io_w(0x80000000, cpp_dev->base + 0xF0); - cpp_release_hardware(cpp_dev); - cpp_dev->state = CPP_STATE_OFF; - msm_cpp_enable_debugfs(cpp_dev); - - msm_queue_init(&cpp_dev->eventData_q, "eventdata"); - msm_queue_init(&cpp_dev->processing_q, "frame"); - INIT_LIST_HEAD(&cpp_dev->tasklet_q); - tasklet_init(&cpp_dev->cpp_tasklet, msm_cpp_do_tasklet, - (unsigned long)cpp_dev); - cpp_dev->timer_wq = create_workqueue("msm_cpp_workqueue"); - cpp_dev->work = kmalloc(sizeof(struct msm_cpp_work_t), - GFP_KERNEL); - - if (!cpp_dev->work) { - pr_err("no enough memory\n"); - rc = -ENOMEM; - goto CPP_PROBE_INIT_ERROR; - } - - INIT_WORK((struct work_struct *)cpp_dev->work, msm_cpp_do_timeout_work); - cpp_dev->cpp_open_cnt = 0; - cpp_dev->is_firmware_loaded = 0; - cpp_timer.data.cpp_dev = cpp_dev; - atomic_set(&cpp_timer.used, 0); - cpp_dev->fw_name_bin = NULL; - if (rc == 0) - CPP_DBG("SUCCESS."); - else - CPP_DBG("FAILED."); - return rc; -CPP_PROBE_INIT_ERROR: - media_entity_cleanup(&cpp_dev->msm_sd.sd.entity); - msm_sd_unregister(&cpp_dev->msm_sd); -ERROR3: - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); -ERROR2: - kfree(cpp_dev->cpp_clk); -ERROR1: - kfree(cpp_dev); - return rc; -} - -static const struct of_device_id msm_cpp_dt_match[] = { - {.compatible = "qcom,cpp"}, - {} -}; - -static int cpp_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct cpp_device *cpp_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - cpp_dev = (struct cpp_device *)v4l2_get_subdevdata(sd); - if (!cpp_dev) { - pr_err("%s: cpp device is NULL\n", __func__); - return 0; - } - - msm_sd_unregister(&cpp_dev->msm_sd); - release_mem_region(cpp_dev->mem->start, resource_size(cpp_dev->mem)); - release_mem_region(cpp_dev->vbif_mem->start, - resource_size(cpp_dev->vbif_mem)); - release_mem_region(cpp_dev->cpp_hw_mem->start, - resource_size(cpp_dev->cpp_hw_mem)); - mutex_destroy(&cpp_dev->mutex); - kfree(cpp_dev->work); - destroy_workqueue(cpp_dev->timer_wq); - kfree(cpp_dev->cpp_clk); - kfree(cpp_dev); - return 0; -} - -static struct platform_driver cpp_driver = { - .probe = cpp_probe, - .remove = cpp_device_remove, - .driver = { - .name = MSM_CPP_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cpp_dt_match, - }, -}; - -static int __init msm_cpp_init_module(void) -{ - return platform_driver_register(&cpp_driver); -} - -static void __exit msm_cpp_exit_module(void) -{ - platform_driver_unregister(&cpp_driver); -} - -static int msm_cpp_debugfs_error_s(void *data, u64 val) -{ - pr_err("setting error inducement"); - induce_error = val; - return 0; -} - -DEFINE_SIMPLE_ATTRIBUTE(cpp_debugfs_error, NULL, - msm_cpp_debugfs_error_s, "%llu\n"); - -static int msm_cpp_enable_debugfs(struct cpp_device *cpp_dev) -{ - struct dentry *debugfs_base; - debugfs_base = debugfs_create_dir("msm_cpp", NULL); - if (!debugfs_base) - return -ENOMEM; - - if (!debugfs_create_file("error", S_IRUGO | S_IWUSR, debugfs_base, - (void *)cpp_dev, &cpp_debugfs_error)) - return -ENOMEM; - - return 0; -} - -module_init(msm_cpp_init_module); -module_exit(msm_cpp_exit_module); -MODULE_DESCRIPTION("MSM CPP driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.h b/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.h deleted file mode 100644 index e306335a826d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/cpp/msm_cpp.h +++ /dev/null @@ -1,233 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CPP_H__ -#define __MSM_CPP_H__ - -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/* hw version info: - 31:28 Major version - 27:16 Minor version - 15:0 Revision bits -**/ -#define CPP_HW_VERSION_1_1_0 0x10010000 -#define CPP_HW_VERSION_1_1_1 0x10010001 -#define CPP_HW_VERSION_2_0_0 0x20000000 -#define CPP_HW_VERSION_4_0_0 0x40000000 -#define CPP_HW_VERSION_4_1_0 0x40010000 - -#define MAX_ACTIVE_CPP_INSTANCE 8 -#define MAX_CPP_PROCESSING_FRAME 2 -#define MAX_CPP_V4l2_EVENTS 30 - -#define MSM_CPP_MICRO_BASE 0x4000 -#define MSM_CPP_MICRO_HW_VERSION 0x0000 -#define MSM_CPP_MICRO_IRQGEN_STAT 0x0004 -#define MSM_CPP_MICRO_IRQGEN_CLR 0x0008 -#define MSM_CPP_MICRO_IRQGEN_MASK 0x000C -#define MSM_CPP_MICRO_FIFO_TX_DATA 0x0010 -#define MSM_CPP_MICRO_FIFO_TX_STAT 0x0014 -#define MSM_CPP_MICRO_FIFO_RX_DATA 0x0018 -#define MSM_CPP_MICRO_FIFO_RX_STAT 0x001C -#define MSM_CPP_MICRO_BOOT_START 0x0020 -#define MSM_CPP_MICRO_BOOT_LDORG 0x0024 -#define MSM_CPP_MICRO_CLKEN_CTL 0x0030 - -#define MSM_CPP_CMD_GET_BOOTLOADER_VER 0x1 -#define MSM_CPP_CMD_FW_LOAD 0x2 -#define MSM_CPP_CMD_EXEC_JUMP 0x3 -#define MSM_CPP_CMD_RESET_HW 0x5 -#define MSM_CPP_CMD_PROCESS_FRAME 0x6 -#define MSM_CPP_CMD_FLUSH_STREAM 0x7 -#define MSM_CPP_CMD_CFG_MEM_PARAM 0x8 -#define MSM_CPP_CMD_ERROR_REQUEST 0x9 -#define MSM_CPP_CMD_GET_STATUS 0xA -#define MSM_CPP_CMD_GET_FW_VER 0xB - -#define MSM_CPP_MSG_ID_CMD 0x3E646D63 -#define MSM_CPP_MSG_ID_OK 0x0A0A4B4F -#define MSM_CPP_MSG_ID_TRAILER 0xABCDEFAA - -#define MSM_CPP_MSG_ID_JUMP_ACK 0x00000001 -#define MSM_CPP_MSG_ID_FRAME_ACK 0x00000002 -#define MSM_CPP_MSG_ID_FRAME_NACK 0x00000003 -#define MSM_CPP_MSG_ID_FLUSH_ACK 0x00000004 -#define MSM_CPP_MSG_ID_FLUSH_NACK 0x00000005 -#define MSM_CPP_MSG_ID_CFG_MEM_ACK 0x00000006 -#define MSM_CPP_MSG_ID_CFG_MEM_INV 0x00000007 -#define MSM_CPP_MSG_ID_ERROR_STATUS 0x00000008 -#define MSM_CPP_MSG_ID_INVALID_CMD 0x00000009 -#define MSM_CPP_MSG_ID_GEN_STATUS 0x0000000A -#define MSM_CPP_MSG_ID_FLUSHED 0x0000000B -#define MSM_CPP_MSG_ID_FW_VER 0x0000000C - -#define MSM_CPP_JUMP_ADDRESS 0x20 -#define MSM_CPP_START_ADDRESS 0x0 -#define MSM_CPP_END_ADDRESS 0x3F00 - -#define MSM_CPP_POLL_RETRIES 20 -#define MSM_CPP_TASKLETQ_SIZE 16 -#define MSM_CPP_TX_FIFO_LEVEL 16 -#define MSM_CPP_RX_FIFO_LEVEL 512 - -struct cpp_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum cpp_state { - CPP_STATE_BOOT, - CPP_STATE_IDLE, - CPP_STATE_ACTIVE, - CPP_STATE_OFF, -}; - -enum cpp_iommu_state { - CPP_IOMMU_STATE_DETACHED, - CPP_IOMMU_STATE_ATTACHED, -}; - -enum msm_queue { - MSM_CAM_Q_CTRL, /* control command or control command status */ - MSM_CAM_Q_VFE_EVT, /* adsp event */ - MSM_CAM_Q_VFE_MSG, /* adsp message */ - MSM_CAM_Q_V4L2_REQ, /* v4l2 request */ - MSM_CAM_Q_VPE_MSG, /* vpe message */ - MSM_CAM_Q_PP_MSG, /* pp message */ -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - enum msm_queue type; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_cpp_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint32_t tx_fifo[MSM_CPP_TX_FIFO_LEVEL]; - uint32_t tx_level; - uint8_t cmd_used; -}; - -struct msm_cpp_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_cpp_buffer_info_t buff_info; -}; - -struct msm_cpp_buffer_map_list_t { - struct msm_cpp_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_cpp_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct msm_cpp_work_t { - struct work_struct my_work; - struct cpp_device *cpp_dev; -}; -struct msm_cpp_clock_settings_t { - long clock_rate; - uint64_t avg; - uint64_t inst; -}; - -struct cpp_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct resource *vbif_mem; - struct resource *vbif_io; - struct resource *cpp_hw_mem; - void __iomem *vbif_base; - void __iomem *base; - void __iomem *cpp_hw_base; - struct clk **cpp_clk; - struct regulator *fs_cpp; - struct mutex mutex; - enum cpp_state state; - enum cpp_iommu_state iommu_state; - uint8_t is_firmware_loaded; - char *fw_name_bin; - struct workqueue_struct *timer_wq; - struct msm_cpp_work_t *work; - uint32_t fw_version; - uint8_t stream_cnt; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx; - struct ion_client *client; - struct kref refcount; - uint32_t num_clk; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct cpp_tasklet; - struct msm_cpp_tasklet_queue_cmd - tasklet_queue_cmd[MSM_CPP_TASKLETQ_SIZE]; - - struct cpp_subscribe_info cpp_subscribe_list[MAX_ACTIVE_CPP_INSTANCE]; - uint32_t cpp_open_cnt; - struct cpp_hw_info hw_info; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* Processing Queue - * store frame info for frames sent to microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_cpp_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; -#endif /* __MSM_CPP_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/Makefile deleted file mode 100644 index bdeee44022a1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_vpe.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.c b/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.c deleted file mode 100644 index af233cfb76f1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.c +++ /dev/null @@ -1,1655 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-VPE %s:%d " fmt, __func__, __LINE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../include/media/msmb_pproc.h" -#include "msm_vpe.h" -#include "msm_camera_io_util.h" - -#define MSM_VPE_IDENT_TO_SESSION_ID(identity) ((identity >> 16) & 0xFFFF) -#define MSM_VPE_IDENT_TO_STREAM_ID(identity) (identity & 0xFFFF) - -#define MSM_VPE_DRV_NAME "msm_vpe" - -#define MSM_VPE_MAX_BUFF_QUEUE 16 - -#define CONFIG_MSM_VPE_DBG 0 - -#if CONFIG_MSM_VPE_DBG -#define VPE_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define VPE_DBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -static void vpe_mem_dump(const char * const name, const void * const addr, - int size) -{ - char line_str[128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - VPE_DBG("%s: (%s) %pK %d\n", __func__, name, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "%08x: ", (u32) p); - p_str += 10; - } - data = *p++; - snprintf(p_str, 12, "%08x ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - VPE_DBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - VPE_DBG("%s\n", line_str); -} - -static inline long long vpe_do_div(long long num, long long den) -{ - do_div(num, den); - return num; -} - -#define msm_dequeue(queue, member) ({ \ - unsigned long flags; \ - struct msm_device_queue *__q = (queue); \ - struct msm_queue_cmd *qcmd = 0; \ - spin_lock_irqsave(&__q->lock, flags); \ - if (!list_empty(&__q->list)) { \ - __q->len--; \ - qcmd = list_first_entry(&__q->list, \ - struct msm_queue_cmd, \ - member); \ - list_del_init(&qcmd->member); \ - } \ - spin_unlock_irqrestore(&__q->lock, flags); \ - qcmd; \ - }) - -static void msm_queue_init(struct msm_device_queue *queue, const char *name) -{ - spin_lock_init(&queue->lock); - queue->len = 0; - queue->max = 0; - queue->name = name; - INIT_LIST_HEAD(&queue->list); - init_waitqueue_head(&queue->wait); -} - -static struct msm_cam_clk_info vpe_clk_info[] = { - {"vpe_clk", 160000000}, - {"vpe_pclk", -1}, -}; - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev); - -static void msm_enqueue(struct msm_device_queue *queue, - struct list_head *entry) -{ - unsigned long flags; - spin_lock_irqsave(&queue->lock, flags); - queue->len++; - if (queue->len > queue->max) { - queue->max = queue->len; - pr_debug("queue %s new max is %d\n", queue->name, queue->max); - } - list_add_tail(entry, &queue->list); - wake_up(&queue->wait); - VPE_DBG("woke up %s\n", queue->name); - spin_unlock_irqrestore(&queue->lock, flags); -} - -static struct msm_vpe_buff_queue_info_t *msm_vpe_get_buff_queue_entry( - struct vpe_device *vpe_dev, uint32_t session_id, uint32_t stream_id) -{ - uint32_t i = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info = NULL; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if ((vpe_dev->buff_queue[i].used == 1) && - (vpe_dev->buff_queue[i].session_id == session_id) && - (vpe_dev->buff_queue[i].stream_id == stream_id)) { - buff_queue_info = &vpe_dev->buff_queue[i]; - break; - } - } - - if (buff_queue_info == NULL) { - pr_err("error buffer queue entry for sess:%d strm:%d not found\n", - session_id, stream_id); - } - return buff_queue_info; -} - -static unsigned long msm_vpe_get_phy_addr(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info, uint32_t buff_index, - uint8_t native_buff) -{ - unsigned long phy_add = 0; - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - - if (native_buff) - buff_head = &buff_queue_info->native_buff_head; - else - buff_head = &buff_queue_info->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buff_index) { - phy_add = buff->map_info.phy_addr; - break; - } - } - - return phy_add; -} - -static unsigned long msm_vpe_queue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue, - struct msm_vpe_buffer_info_t *buffer_info) -{ - struct list_head *buff_head; - struct msm_vpe_buffer_map_list_t *buff, *save; - int rc = 0; - - if (buffer_info->native_buff) - buff_head = &buff_queue->native_buff_head; - else - buff_head = &buff_queue->vb2_buff_head; - - list_for_each_entry_safe(buff, save, buff_head, entry) { - if (buff->map_info.buff_info.index == buffer_info->index) { - pr_err("error buffer index already queued\n"); - return -EINVAL; - } - } - - buff = kzalloc( - sizeof(struct msm_vpe_buffer_map_list_t), GFP_KERNEL); - if (!buff) { - pr_err("error allocating memory\n"); - return -EINVAL; - } - - buff->map_info.buff_info = *buffer_info; - buff->map_info.ion_handle = ion_import_dma_buf(vpe_dev->client, - buffer_info->fd); - if (IS_ERR_OR_NULL(buff->map_info.ion_handle)) { - pr_err("ION import failed\n"); - goto queue_buff_error1; - } - - rc = ion_map_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0, SZ_4K, 0, - &buff->map_info.phy_addr, - &buff->map_info.len, 0, 0); - if (rc < 0) { - pr_err("ION mmap failed\n"); - goto queue_buff_error2; - } - - INIT_LIST_HEAD(&buff->entry); - list_add_tail(&buff->entry, buff_head); - - return buff->map_info.phy_addr; - -queue_buff_error2: - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); -queue_buff_error1: - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - kzfree(buff); - - return 0; -} - -static void msm_vpe_dequeue_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_map_list_t *buff) -{ - ion_unmap_iommu(vpe_dev->client, buff->map_info.ion_handle, - vpe_dev->domain_num, 0); - ion_free(vpe_dev->client, buff->map_info.ion_handle); - buff->map_info.ion_handle = NULL; - - list_del_init(&buff->entry); - kzfree(buff); - - return; -} - -static unsigned long msm_vpe_fetch_buffer_info(struct vpe_device *vpe_dev, - struct msm_vpe_buffer_info_t *buffer_info, uint32_t session_id, - uint32_t stream_id) -{ - unsigned long phy_addr = 0; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - uint8_t native_buff = buffer_info->native_buff; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return phy_addr; - } - - phy_addr = msm_vpe_get_phy_addr(vpe_dev, buff_queue_info, - buffer_info->index, native_buff); - if ((phy_addr == 0) && (native_buff)) { - phy_addr = msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - buffer_info); - } - return phy_addr; -} - -static int32_t msm_vpe_enqueue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_stream_buff_info_t *stream_buff_info) -{ - uint32_t j; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - (stream_buff_info->identity >> 16) & 0xFFFF, - stream_buff_info->identity & 0xFFFF); - return -EINVAL; - } - - for (j = 0; j < stream_buff_info->num_buffs; j++) { - msm_vpe_queue_buffer_info(vpe_dev, buff_queue_info, - &stream_buff_info->buffer_info[j]); - } - return 0; -} - -static int32_t msm_vpe_dequeue_buff_info_list(struct vpe_device *vpe_dev, - struct msm_vpe_buff_queue_info_t *buff_queue_info) -{ - struct msm_vpe_buffer_map_list_t *buff, *save; - struct list_head *buff_head; - - buff_head = &buff_queue_info->native_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - buff_head = &buff_queue_info->vb2_buff_head; - list_for_each_entry_safe(buff, save, buff_head, entry) { - msm_vpe_dequeue_buffer_info(vpe_dev, buff); - } - - return 0; -} - -static int32_t msm_vpe_add_buff_queue_entry(struct vpe_device *vpe_dev, - uint16_t session_id, uint16_t stream_id) -{ - uint32_t i; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 0) { - buff_queue_info = &vpe_dev->buff_queue[i]; - buff_queue_info->used = 1; - buff_queue_info->session_id = session_id; - buff_queue_info->stream_id = stream_id; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; - } - } - pr_err("buffer queue full. error for sessionid: %d streamid: %d\n", - session_id, stream_id); - return -EINVAL; -} - -static int32_t msm_vpe_free_buff_queue_entry(struct vpe_device *vpe_dev, - uint32_t session_id, uint32_t stream_id) -{ - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, session_id, - stream_id); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for sessid:%d strmid:%d\n", - session_id, stream_id); - return -EINVAL; - } - - buff_queue_info->used = 0; - buff_queue_info->session_id = 0; - buff_queue_info->stream_id = 0; - INIT_LIST_HEAD(&buff_queue_info->vb2_buff_head); - INIT_LIST_HEAD(&buff_queue_info->native_buff_head); - return 0; -} - -static int32_t msm_vpe_create_buff_queue(struct vpe_device *vpe_dev, - uint32_t num_buffq) -{ - struct msm_vpe_buff_queue_info_t *buff_queue; - buff_queue = kzalloc( - sizeof(struct msm_vpe_buff_queue_info_t) * num_buffq, - GFP_KERNEL); - if (!buff_queue) { - pr_err("Buff queue allocation failure\n"); - return -ENOMEM; - } - - if (vpe_dev->buff_queue) { - pr_err("Buff queue not empty\n"); - kzfree(buff_queue); - return -EINVAL; - } else { - vpe_dev->buff_queue = buff_queue; - vpe_dev->num_buffq = num_buffq; - } - return 0; -} - -static void msm_vpe_delete_buff_queue(struct vpe_device *vpe_dev) -{ - uint32_t i; - - for (i = 0; i < vpe_dev->num_buffq; i++) { - if (vpe_dev->buff_queue[i].used == 1) { - pr_err("Queue not free sessionid: %d, streamid: %d\n", - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - msm_vpe_free_buff_queue_entry(vpe_dev, - vpe_dev->buff_queue[i].session_id, - vpe_dev->buff_queue[i].stream_id); - } - } - kzfree(vpe_dev->buff_queue); - vpe_dev->buff_queue = NULL; - vpe_dev->num_buffq = 0; - return; -} - -void vpe_release_ion_client(struct kref *ref) -{ - struct vpe_device *vpe_dev = container_of(ref, - struct vpe_device, refcount); - ion_client_destroy(vpe_dev->client); -} - -static int vpe_init_mem(struct vpe_device *vpe_dev) -{ - kref_init(&vpe_dev->refcount); - kref_get(&vpe_dev->refcount); - vpe_dev->client = msm_ion_client_create("vpe"); - - if (!vpe_dev->client) { - pr_err("couldn't create ion client\n"); - return -ENODEV; - } - - return 0; -} - -static void vpe_deinit_mem(struct vpe_device *vpe_dev) -{ - kref_put(&vpe_dev->refcount, vpe_release_ion_client); -} - -static irqreturn_t msm_vpe_irq(int irq_num, void *data) -{ - unsigned long flags; - uint32_t irq_status; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - struct vpe_device *vpe_dev = (struct vpe_device *) data; - - irq_status = msm_camera_io_r_mb(vpe_dev->base + - VPE_INTR_STATUS_OFFSET); - - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = &vpe_dev->tasklet_queue_cmd[vpe_dev->taskletq_idx]; - if (queue_cmd->cmd_used) { - VPE_DBG("%s: vpe tasklet queue overflow\n", __func__); - list_del(&queue_cmd->list); - } else { - atomic_add(1, &vpe_dev->irq_cnt); - } - queue_cmd->irq_status = irq_status; - - queue_cmd->cmd_used = 1; - vpe_dev->taskletq_idx = - (vpe_dev->taskletq_idx + 1) % MSM_VPE_TASKLETQ_SIZE; - list_add_tail(&queue_cmd->list, &vpe_dev->tasklet_q); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - tasklet_schedule(&vpe_dev->vpe_tasklet); - - msm_camera_io_w_mb(irq_status, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - VPE_DBG("%s: irq_status=0x%x.\n", __func__, irq_status); - - return IRQ_HANDLED; -} - -static void msm_vpe_do_tasklet(unsigned long data) -{ - unsigned long flags; - struct vpe_device *vpe_dev = (struct vpe_device *)data; - struct msm_vpe_tasklet_queue_cmd *queue_cmd; - - while (atomic_read(&vpe_dev->irq_cnt)) { - spin_lock_irqsave(&vpe_dev->tasklet_lock, flags); - queue_cmd = list_first_entry(&vpe_dev->tasklet_q, - struct msm_vpe_tasklet_queue_cmd, list); - if (!queue_cmd) { - atomic_set(&vpe_dev->irq_cnt, 0); - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - return; - } - atomic_sub(1, &vpe_dev->irq_cnt); - list_del(&queue_cmd->list); - queue_cmd->cmd_used = 0; - - spin_unlock_irqrestore(&vpe_dev->tasklet_lock, flags); - - VPE_DBG("Frame done!!\n"); - msm_vpe_notify_frame_done(vpe_dev); - } -} - -static int vpe_init_hardware(struct vpe_device *vpe_dev) -{ - int rc = 0; - - if (vpe_dev->fs_vpe == NULL) { - vpe_dev->fs_vpe = - regulator_get(&vpe_dev->pdev->dev, "vdd"); - if (IS_ERR(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd get failed %ld\n", - PTR_ERR(vpe_dev->fs_vpe)); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } else if (regulator_enable(vpe_dev->fs_vpe)) { - pr_err("Regulator vpe vdd enable failed\n"); - regulator_put(vpe_dev->fs_vpe); - vpe_dev->fs_vpe = NULL; - rc = -ENODEV; - goto fail; - } - } - - rc = msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 1); - if (rc < 0) { - pr_err("clk enable failed\n"); - goto disable_and_put_regulator; - } - - vpe_dev->base = ioremap(vpe_dev->mem->start, - resource_size(vpe_dev->mem)); - if (!vpe_dev->base) { - rc = -ENOMEM; - pr_err("ioremap failed\n"); - goto disable_and_put_regulator; - } - - if (vpe_dev->state != VPE_STATE_BOOT) { - rc = request_irq(vpe_dev->irq->start, msm_vpe_irq, - IRQF_TRIGGER_RISING, - "vpe", vpe_dev); - if (rc < 0) { - pr_err("irq request fail! start=%u\n", - (uint32_t) vpe_dev->irq->start); - rc = -EBUSY; - goto unmap_base; - } else { - VPE_DBG("Got irq! %d\n", (int)vpe_dev->irq->start); - } - } else { - VPE_DBG("Skip requesting the irq since device is booting\n"); - } - vpe_dev->buf_mgr_subdev = msm_buf_mngr_get_subdev(); - - msm_vpe_create_buff_queue(vpe_dev, MSM_VPE_MAX_BUFF_QUEUE); - return rc; - -unmap_base: - iounmap(vpe_dev->base); -disable_and_put_regulator: - regulator_disable(vpe_dev->fs_vpe); - regulator_put(vpe_dev->fs_vpe); -fail: - return rc; -} - -static int vpe_release_hardware(struct vpe_device *vpe_dev) -{ - if (vpe_dev->state != VPE_STATE_BOOT) { - free_irq(vpe_dev->irq->start, vpe_dev); - tasklet_kill(&vpe_dev->vpe_tasklet); - atomic_set(&vpe_dev->irq_cnt, 0); - } - - msm_vpe_delete_buff_queue(vpe_dev); - iounmap(vpe_dev->base); - msm_cam_clk_enable(&vpe_dev->pdev->dev, vpe_clk_info, - vpe_dev->vpe_clk, ARRAY_SIZE(vpe_clk_info), 0); - return 0; -} - -static int vpe_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - int rc = 0; - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - - mutex_lock(&vpe_dev->mutex); - if (vpe_dev->vpe_open_cnt == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free VPE instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].active == 0) { - vpe_dev->vpe_subscribe_list[i].active = 1; - vpe_dev->vpe_subscribe_list[i].vfh = &fh->vfh; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("No free instance\n"); - rc = -ENODEV; - goto err_mutex_unlock; - } - - VPE_DBG("open %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt++; - if (vpe_dev->vpe_open_cnt == 1) { - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - vpe_dev->vpe_open_cnt--; - goto err_fixup_sub_list; - } - rc = vpe_init_mem(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init mem\n", __func__); - vpe_dev->vpe_open_cnt--; - rc = -ENODEV; - goto err_release_hardware; - } - vpe_dev->state = VPE_STATE_IDLE; - } - mutex_unlock(&vpe_dev->mutex); - - return rc; - -err_release_hardware: - vpe_release_hardware(vpe_dev); -err_fixup_sub_list: - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } -err_mutex_unlock: - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int vpe_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) -{ - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - mutex_lock(&vpe_dev->mutex); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == &fh->vfh) { - vpe_dev->vpe_subscribe_list[i].active = 0; - vpe_dev->vpe_subscribe_list[i].vfh = NULL; - break; - } - } - if (i == MAX_ACTIVE_VPE_INSTANCE) { - pr_err("Invalid close\n"); - mutex_unlock(&vpe_dev->mutex); - return -ENODEV; - } - - VPE_DBG("close %d %pK\n", i, &fh->vfh); - vpe_dev->vpe_open_cnt--; - if (vpe_dev->vpe_open_cnt == 0) { - vpe_deinit_mem(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - } - mutex_unlock(&vpe_dev->mutex); - return 0; -} - -static const struct v4l2_subdev_internal_ops msm_vpe_internal_ops = { - .open = vpe_open_node, - .close = vpe_close_node, -}; - -static int msm_vpe_buffer_ops(struct vpe_device *vpe_dev, - uint32_t buff_mgr_ops, struct msm_buf_mngr_info *buff_mgr_info) -{ - int rc = -EINVAL; - - rc = v4l2_subdev_call(vpe_dev->buf_mgr_subdev, core, ioctl, - buff_mgr_ops, buff_mgr_info); - if (rc < 0) - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; -} - -static int msm_vpe_notify_frame_done(struct vpe_device *vpe_dev) -{ - struct v4l2_event v4l2_evt; - struct msm_queue_cmd *frame_qcmd; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *processed_frame; - struct msm_device_queue *queue = &vpe_dev->processing_q; - struct msm_buf_mngr_info buff_mgr_info; - int rc = 0; - - if (queue->len > 0) { - frame_qcmd = msm_dequeue(queue, list_frame); - processed_frame = frame_qcmd->command; - do_gettimeofday(&(processed_frame->out_time)); - kfree(frame_qcmd); - event_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_ATOMIC); - if (!event_qcmd) { - pr_err("%s: Insufficient memory\n", __func__); - return -ENOMEM; - } - atomic_set(&event_qcmd->on_heap, 1); - event_qcmd->command = processed_frame; - VPE_DBG("fid %d\n", processed_frame->frame_id); - msm_enqueue(&vpe_dev->eventData_q, &event_qcmd->list_eventdata); - - if (!processed_frame->output_buffer_info.processed_divert) { - memset(&buff_mgr_info, 0 , - sizeof(buff_mgr_info)); - buff_mgr_info.session_id = - ((processed_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = - (processed_frame->identity & 0xFFFF); - buff_mgr_info.frame_id = processed_frame->frame_id; - buff_mgr_info.timestamp = processed_frame->timestamp; - buff_mgr_info.index = - processed_frame->output_buffer_info.index; - rc = msm_vpe_buffer_ops(vpe_dev, - VIDIOC_MSM_BUF_MNGR_BUF_DONE, - &buff_mgr_info); - if (rc < 0) { - pr_err("%s: error doing VIDIOC_MSM_BUF_MNGR_BUF_DONE\n", - __func__); - rc = -EINVAL; - } - } - - v4l2_evt.id = processed_frame->inst_id; - v4l2_evt.type = V4L2_EVENT_VPE_FRAME_DONE; - v4l2_event_queue(vpe_dev->msm_sd.sd.devnode, &v4l2_evt); - } - return rc; -} - -static void vpe_update_scaler_params(struct vpe_device *vpe_dev, - struct msm_vpe_frame_strip_info strip_info) -{ - uint32_t out_ROI_width, out_ROI_height; - uint32_t src_ROI_width, src_ROI_height; - - /* - * phase_step_x, phase_step_y, phase_init_x and phase_init_y - * are represented in fixed-point, unsigned 3.29 format - */ - uint32_t phase_step_x = 0; - uint32_t phase_step_y = 0; - uint32_t phase_init_x = 0; - uint32_t phase_init_y = 0; - - uint32_t src_roi, src_x, src_y, src_xy, temp; - uint32_t yscale_filter_sel, xscale_filter_sel; - uint32_t scale_unit_sel_x, scale_unit_sel_y; - uint64_t numerator, denominator; - - /* - * assumption is both direction need zoom. this can be - * improved. - */ - temp = msm_camera_io_r(vpe_dev->base + VPE_OP_MODE_OFFSET) | 0x3; - msm_camera_io_w(temp, vpe_dev->base + VPE_OP_MODE_OFFSET); - - src_ROI_width = strip_info.src_w; - src_ROI_height = strip_info.src_h; - out_ROI_width = strip_info.dst_w; - out_ROI_height = strip_info.dst_h; - - VPE_DBG("src w = %u, h=%u, dst w = %u, h =%u.\n", - src_ROI_width, src_ROI_height, out_ROI_width, - out_ROI_height); - src_roi = (src_ROI_height << 16) + src_ROI_width; - - msm_camera_io_w(src_roi, vpe_dev->base + VPE_SRC_SIZE_OFFSET); - - src_x = strip_info.src_x; - src_y = strip_info.src_y; - - VPE_DBG("src_x = %d, src_y=%d.\n", src_x, src_y); - - src_xy = src_y*(1<<16) + src_x; - msm_camera_io_w(src_xy, vpe_dev->base + - VPE_SRC_XY_OFFSET); - VPE_DBG("src_xy = 0x%x, src_roi=0x%x.\n", src_xy, src_roi); - - /* decide whether to use FIR or M/N for scaling */ - if ((out_ROI_width == 1 && src_ROI_width < 4) || - (src_ROI_width < 4 * out_ROI_width - 3)) - scale_unit_sel_x = 0;/* use FIR scalar */ - else - scale_unit_sel_x = 1;/* use M/N scalar */ - - if ((out_ROI_height == 1 && src_ROI_height < 4) || - (src_ROI_height < 4 * out_ROI_height - 3)) - scale_unit_sel_y = 0;/* use FIR scalar */ - else - scale_unit_sel_y = 1;/* use M/N scalar */ - - /* calculate phase step for the x direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_width == 1) - phase_step_x = (uint32_t) ((src_ROI_width) << - SCALER_PHASE_BITS); - - /* if using FIR scalar */ - else if (scale_unit_sel_x == 0) { - - /* - * Calculate the quotient ( src_ROI_width - 1 ) ( - * out_ROI_width - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point - */ - numerator = (uint64_t)(src_ROI_width - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the "(out_ROI_width == - * 1 )" - */ - denominator = (uint64_t)(out_ROI_width - 1); - /* - * divide and round up to the larger 29th decimal - * point. - */ - phase_step_x = (uint32_t) vpe_do_div((numerator + - denominator - 1), denominator); - } else if (scale_unit_sel_x == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_width ) / ( - * out_ROI_width) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_width) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_width); - phase_step_x = - (uint32_t) vpe_do_div(numerator, denominator); - } - /* calculate phase step for the y direction */ - - /* - * if destination is only 1 pixel wide, the value of - * phase_step_x is unimportant. Assigning phase_step_x to src - * ROI width as an arbitrary value. - */ - if (out_ROI_height == 1) - phase_step_y = - (uint32_t) ((src_ROI_height) << SCALER_PHASE_BITS); - - /* if FIR scalar */ - else if (scale_unit_sel_y == 0) { - /* - * Calculate the quotient ( src_ROI_height - 1 ) / ( - * out_ROI_height - 1) with u3.29 precision. Quotient - * is rounded up to the larger 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height - 1) << - SCALER_PHASE_BITS; - /* - * never equals to 0 because of the " ( out_ROI_height - * == 1 )" case - */ - denominator = (uint64_t)(out_ROI_height - 1); - /* - * Quotient is rounded up to the larger 29th decimal - * point. - */ - phase_step_y = - (uint32_t) vpe_do_div( - (numerator + denominator - 1), denominator); - } else if (scale_unit_sel_y == 1) { /* if M/N scalar */ - /* - * Calculate the quotient ( src_ROI_height ) ( - * out_ROI_height) with u3.29 precision. Quotient is - * rounded down to the smaller 29th decimal point. - */ - numerator = (uint64_t)(src_ROI_height) << - SCALER_PHASE_BITS; - denominator = (uint64_t)(out_ROI_height); - phase_step_y = (uint32_t) vpe_do_div( - numerator, denominator); - } - - /* decide which set of FIR coefficients to use */ - if (phase_step_x > HAL_MDP_PHASE_STEP_2P50) - xscale_filter_sel = 0; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P66) - xscale_filter_sel = 1; - else if (phase_step_x > HAL_MDP_PHASE_STEP_1P25) - xscale_filter_sel = 2; - else - xscale_filter_sel = 3; - - if (phase_step_y > HAL_MDP_PHASE_STEP_2P50) - yscale_filter_sel = 0; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P66) - yscale_filter_sel = 1; - else if (phase_step_y > HAL_MDP_PHASE_STEP_1P25) - yscale_filter_sel = 2; - else - yscale_filter_sel = 3; - - /* calculate phase init for the x direction */ - - /* if using FIR scalar */ - if (scale_unit_sel_x == 0) { - if (out_ROI_width == 1) - phase_init_x = - (uint32_t) ((src_ROI_width - 1) << - SCALER_PHASE_BITS); - else - phase_init_x = 0; - } else if (scale_unit_sel_x == 1) /* M over N scalar */ - phase_init_x = 0; - - /* - * calculate phase init for the y direction if using FIR - * scalar - */ - if (scale_unit_sel_y == 0) { - if (out_ROI_height == 1) - phase_init_y = - (uint32_t) ((src_ROI_height - - 1) << SCALER_PHASE_BITS); - else - phase_init_y = 0; - } else if (scale_unit_sel_y == 1) /* M over N scalar */ - phase_init_y = 0; - - strip_info.phase_step_x = phase_step_x; - strip_info.phase_step_y = phase_step_y; - strip_info.phase_init_x = phase_init_x; - strip_info.phase_init_y = phase_init_y; - VPE_DBG("phase step x = %d, step y = %d.\n", - strip_info.phase_step_x, strip_info.phase_step_y); - VPE_DBG("phase init x = %d, init y = %d.\n", - strip_info.phase_init_x, strip_info.phase_init_y); - - msm_camera_io_w(strip_info.phase_step_x, vpe_dev->base + - VPE_SCALE_PHASEX_STEP_OFFSET); - msm_camera_io_w(strip_info.phase_step_y, vpe_dev->base + - VPE_SCALE_PHASEY_STEP_OFFSET); - - msm_camera_io_w(strip_info.phase_init_x, vpe_dev->base + - VPE_SCALE_PHASEX_INIT_OFFSET); - msm_camera_io_w(strip_info.phase_init_y, vpe_dev->base + - VPE_SCALE_PHASEY_INIT_OFFSET); -} - -static void vpe_program_buffer_addresses( - struct vpe_device *vpe_dev, - unsigned long srcP0, - unsigned long srcP1, - unsigned long outP0, - unsigned long outP1) -{ - VPE_DBG("%s VPE Configured with:\n" - "Src %x, %x Dest %x, %x", - __func__, (uint32_t)srcP0, (uint32_t)srcP1, - (uint32_t)outP0, (uint32_t)outP1); - - msm_camera_io_w(srcP0, vpe_dev->base + VPE_SRCP0_ADDR_OFFSET); - msm_camera_io_w(srcP1, vpe_dev->base + VPE_SRCP1_ADDR_OFFSET); - msm_camera_io_w(outP0, vpe_dev->base + VPE_OUTP0_ADDR_OFFSET); - msm_camera_io_w(outP1, vpe_dev->base + VPE_OUTP1_ADDR_OFFSET); -} - -static int vpe_start(struct vpe_device *vpe_dev) -{ - /* enable the frame irq, bit 0 = Display list 0 ROI done */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - msm_camera_io_dump(vpe_dev->base, 0x120); - msm_camera_io_dump(vpe_dev->base + 0x00400, 0x18); - msm_camera_io_dump(vpe_dev->base + 0x10000, 0x250); - msm_camera_io_dump(vpe_dev->base + 0x30000, 0x20); - msm_camera_io_dump(vpe_dev->base + 0x50000, 0x30); - msm_camera_io_dump(vpe_dev->base + 0x50400, 0x10); - - /* - * This triggers the operation. When the VPE is done, - * msm_vpe_irq will fire. - */ - msm_camera_io_w_mb(1, vpe_dev->base + VPE_DL0_START_OFFSET); - return 0; -} - -static void vpe_config_axi_default(struct vpe_device *vpe_dev) -{ - msm_camera_io_w(0x25, vpe_dev->base + VPE_AXI_ARB_2_OFFSET); -} - -static int vpe_reset(struct vpe_device *vpe_dev) -{ - uint32_t vpe_version; - uint32_t rc = 0; - - vpe_version = msm_camera_io_r( - vpe_dev->base + VPE_HW_VERSION_OFFSET); - VPE_DBG("vpe_version = 0x%x\n", vpe_version); - /* disable all interrupts.*/ - msm_camera_io_w(0, vpe_dev->base + VPE_INTR_ENABLE_OFFSET); - /* clear all pending interrupts*/ - msm_camera_io_w(0x1fffff, vpe_dev->base + VPE_INTR_CLEAR_OFFSET); - /* write sw_reset to reset the core. */ - msm_camera_io_w(0x10, vpe_dev->base + VPE_SW_RESET_OFFSET); - /* then poll the reset bit, it should be self-cleared. */ - while (1) { - rc = msm_camera_io_r(vpe_dev->base + VPE_SW_RESET_OFFSET) \ - & 0x10; - if (rc == 0) - break; - cpu_relax(); - } - /* - * at this point, hardware is reset. Then pogram to default - * values. - */ - msm_camera_io_w(VPE_AXI_RD_ARB_CONFIG_VALUE, - vpe_dev->base + VPE_AXI_RD_ARB_CONFIG_OFFSET); - - msm_camera_io_w(VPE_CGC_ENABLE_VALUE, - vpe_dev->base + VPE_CGC_EN_OFFSET); - msm_camera_io_w(1, vpe_dev->base + VPE_CMD_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_OP_MODE_VALUE, - vpe_dev->base + VPE_OP_MODE_OFFSET); - msm_camera_io_w(VPE_DEFAULT_SCALE_CONFIG, - vpe_dev->base + VPE_SCALE_CONFIG_OFFSET); - vpe_config_axi_default(vpe_dev); - return rc; -} - -static void vpe_update_scale_coef(struct vpe_device *vpe_dev, uint32_t *p) -{ - uint32_t i, offset; - offset = *p; - for (i = offset; i < (VPE_SCALE_COEFF_NUM + offset); i++) { - VPE_DBG("Setting scale table %d\n", i); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_LSBn(i)); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SCALE_COEFF_MSBn(i)); - } -} - -static void vpe_input_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_SRC_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_SRC_UNPACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_IMAGE_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_SRC_XY_OFFSET); -} - -static void vpe_output_plane_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OUT_FORMAT_OFFSET); - msm_camera_io_w(*(++p), - vpe_dev->base + VPE_OUT_PACK_PATTERN1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_YSTRIDE1_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_SIZE_OFFSET); - msm_camera_io_w(*(++p), vpe_dev->base + VPE_OUT_XY_OFFSET); -} - -static void vpe_operation_config(struct vpe_device *vpe_dev, uint32_t *p) -{ - msm_camera_io_w(*p, vpe_dev->base + VPE_OP_MODE_OFFSET); -} - -/** - * msm_vpe_transaction_setup() - send setup for one frame to VPE - * @vpe_dev: vpe device - * @data: packed setup commands - * - * See msm_vpe.h for the expected format of `data' - */ -static void msm_vpe_transaction_setup(struct vpe_device *vpe_dev, void *data) -{ - int i; - void *iter = data; - - vpe_mem_dump("vpe_transaction", data, VPE_TRANSACTION_SETUP_CONFIG_LEN); - - for (i = 0; i < VPE_NUM_SCALER_TABLES; ++i) { - vpe_update_scale_coef(vpe_dev, (uint32_t *)iter); - iter += VPE_SCALER_CONFIG_LEN; - } - vpe_input_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_INPUT_PLANE_CFG_LEN; - vpe_output_plane_config(vpe_dev, (uint32_t *)iter); - iter += VPE_OUTPUT_PLANE_CFG_LEN; - vpe_operation_config(vpe_dev, (uint32_t *)iter); -} - -static int msm_vpe_send_frame_to_hardware(struct vpe_device *vpe_dev, - struct msm_queue_cmd *frame_qcmd) -{ - struct msm_vpe_frame_info_t *process_frame; - - if (vpe_dev->processing_q.len < MAX_VPE_PROCESSING_FRAME) { - process_frame = frame_qcmd->command; - msm_enqueue(&vpe_dev->processing_q, - &frame_qcmd->list_frame); - - vpe_update_scaler_params(vpe_dev, process_frame->strip_info); - vpe_program_buffer_addresses( - vpe_dev, - process_frame->src_phyaddr, - process_frame->src_phyaddr - + process_frame->src_chroma_plane_offset, - process_frame->dest_phyaddr, - process_frame->dest_phyaddr - + process_frame->dest_chroma_plane_offset); - vpe_start(vpe_dev); - do_gettimeofday(&(process_frame->in_time)); - } - return 0; -} - -static int msm_vpe_cfg(struct vpe_device *vpe_dev, - struct msm_camera_v4l2_ioctl_t *ioctl_ptr) -{ - int rc = 0; - struct msm_queue_cmd *frame_qcmd = NULL; - struct msm_vpe_frame_info_t *new_frame = - kzalloc(sizeof(struct msm_vpe_frame_info_t), GFP_KERNEL); - unsigned long in_phyaddr, out_phyaddr; - struct msm_buf_mngr_info buff_mgr_info; - - if (!new_frame) { - pr_err("Insufficient memory. return\n"); - return -ENOMEM; - } - - rc = copy_from_user(new_frame, (void __user *)ioctl_ptr->ioctl_ptr, - sizeof(struct msm_vpe_frame_info_t)); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - rc = -EINVAL; - goto err_free_new_frame; - } - - in_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->input_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!in_phyaddr) { - pr_err("error gettting input physical address\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - memset(&new_frame->output_buffer_info, 0, - sizeof(struct msm_vpe_buffer_info_t)); - memset(&buff_mgr_info, 0, sizeof(struct msm_buf_mngr_info)); - buff_mgr_info.session_id = ((new_frame->identity >> 16) & 0xFFFF); - buff_mgr_info.stream_id = (new_frame->identity & 0xFFFF); - rc = msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_GET_BUF, - &buff_mgr_info); - if (rc < 0) { - pr_err("error getting buffer\n"); - rc = -EINVAL; - goto err_free_new_frame; - } - - new_frame->output_buffer_info.index = buff_mgr_info.index; - out_phyaddr = msm_vpe_fetch_buffer_info(vpe_dev, - &new_frame->output_buffer_info, - ((new_frame->identity >> 16) & 0xFFFF), - (new_frame->identity & 0xFFFF)); - if (!out_phyaddr) { - pr_err("error gettting output physical address\n"); - rc = -EINVAL; - goto err_put_buf; - } - - new_frame->src_phyaddr = in_phyaddr; - new_frame->dest_phyaddr = out_phyaddr; - - frame_qcmd = kzalloc(sizeof(struct msm_queue_cmd), GFP_KERNEL); - if (!frame_qcmd) { - pr_err("Insufficient memory. return\n"); - rc = -ENOMEM; - goto err_put_buf; - } - - atomic_set(&frame_qcmd->on_heap, 1); - frame_qcmd->command = new_frame; - rc = msm_vpe_send_frame_to_hardware(vpe_dev, frame_qcmd); - if (rc < 0) { - pr_err("error cannot send frame to hardware\n"); - rc = -EINVAL; - goto err_free_frame_qcmd; - } - - return rc; - -err_free_frame_qcmd: - kfree(frame_qcmd); -err_put_buf: - msm_vpe_buffer_ops(vpe_dev, VIDIOC_MSM_BUF_MNGR_PUT_BUF, - &buff_mgr_info); -err_free_new_frame: - kfree(new_frame); - return rc; -} - -static long msm_vpe_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - int rc = 0; - - mutex_lock(&vpe_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_VPE_TRANSACTION_SETUP: { - struct msm_vpe_transaction_setup_cfg *cfg; - VPE_DBG("VIDIOC_MSM_VPE_TRANSACTION_SETUP\n"); - if (sizeof(*cfg) != ioctl_ptr->len) { - pr_err("%s: size mismatch cmd=%d, len=%d, expected=%d", - __func__, cmd, ioctl_ptr->len, - sizeof(*cfg)); - rc = -EINVAL; - break; - } - - cfg = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!cfg) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = copy_from_user(cfg, (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(cfg); - break; - } - - msm_vpe_transaction_setup(vpe_dev, (void *)cfg); - kfree(cfg); - break; - } - case VIDIOC_MSM_VPE_CFG: { - VPE_DBG("VIDIOC_MSM_VPE_CFG\n"); - rc = msm_vpe_cfg(vpe_dev, ioctl_ptr); - break; - } - case VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO: { - struct msm_vpe_stream_buff_info_t *u_stream_buff_info; - struct msm_vpe_stream_buff_info_t k_stream_buff_info; - - VPE_DBG("VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO\n"); - - if (sizeof(struct msm_vpe_stream_buff_info_t) != - ioctl_ptr->len) { - pr_err("%s:%d: invalid length\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - u_stream_buff_info = kzalloc(ioctl_ptr->len, GFP_KERNEL); - if (!u_stream_buff_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(u_stream_buff_info, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - if ((u_stream_buff_info->num_buffs == 0) || - (u_stream_buff_info->num_buffs > - MSM_CAMERA_MAX_STREAM_BUF)) { - pr_err("%s:%d: Invalid number of buffers\n", __func__, - __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - k_stream_buff_info.num_buffs = u_stream_buff_info->num_buffs; - k_stream_buff_info.identity = u_stream_buff_info->identity; - k_stream_buff_info.buffer_info = - kzalloc(k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t), GFP_KERNEL); - if (!k_stream_buff_info.buffer_info) { - pr_err("%s:%d: malloc error\n", __func__, __LINE__); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(k_stream_buff_info.buffer_info, - (void __user *)u_stream_buff_info->buffer_info, - k_stream_buff_info.num_buffs * - sizeof(struct msm_vpe_buffer_info_t)) ? - -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = msm_vpe_add_buff_queue_entry(vpe_dev, - ((k_stream_buff_info.identity >> 16) & 0xFFFF), - (k_stream_buff_info.identity & 0xFFFF)); - if (!rc) - rc = msm_vpe_enqueue_buff_info_list(vpe_dev, - &k_stream_buff_info); - - kfree(k_stream_buff_info.buffer_info); - kfree(u_stream_buff_info); - break; - } - case VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO: { - uint32_t identity; - struct msm_vpe_buff_queue_info_t *buff_queue_info; - - VPE_DBG("VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO\n"); - if (ioctl_ptr->len != sizeof(uint32_t)) { - pr_err("%s:%d Invalid len\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - rc = (copy_from_user(&identity, - (void __user *)ioctl_ptr->ioctl_ptr, - ioctl_ptr->len) ? -EFAULT : 0); - if (rc) { - pr_err("%s:%d copy from user\n", __func__, __LINE__); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - buff_queue_info = msm_vpe_get_buff_queue_entry(vpe_dev, - ((identity >> 16) & 0xFFFF), (identity & 0xFFFF)); - if (buff_queue_info == NULL) { - pr_err("error finding buffer queue entry for identity:%d\n", - identity); - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - msm_vpe_dequeue_buff_info_list(vpe_dev, buff_queue_info); - rc = msm_vpe_free_buff_queue_entry(vpe_dev, - buff_queue_info->session_id, - buff_queue_info->stream_id); - break; - } - case VIDIOC_MSM_VPE_GET_EVENTPAYLOAD: { - struct msm_device_queue *queue = &vpe_dev->eventData_q; - struct msm_queue_cmd *event_qcmd; - struct msm_vpe_frame_info_t *process_frame; - VPE_DBG("VIDIOC_MSM_VPE_GET_EVENTPAYLOAD\n"); - event_qcmd = msm_dequeue(queue, list_eventdata); - process_frame = event_qcmd->command; - VPE_DBG("fid %d\n", process_frame->frame_id); - if (copy_to_user((void __user *)ioctl_ptr->ioctl_ptr, - process_frame, - sizeof(struct msm_vpe_frame_info_t))) { - mutex_unlock(&vpe_dev->mutex); - return -EINVAL; - } - - kfree(process_frame); - kfree(event_qcmd); - break; - } - } - mutex_unlock(&vpe_dev->mutex); - return rc; -} - -static int msm_vpe_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_subscribe(fh, sub, MAX_VPE_V4l2_EVENTS, NULL); -} - -static int msm_vpe_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, - struct v4l2_event_subscription *sub) -{ - return v4l2_event_unsubscribe(fh, sub); -} - -static struct v4l2_subdev_core_ops msm_vpe_subdev_core_ops = { - .ioctl = msm_vpe_subdev_ioctl, - .subscribe_event = msm_vpe_subscribe_event, - .unsubscribe_event = msm_vpe_unsubscribe_event, -}; - -static const struct v4l2_subdev_ops msm_vpe_subdev_ops = { - .core = &msm_vpe_subdev_core_ops, -}; - -static struct v4l2_file_operations msm_vpe_v4l2_subdev_fops; - -static long msm_vpe_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct v4l2_fh *vfh = file->private_data; - - switch (cmd) { - case VIDIOC_DQEVENT: - if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) - return -ENOIOCTLCMD; - - return v4l2_event_dequeue(vfh, arg, file->f_flags & O_NONBLOCK); - - case VIDIOC_SUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg); - - case VIDIOC_UNSUBSCRIBE_EVENT: - return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg); - case VIDIOC_MSM_VPE_GET_INST_INFO: { - uint32_t i; - struct vpe_device *vpe_dev = v4l2_get_subdevdata(sd); - struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg; - struct msm_vpe_frame_info_t inst_info; - memset(&inst_info, 0, sizeof(struct msm_vpe_frame_info_t)); - for (i = 0; i < MAX_ACTIVE_VPE_INSTANCE; i++) { - if (vpe_dev->vpe_subscribe_list[i].vfh == vfh) { - inst_info.inst_id = i; - break; - } - } - if (copy_to_user( - (void __user *)ioctl_ptr->ioctl_ptr, &inst_info, - sizeof(struct msm_vpe_frame_info_t))) { - return -EINVAL; - } - } - default: - return v4l2_subdev_call(sd, core, ioctl, cmd, arg); - } - - return 0; -} - -static long msm_vpe_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_vpe_subdev_do_ioctl); -} - -static int vpe_register_domain(void) -{ - struct msm_iova_partition vpe_iommu_partition = { - /* TODO: verify that these are correct? */ - .start = SZ_128K, - .size = SZ_2G - SZ_128K, - }; - struct msm_iova_layout vpe_iommu_layout = { - .partitions = &vpe_iommu_partition, - .npartitions = 1, - .client_name = "camera_vpe", - .domain_flags = 0, - }; - - return msm_register_domain(&vpe_iommu_layout); -} - -static int vpe_probe(struct platform_device *pdev) -{ - struct vpe_device *vpe_dev; - int rc = 0; - - vpe_dev = kzalloc(sizeof(struct vpe_device), GFP_KERNEL); - if (!vpe_dev) { - pr_err("not enough memory\n"); - return -ENOMEM; - } - - vpe_dev->vpe_clk = kzalloc(sizeof(struct clk *) * - ARRAY_SIZE(vpe_clk_info), GFP_KERNEL); - if (!vpe_dev->vpe_clk) { - pr_err("not enough memory\n"); - rc = -ENOMEM; - goto err_free_vpe_dev; - } - - v4l2_subdev_init(&vpe_dev->msm_sd.sd, &msm_vpe_subdev_ops); - vpe_dev->msm_sd.sd.internal_ops = &msm_vpe_internal_ops; - snprintf(vpe_dev->msm_sd.sd.name, ARRAY_SIZE(vpe_dev->msm_sd.sd.name), - "vpe"); - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - vpe_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_EVENTS; - v4l2_set_subdevdata(&vpe_dev->msm_sd.sd, vpe_dev); - platform_set_drvdata(pdev, &vpe_dev->msm_sd.sd); - mutex_init(&vpe_dev->mutex); - spin_lock_init(&vpe_dev->tasklet_lock); - - vpe_dev->pdev = pdev; - - vpe_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "vpe"); - if (!vpe_dev->mem) { - pr_err("no mem resource?\n"); - rc = -ENODEV; - goto err_free_vpe_clk; - } - - vpe_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "vpe"); - if (!vpe_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain_num = vpe_register_domain(); - if (vpe_dev->domain_num < 0) { - pr_err("%s: could not register domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->domain = - msm_get_iommu_domain(vpe_dev->domain_num); - if (!vpe_dev->domain) { - pr_err("%s: cannot find domain\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - vpe_dev->iommu_ctx_src = msm_iommu_get_ctx("vpe_src"); - vpe_dev->iommu_ctx_dst = msm_iommu_get_ctx("vpe_dst"); - if (!vpe_dev->iommu_ctx_src || !vpe_dev->iommu_ctx_dst) { - pr_err("%s: cannot get iommu_ctx\n", __func__); - rc = -ENODEV; - goto err_release_mem; - } - - media_entity_init(&vpe_dev->msm_sd.sd.entity, 0, NULL, 0); - vpe_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - vpe_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_VPE; - vpe_dev->msm_sd.sd.entity.name = pdev->name; - msm_sd_register(&vpe_dev->msm_sd); - msm_vpe_v4l2_subdev_fops.owner = v4l2_subdev_fops.owner; - msm_vpe_v4l2_subdev_fops.open = v4l2_subdev_fops.open; - msm_vpe_v4l2_subdev_fops.unlocked_ioctl = msm_vpe_subdev_fops_ioctl; - msm_vpe_v4l2_subdev_fops.release = v4l2_subdev_fops.release; - msm_vpe_v4l2_subdev_fops.poll = v4l2_subdev_fops.poll; - - vpe_dev->msm_sd.sd.devnode->fops = &msm_vpe_v4l2_subdev_fops; - vpe_dev->msm_sd.sd.entity.revision = vpe_dev->msm_sd.sd.devnode->num; - vpe_dev->state = VPE_STATE_BOOT; - rc = vpe_init_hardware(vpe_dev); - if (rc < 0) { - pr_err("%s: Couldn't init vpe hardware\n", __func__); - goto err_unregister_sd; - } - vpe_reset(vpe_dev); - vpe_release_hardware(vpe_dev); - vpe_dev->state = VPE_STATE_OFF; - - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - if (rc < 0) { - pr_err("Couldn't attach to vpe_src context bank\n"); - rc = -ENODEV; - goto err_unregister_sd; - } - rc = iommu_attach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - if (rc < 0) { - pr_err("Couldn't attach to vpe_dst context bank\n"); - rc = -ENODEV; - goto err_detach_src; - } - - vpe_dev->state = VPE_STATE_OFF; - - msm_queue_init(&vpe_dev->eventData_q, "vpe-eventdata"); - msm_queue_init(&vpe_dev->processing_q, "vpe-frame"); - INIT_LIST_HEAD(&vpe_dev->tasklet_q); - tasklet_init(&vpe_dev->vpe_tasklet, msm_vpe_do_tasklet, - (unsigned long)vpe_dev); - vpe_dev->vpe_open_cnt = 0; - - return rc; - -err_detach_src: - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); -err_unregister_sd: - msm_sd_unregister(&vpe_dev->msm_sd); -err_release_mem: - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); -err_free_vpe_clk: - kfree(vpe_dev->vpe_clk); -err_free_vpe_dev: - kfree(vpe_dev); - return rc; -} - -static int vpe_device_remove(struct platform_device *dev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(dev); - struct vpe_device *vpe_dev; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - vpe_dev = (struct vpe_device *)v4l2_get_subdevdata(sd); - if (!vpe_dev) { - pr_err("%s: vpe device is NULL\n", __func__); - return 0; - } - - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_dst); - iommu_detach_device(vpe_dev->domain, vpe_dev->iommu_ctx_src); - msm_sd_unregister(&vpe_dev->msm_sd); - release_mem_region(vpe_dev->mem->start, resource_size(vpe_dev->mem)); - mutex_destroy(&vpe_dev->mutex); - kfree(vpe_dev); - return 0; -} - -static struct platform_driver vpe_driver = { - .probe = vpe_probe, - .remove = vpe_device_remove, - .driver = { - .name = MSM_VPE_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_vpe_init_module(void) -{ - return platform_driver_register(&vpe_driver); -} - -static void __exit msm_vpe_exit_module(void) -{ - platform_driver_unregister(&vpe_driver); -} - -module_init(msm_vpe_init_module); -module_exit(msm_vpe_exit_module); -MODULE_DESCRIPTION("MSM VPE driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.h b/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.h deleted file mode 100644 index 1a8508963493..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/pproc/vpe/msm_vpe.h +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_VPE_H__ -#define __MSM_VPE_H__ - -#include -#include -#include -#include -#include -#include "msm_sd.h" - -/*********** start of register offset *********************/ -#define VPE_INTR_ENABLE_OFFSET 0x0020 -#define VPE_INTR_STATUS_OFFSET 0x0024 -#define VPE_INTR_CLEAR_OFFSET 0x0028 -#define VPE_DL0_START_OFFSET 0x0030 -#define VPE_HW_VERSION_OFFSET 0x0070 -#define VPE_SW_RESET_OFFSET 0x0074 -#define VPE_AXI_RD_ARB_CONFIG_OFFSET 0x0078 -#define VPE_SEL_CLK_OR_HCLK_TEST_BUS_OFFSET 0x007C -#define VPE_CGC_EN_OFFSET 0x0100 -#define VPE_CMD_STATUS_OFFSET 0x10008 -#define VPE_PROFILE_EN_OFFSET 0x10010 -#define VPE_PROFILE_COUNT_OFFSET 0x10014 -#define VPE_CMD_MODE_OFFSET 0x10060 -#define VPE_SRC_SIZE_OFFSET 0x10108 -#define VPE_SRCP0_ADDR_OFFSET 0x1010C -#define VPE_SRCP1_ADDR_OFFSET 0x10110 -#define VPE_SRC_YSTRIDE1_OFFSET 0x1011C -#define VPE_SRC_FORMAT_OFFSET 0x10124 -#define VPE_SRC_UNPACK_PATTERN1_OFFSET 0x10128 -#define VPE_OP_MODE_OFFSET 0x10138 -#define VPE_SCALE_PHASEX_INIT_OFFSET 0x1013C -#define VPE_SCALE_PHASEY_INIT_OFFSET 0x10140 -#define VPE_SCALE_PHASEX_STEP_OFFSET 0x10144 -#define VPE_SCALE_PHASEY_STEP_OFFSET 0x10148 -#define VPE_OUT_FORMAT_OFFSET 0x10150 -#define VPE_OUT_PACK_PATTERN1_OFFSET 0x10154 -#define VPE_OUT_SIZE_OFFSET 0x10164 -#define VPE_OUTP0_ADDR_OFFSET 0x10168 -#define VPE_OUTP1_ADDR_OFFSET 0x1016C -#define VPE_OUT_YSTRIDE1_OFFSET 0x10178 -#define VPE_OUT_XY_OFFSET 0x1019C -#define VPE_SRC_XY_OFFSET 0x10200 -#define VPE_SRC_IMAGE_SIZE_OFFSET 0x10208 -#define VPE_SCALE_CONFIG_OFFSET 0x10230 -#define VPE_DEINT_STATUS_OFFSET 0x30000 -#define VPE_DEINT_DECISION_OFFSET 0x30004 -#define VPE_DEINT_COEFF0_OFFSET 0x30010 -#define VPE_SCALE_STATUS_OFFSET 0x50000 -#define VPE_SCALE_SVI_PARAM_OFFSET 0x50010 -#define VPE_SCALE_SHARPEN_CFG_OFFSET 0x50020 -#define VPE_SCALE_COEFF_LSP_0_OFFSET 0x50400 -#define VPE_SCALE_COEFF_MSP_0_OFFSET 0x50404 - -#define VPE_AXI_ARB_1_OFFSET 0x00408 -#define VPE_AXI_ARB_2_OFFSET 0x0040C - -#define VPE_SCALE_COEFF_LSBn(n) (0x50400 + 8 * (n)) -#define VPE_SCALE_COEFF_MSBn(n) (0x50404 + 8 * (n)) -#define VPE_SCALE_COEFF_NUM 32 - -/*********** end of register offset ********************/ - - -#define VPE_HARDWARE_VERSION 0x00080308 -#define VPE_SW_RESET_VALUE 0x00000010 /* bit 4 for PPP*/ -#define VPE_AXI_RD_ARB_CONFIG_VALUE 0x124924 -#define VPE_CMD_MODE_VALUE 0x1 -#define VPE_DEFAULT_OP_MODE_VALUE 0x40FC0004 -#define VPE_CGC_ENABLE_VALUE 0xffff -#define VPE_DEFAULT_SCALE_CONFIG 0x3c - -#define VPE_NORMAL_MODE_CLOCK_RATE 150000000 -#define VPE_TURBO_MODE_CLOCK_RATE 200000000 -#define VPE_SUBDEV_MAX_EVENTS 30 - -/**************************************************/ -/*********** End of command id ********************/ -/**************************************************/ - -#define SCALER_PHASE_BITS 29 -#define HAL_MDP_PHASE_STEP_2P50 0x50000000 -#define HAL_MDP_PHASE_STEP_1P66 0x35555555 -#define HAL_MDP_PHASE_STEP_1P25 0x28000000 - - -#define MAX_ACTIVE_VPE_INSTANCE 8 -#define MAX_VPE_PROCESSING_FRAME 2 -#define MAX_VPE_V4l2_EVENTS 30 - -#define MSM_VPE_TASKLETQ_SIZE 16 - -/** - * The format of the msm_vpe_transaction_setup_cfg is as follows: - * - * - vpe_update_scale_coef (65*4 uint32_t's) - * - Each table is 65 uint32_t's long - * - 1st uint32_t in each table indicates offset - * - Following 64 uint32_t's are the data - * - * - vpe_input_plane_config (6 uint32_t's) - * - VPE_SRC_FORMAT_OFFSET - * - VPE_SRC_UNPACK_PATTERN1_OFFSET - * - VPE_SRC_IMAGE_SIZE_OFFSET - * - VPE_SRC_YSTRIDE1_OFFSET - * - VPE_SRC_SIZE_OFFSET - * - VPE_SRC_XY_OFFSET - * - * - vpe_output_plane_config (5 uint32_t's) - * - VPE_OUT_FORMAT_OFFSET - * - VPE_OUT_PACK_PATTERN1_OFFSET - * - VPE_OUT_YSTRIDE1_OFFSET - * - VPE_OUT_SIZE_OFFSET - * - VPE_OUT_XY_OFFSET - * - * - vpe_operation_config (1 uint32_t) - * - VPE_OP_MODE_OFFSET - * - */ - -#define VPE_SCALER_CONFIG_LEN 260 -#define VPE_INPUT_PLANE_CFG_LEN 24 -#define VPE_OUTPUT_PLANE_CFG_LEN 20 -#define VPE_OPERATION_MODE_CFG_LEN 4 -#define VPE_NUM_SCALER_TABLES 4 - -#define VPE_TRANSACTION_SETUP_CONFIG_LEN ( \ - (VPE_SCALER_CONFIG_LEN * VPE_NUM_SCALER_TABLES) \ - + VPE_INPUT_PLANE_CFG_LEN \ - + VPE_OUTPUT_PLANE_CFG_LEN \ - + VPE_OPERATION_MODE_CFG_LEN) -/* VPE_TRANSACTION_SETUP_CONFIG_LEN = 1088 */ - -struct msm_vpe_transaction_setup_cfg { - uint8_t scaler_cfg[VPE_TRANSACTION_SETUP_CONFIG_LEN]; -}; - -struct vpe_subscribe_info { - struct v4l2_fh *vfh; - uint32_t active; -}; - -enum vpe_state { - VPE_STATE_BOOT, - VPE_STATE_IDLE, - VPE_STATE_ACTIVE, - VPE_STATE_OFF, -}; - -struct msm_queue_cmd { - struct list_head list_config; - struct list_head list_control; - struct list_head list_frame; - struct list_head list_pict; - struct list_head list_vpe_frame; - struct list_head list_eventdata; - void *command; - atomic_t on_heap; - struct timespec ts; - uint32_t error_code; - uint32_t trans_code; -}; - -struct msm_device_queue { - struct list_head list; - spinlock_t lock; - wait_queue_head_t wait; - int max; - int len; - const char *name; -}; - -struct msm_vpe_tasklet_queue_cmd { - struct list_head list; - uint32_t irq_status; - uint8_t cmd_used; -}; - -struct msm_vpe_buffer_map_info_t { - unsigned long len; - dma_addr_t phy_addr; - struct ion_handle *ion_handle; - struct msm_vpe_buffer_info_t buff_info; -}; - -struct msm_vpe_buffer_map_list_t { - struct msm_vpe_buffer_map_info_t map_info; - struct list_head entry; -}; - -struct msm_vpe_buff_queue_info_t { - uint32_t used; - uint16_t session_id; - uint16_t stream_id; - struct list_head vb2_buff_head; - struct list_head native_buff_head; -}; - -struct vpe_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - void __iomem *base; - struct clk **vpe_clk; - struct regulator *fs_vpe; - struct mutex mutex; - enum vpe_state state; - - int domain_num; - struct iommu_domain *domain; - struct device *iommu_ctx_src; - struct device *iommu_ctx_dst; - struct ion_client *client; - struct kref refcount; - - /* Reusing proven tasklet from msm isp */ - atomic_t irq_cnt; - uint8_t taskletq_idx; - spinlock_t tasklet_lock; - struct list_head tasklet_q; - struct tasklet_struct vpe_tasklet; - struct msm_vpe_tasklet_queue_cmd - tasklet_queue_cmd[MSM_VPE_TASKLETQ_SIZE]; - - struct vpe_subscribe_info vpe_subscribe_list[MAX_ACTIVE_VPE_INSTANCE]; - uint32_t vpe_open_cnt; - - struct msm_device_queue eventData_q; /* V4L2 Event Payload Queue */ - - /* - * Processing Queue: store frame info for frames sent to - * microcontroller - */ - struct msm_device_queue processing_q; - - struct msm_vpe_buff_queue_info_t *buff_queue; - uint32_t num_buffq; - struct v4l2_subdev *buf_mgr_subdev; -}; - -#endif /* __MSM_VPE_H__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/Makefile deleted file mode 100644 index 3c474fc5c527..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/msm_vb2 -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/camera -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += cci/ io/ csiphy/ csid/ actuator/ flash/ eeprom/ -obj-$(CONFIG_MSM_CAMERA_SENSOR) += msm_sensor_init.o msm_sensor_driver.o msm_sensor.o -obj-$(CONFIG_IMX132) += imx132.o -obj-$(CONFIG_IMX134) += imx134.o -obj-$(CONFIG_OV8825) += ov8825.o -obj-$(CONFIG_OV8865) += ov8865.o -obj-$(CONFIG_s5k4e1) += s5k4e1.o -obj-$(CONFIG_OV12830) += ov12830.o -obj-$(CONFIG_OV9724) += ov9724.o -obj-$(CONFIG_HI256) += hi256.o -obj-$(CONFIG_OV5648) += ov5648.o -obj-$(CONFIG_MT9M114) += mt9m114.o -obj-$(CONFIG_MT9M114) += ov5645.o -obj-$(CONFIG_SP1628) += sp1628.o -obj-$(CONFIG_GC0339) += gc0339.o -obj-$(CONFIG_SR200PC20) += sr200pc20_yuv.o -obj-$(CONFIG_S5K4ECGX) += s5k4ecgx_yuv.o -obj-$(CONFIG_SR352) += sr352_yuv.o -obj-$(CONFIG_SR130PC20) += sr130pc20_yuv.o -obj-$(CONFIG_DB8221A) += db8221a_yuv.o -obj-$(CONFIG_OIS) += external/ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/Makefile deleted file mode 100644 index 97d3efeea74d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_actuator.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.c deleted file mode 100644 index 903c163d6876..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.c +++ /dev/null @@ -1,1742 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_sd.h" -#include "msm_actuator.h" -#include "msm_cci.h" - -DEFINE_MSM_MUTEX(msm_actuator_mutex); - -#undef CDBG -#ifdef MSM_ACUTUATOR_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define LENS_POSITION_CENTER_10BIT 500 -#define LENS_POSITION_BOTTOM_10BIT 10 - -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); - -static struct msm_actuator msm_vcm_actuator_table; -static struct msm_actuator msm_piezo_actuator_table; -static struct msm_actuator msm_hall_effect_actuator_table; - -static struct i2c_driver msm_actuator_i2c_driver; -static struct msm_actuator *actuators[] = { - &msm_vcm_actuator_table, - &msm_piezo_actuator_table, - &msm_hall_effect_actuator_table, - &msm_piezo_actuator_table, /* dummy entries */ -}; - - -#if defined(CONFIG_OIS) -struct msm_actuator_ctrl_t *g_msm_actuator_t; - - -/***** for only ois selftest , set the actuator initial position to 256 *****/ -int16_t msm_actuator_move_for_ois_test(void) -{ - int rc = 0; - pr_err("[%s::%d] : E \n", __func__, __LINE__); - - g_msm_actuator_t->i2c_data_type = MSM_ACTUATOR_BYTE_DATA; - g_msm_actuator_t->i2c_client.addr_type = MSM_ACTUATOR_BYTE_ADDR; - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x00, 0x80, /* SET Position MSB - 0x00 */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x01, 0x00, /* SET Position LSB - 0x00 */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - rc = g_msm_actuator_t->i2c_client.i2c_func_tbl->i2c_write( - &g_msm_actuator_t->i2c_client, 0x02, 0x00, /* SET Active Mode */ - MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) - pr_err("[%s:%d] i2c failed rc :: %d\n", __func__, __LINE__,rc); - - pr_err("[%s::%d] : X \n", __func__, __LINE__); - return rc; -} - - -static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, - int config); -void msm_actuator_power_for_ois_test(int on) -{ - msm_actuator_vreg_control(g_msm_actuator_t, on); -} - -#endif - - - -static int32_t msm_actuator_piezo_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) { - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - a_ctrl->initial_code, 0, 0); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s: i2c write error:%d\n", - __func__, rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = 0; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl, - int16_t next_lens_position, uint32_t hw_params, uint16_t delay) -{ - struct msm_actuator_reg_params_t *write_arr = a_ctrl->reg_tbl; - uint32_t hw_dword = hw_params; - uint16_t i2c_byte1 = 0, i2c_byte2 = 0; - uint16_t value = 0; - uint32_t size = a_ctrl->reg_tbl_size, i = 0; - struct msm_camera_i2c_reg_array *i2c_tbl = a_ctrl->i2c_reg_tbl; - CDBG("Enter\n"); - for (i = 0; i < size; i++) { - if (write_arr[i].reg_write_type == MSM_ACTUATOR_WRITE_DAC) { - value = (next_lens_position << - write_arr[i].data_shift) | - ((hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift); - - if (write_arr[i].reg_addr != 0xFFFF) { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = value; - if (size != (i+1)) { - i2c_byte2 = value & 0xFF; - CDBG("byte1:0x%x, byte2:0x%x\n", - i2c_byte1, i2c_byte2); - if (a_ctrl->i2c_tbl_index > - a_ctrl->total_steps) { - pr_err("failed:i2c table index out of bound\n"); - break; - } - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index]. - reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index]. - delay = 0; - a_ctrl->i2c_tbl_index++; - i++; - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (value & 0xFF00) >> 8; - } - } else { - i2c_byte1 = (value & 0xFF00) >> 8; - i2c_byte2 = value & 0xFF; - } - } else { - i2c_byte1 = write_arr[i].reg_addr; - i2c_byte2 = (hw_dword & write_arr[i].hw_mask) >> - write_arr[i].hw_shift; - } - if (a_ctrl->i2c_tbl_index > a_ctrl->total_steps) { - pr_err("failed: i2c table index out of bound\n"); - break; - } - CDBG("i2c_byte1:0x%x, i2c_byte2:0x%x\n", i2c_byte1, i2c_byte2); - i2c_tbl[a_ctrl->i2c_tbl_index].reg_addr = i2c_byte1; - i2c_tbl[a_ctrl->i2c_tbl_index].reg_data = i2c_byte2; - i2c_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - CDBG("Enter\n"); - - for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_ACT_WRITE: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - case MSM_ACT_POLL: { - switch (settings[i].data_type) { - case MSM_ACTUATOR_BYTE_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - break; - case MSM_ACTUATOR_WORD_DATA: - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &a_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - MSM_CAMERA_I2C_WORD_DATA); - break; - default: - pr_err("Unsupport data type: %d\n", - settings[i].i2c_operation); - break; - } - break; - } - } - - if (0 != settings[i].delay) - msleep(settings[i].delay); - - if (rc < 0) - break; - } - - a_ctrl->curr_step_pos = 0; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vcm_init_focus(struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, struct reg_settings_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - uint16_t delay = 0; - uint16_t status_addr = 0; - uint16_t status_data = 0; - uint16_t status = 0; - uint16_t delay_count = 0; - uint16_t delay_count_limit = 0; - - CDBG("%s Enter, size %d\n", __func__, size); - - for (i = 0; i < size; i++) { - if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_DELAY) { - delay = settings[i].reg_data; - usleep_range(delay, delay + 1000); - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - } - else if (settings[i].reg_addr == MSM_ACTUATOR_INIT_FOCUS_READ_STATUS) { - /* reg_data[i] = limitation for delay count for read status */ - delay_count_limit = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - i++; - /*reg_addr[i+1] = addr for status register*/ - status_addr = settings[i].reg_addr; - /*reg_data[i+1] = value for stopping to read the status register*/ - status_data = settings[i].reg_data; - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - delay_count = 0; - do { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, status_addr, &status, - MSM_CAMERA_I2C_BYTE_DATA); - CDBG("%s %d status %d\n", __func__, __LINE__,status); - if (rc < 0) { - CDBG("%s Failed I2C read Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(1000, 2000); - delay_count++; - if(delay_count >= delay_count_limit) break; - } while (status != status_data); - } - else { - CDBG("%s %d settings[%d].reg_addr = %d, settings[%d].reg_data = %d\n", - __func__, __LINE__,i, settings[i].reg_addr, i, settings[i].reg_data); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, settings[i].reg_addr, - settings[i].reg_data, MSM_CAMERA_I2C_BYTE_DATA); - if(rc < 0){ - pr_err("%s:%d I2C write failure size[%d] writen[%d]\n", - __func__, __LINE__, size, i); - break; - } - } - } - - CDBG("Exit\n"); - return 0; -} - -static void msm_actuator_write_focus( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t curr_lens_pos, - struct damping_params_t *damping_params, - int8_t sign_direction, - int16_t code_boundary) -{ - int16_t next_lens_pos = 0; - uint16_t damping_code_step = 0; - uint16_t wait_time = 0; - CDBG("Enter\n"); - - damping_code_step = damping_params->damping_step; - wait_time = damping_params->damping_delay; - - /* Write code based on damping_code_step in a loop */ - for (next_lens_pos = - curr_lens_pos + (sign_direction * damping_code_step); - (sign_direction * next_lens_pos) <= - (sign_direction * code_boundary); - next_lens_pos = - (next_lens_pos + - (sign_direction * damping_code_step))) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - next_lens_pos, damping_params->hw_params, wait_time); - curr_lens_pos = next_lens_pos; - } - - if (curr_lens_pos != code_boundary) { - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - code_boundary, damping_params->hw_params, wait_time); - } - CDBG("Exit\n"); -} - -static int32_t msm_actuator_piezo_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t dest_step_position = move_params->dest_step_pos; - struct damping_params_t ringing_params_kernel; - int32_t rc = 0; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("Enter\n"); - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[0]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - if (num_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - (num_steps * - a_ctrl->region_params[0].code_per_step), - ringing_params_kernel.hw_params, 0); - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - a_ctrl->curr_step_pos = dest_step_position; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - struct damping_params_t ringing_params_kernel; - int8_t sign_dir = move_params->sign_dir; - uint16_t step_boundary = 0; - uint16_t target_step_pos = 0; - uint16_t target_lens_pos = 0; - int16_t dest_step_pos = move_params->dest_step_pos; - uint16_t curr_lens_pos = 0; - int dir = move_params->dir; - int32_t num_steps = move_params->num_steps; - struct msm_camera_i2c_reg_setting reg_setting; - - if (copy_from_user(&ringing_params_kernel, - &(move_params->ringing_params[a_ctrl->curr_region_index]), - sizeof(struct damping_params_t))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - - CDBG("called, dir %d, num_steps %d\n", dir, num_steps); - - if (dest_step_pos == a_ctrl->curr_step_pos) - return rc; - - if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) || - (sign_dir < MSM_ACTUATOR_MOVE_SIGNED_FAR)) { - pr_err("Invalid sign_dir = %d\n", sign_dir); - return -EFAULT; - } - if ((dir > MOVE_FAR) || (dir < MOVE_NEAR)) { - pr_err("Invalid direction = %d\n", dir); - return -EFAULT; - } - if (dest_step_pos > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", - dest_step_pos); - return -EFAULT; - } - curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; - a_ctrl->i2c_tbl_index = 0; - CDBG("curr_step_pos =%d dest_step_pos =%d curr_lens_pos=%d\n", - a_ctrl->curr_step_pos, dest_step_pos, curr_lens_pos); - - while (a_ctrl->curr_step_pos != dest_step_pos) { - step_boundary = - a_ctrl->region_params[a_ctrl->curr_region_index]. - step_bound[dir]; - if ((dest_step_pos * sign_dir) <= - (step_boundary * sign_dir)) { - - target_step_pos = dest_step_pos; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - } else { - target_step_pos = step_boundary; - target_lens_pos = - a_ctrl->step_position_table[target_step_pos]; - a_ctrl->func_tbl->actuator_write_focus(a_ctrl, - curr_lens_pos, - &ringing_params_kernel, - sign_dir, - target_lens_pos); - curr_lens_pos = target_lens_pos; - - a_ctrl->curr_region_index += sign_dir; - } - a_ctrl->curr_step_pos = target_step_pos; - } - - move_params->curr_lens_pos = curr_lens_pos; - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("i2c write error:%d\n", rc); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) -{ - int16_t code_per_step = 0; - int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; - uint16_t step_boundary = 0; - uint32_t max_code_size = 1; - uint16_t data_size = set_info->actuator_params.data_size; - CDBG("Enter\n"); - for (; data_size > 0; data_size--) - max_code_size *= 2; - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - a_ctrl->step_position_table = - kmalloc(sizeof(uint16_t) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (a_ctrl->step_position_table == NULL) - return -ENOMEM; - cur_code = set_info->af_tuning_params.initial_code; - a_ctrl->step_position_table[step_index++] = cur_code; - for (region_index = 0; - region_index < a_ctrl->region_size; - region_index++) { - code_per_step = - a_ctrl->region_params[region_index].code_per_step; - step_boundary = - a_ctrl->region_params[region_index]. - step_bound[MOVE_NEAR]; - if (step_boundary > set_info->af_tuning_params.total_steps - 1) { - CDBG("%s: Error af steps mismatch!", __func__); - return -EFAULT; - } - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) - a_ctrl->step_position_table[step_index] = - cur_code; - else { - for (; step_index < - set_info->af_tuning_params.total_steps; - step_index++) - a_ctrl-> - step_position_table[ - step_index] = - max_code_size; - } - } - } - for (step_index = 0; - step_index < set_info->af_tuning_params.total_steps; - step_index++) { - CDBG("step_position_table[%d] = %d", step_index, - a_ctrl->step_position_table[step_index]); - } - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_actuator_set_default_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - CDBG("Enter\n"); - - if (a_ctrl->curr_step_pos != 0) - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, move_params); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_vreg_control(struct msm_actuator_ctrl_t *a_ctrl, - int config) -{ - int rc = 0, i, cnt; - struct msm_actuator_vreg *vreg_cfg; - - vreg_cfg = &a_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt) - return 0; - - if (cnt >= MSM_ACTUATOT_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - if (a_ctrl->pdev) - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - else - rc = msm_camera_config_single_vreg(&(a_ctrl->i2c_client.client->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - } - return rc; -} - -static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl) -{ - int32_t rc = 0; - CDBG("Enter\n"); - if (a_ctrl->actuator_state != ACTUATOR_POWER_DOWN) { - if (a_ctrl->vcm_enable) { - rc = gpio_direction_output(a_ctrl->vcm_pwd, 0); - if (!rc) - gpio_free(a_ctrl->vcm_pwd); - } - - rc = msm_actuator_vreg_control(a_ctrl, 0); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_tbl_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_DOWN; - } - CDBG("Exit\n"); - return rc; -} - -static void msm_actuator_set_position_tbl( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t pos, uint16_t delay) -{ - uint16_t msb, lsb, reg_addr; - reg_addr = a_ctrl->reg_tbl[0].reg_addr; - CDBG("%s reg_addr = %d\n", __func__, reg_addr); - - msb = (pos>>8)&0x00ff; - lsb = pos&0x00ff; - - CDBG("%s pos=%d msb= 0x%X, lsb=0x%X\n", __func__, pos, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = reg_addr+1; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = delay; - a_ctrl->i2c_tbl_index++; - -} - -static int32_t msm_actuator_vcm_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) -{ - - int32_t rc = 0; - int32_t index; - uint16_t pos, delay; - struct msm_camera_i2c_reg_setting reg_setting; - - CDBG("%s Enter : steps = %d\n", __func__, set_pos->number_of_steps); - - if (set_pos->number_of_steps == 0) - return rc; - - a_ctrl->i2c_tbl_index = 0; - - for (index = 0; index < set_pos->number_of_steps; index++) { - pos = a_ctrl->step_position_table[set_pos->pos[index]]; - delay = set_pos->delay[index]; - msm_actuator_set_position_tbl(a_ctrl, pos, delay); - } - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) { - struct reg_settings_t *init_settings = NULL; - int32_t rc = -EFAULT; - uint16_t i = 0; - struct msm_camera_cci_client *cci_client = NULL; - CDBG("Enter\n"); - - for (i = 0; i < ARRAY_SIZE(actuators); i++) { - if (set_info->actuator_params.act_type == - actuators[i]->act_type) { - a_ctrl->func_tbl = &actuators[i]->func_tbl; - rc = 0; - } - } - - if (rc < 0) { - pr_err("Actuator function table not found : act_type = %d\n", set_info->actuator_params.act_type); - return rc; - } - if (set_info->af_tuning_params.total_steps - > MAX_ACTUATOR_AF_TOTAL_STEPS) { - pr_err("Max actuator totalsteps exceeded = %d\n", - set_info->af_tuning_params.total_steps); - return -EFAULT; - } - if (set_info->af_tuning_params.region_size - > MAX_ACTUATOR_REGION) { - pr_err("MAX_ACTUATOR_REGION is exceeded.\n"); - return -EFAULT; - } - - a_ctrl->region_size = set_info->af_tuning_params.region_size; - a_ctrl->pwd_step = set_info->af_tuning_params.pwd_step; - a_ctrl->total_steps = set_info->af_tuning_params.total_steps; - - if (copy_from_user(&a_ctrl->region_params, - (void *)set_info->af_tuning_params.region_params, - a_ctrl->region_size * sizeof(struct region_params_t))) - return -EFAULT; - - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = a_ctrl->i2c_client.cci_client; - cci_client->sid = - set_info->actuator_params.i2c_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->cci_i2c_master = a_ctrl->cci_master; - } else { - a_ctrl->i2c_client.client->addr = - set_info->actuator_params.i2c_addr; - } - - a_ctrl->i2c_data_type = set_info->actuator_params.i2c_data_type; - a_ctrl->i2c_client.addr_type = set_info->actuator_params.i2c_addr_type; - if (set_info->actuator_params.reg_tbl_size <= - MAX_ACTUATOR_REG_TBL_SIZE) { - a_ctrl->reg_tbl_size = set_info->actuator_params.reg_tbl_size; - } else { - a_ctrl->reg_tbl_size = 0; - pr_err("MAX_ACTUATOR_REG_TBL_SIZE is exceeded.\n"); - return -EFAULT; - } - - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - a_ctrl->i2c_reg_tbl = - kmalloc(sizeof(struct msm_camera_i2c_reg_array) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (!a_ctrl->i2c_reg_tbl) { - pr_err("kmalloc fail\n"); - return -ENOMEM; - } - - if (copy_from_user(&a_ctrl->reg_tbl, - (void *)set_info->actuator_params.reg_tbl_params, - a_ctrl->reg_tbl_size * - sizeof(struct msm_actuator_reg_params_t))) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - return -EFAULT; - } - - if (set_info->actuator_params.init_setting_size && - set_info->actuator_params.init_setting_size - <= MAX_ACTUATOR_REG_TBL_SIZE) { - if (a_ctrl->func_tbl->actuator_init_focus) { - init_settings = kmalloc(sizeof(struct reg_settings_t) * - (set_info->actuator_params.init_setting_size), - GFP_KERNEL); - if (init_settings == NULL) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error allocating memory for init_settings\n"); - return -EFAULT; - } - if (copy_from_user(init_settings, - (void *)set_info->actuator_params.init_settings, - set_info->actuator_params.init_setting_size * - sizeof(struct reg_settings_t))) { - kfree(init_settings); - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error copying init_settings\n"); - return -EFAULT; - } - rc = a_ctrl->func_tbl->actuator_init_focus(a_ctrl, - set_info->actuator_params.init_setting_size, - init_settings); - kfree(init_settings); - if (rc < 0) { - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - pr_err("Error actuator_init_focus\n"); - return -EFAULT; - } - } - } - - a_ctrl->initial_code = set_info->af_tuning_params.initial_code; - if (a_ctrl->func_tbl->actuator_init_step_table) - rc = a_ctrl->func_tbl-> - actuator_init_step_table(a_ctrl, set_info); - - a_ctrl->curr_step_pos = 0; - a_ctrl->curr_region_index = 0; - a_ctrl->actuator_state = ACTUATOR_POWER_UP; - CDBG("Exit\n"); - - return rc; -} - -static int32_t msm_actuator_vcm_sw_landing( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params, int sw_landing_type) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting reg_setting; - struct damping_params_t *damping_params; - struct damping_params_t damping_params_k; - struct damping_params_t damping_params_sacoff; - - int16_t pos_index, First_damping_lens_pos, Second_damping_lens_pos, damp_delay, damp_step, lens_pos; - - if(a_ctrl == NULL || a_ctrl->step_position_table == NULL || move_params == NULL || move_params->ringing_params == NULL) - { - pr_err("%s %d NULL Pointer\n", __func__, __LINE__); - return 0; - } - - CDBG("%s Enter %d\n", __func__, __LINE__); - /*get first and second damping position, damp delay and step*/ - if (copy_from_user(&damping_params_k,&move_params->ringing_params[2],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - if (copy_from_user(&damping_params_sacoff,&move_params->ringing_params[3],sizeof(struct damping_params_t))) { - pr_err("%s:copy from user failed\n",__func__); - return -EFAULT; - } - - damping_params = &damping_params_k; - damp_delay = damping_params->damping_delay; - damp_step = damping_params->damping_step; - pos_index = (damping_params->hw_params&0xffff); // low 4byte : ker index, high 4byte : dac - - if (pos_index > a_ctrl->total_steps) { - pr_err("Step pos greater than total steps = %d\n", pos_index); - return -EFAULT; - } - - if (sw_landing_type == MSM_ACTUATOR_MULTI_TASKING_SW_LANDING) { - First_damping_lens_pos = LENS_POSITION_CENTER_10BIT; - Second_damping_lens_pos = LENS_POSITION_BOTTOM_10BIT; - } else { - First_damping_lens_pos = a_ctrl->step_position_table[pos_index];// - Second_damping_lens_pos = (First_damping_lens_pos>>2) ; // for old version - } - - CDBG("%s %d First damping index =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - CDBG("%s %d damp_delay=%d, damp_step=%d\n", __func__, __LINE__, damp_delay, damp_step); - /*set the starting lens pos to first damping lens pos*/ - lens_pos = First_damping_lens_pos;// - CDBG("%s %d curr_lens_pos=%d\n", __func__, __LINE__, lens_pos); - - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - - // 1. Go to pan_focus// - if(damping_params_sacoff.damping_step & 0x1 ) - { - Second_damping_lens_pos = ((damping_params->hw_params>>16)&0xffff); // default 0, dac value - if (Second_damping_lens_pos < 0) - Second_damping_lens_pos = 0; - CDBG("%s %d First damping index new =%d, First_damping_lens_pos=%d, Second_damping_lens_pos=%d\n", - __func__,__LINE__, pos_index, First_damping_lens_pos, Second_damping_lens_pos); - a_ctrl->i2c_tbl_index = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - CDBG("%s %d i2c_tbl_index %d\n", __func__, __LINE__, a_ctrl->i2c_tbl_index); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - //reg_setting.delay = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s %d Go to pan_focus, lens_pos=%d\n", __func__, __LINE__, lens_pos); - } - - // 2. SAC mode off// - if(damping_params_sacoff.damping_step & 0x02 ) - { - - uint16_t addr, data ; - addr = ((damping_params_sacoff.hw_params>>16)&0xffff); // 0x02 - data = ((damping_params_sacoff.hw_params)&0xffff); // 0x00 - usleep_range(damping_params_sacoff.damping_delay , damping_params_sacoff.damping_delay+1000); //10 msec - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr,data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - CDBG("%s SAC mode off delay=%d, addr=0x%x, data =0x%x \n", __func__, damping_params_sacoff.damping_delay, addr, data); - } - - // 3. Start SW landing// - /*set the landing position in the table*/ - CDBG("%s %d set the landing position in the table\n", __func__, __LINE__); - a_ctrl->i2c_tbl_index = 0; - do{ - if(lens_pos < Second_damping_lens_pos + damp_step) break; - else{ - lens_pos -= damp_step; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - } - }while(lens_pos > Second_damping_lens_pos); - - /*set final position*/ - CDBG("%s %d set the final position in the table\n", __func__, __LINE__); - lens_pos = 0; - msm_actuator_set_position_tbl(a_ctrl, lens_pos, damp_delay); - - /*write i2c */ - CDBG("%s %d write i2c\n", __func__, __LINE__); - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.data_type = a_ctrl->i2c_data_type; - reg_setting.size = a_ctrl->i2c_tbl_index; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - return rc; -} - -static int msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl, - void __user *argp) -{ - struct msm_actuator_cfg_data *cdata = - (struct msm_actuator_cfg_data *)argp; - int32_t rc = 0; - - if (!a_ctrl) - return -1; - - mutex_lock(a_ctrl->actuator_mutex); - CDBG("Enter\n"); - CDBG("%s type %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_ACTUATOR_INIT: - rc = msm_actuator_init(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_init failed %d\n", rc); - break; - case CFG_GET_ACTUATOR_INFO: - cdata->is_af_supported = 1; - cdata->cfg.cam_name = a_ctrl->cam_name; - break; - - case CFG_SET_ACTUATOR_INFO: - rc = msm_actuator_set_param(a_ctrl, &cdata->cfg.set_info); - if (rc < 0) - pr_err("init table failed %d\n", rc); - break; - - case CFG_SET_DEFAULT_FOCUS: - rc = a_ctrl->func_tbl->actuator_set_default_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - - case CFG_MOVE_FOCUS: - rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl, - &cdata->cfg.move); - if (rc < 0) - pr_err("move focus failed %d\n", rc); - break; - case CFG_ACTUATOR_POWERDOWN: -#if !defined(CONFIG_OIS) - rc = msm_actuator_power_down(a_ctrl); - if (rc < 0) - pr_err("msm_actuator_power_down failed %d\n", rc); -#endif - break; - - case CFG_SET_POSITION: - rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl, - &cdata->cfg.setpos); - if (rc < 0) - pr_err("actuator_set_position failed %d\n", rc); - break; - - case CFG_SET_ACTUATOR_SW_LANDING: - if (a_ctrl && a_ctrl->func_tbl && a_ctrl->func_tbl->actuator_sw_landing) { - rc = a_ctrl->func_tbl->actuator_sw_landing(a_ctrl, &cdata->cfg.move, cdata->sw_landing_type); - if (rc < 0) - pr_err("actuator_sw_landing failed %d\n", rc); - } - - case CFG_ACTUATOR_POWERUP: -#if !defined(CONFIG_OIS) - rc = msm_actuator_power_up(a_ctrl); - if (rc < 0) - pr_err("Failed actuator power up%d\n", rc); -#endif - break; - - default: - break; - } - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_get_subdev_id(struct msm_actuator_ctrl_t *a_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = a_ctrl->pdev->id; - else - *subdev_id = a_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_actuator_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->act_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - kfree(a_ctrl->i2c_reg_tbl); - a_ctrl->i2c_reg_tbl = NULL; - - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_actuator_internal_ops = { - .close = msm_actuator_close, -}; - -static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("Enter\n"); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_actuator_get_subdev_id(a_ctrl, argp); - case VIDIOC_MSM_ACTUATOR_CFG: - return msm_actuator_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_actuator_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl) -{ - int rc = 0; - CDBG("%s called\n", __func__); - - CDBG("vcm info: %d %d\n", a_ctrl->vcm_pwd, - a_ctrl->vcm_enable); - - rc = msm_actuator_vreg_control(a_ctrl, 1); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - if (a_ctrl->vcm_enable) { - rc = gpio_request(a_ctrl->vcm_pwd, "msm_actuator"); - if (!rc) { - CDBG("Enable VCM PWD\n"); - gpio_direction_output(a_ctrl->vcm_pwd, 1); - } - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_actuator_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(a_ctrl->actuator_mutex); - if (on) - rc = msm_actuator_power_up(a_ctrl); - else - rc = msm_actuator_power_down(a_ctrl); - mutex_unlock(a_ctrl->actuator_mutex); - CDBG("Exit\n"); - return rc; -} - -static struct v4l2_subdev_core_ops msm_actuator_subdev_core_ops = { - .ioctl = msm_actuator_subdev_ioctl, - .s_power = msm_actuator_power, -}; - -static struct v4l2_subdev_ops msm_actuator_subdev_ops = { - .core = &msm_actuator_subdev_core_ops, -}; - -static const struct i2c_device_id msm_actuator_i2c_id[] = { - {"qcom,actuator", (kernel_ulong_t)NULL}, - { } -}; - -static int32_t msm_actuator_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_actuator_ctrl_t *act_ctrl_t = NULL; - pr_err("msm_actuator_i2c_probe: Enter\n"); - - if (client == NULL) { - pr_err("msm_actuator_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; - } - - act_ctrl_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!act_ctrl_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - kfree(act_ctrl_t); - goto probe_failure; - } - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &act_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", act_ctrl_t->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(act_ctrl_t); - return rc; - } - - act_ctrl_t->i2c_driver = &msm_actuator_i2c_driver; - act_ctrl_t->i2c_client.client = client; - act_ctrl_t->curr_step_pos = 0, - act_ctrl_t->curr_region_index = 0, - /* Set device type as I2C */ - act_ctrl_t->act_device_type = MSM_CAMERA_I2C_DEVICE; - act_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - act_ctrl_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - act_ctrl_t->actuator_mutex = &msm_actuator_mutex; - - act_ctrl_t->cam_name = act_ctrl_t->subdev_id; - CDBG("act_ctrl_t->cam_name: %d", act_ctrl_t->cam_name); - /* Assign name for sub device */ - snprintf(act_ctrl_t->msm_sd.sd.name, sizeof(act_ctrl_t->msm_sd.sd.name), - "%s", act_ctrl_t->i2c_driver->driver.name); - - -#if defined(CONFIG_OIS) - if (of_find_property(client->dev.of_node, - "qcom,cam-vreg-name", NULL)) { - - struct msm_actuator_vreg *vreg_cfg; - - vreg_cfg = &act_ctrl_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data(client->dev.of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(act_ctrl_t); - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - return rc; - } - } -#endif - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&act_ctrl_t->msm_sd.sd, - act_ctrl_t->i2c_client.client, - act_ctrl_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&act_ctrl_t->msm_sd.sd, act_ctrl_t); - act_ctrl_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - act_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&act_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - act_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - act_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - act_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&act_ctrl_t->msm_sd); - -#if defined(CONFIG_OIS) - g_msm_actuator_t = act_ctrl_t; -#endif - - pr_info("msm_actuator_i2c_probe: succeeded\n"); - pr_err("msm_actuator_i2c_probe: Exit\n"); - -probe_failure: - return rc; -} - -static int32_t msm_actuator_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_actuator_ctrl_t *msm_actuator_t = NULL; - struct msm_actuator_vreg *vreg_cfg; - pr_err("msm_actuator_platform_probe: Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_actuator_t = kzalloc(sizeof(struct msm_actuator_ctrl_t), - GFP_KERNEL); - if (!msm_actuator_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_actuator_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_actuator_t->cci_master, rc); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_actuator_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_actuator_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_actuator_t->act_v4l2_subdev_ops = &msm_actuator_subdev_ops; - msm_actuator_t->actuator_mutex = &msm_actuator_mutex; - msm_actuator_t->cam_name = pdev->id; - - /* Set platform device handle */ - msm_actuator_t->pdev = pdev; - /* Set device type as platform device */ - msm_actuator_t->act_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_actuator_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_actuator_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_actuator_t->i2c_client.cci_client) { - kfree(msm_actuator_t->vreg_cfg.cam_vreg); - kfree(msm_actuator_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = msm_actuator_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_actuator_t->msm_sd.sd, - msm_actuator_t->act_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_actuator_t->msm_sd.sd, msm_actuator_t); - msm_actuator_t->msm_sd.sd.internal_ops = &msm_actuator_internal_ops; - msm_actuator_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_actuator_t->msm_sd.sd.name, - ARRAY_SIZE(msm_actuator_t->msm_sd.sd.name), "msm_actuator"); - media_entity_init(&msm_actuator_t->msm_sd.sd.entity, 0, NULL, 0); - msm_actuator_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_actuator_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_ACTUATOR; - msm_actuator_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&msm_actuator_t->msm_sd); - -#if defined(CONFIG_OIS) - g_msm_actuator_t = msm_actuator_t; -#endif - pr_err("msm_actuator_platform_probe: Exit\n"); - return rc; -} - -static int32_t msm_actuator_hall_effect_move_focus( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_move_params_t *move_params) -{ - int32_t rc = 0; - uint16_t wait_time = 0; - int32_t dest_step_position = move_params->dest_step_pos; - struct damping_params_t *damping_params = - &move_params->ringing_params[0]; - - uint16_t curr_lens_pos; - int16_t target_lens_pos; - uint8_t lsb; - uint8_t msb; - CDBG("%s Enter %d\n", __func__, __LINE__); - wait_time = damping_params->damping_delay; - - /* NULL CHECK */ - if (a_ctrl->step_position_table == NULL ) { - pr_err("[%s::%d] NULL pointer check fail !\n", - __func__, __LINE__); - return -EFAULT; - } - curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; - target_lens_pos = a_ctrl->step_position_table[dest_step_position]; - - CDBG("%s curr_lens_pos=%d dest_lens_pos=%d\n", __func__, - curr_lens_pos, target_lens_pos); - CDBG("%s curr_step_pos=%d dest_step_position=%d\n", __func__, - a_ctrl->curr_step_pos, dest_step_position); - - if (curr_lens_pos != target_lens_pos) { - msb = ((target_lens_pos << 7) & 0x80); - lsb = target_lens_pos >> 1; - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x00, lsb, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, - __LINE__); - return rc; - } - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x01, msb, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, - __LINE__); - return rc; - } - usleep_range(wait_time, wait_time + 1000); - } - - a_ctrl->curr_step_pos = dest_step_position; - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_hall_effect_init_focus( - struct msm_actuator_ctrl_t *a_ctrl, - uint16_t size, - struct reg_settings_t *settings) -{ - int32_t rc = 0; - - CDBG("%s [QTI] Enter %d\n", __func__, __LINE__); - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - #if 0 //////////////////////////////////////////////////////////////////////// - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x08, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x01, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - msleep(200); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x03, 0x04, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - msleep(50); - - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, 0x02, 0x00, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - usleep_range(1000, 1100); - - #endif ///////////////////////////////////////////////////////////////////// - - CDBG("%s exit Line %d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_actuator_hall_effect_set_position( - struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_position_t *set_pos) -{ - int32_t rc = 0; - int32_t index; -#ifdef CHECK_MERGE - uint16_t next_lens_position; - uint16_t delay; - uint32_t hw_params = 0; -#endif - uint8_t lsb, msb; - struct msm_camera_i2c_reg_setting reg_setting; - CDBG("%s Enter : steps = %d \n", __func__, set_pos->number_of_steps); - if (set_pos->number_of_steps == 0) - return rc; - - /* NULL CHECK */ - if (a_ctrl->i2c_reg_tbl == NULL ) { - pr_err("[%s::%d] NULL pointer check fail !\n", __func__, __LINE__); - return -EFAULT; - } - - a_ctrl->i2c_tbl_index = 0; -#ifdef CHECK_MERGE - for (index = 0; index < set_pos->number_of_steps; index++) { - next_lens_position = set_pos->pos[index]; - delay = set_pos->delay[index]; - a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, - next_lens_position, hw_params, delay); - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.data_type = a_ctrl->i2c_data_type; - - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", - __func__, __LINE__); - return rc; - } - a_ctrl->i2c_tbl_index = 0; - } -#endif - - for (index = 0; index < set_pos->number_of_steps; index++) { - msb = ((set_pos->pos[index] << 7) & 0x80); - lsb = set_pos->pos[index] >> 1; - CDBG("%s index=%d msb= 0x%X, lsb=0x%X\n", __func__, index, msb, lsb); - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = 0x00; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = lsb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = 0; - a_ctrl->i2c_tbl_index++; - - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_addr = 0x01; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].reg_data = msb; - a_ctrl->i2c_reg_tbl[a_ctrl->i2c_tbl_index].delay = set_pos->delay[index]; - a_ctrl->i2c_tbl_index++; - } - - reg_setting.reg_setting = a_ctrl->i2c_reg_tbl; - reg_setting.size = a_ctrl->i2c_tbl_index; - reg_setting.data_type = a_ctrl->i2c_data_type; - rc = a_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_table_w_microdelay( - &a_ctrl->i2c_client, ®_setting); - if (rc < 0) { - pr_err("%s Failed I2C write Line %d\n", __func__, __LINE__); - return rc; - } - - CDBG("%s exit %d\n", __func__, __LINE__); - return rc; -} - - -static int32_t msm_actuator_init_step_table(struct msm_actuator_ctrl_t *a_ctrl, - struct msm_actuator_set_info_t *set_info) -{ - int16_t code_per_step = 0; - int16_t cur_code = 0; - int16_t step_index = 0, region_index = 0; - uint16_t step_boundary = 0; - uint32_t max_code_size = 1; - uint16_t data_size = set_info->actuator_params.data_size; - CDBG("Enter\n"); - - for (; data_size > 0; data_size--) - max_code_size *= 2; - - if (a_ctrl->step_position_table) { - kfree(a_ctrl->step_position_table); - a_ctrl->step_position_table = NULL; - } - - if (set_info->af_tuning_params.total_steps - > MAX_ACTUATOR_AF_TOTAL_STEPS) { - pr_err("[%s::%d] Max actuator totalsteps exceeded = %d\n", - __func__, __LINE__, set_info->af_tuning_params.total_steps); - return -EFAULT; - } - /* Fill step position table */ - a_ctrl->step_position_table = - kmalloc(sizeof(uint16_t) * - (set_info->af_tuning_params.total_steps + 1), GFP_KERNEL); - if (a_ctrl->step_position_table == NULL) { - pr_err("[%s::%d] mem alloc fail !\n", __func__, __LINE__); - return -ENOMEM; - } - - cur_code = set_info->af_tuning_params.initial_code; - a_ctrl->step_position_table[step_index++] = cur_code; - for (region_index = 0; - region_index < a_ctrl->region_size; - region_index++) { - code_per_step = - a_ctrl->region_params[region_index].code_per_step; - step_boundary = - a_ctrl->region_params[region_index]. - step_bound[MOVE_NEAR]; - for (; step_index <= step_boundary; - step_index++) { - cur_code += code_per_step; - if (cur_code < max_code_size) - a_ctrl->step_position_table[step_index] = - cur_code; - else { - for (; step_index < - set_info->af_tuning_params.total_steps; - step_index++) - a_ctrl-> - step_position_table[ - step_index] = - max_code_size; - } - } - } - CDBG("Exit\n"); - return 0; -} - -static const struct of_device_id msm_actuator_i2c_dt_match[] = { - {.compatible = "qcom,actuator"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_i2c_dt_match); - -static struct i2c_driver msm_actuator_i2c_driver = { - .id_table = msm_actuator_i2c_id, - .probe = msm_actuator_i2c_probe, - .remove = __exit_p(msm_actuator_i2c_remove), - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_i2c_dt_match, - }, -}; - -static const struct of_device_id msm_actuator_dt_match[] = { - {.compatible = "qcom,actuator", .data = NULL}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_actuator_dt_match); - -static struct platform_driver msm_actuator_platform_driver = { - .driver = { - .name = "qcom,actuator", - .owner = THIS_MODULE, - .of_match_table = msm_actuator_dt_match, - }, -}; - -static int __init msm_actuator_init_module(void) -{ - int32_t rc = 0; - pr_err("msm_actuator_init_module: Enter\n"); - rc = platform_driver_probe(&msm_actuator_platform_driver, - msm_actuator_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&msm_actuator_i2c_driver); -} - -static struct msm_actuator msm_vcm_actuator_table = { - .act_type = ACTUATOR_VCM, - .func_tbl = { - .actuator_init_step_table = msm_actuator_vcm_init_step_table, - .actuator_move_focus = msm_actuator_move_focus, - .actuator_write_focus = msm_actuator_write_focus, - .actuator_set_default_focus = msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_vcm_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_vcm_set_position, - .actuator_sw_landing = msm_actuator_vcm_sw_landing, - }, -}; - -static struct msm_actuator msm_piezo_actuator_table = { - .act_type = ACTUATOR_PIEZO, - .func_tbl = { - .actuator_init_step_table = NULL, - .actuator_move_focus = msm_actuator_piezo_move_focus, - .actuator_write_focus = NULL, - .actuator_set_default_focus = - msm_actuator_piezo_set_default_focus, - .actuator_init_focus = msm_actuator_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - }, -}; - -static struct msm_actuator msm_hall_effect_actuator_table = { - .act_type = ACTUATOR_HALL_EFFECT, - .func_tbl = { - .actuator_init_step_table = msm_actuator_init_step_table, - .actuator_move_focus = msm_actuator_hall_effect_move_focus, - .actuator_write_focus = NULL, - .actuator_set_default_focus = - msm_actuator_set_default_focus, - .actuator_init_focus = msm_actuator_hall_effect_init_focus, - .actuator_parse_i2c_params = msm_actuator_parse_i2c_params, - .actuator_set_position = msm_actuator_hall_effect_set_position, - }, -}; - -module_init(msm_actuator_init_module); -MODULE_DESCRIPTION("MSM ACTUATOR"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.h deleted file mode 100644 index 3bd3dc18fe8f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/actuator/msm_actuator.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_ACTUATOR_H -#define MSM_ACTUATOR_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_ACTUATOT_MAX_VREGS (10) - -struct msm_actuator_ctrl_t; - -enum msm_actuator_state_t { - ACTUATOR_POWER_UP, - ACTUATOR_POWER_DOWN, -}; - -struct msm_actuator_func_tbl { - int32_t (*actuator_i2c_write_b_af)(struct msm_actuator_ctrl_t *, - uint8_t, - uint8_t); - int32_t (*actuator_init_step_table)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_info_t *); - int32_t (*actuator_init_focus)(struct msm_actuator_ctrl_t *, - uint16_t, struct reg_settings_t *); - int32_t (*actuator_set_default_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - int32_t (*actuator_move_focus) (struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *); - void (*actuator_parse_i2c_params)(struct msm_actuator_ctrl_t *, - int16_t, uint32_t, uint16_t); - void (*actuator_write_focus)(struct msm_actuator_ctrl_t *, - uint16_t, - struct damping_params_t *, - int8_t, - int16_t); - int32_t (*actuator_set_position)(struct msm_actuator_ctrl_t *, - struct msm_actuator_set_position_t *); - int32_t (*actuator_sw_landing)(struct msm_actuator_ctrl_t *, - struct msm_actuator_move_params_t *, int); -}; - -struct msm_actuator { - enum actuator_type act_type; - struct msm_actuator_func_tbl func_tbl; -}; - -struct msm_actuator_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_ACTUATOT_MAX_VREGS]; - int num_vreg; -}; - -struct msm_actuator_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t act_device_type; - struct msm_sd_subdev msm_sd; - enum af_camera_name cam_name; - struct mutex *actuator_mutex; - struct msm_actuator_func_tbl *func_tbl; - enum msm_actuator_data_type i2c_data_type; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *act_v4l2_subdev_ops; - - int16_t curr_step_pos; - uint16_t curr_region_index; - uint16_t *step_position_table; - struct region_params_t region_params[MAX_ACTUATOR_REGION]; - uint16_t reg_tbl_size; - struct msm_actuator_reg_params_t reg_tbl[MAX_ACTUATOR_REG_TBL_SIZE]; - uint16_t region_size; - void *user_data; - uint32_t vcm_pwd; - uint32_t vcm_enable; - uint32_t total_steps; - uint16_t pwd_step; - uint16_t initial_code; - struct msm_camera_i2c_reg_array *i2c_reg_tbl; - uint16_t i2c_tbl_index; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_actuator_state_t actuator_state; - struct msm_actuator_vreg vreg_cfg; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/Makefile deleted file mode 100644 index 1349f034dfdd..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSM_CCI) += msm_cci.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cam_cci_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cam_cci_hwreg.h deleted file mode 100644 index 059633bfd54a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cam_cci_hwreg.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAM_CCI_HWREG__ -#define __MSM_CAM_CCI_HWREG__ - -#define CCI_HW_VERSION_ADDR 0x00000000 -#define CCI_RESET_CMD_ADDR 0x00000004 -#define CCI_RESET_CMD_RMSK 0x0f73f3f7 -#define CCI_M0_RESET_RMSK 0x3F1 -#define CCI_M1_RESET_RMSK 0x3F001 -#define CCI_QUEUE_START_ADDR 0x00000008 -#define CCI_SET_CID_SYNC_TIMER_0_ADDR 0x00000010 -#define CCI_I2C_M0_SCL_CTL_ADDR 0x00000100 -#define CCI_I2C_M0_SDA_CTL_0_ADDR 0x00000104 -#define CCI_I2C_M0_SDA_CTL_1_ADDR 0x00000108 -#define CCI_I2C_M0_SDA_CTL_2_ADDR 0x0000010c -#define CCI_I2C_M0_READ_DATA_ADDR 0x00000118 -#define CCI_I2C_M0_MISC_CTL_ADDR 0x00000110 -#define CCI_I2C_M0_READ_BUF_LEVEL_ADDR 0x0000011C -#define CCI_HALT_REQ_ADDR 0x00000034 -#define CCI_M0_HALT_REQ_RMSK 0x1 -#define CCI_M1_HALT_REQ_RMSK 0x2 -#define CCI_I2C_M1_SCL_CTL_ADDR 0x00000200 -#define CCI_I2C_M1_SDA_CTL_0_ADDR 0x00000204 -#define CCI_I2C_M1_SDA_CTL_1_ADDR 0x00000208 -#define CCI_I2C_M1_SDA_CTL_2_ADDR 0x0000020c -#define CCI_I2C_M1_MISC_CTL_ADDR 0x00000210 -#define CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR 0x00000304 -#define CCI_I2C_M0_Q0_CUR_CMD_ADDR 0x00000308 -#define CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR 0x00000300 -#define CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x00000310 -#define CCI_IRQ_MASK_0_ADDR 0x00000c04 -#define CCI_IRQ_MASK_0_RMSK 0x7fff7ff7 -#define CCI_IRQ_CLEAR_0_ADDR 0x00000c08 -#define CCI_IRQ_STATUS_0_ADDR 0x00000c0c -#define CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK 0x4000000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK 0x2000000 -#define CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK 0x1000000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK 0x100000 -#define CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK 0x10000 -#define CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK 0x1000 -#define CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK 0x100 -#define CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK 0x10 -#define CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK 0x18000EE6 -#define CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK 0x60EE6000 -#define CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK 0x1 -#define CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR 0x00000c00 -#endif /* __MSM_CAM_CCI_HWREG__ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.c deleted file mode 100644 index c6ced96e3d4a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.c +++ /dev/null @@ -1,1361 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_cam_cci_hwreg.h" -#include "msm_camera_io_util.h" - -#define V4L2_IDENT_CCI 50005 -#define CCI_I2C_QUEUE_0_SIZE 64 -#define CCI_I2C_QUEUE_1_SIZE 16 -#define CYCLES_PER_MICRO_SEC 4915 -#define CCI_MAX_DELAY 10000 - -#define CCI_TIMEOUT msecs_to_jiffies(100) - -/* TODO move this somewhere else */ -#define MSM_CCI_DRV_NAME "msm_cci" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do {} while (0) -#endif - -/* Max bytes that can be read per CCI read transaction */ -#define CCI_READ_MAX 12 -#define CCI_I2C_READ_MAX_RETRIES 3 -#define CCI_I2C_MAX_READ 8192 -#define CCI_I2C_MAX_WRITE 8192 -#define CCI_NUM_CLK_MAX 16 - -static struct v4l2_subdev *g_cci_subdev; - -static struct msm_cam_clk_info cci_clk_info[CCI_NUM_CLK_MAX]; - -static void msm_cci_set_clk_param(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl) -{ - struct msm_cci_clk_params_t *clk_params = NULL; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - enum i2c_freq_mode_t i2c_freq_mode = c_ctrl->cci_info->i2c_freq_mode; - - if (cci_dev->master_clk_init[master]) - return; - clk_params = &cci_dev->cci_clk_params[i2c_freq_mode]; - - if (MASTER_0 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M0_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M0_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M0_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M0_MISC_CTL_ADDR); - } else if (MASTER_1 == master) { - msm_camera_io_w_mb(clk_params->hw_thigh << 16 | - clk_params->hw_tlow, - cci_dev->base + CCI_I2C_M1_SCL_CTL_ADDR); - msm_camera_io_w_mb(clk_params->hw_tsu_sto << 16 | - clk_params->hw_tsu_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_0_ADDR); - msm_camera_io_w_mb(clk_params->hw_thd_dat << 16 | - clk_params->hw_thd_sta, - cci_dev->base + CCI_I2C_M1_SDA_CTL_1_ADDR); - msm_camera_io_w_mb(clk_params->hw_tbuf, - cci_dev->base + CCI_I2C_M1_SDA_CTL_2_ADDR); - msm_camera_io_w_mb(clk_params->hw_scl_stretch_en << 8 | - clk_params->hw_trdhld << 4 | clk_params->hw_tsp, - cci_dev->base + CCI_I2C_M1_MISC_CTL_ADDR); - } - cci_dev->master_clk_init[master] = 1; - return; -} - -static void msm_cci_flush_queue(struct cci_device *cci_dev, - enum cci_i2c_master_t master) -{ - int32_t rc = 0; - - msm_camera_io_w_mb(1 << master, cci_dev->base + CCI_HALT_REQ_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc < 0) { - pr_err("%s:%d wait failed\n", __func__, __LINE__); - } else if (rc == 0) { - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - - /* Set proper mask to RESET CMD address based on MASTER */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, __LINE__, - rc); - } - return; -} - -static int32_t msm_cci_validate_queue(struct cci_device *cci_dev, - uint32_t len, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t read_val = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - read_val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR + reg_offset); - CDBG("%s line %d CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR %d len %d max %d\n", - __func__, __LINE__, read_val, len, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size); - if ((read_val + len + 1) > cci_dev-> - cci_i2c_queue_info[master][queue].max_queue_size) { - uint32_t reg_val = 0; - uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - msm_camera_io_w_mb(report_val, - cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - read_val++; - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR %d\n", - __func__, __LINE__, read_val); - msm_camera_io_w_mb(read_val, cci_dev->base + - CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR + reg_offset); - reg_val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(reg_val, cci_dev->base + - CCI_QUEUE_START_ADDR); - CDBG("%s line %d wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - return rc; - } - rc = cci_dev->cci_master_info[master].status; - if (rc < 0) - pr_err("%s failed rc %d\n", __func__, rc); - } - return rc; -} - -static int32_t msm_cci_data_queue(struct cci_device *cci_dev, - struct msm_camera_cci_ctrl *c_ctrl, enum cci_i2c_queue_t queue, uint8_t is_burst) -{ - uint16_t i = 0, j = 0, k = 0, h = 0, len = 0; - int32_t rc = 0; - uint32_t cmd = 0, delay = 0; - uint8_t data[11]; - uint16_t reg_addr = 0; - struct msm_camera_i2c_reg_setting *i2c_msg = - &c_ctrl->cfg.cci_i2c_write_cfg; - uint16_t cmd_size = i2c_msg->size; - struct msm_camera_i2c_reg_array *i2c_cmd = i2c_msg->reg_setting; - enum cci_i2c_master_t master = c_ctrl->cci_info->cci_i2c_master; - - if (i2c_cmd == NULL) { - pr_err("%s:%d Failed line\n", __func__, - __LINE__); - return -EINVAL; - } - - if ((!cmd_size) || (cmd_size > CCI_I2C_MAX_WRITE)) { - pr_err("%s:%d Failed line\n", __func__, __LINE__); - return -EINVAL; - } - - CDBG("%s addr type %d data type %d\n", __func__, - i2c_msg->addr_type, i2c_msg->data_type); - - if (i2c_msg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - if (i2c_msg->data_type >= MSM_CAMERA_I2C_DATA_TYPE_MAX) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -EINVAL; - } - /* assume total size within the max queue */ - while (cmd_size) { - CDBG("%s cmd_size %d addr 0x%x data 0x%x", __func__, - cmd_size, i2c_cmd->reg_addr, i2c_cmd->reg_data); - delay = i2c_cmd->delay; - data[i++] = CCI_I2C_WRITE_CMD; - if (i2c_cmd->reg_addr) { - reg_addr = i2c_cmd->reg_addr; - } - /* either byte or word addr */ - if (i2c_msg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - data[i++] = reg_addr; - else { - data[i++] = (reg_addr & 0xFF00) >> 8; - data[i++] = reg_addr & 0x00FF; - } - /* max of 10 data bytes */ - do { - if ((i2c_msg->data_type == MSM_CAMERA_I2C_BYTE_DATA) || - (i2c_msg->data_type == MSM_CAMERA_I2C_BURST_DATA)) { - data[i++] = i2c_cmd->reg_data; - if (!is_burst) - reg_addr++; - } else { - if ((i + 1) <= 10) { - data[i++] = (i2c_cmd->reg_data & - 0xFF00) >> 8; /* MSB */ - data[i++] = i2c_cmd->reg_data & - 0x00FF; /* LSB */ - if (!is_burst) - reg_addr += 2; - } else - break; - } - i2c_cmd++; - } while (--cmd_size && !i2c_cmd->reg_addr && (i <= 10)); - data[0] |= ((i-1) << 4); - len = ((i-1)/4) + 1; - rc = msm_cci_validate_queue(cci_dev, len, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - for (h = 0, k = 0; h < len; h++) { - cmd = 0; - for (j = 0; (j < 4 && k < i); j++) - cmd |= (data[k++] << (j * 8)); - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - if ((delay > 0) && (delay < CCI_MAX_DELAY)) { - cmd = (uint32_t)((delay * CYCLES_PER_MICRO_SEC) / - 0x100); - cmd <<= 4; - cmd |= CCI_I2C_WAIT_CMD; - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR 0x%x\n", - __func__, cmd); - msm_camera_io_w_mb(cmd, cci_dev->base + - CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - master * 0x200 + queue * 0x100); - } - i = 0; - } - return rc; -} - -static int32_t msm_cci_write_i2c_queue(struct cci_device *cci_dev, - uint32_t val, - enum cci_i2c_master_t master, - enum cci_i2c_queue_t queue) -{ - int32_t rc = 0; - uint32_t reg_offset = master * 0x200 + queue * 0x100; - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cci_validate_queue(cci_dev, 1, master, queue); - if (rc < 0) { - pr_err("%s: failed %d", __func__, __LINE__); - return rc; - } - CDBG("%s CCI_I2C_M0_Q0_LOAD_DATA_ADDR:val 0x%x:0x%x\n", - __func__, CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR + - reg_offset); - return rc; -} - -static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - uint32_t val = 0; - int32_t read_words = 0, exp_words = 0; - int32_t index = 0, first_byte = 0; - uint32_t i = 0; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_1; - struct cci_device *cci_dev = NULL; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - CDBG("%s line %d\n", __func__, __LINE__); - cci_dev = v4l2_get_subdevdata(sd); - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_read call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - if (read_cfg->data == NULL) { - pr_err("%s:%d Data ptr is NULL\n", __func__, - __LINE__); - goto ERROR; - } - - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type >= MSM_CAMERA_I2C_ADDR_TYPE_MAX) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - if (read_cfg->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - ((read_cfg->addr & 0xFF) << 8); - if (read_cfg->addr_type == MSM_CAMERA_I2C_WORD_ADDR) - val = CCI_I2C_WRITE_DISABLE_P_CMD | (read_cfg->addr_type << 4) | - (((read_cfg->addr & 0xFF00) >> 8) << 8) | - ((read_cfg->addr & 0xFF) << 16); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_READ_CMD | (read_cfg->num_byte << 4); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_UNLOCK_CMD; - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s cur word cnt 0x%x\n", __func__, val); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = 0; - } - CDBG("%s:%d E wait_for_completion_interruptible_timeout\n", __func__, - __LINE__); - - read_words = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_BUF_LEVEL_ADDR + master * 0x100); - exp_words = ((read_cfg->num_byte / 4) + 1); - if (read_words != exp_words) { - pr_err("%s:%d read_words = %d, exp words = %d\n", __func__, - __LINE__, read_words, exp_words); - memset(read_cfg->data, 0, read_cfg->num_byte); - rc = -EINVAL; - goto ERROR; - } - index = 0; - CDBG("%s index %d num_type %d\n", __func__, index, - read_cfg->num_byte); - first_byte = 0; - do { - val = msm_camera_io_r_mb(cci_dev->base + - CCI_I2C_M0_READ_DATA_ADDR + master * 0x100); - CDBG("%s read val 0x%x\n", __func__, val); - for (i = 0; (i < 4) && (index < read_cfg->num_byte); i++) { - CDBG("%s i %d index %d\n", __func__, i, index); - if (!first_byte) { - CDBG("%s sid 0x%x\n", __func__, val & 0xFF); - first_byte++; - } else { - read_cfg->data[index] = - (val >> (i * 8)) & 0xFF; - CDBG("%s data[%d] 0x%x\n", __func__, index, - read_cfg->data[index]); - index++; - } - } - } while (--read_words > 0); -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - int32_t rc = 0; - struct cci_device *cci_dev = NULL; - enum cci_i2c_master_t master; - struct msm_camera_cci_i2c_read_cfg *read_cfg = NULL; - uint16_t read_bytes = 0; - - if (!sd || !c_ctrl) { - pr_err("%s:%d sd %pK c_ctrl %pK\n", __func__, - __LINE__, sd, c_ctrl); - return -EINVAL; - } - if (!c_ctrl->cci_info) { - pr_err("%s:%d cci_info NULL\n", __func__, __LINE__); - return -EINVAL; - } - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev) { - pr_err("%s:%d cci_dev NULL\n", __func__, __LINE__); - return -EINVAL; - } - - if (c_ctrl->cci_info->cci_i2c_master > MASTER_MAX - || c_ctrl->cci_info->cci_i2c_master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - - master = c_ctrl->cci_info->cci_i2c_master; - read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg; - if ((!read_cfg->num_byte) || (read_cfg->num_byte > CCI_I2C_MAX_READ)) { - pr_err("%s:%d read num bytes 0\n", __func__, __LINE__); - rc = -EINVAL; - goto ERROR; - } - - read_bytes = read_cfg->num_byte; - do { - if (read_bytes > CCI_READ_MAX) - read_cfg->num_byte = CCI_READ_MAX; - else - read_cfg->num_byte = read_bytes; - rc = msm_cci_i2c_read(sd, c_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - if (read_bytes > CCI_READ_MAX) { - read_cfg->addr += CCI_READ_MAX; - read_cfg->data += CCI_READ_MAX; - read_bytes -= CCI_READ_MAX; - } else { - read_bytes = 0; - } - } while (read_bytes); -ERROR: - return rc; -} - -static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl, uint8_t is_burst) -{ - int32_t rc = 0; - struct cci_device *cci_dev; - uint32_t val; - enum cci_i2c_master_t master; - enum cci_i2c_queue_t queue = QUEUE_0; - cci_dev = v4l2_get_subdevdata(sd); - - master = c_ctrl->cci_info->cci_i2c_master; - if (master >= MASTER_MAX - || master < 0) { - pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); - return -EINVAL; - } - CDBG("%s master %d, queue %d\n", __func__, master, queue); - CDBG("%s set param sid 0x%x retries %d id_map %d\n", __func__, - c_ctrl->cci_info->sid, c_ctrl->cci_info->retries, - c_ctrl->cci_info->id_map); - mutex_lock(&cci_dev->cci_master_info[master].mutex); - - /* - * Call validate queue to make sure queue is empty before starting. - * If this call fails, don't proceed with i2c_write call. This is to - * avoid overflow / underflow of queue - */ - rc = msm_cci_validate_queue(cci_dev, - cci_dev->cci_i2c_queue_info[master][queue].max_queue_size - 1, - master, queue); - if (rc < 0) { - pr_err("%s:%d Initial validataion failed rc %d\n", __func__, - __LINE__, rc); - goto ERROR; - } - if (c_ctrl->cci_info->retries > CCI_I2C_READ_MAX_RETRIES) { - pr_err("%s:%d More than max retries\n", __func__, - __LINE__); - goto ERROR; - } - - val = CCI_I2C_SET_PARAM_CMD | c_ctrl->cci_info->sid << 4 | - c_ctrl->cci_info->retries << 16 | - c_ctrl->cci_info->id_map << 18; - CDBG("%s:%d CCI_I2C_SET_PARAM_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_LOCK_CMD; - CDBG("%s:%d CCI_I2C_LOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - rc = msm_cci_data_queue(cci_dev, c_ctrl, queue, is_burst); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - val = CCI_I2C_UNLOCK_CMD; - CDBG("%s:%d CCI_I2C_UNLOCK_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = CCI_I2C_REPORT_CMD | (1 << 8); - CDBG("%s:%d CCI_I2C_REPORT_CMD\n", __func__, __LINE__); - rc = msm_cci_write_i2c_queue(cci_dev, val, master, queue); - if (rc < 0) { - CDBG("%s failed line %d\n", __func__, __LINE__); - goto ERROR; - } - - val = msm_camera_io_r_mb(cci_dev->base + CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - CDBG("%s:%d cur word count %d\n", __func__, __LINE__, val); - CDBG("%s:%d CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR - + master * 0x200 + queue * 0x100); - - val = 1 << ((master * 2) + queue); - CDBG("%s:%d CCI_QUEUE_START_ADDR\n", __func__, __LINE__); - msm_camera_io_w_mb(val, cci_dev->base + CCI_QUEUE_START_ADDR); - - CDBG("%s:%d E wait_for_completion_interruptible\n", - __func__, __LINE__); - rc = wait_for_completion_interruptible_timeout(&cci_dev-> - cci_master_info[master].reset_complete, CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - msm_cci_flush_queue(cci_dev, master); - goto ERROR; - } else { - rc = cci_dev->cci_master_info[master].status; - } - CDBG("%s:%d X wait_for_completion_interruptible\n", __func__, - __LINE__); - -ERROR: - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - return rc; -} - -static int msm_cci_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - if (!chip) { - pr_err("%s:%d: NULL pointer supplied for chip ident\n", - __func__, __LINE__); - return -EINVAL; - } - chip->ident = V4L2_IDENT_CCI; - chip->revision = 0; - return 0; -} - -static int32_t msm_cci_pinctrl_init(struct cci_device *cci_dev) -{ - struct msm_pinctrl_info *cci_pctrl = NULL; - - cci_pctrl = &cci_dev->cci_pinctrl; - cci_pctrl->pinctrl = devm_pinctrl_get(&cci_dev->pdev->dev); - if (IS_ERR_OR_NULL(cci_pctrl->pinctrl)) { - pr_err("%s:%d devm_pinctrl_get cci_pinctrl failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_active = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_active)) { - pr_err("%s:%d look up state for active state failed\n", - __func__, __LINE__); - return -EINVAL; - } - cci_pctrl->gpio_state_suspend = pinctrl_lookup_state( - cci_pctrl->pinctrl, - CCI_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(cci_pctrl->gpio_state_suspend)) { - pr_err("%s:%d look up state for suspend state failed\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -static int32_t msm_cci_init(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *c_ctrl) -{ - uint8_t i = 0; - int32_t rc = 0, ret = 0; - struct cci_device *cci_dev; - enum cci_i2c_master_t master; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev || !c_ctrl) { - pr_err("%s:%d failed: invalid params %pK %pK\n", __func__, - __LINE__, cci_dev, c_ctrl); - rc = -ENOMEM; - return rc; - } - if (cci_dev->ref_count++) { - CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); - master = c_ctrl->cci_info->cci_i2c_master; - CDBG("%s:%d master %d\n", __func__, __LINE__, master); - if (master < MASTER_MAX && master >= 0) { - mutex_lock(&cci_dev->cci_master_info[master].mutex); - /* Set reset pending flag to TRUE */ - cci_dev->cci_master_info[master].reset_pending = TRUE; - /* Set proper mask to RESET CMD address */ - if (master == MASTER_0) - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - else - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - /* wait for reset done irq */ - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[master]. - reset_complete, - CCI_TIMEOUT); - if (rc <= 0) - pr_err("%s:%d wait failed %d\n", __func__, - __LINE__, rc); - mutex_unlock(&cci_dev->cci_master_info[master].mutex); - } - return 0; - } - ret = msm_cci_pinctrl_init(cci_dev); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - cci_dev->cci_pinctrl_status = 0; - } else { - cci_dev->cci_pinctrl_status = 1; - } - rc = msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 1); - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: request gpio failed\n", __func__); - goto request_gpio_failed; - } - rc = msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 1); - if (rc < 0) { - cci_dev->ref_count--; - CDBG("%s: clk enable failed\n", __func__); - goto clk_enable_failed; - } - enable_irq(cci_dev->irq->start); - cci_dev->hw_version = msm_camera_io_r_mb(cci_dev->base + - CCI_HW_VERSION_ADDR); - pr_info("%s:%d: hw_version = 0x%x\n", __func__, __LINE__, - cci_dev->hw_version); - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_RESET_CMD_RMSK, cci_dev->base + - CCI_RESET_CMD_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_RESET_CMD_ADDR); - rc = wait_for_completion_interruptible_timeout( - &cci_dev->cci_master_info[MASTER_0].reset_complete, - CCI_TIMEOUT); - if (rc <= 0) { - pr_err("%s: wait_for_completion_interruptible_timeout %d\n", - __func__, __LINE__); - if (rc == 0) - rc = -ETIMEDOUT; - goto reset_complete_failed; - } - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - msm_cci_set_clk_param(cci_dev, c_ctrl); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_MASK_0_ADDR); - msm_camera_io_w_mb(CCI_IRQ_MASK_0_RMSK, - cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - cci_dev->cci_state = CCI_STATE_ENABLED; - - return 0; - -reset_complete_failed: - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); -clk_enable_failed: - if (cci_dev->cci_pinctrl_status) { - ret = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - } - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); -request_gpio_failed: - cci_dev->ref_count--; - return rc; -} - -static int32_t msm_cci_release(struct v4l2_subdev *sd) -{ - uint8_t i = 0, rc = 0; - struct cci_device *cci_dev; - - cci_dev = v4l2_get_subdevdata(sd); - if (!cci_dev->ref_count || cci_dev->cci_state != CCI_STATE_ENABLED) { - pr_err("%s invalid ref count %d / cci state %d\n", - __func__, cci_dev->ref_count, cci_dev->cci_state); - return -EINVAL; - } - if (--cci_dev->ref_count) { - CDBG("%s ref_count Exit %d\n", __func__, cci_dev->ref_count); - return 0; - } - disable_irq(cci_dev->irq->start); - msm_cam_clk_enable(&cci_dev->pdev->dev, cci_clk_info, - cci_dev->cci_clk, cci_dev->num_clk, 0); - if (cci_dev->cci_pinctrl_status) { - rc = pinctrl_select_state(cci_dev->cci_pinctrl.pinctrl, - cci_dev->cci_pinctrl.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to active state\n", - __func__, __LINE__); - } - cci_dev->cci_pinctrl_status = 0; - msm_camera_request_gpio_table(cci_dev->cci_gpio_tbl, - cci_dev->cci_gpio_tbl_size, 0); - for (i = 0; i < MASTER_MAX; i++) - cci_dev->master_clk_init[i] = 0; - cci_dev->cci_state = CCI_STATE_DISABLED; - - return 0; -} - -static int32_t msm_cci_config(struct v4l2_subdev *sd, - struct msm_camera_cci_ctrl *cci_ctrl) -{ - int32_t rc = 0; - CDBG("%s line %d cmd %d\n", __func__, __LINE__, - cci_ctrl->cmd); - switch (cci_ctrl->cmd) { - case MSM_CCI_INIT: - rc = msm_cci_init(sd, cci_ctrl); - break; - case MSM_CCI_RELEASE: - rc = msm_cci_release(sd); - break; - case MSM_CCI_I2C_READ: - rc = msm_cci_i2c_read_bytes(sd, cci_ctrl); - break; - case MSM_CCI_I2C_WRITE: - rc = msm_cci_i2c_write(sd, cci_ctrl, 0); - break; - case MSM_CCI_I2C_WRITE_BURST: - rc = msm_cci_i2c_write(sd, cci_ctrl, 1); - break; - case MSM_CCI_GPIO_WRITE: - break; - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - cci_ctrl->status = rc; - return rc; -} - -static irqreturn_t msm_cci_irq(int irq_num, void *data) -{ - uint32_t irq; - struct cci_device *cci_dev = data; - irq = msm_camera_io_r_mb(cci_dev->base + CCI_IRQ_STATUS_0_ADDR); - msm_camera_io_w_mb(irq, cci_dev->base + CCI_IRQ_CLEAR_0_ADDR); - msm_camera_io_w_mb(0x1, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - msm_camera_io_w_mb(0x0, cci_dev->base + CCI_IRQ_GLOBAL_CLEAR_CMD_ADDR); - CDBG("%s CCI_I2C_M0_STATUS_ADDR = 0x%x\n", __func__, irq); - if (irq & CCI_IRQ_STATUS_0_RST_DONE_ACK_BMSK) { - if (cci_dev->cci_master_info[MASTER_0].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_0].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_0]. - reset_complete); - } - if (cci_dev->cci_master_info[MASTER_1].reset_pending == TRUE) { - cci_dev->cci_master_info[MASTER_1].reset_pending = - FALSE; - complete(&cci_dev->cci_master_info[MASTER_1]. - reset_complete); - } - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M0_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_0].status = 0; - complete(&cci_dev->cci_master_info[MASTER_0].reset_complete); - } - if ((irq & CCI_IRQ_STATUS_0_I2C_M1_RD_DONE_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT_BMSK) || - (irq & CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT_BMSK)) { - cci_dev->cci_master_info[MASTER_1].status = 0; - complete(&cci_dev->cci_master_info[MASTER_1].reset_complete); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_0].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M0_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK_BMSK) { - cci_dev->cci_master_info[MASTER_1].reset_pending = TRUE; - msm_camera_io_w_mb(CCI_M1_RESET_RMSK, - cci_dev->base + CCI_RESET_CMD_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M0_ERROR_BMSK) { - pr_err("%s:%d MASTER_0 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_0].status = -EINVAL; - msm_camera_io_w_mb(CCI_M0_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - if (irq & CCI_IRQ_STATUS_0_I2C_M1_ERROR_BMSK) { - pr_err("%s:%d MASTER_1 error 0x%x\n", __func__, __LINE__, irq); - cci_dev->cci_master_info[MASTER_1].status = -EINVAL; - msm_camera_io_w_mb(CCI_M1_HALT_REQ_RMSK, - cci_dev->base + CCI_HALT_REQ_ADDR); - } - return IRQ_HANDLED; -} - -static int msm_cci_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct cci_device *cci_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s line %d\n", __func__, __LINE__); - ret = msm_cci_irq(cci_dev->irq->start, cci_dev); - CDBG("%s: msm_cci_irq return %d\n", __func__, ret); - *handled = TRUE; - return 0; -} - -static long msm_cci_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - CDBG("%s line %d\n", __func__, __LINE__); - switch (cmd) { - case VIDIOC_MSM_CCI_CFG: - rc = msm_cci_config(sd, arg); - break; - case MSM_SD_SHUTDOWN: { - return rc; - } - default: - rc = -ENOIOCTLCMD; - } - CDBG("%s line %d rc %d\n", __func__, __LINE__, rc); - return rc; -} - -static struct v4l2_subdev_core_ops msm_cci_subdev_core_ops = { - .g_chip_ident = &msm_cci_subdev_g_chip_ident, - .ioctl = &msm_cci_subdev_ioctl, - .interrupt_service_routine = msm_cci_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_cci_subdev_ops = { - .core = &msm_cci_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_cci_internal_ops; - -static void msm_cci_init_cci_params(struct cci_device *new_cci_dev) -{ - uint8_t i = 0, j = 0; - for (i = 0; i < NUM_MASTERS; i++) { - new_cci_dev->cci_master_info[i].status = 0; - mutex_init(&new_cci_dev->cci_master_info[i].mutex); - init_completion(&new_cci_dev-> - cci_master_info[i].reset_complete); - for (j = 0; j < NUM_QUEUES; j++) { - if (j == QUEUE_0) - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_0_SIZE; - else - new_cci_dev->cci_i2c_queue_info[i][j]. - max_queue_size = CCI_I2C_QUEUE_1_SIZE; - } - } - return; -} - -static int32_t msm_cci_init_gpio_params(struct cci_device *cci_dev) -{ - int32_t rc = 0, i = 0; - uint32_t *val_array = NULL; - uint8_t tbl_size = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct gpio *gpio_tbl = NULL; - - cci_dev->cci_gpio_tbl_size = tbl_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, tbl_size); - if (!tbl_size) { - pr_err("%s:%d gpio count 0\n", __func__, __LINE__); - return 0; - } - - gpio_tbl = cci_dev->cci_gpio_tbl = - kzalloc(sizeof(struct gpio) * tbl_size, GFP_KERNEL); - if (!gpio_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - return 0; - } - - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].gpio = of_get_gpio(of_node, i); - CDBG("%s gpio_tbl[%d].gpio = %d\n", __func__, i, - gpio_tbl[i].gpio); - } - - val_array = kzalloc(sizeof(uint32_t) * tbl_size, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-tbl-flags", - val_array, tbl_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < tbl_size; i++) { - gpio_tbl[i].flags = val_array[i]; - CDBG("%s gpio_tbl[%d].flags = %ld\n", __func__, i, - gpio_tbl[i].flags); - } - - for (i = 0; i < tbl_size; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-tbl-label", i, &gpio_tbl[i].label); - CDBG("%s gpio_tbl[%d].label = %s\n", __func__, i, - gpio_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(val_array); -ERROR1: - kfree(cci_dev->cci_gpio_tbl); - cci_dev->cci_gpio_tbl = NULL; - cci_dev->cci_gpio_tbl_size = 0; - return rc; -} - -static void msm_cci_init_default_clk_params(struct cci_device *cci_dev, - uint8_t index) -{ - /* default clock params are for 100Khz */ - cci_dev->cci_clk_params[index].hw_thigh = 78; - cci_dev->cci_clk_params[index].hw_tlow = 114; - cci_dev->cci_clk_params[index].hw_tsu_sto = 28; - cci_dev->cci_clk_params[index].hw_tsu_sta = 28; - cci_dev->cci_clk_params[index].hw_thd_dat = 10; - cci_dev->cci_clk_params[index].hw_thd_sta = 77; - cci_dev->cci_clk_params[index].hw_tbuf = 118; - cci_dev->cci_clk_params[index].hw_scl_stretch_en = 0; - cci_dev->cci_clk_params[index].hw_trdhld = 6; - cci_dev->cci_clk_params[index].hw_tsp = 1; -} - -static void msm_cci_init_clk_params(struct cci_device *cci_dev) -{ - int32_t rc = 0; - uint32_t val = 0; - uint8_t count = 0; - struct device_node *of_node = cci_dev->pdev->dev.of_node; - struct device_node *src_node = NULL; - - for (count = 0; count < I2C_MAX_MODES; count++) { - - if (I2C_STANDARD_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_standard_mode"); - else if (I2C_FAST_MODE == count) - src_node = of_find_node_by_name(of_node, - "qcom,i2c_fast_mode"); - else - src_node = of_find_node_by_name(of_node, - "qcom,i2c_custom_mode"); - - rc = of_property_read_u32(src_node, "qcom,hw-thigh", &val); - CDBG("%s qcom,hw-thigh %d, rc %d\n", __func__, val, rc); - if (!rc) { - cci_dev->cci_clk_params[count].hw_thigh = val; - rc = of_property_read_u32(src_node, "qcom,hw-tlow", - &val); - CDBG("%s qcom,hw-tlow %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tlow = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sto", - &val); - CDBG("%s qcom,hw-tsu-sto %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sto = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsu-sta", - &val); - CDBG("%s qcom,hw-tsu-sta %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tsu_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-dat", - &val); - CDBG("%s qcom,hw-thd-dat %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_dat = val; - rc = of_property_read_u32(src_node, "qcom,hw-thd-sta", - &val); - CDBG("%s qcom,hw-thd-sta %d, rc %d\n", __func__, - val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_thd_sta = val; - rc = of_property_read_u32(src_node, "qcom,hw-tbuf", - &val); - CDBG("%s qcom,hw-tbuf %d, rc %d\n", __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_tbuf = val; - rc = of_property_read_u32(src_node, - "qcom,hw-scl-stretch-en", &val); - CDBG("%s qcom,hw-scl-stretch-en %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_scl_stretch_en = val; - rc = of_property_read_u32(src_node, "qcom,hw-trdhld", - &val); - CDBG("%s qcom,hw-trdhld %d, rc %d\n", - __func__, val, rc); - } - if (!rc) { - cci_dev->cci_clk_params[count].hw_trdhld = val; - rc = of_property_read_u32(src_node, "qcom,hw-tsp", - &val); - CDBG("%s qcom,hw-tsp %d, rc %d\n", __func__, val, rc); - } - if (!rc) - cci_dev->cci_clk_params[count].hw_tsp = val; - else - msm_cci_init_default_clk_params(cci_dev, count); - of_node_put(src_node); - src_node = NULL; - } - return; -} - -struct v4l2_subdev *msm_cci_get_subdev(void) -{ - return g_cci_subdev; -} - -static int msm_cci_get_clk_info(struct cci_device *cci_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CCI_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - cci_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CCI_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CCI_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(cci_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, cci_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - cci_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - cci_clk_info[i].clk_rate); - } - return 0; -} - -static int msm_cci_probe(struct platform_device *pdev) -{ - struct cci_device *new_cci_dev; - int rc = 0; - pr_err("%s: pdev %pK device id = %d\n", __func__, pdev, pdev->id); - new_cci_dev = kzalloc(sizeof(struct cci_device), GFP_KERNEL); - if (!new_cci_dev) { - CDBG("%s: no enough memory\n", __func__); - return -ENOMEM; - } - v4l2_subdev_init(&new_cci_dev->msm_sd.sd, &msm_cci_subdev_ops); - new_cci_dev->msm_sd.sd.internal_ops = &msm_cci_internal_ops; - snprintf(new_cci_dev->msm_sd.sd.name, - ARRAY_SIZE(new_cci_dev->msm_sd.sd.name), "msm_cci"); - v4l2_set_subdevdata(&new_cci_dev->msm_sd.sd, new_cci_dev); - platform_set_drvdata(pdev, &new_cci_dev->msm_sd.sd); - CDBG("%s sd %pK\n", __func__, &new_cci_dev->msm_sd.sd); - if (pdev->dev.of_node) - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - - rc = msm_cci_get_clk_info(new_cci_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_cci_get_clk_info() failed", __func__); - return -EFAULT; - } - - new_cci_dev->ref_count = 0; - new_cci_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "cci"); - if (!new_cci_dev->mem) { - CDBG("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "cci"); - CDBG("%s line %d cci irq start %d end %d\n", __func__, - __LINE__, - (int) new_cci_dev->irq->start, - (int) new_cci_dev->irq->end); - if (!new_cci_dev->irq) { - CDBG("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto cci_no_resource; - } - new_cci_dev->io = request_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem), pdev->name); - if (!new_cci_dev->io) { - CDBG("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto cci_no_resource; - } - - new_cci_dev->base = ioremap(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); - if (!new_cci_dev->base) { - rc = -ENOMEM; - goto cci_release_mem; - } - rc = request_irq(new_cci_dev->irq->start, msm_cci_irq, - IRQF_TRIGGER_RISING, "cci", new_cci_dev); - if (rc < 0) { - CDBG("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto cci_release_mem; - } - disable_irq(new_cci_dev->irq->start); - new_cci_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - msm_sd_register(&new_cci_dev->msm_sd); - new_cci_dev->pdev = pdev; - msm_cci_init_cci_params(new_cci_dev); - msm_cci_init_clk_params(new_cci_dev); - msm_cci_init_gpio_params(new_cci_dev); - rc = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); - if (rc) - pr_err("%s: failed to add child nodes, rc=%d\n", __func__, rc); - new_cci_dev->cci_state = CCI_STATE_DISABLED; - g_cci_subdev = &new_cci_dev->msm_sd.sd; - CDBG("%s cci subdev %pK\n", __func__, &new_cci_dev->msm_sd.sd); - CDBG("%s line %d\n", __func__, __LINE__); - return 0; - -cci_release_mem: - release_mem_region(new_cci_dev->mem->start, - resource_size(new_cci_dev->mem)); -cci_no_resource: - kfree(new_cci_dev); - return 0; -} - -static int __exit msm_cci_exit(struct platform_device *pdev) -{ - struct v4l2_subdev *subdev = platform_get_drvdata(pdev); - struct cci_device *cci_dev = - v4l2_get_subdevdata(subdev); - release_mem_region(cci_dev->mem->start, resource_size(cci_dev->mem)); - kfree(cci_dev); - return 0; -} - -static const struct of_device_id msm_cci_dt_match[] = { - {.compatible = "qcom,cci"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_cci_dt_match); - -static struct platform_driver cci_driver = { - .probe = msm_cci_probe, - .remove = msm_cci_exit, - .driver = { - .name = MSM_CCI_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_cci_dt_match, - }, -}; - -static int __init msm_cci_init_module(void) -{ - return platform_driver_register(&cci_driver); -} - -static void __exit msm_cci_exit_module(void) -{ - platform_driver_unregister(&cci_driver); -} - -module_init(msm_cci_init_module); -module_exit(msm_cci_exit_module); -MODULE_DESCRIPTION("MSM CCI driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.h deleted file mode 100644 index 1e50388cc3ff..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/cci/msm_cci.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CCI_H -#define MSM_CCI_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_sd.h" - -#define NUM_MASTERS 2 -#define NUM_QUEUES 2 - -#define TRUE 1 -#define FALSE 0 - -#define CCI_PINCTRL_STATE_DEFAULT "cci_default" -#define CCI_PINCTRL_STATE_SLEEP "cci_suspend" -#define CCI_NUM_CLK_MAX 16 - - -enum cci_i2c_queue_t { - QUEUE_0, - QUEUE_1, -}; - -struct msm_camera_cci_client { - struct v4l2_subdev *cci_subdev; - uint32_t freq; - enum i2c_freq_mode_t i2c_freq_mode; - enum cci_i2c_master_t cci_i2c_master; - uint16_t sid; - uint16_t cid; - uint32_t timeout; - uint16_t retries; - uint16_t id_map; -}; - -enum msm_cci_cmd_type { - MSM_CCI_INIT, - MSM_CCI_RELEASE, - MSM_CCI_SET_SID, - MSM_CCI_SET_FREQ, - MSM_CCI_SET_SYNC_CID, - MSM_CCI_I2C_READ, - MSM_CCI_I2C_WRITE, - MSM_CCI_GPIO_WRITE, - MSM_CCI_I2C_WRITE_BURST, -}; - -struct msm_camera_cci_wait_sync_cfg { - uint16_t line; - uint16_t delay; -}; - -struct msm_camera_cci_gpio_cfg { - uint16_t gpio_queue; - uint16_t i2c_queue; -}; - -struct msm_camera_cci_i2c_read_cfg { - uint16_t addr; - enum msm_camera_i2c_reg_addr_type addr_type; - uint8_t *data; - uint16_t num_byte; -}; - -struct msm_camera_cci_i2c_queue_info { - uint32_t max_queue_size; - uint32_t report_id; - uint32_t irq_en; - uint32_t capture_rep_data; -}; - -struct msm_camera_cci_ctrl { - int32_t status; - struct msm_camera_cci_client *cci_info; - enum msm_cci_cmd_type cmd; - union { - struct msm_camera_i2c_reg_setting cci_i2c_write_cfg; - struct msm_camera_cci_i2c_read_cfg cci_i2c_read_cfg; - struct msm_camera_cci_wait_sync_cfg cci_wait_sync_cfg; - struct msm_camera_cci_gpio_cfg gpio_cfg; - } cfg; -}; - -struct msm_camera_cci_master_info { - uint32_t status; - uint8_t reset_pending; - struct mutex mutex; - struct completion reset_complete; -}; - -struct msm_cci_clk_params_t { - uint16_t hw_thigh; - uint16_t hw_tlow; - uint16_t hw_tsu_sto; - uint16_t hw_tsu_sta; - uint16_t hw_thd_dat; - uint16_t hw_thd_sta; - uint16_t hw_tbuf; - uint8_t hw_scl_stretch_en; - uint8_t hw_trdhld; - uint8_t hw_tsp; -}; - -enum msm_cci_state_t { - CCI_STATE_ENABLED, - CCI_STATE_DISABLED, -}; - -struct cci_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *irq; - struct resource *io; - void __iomem *base; - - uint32_t hw_version; - uint8_t ref_count; - enum msm_cci_state_t cci_state; - uint32_t num_clk; - - struct clk *cci_clk[CCI_NUM_CLK_MAX]; - struct msm_camera_cci_i2c_queue_info - cci_i2c_queue_info[NUM_MASTERS][NUM_QUEUES]; - struct msm_camera_cci_master_info cci_master_info[NUM_MASTERS]; - struct msm_cci_clk_params_t cci_clk_params[I2C_MAX_MODES]; - struct gpio *cci_gpio_tbl; - uint8_t cci_gpio_tbl_size; - uint8_t master_clk_init[MASTER_MAX]; - struct msm_pinctrl_info cci_pinctrl; - uint8_t cci_pinctrl_status; -}; - -enum msm_cci_i2c_cmd_type { - CCI_I2C_SET_PARAM_CMD = 1, - CCI_I2C_WAIT_CMD, - CCI_I2C_WAIT_SYNC_CMD, - CCI_I2C_WAIT_GPIO_EVENT_CMD, - CCI_I2C_TRIG_I2C_EVENT_CMD, - CCI_I2C_LOCK_CMD, - CCI_I2C_UNLOCK_CMD, - CCI_I2C_REPORT_CMD, - CCI_I2C_WRITE_CMD, - CCI_I2C_READ_CMD, - CCI_I2C_WRITE_DISABLE_P_CMD, - CCI_I2C_READ_DISABLE_P_CMD, - CCI_I2C_WRITE_CMD2, - CCI_I2C_WRITE_CMD3, - CCI_I2C_REPEAT_CMD, - CCI_I2C_INVALID_CMD, -}; - -enum msm_cci_gpio_cmd_type { - CCI_GPIO_SET_PARAM_CMD = 1, - CCI_GPIO_WAIT_CMD, - CCI_GPIO_WAIT_SYNC_CMD, - CCI_GPIO_WAIT_GPIO_IN_EVENT_CMD, - CCI_GPIO_WAIT_I2C_Q_TRIG_EVENT_CMD, - CCI_GPIO_OUT_CMD, - CCI_GPIO_TRIG_EVENT_CMD, - CCI_GPIO_REPORT_CMD, - CCI_GPIO_REPEAT_CMD, - CCI_GPIO_CONTINUE_CMD, - CCI_GPIO_INVALID_CMD, -}; - -struct v4l2_subdev *msm_cci_get_subdev(void); - -#define VIDIOC_MSM_CCI_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct msm_camera_cci_ctrl *) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/Makefile deleted file mode 100644 index f4eeb819eda0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSM_CSID) += msm_csid.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_0_hwreg.h deleted file mode 100644 index 7bfeb200c80a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_0_hwreg.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_0_HWREG_H -#define MSM_CSID_2_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_0 = { - - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02000011, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_2_hwreg.h deleted file mode 100644 index 4ad1c2924b1f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_2_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_2_2_HWREG_H -#define MSM_CSID_2_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v2_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x4, - 0x8, - 0xc, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x5c, - 0x60, - 0x64, - 0x68, - 0x6c, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x9C, - 0xA0, - 0xA8, - 0xAC, - 0xB0, - 11, - 0x7FFF, - 0x2, - 17, - 0x02001000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_0_hwreg.h deleted file mode 100644 index 980f497e4596..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_0_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_0_HWREG_H -#define MSM_CSID_3_0_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_0 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30000000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_1_hwreg.h deleted file mode 100644 index d53867f5e5c5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_1_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_1_HWREG_H -#define MSM_CSID_3_1_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_1 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30010000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_2_hwreg.h deleted file mode 100644 index b002d78e6f04..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/include/msm_csid_3_2_hwreg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_3_2_HWREG_H -#define MSM_CSID_3_2_HWREG_H - -#include "msm_csid.h" - -struct csid_reg_parms_t csid_v3_2 = { - /* MIPI CSID registers */ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x14, - 0x18, - 0x1C, - 0x20, - 0x60, - 0x64, - 0x68, - 0x6C, - 0x70, - 0x74, - 0x78, - 0x7C, - 0x80, - 0x84, - 0x88, - 0x8C, - 0x90, - 0x94, - 0x98, - 0xA0, - 0xA4, - 0xAC, - 0xB0, - 0xB4, - 11, - 0x7FFF, - 0x4, - 17, - 0x30020000, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.c deleted file mode 100644 index 99bd2a0aac2d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.c +++ /dev/null @@ -1,854 +0,0 @@ -/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include "msm_csid.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csid_2_0_hwreg.h" -#include "include/msm_csid_2_2_hwreg.h" -#include "include/msm_csid_3_0_hwreg.h" -#include "include/msm_csid_3_1_hwreg.h" -#include "include/msm_csid_3_2_hwreg.h" - -#define V4L2_IDENT_CSID 50002 -#define CSID_VERSION_V20 0x02000011 -#define CSID_VERSION_V22 0x02001000 -#define CSID_VERSION_V30 0x30000000 -#define CSID_VERSION_V31 0x30010000 -#define CSID_VERSION_V31_1 0x30010001 -#define CSID_VERSION_V32 0x30020000 -#define CSID_VERSION_V33 0x30030000 -#define CSID_VERSION_V34 0x30040000 -#define CSID_VERSION_V40 0x40000000 -#define MSM_CSID_DRV_NAME "msm_csid" - -#define DBG_CSID 0 - -#define TRUE 1 -#define FALSE 0 - -#define CSID_NUM_CLK_MAX 16 - -extern int32_t msm_isp_camera_boost(bool flag); - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csid_clk_info[CSID_NUM_CLK_MAX]; -static struct msm_cam_clk_info csid_clk_src_info[CSID_NUM_CLK_MAX]; - -static struct camera_vreg_t csid_vreg_info[] = { - {"qcom,mipi-csi-vdd", REG_LDO, 0, 0, 12000}, -}; - -static struct camera_vreg_t csid_8960_vreg_info[] = { - {"mipi_csi_vdd", REG_LDO, 1200000, 1200000, 20000}, -}; - -static int msm_csid_cid_lut( - struct msm_camera_csid_lut_params *csid_lut_params, - struct csid_device *csid_dev) -{ - int rc = 0, i = 0; - uint32_t val = 0; - - if (!csid_lut_params) { - pr_err("%s:%d csid_lut_params NULL\n", __func__, __LINE__); - return -EINVAL; - } - for (i = 0; i < csid_lut_params->num_cid && i < 16; i++) { - if (csid_lut_params->vc_cfg[i]->cid >= - csid_lut_params->num_cid || - csid_lut_params->vc_cfg[i]->cid < 0) { - pr_err("%s: cid outside range %d\n", - __func__, csid_lut_params->vc_cfg[i]->cid); - return -EINVAL; - } - CDBG("%s lut params num_cid = %d, cid = %d\n", - __func__, - csid_lut_params->num_cid, - csid_lut_params->vc_cfg[i]->cid); - CDBG("%s lut params dt = 0x%x, df = %d\n", __func__, - csid_lut_params->vc_cfg[i]->dt, - csid_lut_params->vc_cfg[i]->decode_format); - if (csid_lut_params->vc_cfg[i]->dt < 0x12 || - csid_lut_params->vc_cfg[i]->dt > 0x37) { - pr_err("%s: unsupported data type 0x%x\n", - __func__, csid_lut_params->vc_cfg[i]->dt); - return rc; - } - val = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4) - & ~(0xFF << ((csid_lut_params->vc_cfg[i]->cid % 4) * - 8)); - val |= (csid_lut_params->vc_cfg[i]->dt << - ((csid_lut_params->vc_cfg[i]->cid % 4) * 8)); - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_lut_vc_0_addr + - (csid_lut_params->vc_cfg[i]->cid >> 2) * 4); - - val = (csid_lut_params->vc_cfg[i]->decode_format << 4) | 0x3; - msm_camera_io_w(val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_cid_n_cfg_addr + - (csid_lut_params->vc_cfg[i]->cid * 4)); - } - return rc; -} - -#if DBG_CSID -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - uint32_t val = 0; - val = ((1 << csid_params->lane_cnt) - 1) << 20; - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - msm_camera_io_w(0x7f010800 | val, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); -} -#else -static void msm_csid_set_debug_reg(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) {} -#endif - -static void msm_csid_reset(struct csid_device *csid_dev) -{ - msm_camera_io_w(csid_dev->ctrl_reg->csid_reg.csid_rst_stb_all, - csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_rst_cmd_addr); - wait_for_completion(&csid_dev->reset_complete); - return; -} - -static int msm_csid_config(struct csid_device *csid_dev, - struct msm_camera_csid_params *csid_params) -{ - int rc = 0; - uint32_t val = 0; - void __iomem *csidbase; - csidbase = csid_dev->base; - if (!csidbase || !csid_params) { - pr_err("%s:%d csidbase %pK, csid params %pK\n", __func__, - __LINE__, csidbase, csid_params); - return -EINVAL; - } - - CDBG("%s csid_params, lane_cnt = %d, lane_assign = 0x%x\n", - __func__, - csid_params->lane_cnt, - csid_params->lane_assign); - CDBG("%s csid_params phy_sel = %d\n", __func__, - csid_params->phy_sel); - - msm_csid_reset(csid_dev); - - val = csid_params->lane_cnt - 1; - val |= csid_params->lane_assign << - csid_dev->ctrl_reg->csid_reg.csid_dl_input_sel_shift; - if (csid_dev->hw_version < 0x30000000) { - val |= (0xF << 10); - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - } else { - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_0_addr); - val = csid_params->phy_sel << - csid_dev->ctrl_reg->csid_reg.csid_phy_sel_shift; - val |= 0xF; - msm_camera_io_w(val, csidbase + - csid_dev->ctrl_reg->csid_reg.csid_core_ctrl_1_addr); - } - - rc = msm_csid_cid_lut(&csid_params->lut_params, csid_dev); - if (rc < 0) - return rc; - - msm_csid_set_debug_reg(csid_dev, csid_params); - return rc; -} - -static irqreturn_t msm_csid_irq(int irq_num, void *data) -{ - uint32_t irq; - struct csid_device *csid_dev; - void __iomem *csidbase; - - if (!data) { - pr_err("%s:%d data NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - }//prevent - csid_dev = data ; - if (!csid_dev->base) { - pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); - return IRQ_HANDLED; - } - csidbase = csid_dev->base; - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - CDBG("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", - __func__, csid_dev->pdev->id, irq); - if (irq & (0x1 << - csid_dev->ctrl_reg->csid_reg.csid_rst_done_irq_bitshift)) - complete(&csid_dev->reset_complete); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - return IRQ_HANDLED; -} - -static int msm_csid_irq_routine(struct v4l2_subdev *sd, u32 status, - bool *handled) -{ - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - irqreturn_t ret; - CDBG("%s E\n", __func__); - ret = msm_csid_irq(csid_dev->irq->start, csid_dev); - *handled = TRUE; - return 0; -} - -static int msm_csid_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSID; - chip->revision = 0; - return 0; -} - -static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) -{ - int rc = 0; - - if (!csid_version) { - pr_err("%s:%d csid_version NULL\n", __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - if (csid_dev->csid_state == CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - rc = -EINVAL; - return rc; - } - - csid_dev->base = ioremap(csid_dev->mem->start, - resource_size(csid_dev->mem)); - if (!csid_dev->base) { - pr_err("%s csid_dev->base NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - pr_info("%s: CSID_VERSION = 0x%x\n", __func__, - csid_dev->ctrl_reg->csid_reg.csid_version); - /* power up */ - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator on failed\n", __func__); - goto vreg_config_failed; - } - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } else { - rc = msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 1); - } - if (rc < 0) { - pr_err("%s: regulator enable failed\n", __func__); - goto vreg_enable_failed; - } - - if (csid_dev->ctrl_reg->csid_reg.csid_version == CSID_VERSION_V22) - msm_cam_clk_sel_src(&csid_dev->pdev->dev, - &csid_clk_info[3], csid_clk_src_info, - csid_dev->num_clk_src_info); - - - rc = msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, csid_dev->csid_clk, - csid_dev->num_clk, 1); - if (rc < 0) { - pr_err("%s:%d clock enable failed\n", - __func__, __LINE__); - goto clk_enable_failed; - } - CDBG("%s:%d called\n", __func__, __LINE__); - csid_dev->hw_version = - msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_hw_version_addr); - CDBG("%s:%d called csid_dev->hw_version %x\n", __func__, __LINE__, - csid_dev->hw_version); - *csid_version = csid_dev->hw_version; - - init_completion(&csid_dev->reset_complete); - - enable_irq(csid_dev->irq->start); - - msm_csid_reset(csid_dev); - csid_dev->csid_state = CSID_POWER_UP; - return rc; - -clk_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_enable_failed: - if (csid_dev->ctrl_reg->csid_reg.csid_version < CSID_VERSION_V22) { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } -vreg_config_failed: - iounmap(csid_dev->base); - csid_dev->base = NULL; - return rc; -} - -static int msm_csid_release(struct csid_device *csid_dev) -{ - uint32_t irq; - - if (csid_dev->csid_state != CSID_POWER_UP) { - pr_err("%s: csid invalid state %d\n", __func__, - csid_dev->csid_state); - return -EINVAL; - } - - CDBG("%s:%d, hw_version = 0x%x\n", __func__, __LINE__, - csid_dev->hw_version); - - irq = msm_camera_io_r(csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); - msm_camera_io_w(irq, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); - msm_camera_io_w(0, csid_dev->base + - csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); - - disable_irq(csid_dev->irq->start); - - if (csid_dev->hw_version == CSID_VERSION_V20) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_8960_vreg_info, ARRAY_SIZE(csid_8960_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if (csid_dev->hw_version == CSID_VERSION_V22) { - msm_cam_clk_enable(&csid_dev->pdev->dev, - csid_clk_info, - csid_dev->csid_clk, - csid_dev->num_clk, 0); - - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version >= CSID_VERSION_V30 && - csid_dev->hw_version < CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V40) || - (csid_dev->hw_version == CSID_VERSION_V31_1)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else if ((csid_dev->hw_version == CSID_VERSION_V31) || - (csid_dev->hw_version == CSID_VERSION_V32) || - (csid_dev->hw_version == CSID_VERSION_V33) || - (csid_dev->hw_version == CSID_VERSION_V34)) { - msm_cam_clk_enable(&csid_dev->pdev->dev, csid_clk_info, - csid_dev->csid_clk, csid_dev->num_clk, 0); - msm_camera_enable_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - - msm_camera_config_vreg(&csid_dev->pdev->dev, - csid_vreg_info, ARRAY_SIZE(csid_vreg_info), - NULL, 0, &csid_dev->csi_vdd, 0); - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - csid_dev->hw_version); - return -EINVAL; - } - - iounmap(csid_dev->base); - csid_dev->base = NULL; - csid_dev->csid_state = CSID_POWER_DOWN; - return 0; -} - -static int32_t msm_csid_cmd(struct csid_device *csid_dev, void *arg) -{ - int rc = 0; - struct csid_cfg_data *cdata = (struct csid_cfg_data *)arg; - - if (!csid_dev || !cdata) { - pr_err("%s:%d csid_dev %pK, cdata %pK\n", __func__, __LINE__, - csid_dev, cdata); - return -EINVAL; - } - CDBG("%s cfgtype = %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CSID_INIT: - rc = msm_csid_init(csid_dev, &cdata->cfg.csid_version); - msm_isp_camera_boost(true); - CDBG("%s csid version 0x%x\n", __func__, - cdata->cfg.csid_version); - break; - case CSID_CFG: { - struct msm_camera_csid_params csid_params; - struct msm_camera_csid_vc_cfg *vc_cfg = NULL; - int8_t i = 0; - if (copy_from_user(&csid_params, - (void *)cdata->cfg.csid_params, - sizeof(struct msm_camera_csid_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (csid_params.lut_params.num_cid < 1 || - csid_params.lut_params.num_cid > MAX_CID) { - pr_err("%s: %d num_cid outside range\n", - __func__, __LINE__); - rc = -EINVAL; - break; - } - for (i = 0; i < csid_params.lut_params.num_cid; i++) { - vc_cfg = kzalloc(sizeof(struct msm_camera_csid_vc_cfg), - GFP_KERNEL); - if (!vc_cfg) { - pr_err("%s: %d failed\n", __func__, __LINE__); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -ENOMEM; - break; - } - if (copy_from_user(vc_cfg, - (void *)csid_params.lut_params.vc_cfg[i], - sizeof(struct msm_camera_csid_vc_cfg))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - kfree(vc_cfg); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - rc = -EFAULT; - break; - } - csid_params.lut_params.vc_cfg[i] = vc_cfg; - } - if (rc < 0) { - pr_err("%s:%d failed\n", __func__, __LINE__); - break; - } - rc = msm_csid_config(csid_dev, &csid_params); - for (i--; i >= 0; i--) - kfree(csid_params.lut_params.vc_cfg[i]); - break; - } - case CSID_RELEASE: - rc = msm_csid_release(csid_dev); - break; - case CSID_BOOSTOFF: - msm_isp_camera_boost(false); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csid_get_subdev_id(struct csid_device *csid_dev, void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csid_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csid_device *csid_dev = v4l2_get_subdevdata(sd); - mutex_lock(&csid_dev->mutex); - CDBG("%s:%d id %d\n", __func__, __LINE__, csid_dev->pdev->id); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csid_get_subdev_id(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_IO_CFG: - rc = msm_csid_cmd(csid_dev, arg); - break; - case VIDIOC_MSM_CSID_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csid_release(csid_dev); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - CDBG("%s:%d\n", __func__, __LINE__); - mutex_unlock(&csid_dev->mutex); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csid_internal_ops; - -static struct v4l2_subdev_core_ops msm_csid_subdev_core_ops = { - .g_chip_ident = &msm_csid_subdev_g_chip_ident, - .ioctl = &msm_csid_subdev_ioctl, - .interrupt_service_routine = msm_csid_irq_routine, -}; - -static const struct v4l2_subdev_ops msm_csid_subdev_ops = { - .core = &msm_csid_subdev_core_ops, -}; - -static int msm_csid_get_clk_info(struct csid_device *csid_dev, - struct platform_device *pdev) -{ - uint32_t count; - uint32_t cnt = 0; - int i, rc; - int ii = 0; - uint32_t rates[CSID_NUM_CLK_MAX]; - const char *clock_name; - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csid_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return -EINVAL; - } - - if (count > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - cnt = count; - count = 0; - CDBG("%s: cnt = %d\n", __func__, cnt); - if (cnt == 0) { - pr_err("%s: no clocks found in device tree, cnt=%d", - __func__, cnt); - return -EINVAL; - } - - if (cnt > CSID_NUM_CLK_MAX) { - pr_err("%s: invalid cnt=%d, max is %d\n", __func__, - cnt, CSID_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - count++; - rc = of_property_read_string_index(of_node, - "clock-names", i, &clock_name); - CDBG("%s: clock_names[%d] = %s\n", __func__, - i, clock_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - if (strcmp(clock_name, "csi_phy_src_clk") == 0) - break; - } - csid_dev->num_clk = count; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csid_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csid_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csid_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csid_clk_info[i].clk_rate); - } - - if (csid_dev->hw_dts_version == CSID_VERSION_V22) { - csid_dev->num_clk_src_info = cnt - count; - CDBG("%s: count = %d\n", __func__, (cnt - count)); - - for (i = count; i < cnt; i++) { - ii++; - rc = of_property_read_string_index(of_node, - "clock-names", i, - &(csid_clk_src_info[ii].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - ii, csid_clk_src_info[ii].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - ii = 0; - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, cnt); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = count; i < cnt; i++) { - ii++; - csid_clk_src_info[ii].clk_rate = rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, ii, - csid_clk_src_info[ii].clk_rate); - } - } - return 0; -} - -static int csid_probe(struct platform_device *pdev) -{ - struct csid_device *new_csid_dev; - uint32_t csi_vdd_voltage = 0; - int rc = 0; - new_csid_dev = kzalloc(sizeof(struct csid_device), GFP_KERNEL); - if (!new_csid_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - new_csid_dev->ctrl_reg = NULL; - new_csid_dev->ctrl_reg = kzalloc(sizeof(struct csid_ctrl_t), - GFP_KERNEL); - if (!new_csid_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csid_dev); - return -ENOMEM; - } - - v4l2_subdev_init(&new_csid_dev->msm_sd.sd, &msm_csid_subdev_ops); - v4l2_set_subdevdata(&new_csid_dev->msm_sd.sd, new_csid_dev); - platform_set_drvdata(pdev, &new_csid_dev->msm_sd.sd); - mutex_init(&new_csid_dev->mutex); - - if (pdev->dev.of_node) { - rc = of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - if (rc < 0) { - pr_err("%s:%d failed to read cell-index\n", __func__, - __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s device id %d\n", __func__, pdev->id); - - rc = of_property_read_u32((&pdev->dev)->of_node, - "qcom,csi-vdd-voltage", &csi_vdd_voltage); - if (rc < 0) { - pr_err("%s:%d failed to read qcom,csi-vdd-voltage\n", - __func__, __LINE__); - rc = -ENODEV; - goto csid_no_resource; - } - CDBG("%s:%d reading mipi_csi_vdd is %d\n", __func__, __LINE__, - csi_vdd_voltage); - - csid_vreg_info[0].min_voltage = csi_vdd_voltage; - csid_vreg_info[0].max_voltage = csi_vdd_voltage; - } - - rc = msm_csid_get_clk_info(new_csid_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csid_get_clk_info() failed", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - - - new_csid_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csid"); - if (!new_csid_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csid"); - if (!new_csid_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csid_no_resource; - } - new_csid_dev->io = request_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem), pdev->name); - if (!new_csid_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - - new_csid_dev->pdev = pdev; - new_csid_dev->msm_sd.sd.internal_ops = &msm_csid_internal_ops; - new_csid_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csid_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csid_dev->msm_sd.sd.name), "msm_csid"); - media_entity_init(&new_csid_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csid_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csid_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSID; - new_csid_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x5; - msm_sd_register(&new_csid_dev->msm_sd); - - rc = request_irq(new_csid_dev->irq->start, msm_csid_irq, - IRQF_TRIGGER_RISING, "csid", new_csid_dev); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csid_no_resource; - } - disable_irq(new_csid_dev->irq->start); - if (rc < 0) { - release_mem_region(new_csid_dev->mem->start, - resource_size(new_csid_dev->mem)); - pr_err("%s Error registering irq ", __func__); - goto csid_no_resource; - } - - if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V20; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v2.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v2_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V22; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V30; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v4.0")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_0; - new_csid_dev->hw_dts_version = CSID_VERSION_V40; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.1")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_1; - new_csid_dev->hw_dts_version = CSID_VERSION_V31; - } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, - "qcom,csid-v3.2")) { - new_csid_dev->ctrl_reg->csid_reg = csid_v3_2; - new_csid_dev->hw_dts_version = CSID_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csid_dev->hw_dts_version); - rc = -ENODEV; - goto csid_no_resource; - } - - new_csid_dev->csid_state = CSID_POWER_DOWN; - return 0; - -csid_no_resource: - mutex_destroy(&new_csid_dev->mutex); - kfree(new_csid_dev->ctrl_reg); - kfree(new_csid_dev); - return rc; -} - -static const struct of_device_id msm_csid_dt_match[] = { - {.compatible = "qcom,csid"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csid_dt_match); - -static struct platform_driver csid_driver = { - .probe = csid_probe, - .driver = { - .name = MSM_CSID_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csid_dt_match, - }, -}; - -static int __init msm_csid_init_module(void) -{ - return platform_driver_register(&csid_driver); -} - -static void __exit msm_csid_exit_module(void) -{ - platform_driver_unregister(&csid_driver); -} - -module_init(msm_csid_init_module); -module_exit(msm_csid_exit_module); -MODULE_DESCRIPTION("MSM CSID driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.h deleted file mode 100644 index d53fd9133fd5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csid/msm_csid.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSID_H -#define MSM_CSID_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -struct csid_reg_parms_t { -/* MIPI CSID registers */ - uint32_t csid_hw_version_addr; - uint32_t csid_core_ctrl_0_addr; - uint32_t csid_core_ctrl_1_addr; - uint32_t csid_rst_cmd_addr; - uint32_t csid_cid_lut_vc_0_addr; - uint32_t csid_cid_lut_vc_1_addr; - uint32_t csid_cid_lut_vc_2_addr; - uint32_t csid_cid_lut_vc_3_addr; - uint32_t csid_cid_n_cfg_addr; - uint32_t csid_irq_clear_cmd_addr; - uint32_t csid_irq_mask_addr; - uint32_t csid_irq_status_addr; - uint32_t csid_captured_unmapped_long_pkt_hdr_addr; - uint32_t csid_captured_mmaped_long_pkt_hdr_addr; - uint32_t csid_captured_short_pkt_addr; - uint32_t csid_captured_long_pkt_hdr_addr; - uint32_t csid_captured_long_pkt_ftr_addr; - uint32_t csid_pif_misr_dl0_addr; - uint32_t csid_pif_misr_dl1_addr; - uint32_t csid_pif_misr_dl2_addr; - uint32_t csid_pif_misr_dl3_addr; - uint32_t csid_stats_total_pkts_rcvd_addr; - uint32_t csid_stats_ecc_addr; - uint32_t csid_stats_crc_addr; - uint32_t csid_tg_ctrl_addr; - uint32_t csid_tg_vc_cfg_addr; - uint32_t csid_tg_dt_n_cfg_0_addr; - uint32_t csid_tg_dt_n_cfg_1_addr; - uint32_t csid_tg_dt_n_cfg_2_addr; - uint32_t csid_rst_done_irq_bitshift; - uint32_t csid_rst_stb_all; - uint32_t csid_dl_input_sel_shift; - uint32_t csid_phy_sel_shift; - uint32_t csid_version; -}; - -struct csid_ctrl_t { - struct csid_reg_parms_t csid_reg; -}; - -enum msm_csid_state_t { - CSID_POWER_UP, - CSID_POWER_DOWN, -}; - -struct csid_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct resource *mem; - struct resource *irq; - struct resource *io; - struct regulator *csi_vdd; - void __iomem *base; - struct mutex mutex; - struct completion reset_complete; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csid_state_t csid_state; - struct csid_ctrl_t *ctrl_reg; - uint32_t num_clk; - uint32_t num_clk_src_info; - - struct clk *csid_clk[11]; -}; - -#define VIDIOC_MSM_CSID_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct v4l2_subdev*) -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/Makefile deleted file mode 100644 index f98be682d0a5..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSM_CSIPHY) += msm_csiphy.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h deleted file mode 100644 index 5abf99123365..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_0_HWREG_H -#define MSM_CSIPHY_2_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_0 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x0, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h deleted file mode 100644 index 8682478f7e98..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_2_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_2_2_HWREG_H -#define MSM_CSIPHY_2_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v2_2 = { - /*MIPI CSI PHY registers*/ - 0x17C, - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x180, - 0x1A0, - 0x6F, - 0x1A4, - 0x1C0, - 0x1C4, - 0x4, - 0x1E0, - 0x1E8, - 0x1, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h deleted file mode 100644 index af4d3e03a7ce..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_0_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_0_HWREG_H -#define MSM_CSIPHY_3_0_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_0 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x10, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h deleted file mode 100644 index a08d95fde94c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_1_hwreg.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_1_HWREG_H -#define MSM_CSIPHY_3_1_HWREG_H - -#include "msm_csiphy.h" - -#define MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET 0x1FC - -struct csiphy_reg_parms_t csiphy_v3_1 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x31, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h deleted file mode 100644 index 19f14e73a92c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/include/msm_csiphy_3_2_hwreg.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_3_2_HWREG_H -#define MSM_CSIPHY_3_2_HWREG_H - -#include "msm_csiphy.h" - -struct csiphy_reg_parms_t csiphy_v3_2 = { - /*MIPI CSI PHY registers*/ - 0x0, - 0x4, - 0x8, - 0xC, - 0x10, - 0x100, - 0x104, - 0x108, - 0x10C, - 0x110, - 0x128, - 0x140, - 0x144, - 0x164, - 0x188, - 0x18C, - 0x1AC, - 0x3F, - 0x1AC, - 0x1CC, - 0x1CC, - 0x4, - 0x1EC, - 0x1F4, - 0x32, -}; -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.c deleted file mode 100644 index 84ee126d0b6b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.c +++ /dev/null @@ -1,952 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "msm_csiphy.h" -#include "msm_sd.h" -#include "msm_camera_io_util.h" -#include "include/msm_csiphy_2_0_hwreg.h" -#include "include/msm_csiphy_2_2_hwreg.h" -#include "include/msm_csiphy_3_0_hwreg.h" -#include "include/msm_csiphy_3_1_hwreg.h" -#include "include/msm_csiphy_3_2_hwreg.h" - -#define DBG_CSIPHY 0 -#define SOC_REVISION_3 0x30000 - - -#define V4L2_IDENT_CSIPHY 50003 -#define CSIPHY_VERSION_V22 0x01 -#define CSIPHY_VERSION_V20 0x00 -#define CSIPHY_VERSION_V30 0x10 -#define CSIPHY_VERSION_V31 0x31 -#define CSIPHY_VERSION_V32 0x32 -#define MSM_CSIPHY_DRV_NAME "msm_csiphy" - -#define CSIPHY_NUM_CLK_MAX 16 - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -static struct msm_cam_clk_info csiphy_clk_info[CSIPHY_NUM_CLK_MAX]; -uint32_t is_3_1_rev3 = 0; - - -static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev, - struct msm_camera_csiphy_params *csiphy_params) -{ - int rc = 0; - int j = 0; - uint32_t val = 0; - uint8_t lane_cnt = 0; - uint16_t lane_mask = 0; - void __iomem *csiphybase; - uint8_t csiphy_id = csiphy_dev->pdev->id; - csiphybase = csiphy_dev->base; - if (!csiphybase) { - pr_err("%s: csiphybase NULL\n", __func__); - return -EINVAL; - } - - csiphy_dev->lane_mask[csiphy_id] |= csiphy_params->lane_mask; - lane_mask = csiphy_dev->lane_mask[csiphy_id]; - lane_cnt = csiphy_params->lane_cnt; - if (csiphy_params->lane_cnt < 1 || csiphy_params->lane_cnt > 4) { - pr_err("%s: unsupported lane cnt %d\n", - __func__, csiphy_params->lane_cnt); - return rc; - } - - CDBG("%s csiphy_params, mask = 0x%x cnt = %d\n", - __func__, - csiphy_params->lane_mask, - csiphy_params->lane_cnt); - CDBG("%s csiphy_params, settle cnt = 0x%x csid %d\n", - __func__, csiphy_params->settle_cnt, - csiphy_params->csid_core); - - if (csiphy_dev->hw_version >= CSIPHY_VERSION_V30) { - val = msm_camera_io_r(csiphy_dev->clk_mux_base); - if (csiphy_params->combo_mode && - (csiphy_params->lane_mask & 0x18)) { - val &= ~0xf0; - val |= csiphy_params->csid_core << 4; - } else { - val &= ~0xf; - val |= csiphy_params->csid_core; - } - msm_camera_io_w(val, csiphy_dev->clk_mux_base); - CDBG("%s clk mux addr %pK val 0x%x\n", __func__, - csiphy_dev->clk_mux_base, val); - mb(); - } - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_t_init_cfg0_addr); - msm_camera_io_w(0x1, csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_t_wakeup_cfg0_addr); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - val = 0x3; - msm_camera_io_w((lane_mask << 2) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(0x10, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg3_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnck_cfg4_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_mask0_addr); - msm_camera_io_w(0x24, - csiphybase + csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_interrupt_clear0_addr); - } else { - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) { - msm_camera_io_w(0x01, csiphybase + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); - } - val = 0x1; - msm_camera_io_w((lane_mask << 1) | val, - csiphybase + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - msm_camera_io_w(csiphy_params->combo_mode << - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_mode_config_shift, - csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_glbl_reset_addr); - msm_camera_io_w(0xff, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40); - } - - lane_mask &= 0x1f; - while (lane_mask & 0x1f) { - if (!(lane_mask & 0x1)) { - j++; - lane_mask >>= 1; - continue; - } - msm_camera_io_w(0x10, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*j); - msm_camera_io_w(csiphy_params->settle_cnt, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg3_addr + 0x40*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_addr + 0x4*j); - msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_mask_val, csiphybase + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear_addr + 0x4*j); - msm_camera_io_w(0xff, - csiphybase + csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg4_addr + 0x40*j); - j++; - lane_mask >>= 1; - } - return rc; -} - -static irqreturn_t msm_csiphy_irq(int irq_num, void *data) -{ - uint32_t irq; - int i; - struct csiphy_device *csiphy_dev = data; - - for (i = 0; i < 8; i++) { - irq = msm_camera_io_r( - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_status0_addr + 0x4*i); - msm_camera_io_w(irq, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - pr_err("%s MIPI_CSIPHY%d_INTERRUPT_STATUS%d = 0x%x\n", - __func__, csiphy_dev->pdev->id, i, irq); - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_glbl_irq_cmd_addr); - msm_camera_io_w(0x0, - csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_interrupt_clear0_addr + 0x4*i); - } - return IRQ_HANDLED; -} - -static void msm_csiphy_reset(struct csiphy_device *csiphy_dev) -{ - msm_camera_io_w(0x1, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); - usleep_range(5000, 8000); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_reset_addr); -} - -static int msm_csiphy_subdev_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - BUG_ON(!chip); - chip->ident = V4L2_IDENT_CSIPHY; - chip->revision = 0; - return 0; -} - -static int msm_csiphy_recovery(struct csiphy_device *csiphy_dev) -{ - int i = 0; - uint16_t csi_lane_mask; - - pr_err("msm_csiphy_recovery: E\n"); - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - } - - csiphy_dev->ref_count = 0; - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - pr_err("msm_csiphy_recovery: X\n"); - return 0; -} - -#if DBG_CSIPHY -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version < CSIPHY_VERSION_V30) { - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %p io %p\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - enable_irq(csiphy_dev->irq->start); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#else -static int msm_csiphy_init(struct csiphy_device *csiphy_dev) -{ - int rc = 0; - if (csiphy_dev == NULL) { - pr_err("%s: csiphy_dev NULL\n", __func__); - rc = -ENOMEM; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); -// rc = -EINVAL; -// return rc; - msm_csiphy_recovery(csiphy_dev); - } - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->ref_count++) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - csiphy_dev->base = ioremap(csiphy_dev->mem->start, - resource_size(csiphy_dev->mem)); - if (!csiphy_dev->base) { - pr_err("%s: csiphy_dev->base NULL\n", __func__); - csiphy_dev->ref_count--; - rc = -ENOMEM; - return rc; - } - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - if (!csiphy_dev->clk_mux_mem || !csiphy_dev->clk_mux_io) { - pr_err("%s clk mux mem %p io %p\n", __func__, - csiphy_dev->clk_mux_mem, - csiphy_dev->clk_mux_io); - rc = -ENOMEM; - return rc; - } - csiphy_dev->clk_mux_base = ioremap( - csiphy_dev->clk_mux_mem->start, - resource_size(csiphy_dev->clk_mux_mem)); - if (!csiphy_dev->clk_mux_base) { - pr_err("%s: ERROR %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - rc = msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 1); - } else { - pr_err("%s: ERROR Invalid CSIPHY Version %d", - __func__, __LINE__); - rc = -EINVAL; - return rc; - } - - CDBG("%s:%d called\n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: csiphy clk enable failed\n", __func__); - csiphy_dev->ref_count--; - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - return rc; - } - CDBG("%s:%d called\n", __func__, __LINE__); - - msm_csiphy_reset(csiphy_dev); - - CDBG("%s:%d called\n", __func__, __LINE__); - - if (csiphy_dev->hw_dts_version == CSIPHY_VERSION_V30) - csiphy_dev->hw_version = - msm_camera_io_r(csiphy_dev->base + - csiphy_dev->ctrl_reg-> - csiphy_reg.mipi_csiphy_hw_version_addr); - else - csiphy_dev->hw_version = csiphy_dev->hw_dts_version; - - CDBG("%s:%d called csiphy_dev->hw_version 0x%x\n", __func__, __LINE__, - csiphy_dev->hw_version); - csiphy_dev->csiphy_state = CSIPHY_POWER_UP; - return 0; -} -#endif - -#if DBG_CSIPHY -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) - msm_camera_io_w(0x00, csiphy_dev->base + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - disable_irq(csiphy_dev->irq->start); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} -#else -static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg) -{ - int i = 0; - struct msm_camera_csi_lane_params *csi_lane_params; - uint16_t csi_lane_mask; - csi_lane_params = (struct msm_camera_csi_lane_params *)arg; - - if (!csiphy_dev || !csiphy_dev->ref_count) { - pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__); - return 0; - } - - if (csiphy_dev->csiphy_state != CSIPHY_POWER_UP) { - pr_err("%s: csiphy invalid state %d\n", __func__, - csiphy_dev->csiphy_state); - return -EINVAL; - } - - if (csiphy_dev->hw_version < CSIPHY_VERSION_V30) { - csiphy_dev->lane_mask[csiphy_dev->pdev->id] = 0; - for (i = 0; i < 4; i++) - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } else { - if (!csi_lane_params) { - pr_err("%s:%d failed: csi_lane_params %pK\n", __func__, - __LINE__, csi_lane_params); - return -EINVAL; - } - csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F); - - CDBG("%s csiphy_params, lane assign 0x%x mask = 0x%x\n", - __func__, - csi_lane_params->csi_lane_assign, - csi_lane_params->csi_lane_mask); - - if (!csi_lane_mask) - csi_lane_mask = 0x1f; - - csiphy_dev->lane_mask[csiphy_dev->pdev->id] &= - ~(csi_lane_mask); - i = 0; - while (csi_lane_mask) { - if (csi_lane_mask & 0x1) { - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg. - mipi_csiphy_lnn_cfg2_addr + 0x40*i); - } - csi_lane_mask >>= 1; - i++; - } - if ((csiphy_dev->hw_version == CSIPHY_VERSION_V31) && is_3_1_rev3) - msm_camera_io_w(0x00, csiphy_dev->base + MIPI_CSIPHY_GLBL_PWG_CFG0_OFFSET); - } - - if (--csiphy_dev->ref_count) { - CDBG("%s csiphy refcount = %d\n", __func__, - csiphy_dev->ref_count); - return 0; - } - - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_lnck_cfg2_addr); - msm_camera_io_w(0x0, csiphy_dev->base + - csiphy_dev->ctrl_reg->csiphy_reg.mipi_csiphy_glbl_pwr_cfg_addr); - - if (csiphy_dev->hw_dts_version <= CSIPHY_VERSION_V22) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - } else if (csiphy_dev->hw_dts_version >= CSIPHY_VERSION_V30) { - msm_cam_clk_enable(&csiphy_dev->pdev->dev, - csiphy_clk_info, csiphy_dev->csiphy_clk, - csiphy_dev->num_clk, 0); - iounmap(csiphy_dev->clk_mux_base); - } - - iounmap(csiphy_dev->base); - csiphy_dev->base = NULL; - csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; -} - -#endif - -static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg) -{ - int rc = 0; - struct csiphy_cfg_data *cdata = (struct csiphy_cfg_data *)arg; - struct msm_camera_csiphy_params csiphy_params; - struct msm_camera_csi_lane_params csi_lane_params; - if (!csiphy_dev || !cdata) { - pr_err("%s: csiphy_dev NULL\n", __func__); - return -EINVAL; - } - switch (cdata->cfgtype) { - case CSIPHY_INIT: - rc = msm_csiphy_init(csiphy_dev); - break; - case CSIPHY_CFG: - if (copy_from_user(&csiphy_params, - (void *)cdata->cfg.csiphy_params, - sizeof(struct msm_camera_csiphy_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_lane_config(csiphy_dev, &csiphy_params); - break; - case CSIPHY_RELEASE: - if (copy_from_user(&csi_lane_params, - (void *)cdata->cfg.csi_lane_params, - sizeof(struct msm_camera_csi_lane_params))) { - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - rc = msm_csiphy_release(csiphy_dev, &csi_lane_params); - break; - default: - pr_err("%s: %d failed\n", __func__, __LINE__); - rc = -ENOIOCTLCMD; - break; - } - return rc; -} - -static int32_t msm_csiphy_get_subdev_id(struct csiphy_device *csiphy_dev, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = csiphy_dev->pdev->id; - pr_debug("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -static long msm_csiphy_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int rc = -ENOIOCTLCMD; - struct csiphy_device *csiphy_dev = v4l2_get_subdevdata(sd); - CDBG("%s:%d id %d\n", __func__, __LINE__, csiphy_dev->pdev->id); - mutex_lock(&csiphy_dev->mutex); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - rc = msm_csiphy_get_subdev_id(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_IO_CFG: - rc = msm_csiphy_cmd(csiphy_dev, arg); - break; - case VIDIOC_MSM_CSIPHY_RELEASE: - case MSM_SD_SHUTDOWN: - rc = msm_csiphy_release(csiphy_dev, arg); - break; - default: - pr_err_ratelimited("%s: command not found\n", __func__); - } - mutex_unlock(&csiphy_dev->mutex); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_csiphy_internal_ops; - -static struct v4l2_subdev_core_ops msm_csiphy_subdev_core_ops = { - .g_chip_ident = &msm_csiphy_subdev_g_chip_ident, - .ioctl = &msm_csiphy_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_csiphy_subdev_ops = { - .core = &msm_csiphy_subdev_core_ops, -}; - -static int msm_csiphy_get_clk_info(struct csiphy_device *csiphy_dev, - struct platform_device *pdev) -{ - uint32_t count; - int i, rc; - uint32_t rates[CSIPHY_NUM_CLK_MAX]; - - struct device_node *of_node; - of_node = pdev->dev.of_node; - - count = of_property_count_strings(of_node, "clock-names"); - csiphy_dev->num_clk = count; - - CDBG("%s: count = %d\n", __func__, count); - if (count == 0) { - pr_err("%s: no clocks found in device tree, count=%d", - __func__, count); - return 0; - } - - if (count > CSIPHY_NUM_CLK_MAX) { - pr_err("%s: invalid count=%d, max is %d\n", __func__, - count, CSIPHY_NUM_CLK_MAX); - return -EINVAL; - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, "clock-names", - i, &(csiphy_clk_info[i].clk_name)); - CDBG("%s: clock-names[%d] = %s\n", __func__, - i, csiphy_clk_info[i].clk_name); - if (rc < 0) { - pr_err("%s:%d, failed\n", __func__, __LINE__); - return rc; - } - } - rc = of_property_read_u32_array(of_node, "qcom,clock-rates", - rates, count); - if (rc < 0) { - pr_err("%s:%d, failed", __func__, __LINE__); - return rc; - } - for (i = 0; i < count; i++) { - csiphy_clk_info[i].clk_rate = (rates[i] == 0) ? -1 : rates[i]; - CDBG("%s: clk_rate[%d] = %ld\n", __func__, i, - csiphy_clk_info[i].clk_rate); - } - return 0; -} - -static int csiphy_probe(struct platform_device *pdev) -{ - struct csiphy_device *new_csiphy_dev; - int rc = 0; - - new_csiphy_dev = kzalloc(sizeof(struct csiphy_device), GFP_KERNEL); - if (!new_csiphy_dev) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - new_csiphy_dev->ctrl_reg = NULL; - new_csiphy_dev->ctrl_reg = kzalloc(sizeof(struct csiphy_ctrl_t), - GFP_KERNEL); - if (!new_csiphy_dev->ctrl_reg) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(new_csiphy_dev); - return -ENOMEM; - } - v4l2_subdev_init(&new_csiphy_dev->msm_sd.sd, &msm_csiphy_subdev_ops); - v4l2_set_subdevdata(&new_csiphy_dev->msm_sd.sd, new_csiphy_dev); - platform_set_drvdata(pdev, &new_csiphy_dev->msm_sd.sd); - - mutex_init(&new_csiphy_dev->mutex); - - if (pdev->dev.of_node) { - of_property_read_u32((&pdev->dev)->of_node, - "cell-index", &pdev->id); - CDBG("%s: device id = %d\n", __func__, pdev->id); - } - - rc = msm_csiphy_get_clk_info(new_csiphy_dev, pdev); - if (rc < 0) { - pr_err("%s: msm_csiphy_get_clk_info() failed", __func__); - rc = -EFAULT; - goto csiphy_no_resource; - } - new_csiphy_dev->mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy"); - if (!new_csiphy_dev->mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->irq = platform_get_resource_byname(pdev, - IORESOURCE_IRQ, "csiphy"); - if (!new_csiphy_dev->irq) { - pr_err("%s: no irq resource?\n", __func__); - rc = -ENODEV; - goto csiphy_no_resource; - } - new_csiphy_dev->io = request_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem), pdev->name); - if (!new_csiphy_dev->io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - - rc = request_irq(new_csiphy_dev->irq->start, msm_csiphy_irq, - IRQF_TRIGGER_RISING, "csiphy", new_csiphy_dev); - if (rc < 0) { - release_mem_region(new_csiphy_dev->mem->start, - resource_size(new_csiphy_dev->mem)); - pr_err("%s: irq request fail\n", __func__); - rc = -EBUSY; - goto csiphy_no_resource; - } - disable_irq(new_csiphy_dev->irq->start); - - new_csiphy_dev->clk_mux_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "csiphy_clk_mux"); - if (new_csiphy_dev->clk_mux_mem) { - new_csiphy_dev->clk_mux_io = request_mem_region( - new_csiphy_dev->clk_mux_mem->start, - resource_size(new_csiphy_dev->clk_mux_mem), - new_csiphy_dev->clk_mux_mem->name); - if (!new_csiphy_dev->clk_mux_io) - pr_err("%s: ERROR %d\n", __func__, __LINE__); - } - - new_csiphy_dev->pdev = pdev; - new_csiphy_dev->msm_sd.sd.internal_ops = &msm_csiphy_internal_ops; - new_csiphy_dev->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(new_csiphy_dev->msm_sd.sd.name, - ARRAY_SIZE(new_csiphy_dev->msm_sd.sd.name), "msm_csiphy"); - media_entity_init(&new_csiphy_dev->msm_sd.sd.entity, 0, NULL, 0); - new_csiphy_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - new_csiphy_dev->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_CSIPHY; - new_csiphy_dev->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x4; - msm_sd_register(&new_csiphy_dev->msm_sd); - - if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V20; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v2.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v2_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V22; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.0")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_0; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V30; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.1")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_1; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V31; - } else if (of_device_is_compatible(new_csiphy_dev->pdev->dev.of_node, - "qcom,csiphy-v3.2")) { - new_csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v3_2; - new_csiphy_dev->hw_dts_version = CSIPHY_VERSION_V32; - } else { - pr_err("%s:%d, invalid hw version : 0x%x", __func__, __LINE__, - new_csiphy_dev->hw_dts_version); - rc = -EINVAL; - goto csiphy_no_resource; - } - - new_csiphy_dev->csiphy_state = CSIPHY_POWER_DOWN; - return 0; - -csiphy_no_resource: - mutex_destroy(&new_csiphy_dev->mutex); - kfree(new_csiphy_dev->ctrl_reg); - kfree(new_csiphy_dev); - return rc; -} - -static const struct of_device_id msm_csiphy_dt_match[] = { - {.compatible = "qcom,csiphy"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_csiphy_dt_match); - -static struct platform_driver csiphy_driver = { - .probe = csiphy_probe, - .driver = { - .name = MSM_CSIPHY_DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_csiphy_dt_match, - }, -}; - -static int __init msm_csiphy_init_module(void) -{ - if (early_machine_is_msm8939()) - if (socinfo_get_version() == SOC_REVISION_3) - is_3_1_rev3 = 1; - - return platform_driver_register(&csiphy_driver); -} - -static void __exit msm_csiphy_exit_module(void) -{ - platform_driver_unregister(&csiphy_driver); -} - -module_init(msm_csiphy_init_module); -module_exit(msm_csiphy_exit_module); -MODULE_DESCRIPTION("MSM CSIPHY driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.h deleted file mode 100644 index 8a363df67bc7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/csiphy/msm_csiphy.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CSIPHY_H -#define MSM_CSIPHY_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_sd.h" - -#define MAX_CSIPHY 3 - -struct csiphy_reg_parms_t { -/*MIPI CSI PHY registers*/ - uint32_t mipi_csiphy_lnn_cfg1_addr; - uint32_t mipi_csiphy_lnn_cfg2_addr; - uint32_t mipi_csiphy_lnn_cfg3_addr; - uint32_t mipi_csiphy_lnn_cfg4_addr; - uint32_t mipi_csiphy_lnn_cfg5_addr; - uint32_t mipi_csiphy_lnck_cfg1_addr; - uint32_t mipi_csiphy_lnck_cfg2_addr; - uint32_t mipi_csiphy_lnck_cfg3_addr; - uint32_t mipi_csiphy_lnck_cfg4_addr; - uint32_t mipi_csiphy_lnck_cfg5_addr; - uint32_t mipi_csiphy_lnck_misc1_addr; - uint32_t mipi_csiphy_glbl_reset_addr; - uint32_t mipi_csiphy_glbl_pwr_cfg_addr; - uint32_t mipi_csiphy_glbl_irq_cmd_addr; - uint32_t mipi_csiphy_hw_version_addr; - uint32_t mipi_csiphy_interrupt_status0_addr; - uint32_t mipi_csiphy_interrupt_mask0_addr; - uint32_t mipi_csiphy_interrupt_mask_val; - uint32_t mipi_csiphy_interrupt_mask_addr; - uint32_t mipi_csiphy_interrupt_clear0_addr; - uint32_t mipi_csiphy_interrupt_clear_addr; - uint32_t mipi_csiphy_mode_config_shift; - uint32_t mipi_csiphy_glbl_t_init_cfg0_addr; - uint32_t mipi_csiphy_t_wakeup_cfg0_addr; - uint32_t csiphy_version; -}; - -struct csiphy_ctrl_t { - struct csiphy_reg_parms_t csiphy_reg; -}; - -enum msm_csiphy_state_t { - CSIPHY_POWER_UP, - CSIPHY_POWER_DOWN, -}; - -struct csiphy_device { - struct platform_device *pdev; - struct msm_sd_subdev msm_sd; - struct v4l2_subdev subdev; - struct resource *mem; - struct resource *clk_mux_mem; - struct resource *irq; - struct resource *io; - struct resource *clk_mux_io; - void __iomem *base; - void __iomem *clk_mux_base; - struct mutex mutex; - uint32_t hw_version; - uint32_t hw_dts_version; - enum msm_csiphy_state_t csiphy_state; - struct csiphy_ctrl_t *ctrl_reg; - uint32_t num_clk; - - struct clk *csiphy_clk[8]; - - int32_t ref_count; - uint16_t lane_mask[MAX_CSIPHY]; -}; - -#define VIDIOC_MSM_CSIPHY_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 9, void *) -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a.h deleted file mode 100755 index 660cfa515937..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __db8221a_H__ -#define __db8221a_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef db8221a_DEBUG -#undef CDBG -#define db8221a_DEBUG -#ifdef db8221a_DEBUG -#define CDBG(fmt, args...) pr_err("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#else -#define CDBG(fmt, args...) pr_debug("%s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.c deleted file mode 100755 index 54d3017460cc..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.c +++ /dev/null @@ -1,673 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "db8221a.h" -#include "db8221a_yuv.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define DB8221A_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define DB8221A_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl db8221a_ctrl; -static exif_data_t db8221a_exif; - -static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -#if defined CONFIG_SEC_CAMERA_TUNING -#define FILENAME "/data/db8221a_yuv.h" -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif - -static int db8221a_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 coarseTime = 0; - u16 lineLength = 0; - const int SensorInputClock = 72000000; - int rc = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x06, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x07, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - coarseTime = ((read_value1&0xFF) << 8) | read_value2; - - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0xFF, 0xE8, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0A, &read_value1, MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x0B, &read_value2, MSM_CAMERA_I2C_BYTE_DATA); - - lineLength = ((read_value1&0xFF) << 8) | read_value2; - CDBG("%s::%d coarseTime = %d, lineLength = %d",__func__,__LINE__,coarseTime,lineLength); - - if(coarseTime == 0 || lineLength == 0){ - pr_err("%s : %d I2C data is 0\n", __func__, __LINE__); - rc = -EFAULT; - } - else{ - db8221a_exif.shutterspeed = SensorInputClock/(coarseTime*lineLength*2); - CDBG("Exposure time = %d", db8221a_exif.shutterspeed); - } - return rc; -} - -static int db8221a_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (db8221a_exif.shutterspeed <= 10) - db8221a_exif.iso = 400; - else if (db8221a_exif.shutterspeed > 10 && db8221a_exif.shutterspeed <= 20) - db8221a_exif.iso = 200; - else if (db8221a_exif.shutterspeed > 20 && db8221a_exif.shutterspeed <= 30) - db8221a_exif.iso = 100; - else - db8221a_exif.iso = 50; - CDBG("ISO = %d", db8221a_exif.iso); - return 0; -} - -static int db8221a_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - CDBG("%s : %d E",__func__,__LINE__); - rc = db8221a_exif_shutter_speed(s_ctrl); - if( rc < 0 ) return rc; - rc = db8221a_exif_iso(s_ctrl); - return rc; -} - -int32_t db8221a_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - CDBG("%s : %d E",__func__,__LINE__); - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = db8221a_exif.iso; - exif_info->value_3 = db8221a_exif.shutterspeed; - return 0; -} - -int32_t db8221a_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - DB8221A_WRITE_LIST(db8221a_bright_m4); - break; - case CAMERA_EV_M3: - DB8221A_WRITE_LIST(db8221a_bright_m3); - break; - case CAMERA_EV_M2: - DB8221A_WRITE_LIST(db8221a_bright_m2); - break; - case CAMERA_EV_M1: - DB8221A_WRITE_LIST(db8221a_bright_m1); - break; - case CAMERA_EV_DEFAULT: - DB8221A_WRITE_LIST(db8221a_bright_default); - break; - case CAMERA_EV_P1: - DB8221A_WRITE_LIST(db8221a_bright_p1); - break; - case CAMERA_EV_P2: - DB8221A_WRITE_LIST(db8221a_bright_p2); - break; - case CAMERA_EV_P3: - DB8221A_WRITE_LIST(db8221a_bright_p3); - break; - case CAMERA_EV_P4: - DB8221A_WRITE_LIST(db8221a_bright_p4); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - DB8221A_WRITE_LIST(db8221a_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - DB8221A_WRITE_LIST(db8221a_wb_incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - DB8221A_WRITE_LIST(db8221a_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - DB8221A_WRITE_LIST(db8221a_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - DB8221A_WRITE_LIST(db8221a_Capture_1600_1200); - break; - case MSM_SENSOR_RES_QTR: - DB8221A_WRITE_LIST(db8221a_preview_800_600); - break; - case MSM_SENSOR_RES_2: - DB8221A_WRITE_LIST(db8221a_preview_640_480); - break; - case MSM_SENSOR_RES_3: - DB8221A_WRITE_LIST(db8221a_preview_352_288); - break; - case MSM_SENSOR_RES_4: - DB8221A_WRITE_LIST(db8221a_preview_320_240); - break; - case MSM_SENSOR_RES_5: - DB8221A_WRITE_LIST(db8221a_preview_176_144); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - - return rc; -} - -int32_t db8221a_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - DB8221A_WRITE_LIST(db8221a_effect_none); - break; - case CAMERA_EFFECT_MONO: - DB8221A_WRITE_LIST(db8221a_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - DB8221A_WRITE_LIST(db8221a_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - DB8221A_WRITE_LIST(db8221a_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = -EINVAL; - } - return rc; -} - -int32_t db8221a_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - - CDBG(" CFG_GET_SENSOR_INFO"); - - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); -#if 0 - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); -#endif - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); - db8221a_ctrl.vtcall_mode = 0; - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("%s[%d] %s inside CFG_SET_INIT_SETTING", __func__, __LINE__ ,FILENAME); - } -#endif - break; - - case CFG_SET_RESOLUTION: - CDBG("CFG_SET_RESOLUTION"); - resolution = *((int32_t *)cdata->cfg.setting); - - if((db8221a_ctrl.prev_mode == CAMERA_MODE_INIT || db8221a_ctrl.prev_mode == CAMERA_MODE_RECORDING) - && (db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW)){ - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_PREVIEW){ - db8221a_set_resolution(s_ctrl, resolution); - } - else if((db8221a_ctrl.prev_mode == CAMERA_MODE_PREVIEW) - && (db8221a_ctrl.op_mode == CAMERA_MODE_CAPTURE)){ - CDBG("capture seq"); - if( resolution == MSM_SENSOR_RES_FULL ){ - db8221a_set_resolution(s_ctrl , resolution); - db8221a_get_exif(s_ctrl); - } - else{ - pr_err("%s:%d invalid capture size\n", __func__, __LINE__); - rc = -EINVAL; - } - } - else if(db8221a_ctrl.op_mode == CAMERA_MODE_RECORDING){ - CDBG("recording seq"); - if (db8221a_ctrl.prev_mode == CAMERA_MODE_INIT) { - - if (db8221a_ctrl.vtcall_mode) { - CDBG("vt seq"); - DB8221A_WRITE_LIST(db8221a_VT_Init_Reg); - //msleep(10); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - CDBG("50Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - CDBG("60Hz init setting"); - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - CDBG("preview seq"); - DB8221A_WRITE_LIST(db8221a_Init_Reg); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - //db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - db8221a_set_exposure_compensation(s_ctrl , db8221a_ctrl.settings.exposure); - db8221a_set_resolution(s_ctrl , resolution); - msleep(50); - - } - DB8221A_WRITE_LIST(db8221a_24fps_Camcoder); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_50Hz); - } else { - DB8221A_WRITE_LIST(db8221a_anti_banding_flicker_60Hz); - } - } - else{ - pr_err("%s:%d invalid sequence db8221a_ctrl.prev_mode:%d, db8221a_ctrl.op_mode:%d\n", - __func__, __LINE__, db8221a_ctrl.prev_mode, db8221a_ctrl.op_mode); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - DB8221A_WRITE_LIST(db8221a_stream_stop); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); -#if 0 - { - int slave_index = 0; - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - } -#endif - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - streamon = 0; - db8221a_ctrl.op_mode = CAMERA_MODE_INIT; - db8221a_ctrl.prev_mode = CAMERA_MODE_INIT; - db8221a_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - db8221a_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - db8221a_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - db8221a_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - db8221a_ctrl.settings.effect = CAMERA_EFFECT_OFF; - db8221a_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } - else { - pr_err("%s : %d undefined sensor_power_up",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } - else{ - pr_err("%s : %d undefined sensor_power_down",__func__,__LINE__); - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - pr_err("%s: %d invalid\n", __func__, __LINE__); - //rc = -EINVAL; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - - return rc; -} - -int32_t db8221a_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cam_info->mode) { - case EXT_CAM_EV: - db8221a_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - db8221a_set_exposure_compensation(s_ctrl, db8221a_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - db8221a_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - db8221a_set_white_balance(s_ctrl, db8221a_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - db8221a_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - db8221a_set_effect(s_ctrl, db8221a_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - db8221a_ctrl.prev_mode = db8221a_ctrl.op_mode; - db8221a_ctrl.op_mode = cam_info->value_1; - break; - case EXT_CAM_EXIF: - db8221a_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - db8221a_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - pr_err("%s: %d unsupport mode : %d\n", __func__, __LINE__, cam_info->mode); - //rc = -EINVAL; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("%s : %d EXIT", __func__, __LINE__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.h deleted file mode 100755 index 18dd62fbe446..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/db8221a_yuv.h +++ /dev/null @@ -1,3796 +0,0 @@ -/* DB8221A_regs_goya.h - * - * Driver for DB8221A (2MP Camera) from dongbu - * - * Copyright (C) 2015, SAMSUNG ELECTRONICS - * - * 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. - * - */ - -#ifndef _DB8221A_REGS_H_ -#define _DB8221A_REGS_H_ - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -#define INIT_RES_800_600 -#endif - -#if defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -#define MIPI_CLK_277MHZ -#endif - -/*==============================================*/ -/* CAMERA_Init */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr -#if defined(INIT_RES_800_600) - {0x14, 0x06}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x40}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#else - {0x14, 0x05}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x00}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 -#endif - -/*===================================*/ -/* For Analog Setting */ -/*===================================*/ - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - -/*==================================*/ -/* ADF Anlog */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - -/*==================================*/ -/* Line Length & Flip */ -/*==================================*/ - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - -/*==================================*/ -/* AE Gain Table */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // x1.8 - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - {0xDB, 0x0E}, // x2.0 - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - {0xDE, 0x0E}, // x3.0 - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - {0xE1, 0x0F}, // x4.0 - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - {0xE4, 0x0A}, // x5.0 - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - {0xE7, 0x0E}, // x6.0 - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - {0xEA, 0x0F}, // x7.0 - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - {0xED, 0x0F}, // x8.0 - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - {0xF0, 0x0F}, // x9.0 - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - -/*==================================*/ -/* AE */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0x07, 0x01}, // Variable Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x03}, // MinFrame 8fps - {0x7F, 0x21}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x01}, // SCLHorScale -#if defined(INIT_RES_800_600) - {0x55, 0xFF}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0xFF}, // -#else - {0x55, 0x99}, // - {0x56, 0x01}, // SCLVerScale - {0x57, 0x99}, // -#endif - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // -#if defined(INIT_RES_800_600) - {0x5C, 0x03}, // SCLCropEndX - {0x5D, 0x20}, // - {0x5E, 0x02}, // SCLCropEndY - {0x5F, 0x58}, // -#else - {0x5C, 0x02}, // SCLCropEndX - {0x5D, 0x80}, // - {0x5E, 0x01}, // SCLCropEndY - {0x5F, 0xE0}, // -#endif - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_Init - VT Call Initial 셋팅 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_VT_Init_Reg[] = { -/*==================================*/ -/* OutFormatter */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x70, 0x01}, // Outformat - {0x71, 0x0D}, // - - {0xFF, 0xE0}, // Page - {0x02, 0x80}, // ISP Mode - -/*===================================*/ -/* MIPI Setting */ -/*===================================*/ - {0xFF, 0xE4}, // Page - {0x10, 0x1E}, // MIPI DATA TYPE Addr - {0x04, 0x01}, // CSI_EN - {0xFF, 0x96}, // Page - {0xD5, 0x1E}, // gPT_u8PR_Active_SXGA_DATA_TYPE_Addr - {0xD6, 0x0C}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr0 - {0xD7, 0x80}, // gPT_u8PR_Active_SXGA_WORD_COUNT_Addr1 - - {0xFF, 0x97}, // Page - {0x13, 0x1E}, // gPT_u8PR_Active_VGA_DATA_TYPE_Addr - {0x14, 0x01}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr0 - {0x15, 0x60}, // gPT_u8PR_Active_VGA_WORD_COUNT_Addr1 - - //=================================== - // For Analog Setting - //=================================== - //Bayer Setting - {0xFF, 0xE8}, // Page - {0x0F, 0x01}, // cpga_bias0 - {0x10, 0xCE}, // cpga_bias1 - {0xFF, 0x96}, // Page - {0xB0, 0x01}, // min cpga_bias0 - {0xB1, 0x08}, // min cpga_bias1 - {0xBD, 0x01}, // mid cpga_bias0 - {0xBE, 0xCE}, // mid cpga_bias1 - {0xC8, 0x01}, // max cpga_bias0 - {0xC9, 0xCE}, // max cpga_bias1 - - {0xFF, 0xE8}, // Page - {0x11, 0x28}, // clamp_on_off_con - - {0x12, 0x80}, // clamp_con - {0xFF, 0x96}, // Page - {0xB8, 0x80}, // min_clamp_con - {0xD0, 0x80}, // max_clamp_con - - {0xFF, 0xE8}, // Page - {0x13, 0x8C}, // adc_con - {0xFF, 0x96}, // Page - {0xB3, 0x8C}, // min_adc_con - {0xC0, 0x8C}, // mid_adc_con - {0xCB, 0x8C}, // mid_adc_con - - {0xFF, 0xE8}, // Page - {0x14, 0xC7}, // cpga_con - - {0x15, 0xEC}, // ramp_ppg_con - - {0x16, 0x87}, // cds_amp1_2_bias //cfpn - {0xFF, 0x96}, // Page - {0xB5, 0x87}, // min_cds_amp1_2_bias - {0xC2, 0x87}, // mid_cds_amp1_2_bias - {0xCD, 0x87}, // max_cds_amp1_2_bias - - {0xFF, 0xE8}, // Page - {0x17, 0x04}, // cds_amp3_pixel_bias - - {0x18, 0x10}, // rampgen_con_0 - {0xFF, 0x96}, // Page - {0xB6, 0x10}, // max_rampgen_con_0 - {0xC3, 0x10}, // mix_rampgen_con_0 - {0xCE, 0x10}, // min_rampgen_con_0 - - {0xFF, 0xE8}, // Page - {0x19, 0x03}, // rampgen_con1 - {0xFF, 0x96}, // Page - {0xB7, 0x03}, // min_rampgen_con1 - {0xC4, 0x03}, // min_rampgen_con1 - {0xCF, 0x03}, // min_rampgen_con1 - - {0xFF, 0xE8}, // Page - {0x1A, 0x1C}, // rampgen_con_2 - - {0x1B, 0x77}, // ppg_con_0 - {0x1C, 0x07}, // ppg_con_1 - {0x1D, 0x1C}, // ppg_con_2 - - {0x1E, 0x05}, // npg_con //npg_clk_divideren<==BLC - {0xFF, 0x96}, // Page - {0xB4, 0x05}, // min_npg_con - {0xC1, 0x05}, // mid_npg_con - {0xCC, 0x05}, // max_npg_con - - {0xFF, 0xE8}, // Page - {0x1F, 0x58}, // ldo_cpga_con_cpga_buffer_bypass[5] - {0xFF, 0x96}, // Page - {0xB2, 0x58}, // ldo_cpga_con_min - {0xBF, 0x58}, // ldo_cpga_con_mid - {0xCA, 0x58}, // ldo_cpga_con_max - - {0xFF, 0xE8}, // Page - {0x20, 0x01}, // cpga ref_os(max) - - // Pixel - {0x21, 0x00}, // riseScanSx_H - {0x22, 0x04}, // riseScanSx_L - {0x23, 0x01}, // fallScanSx_H - {0x24, 0x55}, // fallScanSx_L - {0x25, 0x01}, // riseScanSx1_H - {0x26, 0xC0}, // riseScanSx1_L - {0x27, 0x00}, // fallScanSx1_H - {0x28, 0x00}, // fallScanSx1_L - - {0x29, 0x00}, // riseScanSx_cds_H - {0x2A, 0x04}, // riseScanSx_cds_L - {0x2B, 0x01}, // fallScanSx_cds_H - {0x2C, 0x55}, // fallScanSx_cds_L - {0x2D, 0x01}, // riseScanSx_cds1_H - {0x2E, 0x80}, // riseScanSx_cds1_L - {0x2F, 0x00}, // fallScanSx_cds1_H - {0x30, 0x00}, // fallScanSx_cds1_L - - {0x31, 0x00}, // RiseScanRx_H - {0x32, 0x01}, // RiseScanRx_H - {0x33, 0x00}, // FallScanRx_H - {0x34, 0x08}, // FallScanRx_L - - {0x35, 0x01}, // riseScantx_H - {0x36, 0x5F}, // riseScantx_L - {0x37, 0x01}, // fallScantx_H - {0x38, 0xC0}, // fallScantx_L - - {0x39, 0x01}, // RiseIntTx - {0x3A, 0x3F}, // FallIntTx - {0xFF, 0x96}, // Page - {0xAF, 0x33}, // FallIntTx_Th - {0xBC, 0x3F}, // min_FallIntTx - {0xD4, 0x3F}, // max_FallIntTx - - {0xFF, 0xE8}, // Page - {0x3B, 0x01}, // RiseIntRx - {0x3C, 0x3F}, // FallIntRx - - {0xFF, 0x98}, // Page - {0xEF, 0x3F}, // FallIntLatch (UR) - - // CDS - {0xFF, 0xE8}, // Page - {0x3D, 0x00}, // RiseQrst_H - {0x3E, 0x20}, // RiseQrst_L - {0x3F, 0x03}, // FallQrst_H - {0x40, 0x8F}, // FallQrst_L - {0xFF, 0x96}, // Page - {0xBA, 0x8F}, // min_fallQrst - {0xC6, 0x8F}, // mid_fallQrst - {0xD2, 0x8F}, // max_fallQrst - - {0xFF, 0xE8}, // Page - {0x41, 0x00}, // RiseQsig_H - {0x42, 0x20}, // RiseQsig_L - {0x43, 0x01}, // FallQsig_H - {0x44, 0x48}, // FallQsig_L - {0xFF, 0x96}, // Page - {0xB9, 0x48}, // min_fallQsig - {0xC5, 0x48}, // mid_fallQsig - {0xD1, 0x48}, // max_fallQsig - - {0xFF, 0xE8}, // Page - {0x45, 0x00}, // riseQos1_H - {0x46, 0x20}, // riseQos1_L - {0x47, 0x00}, // fallQos1_H - {0x48, 0xA0}, // fallQos1_L - {0x49, 0x00}, // riseQos2_H - {0x4A, 0x20}, // riseQos2_L - {0x4B, 0x00}, // fallQos2_H - {0x4C, 0xB0}, // fallQos2_L - - // CPGA - {0x4D, 0x00}, // RiseCreset - {0x4E, 0x1A}, // - {0x4F, 0x01}, // FallCreset_H - {0x50, 0x30}, // FallCreset_L - - {0x51, 0x03}, // Rise_cpga_pdn_H - {0x52, 0xFF}, // Rise_cpga_pdn_L - {0x53, 0x00}, // Fall_cpga_pdn_H - {0x54, 0x1C}, // Fall_cpga_pdn_L - - {0x55, 0x07}, // Rise_MillerEn_H - {0x56, 0xB0}, // Rise_MillerEn_L - {0x57, 0x01}, // Fall_MillerEn_H - {0x58, 0x00}, // Fall_MillerEn_L - - // Qt_rst, Qt_sig - {0x59, 0x00}, // Rise_QTRST_H - {0x5A, 0x01}, // Rise_QTRST_L - {0x5B, 0x01}, // Fall_QTRST_H - {0x5C, 0x50}, // Fall_QTRST_L - - {0x5D, 0x01}, // Rise_QTRST_H - {0x5E, 0x50}, // Rise_QTRST_L - {0x5F, 0x03}, // Fall_QTRST_H - {0x60, 0x92}, // Fall_QTRST_L - - //IClamp - {0x61, 0x00}, // FallIclamp_H - {0x62, 0x04}, // FallIclamp_L - {0x63, 0x00}, // RiseIclamp_H - {0x64, 0x00}, // RiseIclamp_L - - // RAMP - {0x65, 0x03}, // riseqramp_H - {0x66, 0x92}, // riseqramp_L - {0x67, 0x07}, // fallqramp_H - {0x68, 0xB2}, // fallqramp_L - {0xFF, 0x96}, // Page - {0xBB, 0xB2}, // minfallqramp - {0xC7, 0xB2}, // midfallqramp - {0xD3, 0xB2}, // maxfallqramp - - // qbitline - {0xFF, 0xE8}, // Page - {0x69, 0x00}, // RiseQbitlinepdn_H - {0x6A, 0x00}, // RiseQbitlinepdn_L - {0x6B, 0x00}, // FallQbitlinepdn_H - {0x6C, 0x00}, // FallQbitlinepdn_L - - {0x6D, 0x00}, // RiseRamp_prst_H - {0x6E, 0x00}, // RiseRamp_prst_L - {0x6F, 0x03}, // FallRamp_prst_H - {0x70, 0xB0}, // FallRamp_prst_L - {0x71, 0x00}, // RiseRamp_prst1_H - {0x72, 0x00}, // RiseRamp_prst1_L - {0x73, 0x00}, // FallRamp_prst1_H - {0x74, 0x00}, // FallRamp_prst1_L - - // Line buffer - {0x75, 0x03}, // riselatch_prst_H - {0x76, 0x92}, // riselatch_prst_L - {0x77, 0x03}, // Falllatch_prst_H - {0x78, 0xB0}, // Falllatch_prst_L - - {0x79, 0x00}, // RiseTranE_H - {0x7A, 0x50}, // RiseTranE_L - {0x7B, 0x00}, // FallTranE_H - {0x7C, 0x52}, // FallTranE_L - {0x7D, 0x00}, // RiseTranO_H - {0x7E, 0x52}, // RiseTranO_L - {0x7F, 0x00}, // FallTranO_H - {0x80, 0x54}, // FallTranO_L - - // Scanlath - {0x85, 0x00}, // Rise scanlatch - {0x86, 0x00}, // Rise scanlatch - {0x87, 0x03}, // FallScanLatch_H - {0x88, 0x8F}, // FallScanLatch_L - - {0x8A, 0x3F}, // FallIntLatch - - {0x96, 0x04}, // rise cpga_ref_sample - {0x97, 0x00}, // rise cpga_ref_sample - {0x98, 0x07}, // fall cpga_ref_sample - {0x99, 0xB0}, // fall cpga_ref_sample - - // LineStart - {0x91, 0x01}, // LineStart_H - {0x92, 0x5E}, // LineStart_L(rising 350 clk) - - {0x93, 0x07}, // linemode(tran timing control) - - // MIPI - {0xFF, 0xE4}, // Page - {0x58, 0xC3}, // PHY_LP_TX_PARA - - //================================== - // ADF Anlog - //================================== - {0xFF, 0x95}, // Page - {0xB8, 0x66}, // APThreshold - - {0xFF, 0x97}, // Page - {0x58, 0xC5}, // AddedAnalogADFCtrl - {0x59, 0x15}, // AddedDigitalADFCtrl - {0x5C, 0xE8}, // u8An_Addr_H Manual Analog SNR Address - - {0x5D, 0x2E}, // u8AnEn0_Addr_1__FallSx_CDS1_L - {0x5E, 0x60}, // u8AnEn0_Min_Value - {0x5F, 0x60}, // u8AnEn0_Mid_Value - {0x60, 0x80}, // u8AnEn0_Max_Value - {0x61, 0x80}, // u8UpdateValue - - {0x62, 0x14}, // u8AnEn0_Addr_1_CPGA_Buffer_Bias - {0x63, 0xC4}, // u8AnEn0_Min_Value - {0x64, 0xC4}, // u8AnEn0_Mid_Value - {0x65, 0xC7}, // u8AnEn0_Max_Value - {0x66, 0xC7}, // u8UpdateValue - - {0x6C, 0x94}, // u8DiEn0_Addr_0_StdB - {0x6D, 0xCD}, // u8DiEn0_Addr_1 - {0x6E, 0xAA}, // u8DiEn0_Threshold - {0x6F, 0xFF}, // u8DiEn0_Min_Value - {0x70, 0x00}, // u8DiEn0_Max_Value - {0x71, 0x00}, // u8UpdateValue - - {0x72, 0x96}, // u8DiEn1_Addr_0_UnicolorZone - {0x73, 0xE4}, // u8DiEn1_Addr_1 - {0x74, 0xAA}, // u8DiEn1_Threshold - {0x75, 0x05}, // u8DiEn1_Min_Value - {0x76, 0x01}, // u8DiEn1_Max_Value - {0x77, 0x01}, // u8UpdateValue - - {0x78, 0xE8}, // u8DiEn2_Addr_0_Pixel_Bias - {0x79, 0x17}, // u8DiEn2_Addr_1 - {0x7A, 0x33}, // u8DiEn2_Threshold - {0x7B, 0x00}, // u8DiEn2_Min_Value - {0x7C, 0x04}, // u8DiEn2_Max_Value - {0x7D, 0x04}, // u8UpdateValue - - //================================== - // Line Length & Flip - //================================== - //LineLength - {0xFF, 0xE8}, // Page - {0x0A, 0x07}, // - {0x0B, 0xB4}, // - - {0xFF, 0x98}, // Page - {0xDF, 0x00}, // Flip - - //================================== - // AE Gain Table - //================================== - //Table1 X1.8 - {0xFF, 0x93}, // Page - {0xD8, 0x20}, // - {0xD9, 0xA8}, // - {0xDA, 0x05}, // - - //Table2 X2 - {0xDB, 0x0E}, // - {0xDC, 0xA8}, // - {0xDD, 0x15}, // - - //Table3 X3 - {0xDE, 0x0E}, // - {0xDF, 0xA8}, // - {0xE0, 0x05}, // - - //Table4 X4 - {0xE1, 0x0F}, // - {0xE2, 0xE8}, // - {0xE3, 0x05}, // - - //Table5 X5 - {0xE4, 0x0A}, // - {0xE5, 0xA8}, // - {0xE6, 0x01}, // - - //Table6 X6 - {0xE7, 0x0E}, // - {0xE8, 0xA8}, // - {0xE9, 0x01}, // - - //Table7 X7 - {0xEA, 0x0F}, // - {0xEB, 0xA8}, // - {0xEC, 0x01}, // - - //Table8 X8 - {0xED, 0x0F}, // - {0xEE, 0xE8}, // - {0xEF, 0x01}, // - - //Table9 X9 - {0xF0, 0x0F}, // - {0xF1, 0xF8}, // - {0xF2, 0x01}, // - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x82, 0x1E}, // UsrAGain_0 - {0x83, 0x1E}, // UsrAGain_1 - {0x84, 0x2D}, // UsrAGain_2 - {0x85, 0x38}, // UsrAGain_3 - {0x86, 0x48}, // UsrAGain_4 - {0x87, 0x58}, // UsrAGain_5 - {0x88, 0x68}, // UsrAGain_6 - {0x89, 0x78}, // UsrAGain_7 - {0x8A, 0x88}, // UsrAGain_8 - -/*==================================*/ -/* PT : AGAIN Control */ -/*==================================*/ - {0x98, 0x1C}, // AE_UsrDeminoAGain_0 - {0x99, 0x1D}, // AE_UsrDeminoAGain_1 - {0x9A, 0x2D}, // AE_UsrDeminoAGain_2 - {0x9B, 0x38}, // AE_UsrDeminoAGain_3 - {0x9C, 0x48}, // AE_UsrDeminoAGain_4 - {0x9D, 0x58}, // AE_UsrDeminoAGain_5 - {0x9E, 0x68}, // AE_UsrDeminoAGain_6 - {0x9F, 0x78}, // AE_UsrDeminoAGain_7 - {0xA0, 0x88}, // AE_UsrDeminoAGain_8 - -/*==================================*/ -/* ISP Global Control #1 */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x20, 0x00}, // EDE: Optiong - {0x21, 0x22}, // EDE: SlopeGain - {0x22, 0x44}, // EDE: EDELuAdpCtl - {0x23, 0x00}, // EDE: PreCoringPt - {0x24, 0x00}, // EDE: x1 point - {0x25, 0x16}, // EDE: x1 point - {0x26, 0x00}, // EDE: x2 point - {0x27, 0x98}, // EDE: x2 point - {0x28, 0x09}, // EDE: TransFuncSl1 - {0x29, 0x22}, // EDE: TransFuncSl2 - {0x2A, 0x00}, // EDE: Adaptation left margin - {0x2B, 0x4C}, // EDE: Adaptation right margin - {0x2C, 0x08}, // EDE: RGB edge threshol - {0x2D, 0x00}, // EDE: SmallOffset - - {0x30, 0x48}, // EDESaThrd1 - {0x31, 0x60}, // EDESaThrd2 - {0x32, 0x00}, // EDESaSlope - - {0xFF, 0xE0}, // Page - {0xD0, 0x01}, // BCD - {0xD1, 0x00}, // BCDFcsThrd - {0x61, 0x17}, // CDC Slash pattern Off - - {0xFF, 0xE1}, // Page - {0xE0, 0x00}, // RDC Enable - {0xE1, 0x00}, // RDC_R0 - {0xE2, 0x22}, // RDC_R1 - {0xE3, 0x40}, // RDC_R2 - {0xEA, 0x00}, // RDC_B0 - {0xEB, 0x22}, // RDC_B1 - {0xEC, 0x40}, // RDC_B2 - -/*==================================*/ -/* LNF */ -/*==================================*/ - {0xFF, 0xE0}, // Page - {0x80, 0x66}, // LNFClrSmRLeft - {0x81, 0x81}, // LNFClrSmRRight - {0x82, 0x8A}, // LNFClrSmRBottom - {0x83, 0xA2}, // LNFClrSmRTop - {0x84, 0x0E}, // LNFClrSmTh - - {0x85, 0x01}, // LNFGzRgTh - {0x86, 0x82}, // LNFGzSmTh - - {0x87, 0x08}, // LNFLLimit - {0x88, 0x3C}, // LNFHLimit - {0x89, 0x00}, // LNFThAdd - {0x8A, 0x0A}, // LNFTh0 - {0x8B, 0x06}, // LNFTh1 - {0x8C, 0x00}, // LNFTh2 - {0x8D, 0x00}, // LNFTh3 - {0x8E, 0x00}, // LNFTh4 - {0x8F, 0x00}, // LNFTh5 - -/*==================================*/ -/* ADF LNF */ -/*==================================*/ - {0xFF, 0x97}, // Page - {0x8B, 0x42}, //ADF_Threshold_LNF - - {0x8C, 0x18}, //ADF_Min_LNFLLimit - {0x8E, 0x08}, //ADF_Min_LNFTh0 - {0x90, 0x06}, //ADF_Min_LNFTh1 - {0x92, 0x08}, //ADF_Min_LNFClrSmTh - - {0x8D, 0x18}, //ADF_Max_LNFLLimit - {0x8F, 0x03}, //ADF_Max_LNFTh0 - {0x91, 0x01}, //ADF_Max_LNFTh1 - {0x93, 0x00}, // ADF_Max_LNFClrSmTh - -/*==================================*/ -/* NCNF */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x40, 0x07}, // YunFuncEn - {0x41, 0xF0}, // CNFCtrl_A - {0x42, 0x18}, // CNFCtrl_B - {0x43, 0x75}, // CNFCtrl_C - {0x44, 0x00}, // CNF_AdpCtrl - - //================================== - // AE - //================================== - {0xFF, 0x93}, // Page - {0x07, 0x02}, // Fixed Frame - {0x0B, 0x11}, // Weight_0 - {0x0C, 0x11}, // Weight_1 - {0x0D, 0x11}, // Weight_2 - {0x0E, 0xC8}, // Weight_3 - {0x0F, 0x18}, // Weight_4 - {0x10, 0xC1}, // Weight_5 - {0x11, 0xCF}, // Weight_6 - {0x12, 0x11}, // Weight_7 - {0x13, 0xC8}, // Weight_8 - {0x14, 0x18}, // Weight_9 - {0x15, 0x11}, // Weight_10 - {0x16, 0x11}, // Weight_11 - {0x17, 0x01}, // Weight_12 - - {0x18, 0x05}, // AE Speed - {0x19, 0x03}, // u8AeLockBnd - {0x1A, 0x06}, // u8AeHoldBnd - - {0x1B, 0x08}, // Analog gain Max - - {0x1C, 0x00}, // 50Hz Time Step - {0x1D, 0x05}, - {0x1E, 0x74}, - {0x1F, 0x7C}, - - {0x22, 0x3B}, // Outdoor Target - {0x23, 0x3B}, // indoor Target - - {0x46, 0x08}, // LuxGainTB_0 - {0x47, 0x10}, // LuxGainTB_1 - {0x48, 0x38}, // LuxGainTB_2 - {0x49, 0x88}, // LuxGainTB_3 - - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x02}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x04}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - - {0x72, 0x0D}, // 71.5Mhz SCLK -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF7}, // -#endif - - {0x79, 0xB8}, // Gain Max - {0x7A, 0x48}, // Gain 3lut - {0x7B, 0x38}, // Gain 2lut - {0x7C, 0x28}, // Gain 1lut - {0x7D, 0x1D}, // Gain Min - - {0x7E, 0x05}, // MinFrame 15fps - {0x7F, 0xDD}, // - - {0x82, 0x0F}, // Time4lut 60hz - {0x83, 0x0A}, // Time3lut 60hz - {0x84, 0x08}, // Time2lut 60hz - {0x85, 0x08}, // Time1lut 60hz - - {0x86, 0x0C}, // TimeMax50Hz : - {0x87, 0x08}, // Time3Lux50Hz : 8.5fps - {0x88, 0x06}, // Time2Lut50Hz : 10fps - {0x89, 0x06}, // Time1Lut50Hz : 15fps - - {0x8A, 0x05}, // 60Hz Frame Rate -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // - - {0x8C, 0x05}, // 50Hz Frame Rate - {0x8D, 0x26}, // -#else - {0x8B, 0x04}, // - - {0x8C, 0x04}, // 50Hz Frame Rate - {0x8D, 0xF4}, // -#endif - - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - {0x91, 0x00}, // LuxLevel_Yx - - {0x9A, 0x03}, // TimeNum0 - {0xB9, 0x05}, // FrameOffset - {0xBE, 0x00}, // UserGTh - - {0x98, 0x2D}, - {0x99, 0x1D}, - - {0xC5, 0x00}, // UpperFine-H - {0xC6, 0x00}, // UpperFine-L - {0xC7, 0x00}, // LowerFine-H - {0xC8, 0x01}, // LowerFine-L - {0xC9, 0x05}, // DarkOffset - {0xCA, 0x05}, // DarkTh - {0xCB, 0x05}, // MinEXP 10=1/1100sec - {0xCC, 0x06}, // MinEXPth DNP4300Lux=20 - {0xCD, 0x00}, // AE speed - - {0xFF, 0x97}, // MinimumExTh - {0x37, 0x06}, // - - {0xFF, 0x93}, - {0x2A, 0x05}, // Fast AE - {0x2B, 0x00}, // Dgain - {0x2C, 0x00}, // CurTime - {0x2D, 0x0A}, - {0x2E, 0xE8}, - {0x2F, 0xF8}, - - {0xB1, 0x04}, // FineTime - {0xB2, 0x70}, - {0xB3, 0x01}, // CoarseTime - {0xB4, 0x6A}, - - {0x08, 0x3D}, // AE Renew - 50Hz - -/*==================================*/ -/* AWB STE */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9A, 0x01}, // AWBCtrl - {0x9C, 0x08}, // AWBLuThL - {0x9D, 0xC0}, // AWBLuThH - {0xA0, 0x00}, // AWBZone0LTx - Flash - {0xA1, 0x00}, // AWBZone0LTy - {0xA2, 0x00}, // AWBZone0RBx - {0xA3, 0x00}, // AWBZone0RBy - {0xA4, 0x90}, // AWBZone1LTx - Cloudy - {0xA5, 0x6B}, // AWBZone1LTy - {0xA6, 0xA7}, // AWBZone1RBx - {0xA7, 0x4B}, // AWBZone1RBy - {0xA8, 0x71}, // AWBZone2LTx - D65 - {0xA9, 0x63}, // AWBZone2LTy - {0xAA, 0x8F}, // AWBZone2RBx - {0xAB, 0x49}, // AWBZone2RBy - {0xAC, 0x6C}, // AWBZone3LTx - Fluorecent - {0xAD, 0x76}, // AWBZone3LTy - {0xAE, 0x8F}, // AWBZone3RBx - {0xAF, 0x50}, // AWBZone3RBy - {0xB0, 0x4B}, // AWBZone4LTx - CWF - {0xB1, 0x78}, // AWBZone4LTy - {0xB2, 0x6B}, // AWBZone4RBx - {0xB3, 0x50}, // AWBZone4RBy - {0xB4, 0x50}, // AWBZone5LTx - TL84 - {0xB5, 0x88}, // AWBZone5LTy - {0xB6, 0x6F}, // AWBZone5RBx - {0xB7, 0x71}, // AWBZone5RBy - {0xB8, 0x4A}, // AWBZone6LTx - A - {0xB9, 0x99}, // AWBZone6LTy - {0xBA, 0x64}, // AWBZone6RBx - {0xBB, 0x83}, // AWBZone6RBy - {0xBC, 0x41}, // AWBZone7LTx - Horizon - {0xBD, 0xB4}, // AWBZone7LTy - {0xBE, 0x5A}, // AWBZone7RBx - {0xBF, 0x96}, // AWBZone7RBy - {0xC0, 0x00}, // AWBZone8LTx - Skin - {0xC1, 0x00}, // AWBZone8LTy - {0xC2, 0x00}, // AWBZone8RBx - {0xC3, 0x00}, // AWBZone8RBy - - {0xFF, 0x94}, // Page - {0x0D, 0x05}, // FinalRGain - {0x0E, 0x00}, // - {0x11, 0x04}, // FinalBGain - {0x12, 0xB0}, - - {0xFF, 0x95}, // Page - {0x00, 0x05}, // StdRGain - {0x01, 0x00}, - {0xFF, 0x94}, // Page - {0xCC, 0x04}, // StdBGain - {0xCD, 0xFF}, - -/*==================================*/ -/* AWB */ -/*==================================*/ - {0xFF, 0x93}, // Page - {0xF4, 0x8B}, // AWBCtrl - {0xF5, 0x01}, // - {0xFF, 0x94}, // Page - {0x00, 0x00}, // LockRatio - {0x03, 0x01}, // MinGrayCnt - {0x04, 0x80}, // MinGrayCnt - {0x15, 0xD4}, // SkinWinCntTh - {0x21, 0x28}, // SkinYTh - {0x22, 0x00}, // SkinHoldHitCnt - {0x23, 0x0F}, // SkinHoldHitCnt - {0x2C, 0x65}, // SkinTop2 - {0x2D, 0x80}, // SkinTop2LS1Ratio - {0x2E, 0x20}, // SkinTop2LS2Ratio - {0x33, 0x10}, // SkinTop2LSHys - {0x34, 0x54}, // SkinLTx - {0x35, 0xBD}, // SkinLTy - {0x36, 0x74}, // SkinLBx - {0x37, 0x9D}, // SkinLBy - {0x39, 0x4F}, // UniCThrY - {0x3E, 0x0C}, // UniCGrayCntThr_0 - {0x3F, 0x80}, // UniCGrayCntThr_1 - {0xC9, 0x0C}, // StdLS_rw_CWF - {0xCE, 0x00}, // AWB_LuxConst1_0 - {0xCF, 0x00}, // AWB_LuxConst1_1 - {0xD0, 0x06}, // AWB_LuxConst1_2 - {0xD1, 0x20}, // AWB_LuxConst1_3 - {0xD2, 0x07}, // AWB_LuxConst2_0 - {0xD3, 0x53}, // AWB_LuxConst2_1 - {0xD4, 0x00}, // AWB_LuxConst2_2 - {0xD5, 0x00}, // AWB_LuxConst2_3 - - {0xDA, 0x00}, // Threshold_indoor - {0xDB, 0x30}, // - {0xDC, 0x01}, // Threshold_outdoor - {0xDD, 0x00}, // - - {0xE6, 0x00}, // AWB_Weight_Genernal_0_Flash - {0xE7, 0x00}, // AWB_Weight_Genernal_1_Cloudy - {0xE8, 0x20}, // AWB_Weight_Genernal_2_D65 - {0xE9, 0x00}, // AWB_Weight_Genernal_3_Fluorescent - {0xEA, 0x20}, // AWB_Weight_Genernal_4_CWF - {0xEB, 0x1A}, // AWB_Weight_Genernal_5_TL84 - {0xEC, 0x1D}, // AWB_Weight_Genernal_6_A - {0xED, 0x00}, // AWB_Weight_Genernal_7_Horizon - {0xEE, 0x00}, // AWB_Weight_Indoor_0_Flash - {0xEF, 0x00}, // AWB_Weight_Indoor_1_Cloudy - {0xF0, 0x00}, // AWB_Weight_Indoor_2_D65 - {0xF1, 0x1A}, // AWB_Weight_Indoor_3_Fluorescent - {0xF2, 0x1A}, // AWB_Weight_Indoor_4_CWF - {0xF3, 0x1A}, // AWB_Weight_Indoor_5_TL84 - {0xF4, 0x00}, // AWB_Weight_Indoor_6_A - {0xF5, 0x18}, // AWB_Weight_Indoor_7_Horizon - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0xFF, 0x96}, // Page - {0xE4, 0x05}, // AWB_unicolorzone - - {0xFF, 0x94}, // Page - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, // - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, // - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, // - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, // - - {0x52, 0x07}, // LSValue0 - {0x53, 0x04}, // Min Rgain - {0x54, 0x10}, // - {0x55, 0x06}, // Max Rgain - {0x56, 0x00}, // - {0x57, 0x02}, // Min Bgain - {0x58, 0x80}, // - {0x59, 0x05}, // Max BGain - {0x5A, 0xF0}, // - - {0x5B, 0x06}, // LSValue1 - {0x5C, 0x04}, // Min Rgain - {0x5D, 0x48}, // - {0x5E, 0x07}, // Max Rgain - {0x5F, 0x40}, // - {0x60, 0x02}, // Min Bgain - {0x61, 0x80}, // - {0x62, 0x05}, // Max Bgain - {0x63, 0xF8}, // - - {0xFF, 0x94}, // Page - {0x02, 0x10}, // AWBConvSpeedSpecial - -/*==================================*/ -/* UR */ -/*==================================*/ - {0xFF, 0xE1}, // Page - {0x9B, 0x22}, //AWBTrim - -/*==================================*/ -/* CCM */ -/*==================================*/ - //D65 - {0xFF, 0x94}, // Page - {0x7B, 0x00}, // D65_CCM_11 - {0x7C, 0x7F}, // D65_CCM_11 - {0x7D, 0xFF}, // D65_CCM_12 - {0x7E, 0xC2}, // D65_CCM_12 - {0x7F, 0xFF}, // D65_CCM_13 - {0x80, 0xFF}, // D65_CCM_13 - {0x81, 0xFF}, // D65_CCM_21 - {0x82, 0xE9}, // D65_CCM_21 - {0x83, 0x00}, // D65_CCM_22 - {0x84, 0x67}, // D65_CCM_22 - {0x85, 0xFF}, // D65_CCM_23 - {0x86, 0xF0}, // D65_CCM_23 - {0x87, 0xFF}, // D65_CCM_31 - {0x88, 0xFE}, // D65_CCM_31 - {0x89, 0xFF}, // D65_CCM_32 - {0x8A, 0xC0}, // D65_CCM_32 - {0x8B, 0x00}, // D65_CCM_33 - {0x8C, 0x82}, // D65_CCM_33 - - -//CWF lgiht - {0x8D, 0x00}, // CWF_CCM_11 - {0x8E, 0x79}, // CWF_CCM_11 - {0x8F, 0xFF}, // CWF_CCM_12 - {0x90, 0xC7}, // CWF_CCM_12 - {0x91, 0xFF}, // CWF_CCM_13 - {0x92, 0xFF}, // CWF_CCM_13 - {0x93, 0xFF}, // CWF_CCM_21 - {0x94, 0xEB}, // CWF_CCM_21 - {0x95, 0x00}, // CWF_CCM_22 - {0x96, 0x63}, // CWF_CCM_22 - {0x97, 0xFF}, // CWF_CCM_23 - {0x98, 0xF1}, // CWF_CCM_23 - {0x99, 0xFF}, // CWF_CCM_31 - {0x9A, 0xFF}, // CWF_CCM_31 - {0x9B, 0xFF}, // CWF_CCM_32 - {0x9C, 0xC6}, // CWF_CCM_32 - {0x9D, 0x00}, // CWF_CCM_33 - {0x9E, 0x7C}, // CWF_CCM_33 - - //A light - {0x9F, 0x00}, // A_CCM_11 - {0xA0, 0x54}, // A_CCM_11 - {0xA1, 0xFF}, // A_CCM_12 - {0xA2, 0xF4}, // A_CCM_12 - {0xA3, 0xFF}, // A_CCM_13 - {0xA4, 0xF8}, // A_CCM_13 - {0xA5, 0xFF}, // A_CCM_21 - {0xA6, 0xFC}, // A_CCM_21 - {0xA7, 0x00}, // A_CCM_22 - {0xA8, 0x5E}, // A_CCM_22 - {0xA9, 0xFF}, // A_CCM_23 - {0xAA, 0xE6}, // A_CCM_23 - {0xAB, 0xFF}, // A_CCM_31 - {0xAC, 0xF1}, // A_CCM_31 - {0xAD, 0xFF}, // A_CCM_32 - {0xAE, 0xD2}, // A_CCM_32 - {0xAF, 0x00}, // A_CCM_33 - {0xB0, 0x7D}, // A_CCM_33 - - //Out door CCM - {0xFF, 0x97}, // Page - {0x24, 0x01}, // CCM LuxThreshold - {0x25, 0x00}, // CCM LuxThreshold - {0xFF, 0x95}, // Page - {0xB3, 0xFF}, // Outdoor CCM On - - {0xFF, 0x96}, // Page - {0xEA, 0x00}, // Outdoor_CCM_11 - {0xEB, 0x72}, // Outdoor_CCM_11 - {0xEC, 0xFF}, // Outdoor_CCM_12 - {0xED, 0xE6}, // Outdoor_CCM_12 - {0xEE, 0xFF}, // Outdoor_CCM_13 - {0xEF, 0xE8}, // Outdoor_CCM_13 - {0xF0, 0xFF}, // Outdoor_CCM_21 - {0xF1, 0xE8}, // Outdoor_CCM_21 - {0xF2, 0x00}, // Outdoor_CCM_22 - {0xF3, 0x6C}, // Outdoor_CCM_22 - {0xF4, 0xFF}, // Outdoor_CCM_23 - {0xF5, 0xEC}, // Outdoor_CCM_23 - {0xF6, 0xFF}, // Outdoor_CCM_31 - {0xF7, 0xF9}, // Outdoor_CCM_31 - {0xF8, 0xFF}, // Outdoor_CCM_32 - {0xF9, 0xD8}, // Outdoor_CCM_32 - {0xFA, 0x00}, // Outdoor_CCM_33 - {0xFB, 0x6F}, // Outdoor_CCM_33 - -/*==================================*/ -/* ADF */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xB2, 0xFF}, // u8FuncCtrl1 - {0xB3, 0xFF}, // u8FuncCtrl2 - {0xB4, 0xFF}, // u8FuncCtrl3 - {0xB5, 0x90}, // Flag - {0xB6, 0x04}, // Flag1 - - {0xBF, 0xFF}, // RgbYcFunc_Normal - {0xBE, 0xFB}, // RgbYcFunc_Dark - -/*==================================*/ -/* ADF BLC */ -/*==================================*/ - {0xC0, 0x04}, // ADF_ThrLevel_BLC - {0xC2, 0x00}, // ADF_Min_BLC - {0xC3, 0x00}, // ADF_Max_BLC - -/*==================================*/ -/* ADF BGT */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x3F, 0x42}, // ADF_ThrLevel_BGT - {0x40, 0x00}, // ADF_Min_BGT - {0x41, 0x00}, // ADF_Max_BGT - -/*==================================*/ -/* ADF CNT */ -/*==================================*/ - {0x42, 0x76}, // ADF_ThrLevel_CNT - {0x43, 0x00}, // ADF_Min_CON - {0x44, 0x00}, // ADF_Max_CON - -/*==================================*/ -/* ADF LSC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xC6, 0x53}, // ADF_ThrLevel_LVLSC - {0xC7, 0xBA}, // ADF_ThrLevel_LSLSC - {0xC8, 0xA0}, // ADF_MinVal_LVLSC_VAL - {0xC9, 0xFF}, // ADF_MaxVal_LVLSC_VAL - - //Min Shading - {0xCA, 0xB0}, // Rgain0 - {0xCB, 0x38}, // Rgain1 - {0xCC, 0x05}, // Rgain2 - {0xCD, 0x02}, // Rgain3 - - {0xCE, 0x98}, // GGain0 - {0xCF, 0x14}, // GGain1 - {0xD0, 0x00}, // GGain2 - {0xD1, 0x00}, // GGain3 - - {0xD2, 0xA8}, // Bgain0 - {0xD3, 0x18}, // Bgain1 - {0xD4, 0x08}, // Bgain2 - {0xD5, 0x04}, // Bgain3 - - //Max Shading - {0xD6, 0xA8}, // Rgain0 - {0xD7, 0x30}, // Rgain1 - {0xD8, 0x08}, // Rgain2 - {0xD9, 0x04}, // Rgain3 - - {0xDA, 0x80}, // Ggain0 - {0xDB, 0x10}, // Ggain1 - {0xDC, 0x00}, // Ggain2 - {0xDD, 0x00}, // Ggain3 - - {0xDE, 0xB0}, // BGain0 - {0xDF, 0x19}, // BGain1 - {0xE0, 0x10}, // BGain2 - {0xE1, 0x0D}, // BGain3 - -/*==================================*/ -/* Gamma */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x46, 0x01}, // Dark Gamma Threshold - {0x7A, 0x00}, // Dark_Gamma_0 - {0x7B, 0x02}, // Dark_Gamma_1 - {0x7C, 0x04}, // Dark_Gamma_2 - {0x7D, 0x08}, // Dark_Gamma_3 - {0x7E, 0x0C}, // Dark_Gamma_4 - {0x7F, 0x10}, // Dark_Gamma_5 - {0x80, 0x18}, // Dark_Gamma_6 - {0x81, 0x20}, // Dark_Gamma_7 - {0x82, 0x28}, // Dark_Gamma_8 - {0x83, 0x30}, // Dark_Gamma_9 - {0x84, 0x40}, // Dark_Gamma_10 - {0x85, 0x60}, // Dark_Gamma_11 - {0x86, 0x80}, // Dark_Gamma_12 - {0x87, 0xA0}, // Dark_Gamma_13 - {0x88, 0xC0}, // Dark_Gamma_14 - {0x89, 0xE0}, // Dark_Gamma_15 - {0x8A, 0xFF}, // Dark_Gamma_16 - - {0x45, 0x61}, // Gamma Threshold - {0x47, 0x00}, // Min_Gamma_0 - {0x48, 0x05}, // Min_Gamma_1 - {0x49, 0x0A}, // Min_Gamma_2 - {0x4A, 0x16}, // Min_Gamma_3 - {0x4B, 0x23}, // Min_Gamma_4 - {0x4C, 0x2E}, // Min_Gamma_5 - {0x4D, 0x42}, // Min_Gamma_6 - {0x4E, 0x56}, // Min_Gamma_7 - {0x4F, 0x67}, // Min_Gamma_8 - {0x50, 0x72}, // Min_Gamma_9 - {0x51, 0x88}, // Min_Gamma_10 - {0x52, 0xAC}, // Min_Gamma_11 - {0x53, 0xC3}, // Min_Gamma_12 - {0x54, 0xD5}, // Min_Gamma_13 - {0x55, 0xE3}, // Min_Gamma_14 - {0x56, 0xF0}, // Min_Gamma_15 - {0x57, 0xFF}, // Min_Gamma_16 - - {0x58, 0x00}, // Max_Gamma_0 - {0x59, 0x01}, // Max_Gamma_1 - {0x5A, 0x05}, // Max_Gamma_2 - {0x5B, 0x15}, // Max_Gamma_3 - {0x5C, 0x22}, // Max_Gamma_4 - {0x5D, 0x2C}, // Max_Gamma_5 - {0x5E, 0x40}, // Max_Gamma_6 - {0x5F, 0x51}, // Max_Gamma_7 - {0x60, 0x60}, // Max_Gamma_8 - {0x61, 0x6B}, // Max_Gamma_9 - {0x62, 0x81}, // Max_Gamma_10 - {0x63, 0xA2}, // Max_Gamma_11 - {0x64, 0xBC}, // Max_Gamma_12 - {0x65, 0xD1}, // Max_Gamma_13 - {0x66, 0xE3}, // Max_Gamma_14 - {0x67, 0xF1}, // Max_Gamma_15 - {0x68, 0xFF}, // Max_Gamma_16 - - //Outdoor - {0x69, 0x00}, // gAdf_u8OutGMAVal_0 - {0x6A, 0x03}, // gAdf_u8OutGMAVal_1 - {0x6B, 0x08}, // gAdf_u8OutGMAVal_2 - {0x6C, 0x15}, // gAdf_u8OutGMAVal_3 - {0x6D, 0x26}, // gAdf_u8OutGMAVal_4 - {0x6E, 0x33}, // gAdf_u8OutGMAVal_5 - {0x6F, 0x48}, // gAdf_u8OutGMAVal_6 - {0x70, 0x58}, // gAdf_u8OutGMAVal_7 - {0x71, 0x68}, // gAdf_u8OutGMAVal_8 - {0x72, 0x74}, // gAdf_u8OutGMAVal_9 - {0x73, 0x88}, // gAdf_u8OutGMAVal_10 - {0x74, 0xA4}, // gAdf_u8OutGMAVal_11 - {0x75, 0xBA}, // gAdf_u8OutGMAVal_12 - {0x76, 0xCE}, // gAdf_u8OutGMAVal_13 - {0x77, 0xE0}, // gAdf_u8OutGMAVal_14 - {0x78, 0xF0}, // gAdf_u8OutGMAVal_15 - {0x79, 0xFF}, // gAdf_u8OutGMAVal_16 - -/*==================================*/ -/* ADF GDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE3, 0xA4}, // ADF_ThrLevel_GDC - {0xE4, 0x50}, // ADF_STVAL_GDC_TH1 - {0xE5, 0x70}, // ADF_STVAL_GDC_TH2 - {0xE6, 0x40}, // ADF_Min_GDC_Th1 - {0xE7, 0x60}, // ADF_Min_GDC_Th2 - {0xE8, 0x30}, // ADF_Max_GDC_Th1 - {0xE9, 0x40}, // ADF_Max_GDC_Th2 - {0xEA, 0x0E}, // ADF_EndVal_GDC_TH1 - {0xEB, 0x30}, // ADF_EndVal_GDC_TH2 - - {0xEC, 0x84}, // ADF_ThrLevel_GDC_SASP - {0xED, 0x00}, // ADF_MinVal_GDC_SASP - {0xEE, 0x00}, // ADF_MaxVal_GDC_SASP - -/*==================================*/ -/* ADF NSF */ -/*==================================*/ - {0xEF, 0xA5}, // ADF_ThrLevel_NSF - {0xF0, 0x30}, // ADF_STVal_NSF_TH1 - {0xF1, 0x28}, // ADF_STVal_NSF_TH2 - {0xF2, 0x16}, // ADF_MinVal_NSF_TH1 - {0xF3, 0x18}, // ADF_MinVal_NSF_TH2 - {0xF4, 0x10}, // ADF_MaxVal_NSF_TH1 - {0xF5, 0x18}, // ADF_MaxVal_NSF_TH2 - {0xF6, 0x0D}, // ADF_EndVal_NSF_TH1 - {0xF7, 0x10}, // ADF_EndVal_NSF_TH2 - - {0xF8, 0xED}, // ADF_ThrNoiseLevel_NSF - {0xF9, 0x10}, // ADF_NSF_Noisegain - {0xFA, 0xBA}, // ADF_ThrLevel_NSF_SASP - {0xFB, 0x00}, // ADF_MinVal_NSF_SASP - {0xFC, 0xF8}, // ADF_MaxVal_NSF_SASP - - {0xFF, 0xE0}, // Page - {0xC2, 0x00}, // NSFTh3 - {0xC3, 0x10}, // NSFTh4 - {0xC7, 0x38}, // ADF_NSFSaThrd1 - {0xC8, 0x70}, // ADF_NSFSaThrd2 - {0xC9, 0x08}, // ADF_NSFNoiseThrd1 - {0xCA, 0x14}, // ADF_NSFNoiseThrd2 - {0xCB, 0x08}, // ADF_NSFNoiseThrd3 - -/*==================================*/ -/* ADF EDE */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xFD, 0xA9}, // ADF_EdgGain_Lux - {0xFF, 0x96}, // Page - {0x00, 0x00}, // ADF_MinVal_EdgGain - {0x01, 0x00}, // ADF_MaxVal_EdgGain - - {0x02, 0xCB}, // ADF_ThrLevel_EDEOption - {0x03, 0x30}, // ADF_Indoor_EDEOption - {0x04, 0x30}, // ADF_Outdoor_EDEOption - {0x05, 0x30}, // ADF_Indoor_EDESmEdgThrd - {0x06, 0x16}, // ADF_Outdoor_EDESmEdgThrd - - {0x07, 0x53}, // ADF_ThrLevel_EDE_S1L - {0x08, 0x76}, // ADF_ThrLevel_EDE_S1H - {0x09, 0x08}, // ADF_EDE_STVal_SL1 - {0x0A, 0x09}, // ADF_EDE_Mid1Val_SL1 - {0x0B, 0x09}, // ADF_EDE_Mid2Val_SL1 - {0x0C, 0x0C}, // ADF_EDE_EndVal_SL1 - - {0x0D, 0xA3}, // ADF_ThrLevel_Edge - {0x0E, 0x06}, // ADF_Min_Coring - {0x10, 0x0A}, // ADF_Min_Edge_Slope2 - {0x12, 0x04}, // ADF_Min_Edge_SmallOffset - {0x14, 0x33}, // ADF_Min_Edge_Slope - - {0x0F, 0x04}, // ADF_Max_Coring - {0x11, 0x0A}, // ADF_Max_Edge_Slope2 - {0x13, 0x04}, // ADF_Max_Edge_SmallOffset - {0x15, 0x34}, // ADF_Max_Edge_Slope - - {0x16, 0x87}, // ADF_ThrLevel_EDE_RB - {0x17, 0x03}, // MinVal_EDE_RBTH - {0x18, 0x33}, // MaxVal_EDE_RBTH - {0x19, 0x98}, // ThrLevel_EDE_SASP - {0x1A, 0xF4}, // MinVal_EDE_SASP - {0x1B, 0xF4}, // MaxVal_EDE_SASP - - {0x1C, 0x51}, // ADF_DEDE_TreLux1 - {0x1D, 0x76}, // ADF_DEDE_TreLux2 - {0x1E, 0x00}, // ADF_DEDE_STVal_XP1 - {0x1F, 0x68}, // - {0x20, 0x00}, // ADF_DEDE_Mid1Val_XP1 - {0x21, 0x28}, // - {0x22, 0x00}, // ADF_DEDE_Mid2Val_XP1 - {0x23, 0x28}, // - {0x24, 0x00}, // ADF_DEDE_EndVal_XP1 - {0x25, 0x20}, // - -/*==================================*/ -/* ADF CKL */ -/*==================================*/ - {0x26, 0xED}, // ADF_ThrLevel_CKL - - // ADF - CKLTh1 - {0x27, 0x94}, // ADF_ThrLevel_CKLTh1 - {0x28, 0x11}, // ADF_MinVal_CKL_TH1 - {0x29, 0x13}, // ADF_MidVal_CKL_TH1 - {0x2A, 0x13}, // ADF_MaxVal_CKL_TH1 - - // ADF - CKLTh2 - {0x2B, 0x06}, // ADF_Min_CKL_TH2 - {0x2C, 0x08}, // ADF_Max_CKL_TH2 - - // ADF - CNFTh3, 4 - {0x2F, 0x04}, // ADF_CKL_TH3_at_Dark - {0x32, 0x00}, // ADF_CKL_TH4_at_Dark - - {0x30, 0x02}, // ADF_CKL_TH3_at_Normal - {0x33, 0x14}, // ADF_CKL_TH4_at_Normal - - {0x31, 0x00}, // ADF_CKL_TH3_at_Bright - {0x34, 0x00}, // ADF_CKL_TH4_at_Bright - - {0x2D, 0x08}, // ADF_Min_CKL_TH5 - {0x2E, 0x0B}, // ADF_Max_CKL_TH5 - -/*==================================*/ -/* ADF CLB */ -/*==================================*/ - {0x38, 0x54}, // ADF_ThrLevel_CLB - - {0x39, 0x00}, // ADF_Min_CLBTh_TH1 - {0x3A, 0x40}, // ADF_Min_CLB_Cb - {0x3B, 0x40}, // ADF_Min_CLB_Cr - - {0x3C, 0x10}, // ADF_Max_CLBTh_TH1 - {0x3D, 0x50}, // ADF_Max_CLB_Cb - {0x3E, 0x50}, // ADF_Max_CLB_Cr - - {0xFF, 0xE1}, // Page - {0x4D, 0x0C}, // CLB_Sec - -/*==================================*/ -/* Suppression */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0x35, 0x42}, // ADF_ThrLevel_SUP - {0x36, 0x70}, // Min_suppression - {0x37, 0x80}, // Max_suppression - -/*==================================*/ -/* CDC */ -/*==================================*/ - {0xFF, 0x95}, // Page - {0xE2, 0x03}, // Th_CDC - {0xFF, 0xE0}, // Page - {0x74, 0x00}, // YOff0_DDC - -/*==================================*/ -/* Saturation */ -/*==================================*/ - {0xFF, 0x96}, // Page - {0xA3, 0x40}, // Color Saturation - - // BGT2 - {0xA5, 0x00}, // u8ADF_BaseBGTAWBZone1 - {0xA8, 0x00}, // u8ADF_BaseBGTAWBZone2 - {0xA6, 0x00}, // BGTLux1 - {0xA9, 0x00}, // BGTLux2 - {0xA7, 0x00}, // Value1 - {0xAA, 0x00}, // Value2 - - // SAT for Gamut - {0xAC, 0x02}, // SATZone - {0xAD, 0x06}, // SATLux1 - {0xAE, 0x00}, // SATValue - - {0xFF, 0x95}, // ADF_refresh - {0xBD, 0x01}, // - -/*===================================*/ -/* Profile Register */ -/*===================================*/ - // VGA_PR - {0xFF, 0x98}, // Page - {0x45, 0x00}, // SensorCtrl_Addr - {0x46, 0x0D}, //SensorMode_Addr - {0x47, 0x00}, // SensorTestMode_Addr - {0x48, 0x00}, // XSubSmplEn_Addr - {0x49, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x4A, 0x02}, // PLL_P - {0x4B, 0x1F}, // PLL_M -#else - {0x4A, 0x01}, // PLL_P - {0x4B, 0x15}, // PLL_M -#endif - {0x4C, 0x00}, // PLL_S - {0x4D, 0x00}, // PLL_Ctrl - {0x4E, 0x01}, // scr_clk_sel - {0x4F, 0x00}, // output_pad_status - {0x50, 0x1F}, // ablk_ctrl_10 - {0x51, 0xFF}, // BayerFunc - {0x52, 0xFF}, // RGBFunc - {0x53, 0x02}, // SCLCtrl - {0x54, 0x00}, //SCLHorScale - {0x55, 0x71}, // - {0x56, 0x00}, //SCLVerScale - {0x57, 0x7B}, // - {0x58, 0x00}, // SCLCropStartX - {0x59, 0x00}, // - {0x5A, 0x00}, // SCLCropStartY - {0x5B, 0x00}, // - {0x5C, 0x00}, //SCLCropEndX - {0x5D, 0xB0}, // - {0x5E, 0x00}, //SCLCropEndY - {0x5F, 0x90}, // - {0x60, 0x01}, // OutForm - {0x61, 0x0D}, // OutCtrl - {0x62, 0x04}, // AEWinStartX - {0x63, 0x04}, // AEWinStartY - {0x64, 0x66}, // MergedWinWidth - {0x65, 0x5C}, // MergedWinHeight - {0x66, 0x22}, // AWBTrim_Addr - {0x67, 0x38}, // AWBCTWinAx_Addr - {0x68, 0x20}, // AWBCTWinAy_Addr - {0x69, 0x92}, // AWBCTWinBx_Addr - {0x6A, 0x73}, // AWBCTWinBy_Addr - {0x6B, 0x03}, // AFCFrmaeLength - {0x6C, 0x80}, // - - // SXGA_PR - {0x1D, 0x00}, // SensorCtrl_Addr - {0x1E, 0x0D}, // SensorMode_Addr - {0x1F, 0x00}, // SensorTestMode_Addr - {0x20, 0x00}, // XSubSmplEn_Addr - {0x21, 0x00}, // XSubSmplEn_Addr -#if defined(MIPI_CLK_277MHZ) - {0x22, 0x02}, // PLL_P - {0x23, 0x1F}, // PLL_M -#else - {0x22, 0x01}, // PLL_P - {0x23, 0x15}, // PLL_M -#endif - {0x24, 0x00}, // PLL_S - {0x25, 0x00}, // PLL_Ctrl - {0x26, 0x01}, // scr_clk_sel - {0x27, 0x00}, // output_pad_status - {0x28, 0x3F}, // ablk_ctrl_10 - {0x29, 0xFF}, // BayerFunc - {0x2A, 0xFF}, // RGBFunc - {0x2B, 0x00}, // SCLCtrl - {0x2C, 0x03}, // SCLHorScale - {0x2D, 0xFF}, // - {0x2E, 0x03}, // SCLVerScale - {0x2F, 0xFF}, // - {0x30, 0x00}, // SCLCropStartX - {0x31, 0x00}, // - {0x32, 0x00}, // SCLCropStartY - {0x33, 0x00}, // - {0x34, 0x05}, // SCLCropEndX - {0x35, 0x00}, // - {0x36, 0x04}, // SCLCropEndY - {0x37, 0x00}, // - {0x38, 0x01}, // OutForm - {0x39, 0x0D}, // OutCtrl - {0x3A, 0x04}, // AEWinStartX - {0x3B, 0x04}, // AEWinStartY - {0x3C, 0x66}, // MergedWinWidth - {0x3D, 0x5C}, // MergedWinHeight - {0x3E, 0x22}, // AWBTrim_Addr - {0x3F, 0x38}, // AWBCTWinAx_Addr - {0x40, 0x20}, // AWBCTWinAy_Addr - {0x41, 0x92}, // AWBCTWinBx_Addr - {0x42, 0x73}, // AWBCTWinBy_Addr - {0x43, 0x05}, // AFCFrmaeLength - {0x44, 0x9D}, // - - {0xFF, 0x93}, - {0x05, 0x00}, // LastRecvCmd - {0xFF, 0xE6}, - {0x10, 0x11}, // Preview Command - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream stop - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 800x600) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_800_600[]= { - -// 80{0x60, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x16}, // Wait 25 -#else - {0xFE, 0x64}, // Wait 100 -#endif - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_MACH_J3LTE_USA_SPR)|| defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) - {0xFE, 0x32}, // Wait 50 - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x06}, - {0x15, 0x40}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x03}, // SCLCropEndX - {0xC8, 0x20}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x58}, - - {0xFE, 0x16}, // Wait 25 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -#endif - - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 704x576) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_704_576[] = { - -// 704x576_PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0xC3}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0xEC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0xC0}, - {0xC9, 0x02}, // SCLCropEndY - {0xCA, 0x40}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 640x480) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_640_480[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x01}, // SCLVerScale - {0xC2, 0x99}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 352x288) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_352_288[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0xC0}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xE1}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xF5}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x60}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0x20}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 320x240) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_320_240[] = { - // 320x240 Size - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x02}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0xCC}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0xCC}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x01}, // SCLCropEndX - {0xC8, 0x40}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0xF0}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_PREVIEW (Size : 176x144) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_preview_176_144[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x01}, - {0x15, 0x60}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x00}, // SCLHorScale - {0xC0, 0x70}, - {0xC1, 0x00}, // SCLVerScale - {0xC2, 0x7A}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x00}, // SCLCropEndX - {0xC8, 0xB0}, - {0xC9, 0x00}, // SCLCropEndY - {0xCA, 0x90}, - - {0xFE, 0x64}, // Wait 100 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - -/*==============================================*/ -/* CAMERA_SNAPSHOT (Size : 1600x1200) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_1600_1200[] = { - - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x0C}, - {0x15, 0x80}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x00}, // SCLCtrl - {0xBF, 0x03}, // SCLHorScale - {0xC0, 0xFF}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0xFF}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x05}, // SCLCropEndX - {0xC8, 0x00}, - {0xC9, 0x04}, // SCLCropEndY - {0xCA, 0x00}, - - {0xFE, 0x96}, // Wait 150 - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_STREAM_STOP */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_stream_stop[]= { - - {0xFF, 0xE4}, - {0x04, 0x00}, -}; - - -/*==============================================*/ -/* CAMERA_I2C_CHECK - for ESD */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_DTP_On[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0x00}, // BayerFunc - {0xBA, 0x28}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x05}, // TPG Gamma - - {0xFE, 0x64}, // Wait 100ms -}; - -struct msm_camera_i2c_reg_conf db8221a_DTP_Off[] = { - {0xFF, 0x98}, // Page mode - {0xB9, 0xFF}, // BayerFunc - {0xBA, 0xFF}, // RGBYcFunc - {0xFF, 0xE0}, // Page mode - {0x02, 0x00}, // TPG Disable - - {0xFE, 0x64}, // Wait 100 -}; - - -/*==============================================*/ -/* CAMERA_Flip_X */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_X_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x01}, // X-Flip - -}; - - -/*==============================================*/ -/* CAMERA_Flip_Y */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_Capture_Y_Flip[] = { - - {0xFF, 0x98}, - {0xDF, 0x02}, // Y-Flip - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m4[] = { - -// Brightness -4 - {0xFF, 0x98}, // Page mode - {0xBC, 0xB8}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_2 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m3[] = { - -// Brightness -3 - {0xFF, 0x98}, // Page mode - {0xBC, 0xCA}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_3 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m2[] = { - -// Brightness -2 - {0xFF, 0x98}, // Page mode - {0xBC, 0xDC}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_4 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_m1[] = { - -// Brightness -1 - {0xFF, 0x98}, // Page mode - {0xBC, 0xEE}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_5 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_default[] = { - -// Brightness 0 - {0xFF, 0x98}, // Page mode - {0xBC, 0x00}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_6 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p1[] = { - -// Brightness +1 - {0xFF, 0x98}, // Page mode - {0xBC, 0x12}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_7 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p2[] = { - -// Brightness +2 - {0xFF, 0x98}, // Page mode - {0xBC, 0x24}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_8 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p3[] = { - -// Brightness +3 - {0xFF, 0x98}, // Page mode - {0xBC, 0x36}, // Brightness - -}; - - -/*==============================================*/ -/* CAMERA_BRIGHTNESS_9 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_bright_p4[] = { - -// Brightness +4 - {0xFF, 0x98}, // Page mode - {0xBC, 0x48}, // Brightness - -}; - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (1/9) M4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m4[] = { - -// Contrast -4 - {0xFF, 0x98}, // Page mode - {0xBD, 0xA0}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (2/9) M3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m3[] = { - -// Contrast -3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x98}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (3/9) M2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m2[] = { - -// Contrast -2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x90}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (4/9) M1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_m1[] = { - -// Contrast -1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x88}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (5/9) Default */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_default[] = { - -// Contrast 0 - {0xFF, 0x98}, // Page mode - {0xBD, 0x80}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (6/9) P1 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p1[] = { - -// Contrast +1 - {0xFF, 0x98}, // Page mode - {0xBD, 0x78}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (7/9) P2 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p2[] = { - - // Contrast +2 - {0xFF, 0x98}, // Page mode - {0xBD, 0x70}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (8/9) P3 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p3[] = { - -// Contrast +3 - {0xFF, 0x98}, // Page mode - {0xBD, 0x68}, // Contrast - -}; - - -/*==============================================*/ -/* CAMERA_CONTRAST_1 (9/9) P4 */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_contrast_p4[] = { - -// Contrast +4 - {0xFF, 0x98}, // Page mode - {0xBD, 0x60}, // Contrast - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_EFFECCT_NORMAL */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_none[] = { - - {0xFF, 0x98}, - {0xCB, 0x00}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_NEGATIVE */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_negative[] = { - - {0xFF, 0x98}, - {0xCB, 0x20}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_GRAY */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_gray[] = { - - {0xFF, 0x98}, - {0xCB, 0x08}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x00}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*==============================================*/ -/* CAMERA_EFFECT_SEPIA */ -/*==============================================*/ -#if defined(CONFIG_MACH_J3LTE_USA_SPR) || defined(CONFIG_MACH_J3LTE_USA_VZW) || defined(CONFIG_MACH_J3LTE_USA_USC) -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 - {0xCD, 0x53}, // PEDData2 - {0xCE, 0x98}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#else -struct msm_camera_i2c_reg_conf db8221a_effect_sepia[] = { - - {0xFF, 0x98}, - {0xCC, 0x00}, // PEDData1 -#if defined(CONFIG_SEC_GTES_PROJECT) - {0xCD, 0x67}, // PEDData2 -#else - {0xCD, 0x71}, // PEDData2 -#endif - {0xCE, 0x9A}, // PEDData3 - {0xCB, 0x18}, // SPECtrl - -}; -#endif -/*==============================================*/ -/* CAMERA_EFFECT_AQUA */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_effect_aqua[] = { - - {0xFF, 0x98}, - {0xCB, 0x18}, // SPECtrl - {0xCC, 0x00}, // PEDData1 - {0xCD, 0xAB}, // PEDData2 - {0xCE, 0x00}, // PEDData3 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - - -/*==============================================*/ -/* CAMERA_AWB_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_auto[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x30}, - {0xDC, 0x01}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x18}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0x28}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x80}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xB8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xE8}, - - {0x5B, 0x06}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_DayLight */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_daylight[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0x48}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x48}, - {0x4E, 0x04}, // Min Bgain - {0x4F, 0x80}, - {0x50, 0x04}, // Max BGain - {0x51, 0x80}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_CLOUDY (í린날) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_cloudy[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x20}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x05}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x06}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x03}, // Min Bgain - {0x4F, 0xF8}, - {0x50, 0x04}, // Max BGain - {0x51, 0x10}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_FLUORESCENT (형광등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_fluorescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x20}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x00}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x04}, // Min Rgain - {0x4B, 0xF8}, - {0x4C, 0x05}, // Max Rgain - {0x4D, 0x10}, - {0x4E, 0x05}, // Min Bgain - {0x4F, 0xA8}, - {0x50, 0x05}, // Max BGain - {0x51, 0xC0}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*==============================================*/ -/* CAMERA_AWB_INCA (백열등) */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_wb_incandescent[] = { - - {0xFF, 0x94}, - {0xDA, 0x00}, // Indoor Lux Threshold - {0xDB, 0x00}, - {0xDC, 0x00}, // Outdoor Lux Threshold - {0xDD, 0x00}, - - {0xFF, 0x94}, - {0xF6, 0x00}, // AWB_Weight_Outdoor_0_Flash - {0xF7, 0x00}, // AWB_Weight_Outdoor_1_Cloudy - {0xF8, 0x00}, // AWB_Weight_Outdoor_2_D65 - {0xF9, 0x00}, // AWB_Weight_Outdoor_3_Fluorescent - {0xFA, 0x00}, // AWB_Weight_Outdoor_4_CWF - {0xFB, 0x00}, // AWB_Weight_Outdoor_5_TL84 - {0xFC, 0x20}, // AWB_Weight_Outdoor_6_A - {0xFD, 0x00}, // AWB_Weight_Outdoor_7_Horizon - - {0x4A, 0x03}, // Min Rgain - {0x4B, 0xD8}, - {0x4C, 0x03}, // Max Rgain - {0x4D, 0xF0}, - {0x4E, 0x06}, // Min Bgain - {0x4F, 0x5F}, - {0x50, 0x06}, // Max BGain - {0x51, 0x77}, - - {0x5B, 0x0F}, // LSValue1 - -}; - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_FPS_AUTO */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_auto_fps[] = { - - {0xFF, 0x93}, - {0x07, 0x01}, // AEMODE - {0x7E, 0x03}, // Min Frame High - {0x7F, 0x21}, // Min Frame Low - - {0x82, 0x0F}, // 60Hz Max - {0x83, 0x0A}, // 60Hz 3 Lut - {0x84, 0x08}, // 60Hz 2 Lut - {0x85, 0x08}, // 60Hz 1 Lut - {0x86, 0x0C}, // 50Hz Max - {0x87, 0x08}, // 50Hz 3 Lut - {0x88, 0x06}, // 50Hz 2 Lut - {0x89, 0x06}, // 50Hz 1 Lut - {0x8A, 0x05}, // 60Hz Max Frame High -#if defined(MIPI_CLK_277MHZ) - {0x8B, 0x26}, // 60Hz Max Frame Low - {0x8C, 0x05}, // 50Hz Max Frame High - {0x8D, 0x26}, // 50Hz Max Frame Low -#else - {0x8B, 0x04}, // 60Hz Max Frame Low - {0x8C, 0x04}, // 50Hz Max Frame High - {0x8D, 0xF4}, // 50Hz Max Frame Low -#endif - - {0x8E, 0x30}, // LuxLevel_Y3 - {0x8F, 0x20}, // LuxLevel_Y2 - {0x90, 0x02}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_CAMCORDER */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_24fps_Camcoder[] = { - -// 64{0x48, 0x0_}PR - {0xFF, 0xE4}, - {0x04, 0x00}, // Stream off - - {0xFF, 0xE4}, - {0x14, 0x05}, - {0x15, 0x00}, // MIPI_WORD_COUNT - - {0xFF, 0x98}, - {0xBE, 0x02}, // SCLCtrl - {0xBF, 0x01}, // SCLHorScale - {0xC0, 0x99}, - {0xC1, 0x03}, // SCLVerScale - {0xC2, 0x33}, - {0xC3, 0x00}, // SCLCropStartX - {0xC4, 0x00}, - {0xC5, 0x00}, // SCLCropStartY - {0xC6, 0x00}, - {0xC7, 0x02}, // SCLCropEndX - {0xC8, 0x80}, - {0xC9, 0x01}, // SCLCropEndY - {0xCA, 0xE0}, - - {0xEA, 0x00}, // HorSubsampling - {0xEB, 0x01}, // VerSubsampling - - -// Fixed Frame - {0xFF, 0x93}, - {0x07, 0x02}, // AEMODE - {0x4A, 0x00}, // LuxTimeTB_0 - {0x4B, 0x80}, // LuxTimeTB_0 - {0x4C, 0x00}, // LuxTimeTB_1 - {0x4D, 0xD0}, // LuxTimeTB_1 - {0x4E, 0x01}, // LuxTimeTB_2 - {0x4F, 0x00}, // LuxTimeTB_2 - {0x50, 0x01}, // LuxTimeTB_3 - {0x51, 0x80}, // LuxTimeTB_3 - {0x79, 0xC0}, // Gain Max - {0x7E, 0x09}, // Min Frame High - {0x7F, 0x61}, // Min Frame Low - - {0x72, 0x0D}, // Sensor clock -#if defined(MIPI_CLK_277MHZ) - {0x73, 0x8D}, // -#else - {0x73, 0xF8}, // -#endif - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - - {0x18, 0x01}, // AESpeed - - {0x1B, 0x08}, //Analog gain Max - - - {0x82, 0x04}, // 60Hz Max - {0x83, 0x04}, // 60Hz 3 Lut - {0x84, 0x04}, // 60Hz 2 Lut - {0x85, 0x04}, // 60Hz 1 Lut - {0x86, 0x03}, // 50Hz Max - {0x87, 0x03}, // 50Hz 3 Lut - {0x88, 0x03}, // 50Hz 2 Lut - {0x89, 0x03}, // 50Hz 1 Lut -#if defined(MIPI_CLK_277MHZ) - {0x8A, 0x03}, // 60Hz Max Frame High - {0x8B, 0x0D}, // 60Hz Max Frame Low - {0x8C, 0x03}, // 50Hz Max Frame High - {0x8D, 0x34}, // 50Hz Max Frame Low -#else - {0x8A, 0x02}, // 60Hz Max Frame High - {0x8B, 0xF3}, // 60Hz Max Frame Low - {0x8C, 0x02}, // 50Hz Max Frame High - {0x8D, 0xD5}, // 50Hz Max Frame Low -#endif - {0x8E, 0x19}, // LuxLevel_Y3 - {0x8F, 0x08}, // LuxLevel_Y2 - {0x90, 0x01}, // LuxLevel_Y1 - - {0x08, 0x3D}, // AECTRL - - {0xFF, 0xE4}, - {0x04, 0x01}, // Stream on - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_50Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_50Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x05}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x4B}, - {0x1F, 0x14}, -#else - {0x1E, 0x74}, - {0x1F, 0x7C}, -#endif - {0x08, 0x3D}, // 50Hz - -}; - - -/*==============================================*/ -/* CAMERA_ANTI_BANDING_60Hz */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_anti_banding_flicker_60Hz[]= { - - {0xFF, 0x93}, - {0x1C, 0x00}, - {0x1D, 0x04}, -#if defined(MIPI_CLK_277MHZ) - {0x1E, 0x69}, - {0x1F, 0x3B}, -#else - {0x1E, 0x8B}, - {0x1F, 0xBC}, -#endif - {0x08, 0x3F}, // 60Hz - -}; - - - -/*-------------------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------------------*/ - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_matrix[] = { - -// AE : Matrix - {0xFF, 0x93}, - {0x0B, 0x88}, // Weight_0 - {0x0C, 0x88}, // Weight_1 - {0x0D, 0x88}, // Weight_2 - {0x0E, 0x88}, // Weight_3 - {0x0F, 0x88}, // Weight_4 - {0x10, 0x88}, // Weight_5 - {0x11, 0x88}, // Weight_6 - {0x12, 0x88}, // Weight_7 - {0x13, 0x88}, // Weight_8 - {0x14, 0x88}, // Weight_9 - {0x15, 0x88}, // Weight_10 - {0x16, 0x88}, // Weight_11 - {0x17, 0x08}, // Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_center[] = { - -// AE : Center - {0xFF, 0x93}, - {0x0B, 0x11}, //Weight_0 - {0x0C, 0x11}, //Weight_1 - {0x0D, 0x11}, //Weight_2 - {0x0E, 0xC8}, //Weight_3 - {0x0F, 0x18}, //Weight_4 - {0x10, 0xC1}, //Weight_5 - {0x11, 0xCF}, //Weight_6 - {0x12, 0x11}, //Weight_7 - {0x13, 0xC8}, //Weight_8 - {0x14, 0x18}, //Weight_9 - {0x15, 0x11}, //Weight_10 - {0x16, 0x11}, //Weight_11 - {0x17, 0x01}, //Weight_12 - -}; - - -/*==============================================*/ -/* CAMERA_METERING_MATRIX */ -/*==============================================*/ - -struct msm_camera_i2c_reg_conf db8221a_metering_spot[] = { - -// AE : Spot - {0xFF, 0x93}, - {0x0B, 0x00}, //Weight_0 - {0x0C, 0x00}, //Weight_1 - {0x0D, 0x00}, //Weight_2 - {0x0E, 0x11}, //Weight_3 - {0x0F, 0x01}, //Weight_4 - {0x10, 0x10}, //Weight_5 - {0x11, 0x1F}, //Weight_6 - {0x12, 0x00}, //Weight_7 - {0x13, 0x11}, //Weight_8 - {0x14, 0x01}, //Weight_9 - {0x15, 0x00}, //Weight_10 - {0x16, 0x00}, //Weight_11 - {0x17, 0x00}, //Weight_12 - -}; - -#endif /* _DB8221A_REGS_H_ */ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/Makefile deleted file mode 100644 index 67a664341baf..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -obj-$(CONFIG_MSM_EEPROM) += msm_eeprom.o -obj-$(CONFIG_MSM_OTP) += msm_otp.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.c deleted file mode 100644 index 3f22f4af5fe3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.c +++ /dev/null @@ -1,1758 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#include "msm_eeprom.h" - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#if defined(CONFIG_SEC_XCOVER3_PROJECT) -#define EEPROM_CAM_PIN_USE -#endif - -#if defined(CONFIG_SEC_A8_PROJECT) || defined(CONFIG_SEC_A7X_PROJECT) || \ - defined(CONFIG_SEC_A5X_PROJECT) || defined(CONFIG_SEC_J7_PROJECT) || defined(CONFIG_SEC_J5X_PROJECT) -#define EEPROM_QUP_I2C -#define MAX_READ_SIZE 3824 -#endif - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -struct msm_eeprom_ctrl_t *g_ectrl[MAX_CAMERAS]; - -void *msm_get_eeprom_data_base(int id, uint32_t *size) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - e_ctrl = g_ectrl[id]; - if (!e_ctrl || !size) - return NULL; - - *size = e_ctrl->cal_data.num_data; - return e_ctrl->cal_data.mapdata; -} - -/** - * msm_eeprom_parse_memory_map() - parse memory map in device node - * @of: device node - * @str: id string - * @data: memory block for output - * - * This functions parses @of to fill @data. It allocates map itself, parses - * the @of node, calculate total data length, and allocates required buffer. - * It only fills the map, but does not perform actual reading. - */ -static int msm_eeprom_parse_memory_map(struct device_node *of, const char *str, - struct msm_eeprom_memory_block_t *data) -{ - int i, rc = 0; - char property[PROPERTY_MAXSIZE]; - uint32_t count = 6; - struct msm_eeprom_memory_map_t *map; - uint32_t total_size = 0; - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-num-blocks", str); - rc = of_property_read_u32(of, property, &data->num_map); - CDBG("%s: %s %d\n", __func__, property, data->num_map); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-page%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-poll%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,%s-mem%d", str, i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - - CDBG("%s num_bytes %d\n", __func__, data->num_data); - - // if total-size is defined at dtsi file. - // set num_data as total-size - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - CDBG("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - CDBG("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - - -#if defined(CONFIG_SEC_J5X_PROJECT) -struct msm_eeprom_crc_check crc_data[EEPROM_CRC_DATA_BLOCKS_NUM] = -{ - [0] = { .data_addr = 0xFC, .data_size = 4, - .check_range_start = 0x00, - .check_range_end = 0x5F, - }, - - [1] = { .data_addr = 0x8FC, .data_size = 4, - .check_range_start = 0x100, - .check_range_end = 0x8AF, - }, - - [2] = { .data_addr = 0x9FC, .data_size = 4, - .check_range_start = 0x900, - .check_range_end = 0x91F, - }, - - [3] = { .data_addr = 0x11FC, .data_size = 4, - .check_range_start = 0xA00, - .check_range_end = 0x10FF, - } -}; - -/** -* format eeprom data for CRC check -*/ -static int format_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int i = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - - block->num_map = EEPROM_CRC_DATA_BLOCKS_NUM*2; - - for( i=0; imap, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - int j; - struct msm_eeprom_memory_map_t *emap = block->map; - uint8_t *memptr = block->mapdata; -#ifdef EEPROM_QUP_I2C - uint32_t size = 0; -#endif - - pr_err("%s Enter \n", __func__); - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].page.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].page.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), emap[j].page.addr, - emap[j].page.data, emap[j].page.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].page.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].page.delay); - if (rc < 0) { - pr_err("%s: page write failed\n", __func__); - return rc; - } - } - - if (emap[j].poll.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].poll.addr_t; - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_poll( - &(e_ctrl->i2c_client), emap[j].poll.addr, - emap[j].poll.data, emap[j].poll.data_t); - pr_err("%s %d \n", __func__, __LINE__); - msleep(emap[j].poll.delay); - pr_err("%s %d delay = %d \n", __func__, __LINE__, emap[j].poll.delay); - if (rc < 0) { - pr_err("%s: poll failed\n", __func__); - return rc; - } - } - - if (emap[j].mem.valid_size) { - e_ctrl->i2c_client.addr_type = emap[j].mem.addr_t; - -#ifdef EEPROM_QUP_I2C - /* In A8 Project, EEPROM uses QUP I2C, QUP supports 3825bytes I2C read at a time, - Here 4608Bytes will be read from EEPROM, So 4608Bytes are divided into two parts, - 3824 bytes and 784 bytes. */ - if(emap[j].mem.valid_size > MAX_READ_SIZE) - { - memptr = block->mapdata + emap[j].mem.addr; - size = MAX_READ_SIZE; - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)emap[j].mem.addr, (uint32_t)memptr, size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - - size = emap[j].mem.valid_size - MAX_READ_SIZE; - memptr += MAX_READ_SIZE; - - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)(emap[j].mem.addr + MAX_READ_SIZE), (uint32_t)memptr, size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client),(emap[j].mem.addr + MAX_READ_SIZE) , - memptr, size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += size; - } - else - { - memptr = block->mapdata + emap[j].mem.addr; - CDBG("%s %d mem.addr %x memptr %x size %d\n", __func__, __LINE__, \ - (uint32_t)emap[j].mem.addr, (uint32_t)memptr, emap[j].mem.valid_size); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; - } -#else - pr_err("%s %d \n", __func__, __LINE__); - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), emap[j].mem.addr, - memptr, emap[j].mem.valid_size); - pr_err("%s %d \n", __func__, __LINE__); - if (rc < 0) { - pr_err("%s: read failed\n", __func__); - return rc; - } - memptr += emap[j].mem.valid_size; -#endif - } - } -#if defined(CONFIG_SEC_J5X_PROJECT) - if( e_ctrl->subdev_id == 0) // for rear sensor only - { - rc = format_eeprom_data(e_ctrl,block); - if(rc<0) - pr_err("%s: format failed\n", __func__); - } -#endif - pr_err("%s Exit \n", __func__); - return rc; -} - -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - CDBG("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - - for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) continue; - - sum = (uint32_t *)memptr_crc; - pr_err("%s : j= %d map[j].mem.valid_size = %d, map[j+1].mem.valid_size = %d \n",__func__,j,map[j].mem.valid_size,map[j+1].mem.valid_size); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size,*sum); - if (!rc) { - ret |= 1 << (j/2); - } - } - return ret; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - - pr_info("%s: read 0x%02X%02X, check Fidelix 16M:0x%02X%02X, Winbond 8M:0x%02X%02X, Winbond 16M:0x%02X%02X\n", __func__, - id[0], id[1], client->spi_client->mfr_id0, client->spi_client->device_id0, - client->spi_client->mfr_id1, client->spi_client->device_id1, - client->spi_client->mfr_id2, client->spi_client->device_id2); - - if ((id[0] == client->spi_client->mfr_id0 && id[1] == client->spi_client->device_id0) - || (id[0] == client->spi_client->mfr_id1 && id[1] == client->spi_client->device_id1) - || (id[0] == client->spi_client->mfr_id2 && id[1] == client->spi_client->device_id2)) - return 0; - - return -ENODEV; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl, bool *down) -{ - int rc = 0; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - rc = msm_eeprom_match_id(e_ctrl); - pr_warn("%s : E", __func__); - - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || rc < 0) { - if (down) *down = true; - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - } else { - if (down) *down = false; - } - return rc; -} - -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl, bool down) -{ - pr_warn("%s : E", __func__); - if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE || down) - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - else - return 0; -} - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - bool down; - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } -#ifdef EEPROM_CAM_PIN_USE - if (query_cam_power_status() == 0) { - rc = msm_eeprom_power_up(e_ctrl, &down); - } -#else - rc = msm_eeprom_power_up(e_ctrl, &down); -#endif - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf, cdata->cfg.read_data.num_bytes); - CDBG("%s: read data, rc addr = 0x%p %d %d\n", __func__, (void*)cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes, rc); - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: -#ifdef EEPROM_CAM_PIN_USE - if (query_cam_power_status() == 0) { - msm_eeprom_power_down(e_ctrl, down); - } -#else - msm_eeprom_power_down(e_ctrl, down); -#endif -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; -#if 0 // just once to power up when load lib - bool down; -#endif - - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if 0 // just once to power up when load lib - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } -#endif - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read_seq( - &(e_ctrl->i2c_client), cdata->cfg.read_data.addr, - buf_comp, cdata->cfg.read_data.comp_size); - - if (rc < 0) { - pr_err("%s: failed to read data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl, down); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - bool down; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - compressed_buf, compressed_size); - - // write CRC32 for compressed data - rc |= e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size, - (uint8_t *)&crc, 4); - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_seq( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr, - buf, cdata->cfg.write_data.num_bytes); - } - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl, down); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - bool down; - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl, &down); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl, down); - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - CDBG("%s:%d Enter\n", __func__, __LINE__); - /* check eeprom id */ - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) { - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - return rc; - } - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - return rc; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s:%d Exit\n", __func__, __LINE__); - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - size_t length = 0; - - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - length = strlen(e_ctrl->eboard_info->eeprom_name) + 1; - if (length > MAX_EEPROM_NAME) { - pr_err("%s:%d invalid eeprom_name length %d\n", - __func__, __LINE__, (int)length); - rc = -EINVAL; - break; - } - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, length); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before%X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after%X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_ERASESIZE: - CDBG("%s E CFG_EEPROM_GET_ERASESIZE\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->i2c_client.spi_client->erase_size; - break; - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl, NULL); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl, true); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - default: - break; - } - - CDBG("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - CDBG("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - rc = of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size); \ - if (rc < 0) \ - return rc; \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - spic->cmd_tbl.name.delay_intv = out[3]; \ - spic->cmd_tbl.name.delay_count = out[4]; \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[5]; - struct device_node *of = spic->spi_master->dev.of_node; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-read", read, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readseq", read_seq, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-queryid", query_id, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-pprog", - page_program, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-wenable", - write_enable, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-readst", - read_status, tmp, 5); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop-erase", erase, tmp, 5); - - rc = of_property_read_u32(of, "qcom,spi-busy-mask", tmp); - if (rc < 0) { - pr_err("%s: Failed to get busy mask\n", __func__); - return rc; - } - spic->busy_mask = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-page-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get page size\n", __func__); - return rc; - } - spic->page_size = tmp[0]; - rc = of_property_read_u32(of, "qcom,spi-erase-size", tmp); - if (rc < 0) { - pr_err("%s: Failed to get erase size\n", __func__); - return rc; - } - spic->erase_size = tmp[0]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id0", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 0\n", __func__); - return rc; - } - spic->mfr_id0 = tmp[0]; - spic->device_id0 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id1", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 1\n", __func__); - return rc; - } - spic->mfr_id1 = tmp[0]; - spic->device_id1 = tmp[1]; - - rc = of_property_read_u32_array(of, "qcom,eeprom-id2", tmp, 2); - if (rc < 0) { - pr_err("%s: Failed to get eeprom id 2\n", __func__); - return rc; - } - spic->mfr_id2 = tmp[0]; - spic->device_id2 = tmp[1]; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - int16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size > 0) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) { - pr_err("%s : eb_info is NULL", __func__); - goto spi_free; - } - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) { - pr_err("%s : msm_eeprom_get_dt_data", __func__); - goto board_free; - } - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - CDBG("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - CDBG("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - CDBG("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - rc = -EINVAL; - goto probe_failure; - } - e_ctrl = kzalloc(sizeof(struct msm_eeprom_ctrl_t), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - CDBG("%s client = %x\n", __func__, (unsigned int)client); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -ENOMEM; - goto board_free; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto memdata_free; - } - rc = of_property_read_u32(of_node, "cell-index", &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto memdata_free; - } - - if (g_ectrl[e_ctrl->subdev_id]) { - pr_err("eeprom id already present!\n"); - goto memdata_free; - } - - g_ectrl[e_ctrl->subdev_id] = NULL; - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto memdata_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto memdata_free; - rc = msm_eeprom_parse_memory_map(of_node, "cal", - &e_ctrl->cal_data); - if (rc < 0) - pr_warn("%s: no cal memory map\n", __func__); - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("%s failed power up %d\n", __func__, __LINE__); - goto memdata_free; - } - - e_ctrl->pvdd_is_en = 0; - of_property_read_u32(of_node, "qcom,pvdd_is_en", &e_ctrl->pvdd_is_en); - if (e_ctrl->pvdd_is_en) { - e_ctrl->pvdd_en = of_get_named_gpio(of_node, "qcom,pvdd_en", 0); - - rc = gpio_request(e_ctrl->pvdd_en, "cam_eeprom"); - if (rc) { - pr_err("failed to request about pvdd_en pin. rc = %d\n", rc); - gpio_free(e_ctrl->pvdd_en); - return -ENODEV; - } - gpio_direction_output(e_ctrl->pvdd_en, 1); - pr_err("%s : pvdd-gpio value = %d\n", __func__, gpio_get_value(e_ctrl->pvdd_en)); - } - - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - - if (e_ctrl->pvdd_is_en) - gpio_free(e_ctrl->pvdd_en); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s Rear Cam e_ctrl->is_supported rc %x\n", __func__, e_ctrl->is_supported); - - if (e_ctrl->pvdd_is_en) { - gpio_direction_output(e_ctrl->pvdd_en, 0); - gpio_free(e_ctrl->pvdd_en); - } - - g_ectrl[e_ctrl->subdev_id] = e_ctrl; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -board_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - CDBG("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - rc = -ENOMEM; - kfree(e_ctrl); - return rc; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, "cal", &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_eeprom"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,eeprom" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,eeprom", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_eeprom", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - CDBG("%s:%d platform rc %d\n", __func__, __LINE__, rc); -// rc = spi_register_driver(&msm_eeprom_spi_driver); -// CDBG("%s:%d spi rc %d\n", __func__, __LINE__, rc); - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0 /*&& spi_rc < 0*/) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.h deleted file mode 100644 index 94a9752cbe98..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_eeprom.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 - -#if defined(CONFIG_SEC_J5X_PROJECT) -#define EEPROM_CRC_DATA_BLOCKS_NUM 4 - -struct msm_eeprom_crc_check -{ - u32 data_addr; - u32 data_size; - u32 check_range_start; - u32 check_range_end; -}; -#endif - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint16_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; - int pvdd_en; - int pvdd_is_en; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp.c deleted file mode 100644 index d9d0156ae7c3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp.c +++ /dev/null @@ -1,2244 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_cci.h" -#if defined(CONFIG_SR544) -#include "msm_otp_sr544.h" -#elif defined(CONFIG_SR552) -#include "msm_otp_sr552.h" -#else -#include "msm_otp_s5k5e3yx.h" -#endif -#include "../../include/media/msm_cam_sensor.h" - -//#define MSM_EEPROM_DEBUG 1 - -#undef CDBG -#ifdef MSM_EEPROM_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#undef EEPROM_MMAP_DEBUG - -uint8_t *map_data = NULL; - -DEFINE_MSM_MUTEX(msm_eeprom_mutex); - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl); -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block); - - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl); -/** - * msm_eeprom_verify_sum - verify crc32 checksum - * @mem: data buffer - * @size: size of data buffer - * @sum: expected checksum - * - * Returns 0 if checksum match, -EINVAL otherwise. - */ -static int msm_eeprom_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - pr_err("Check eeprom or interface"); - return -EINVAL; - } - pr_err("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - -/** - * msm_eeprom_match_crc - verify multiple regions using crc - * @data: data block to be verified - * - * Iterates through all regions stored in @data. Regions with odd index - * are treated as data, and its next region is treated as checksum. Thus - * regions of even index must have valid_size of 4 or 0 (skip verification). - * Returns a bitmask of verified regions, starting from LSB. 1 indicates - * a checksum match, while 0 indicates checksum mismatch or not verified. - */ -static uint32_t msm_eeprom_match_crc(struct msm_eeprom_memory_block_t *data) -{ - int j, rc; - uint32_t *sum; - uint32_t ret = 0; - uint8_t *memptr, *memptr_crc; - struct msm_eeprom_memory_map_t *map; - - if (!data) { - pr_err("%s data is NULL", __func__); - return -EINVAL; - } - map = data->map; - - for (j = 0; j + 1 < data->num_map; j += 2) { - memptr = data->mapdata + map[j].mem.addr; - memptr_crc = data->mapdata + map[j+1].mem.addr; - - /* empty table or no checksum */ - if (!map[j].mem.valid_size || !map[j+1].mem.valid_size) { - continue; - } - if (map[j+1].mem.valid_size != sizeof(uint32_t)) { - pr_err("%s: malformatted data mapping\n", __func__); - return -EINVAL; - } - sum = (uint32_t *) (memptr_crc); - rc = msm_eeprom_verify_sum(memptr, map[j].mem.valid_size, *sum); - if (!rc) - { - ret |= 1 << (j/2); - } - } - return ret; -} - -static int msm_eeprom_get_cmm_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &e_ctrl->eboard_info->cmm_data; - cdata->cfg.get_cmm_data.cmm_support = cmm_data->cmm_support; - cdata->cfg.get_cmm_data.cmm_compression = cmm_data->cmm_compression; - cdata->cfg.get_cmm_data.cmm_size = cmm_data->cmm_size; - return rc; -} - -/** - * msm_eeprom_power_up() - power up eeprom if it's not on - * @e_ctrl: control struct - * @down: output to indicate whether power down is needed later - * - * This function powers up EEPROM only if it's not already on. If power - * up is performed here, @down will be set to true. Caller should power - * down EEPROM after transaction if @down is true. - */ -static int msm_eeprom_power_up(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0; - pr_warn("%s : E", __func__); - - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); - - return rc; -} -/** - * msm_eeprom_power_down() - power down eeprom - * @e_ctrl: control struct - * @down: indicate whether kernel powered up eeprom before - * - * This function powers down EEPROM only if it's powered on by calling - * msm_eeprom_power_up() before. If @down is false, no action will be - * taken. Otherwise, eeprom will be powered down. - */ -static int msm_eeprom_power_down(struct msm_eeprom_ctrl_t *e_ctrl) -{ - pr_warn("%s : E", __func__); - return msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, &e_ctrl->i2c_client); -} - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) -static int prepare_read_write_data(struct msm_eeprom_ctrl_t *e_ctrl, uint8_t addr_h, uint8_t addr_l, enum msm_camera_i2c_data_type data_type, int isWrite) -{ - int rc=0; - - isWrite = !(!isWrite)+1; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_otp); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - addr_h, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - addr_l, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - isWrite, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - return rc; -} -#endif - -static int eeprom_config_read_cal_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc; - - /* check range */ - if (cdata->cfg.read_data.num_bytes > e_ctrl->cal_data.num_data) { - pr_err("%s: Invalid size. exp %u, req %u\n", __func__, - e_ctrl->cal_data.num_data, - cdata->cfg.read_data.num_bytes); - return -EINVAL; - } - if (!e_ctrl->cal_data.mapdata) { - pr_err("%s : is NULL", __func__); - return -EFAULT; - } - CDBG("%s:%d: subdevid: %d",__func__,__LINE__,e_ctrl->subdev_id); - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - /* this below code is giving probelm in device -> encrypt -> came launch - Ideally we should not free this data until dtor. so commentiong out */ - - return rc; -} - -static int eeprom_config_read_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - uint16_t data; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - return rc; -#endif - - buf = kmalloc(cdata->cfg.read_data.num_bytes+1, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on otp\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf[i]=data; - } - -#if !defined(CONFIG_SR544) && !defined(CONFIG_SR552) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - buf[cdata->cfg.read_data.num_bytes] = '\0'; - pr_err("[sjlee] %s : buf[%s]\n", __func__, buf); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - kfree(buf); - return rc; -} - -static int eeprom_config_read_fw_version(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - char *buf; - int rc = 0; - - buf = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s : buf is NULL", __func__); - return -ENOMEM; - } - memset(buf, 0, cdata->cfg.read_data.num_bytes); - if(e_ctrl->cal_data.num_data < (cdata->cfg.read_data.addr + cdata->cfg.read_data.num_bytes)) { - pr_err("%s : requested data size was mismatched! addr:size[0x%x:%d]\n", __func__, cdata->cfg.read_data.addr, cdata->cfg.read_data.num_bytes); - rc = -ENOMEM; - goto FREE; - } - - memcpy(buf, &map_data[cdata->cfg.read_data.addr], cdata->cfg.read_data.num_bytes); - - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf, - cdata->cfg.read_data.num_bytes); - -FREE: - - kfree(buf); - return rc; -} - -static int eeprom_config_read_compressed_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - uint8_t *buf_comp = NULL; - uint8_t *buf_decomp = NULL; - uint32_t decomp_size; - uint16_t data; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - - pr_err("%s: address (0x%x) comp_size (%d) after decomp (%d)", __func__, - cdata->cfg.read_data.addr, - cdata->cfg.read_data.comp_size, cdata->cfg.read_data.num_bytes); - - buf_comp = kmalloc(cdata->cfg.read_data.comp_size, GFP_KERNEL); - buf_decomp = kmalloc(cdata->cfg.read_data.num_bytes, GFP_KERNEL); - if (!buf_decomp || !buf_comp) { - pr_err("%s: kmalloc fail", __func__); - rc = -ENOMEM; - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - addr_h = ((cdata->cfg.read_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.read_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } -#else - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - for(i=0; icfg.read_data.comp_size; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - r_otp_rdata, -#else - cdata->cfg.read_data.addr+i, -#endif - &data, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - buf_comp[i]=data; - } - -#if !defined(CONFIG_SR544) && !defined(CONFIG_SR552) - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } -#endif - - pr_err("%s: crc = 0x%08X\n", __func__, *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - // compressed data(buf_comp) contains uncompressed crc32 value. - rc = msm_eeprom_verify_sum(buf_comp, cdata->cfg.read_data.comp_size-4, - *(uint32_t*)&buf_comp[cdata->cfg.read_data.comp_size-4]); - - if (rc < 0) { - pr_err("%s: crc check error, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - - decomp_size = cdata->cfg.read_data.num_bytes; - rc = lzo1x_decompress_safe(buf_comp, cdata->cfg.read_data.comp_size-4, - buf_decomp, &decomp_size); - if (rc != LZO_E_OK) { - pr_err("%s: decompression failed %d", __func__, rc); - goto POWER_DOWN; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, buf_decomp, decomp_size); - - if (rc < 0) { - pr_err("%s: failed to copy to user\n", __func__); - goto POWER_DOWN; - } - - pr_info("%s: done", __func__); - -POWER_DOWN: -#if 0 // just once to power up when load lib - msm_eeprom_power_down(e_ctrl); -#endif - - FREE: - if (buf_comp) kfree(buf_comp); - if (buf_decomp) kfree(buf_decomp); - - return rc; -} - -static int eeprom_config_write_data(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - int rc = 0; - - char *buf = NULL; - void *work_mem = NULL; - uint8_t *compressed_buf = NULL; - uint32_t compressed_size = 0; - uint32_t crc = ~0UL; - int i; -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - uint8_t addr_h, addr_l; -#endif - - pr_warn("%s: compress ? %d size %d", __func__, - cdata->cfg.write_data.compress, cdata->cfg.write_data.num_bytes); - buf = kmalloc(cdata->cfg.write_data.num_bytes, GFP_KERNEL); - if (!buf) { - pr_err("%s: allocation failed 1", __func__); - return -ENOMEM; - } - rc = copy_from_user(buf, cdata->cfg.write_data.dbuffer, - cdata->cfg.write_data.num_bytes); - if (rc < 0) { - pr_err("%s: failed to copy write data\n", __func__); - goto FREE; - } - /* compress */ - if (cdata->cfg.write_data.compress) { - compressed_buf = kmalloc(cdata->cfg.write_data.num_bytes + - cdata->cfg.write_data.num_bytes / 16 + 64 + 3, GFP_KERNEL); - if (!compressed_buf) { - pr_err("%s: allocation failed 2", __func__); - rc = -ENOMEM; - goto FREE; - } - work_mem = kmalloc(LZO1X_1_MEM_COMPRESS, GFP_KERNEL); - if (!work_mem) { - pr_err("%s: allocation failed 3", __func__); - rc = -ENOMEM; - goto FREE; - } - if (lzo1x_1_compress(buf, cdata->cfg.write_data.num_bytes, - compressed_buf, &compressed_size, work_mem) != LZO_E_OK) { - pr_err("%s: compression failed", __func__); - goto FREE; - } - - crc = crc32_le(crc, compressed_buf, compressed_size); - crc = ~crc; - - pr_err("%s: compressed size %d, crc=0x%0X", __func__, compressed_size, crc); - *cdata->cfg.write_data.write_size = compressed_size + 4; // include CRC size - } - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - goto FREE; - } - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - if (cdata->cfg.write_data.compress) { - - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - addr_h = ((cdata->cfg.write_data.addr+compressed_size)>>8)&0xFF; - addr_l = (cdata->cfg.write_data.addr+compressed_size)&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } else { - addr_h = ((cdata->cfg.write_data.addr)>>8)&0xFF; - addr_l = cdata->cfg.write_data.addr&0xFF; - - rc = prepare_read_write_data(e_ctrl, addr_h, addr_l, MSM_CAMERA_I2C_BYTE_DATA, 1); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_wdata, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - } -#else - if (cdata->cfg.write_data.compress) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; ii2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - compressed_buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - // write CRC32 for compressed data - for(i=0; i<4; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+compressed_size+i, - ((uint8_t *)crc)[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } else { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_write_otp); - if (rc < 0) { - pr_err("%s:(%d) init_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - - for(i=0; icfg.write_data.num_bytes; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), cdata->cfg.write_data.addr+i, - buf[i], MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_write_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_write_otp failed\n", __func__, __LINE__); - goto POWER_DOWN; - } - } -#endif - - if (rc < 0) { - pr_err("%s: failed to write data, rc %d\n", __func__, rc); - goto POWER_DOWN; - } - CDBG("%s: done", __func__); -POWER_DOWN: - msm_eeprom_power_down(e_ctrl); -FREE: - if (buf) kfree(buf); - if (compressed_buf) kfree(compressed_buf); - if (work_mem) kfree(work_mem); - return rc; -} -static int eeprom_config_erase(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_cfg_data *cdata) -{ - - int rc = 0; -#if 0 - pr_warn("%s: erasing addr 0x%x, size %u\n", __func__, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) { - pr_err("%s: failed to power on eeprom\n", __func__); - return rc; - } - rc = msm_camera_spi_erase(&e_ctrl->i2c_client, - cdata->cfg.erase_data.addr, cdata->cfg.erase_data.num_bytes); - if (rc < 0) - pr_err("%s: failed to erase eeprom\n", __func__); - msm_eeprom_power_down(e_ctrl); -#endif - return rc; -} - -static int32_t msm_eeprom_read_eeprom_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int32_t rc = 0; - - /* power up */ - rc = msm_camera_power_up(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - return rc; - } - - /* read cal data */ - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto POWER_DOWN; - } - - /* update support info */ - e_ctrl->is_supported = (msm_eeprom_match_crc(&e_ctrl->cal_data) << 1) | 1; - pr_err("%s:%d is_supported = 0x%X\n", __func__, __LINE__, e_ctrl->is_supported); - -POWER_DOWN: - /* power down */ - if (msm_camera_power_down(&e_ctrl->eboard_info->power_info, - e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client) < 0) - pr_err("%s:%d pwoer down failed\n", __func__, __LINE__); - pr_err("%s:%d Exit\n", __func__, __LINE__); - - return rc; -} - -static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl, - void __user *argp) -{ - struct msm_eeprom_cfg_data *cdata = - (struct msm_eeprom_cfg_data *)argp; - int rc = 0; - - CDBG("%s:%d: subdevid: %d, cfgtype: %d\n",__func__,__LINE__,e_ctrl->subdev_id, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_EEPROM_GET_INFO: - CDBG("%s E CFG_EEPROM_GET_INFO\n", __func__); - cdata->is_supported = e_ctrl->is_supported; - memcpy(cdata->cfg.eeprom_name, - e_ctrl->eboard_info->eeprom_name, - sizeof(cdata->cfg.eeprom_name)); - break; - case CFG_EEPROM_GET_CAL_DATA: - CDBG("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__); - cdata->cfg.get_data.num_bytes = - e_ctrl->cal_data.num_data; - break; - case CFG_EEPROM_READ_CAL_DATA: - CDBG("%s E CFG_EEPROM_READ_CAL_DATA\n", __func__); - rc = eeprom_config_read_cal_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA: - CDBG("%s E CFG_EEPROM_READ_DATA\n", __func__); - rc = eeprom_config_read_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_COMPRESSED_DATA: - rc = eeprom_config_read_compressed_data(e_ctrl, cdata); - if (rc < 0) - pr_err("%s : eeprom_config_read_compressed_data failed", __func__); - break; - case CFG_EEPROM_WRITE_DATA: - pr_warn("%s E CFG_EEPROM_WRITE_DATA\n", __func__); - rc = eeprom_config_write_data(e_ctrl, cdata); - break; - case CFG_EEPROM_READ_DATA_FROM_HW: - e_ctrl->is_supported = 0x01; - pr_err ("kernel is supported before : %X\n",e_ctrl->is_supported); - rc = msm_eeprom_read_eeprom_data(e_ctrl); - pr_err ("kernel is supported after : %X\n",e_ctrl->is_supported); - cdata->is_supported = e_ctrl->is_supported; - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - break; - } - rc = copy_to_user(cdata->cfg.read_data.dbuffer, - e_ctrl->cal_data.mapdata, - cdata->cfg.read_data.num_bytes); - break; - case CFG_EEPROM_GET_MM_INFO: - CDBG("%s E CFG_EEPROM_GET_MM_INFO\n", __func__); - rc = msm_eeprom_get_cmm_data(e_ctrl, cdata); - break; - - case CFG_EEPROM_ERASE: - pr_warn("%s E CFG_EEPROM_ERASE\n", __func__); - rc = eeprom_config_erase(e_ctrl, cdata); - break; - case CFG_EEPROM_POWER_ON: - rc = msm_eeprom_power_up(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_up failed", __func__); - break; - case CFG_EEPROM_POWER_OFF: - rc = msm_eeprom_power_down(e_ctrl); - if (rc < 0) - pr_err("%s : msm_eeprom_power_down failed", __func__); - break; - case CFG_EEPROM_GET_FW_VERSION_INFO: - CDBG("%s E CFG_EEPROM_GET_FW_VERSION_INFO\n", __func__); - rc = eeprom_config_read_fw_version(e_ctrl, cdata); - break; - default: - break; - } - - pr_err("%s X rc: %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_get_subdev_id(struct msm_eeprom_ctrl_t *e_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("%s E\n", __func__); - if (!subdev_id) { - pr_err("%s failed\n", __func__); - return -EINVAL; - } - *subdev_id = e_ctrl->subdev_id; - CDBG("subdev_id %d\n", *subdev_id); - CDBG("%s X\n", __func__); - return 0; -} - -static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("%s E\n", __func__); - CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_eeprom_get_subdev_id(e_ctrl, argp); - case VIDIOC_MSM_EEPROM_CFG: - return msm_eeprom_config(e_ctrl, argp); - default: - return -ENOIOCTLCMD; - } - - pr_err("%s X\n", __func__); -} - -static struct msm_camera_i2c_fn_t msm_eeprom_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_eeprom_spi_func_tbl = { - .i2c_read = msm_camera_spi_read, - .i2c_read_seq = msm_camera_spi_read_seq, -}; - -static int msm_eeprom_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static int msm_eeprom_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd); - CDBG("%s E\n", __func__); - if (!e_ctrl) { - pr_err("%s failed e_ctrl is NULL\n", __func__); - return -EINVAL; - } - CDBG("%s X\n", __func__); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_eeprom_internal_ops = { - .open = msm_eeprom_open, - .close = msm_eeprom_close, -}; - -uint8_t* get_eeprom_data_addr() -{ - return map_data; -} - -/** - * read_eeprom_memory() - read map data into buffer - * @e_ctrl: eeprom control struct - * @block: block to be read - * - * This function iterates through blocks stored in block->map, reads each - * region and concatenate them into the pre-allocated block->mapdata - */ -#if defined(CONFIG_SR544) -// compare dtsi file to GTA when L-OS upgrade for rossa/core-prime. -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr544_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0); - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %p\n", __func__, __LINE__ , memptr); - } - return rc; -} -#elif defined(CONFIG_SR552) -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint16_t start_addr; - uint16_t version; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &sr552_init); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = prepare_read_write_data(e_ctrl, 0x00, 0x20, MSM_CAMERA_I2C_BYTE_DATA, 0);//version - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &version, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - pr_err("%s:(%d) cra_version(0x%02X)",__func__,__LINE__,version); - - rc = prepare_read_write_data(e_ctrl, 0x06, 0x80, MSM_CAMERA_I2C_BYTE_DATA, 0);//bank - if (rc < 0) { - pr_err("%s: failed to prepare read/write on otp\n", __func__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - start_addr = 0x0690; - break; - case 3: - start_addr = 0x0EE0; - break; - case 7: - start_addr = 0x1730; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - } - - pr_err("%s:(%d) e_ctrl->cal_data.num_data : %x\n", __func__, __LINE__, e_ctrl->cal_data.num_data); - - if (e_ctrl->cal_data.num_data) - { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_h, - ((start_addr & 0xFF00) >> 8), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_addr_l, - (start_addr & 0x00FF), data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &(e_ctrl->i2c_client), r_otp_cmd, - 0x01, data_type); - if (rc < 0) { - pr_err("%s:(%d) write failed\n", __func__, __LINE__); - return rc; - } - - for (i=0; ical_data.num_data; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), r_otp_rdata, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i] = OTP_Data; - } -#ifdef EEPROM_MMAP_DEBUG - printk("OTP data : "); - for (i=0; ical_data.num_data; i++) { - printk("[%d:%x], ", i, memptr[i]); - if(i%16 == 15) - printk("\n"); - } - printk("\n"); -#endif - - // copy CRA information which is read from OTP 0x20 to cal data [0x50] address. - memptr[0x50] = version & 0xFF; - pr_err("%s: %d version = 0x%02X, memptr[0x50] = 0x%02X\n", __func__, __LINE__ , version, memptr[0x50]); - - memptr += e_ctrl->cal_data.num_data; - pr_err("%s: %d memptr after addition = %p\n", __func__, __LINE__ , memptr); - } - return rc; -} -#else -static int read_eeprom_memory(struct msm_eeprom_ctrl_t *e_ctrl, - struct msm_eeprom_memory_block_t *block) -{ - int rc = 0; - struct msm_eeprom_memory_map_t *emap = block->map; - struct msm_eeprom_board_info *eb_info; - uint8_t *memptr = block->mapdata; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_BYTE_DATA; - uint16_t OTP_Bank=0, OTP_Data=0; - int i, j; - uint8_t page; - - if (!e_ctrl) { - pr_err("%s e_ctrl is NULL", __func__); - return -EINVAL; - } - - eb_info = e_ctrl->eboard_info; - - for (j = 0; j < block->num_map; j++) { - if (emap[j].saddr.addr) { - eb_info->i2c_slaveaddr = emap[j].saddr.addr; - e_ctrl->i2c_client.cci_client->sid = - eb_info->i2c_slaveaddr >> 1; - pr_err("qcom,slave-addr = 0x%X\n", - eb_info->i2c_slaveaddr); - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), 0x0A04, - &OTP_Bank, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - - pr_err("%s: read OTP_Bank: %d\n", __func__, OTP_Bank); - - switch(OTP_Bank) { - case 0: - case 1: - page = 2; - break; - case 3: - page = 3; - break; - case 7: - page = 4; - break; - case 0xF: - page = 5; - break; - default: - pr_err("%s: Bank error : Bank(%d)\n", __func__, OTP_Bank); - return -EINVAL; - } - init_read_otp.reg_setting[1].reg_data = page; - init_write_otp.reg_setting[7].reg_data = page; - - if (emap[j].mem.valid_size) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &init_read_otp); - if (rc < 0) { - pr_err("%s:(%d) init_read_otp failed\n", __func__, __LINE__); - return rc; - } - - for (i=0x0A08; i<=0x0A41; i++) { - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &(e_ctrl->i2c_client), i, - &OTP_Data, data_type); - if (rc < 0) { - pr_err("%s:(%d) read failed\n", __func__, __LINE__); - return rc; - } - memptr[i-0x0A08] = OTP_Data; - } - - rc = e_ctrl->i2c_client.i2c_func_tbl->i2c_write_table( - &(e_ctrl->i2c_client), &finish_read_otp); - if (rc < 0) { - pr_err("%s:(%d) finish_read_otp failed\n", __func__, __LINE__); - return rc; - } -#ifdef EEPROM_MMAP_DEBUG - for (i=0; inum_map); - pr_err("%s::%d %s %d\n", __func__, __LINE__, property, data->num_map); - if (rc < 0) { - pr_err("%s::%d failed rc %d\n", __func__,__LINE__,rc); - return rc; - } - - map = kzalloc((sizeof(*map) * data->num_map), GFP_KERNEL); - if (!map) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return -ENOMEM; - } - data->map = map; - - for (i = 0; i < data->num_map; i++) { - pr_err("%s, %d: i = %d\n", __func__, __LINE__, i); - - snprintf(property, PROPERTY_MAXSIZE, "qcom,page%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].page, count); - if (rc < 0) { - pr_err("%s: failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,poll%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].poll, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - - snprintf(property, PROPERTY_MAXSIZE, "qcom,mem%d", i); - rc = of_property_read_u32_array(of, property, - (uint32_t *) &map[i].mem, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - data->num_data += map[i].mem.valid_size; - } - pr_err("%s::%d valid size = %d\n", __func__,__LINE__, data->num_data); - - total_size = 0; - -#if defined(CONFIG_SR544) || defined(CONFIG_SR552) - // if total-size is defined at dtsi file. - // set num_data as total-size (refer dtsi file of GTA) - snprintf(property, PROPERTY_MAXSIZE, "qcom,total-size"); - rc = of_property_read_u32(of, property, &total_size); - pr_err("%s::%d %s %d\n", __func__,__LINE__,property, total_size); - - // if "qcom,total-size" propoerty exists. - if (rc >= 0) { - pr_err("%s::%d set num_data as total-size in order to use same address at cal map(total : %d, valid : %d)\n", - __func__,__LINE__, total_size, data->num_data); - data->num_data = total_size; - } -#endif - - data->mapdata = kzalloc(data->num_data, GFP_KERNEL); - if (!data->mapdata) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - return rc; - -ERROR: - kfree(data->map); - memset(data, 0, sizeof(*data)); - return rc; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct v4l2_subdev_core_ops msm_eeprom_subdev_core_ops = { - .ioctl = msm_eeprom_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_eeprom_subdev_ops = { - .core = &msm_eeprom_subdev_core_ops, -}; - -static int msm_eeprom_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp = 0; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - struct device_node *of_node = client->dev.of_node; - int j; - - pr_err("%s E\n", __func__); - - if (!of_node) { - pr_err("%s of_node NULL\n", __func__); - return -EINVAL; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s i2c_check_functionality failed\n", __func__); - goto probe_failure; - } - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - pr_err("%s client = 0x%pK\n", __func__, client); - - //e_ctrl->eboard_info = (struct msm_eeprom_board_info *)(id->driver_data); - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s:%d board info NULL\n", __func__, __LINE__); - rc = -EINVAL; - goto memdata_free; - } - - rc = of_property_read_u32(of_node, "qcom,slave-addr", &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - goto board_free; - } - - rc = of_property_read_u32(of_node, "cell-index", - &e_ctrl->subdev_id); - pr_err("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed read, rc %d\n", rc); - goto board_free; - } - - power_info = &e_ctrl->eboard_info->power_info; - e_ctrl->eboard_info->i2c_slaveaddr = temp; - e_ctrl->i2c_client.client = client; - e_ctrl->is_supported = 0; - - pr_err("%s:%d e_ctrl->eboard_info->i2c_slaveaddr = %d\n", __func__, __LINE__ , e_ctrl->eboard_info->i2c_slaveaddr); - - /* Set device type as I2C */ - e_ctrl->eeprom_device_type = MSM_CAMERA_I2C_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_qup_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - if (e_ctrl->eboard_info->i2c_slaveaddr != 0) - e_ctrl->i2c_client.client->addr = - e_ctrl->eboard_info->i2c_slaveaddr; - power_info->clk_info = cam_8960_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8960_clk_info); - power_info->dev = &client->dev; - - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &e_ctrl->eboard_info->eeprom_name); - pr_err("%s qcom,eeprom-name %s, rc %d\n", __func__, - e_ctrl->eboard_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - pr_err("%s: no cal memory map\n", __func__); - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto board_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - -// e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto power_down; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.client, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = 1; - pr_err("%s success result=%d X\n", __func__, rc); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -board_free: - if (e_ctrl->eboard_info) - kfree(e_ctrl->eboard_info); -memdata_free: - if (e_ctrl) - kfree(e_ctrl); -probe_failure: - pr_err("%s failed! rc = %d\n", __func__, rc); - return rc; -} - -static int msm_eeprom_i2c_remove(struct i2c_client *client) -{ - struct v4l2_subdev *sd = i2c_get_clientdata(client); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -#define msm_eeprom_spi_parse_cmd(spic, str, name, out, size) \ - { \ - if (of_property_read_u32_array( \ - spic->spi_master->dev.of_node, \ - str, out, size)) { \ - return -EFAULT; \ - } else { \ - spic->cmd_tbl.name.opcode = out[0]; \ - spic->cmd_tbl.name.addr_len = out[1]; \ - spic->cmd_tbl.name.dummy_len = out[2]; \ - } \ - } - -static int msm_eeprom_spi_parse_of(struct msm_camera_spi_client *spic) -{ - int rc = -EFAULT; - uint32_t tmp[3]; - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,read", read, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,readseq", read_seq, tmp, 3); - msm_eeprom_spi_parse_cmd(spic, "qcom,spiop,queryid", query_id, tmp, 3); - - rc = of_property_read_u32_array(spic->spi_master->dev.of_node, - "qcom,eeprom-id", tmp, 2); - if (rc) { - pr_err("%s: Failed to get eeprom id\n", __func__); - return rc; - } - spic->mfr_id = tmp[0]; - spic->device_id = tmp[1]; - - return 0; -} - -static int msm_eeprom_match_id(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc; - struct msm_camera_i2c_client *client = &e_ctrl->i2c_client; - uint8_t id[2]; - - rc = msm_camera_spi_query_id(client, 0, &id[0], 2); - if (rc < 0) - return rc; - pr_err("%s: read 0x%x 0x%x, check 0x%x 0x%x\n", __func__, id[0], - id[1], client->spi_client->mfr_id, client->spi_client->device_id); - if (id[0] != client->spi_client->mfr_id - || id[1] != client->spi_client->device_id) - return -ENODEV; - - return 0; -} - -static int msm_eeprom_get_dt_data(struct msm_eeprom_ctrl_t *e_ctrl) -{ - int rc = 0, i = 0; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = - &e_ctrl->eboard_info->power_info; - struct device_node *of_node = NULL; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t gpio_array_size = 0; - uint16_t *gpio_array = NULL; - - eb_info = e_ctrl->eboard_info; - if (e_ctrl->eeprom_device_type == MSM_CAMERA_SPI_DEVICE) - of_node = e_ctrl->i2c_client. - spi_client->spi_master->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_PLATFORM_DEVICE) - of_node = e_ctrl->pdev->dev.of_node; - else if (e_ctrl->eeprom_device_type == MSM_CAMERA_I2C_DEVICE) - of_node = e_ctrl->i2c_client.client->dev.of_node; - rc = msm_camera_get_dt_vreg_data(of_node, &power_info->cam_vreg, - &power_info->num_vreg); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; - } - - pr_err("msm_camera_get_dt_power_setting_data : %d\n", __LINE__); - rc = msm_camera_get_dt_power_setting_data(of_node, - power_info->cam_vreg, power_info->num_vreg, - power_info); - if (rc < 0) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - goto ERROR1; - } - - power_info->gpio_conf = kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = -ENOMEM; - goto ERROR2; - } - gconf = power_info->gpio_conf; - gpio_array_size = of_gpio_count(of_node); - pr_err("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR3; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - pr_err("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); - } - - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - return rc; -ERROR4: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(gpio_array); -ERROR3: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->gpio_conf); -ERROR2: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->cam_vreg); -ERROR1: - pr_err("msm_eeprom_get_dt_data: %d\n", __LINE__); - kfree(power_info->power_setting); - return rc; -} - - -static int msm_eeprom_cmm_dts(struct msm_eeprom_board_info *eb_info, - struct device_node *of_node) -{ - int rc = 0; - struct msm_eeprom_cmm_t *cmm_data = &eb_info->cmm_data; - - cmm_data->cmm_support = - of_property_read_bool(of_node, "qcom,cmm-data-support"); - if (!cmm_data->cmm_support){ - pr_err("%s::%d qcom,cmm-data-support failed ",__func__,__LINE__); - return -EINVAL; - } - cmm_data->cmm_compression = - of_property_read_bool(of_node, "qcom,cmm-data-compressed"); - if (!cmm_data->cmm_compression) - CDBG("No MM compression data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-offset", - &cmm_data->cmm_offset); - if (rc < 0) - CDBG("No MM offset data\n"); - - rc = of_property_read_u32(of_node, "qcom,cmm-data-size", - &cmm_data->cmm_size); - if (rc < 0) - CDBG("No MM size data\n"); - - CDBG("cmm_support: cmm_compr %d, cmm_offset %d, cmm_size %d\n", - cmm_data->cmm_compression, - cmm_data->cmm_offset, - cmm_data->cmm_size); - return 0; -} - -static int msm_eeprom_spi_setup(struct spi_device *spi) -{ - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_camera_i2c_client *client = NULL; - struct msm_camera_spi_client *spi_client; - struct msm_eeprom_board_info *eb_info; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0; - uint32_t temp = 0; - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - client = &e_ctrl->i2c_client; - e_ctrl->is_supported = 0; - - spi_client = kzalloc(sizeof(*spi_client), GFP_KERNEL); - if (!spi_client) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - kfree(e_ctrl); - return -ENOMEM; - } - - rc = of_property_read_u32(spi->dev.of_node, "cell-index", - &e_ctrl->subdev_id); - CDBG("cell-index/subdev_id %d, rc %d\n", e_ctrl->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto spi_free; - } - - e_ctrl->eeprom_device_type = MSM_CAMERA_SPI_DEVICE; - client->spi_client = spi_client; - spi_client->spi_master = spi; - client->i2c_func_tbl = &msm_eeprom_spi_func_tbl; - client->addr_type = MSM_CAMERA_I2C_3B_ADDR; - - eb_info = kzalloc(sizeof(*eb_info), GFP_KERNEL); - if (!eb_info) - goto spi_free; - e_ctrl->eboard_info = eb_info; - rc = of_property_read_string(spi->dev.of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, spi->dev.of_node); - if (rc < 0) - CDBG("%s MM data miss:%d\n", __func__, __LINE__); - - power_info = &eb_info->power_info; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &spi->dev; - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc < 0) - goto board_free; - - /* set spi instruction info */ - spi_client->retry_delay = 1; - spi_client->retries = 0; - - rc = msm_eeprom_spi_parse_of(spi_client); - if (rc < 0) { - dev_err(&spi->dev, - "%s: Error parsing device properties\n", __func__); - goto board_free; - } - - /* prepare memory buffer */ - rc = msm_eeprom_parse_memory_map(spi->dev.of_node, - &e_ctrl->cal_data); - if (rc < 0) - CDBG("%s: no cal memory map\n", __func__); - - /* power up eeprom for reading */ - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - /* check eeprom id */ - rc = msm_eeprom_match_id(e_ctrl); - if (rc < 0) { - CDBG("%s: eeprom not matching %d\n", __func__, rc); - goto power_down; - } - /* read eeprom */ - if (e_ctrl->cal_data.map) { - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s: read cal data failed\n", __func__); - goto power_down; - } - e_ctrl->is_supported |= msm_eeprom_match_crc( - &e_ctrl->cal_data); - } - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto caldata_free; - } - - if (0 > of_property_read_u32(spi->dev.of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - - /* initiazlie subdev */ - v4l2_spi_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->i2c_client.spi_client->spi_master, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - CDBG("%s success result=%d supported=%x X\n", __func__, rc, - e_ctrl->is_supported); - - return 0; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -caldata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -spi_free: - kfree(spi_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_spi_probe(struct spi_device *spi) -{ - int irq, cs, cpha, cpol, cs_high; - - pr_err("%s\n", __func__); - spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; - spi_setup(spi); - - irq = spi->irq; - cs = spi->chip_select; - cpha = (spi->mode & SPI_CPHA) ? 1 : 0; - cpol = (spi->mode & SPI_CPOL) ? 1 : 0; - cs_high = (spi->mode & SPI_CS_HIGH) ? 1 : 0; - pr_err("%s: irq[%d] cs[%x] CPHA[%x] CPOL[%x] CS_HIGH[%x]\n", - __func__, irq, cs, cpha, cpol, cs_high); - pr_err("%s: max_speed[%u]\n", __func__, spi->max_speed_hz); - - return msm_eeprom_spi_setup(spi); -} - -static int msm_eeprom_spi_remove(struct spi_device *sdev) -{ - struct v4l2_subdev *sd = spi_get_drvdata(sdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.spi_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static int msm_eeprom_platform_probe(struct platform_device *pdev) -{ - int rc = 0; - int j = 0; - uint32_t temp; - - struct msm_camera_cci_client *cci_client = NULL; - struct msm_eeprom_ctrl_t *e_ctrl = NULL; - struct msm_eeprom_board_info *eb_info = NULL; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_power_ctrl_t *power_info = NULL; - - pr_err("%s E\n", __func__); - - e_ctrl = kzalloc(sizeof(*e_ctrl), GFP_KERNEL); - if (!e_ctrl) { - pr_err("%s:%d kzalloc failed\n", __func__, __LINE__); - return -ENOMEM; - } - e_ctrl->eeprom_v4l2_subdev_ops = &msm_eeprom_subdev_ops; - e_ctrl->eeprom_mutex = &msm_eeprom_mutex; - - e_ctrl->is_supported = 0; - if (!of_node) { - pr_err("%s dev.of_node NULL\n", __func__); - kfree(e_ctrl); - return -EINVAL; - } - - rc = of_property_read_u32(of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(e_ctrl); - return rc; - } - e_ctrl->subdev_id = pdev->id; - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &e_ctrl->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", e_ctrl->cci_master, rc); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - rc = of_property_read_u32(of_node, "qcom,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(e_ctrl); - return rc; - } - - /* Set platform device handle */ - e_ctrl->pdev = pdev; - /* Set device type as platform device */ - e_ctrl->eeprom_device_type = MSM_CAMERA_PLATFORM_DEVICE; - e_ctrl->i2c_client.i2c_func_tbl = &msm_eeprom_cci_func_tbl; - e_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - e_ctrl->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!e_ctrl->i2c_client.cci_client) { - pr_err("%s failed no memory\n", __func__); - kfree(e_ctrl); - return -ENOMEM; - } - - e_ctrl->eboard_info = kzalloc(sizeof( - struct msm_eeprom_board_info), GFP_KERNEL); - if (!e_ctrl->eboard_info) { - pr_err("%s failed line %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto cciclient_free; - } - eb_info = e_ctrl->eboard_info; - power_info = &eb_info->power_info; - eb_info->i2c_slaveaddr = temp; - - power_info->clk_info = cam_8974_clk_info; - power_info->clk_info_size = ARRAY_SIZE(cam_8974_clk_info); - power_info->dev = &pdev->dev; - - CDBG("qcom,slave-addr = 0x%X\n", eb_info->i2c_slaveaddr); - cci_client = e_ctrl->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = e_ctrl->cci_master; - cci_client->sid = eb_info->i2c_slaveaddr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->i2c_freq_mode = I2C_FAST_MODE; - - rc = of_property_read_string(of_node, "qcom,eeprom-name", - &eb_info->eeprom_name); - CDBG("%s qcom,eeprom-name %s, rc %d\n", __func__, - eb_info->eeprom_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto board_free; - } - - rc = msm_eeprom_cmm_dts(e_ctrl->eboard_info, of_node); - if (rc < 0){ - pr_err("%s MM data miss:%d\n", __func__, __LINE__); - } - - rc = msm_eeprom_get_dt_data(e_ctrl); - if (rc) - goto board_free; - - rc = msm_eeprom_parse_memory_map(of_node, &e_ctrl->cal_data); - if (rc < 0) - goto board_free; - - if (e_ctrl->cal_data.mapdata) - map_data = e_ctrl->cal_data.mapdata; - rc = msm_camera_power_up(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - rc = read_eeprom_memory(e_ctrl, &e_ctrl->cal_data); - if (rc < 0) { - pr_err("%s read_eeprom_memory failed\n", __func__); - goto power_down; - } - for (j = 0; j < e_ctrl->cal_data.num_data; j++) - CDBG("memory_data[%d] = 0x%X\n", j, - e_ctrl->cal_data.mapdata[j]); - - e_ctrl->is_supported |= msm_eeprom_match_crc(&e_ctrl->cal_data); - - rc = msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); - if (rc) { - pr_err("failed rc %d\n", rc); - goto memdata_free; - } - - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", &temp)) { - pr_err("%s:%d Fail position, Default sensor position\n", __func__, __LINE__); - temp = 0; - } - pr_err("%s qcom,sensor-position %d\n", __func__,temp); - - v4l2_subdev_init(&e_ctrl->msm_sd.sd, - e_ctrl->eeprom_v4l2_subdev_ops); - v4l2_set_subdevdata(&e_ctrl->msm_sd.sd, e_ctrl); - platform_set_drvdata(pdev, &e_ctrl->msm_sd.sd); - e_ctrl->msm_sd.sd.internal_ops = &msm_eeprom_internal_ops; - e_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(e_ctrl->msm_sd.sd.name, - ARRAY_SIZE(e_ctrl->msm_sd.sd.name), "msm_otp"); - media_entity_init(&e_ctrl->msm_sd.sd.entity, 0, NULL, 0); - e_ctrl->msm_sd.sd.entity.flags = temp; - e_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - e_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_EEPROM; - msm_sd_register(&e_ctrl->msm_sd); - - e_ctrl->is_supported = (e_ctrl->is_supported << 1) | 1; - pr_err("%s X\n", __func__); - return rc; - -power_down: - msm_camera_power_down(power_info, e_ctrl->eeprom_device_type, - &e_ctrl->i2c_client); -memdata_free: - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); -board_free: - kfree(e_ctrl->eboard_info); -cciclient_free: - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl); - return rc; -} - -static int msm_eeprom_platform_remove(struct platform_device *pdev) -{ - struct v4l2_subdev *sd = platform_get_drvdata(pdev); - struct msm_eeprom_ctrl_t *e_ctrl; - if (!sd) { - pr_err("%s: Subdevice is NULL\n", __func__); - return 0; - } - - e_ctrl = (struct msm_eeprom_ctrl_t *)v4l2_get_subdevdata(sd); - if (!e_ctrl) { - pr_err("%s: eeprom device is NULL\n", __func__); - return 0; - } - - kfree(e_ctrl->i2c_client.cci_client); - kfree(e_ctrl->cal_data.mapdata); - kfree(e_ctrl->cal_data.map); - if (e_ctrl->eboard_info) { - kfree(e_ctrl->eboard_info->power_info.gpio_conf); - kfree(e_ctrl->eboard_info); - } - kfree(e_ctrl); - return 0; -} - -static const struct of_device_id msm_eeprom_dt_match[] = { - { .compatible = "qcom,otp" }, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_dt_match); - -static struct platform_driver msm_eeprom_platform_driver = { - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .remove = msm_eeprom_platform_remove, -}; - -static const struct of_device_id msm_eeprom_i2c_dt_match[] = { - { .compatible = "qcom,otp"}, - { } -}; - -MODULE_DEVICE_TABLE(of, msm_eeprom_i2c_dt_match); - -static const struct i2c_device_id msm_eeprom_i2c_id[] = { - { "qcom,otp", (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_eeprom_i2c_driver = { - .id_table = msm_eeprom_i2c_id, - .probe = msm_eeprom_i2c_probe, - .remove = msm_eeprom_i2c_remove, - .driver = { - .name = "qcom,otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_i2c_dt_match, - }, -}; - -static struct spi_driver msm_eeprom_spi_driver = { - .driver = { - .name = "qcom_otp", - .owner = THIS_MODULE, - .of_match_table = msm_eeprom_dt_match, - }, - .probe = msm_eeprom_spi_probe, - .remove = msm_eeprom_spi_remove, -}; - -static int __init msm_eeprom_init_module(void) -{ - int rc = 0 /*, spi_rc = 0*/; - pr_err("%s E\n", __func__); - rc = platform_driver_probe(&msm_eeprom_platform_driver, - msm_eeprom_platform_probe); - if(rc<0){ - pr_err("%s:%d platform rc %d\n", __func__, __LINE__, rc); - return rc; - } - rc = i2c_add_driver(&msm_eeprom_i2c_driver); - if (rc < 0) - pr_err("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -static void __exit msm_eeprom_exit_module(void) -{ - platform_driver_unregister(&msm_eeprom_platform_driver); - spi_unregister_driver(&msm_eeprom_spi_driver); - i2c_del_driver(&msm_eeprom_i2c_driver); -} - -module_init(msm_eeprom_init_module); -module_exit(msm_eeprom_exit_module); -MODULE_DESCRIPTION("MSM EEPROM driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_s5k5e3yx.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_s5k5e3yx.h deleted file mode 100644 index 215ed6baf643..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_s5k5e3yx.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 17 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array init_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_read_otp = { - init_read_s5k5e3yx_otp_reg, sizeof(init_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_read_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, -}; - -struct msm_camera_i2c_reg_setting finish_read_otp = { - finish_read_s5k5e3yx_otp_reg, sizeof(finish_read_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array init_write_s5k5e3yx_otp_reg[] = { - {0x3b42, 0x68, NULL, 0}, - {0x3b41, 0x01, NULL, 0}, - {0x3b40, 0x00, NULL, 0}, - {0x3b45, 0x02, NULL, 0}, - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x03, NULL, 0}, - {0x3b42, 0x00, NULL, 0}, - {0x0A02, 0x02, NULL, 0}, - {0x0A00, 0x03, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting init_write_otp = { - init_write_s5k5e3yx_otp_reg, sizeof(init_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -static struct msm_camera_i2c_reg_array finish_write_s5k5e3yx_otp_reg[] = { - {0x0A00, 0x04, NULL, 0}, - {0x0A00, 0x00, NULL, 0}, - {0x3b40, 0x01, NULL, 10}, -}; - -struct msm_camera_i2c_reg_setting finish_write_otp = { - finish_write_s5k5e3yx_otp_reg, sizeof(finish_write_s5k5e3yx_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 10 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr544.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr544.h deleted file mode 100644 index 31d9a3bd641b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr544.h +++ /dev/null @@ -1,2102 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr544_init_reg[] = { -{0x0118, 0x0000}, //sleep On - -//--- SRAM timing control---// -{0x0E00, 0x0101}, -{0x0E02, 0x0101}, -{0x0E04, 0x0101}, -{0x0E06, 0x0101}, -{0x0E08, 0x0101}, -{0x0E0A, 0x0101}, -{0x0E0C, 0x0101}, -{0x0E0E, 0x0101}, - -//Firmware 2Lane v0.39, LB OTP Burst On + double luma under dark. FW 20140804 -{0x2000, 0x4031}, -{0x2002, 0x83F8}, -{0x2004, 0x4104}, -{0x2006, 0x4307}, -{0x2008, 0x4382}, -{0x200a, 0x80D0}, -{0x200c, 0x4382}, -{0x200e, 0x8070}, -{0x2010, 0x43A2}, -{0x2012, 0x0B80}, -{0x2014, 0x0C0A}, -{0x2016, 0x4382}, -{0x2018, 0x0B90}, -{0x201a, 0x0C0A}, -{0x201c, 0x4382}, -{0x201e, 0x0B9C}, -{0x2020, 0x0C0A}, -{0x2022, 0x93D2}, -{0x2024, 0x003D}, -{0x2026, 0x2002}, -{0x2028, 0x4030}, -{0x202a, 0xF6C0}, -{0x202c, 0x43C2}, -{0x202e, 0x0F82}, -{0x2030, 0x425F}, -{0x2032, 0x0118}, -{0x2034, 0xF37F}, -{0x2036, 0x930F}, -{0x2038, 0x2002}, -{0x203a, 0x0CC8}, -{0x203c, 0x3FF9}, -{0x203e, 0x4F82}, -{0x2040, 0x809A}, -{0x2042, 0x43D2}, -{0x2044, 0x0A80}, -{0x2046, 0x43D2}, -{0x2048, 0x0180}, -{0x204a, 0x43D2}, -{0x204c, 0x019A}, -{0x204e, 0x40F2}, -{0x2050, 0x0009}, -{0x2052, 0x019B}, -{0x2054, 0x12B0}, -{0x2056, 0xFE26}, -{0x2058, 0x4382}, -{0x205a, 0x8094}, -{0x205c, 0x93D2}, -{0x205e, 0x003E}, -{0x2060, 0x2002}, -{0x2062, 0x4030}, -{0x2064, 0xF5A0}, -{0x2066, 0x4308}, -{0x2068, 0x5038}, -{0x206a, 0x0030}, -{0x206c, 0x480F}, -{0x206e, 0x12B0}, -{0x2070, 0xFE38}, -{0x2072, 0x403B}, -{0x2074, 0x7606}, -{0x2076, 0x4B29}, -{0x2078, 0x5318}, -{0x207a, 0x480F}, -{0x207c, 0x12B0}, -{0x207e, 0xFE38}, -{0x2080, 0x4B2A}, -{0x2082, 0x5318}, -{0x2084, 0x480F}, -{0x2086, 0x12B0}, -{0x2088, 0xFE38}, -{0x208a, 0x4A0D}, -{0x208c, 0xF03D}, -{0x208e, 0x000F}, -{0x2090, 0x108D}, -{0x2092, 0x4B2E}, -{0x2094, 0x5E0E}, -{0x2096, 0x5E0E}, -{0x2098, 0x5E0E}, -{0x209a, 0x5E0E}, -{0x209c, 0x4A0F}, -{0x209e, 0xC312}, -{0x20a0, 0x100F}, -{0x20a2, 0x110F}, -{0x20a4, 0x110F}, -{0x20a6, 0x110F}, -{0x20a8, 0x590D}, -{0x20aa, 0x4D87}, -{0x20ac, 0x5000}, -{0x20ae, 0x5F0E}, -{0x20b0, 0x4E87}, -{0x20b2, 0x6000}, -{0x20b4, 0x5327}, -{0x20b6, 0x5038}, -{0x20b8, 0xFFD1}, -{0x20ba, 0x9038}, -{0x20bc, 0x0300}, -{0x20be, 0x2BD4}, -{0x20c0, 0x0261}, -{0x20c2, 0x0000}, -{0x20c4, 0x43A2}, -{0x20c6, 0x0384}, -{0x20c8, 0x42B2}, -{0x20ca, 0x0386}, -{0x20cc, 0x43C2}, -{0x20ce, 0x0180}, -{0x20d0, 0x43D2}, -{0x20d2, 0x003D}, -{0x20d4, 0x40B2}, -{0x20d6, 0x808B}, -{0x20d8, 0x0B88}, -{0x20da, 0x0C0A}, -{0x20dc, 0x40B2}, -{0x20de, 0x1009}, -{0x20e0, 0x0B8A}, -{0x20e2, 0x0C0A}, -{0x20e4, 0x40B2}, -{0x20e6, 0xC40C}, -{0x20e8, 0x0B8C}, -{0x20ea, 0x0C0A}, -{0x20ec, 0x40B2}, -{0x20ee, 0xC9E1}, -{0x20f0, 0x0B8E}, -{0x20f2, 0x0C0A}, -{0x20f4, 0x40B2}, -{0x20f6, 0x0C1E}, -{0x20f8, 0x0B92}, -{0x20fa, 0x0C0A}, -{0x20fc, 0x43D2}, -{0x20fe, 0x0F82}, -{0x2100, 0x0C3C}, -{0x2102, 0x0C3C}, -{0x2104, 0x0C3C}, -{0x2106, 0x0C3C}, -{0x2108, 0x421F}, -{0x210a, 0x00A6}, -{0x210c, 0x503F}, -{0x210e, 0x07D0}, -{0x2110, 0x3811}, -{0x2112, 0x4F82}, -{0x2114, 0x7100}, -{0x2116, 0x0004}, -{0x2118, 0x0C0D}, -{0x211a, 0x0005}, -{0x211c, 0x0C04}, -{0x211e, 0x000D}, -{0x2120, 0x0C09}, -{0x2122, 0x003D}, -{0x2124, 0x0C1D}, -{0x2126, 0x003C}, -{0x2128, 0x0C13}, -{0x212a, 0x0004}, -{0x212c, 0x0C09}, -{0x212e, 0x0004}, -{0x2130, 0x533F}, -{0x2132, 0x37EF}, -{0x2134, 0x4392}, -{0x2136, 0x8096}, -{0x2138, 0x4382}, -{0x213a, 0x809E}, -{0x213c, 0x4382}, -{0x213e, 0x80B6}, -{0x2140, 0x4382}, -{0x2142, 0x80BE}, -{0x2144, 0x4382}, -{0x2146, 0x80A2}, -{0x2148, 0x40B2}, -{0x214a, 0x0028}, -{0x214c, 0x7000}, -{0x214e, 0x43A2}, -{0x2150, 0x80A0}, -{0x2152, 0xB3E2}, -{0x2154, 0x00B4}, -{0x2156, 0x2402}, -{0x2158, 0x4392}, -{0x215a, 0x80A0}, -{0x215c, 0x4326}, -{0x215e, 0xB3D2}, -{0x2160, 0x00B4}, -{0x2162, 0x2002}, -{0x2164, 0x4030}, -{0x2166, 0xF590}, -{0x2168, 0x4306}, -{0x216a, 0x4384}, -{0x216c, 0x0002}, -{0x216e, 0x4384}, -{0x2170, 0x0006}, -{0x2172, 0x4382}, -{0x2174, 0x809C}, -{0x2176, 0x4382}, -{0x2178, 0x8098}, -{0x217a, 0x40B2}, -{0x217c, 0x0005}, -{0x217e, 0x7320}, -{0x2180, 0x4392}, -{0x2182, 0x7326}, -{0x2184, 0x12B0}, -{0x2186, 0xF952}, -{0x2188, 0x4392}, -{0x218a, 0x731C}, -{0x218c, 0x9382}, -{0x218e, 0x8096}, -{0x2190, 0x200A}, -{0x2192, 0x0B00}, -{0x2194, 0x7302}, -{0x2196, 0x02BC}, -{0x2198, 0x4382}, -{0x219a, 0x7004}, -{0x219c, 0x430F}, -{0x219e, 0x12B0}, -{0x21a0, 0xF752}, -{0x21a2, 0x12B0}, -{0x21a4, 0xF952}, -{0x21a6, 0x4392}, -{0x21a8, 0x80BC}, -{0x21aa, 0x4382}, -{0x21ac, 0x740E}, -{0x21ae, 0xB3E2}, -{0x21b0, 0x0080}, -{0x21b2, 0x2402}, -{0x21b4, 0x4392}, -{0x21b6, 0x740E}, -{0x21b8, 0x431F}, -{0x21ba, 0x12B0}, -{0x21bc, 0xF752}, -{0x21be, 0x4392}, -{0x21c0, 0x7004}, -{0x21c2, 0x4682}, -{0x21c4, 0x7110}, -{0x21c6, 0x9382}, -{0x21c8, 0x8092}, -{0x21ca, 0x2005}, -{0x21cc, 0x9392}, -{0x21ce, 0x7110}, -{0x21d0, 0x2402}, -{0x21d2, 0x4030}, -{0x21d4, 0xF494}, -{0x21d6, 0x9392}, -{0x21d8, 0x7110}, -{0x21da, 0x20A4}, -{0x21dc, 0x0B00}, -{0x21de, 0x7302}, -{0x21e0, 0x0032}, -{0x21e2, 0x4382}, -{0x21e4, 0x7004}, -{0x21e6, 0x0B00}, -{0x21e8, 0x7302}, -{0x21ea, 0x03E8}, -{0x21ec, 0x0800}, -{0x21ee, 0x7114}, -{0x21f0, 0x425F}, -{0x21f2, 0x0C9C}, -{0x21f4, 0x4F4E}, -{0x21f6, 0x430F}, -{0x21f8, 0x4E0D}, -{0x21fa, 0x430C}, -{0x21fc, 0x421F}, -{0x21fe, 0x0C9A}, -{0x2200, 0xDF0C}, -{0x2202, 0x1204}, -{0x2204, 0x440F}, -{0x2206, 0x532F}, -{0x2208, 0x120F}, -{0x220a, 0x1212}, -{0x220c, 0x0CA2}, -{0x220e, 0x403E}, -{0x2210, 0x80C0}, -{0x2212, 0x403F}, -{0x2214, 0x8072}, -{0x2216, 0x12B0}, -{0x2218, 0xF7BA}, -{0x221a, 0x4F07}, -{0x221c, 0x425F}, -{0x221e, 0x0CA0}, -{0x2220, 0x4F4E}, -{0x2222, 0x430F}, -{0x2224, 0x4E0D}, -{0x2226, 0x430C}, -{0x2228, 0x421F}, -{0x222a, 0x0C9E}, -{0x222c, 0xDF0C}, -{0x222e, 0x440F}, -{0x2230, 0x522F}, -{0x2232, 0x120F}, -{0x2234, 0x532F}, -{0x2236, 0x120F}, -{0x2238, 0x1212}, -{0x223a, 0x0CA4}, -{0x223c, 0x403E}, -{0x223e, 0x80A4}, -{0x2240, 0x403F}, -{0x2242, 0x8050}, -{0x2244, 0x12B0}, -{0x2246, 0xF7BA}, -{0x2248, 0x4F08}, -{0x224a, 0x430D}, -{0x224c, 0x441E}, -{0x224e, 0x0004}, -{0x2250, 0x442F}, -{0x2252, 0x5031}, -{0x2254, 0x000C}, -{0x2256, 0x9E0F}, -{0x2258, 0x2C01}, -{0x225a, 0x431D}, -{0x225c, 0x8E0F}, -{0x225e, 0x930F}, -{0x2260, 0x3402}, -{0x2262, 0xE33F}, -{0x2264, 0x531F}, -{0x2266, 0x421E}, -{0x2268, 0x0CA2}, -{0x226a, 0xC312}, -{0x226c, 0x100E}, -{0x226e, 0x9E0F}, -{0x2270, 0x2804}, -{0x2272, 0x930D}, -{0x2274, 0x2001}, -{0x2276, 0x5317}, -{0x2278, 0x5D08}, -{0x227a, 0x403B}, -{0x227c, 0x0196}, -{0x227e, 0x403D}, -{0x2280, 0x0040}, -{0x2282, 0x4D0F}, -{0x2284, 0x8B2F}, -{0x2286, 0x470A}, -{0x2288, 0x4F0C}, -{0x228a, 0x12B0}, -{0x228c, 0xFE58}, -{0x228e, 0x4E09}, -{0x2290, 0xC312}, -{0x2292, 0x1009}, -{0x2294, 0x1109}, -{0x2296, 0x1109}, -{0x2298, 0x1109}, -{0x229a, 0x1109}, -{0x229c, 0x1109}, -{0x229e, 0x4D0F}, -{0x22a0, 0x8B2F}, -{0x22a2, 0x480A}, -{0x22a4, 0x4F0C}, -{0x22a6, 0x12B0}, -{0x22a8, 0xFE58}, -{0x22aa, 0x4E0F}, -{0x22ac, 0xC312}, -{0x22ae, 0x100F}, -{0x22b0, 0x110F}, -{0x22b2, 0x110F}, -{0x22b4, 0x110F}, -{0x22b6, 0x110F}, -{0x22b8, 0x110F}, -{0x22ba, 0x5F09}, -{0x22bc, 0xC312}, -{0x22be, 0x1009}, -{0x22c0, 0x92B2}, -{0x22c2, 0x80BE}, -{0x22c4, 0x280C}, -{0x22c6, 0x90B2}, -{0x22c8, 0x0096}, -{0x22ca, 0x80B6}, -{0x22cc, 0x2408}, -{0x22ce, 0x0900}, -{0x22d0, 0x710E}, -{0x22d2, 0x0B00}, -{0x22d4, 0x7302}, -{0x22d6, 0x0320}, -{0x22d8, 0x12B0}, -{0x22da, 0xF6F2}, -{0x22dc, 0x3F74}, -{0x22de, 0x470A}, -{0x22e0, 0x580A}, -{0x22e2, 0xC312}, -{0x22e4, 0x100A}, -{0x22e6, 0x890A}, -{0x22e8, 0xB3E2}, -{0x22ea, 0x0C81}, -{0x22ec, 0x2418}, -{0x22ee, 0x425F}, -{0x22f0, 0x0C92}, -{0x22f2, 0xF37F}, -{0x22f4, 0x9F0A}, -{0x22f6, 0x280E}, -{0x22f8, 0x425F}, -{0x22fa, 0x0C92}, -{0x22fc, 0xF37F}, -{0x22fe, 0x4A0E}, -{0x2300, 0x8F0E}, -{0x2302, 0x4E82}, -{0x2304, 0x0CAC}, -{0x2306, 0x425F}, -{0x2308, 0x0C92}, -{0x230a, 0xF37F}, -{0x230c, 0x8F0A}, -{0x230e, 0x4A82}, -{0x2310, 0x0CAE}, -{0x2312, 0x3FDD}, -{0x2314, 0x4382}, -{0x2316, 0x0CAC}, -{0x2318, 0x4382}, -{0x231a, 0x0CAE}, -{0x231c, 0x3FD8}, -{0x231e, 0x4A82}, -{0x2320, 0x0CAC}, -{0x2322, 0x3FF5}, -{0x2324, 0x0B00}, -{0x2326, 0x7302}, -{0x2328, 0x0002}, -{0x232a, 0x069A}, -{0x232c, 0x0C1F}, -{0x232e, 0x0403}, -{0x2330, 0x0C05}, -{0x2332, 0x0001}, -{0x2334, 0x0C01}, -{0x2336, 0x0003}, -{0x2338, 0x0C03}, -{0x233a, 0x000B}, -{0x233c, 0x0C33}, -{0x233e, 0x0003}, -{0x2340, 0x0C03}, -{0x2342, 0x0653}, -{0x2344, 0x0C03}, -{0x2346, 0x065B}, -{0x2348, 0x0C13}, -{0x234a, 0x065F}, -{0x234c, 0x0C43}, -{0x234e, 0x0657}, -{0x2350, 0x0C03}, -{0x2352, 0x0653}, -{0x2354, 0x0C03}, -{0x2356, 0x0643}, -{0x2358, 0x0C0F}, -{0x235a, 0x067D}, -{0x235c, 0x0C01}, -{0x235e, 0x077F}, -{0x2360, 0x0C01}, -{0x2362, 0x0677}, -{0x2364, 0x0C01}, -{0x2366, 0x0673}, -{0x2368, 0x0C67}, -{0x236a, 0x0677}, -{0x236c, 0x0C03}, -{0x236e, 0x077D}, -{0x2370, 0x0C19}, -{0x2372, 0x0013}, -{0x2374, 0x0C27}, -{0x2376, 0x0003}, -{0x2378, 0x0C45}, -{0x237a, 0x0675}, -{0x237c, 0x0C01}, -{0x237e, 0x0671}, -{0x2380, 0x4392}, -{0x2382, 0x7004}, -{0x2384, 0x430F}, -{0x2386, 0x9382}, -{0x2388, 0x80BC}, -{0x238a, 0x2001}, -{0x238c, 0x431F}, -{0x238e, 0x4F82}, -{0x2390, 0x80BC}, -{0x2392, 0x930F}, -{0x2394, 0x2473}, -{0x2396, 0x0B00}, -{0x2398, 0x7302}, -{0x239a, 0x033A}, -{0x239c, 0x0675}, -{0x239e, 0x0C02}, -{0x23a0, 0x0339}, -{0x23a2, 0xAE0C}, -{0x23a4, 0x0C01}, -{0x23a6, 0x003C}, -{0x23a8, 0x0C01}, -{0x23aa, 0x0004}, -{0x23ac, 0x0C01}, -{0x23ae, 0x0642}, -{0x23b0, 0x0B00}, -{0x23b2, 0x7302}, -{0x23b4, 0x0386}, -{0x23b6, 0x0643}, -{0x23b8, 0x0C05}, -{0x23ba, 0x0001}, -{0x23bc, 0x0C01}, -{0x23be, 0x0003}, -{0x23c0, 0x0C03}, -{0x23c2, 0x000B}, -{0x23c4, 0x0C33}, -{0x23c6, 0x0003}, -{0x23c8, 0x0C03}, -{0x23ca, 0x0653}, -{0x23cc, 0x0C03}, -{0x23ce, 0x065B}, -{0x23d0, 0x0C13}, -{0x23d2, 0x065F}, -{0x23d4, 0x0C43}, -{0x23d6, 0x0657}, -{0x23d8, 0x0C03}, -{0x23da, 0x0653}, -{0x23dc, 0x0C03}, -{0x23de, 0x0643}, -{0x23e0, 0x0C0F}, -{0x23e2, 0x067D}, -{0x23e4, 0x0C01}, -{0x23e6, 0x077F}, -{0x23e8, 0x0C01}, -{0x23ea, 0x0677}, -{0x23ec, 0x0C01}, -{0x23ee, 0x0673}, -{0x23f0, 0x0C67}, -{0x23f2, 0x0677}, -{0x23f4, 0x0C03}, -{0x23f6, 0x077D}, -{0x23f8, 0x0C19}, -{0x23fa, 0x0013}, -{0x23fc, 0x0C27}, -{0x23fe, 0x0003}, -{0x2400, 0x0C45}, -{0x2402, 0x0675}, -{0x2404, 0x0C01}, -{0x2406, 0x0671}, -{0x2408, 0x12B0}, -{0x240a, 0xF6F2}, -{0x240c, 0x930F}, -{0x240e, 0x2405}, -{0x2410, 0x4292}, -{0x2412, 0x8096}, -{0x2414, 0x809E}, -{0x2416, 0x4382}, -{0x2418, 0x8096}, -{0x241a, 0x9382}, -{0x241c, 0x80BC}, -{0x241e, 0x241E}, -{0x2420, 0x0B00}, -{0x2422, 0x7302}, -{0x2424, 0x069E}, -{0x2426, 0x0675}, -{0x2428, 0x0C02}, -{0x242a, 0x0339}, -{0x242c, 0xAE0C}, -{0x242e, 0x0C01}, -{0x2430, 0x003C}, -{0x2432, 0x0C01}, -{0x2434, 0x0004}, -{0x2436, 0x0C01}, -{0x2438, 0x0642}, -{0x243a, 0x0C01}, -{0x243c, 0x06A1}, -{0x243e, 0x0C03}, -{0x2440, 0x06A0}, -{0x2442, 0x9382}, -{0x2444, 0x80D0}, -{0x2446, 0x2004}, -{0x2448, 0x930F}, -{0x244a, 0x26BD}, -{0x244c, 0x4030}, -{0x244e, 0xF18C}, -{0x2450, 0x43C2}, -{0x2452, 0x0A80}, -{0x2454, 0x0B00}, -{0x2456, 0x7302}, -{0x2458, 0xFFF0}, -{0x245a, 0x3EB5}, -{0x245c, 0x0B00}, -{0x245e, 0x7302}, -{0x2460, 0x069E}, -{0x2462, 0x0675}, -{0x2464, 0x0C02}, -{0x2466, 0x0301}, -{0x2468, 0xAE0C}, -{0x246a, 0x0C01}, -{0x246c, 0x0004}, -{0x246e, 0x0C03}, -{0x2470, 0x0642}, -{0x2472, 0x0C01}, -{0x2474, 0x06A1}, -{0x2476, 0x0C03}, -{0x2478, 0x06A0}, -{0x247a, 0x3FE3}, -{0x247c, 0x0B00}, -{0x247e, 0x7302}, -{0x2480, 0x033A}, -{0x2482, 0x0675}, -{0x2484, 0x0C02}, -{0x2486, 0x0301}, -{0x2488, 0xAE0C}, -{0x248a, 0x0C01}, -{0x248c, 0x0004}, -{0x248e, 0x0C03}, -{0x2490, 0x0642}, -{0x2492, 0x3F8E}, -{0x2494, 0x0B00}, -{0x2496, 0x7302}, -{0x2498, 0x0002}, -{0x249a, 0x069A}, -{0x249c, 0x0C1F}, -{0x249e, 0x0402}, -{0x24a0, 0x0C05}, -{0x24a2, 0x0001}, -{0x24a4, 0x0C01}, -{0x24a6, 0x0003}, -{0x24a8, 0x0C03}, -{0x24aa, 0x000B}, -{0x24ac, 0x0C33}, -{0x24ae, 0x0003}, -{0x24b0, 0x0C03}, -{0x24b2, 0x0653}, -{0x24b4, 0x0C03}, -{0x24b6, 0x065B}, -{0x24b8, 0x0C13}, -{0x24ba, 0x065F}, -{0x24bc, 0x0C43}, -{0x24be, 0x0657}, -{0x24c0, 0x0C03}, -{0x24c2, 0x0653}, -{0x24c4, 0x0C03}, -{0x24c6, 0x0643}, -{0x24c8, 0x0C0F}, -{0x24ca, 0x077D}, -{0x24cc, 0x0C01}, -{0x24ce, 0x067F}, -{0x24d0, 0x0C01}, -{0x24d2, 0x0677}, -{0x24d4, 0x0C01}, -{0x24d6, 0x0673}, -{0x24d8, 0x0C5F}, -{0x24da, 0x0663}, -{0x24dc, 0x0C6F}, -{0x24de, 0x0667}, -{0x24e0, 0x0C01}, -{0x24e2, 0x0677}, -{0x24e4, 0x0C01}, -{0x24e6, 0x077D}, -{0x24e8, 0x0C33}, -{0x24ea, 0x0013}, -{0x24ec, 0x0C27}, -{0x24ee, 0x0003}, -{0x24f0, 0x0C4F}, -{0x24f2, 0x0675}, -{0x24f4, 0x0C01}, -{0x24f6, 0x0671}, -{0x24f8, 0x0CFF}, -{0x24fa, 0x0C78}, -{0x24fc, 0x0661}, -{0x24fe, 0x4392}, -{0x2500, 0x7004}, -{0x2502, 0x430F}, -{0x2504, 0x9382}, -{0x2506, 0x80BC}, -{0x2508, 0x2001}, -{0x250a, 0x431F}, -{0x250c, 0x4F82}, -{0x250e, 0x80BC}, -{0x2510, 0x12B0}, -{0x2512, 0xF6F2}, -{0x2514, 0x930F}, -{0x2516, 0x2405}, -{0x2518, 0x4292}, -{0x251a, 0x8096}, -{0x251c, 0x809E}, -{0x251e, 0x4382}, -{0x2520, 0x8096}, -{0x2522, 0x9382}, -{0x2524, 0x80BC}, -{0x2526, 0x2019}, -{0x2528, 0x0B00}, -{0x252a, 0x7302}, -{0x252c, 0x0562}, -{0x252e, 0x0665}, -{0x2530, 0x0C02}, -{0x2532, 0x0301}, -{0x2534, 0xA60C}, -{0x2536, 0x0204}, -{0x2538, 0xAE0C}, -{0x253a, 0x0C03}, -{0x253c, 0x0642}, -{0x253e, 0x0C13}, -{0x2540, 0x06A1}, -{0x2542, 0x0C03}, -{0x2544, 0x06A0}, -{0x2546, 0x9382}, -{0x2548, 0x80D0}, -{0x254a, 0x277E}, -{0x254c, 0x43C2}, -{0x254e, 0x0A80}, -{0x2550, 0x0B00}, -{0x2552, 0x7302}, -{0x2554, 0xFFF0}, -{0x2556, 0x4030}, -{0x2558, 0xF1C6}, -{0x255a, 0x0B00}, -{0x255c, 0x7302}, -{0x255e, 0x0562}, -{0x2560, 0x0665}, -{0x2562, 0x0C02}, -{0x2564, 0x0339}, -{0x2566, 0xA60C}, -{0x2568, 0x023C}, -{0x256a, 0xAE0C}, -{0x256c, 0x0C01}, -{0x256e, 0x0004}, -{0x2570, 0x0C01}, -{0x2572, 0x0642}, -{0x2574, 0x0C13}, -{0x2576, 0x06A1}, -{0x2578, 0x0C03}, -{0x257a, 0x06A0}, -{0x257c, 0x9382}, -{0x257e, 0x80D0}, -{0x2580, 0x2763}, -{0x2582, 0x43C2}, -{0x2584, 0x0A80}, -{0x2586, 0x0B00}, -{0x2588, 0x7302}, -{0x258a, 0xFFF0}, -{0x258c, 0x4030}, -{0x258e, 0xF1C6}, -{0x2590, 0xB3E2}, -{0x2592, 0x00B4}, -{0x2594, 0x2002}, -{0x2596, 0x4030}, -{0x2598, 0xF16A}, -{0x259a, 0x4316}, -{0x259c, 0x4030}, -{0x259e, 0xF16A}, -{0x25a0, 0x4392}, -{0x25a2, 0x760E}, -{0x25a4, 0x425F}, -{0x25a6, 0x0118}, -{0x25a8, 0xF37F}, -{0x25aa, 0x930F}, -{0x25ac, 0x2005}, -{0x25ae, 0x43C2}, -{0x25b0, 0x0A80}, -{0x25b2, 0x0B00}, -{0x25b4, 0x7302}, -{0x25b6, 0xFFF0}, -{0x25b8, 0x9382}, -{0x25ba, 0x760C}, -{0x25bc, 0x2002}, -{0x25be, 0x0C64}, -{0x25c0, 0x3FF1}, -{0x25c2, 0x4F82}, -{0x25c4, 0x809A}, -{0x25c6, 0x421F}, -{0x25c8, 0x760A}, -{0x25ca, 0x932F}, -{0x25cc, 0x2013}, -{0x25ce, 0x4292}, -{0x25d0, 0x018A}, -{0x25d2, 0x80B8}, -{0x25d4, 0x12B0}, -{0x25d6, 0xFE26}, -{0x25d8, 0x40B2}, -{0x25da, 0x0005}, -{0x25dc, 0x7600}, -{0x25de, 0x4382}, -{0x25e0, 0x7602}, -{0x25e2, 0x0262}, -{0x25e4, 0x0000}, -{0x25e6, 0x0222}, -{0x25e8, 0x0000}, -{0x25ea, 0x0262}, -{0x25ec, 0x0000}, -{0x25ee, 0x0260}, -{0x25f0, 0x0000}, -{0x25f2, 0x3FD6}, -{0x25f4, 0x903F}, -{0x25f6, 0x0003}, -{0x25f8, 0x285B}, -{0x25fa, 0x903F}, -{0x25fc, 0x0102}, -{0x25fe, 0x204E}, -{0x2600, 0x425F}, -{0x2602, 0x0186}, -{0x2604, 0x4F4C}, -{0x2606, 0x93D2}, -{0x2608, 0x018F}, -{0x260a, 0x2446}, -{0x260c, 0x425F}, -{0x260e, 0x018F}, -{0x2610, 0x4F4D}, -{0x2612, 0x4308}, -{0x2614, 0x421B}, -{0x2616, 0x80B8}, -{0x2618, 0x431F}, -{0x261a, 0x480E}, -{0x261c, 0x930E}, -{0x261e, 0x2403}, -{0x2620, 0x5F0F}, -{0x2622, 0x831E}, -{0x2624, 0x23FD}, -{0x2626, 0xFC0F}, -{0x2628, 0x242F}, -{0x262a, 0x430F}, -{0x262c, 0x9D0F}, -{0x262e, 0x2C2C}, -{0x2630, 0x4B0E}, -{0x2632, 0x4E82}, -{0x2634, 0x7600}, -{0x2636, 0x4882}, -{0x2638, 0x7602}, -{0x263a, 0x4C82}, -{0x263c, 0x7604}, -{0x263e, 0x0264}, -{0x2640, 0x0000}, -{0x2642, 0x0224}, -{0x2644, 0x0000}, -{0x2646, 0x0264}, -{0x2648, 0x0000}, -{0x264a, 0x0260}, -{0x264c, 0x0000}, -{0x264e, 0x0268}, -{0x2650, 0x0000}, -{0x2652, 0x0C18}, -{0x2654, 0x02E8}, -{0x2656, 0x0000}, -{0x2658, 0x0C30}, -{0x265a, 0x02A8}, -{0x265c, 0x0000}, -{0x265e, 0x0C30}, -{0x2660, 0x0C30}, -{0x2662, 0x0C30}, -{0x2664, 0x0C30}, -{0x2666, 0x0C30}, -{0x2668, 0x0C30}, -{0x266a, 0x0C30}, -{0x266c, 0x0C30}, -{0x266e, 0x0C00}, -{0x2670, 0x02E8}, -{0x2672, 0x0000}, -{0x2674, 0x0C30}, -{0x2676, 0x0268}, -{0x2678, 0x0000}, -{0x267a, 0x0C18}, -{0x267c, 0x0260}, -{0x267e, 0x0000}, -{0x2680, 0x0C18}, -{0x2682, 0x531F}, -{0x2684, 0x9D0F}, -{0x2686, 0x2BD5}, -{0x2688, 0x5318}, -{0x268a, 0x9238}, -{0x268c, 0x2BC5}, -{0x268e, 0x0260}, -{0x2690, 0x0000}, -{0x2692, 0x5392}, -{0x2694, 0x80B8}, -{0x2696, 0x3F84}, -{0x2698, 0x432D}, -{0x269a, 0x3FBB}, -{0x269c, 0x903F}, -{0x269e, 0x0201}, -{0x26a0, 0x237F}, -{0x26a2, 0x5392}, -{0x26a4, 0x80B8}, -{0x26a6, 0x421F}, -{0x26a8, 0x80B8}, -{0x26aa, 0x12B0}, -{0x26ac, 0xFE38}, -{0x26ae, 0x3F78}, -{0x26b0, 0x931F}, -{0x26b2, 0x2376}, -{0x26b4, 0x12B0}, -{0x26b6, 0xFE26}, -{0x26b8, 0x4292}, -{0x26ba, 0x018A}, -{0x26bc, 0x80B8}, -{0x26be, 0x3FF3}, -{0x26c0, 0x4382}, -{0x26c2, 0x0B88}, -{0x26c4, 0x0C0A}, -{0x26c6, 0x4382}, -{0x26c8, 0x0B8A}, -{0x26ca, 0x0C0A}, -{0x26cc, 0x40B2}, -{0x26ce, 0x000C}, -{0x26d0, 0x0B8C}, -{0x26d2, 0x0C0A}, -{0x26d4, 0x40B2}, -{0x26d6, 0xB5E1}, -{0x26d8, 0x0B8E}, -{0x26da, 0x0C0A}, -{0x26dc, 0x40B2}, -{0x26de, 0x641C}, -{0x26e0, 0x0B92}, -{0x26e2, 0x0C0A}, -{0x26e4, 0x43C2}, -{0x26e6, 0x003D}, -{0x26e8, 0x4030}, -{0x26ea, 0xF02C}, -{0x26ec, 0x5231}, -{0x26ee, 0x4030}, -{0x26f0, 0xFE54}, -{0x26f2, 0xE3B2}, -{0x26f4, 0x740E}, -{0x26f6, 0x425F}, -{0x26f8, 0x0118}, -{0x26fa, 0xF37F}, -{0x26fc, 0x4F82}, -{0x26fe, 0x809A}, -{0x2700, 0x930F}, -{0x2702, 0x2005}, -{0x2704, 0x93C2}, -{0x2706, 0x0A82}, -{0x2708, 0x2402}, -{0x270a, 0x4392}, -{0x270c, 0x80D0}, -{0x270e, 0x9382}, -{0x2710, 0x809A}, -{0x2712, 0x2002}, -{0x2714, 0x4392}, -{0x2716, 0x8070}, -{0x2718, 0x421F}, -{0x271a, 0x710E}, -{0x271c, 0x93A2}, -{0x271e, 0x7110}, -{0x2720, 0x2411}, -{0x2722, 0x9382}, -{0x2724, 0x710E}, -{0x2726, 0x240C}, -{0x2728, 0x5292}, -{0x272a, 0x80A0}, -{0x272c, 0x7110}, -{0x272e, 0x4382}, -{0x2730, 0x740E}, -{0x2732, 0x9382}, -{0x2734, 0x80BA}, -{0x2736, 0x2402}, -{0x2738, 0x4392}, -{0x273a, 0x740E}, -{0x273c, 0x4392}, -{0x273e, 0x80BC}, -{0x2740, 0x430F}, -{0x2742, 0x4130}, -{0x2744, 0xF31F}, -{0x2746, 0x27ED}, -{0x2748, 0x40B2}, -{0x274a, 0x0003}, -{0x274c, 0x7110}, -{0x274e, 0x431F}, -{0x2750, 0x4130}, -{0x2752, 0x4F0E}, -{0x2754, 0x421D}, -{0x2756, 0x8070}, -{0x2758, 0x425F}, -{0x275a, 0x0118}, -{0x275c, 0xF37F}, -{0x275e, 0x903E}, -{0x2760, 0x0003}, -{0x2762, 0x2405}, -{0x2764, 0x931E}, -{0x2766, 0x2403}, -{0x2768, 0x0B00}, -{0x276a, 0x7302}, -{0x276c, 0x0384}, -{0x276e, 0x930F}, -{0x2770, 0x241A}, -{0x2772, 0x930D}, -{0x2774, 0x2018}, -{0x2776, 0x9382}, -{0x2778, 0x7308}, -{0x277a, 0x2402}, -{0x277c, 0x930E}, -{0x277e, 0x2419}, -{0x2780, 0x9382}, -{0x2782, 0x7328}, -{0x2784, 0x2402}, -{0x2786, 0x931E}, -{0x2788, 0x2414}, -{0x278a, 0x9382}, -{0x278c, 0x710E}, -{0x278e, 0x2402}, -{0x2790, 0x932E}, -{0x2792, 0x240F}, -{0x2794, 0x9382}, -{0x2796, 0x7114}, -{0x2798, 0x2402}, -{0x279a, 0x922E}, -{0x279c, 0x240A}, -{0x279e, 0x903E}, -{0x27a0, 0x0003}, -{0x27a2, 0x23DA}, -{0x27a4, 0x3C06}, -{0x27a6, 0x43C2}, -{0x27a8, 0x0A80}, -{0x27aa, 0x0B00}, -{0x27ac, 0x7302}, -{0x27ae, 0xFFF0}, -{0x27b0, 0x3FD3}, -{0x27b2, 0x4F82}, -{0x27b4, 0x809A}, -{0x27b6, 0x431F}, -{0x27b8, 0x4130}, -{0x27ba, 0x120B}, -{0x27bc, 0x120A}, -{0x27be, 0x1209}, -{0x27c0, 0x1208}, -{0x27c2, 0x1207}, -{0x27c4, 0x1206}, -{0x27c6, 0x1205}, -{0x27c8, 0x1204}, -{0x27ca, 0x8221}, -{0x27cc, 0x403B}, -{0x27ce, 0x0016}, -{0x27d0, 0x510B}, -{0x27d2, 0x4F08}, -{0x27d4, 0x4E09}, -{0x27d6, 0x4BA1}, -{0x27d8, 0x0000}, -{0x27da, 0x4B1A}, -{0x27dc, 0x0002}, -{0x27de, 0x4B91}, -{0x27e0, 0x0004}, -{0x27e2, 0x0002}, -{0x27e4, 0x4304}, -{0x27e6, 0x4305}, -{0x27e8, 0x4306}, -{0x27ea, 0x4307}, -{0x27ec, 0x9382}, -{0x27ee, 0x80B4}, -{0x27f0, 0x2425}, -{0x27f2, 0x438A}, -{0x27f4, 0x0000}, -{0x27f6, 0x430B}, -{0x27f8, 0x4B0F}, -{0x27fa, 0x5F0F}, -{0x27fc, 0x5F0F}, -{0x27fe, 0x580F}, -{0x2800, 0x4C8F}, -{0x2802, 0x0000}, -{0x2804, 0x4D8F}, -{0x2806, 0x0002}, -{0x2808, 0x4B0F}, -{0x280a, 0x5F0F}, -{0x280c, 0x590F}, -{0x280e, 0x41AF}, -{0x2810, 0x0000}, -{0x2812, 0x531B}, -{0x2814, 0x923B}, -{0x2816, 0x2BF0}, -{0x2818, 0x430B}, -{0x281a, 0x4B0F}, -{0x281c, 0x5F0F}, -{0x281e, 0x5F0F}, -{0x2820, 0x580F}, -{0x2822, 0x5F34}, -{0x2824, 0x6F35}, -{0x2826, 0x4B0F}, -{0x2828, 0x5F0F}, -{0x282a, 0x590F}, -{0x282c, 0x4F2E}, -{0x282e, 0x430F}, -{0x2830, 0x5E06}, -{0x2832, 0x6F07}, -{0x2834, 0x531B}, -{0x2836, 0x923B}, -{0x2838, 0x2BF0}, -{0x283a, 0x3C18}, -{0x283c, 0x4A2E}, -{0x283e, 0x4E0F}, -{0x2840, 0x5F0F}, -{0x2842, 0x5F0F}, -{0x2844, 0x580F}, -{0x2846, 0x4C8F}, -{0x2848, 0x0000}, -{0x284a, 0x4D8F}, -{0x284c, 0x0002}, -{0x284e, 0x5E0E}, -{0x2850, 0x590E}, -{0x2852, 0x41AE}, -{0x2854, 0x0000}, -{0x2856, 0x4A2F}, -{0x2858, 0x903F}, -{0x285a, 0x0007}, -{0x285c, 0x2404}, -{0x285e, 0x531F}, -{0x2860, 0x4F8A}, -{0x2862, 0x0000}, -{0x2864, 0x3FD9}, -{0x2866, 0x438A}, -{0x2868, 0x0000}, -{0x286a, 0x3FD6}, -{0x286c, 0x440C}, -{0x286e, 0x450D}, -{0x2870, 0x460A}, -{0x2872, 0x470B}, -{0x2874, 0x12B0}, -{0x2876, 0xFEAA}, -{0x2878, 0x4C08}, -{0x287a, 0x4D09}, -{0x287c, 0x4C0E}, -{0x287e, 0x430F}, -{0x2880, 0x4E0A}, -{0x2882, 0x4F0B}, -{0x2884, 0x460C}, -{0x2886, 0x470D}, -{0x2888, 0x12B0}, -{0x288a, 0xFE6E}, -{0x288c, 0x8E04}, -{0x288e, 0x7F05}, -{0x2890, 0x440E}, -{0x2892, 0x450F}, -{0x2894, 0xC312}, -{0x2896, 0x100F}, -{0x2898, 0x100E}, -{0x289a, 0x110F}, -{0x289c, 0x100E}, -{0x289e, 0x110F}, -{0x28a0, 0x100E}, -{0x28a2, 0x411D}, -{0x28a4, 0x0002}, -{0x28a6, 0x4E8D}, -{0x28a8, 0x0000}, -{0x28aa, 0x480F}, -{0x28ac, 0x5221}, -{0x28ae, 0x4134}, -{0x28b0, 0x4135}, -{0x28b2, 0x4136}, -{0x28b4, 0x4137}, -{0x28b6, 0x4138}, -{0x28b8, 0x4139}, -{0x28ba, 0x413A}, -{0x28bc, 0x413B}, -{0x28be, 0x4130}, -{0x28c0, 0x120A}, -{0x28c2, 0x4F0D}, -{0x28c4, 0x4E0C}, -{0x28c6, 0x425F}, -{0x28c8, 0x00BA}, -{0x28ca, 0x4F4A}, -{0x28cc, 0x503A}, -{0x28ce, 0x0010}, -{0x28d0, 0x931D}, -{0x28d2, 0x242B}, -{0x28d4, 0x932D}, -{0x28d6, 0x2421}, -{0x28d8, 0x903D}, -{0x28da, 0x0003}, -{0x28dc, 0x2418}, -{0x28de, 0x922D}, -{0x28e0, 0x2413}, -{0x28e2, 0x903D}, -{0x28e4, 0x0005}, -{0x28e6, 0x2407}, -{0x28e8, 0x903D}, -{0x28ea, 0x0006}, -{0x28ec, 0x2028}, -{0x28ee, 0xC312}, -{0x28f0, 0x100A}, -{0x28f2, 0x110A}, -{0x28f4, 0x3C24}, -{0x28f6, 0x4A0E}, -{0x28f8, 0xC312}, -{0x28fa, 0x100E}, -{0x28fc, 0x110E}, -{0x28fe, 0x4E0F}, -{0x2900, 0x110F}, -{0x2902, 0x4E0A}, -{0x2904, 0x5F0A}, -{0x2906, 0x3C1B}, -{0x2908, 0xC312}, -{0x290a, 0x100A}, -{0x290c, 0x3C18}, -{0x290e, 0x4A0E}, -{0x2910, 0xC312}, -{0x2912, 0x100E}, -{0x2914, 0x4E0F}, -{0x2916, 0x110F}, -{0x2918, 0x3FF3}, -{0x291a, 0x4A0F}, -{0x291c, 0xC312}, -{0x291e, 0x100F}, -{0x2920, 0x4F0E}, -{0x2922, 0x110E}, -{0x2924, 0x4F0A}, -{0x2926, 0x5E0A}, -{0x2928, 0x3C0A}, -{0x292a, 0x4A0F}, -{0x292c, 0xC312}, -{0x292e, 0x100F}, -{0x2930, 0x4F0E}, -{0x2932, 0x110E}, -{0x2934, 0x4F0A}, -{0x2936, 0x5E0A}, -{0x2938, 0x4E0F}, -{0x293a, 0x110F}, -{0x293c, 0x3FE3}, -{0x293e, 0x12B0}, -{0x2940, 0xFE58}, -{0x2942, 0x4E0F}, -{0x2944, 0xC312}, -{0x2946, 0x100F}, -{0x2948, 0x110F}, -{0x294a, 0x110F}, -{0x294c, 0x110F}, -{0x294e, 0x413A}, -{0x2950, 0x4130}, -{0x2952, 0x120B}, -{0x2954, 0x120A}, -{0x2956, 0x1209}, -{0x2958, 0x1208}, -{0x295a, 0x425F}, -{0x295c, 0x0080}, -{0x295e, 0xF36F}, -{0x2960, 0x4F0E}, -{0x2962, 0xF32E}, -{0x2964, 0x4E82}, -{0x2966, 0x80BA}, -{0x2968, 0xB3D2}, -{0x296a, 0x0786}, -{0x296c, 0x2402}, -{0x296e, 0x4392}, -{0x2970, 0x7002}, -{0x2972, 0x4392}, -{0x2974, 0x80BC}, -{0x2976, 0x4382}, -{0x2978, 0x740E}, -{0x297a, 0x9382}, -{0x297c, 0x80BA}, -{0x297e, 0x2402}, -{0x2980, 0x4392}, -{0x2982, 0x740E}, -{0x2984, 0x93C2}, -{0x2986, 0x00C6}, -{0x2988, 0x2406}, -{0x298a, 0xB392}, -{0x298c, 0x732A}, -{0x298e, 0x2403}, -{0x2990, 0xB3D2}, -{0x2992, 0x00C7}, -{0x2994, 0x2412}, -{0x2996, 0x4292}, -{0x2998, 0x01A8}, -{0x299a, 0x0688}, -{0x299c, 0x4292}, -{0x299e, 0x01AA}, -{0x29a0, 0x068A}, -{0x29a2, 0x4292}, -{0x29a4, 0x01AC}, -{0x29a6, 0x068C}, -{0x29a8, 0x4292}, -{0x29aa, 0x01AE}, -{0x29ac, 0x068E}, -{0x29ae, 0x4292}, -{0x29b0, 0x0190}, -{0x29b2, 0x0A92}, -{0x29b4, 0x4292}, -{0x29b6, 0x0192}, -{0x29b8, 0x0A94}, -{0x29ba, 0x430E}, -{0x29bc, 0x425F}, -{0x29be, 0x00C7}, -{0x29c0, 0xF35F}, -{0x29c2, 0xF37F}, -{0x29c4, 0xF21F}, -{0x29c6, 0x732A}, -{0x29c8, 0x200C}, -{0x29ca, 0xB3D2}, -{0x29cc, 0x00C7}, -{0x29ce, 0x2003}, -{0x29d0, 0xB392}, -{0x29d2, 0x80A2}, -{0x29d4, 0x2006}, -{0x29d6, 0xB3A2}, -{0x29d8, 0x732A}, -{0x29da, 0x2003}, -{0x29dc, 0x9382}, -{0x29de, 0x8096}, -{0x29e0, 0x2401}, -{0x29e2, 0x431E}, -{0x29e4, 0x4E82}, -{0x29e6, 0x80B4}, -{0x29e8, 0x930E}, -{0x29ea, 0x2002}, -{0x29ec, 0x4030}, -{0x29ee, 0xFDE4}, -{0x29f0, 0x4382}, -{0x29f2, 0x80BE}, -{0x29f4, 0x421F}, -{0x29f6, 0x732A}, -{0x29f8, 0xF31F}, -{0x29fa, 0x4F82}, -{0x29fc, 0x80A2}, -{0x29fe, 0x425F}, -{0x2a00, 0x008C}, -{0x2a02, 0x4FC2}, -{0x2a04, 0x8092}, -{0x2a06, 0x43C2}, -{0x2a08, 0x8093}, -{0x2a0a, 0x425F}, -{0x2a0c, 0x009E}, -{0x2a0e, 0x4F48}, -{0x2a10, 0x425F}, -{0x2a12, 0x009F}, -{0x2a14, 0xF37F}, -{0x2a16, 0x5F08}, -{0x2a18, 0x1108}, -{0x2a1a, 0x1108}, -{0x2a1c, 0x425F}, -{0x2a1e, 0x00B2}, -{0x2a20, 0x4F49}, -{0x2a22, 0x425F}, -{0x2a24, 0x00B3}, -{0x2a26, 0xF37F}, -{0x2a28, 0x5F09}, -{0x2a2a, 0x1109}, -{0x2a2c, 0x1109}, -{0x2a2e, 0x425F}, -{0x2a30, 0x00BA}, -{0x2a32, 0x4F4C}, -{0x2a34, 0x407A}, -{0x2a36, 0x001C}, -{0x2a38, 0x12B0}, -{0x2a3a, 0xFE8E}, -{0x2a3c, 0x934C}, -{0x2a3e, 0x25BE}, -{0x2a40, 0x403E}, -{0x2a42, 0x0080}, -{0x2a44, 0x4E0F}, -{0x2a46, 0xF37F}, -{0x2a48, 0x108F}, -{0x2a4a, 0xD03F}, -{0x2a4c, 0x008B}, -{0x2a4e, 0x4F82}, -{0x2a50, 0x0B88}, -{0x2a52, 0x0C0A}, -{0x2a54, 0x403C}, -{0x2a56, 0x0813}, -{0x2a58, 0x403D}, -{0x2a5a, 0x007F}, -{0x2a5c, 0x403F}, -{0x2a5e, 0x00BA}, -{0x2a60, 0x4F6E}, -{0x2a62, 0x90FF}, -{0x2a64, 0x0010}, -{0x2a66, 0x0000}, -{0x2a68, 0x2D13}, -{0x2a6a, 0x403C}, -{0x2a6c, 0x1005}, -{0x2a6e, 0x430D}, -{0x2a70, 0x425E}, -{0x2a72, 0x00BA}, -{0x2a74, 0x4E4F}, -{0x2a76, 0x108F}, -{0x2a78, 0xDD0F}, -{0x2a7a, 0x4F82}, -{0x2a7c, 0x0B90}, -{0x2a7e, 0x0C0A}, -{0x2a80, 0x4C82}, -{0x2a82, 0x0B8A}, -{0x2a84, 0x0C0A}, -{0x2a86, 0x425F}, -{0x2a88, 0x0C87}, -{0x2a8a, 0x4F4E}, -{0x2a8c, 0x425F}, -{0x2a8e, 0x0C88}, -{0x2a90, 0xF37F}, -{0x2a92, 0x12B0}, -{0x2a94, 0xF8C0}, -{0x2a96, 0x4F82}, -{0x2a98, 0x0C8C}, -{0x2a9a, 0x425F}, -{0x2a9c, 0x0C85}, -{0x2a9e, 0x4F4E}, -{0x2aa0, 0x425F}, -{0x2aa2, 0x0C89}, -{0x2aa4, 0xF37F}, -{0x2aa6, 0x12B0}, -{0x2aa8, 0xF8C0}, -{0x2aaa, 0x4F82}, -{0x2aac, 0x0C8A}, -{0x2aae, 0x425E}, -{0x2ab0, 0x00B7}, -{0x2ab2, 0x5E4E}, -{0x2ab4, 0x4EC2}, -{0x2ab6, 0x0CB0}, -{0x2ab8, 0x425F}, -{0x2aba, 0x00B8}, -{0x2abc, 0x5F4F}, -{0x2abe, 0x4FC2}, -{0x2ac0, 0x0CB1}, -{0x2ac2, 0x480E}, -{0x2ac4, 0x5E0E}, -{0x2ac6, 0x5E0E}, -{0x2ac8, 0x5E0E}, -{0x2aca, 0x5E0E}, -{0x2acc, 0x490F}, -{0x2ace, 0x5F0F}, -{0x2ad0, 0x5F0F}, -{0x2ad2, 0x5F0F}, -{0x2ad4, 0x5F0F}, -{0x2ad6, 0x5F0F}, -{0x2ad8, 0x5F0F}, -{0x2ada, 0x5F0F}, -{0x2adc, 0xDF0E}, -{0x2ade, 0x4E82}, -{0x2ae0, 0x0A8E}, -{0x2ae2, 0xB229}, -{0x2ae4, 0x2401}, -{0x2ae6, 0x5339}, -{0x2ae8, 0xB3E2}, -{0x2aea, 0x0080}, -{0x2aec, 0x2403}, -{0x2aee, 0x40F2}, -{0x2af0, 0x0003}, -{0x2af2, 0x00B5}, -{0x2af4, 0x40B2}, -{0x2af6, 0x1000}, -{0x2af8, 0x7500}, -{0x2afa, 0x40B2}, -{0x2afc, 0x1001}, -{0x2afe, 0x7502}, -{0x2b00, 0x40B2}, -{0x2b02, 0x0803}, -{0x2b04, 0x7504}, -{0x2b06, 0x40B2}, -{0x2b08, 0x080F}, -{0x2b0a, 0x7506}, -{0x2b0c, 0x40B2}, -{0x2b0e, 0x6003}, -{0x2b10, 0x7508}, -{0x2b12, 0x40B2}, -{0x2b14, 0x0801}, -{0x2b16, 0x750A}, -{0x2b18, 0x40B2}, -{0x2b1a, 0x0800}, -{0x2b1c, 0x750C}, -{0x2b1e, 0x40B2}, -{0x2b20, 0x1400}, -{0x2b22, 0x750E}, -{0x2b24, 0x403F}, -{0x2b26, 0x0003}, -{0x2b28, 0x12B0}, -{0x2b2a, 0xF752}, -{0x2b2c, 0x421F}, -{0x2b2e, 0x0098}, -{0x2b30, 0x821F}, -{0x2b32, 0x0092}, -{0x2b34, 0x531F}, -{0x2b36, 0xC312}, -{0x2b38, 0x100F}, -{0x2b3a, 0x4F82}, -{0x2b3c, 0x0A86}, -{0x2b3e, 0x421F}, -{0x2b40, 0x00AC}, -{0x2b42, 0x821F}, -{0x2b44, 0x00A6}, -{0x2b46, 0x531F}, -{0x2b48, 0x4F82}, -{0x2b4a, 0x0A88}, -{0x2b4c, 0xB0B2}, -{0x2b4e, 0x0010}, -{0x2b50, 0x0A84}, -{0x2b52, 0x248F}, -{0x2b54, 0x421E}, -{0x2b56, 0x068C}, -{0x2b58, 0xC312}, -{0x2b5a, 0x100E}, -{0x2b5c, 0x4E82}, -{0x2b5e, 0x0782}, -{0x2b60, 0x4292}, -{0x2b62, 0x068E}, -{0x2b64, 0x0784}, -{0x2b66, 0xB3D2}, -{0x2b68, 0x0CB6}, -{0x2b6a, 0x2418}, -{0x2b6c, 0x421A}, -{0x2b6e, 0x0CB8}, -{0x2b70, 0x430B}, -{0x2b72, 0x425F}, -{0x2b74, 0x0CBA}, -{0x2b76, 0x4F4E}, -{0x2b78, 0x430F}, -{0x2b7a, 0x4E0F}, -{0x2b7c, 0x430E}, -{0x2b7e, 0xDE0A}, -{0x2b80, 0xDF0B}, -{0x2b82, 0x421F}, -{0x2b84, 0x0CBC}, -{0x2b86, 0x4F0C}, -{0x2b88, 0x430D}, -{0x2b8a, 0x421F}, -{0x2b8c, 0x0CBE}, -{0x2b8e, 0x430E}, -{0x2b90, 0xDE0C}, -{0x2b92, 0xDF0D}, -{0x2b94, 0x12B0}, -{0x2b96, 0xFEAA}, -{0x2b98, 0x4C82}, -{0x2b9a, 0x0194}, -{0x2b9c, 0xB2A2}, -{0x2b9e, 0x0A84}, -{0x2ba0, 0x2412}, -{0x2ba2, 0x421E}, -{0x2ba4, 0x0A96}, -{0x2ba6, 0xC312}, -{0x2ba8, 0x100E}, -{0x2baa, 0x110E}, -{0x2bac, 0x110E}, -{0x2bae, 0x43C2}, -{0x2bb0, 0x0A98}, -{0x2bb2, 0x431D}, -{0x2bb4, 0x4E0F}, -{0x2bb6, 0x9F82}, -{0x2bb8, 0x0194}, -{0x2bba, 0x2850}, -{0x2bbc, 0x5E0F}, -{0x2bbe, 0x531D}, -{0x2bc0, 0x903D}, -{0x2bc2, 0x0009}, -{0x2bc4, 0x2BF8}, -{0x2bc6, 0x4292}, -{0x2bc8, 0x0084}, -{0x2bca, 0x7524}, -{0x2bcc, 0x4292}, -{0x2bce, 0x0088}, -{0x2bd0, 0x7316}, -{0x2bd2, 0x9382}, -{0x2bd4, 0x8092}, -{0x2bd6, 0x2403}, -{0x2bd8, 0x4292}, -{0x2bda, 0x008A}, -{0x2bdc, 0x7316}, -{0x2bde, 0x430E}, -{0x2be0, 0x421F}, -{0x2be2, 0x0086}, -{0x2be4, 0x822F}, -{0x2be6, 0x9F82}, -{0x2be8, 0x0084}, -{0x2bea, 0x2801}, -{0x2bec, 0x431E}, -{0x2bee, 0x4292}, -{0x2bf0, 0x0086}, -{0x2bf2, 0x7314}, -{0x2bf4, 0x93C2}, -{0x2bf6, 0x00BC}, -{0x2bf8, 0x2007}, -{0x2bfa, 0xB31E}, -{0x2bfc, 0x2405}, -{0x2bfe, 0x421F}, -{0x2c00, 0x0084}, -{0x2c02, 0x522F}, -{0x2c04, 0x4F82}, -{0x2c06, 0x7314}, -{0x2c08, 0x425F}, -{0x2c0a, 0x00BC}, -{0x2c0c, 0xF37F}, -{0x2c0e, 0xFE0F}, -{0x2c10, 0x2406}, -{0x2c12, 0x421E}, -{0x2c14, 0x0086}, -{0x2c16, 0x503E}, -{0x2c18, 0xFFFB}, -{0x2c1a, 0x4E82}, -{0x2c1c, 0x7524}, -{0x2c1e, 0x430E}, -{0x2c20, 0x421F}, -{0x2c22, 0x7524}, -{0x2c24, 0x9F82}, -{0x2c26, 0x809C}, -{0x2c28, 0x2C07}, -{0x2c2a, 0x9382}, -{0x2c2c, 0x8096}, -{0x2c2e, 0x2004}, -{0x2c30, 0x9382}, -{0x2c32, 0x8098}, -{0x2c34, 0x2001}, -{0x2c36, 0x431E}, -{0x2c38, 0x40B2}, -{0x2c3a, 0x0032}, -{0x2c3c, 0x7522}, -{0x2c3e, 0x4292}, -{0x2c40, 0x7524}, -{0x2c42, 0x809C}, -{0x2c44, 0x930E}, -{0x2c46, 0x24E6}, -{0x2c48, 0x421F}, -{0x2c4a, 0x7316}, -{0x2c4c, 0xC312}, -{0x2c4e, 0x100F}, -{0x2c50, 0x832F}, -{0x2c52, 0x4F82}, -{0x2c54, 0x7522}, -{0x2c56, 0x53B2}, -{0x2c58, 0x7524}, -{0x2c5a, 0x3CDC}, -{0x2c5c, 0x431F}, -{0x2c5e, 0x4D0E}, -{0x2c60, 0x533E}, -{0x2c62, 0x930E}, -{0x2c64, 0x2403}, -{0x2c66, 0x5F0F}, -{0x2c68, 0x831E}, -{0x2c6a, 0x23FD}, -{0x2c6c, 0x4FC2}, -{0x2c6e, 0x0A98}, -{0x2c70, 0x3FAA}, -{0x2c72, 0x4292}, -{0x2c74, 0x0A86}, -{0x2c76, 0x0782}, -{0x2c78, 0x421F}, -{0x2c7a, 0x0A88}, -{0x2c7c, 0x490E}, -{0x2c7e, 0x930E}, -{0x2c80, 0x2404}, -{0x2c82, 0xC312}, -{0x2c84, 0x100F}, -{0x2c86, 0x831E}, -{0x2c88, 0x23FC}, -{0x2c8a, 0x4F82}, -{0x2c8c, 0x0784}, -{0x2c8e, 0x3F6B}, -{0x2c90, 0x90F2}, -{0x2c92, 0x0010}, -{0x2c94, 0x00BA}, -{0x2c96, 0x2809}, -{0x2c98, 0x90F2}, -{0x2c9a, 0x0031}, -{0x2c9c, 0x00BA}, -{0x2c9e, 0x2C05}, -{0x2ca0, 0x403C}, -{0x2ca2, 0x0E05}, -{0x2ca4, 0x403D}, -{0x2ca6, 0x003C}, -{0x2ca8, 0x3EE3}, -{0x2caa, 0x90F2}, -{0x2cac, 0x0031}, -{0x2cae, 0x00BA}, -{0x2cb0, 0x280D}, -{0x2cb2, 0x90F2}, -{0x2cb4, 0x0039}, -{0x2cb6, 0x00BA}, -{0x2cb8, 0x2C09}, -{0x2cba, 0x403C}, -{0x2cbc, 0x0E09}, -{0x2cbe, 0x403D}, -{0x2cc0, 0x003C}, -{0x2cc2, 0x425E}, -{0x2cc4, 0x00BA}, -{0x2cc6, 0x507E}, -{0x2cc8, 0x0003}, -{0x2cca, 0x3ED4}, -{0x2ccc, 0x90F2}, -{0x2cce, 0x0039}, -{0x2cd0, 0x00BA}, -{0x2cd2, 0x280D}, -{0x2cd4, 0x90F2}, -{0x2cd6, 0x0041}, -{0x2cd8, 0x00BA}, -{0x2cda, 0x2C09}, -{0x2cdc, 0x403C}, -{0x2cde, 0x0C0B}, -{0x2ce0, 0x403D}, -{0x2ce2, 0x003C}, -{0x2ce4, 0x425E}, -{0x2ce6, 0x00BA}, -{0x2ce8, 0x507E}, -{0x2cea, 0x0005}, -{0x2cec, 0x3EC3}, -{0x2cee, 0x90F2}, -{0x2cf0, 0x0041}, -{0x2cf2, 0x00BA}, -{0x2cf4, 0x280D}, -{0x2cf6, 0x90F2}, -{0x2cf8, 0x0051}, -{0x2cfa, 0x00BA}, -{0x2cfc, 0x2C09}, -{0x2cfe, 0x403C}, -{0x2d00, 0x0A0F}, -{0x2d02, 0x403D}, -{0x2d04, 0x003C}, -{0x2d06, 0x425E}, -{0x2d08, 0x00BA}, -{0x2d0a, 0x507E}, -{0x2d0c, 0x0009}, -{0x2d0e, 0x3EB2}, -{0x2d10, 0x90F2}, -{0x2d12, 0x0051}, -{0x2d14, 0x00BA}, -{0x2d16, 0x280D}, -{0x2d18, 0x90F2}, -{0x2d1a, 0x0061}, -{0x2d1c, 0x00BA}, -{0x2d1e, 0x2C09}, -{0x2d20, 0x403C}, -{0x2d22, 0x0A11}, -{0x2d24, 0x403D}, -{0x2d26, 0x003C}, -{0x2d28, 0x425E}, -{0x2d2a, 0x00BA}, -{0x2d2c, 0x507E}, -{0x2d2e, 0x000B}, -{0x2d30, 0x3EA1}, -{0x2d32, 0x90F2}, -{0x2d34, 0x0061}, -{0x2d36, 0x00BA}, -{0x2d38, 0x2807}, -{0x2d3a, 0x90F2}, -{0x2d3c, 0x0075}, -{0x2d3e, 0x00BA}, -{0x2d40, 0x2C03}, -{0x2d42, 0x403C}, -{0x2d44, 0x0813}, -{0x2d46, 0x3FF0}, -{0x2d48, 0x90F2}, -{0x2d4a, 0x0075}, -{0x2d4c, 0x00BA}, -{0x2d4e, 0x280B}, -{0x2d50, 0x90F2}, -{0x2d52, 0xFF91}, -{0x2d54, 0x00BA}, -{0x2d56, 0x2C07}, -{0x2d58, 0x403C}, -{0x2d5a, 0x0813}, -{0x2d5c, 0x425E}, -{0x2d5e, 0x00BA}, -{0x2d60, 0x507E}, -{0x2d62, 0x000C}, -{0x2d64, 0x3E87}, -{0x2d66, 0x90F2}, -{0x2d68, 0xFF91}, -{0x2d6a, 0x00BA}, -{0x2d6c, 0x280B}, -{0x2d6e, 0x90F2}, -{0x2d70, 0xFFB1}, -{0x2d72, 0x00BA}, -{0x2d74, 0x2C07}, -{0x2d76, 0x403D}, -{0x2d78, 0x0060}, -{0x2d7a, 0x425E}, -{0x2d7c, 0x00BA}, -{0x2d7e, 0x507E}, -{0x2d80, 0x000D}, -{0x2d82, 0x3E78}, -{0x2d84, 0x90F2}, -{0x2d86, 0xFFB1}, -{0x2d88, 0x00BA}, -{0x2d8a, 0x280B}, -{0x2d8c, 0x90F2}, -{0x2d8e, 0xFFD1}, -{0x2d90, 0x00BA}, -{0x2d92, 0x2C07}, -{0x2d94, 0x403D}, -{0x2d96, 0x0050}, -{0x2d98, 0x425E}, -{0x2d9a, 0x00BA}, -{0x2d9c, 0x507E}, -{0x2d9e, 0x000E}, -{0x2da0, 0x3E69}, -{0x2da2, 0x403D}, -{0x2da4, 0x003C}, -{0x2da6, 0x403F}, -{0x2da8, 0x00BA}, -{0x2daa, 0x4F6E}, -{0x2dac, 0x507E}, -{0x2dae, 0x000F}, -{0x2db0, 0x90FF}, -{0x2db2, 0xFFF1}, -{0x2db4, 0x0000}, -{0x2db6, 0x2A5E}, -{0x2db8, 0x437E}, -{0x2dba, 0x3E5C}, -{0x2dbc, 0x425F}, -{0x2dbe, 0x00BA}, -{0x2dc0, 0x4F4C}, -{0x2dc2, 0x407A}, -{0x2dc4, 0x001C}, -{0x2dc6, 0x12B0}, -{0x2dc8, 0xFE8E}, -{0x2dca, 0x4E4F}, -{0x2dcc, 0xC312}, -{0x2dce, 0x104F}, -{0x2dd0, 0x114F}, -{0x2dd2, 0xF37F}, -{0x2dd4, 0x5F0F}, -{0x2dd6, 0x5F0F}, -{0x2dd8, 0x5F0F}, -{0x2dda, 0x5F0F}, -{0x2ddc, 0x403E}, -{0x2dde, 0x00F0}, -{0x2de0, 0x8F0E}, -{0x2de2, 0x3E30}, -{0x2de4, 0x421F}, -{0x2de6, 0x80BE}, -{0x2de8, 0x903F}, -{0x2dea, 0x0009}, -{0x2dec, 0x2C05}, -{0x2dee, 0x531F}, -{0x2df0, 0x4F82}, -{0x2df2, 0x80BE}, -{0x2df4, 0x4030}, -{0x2df6, 0xF9F4}, -{0x2df8, 0x421F}, -{0x2dfa, 0x80B6}, -{0x2dfc, 0x903F}, -{0x2dfe, 0x0098}, -{0x2e00, 0x2C05}, -{0x2e02, 0x531F}, -{0x2e04, 0x4F82}, -{0x2e06, 0x80B6}, -{0x2e08, 0x4030}, -{0x2e0a, 0xF9F4}, -{0x2e0c, 0x4382}, -{0x2e0e, 0x80B6}, -{0x2e10, 0x4030}, -{0x2e12, 0xF9F4}, -{0x2e14, 0x4E82}, -{0x2e16, 0x8098}, -{0x2e18, 0xD392}, -{0x2e1a, 0x7102}, -{0x2e1c, 0x4138}, -{0x2e1e, 0x4139}, -{0x2e20, 0x413A}, -{0x2e22, 0x413B}, -{0x2e24, 0x4130}, -{0x2e26, 0x0260}, -{0x2e28, 0x0000}, -{0x2e2a, 0x0C18}, -{0x2e2c, 0x0240}, -{0x2e2e, 0x0000}, -{0x2e30, 0x0260}, -{0x2e32, 0x0000}, -{0x2e34, 0x0C05}, -{0x2e36, 0x4130}, -{0x2e38, 0x4382}, -{0x2e3a, 0x7602}, -{0x2e3c, 0x4F82}, -{0x2e3e, 0x7600}, -{0x2e40, 0x0270}, -{0x2e42, 0x0000}, -{0x2e44, 0x0C07}, -{0x2e46, 0x0270}, -{0x2e48, 0x0001}, -{0x2e4a, 0x421F}, -{0x2e4c, 0x7606}, -{0x2e4e, 0x4FC2}, -{0x2e50, 0x0188}, -{0x2e52, 0x4130}, -{0x2e54, 0xDF02}, -{0x2e56, 0x3FFE}, -{0x2e58, 0x430E}, -{0x2e5a, 0x930A}, -{0x2e5c, 0x2407}, -{0x2e5e, 0xC312}, -{0x2e60, 0x100C}, -{0x2e62, 0x2801}, -{0x2e64, 0x5A0E}, -{0x2e66, 0x5A0A}, -{0x2e68, 0x930C}, -{0x2e6a, 0x23F7}, -{0x2e6c, 0x4130}, -{0x2e6e, 0x430E}, -{0x2e70, 0x430F}, -{0x2e72, 0x3C08}, -{0x2e74, 0xC312}, -{0x2e76, 0x100D}, -{0x2e78, 0x100C}, -{0x2e7a, 0x2802}, -{0x2e7c, 0x5A0E}, -{0x2e7e, 0x6B0F}, -{0x2e80, 0x5A0A}, -{0x2e82, 0x6B0B}, -{0x2e84, 0x930C}, -{0x2e86, 0x23F6}, -{0x2e88, 0x930D}, -{0x2e8a, 0x23F4}, -{0x2e8c, 0x4130}, -{0x2e8e, 0xEE4E}, -{0x2e90, 0x407B}, -{0x2e92, 0x0009}, -{0x2e94, 0x3C05}, -{0x2e96, 0x100D}, -{0x2e98, 0x6E4E}, -{0x2e9a, 0x9A4E}, -{0x2e9c, 0x2801}, -{0x2e9e, 0x8A4E}, -{0x2ea0, 0x6C4C}, -{0x2ea2, 0x6D0D}, -{0x2ea4, 0x835B}, -{0x2ea6, 0x23F7}, -{0x2ea8, 0x4130}, -{0x2eaa, 0xEF0F}, -{0x2eac, 0xEE0E}, -{0x2eae, 0x4039}, -{0x2eb0, 0x0021}, -{0x2eb2, 0x3C0A}, -{0x2eb4, 0x1008}, -{0x2eb6, 0x6E0E}, -{0x2eb8, 0x6F0F}, -{0x2eba, 0x9B0F}, -{0x2ebc, 0x2805}, -{0x2ebe, 0x2002}, -{0x2ec0, 0x9A0E}, -{0x2ec2, 0x2802}, -{0x2ec4, 0x8A0E}, -{0x2ec6, 0x7B0F}, -{0x2ec8, 0x6C0C}, -{0x2eca, 0x6D0D}, -{0x2ecc, 0x6808}, -{0x2ece, 0x8319}, -{0x2ed0, 0x23F1}, -{0x2ed2, 0x4130}, -{0x2ed4, 0x0000}, -{0x2ffe, 0xf000}, -{0x3000, 0x00AE}, -{0x3002, 0x00AE}, -{0x3004, 0x00AE}, -{0x3006, 0x00AE}, -{0x3008, 0x00AE}, -{0x4000, 0x0400}, -{0x4002, 0x0400}, -{0x4004, 0x0C04}, -{0x4006, 0x0C04}, -{0x4008, 0x0C04}, - -//--- FW End ---// - - -//--- Initial Set file ---// -{0x0B02, 0x0014}, -{0x0B04, 0x07C8}, -{0x0B06, 0x5ED7}, -{0x0B14, 0x430F}, //PLL Main Div[15:8]. Mclk 26.022Mhz / 0x430F = Pclk(87.174Mhz) -{0x0B16, 0x4A0B}, -{0x0B18, 0x0000}, -{0x0B1A, 0x1044}, - -{0x004C, 0x0100}, //tg_enable. -{0x000C, 0x0000}, -{0x0036, 0x0048}, //ramp_rst_offset -{0x0038, 0x4800}, //ramp_sig_poffset -{0x0138, 0x0104}, //pxl_drv_pwr -{0x013A, 0x0100}, //tx_idle -{0x0C00, 0x3BC7}, //BLC_ctl1. Line BLC on = 0x3b, off = 0x2A //LBLC_ctl1. [0]en_blc, [1]en_lblc_dpc, [2]en_channel_blc, [3]en_adj_pxl_dpc, [4]en_adp_dead_pxl_th -{0x0C0E, 0x0500}, //0x07 BLC display On, 0x05 BLC D off //BLC_ctl3. Frame BLC On = 0x05, off=0x04 //FBLC_ctl3. [0]en_fblc, [1]en_blc_bypass, [2]en_fblc_dpc, [5]en_fobp_dig_offset, [7]en_lobp_dpc_bypass -{0x0C10, 0x0510}, //dig_blc_offset_h -{0x0C16, 0x0000}, //fobp_dig_b_offset. red b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C18, 0x0000}, //fobp_dig_Gb_offset. Gr b[7] sign(0:+,1:-), b[6:0] dc offset 128(max) -{0x0C36, 0x0100}, //r_g_sum_ctl. [0]:g_sum_en. '1'enable, '0'disable. - -//--- MIPI blank time --------------// -{0x0902, 0x4101}, //mipi_value_clk_trail. MIPI CLK mode [1]'1'cont(0x43),'0'non-cont(0x41) [6]'1'2lane(0x41), '0'1lane(0x01) -{0x090A, 0x03E4}, //mipi_vblank_delay_h. -{0x090C, 0x0020}, //mipi_hblank_short_delay_h. -{0x090E, 0x0020}, //mipi_hblank_long_delay_h. -{0x0910, 0x5D07}, //05 mipi_LPX -{0x0912, 0x061e}, //05 mipi_CLK_prepare -{0x0914, 0x0407}, //02 mipi_clk_pre -{0x0916, 0x0d0a}, //09 mipi_data_zero -{0x0918, 0x0e09}, //0c mipi_clk_post - -//--- Pixel Array Addressing ------// -{0x000E, 0x0000}, -{0x0014, 0x003F}, -{0x0010, 0x0050}, -{0x0016, 0x008F}, -{0x0012, 0x00AA}, -{0x0018, 0x0ACD}, -{0x0020, 0x0700}, -{0x0022, 0x0004}, -{0x0028, 0x000B}, -{0x0024, 0xFFFA}, -{0x002A, 0xFFFF}, -{0x0026, 0x0016}, -{0x002C, 0x07b1}, -{0x0034, 0x0700}, - -{0x0128, 0x0002}, // digital_crop_x_offset_l -{0x012A, 0x0000}, // digital_crop_y_offset_l -{0x012C, 0x0A20}, //2C}, //2592 digital_crop_image_width -{0x012E, 0x0798}, //A4}, //1944 digital_crop_image_height - -//----< Image FMT Size >--------------------// -//Image size 2592x1944 -{0x0110, 0x0A20}, //X_output_size_h -{0x0112, 0x0798}, //Y_output_size_h - -//----< Frame / Line Length >--------------// -{0x0006, 0x07c0}, //frame_length_h 1984 -{0x0008, 0x0B40}, //line_length_h 2880 -{0x000A, 0x0DB0}, -//---------------------------------------// -//--- ETC set ----// -{0x003C, 0x0000}, //fixed frame off. b[0] '1'enable, '0'disable -{0x0500, 0x0000}, //DGA_ctl. b[1]'0'OTP_color_ratio_disable, '1' OTP_color_ratio_enable, b[2]'0'data_pedestal_en, '1'data_pedestal_dis. -{0x0700, 0x0590}, //Scaler Normal -{0x001E, 0x0101}, -{0x0032, 0x0101}, -{0x0A02, 0x0100}, // Fast sleep Enable -{0x0C12, 0x0100}, // BLC Offset -{0x0116, 0x0024}, // FBLC Ratio -//----------------// - -//--- AG / DG control ----------------// -//AG -{0x003A, 0x0000}, //Analog Gain. 0x00=x1, 0x70=x8, 0xf0=x16. - -//DG -{0x0508, 0x0100}, //DG_Gr_h. 0x01=x1, 0x07=x8. -{0x050a, 0x0100}, //DG_Gb_h. 0x01=x1, 0x07=x8. -{0x050c, 0x0100}, //DG_R_h. 0x01=x1, 0x07=x8. -{0x050e, 0x0100}, //DG_B_h. 0x01=x1, 0x07=x8. -//----------------------------------// - -//-----< Exp.Time >------------------------// -// Pclk_88Mhz @ Line_length_pclk : 2880 @Exp.Time 33.33ms -{0x0002, 0x0539}, //Fine_int : 33.33ms@Pclk88mhz@Line_length2880 -{0x0004, 0x07E0}, //coarse_int : 33.33ms@Pclk88mhz@Line_length2880 - -//--- ISP enable Selection ---------------// -{0x0A04, 0x011A}, //isp_en. [9]s-gamma,[8]MIPI_en,[6]compresion10to8,[5]Scaler,[4]window,[3]DG,[2]LSC,[1]adpc,[0]tpg -//----------------------------------------// - -{0x0118, 0x0100}, //sleep Off -}; - -struct msm_camera_i2c_reg_setting sr544_init = { - sr544_init_reg, sizeof(sr544_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0118, 0x00, 0x00, 100}, //sleep On - {0x0F02, 0x00, 0x00, 0}, - {0x011A, 0x01, 0x00, 0}, - {0x011B, 0x09, 0x00, 0}, - {0x0D04, 0x01, 0x00, 0}, - {0x0D00, 0x07, 0x00, 0}, - {0x004C, 0x01, 0x00, 0}, - {0x003E, 0x01, 0x00, 0}, - {0x0118, 0x01, 0x00, 0}, -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr552.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr552.h deleted file mode 100644 index 8354c3ff7131..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/eeprom/msm_otp_sr552.h +++ /dev/null @@ -1,2153 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_EEPROM_H -#define MSM_EEPROM_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_spi.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - -struct msm_eeprom_ctrl_t; - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define PROPERTY_MAXSIZE 32 -#define EEPROM_FW_VERSION_OFFSET 48 -#define r_otp_addr_h 0x010A -#define r_otp_addr_l 0x010B -#define r_otp_cmd 0x0102 -#define r_otp_wdata 0x0106 -#define r_otp_rdata 0x0108 - -struct msm_eeprom_ctrl_t { - struct platform_device *pdev; - struct mutex *eeprom_mutex; - - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *eeprom_v4l2_subdev_ops; - enum msm_camera_device_type_t eeprom_device_type; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_master; - - struct msm_camera_i2c_client i2c_client; - struct msm_eeprom_memory_block_t cal_data; - uint8_t is_supported; - struct msm_eeprom_board_info *eboard_info; - uint32_t subdev_id; -}; - -static struct msm_camera_i2c_reg_array sr552_init_reg[] = { -{0x0e00, 0x0102}, //tg_pmem_sckpw/sdly -{0x0e02, 0x0102}, //tg_dmem_sckpw/sdly -{0x0e04, 0x0102}, //tg_lsc_sram_sckpw/sdly -{0x2000, 0x7400}, -{0x2002, 0x1303}, -{0x2004, 0x7006}, -{0x2006, 0x1303}, -{0x2008, 0x0bd4}, -{0x200a, 0x5001}, -{0x200c, 0x5021}, -{0x200e, 0x0047}, -{0x2010, 0x0044}, -{0x2012, 0x03c4}, -{0x2014, 0x14c9}, -{0x2016, 0x207c}, -{0x2018, 0x0053}, -{0x201a, 0x0fd1}, -{0x201c, 0x00d2}, -{0x201e, 0x00a3}, -{0x2020, 0x00c9}, -{0x2022, 0x030b}, -{0x2024, 0x7008}, -{0x2026, 0x82c0}, -{0x2028, 0x01d9}, -{0x202a, 0x0024}, -{0x202c, 0x0018}, -{0x202e, 0x7006}, -{0x2030, 0x0fe4}, -{0x2032, 0x0018}, -{0x2034, 0x20fa}, -{0x2036, 0x1640}, -{0x2038, 0x7014}, -{0x203a, 0x14c0}, -{0x203c, 0x0253}, -{0x203e, 0x0d45}, -{0x2040, 0x00cc}, -{0x2042, 0x00c5}, -{0x2044, 0x00cc}, -{0x2046, 0x04d9}, -{0x2048, 0x20fc}, -{0x204a, 0x0018}, -{0x204c, 0x70d2}, -{0x204e, 0x2ffa}, -{0x2050, 0x17d8}, -{0x2052, 0x0024}, -{0x2054, 0x8351}, -{0x2056, 0x2128}, -{0x2058, 0x2100}, -{0x205a, 0x7047}, -{0x205c, 0x2f06}, -{0x205e, 0x2300}, -{0x2060, 0x7800}, -{0x2062, 0x7400}, -{0x2064, 0x0005}, -{0x2066, 0x7002}, -{0x2068, 0x1303}, -{0x206a, 0x00c5}, -{0x206c, 0x5083}, -{0x206e, 0x0047}, -{0x2070, 0x0044}, -{0x2072, 0x02d4}, -{0x2074, 0x7000}, -{0x2076, 0x85d0}, -{0x2078, 0x0044}, -{0x207a, 0x0009}, -{0x207c, 0x206c}, -{0x207e, 0x7001}, -{0x2080, 0x0fd1}, -{0x2082, 0x00d2}, -{0x2084, 0x00a3}, -{0x2086, 0x0020}, -{0x2088, 0x0089}, -{0x208a, 0x030b}, -{0x208c, 0x0459}, -{0x208e, 0x0024}, -{0x2090, 0x0018}, -{0x2092, 0x05a4}, -{0x2094, 0x0018}, -{0x2096, 0x20fa}, -{0x2098, 0x50c0}, -{0x209a, 0x0540}, -{0x209c, 0x0053}, -{0x209e, 0x0c45}, -{0x20a0, 0x00cc}, -{0x20a2, 0x00c5}, -{0x20a4, 0x00cc}, -{0x20a6, 0x04d9}, -{0x20a8, 0x20fc}, -{0x20aa, 0x0018}, -{0x20ac, 0x703a}, -{0x20ae, 0x2ffa}, -{0x20b0, 0x17d8}, -{0x20b2, 0x0024}, -{0x20b4, 0x8757}, -{0x20b6, 0x2128}, -{0x20b8, 0x2100}, -{0x20ba, 0x7800}, -{0x20bc, 0x3100}, -{0x20be, 0x01c6}, -{0x20c0, 0x01c4}, -{0x20c2, 0x01c0}, -{0x20c4, 0x01c6}, -{0x20c6, 0x2700}, -{0x20c8, 0x3300}, -{0x20ca, 0x7800}, -{0x20cc, 0x4031}, -{0x20ce, 0x83fa}, -{0x20d0, 0x43c2}, -{0x20d2, 0x807c}, -{0x20d4, 0x93d2}, -{0x20d6, 0x003d}, -{0x20d8, 0x2002}, -{0x20da, 0x4030}, -{0x20dc, 0xf712}, -{0x20de, 0x0900}, -{0x20e0, 0x7312}, -{0x20e2, 0x43d2}, -{0x20e4, 0x003d}, -{0x20e6, 0x4392}, -{0x20e8, 0x7326}, -{0x20ea, 0x4382}, -{0x20ec, 0x82f4}, -{0x20ee, 0xb3e2}, -{0x20f0, 0x0080}, -{0x20f2, 0x2402}, -{0x20f4, 0x4392}, -{0x20f6, 0x82f4}, -{0x20f8, 0x425f}, -{0x20fa, 0x008c}, -{0x20fc, 0xf37f}, -{0x20fe, 0x4f82}, -{0x2100, 0x8058}, -{0x2102, 0x40b2}, -{0x2104, 0x9887}, -{0x2106, 0x0b82}, -{0x2108, 0x40b2}, -{0x210a, 0xc540}, -{0x210c, 0x0b84}, -{0x210e, 0x40b2}, -{0x2110, 0xb540}, -{0x2112, 0x0b86}, -{0x2114, 0x40b2}, -{0x2116, 0xc085}, -{0x2118, 0x0b88}, -{0x211a, 0x40b2}, -{0x211c, 0xd651}, -{0x211e, 0x0b8a}, -{0x2120, 0x40b2}, -{0x2122, 0x0440}, -{0x2124, 0x0b8c}, -{0x2126, 0x40b2}, -{0x2128, 0xc600}, -{0x212a, 0x0b8e}, -{0x212c, 0x4392}, -{0x212e, 0x0ba6}, -{0x2130, 0x930f}, -{0x2132, 0x2406}, -{0x2134, 0x40b2}, -{0x2136, 0xdc55}, -{0x2138, 0x0b8a}, -{0x213a, 0x40b2}, -{0x213c, 0xc608}, -{0x213e, 0x0b8e}, -{0x2140, 0x43d2}, -{0x2142, 0x01a0}, -{0x2144, 0x43d2}, -{0x2146, 0x01a1}, -{0x2148, 0x43d2}, -{0x214a, 0x019d}, -{0x214c, 0x43d2}, -{0x214e, 0x0f82}, -{0x2150, 0x0cff}, -{0x2152, 0x0cff}, -{0x2154, 0x0cff}, -{0x2156, 0x0cff}, -{0x2158, 0x0cff}, -{0x215a, 0x0cff}, -{0x215c, 0x0cff}, -{0x215e, 0x0cff}, -{0x2160, 0x0cff}, -{0x2162, 0x0cff}, -{0x2164, 0x0cff}, -{0x2166, 0x0cff}, -{0x2168, 0x0cff}, -{0x216a, 0x0cff}, -{0x216c, 0x0cff}, -{0x216e, 0x0c28}, -{0x2170, 0x40f2}, -{0x2172, 0x000e}, -{0x2174, 0x0f90}, -{0x2176, 0x4392}, -{0x2178, 0x7326}, -{0x217a, 0x90f2}, -{0x217c, 0x0010}, -{0x217e, 0x00bf}, -{0x2180, 0x2002}, -{0x2182, 0x4030}, -{0x2184, 0xf69c}, -{0x2186, 0x4392}, -{0x2188, 0x7f10}, -{0x218a, 0x403f}, -{0x218c, 0x07ff}, -{0x218e, 0x4f82}, -{0x2190, 0x7100}, -{0x2192, 0x0800}, -{0x2194, 0x7f08}, -{0x2196, 0x4382}, -{0x2198, 0x7f00}, -{0x219a, 0x40b2}, -{0x219c, 0xf0bc}, -{0x219e, 0x7f02}, -{0x21a0, 0x0900}, -{0x21a2, 0x7f04}, -{0x21a4, 0x832f}, -{0x21a6, 0xb03f}, -{0x21a8, 0x8000}, -{0x21aa, 0x37f1}, -{0x21ac, 0x4382}, -{0x21ae, 0x7f10}, -{0x21b0, 0x4392}, -{0x21b2, 0x8072}, -{0x21b4, 0x40b2}, -{0x21b6, 0x02bc}, -{0x21b8, 0x731e}, -{0x21ba, 0x425f}, -{0x21bc, 0x009e}, -{0x21be, 0xf07f}, -{0x21c0, 0x000f}, -{0x21c2, 0x4f4e}, -{0x21c4, 0x425f}, -{0x21c6, 0x009f}, -{0x21c8, 0xf07f}, -{0x21ca, 0x000f}, -{0x21cc, 0xf37f}, -{0x21ce, 0x5f0e}, -{0x21d0, 0xc312}, -{0x21d2, 0x100e}, -{0x21d4, 0x4e82}, -{0x21d6, 0x80b8}, -{0x21d8, 0x403c}, -{0x21da, 0x00b2}, -{0x21dc, 0x4c6f}, -{0x21de, 0xf07f}, -{0x21e0, 0x000f}, -{0x21e2, 0x4f4e}, -{0x21e4, 0x403d}, -{0x21e6, 0x00b3}, -{0x21e8, 0x4d6f}, -{0x21ea, 0xf07f}, -{0x21ec, 0x000f}, -{0x21ee, 0xf37f}, -{0x21f0, 0x5f0e}, -{0x21f2, 0xc312}, -{0x21f4, 0x100e}, -{0x21f6, 0x4e82}, -{0x21f8, 0x82bc}, -{0x21fa, 0x4c6f}, -{0x21fc, 0xf07f}, -{0x21fe, 0x000f}, -{0x2200, 0x4f4e}, -{0x2202, 0x4d6f}, -{0x2204, 0xf07f}, -{0x2206, 0x000f}, -{0x2208, 0xf37f}, -{0x220a, 0x5f0e}, -{0x220c, 0x533e}, -{0x220e, 0x4e82}, -{0x2210, 0x8080}, -{0x2212, 0x43a2}, -{0x2214, 0x8082}, -{0x2216, 0xb3e2}, -{0x2218, 0x00b4}, -{0x221a, 0x2402}, -{0x221c, 0x4392}, -{0x221e, 0x8082}, -{0x2220, 0x43a1}, -{0x2222, 0x0000}, -{0x2224, 0xb3d2}, -{0x2226, 0x00b4}, -{0x2228, 0x2002}, -{0x222a, 0x4030}, -{0x222c, 0xf68a}, -{0x222e, 0x4381}, -{0x2230, 0x0000}, -{0x2232, 0x403e}, -{0x2234, 0x0030}, -{0x2236, 0x403f}, -{0x2238, 0x0180}, -{0x223a, 0x12b0}, -{0x223c, 0xfd94}, -{0x223e, 0x4382}, -{0x2240, 0x8078}, -{0x2242, 0x421f}, -{0x2244, 0x8078}, -{0x2246, 0x503f}, -{0x2248, 0x0430}, -{0x224a, 0x12b0}, -{0x224c, 0xfd80}, -{0x224e, 0x403b}, -{0x2250, 0x7606}, -{0x2252, 0x4ba2}, -{0x2254, 0x804a}, -{0x2256, 0x421f}, -{0x2258, 0x8078}, -{0x225a, 0x503f}, -{0x225c, 0x0431}, -{0x225e, 0x12b0}, -{0x2260, 0xfd80}, -{0x2262, 0x4ba2}, -{0x2264, 0x807e}, -{0x2266, 0x421f}, -{0x2268, 0x8078}, -{0x226a, 0x503f}, -{0x226c, 0x0432}, -{0x226e, 0x12b0}, -{0x2270, 0xfd80}, -{0x2272, 0x4ba2}, -{0x2274, 0x82f8}, -{0x2276, 0x421f}, -{0x2278, 0x8078}, -{0x227a, 0x503f}, -{0x227c, 0x0433}, -{0x227e, 0x12b0}, -{0x2280, 0xfd80}, -{0x2282, 0x4ba2}, -{0x2284, 0x8088}, -{0x2286, 0x421d}, -{0x2288, 0x807e}, -{0x228a, 0x4d0e}, -{0x228c, 0xf37e}, -{0x228e, 0x108e}, -{0x2290, 0xd21e}, -{0x2292, 0x804a}, -{0x2294, 0x4e82}, -{0x2296, 0x82f2}, -{0x2298, 0x425f}, -{0x229a, 0x8088}, -{0x229c, 0x108f}, -{0x229e, 0xd21f}, -{0x22a0, 0x82f8}, -{0x22a2, 0x4f82}, -{0x22a4, 0x82be}, -{0x22a6, 0x930f}, -{0x22a8, 0x2002}, -{0x22aa, 0x930e}, -{0x22ac, 0x240f}, -{0x22ae, 0x930d}, -{0x22b0, 0x2402}, -{0x22b2, 0x4030}, -{0x22b4, 0xf682}, -{0x22b6, 0x42df}, -{0x22b8, 0x804a}, -{0x22ba, 0x0000}, -{0x22bc, 0x421f}, -{0x22be, 0x8078}, -{0x22c0, 0x522f}, -{0x22c2, 0x4f82}, -{0x22c4, 0x8078}, -{0x22c6, 0x903f}, -{0x22c8, 0x0032}, -{0x22ca, 0x2bbb}, -{0x22cc, 0x4037}, -{0x22ce, 0x0098}, -{0x22d0, 0x4038}, -{0x22d2, 0x0092}, -{0x22d4, 0x472f}, -{0x22d6, 0x882f}, -{0x22d8, 0x531f}, -{0x22da, 0x4f0c}, -{0x22dc, 0x421a}, -{0x22de, 0x80b8}, -{0x22e0, 0x12b0}, -{0x22e2, 0xff0e}, -{0x22e4, 0x4c82}, -{0x22e6, 0x0a86}, -{0x22e8, 0x4039}, -{0x22ea, 0x00a6}, -{0x22ec, 0x421f}, -{0x22ee, 0x00ac}, -{0x22f0, 0x892f}, -{0x22f2, 0x531f}, -{0x22f4, 0x4f0c}, -{0x22f6, 0x421a}, -{0x22f8, 0x82bc}, -{0x22fa, 0x12b0}, -{0x22fc, 0xff0e}, -{0x22fe, 0x4c82}, -{0x2300, 0x0a88}, -{0x2302, 0x425f}, -{0x2304, 0x82bc}, -{0x2306, 0x5f4f}, -{0x2308, 0x5f4f}, -{0x230a, 0x5f4f}, -{0x230c, 0x5f4f}, -{0x230e, 0x425e}, -{0x2310, 0x80b8}, -{0x2312, 0x5e4e}, -{0x2314, 0xde4f}, -{0x2316, 0xd25f}, -{0x2318, 0x8058}, -{0x231a, 0x4fc2}, -{0x231c, 0x0a8e}, -{0x231e, 0x48a2}, -{0x2320, 0x0a8c}, -{0x2322, 0x47a2}, -{0x2324, 0x0a9e}, -{0x2326, 0x49a2}, -{0x2328, 0x0a8a}, -{0x232a, 0x40b2}, -{0x232c, 0x0034}, -{0x232e, 0x7000}, -{0x2330, 0x12b0}, -{0x2332, 0xfb08}, -{0x2334, 0x4392}, -{0x2336, 0x7f06}, -{0x2338, 0x43a2}, -{0x233a, 0x7f0a}, -{0x233c, 0x9382}, -{0x233e, 0x8058}, -{0x2340, 0x2596}, -{0x2342, 0x42a2}, -{0x2344, 0x7f0a}, -{0x2346, 0x43a2}, -{0x2348, 0x8050}, -{0x234a, 0x40b2}, -{0x234c, 0x016e}, -{0x234e, 0x8052}, -{0x2350, 0x40b2}, -{0x2352, 0x02da}, -{0x2354, 0x8054}, -{0x2356, 0x40b2}, -{0x2358, 0x0446}, -{0x235a, 0x8056}, -{0x235c, 0x40b2}, -{0x235e, 0xf062}, -{0x2360, 0x82c6}, -{0x2362, 0x4382}, -{0x2364, 0x8078}, -{0x2366, 0x9382}, -{0x2368, 0x7f0a}, -{0x236a, 0x2413}, -{0x236c, 0x430e}, -{0x236e, 0x421d}, -{0x2370, 0x82c6}, -{0x2372, 0x0800}, -{0x2374, 0x7f08}, -{0x2376, 0x4e0f}, -{0x2378, 0x5f0f}, -{0x237a, 0x4f92}, -{0x237c, 0x8050}, -{0x237e, 0x7f00}, -{0x2380, 0x4d82}, -{0x2382, 0x7f02}, -{0x2384, 0x531e}, -{0x2386, 0x421f}, -{0x2388, 0x7f0a}, -{0x238a, 0x9f0e}, -{0x238c, 0x2bf2}, -{0x238e, 0x4e82}, -{0x2390, 0x8078}, -{0x2392, 0x40f1}, -{0x2394, 0xff8b}, -{0x2396, 0x0004}, -{0x2398, 0x4392}, -{0x239a, 0x731c}, -{0x239c, 0x9382}, -{0x239e, 0x8072}, -{0x23a0, 0x240f}, -{0x23a2, 0x4382}, -{0x23a4, 0x8078}, -{0x23a6, 0x421e}, -{0x23a8, 0x8078}, -{0x23aa, 0x4e0f}, -{0x23ac, 0x5f0f}, -{0x23ae, 0x4f9f}, -{0x23b0, 0x0b00}, -{0x23b2, 0x808c}, -{0x23b4, 0x531e}, -{0x23b6, 0x4e82}, -{0x23b8, 0x8078}, -{0x23ba, 0x903e}, -{0x23bc, 0x0016}, -{0x23be, 0x2bf3}, -{0x23c0, 0xb3d2}, -{0x23c2, 0x00ce}, -{0x23c4, 0x2411}, -{0x23c6, 0x4382}, -{0x23c8, 0x8078}, -{0x23ca, 0x421f}, -{0x23cc, 0x8078}, -{0x23ce, 0x903f}, -{0x23d0, 0x0009}, -{0x23d2, 0x2404}, -{0x23d4, 0x5f0f}, -{0x23d6, 0x4f9f}, -{0x23d8, 0x808c}, -{0x23da, 0x0b80}, -{0x23dc, 0x5392}, -{0x23de, 0x8078}, -{0x23e0, 0x90b2}, -{0x23e2, 0x0016}, -{0x23e4, 0x8078}, -{0x23e6, 0x2bf1}, -{0x23e8, 0x9382}, -{0x23ea, 0x8072}, -{0x23ec, 0x2009}, -{0x23ee, 0x0b00}, -{0x23f0, 0x7302}, -{0x23f2, 0x0258}, -{0x23f4, 0x4382}, -{0x23f6, 0x7004}, -{0x23f8, 0x0900}, -{0x23fa, 0x7308}, -{0x23fc, 0x12b0}, -{0x23fe, 0xfb08}, -{0x2400, 0x4305}, -{0x2402, 0x4382}, -{0x2404, 0x808a}, -{0x2406, 0x12b0}, -{0x2408, 0xf8d2}, -{0x240a, 0x0900}, -{0x240c, 0x7328}, -{0x240e, 0x41a2}, -{0x2410, 0x7114}, -{0x2412, 0x421f}, -{0x2414, 0x7316}, -{0x2416, 0xc312}, -{0x2418, 0x100f}, -{0x241a, 0x503f}, -{0x241c, 0xff9c}, -{0x241e, 0x4f82}, -{0x2420, 0x7334}, -{0x2422, 0x0f00}, -{0x2424, 0x7302}, -{0x2426, 0x4392}, -{0x2428, 0x7f0c}, -{0x242a, 0x4392}, -{0x242c, 0x7f10}, -{0x242e, 0x4392}, -{0x2430, 0x770a}, -{0x2432, 0x4392}, -{0x2434, 0x770e}, -{0x2436, 0x9392}, -{0x2438, 0x7114}, -{0x243a, 0x2073}, -{0x243c, 0x0b00}, -{0x243e, 0x7302}, -{0x2440, 0x0258}, -{0x2442, 0x4382}, -{0x2444, 0x7004}, -{0x2446, 0x0800}, -{0x2448, 0x7118}, -{0x244a, 0x403e}, -{0x244c, 0x732a}, -{0x244e, 0x4e2f}, -{0x2450, 0x4f4b}, -{0x2452, 0xf35b}, -{0x2454, 0xd25b}, -{0x2456, 0x8072}, -{0x2458, 0x4e2f}, -{0x245a, 0xf36f}, -{0x245c, 0xdf4b}, -{0x245e, 0x1230}, -{0x2460, 0x0cce}, -{0x2462, 0x1230}, -{0x2464, 0x0cf0}, -{0x2466, 0x1230}, -{0x2468, 0x82c2}, -{0x246a, 0x421c}, -{0x246c, 0x0ca0}, -{0x246e, 0x421d}, -{0x2470, 0x0caa}, -{0x2472, 0x421e}, -{0x2474, 0x0cb4}, -{0x2476, 0x421f}, -{0x2478, 0x0cb2}, -{0x247a, 0x12b0}, -{0x247c, 0xf7ce}, -{0x247e, 0x1230}, -{0x2480, 0x0cd0}, -{0x2482, 0x1230}, -{0x2484, 0x0cf2}, -{0x2486, 0x1230}, -{0x2488, 0x82c4}, -{0x248a, 0x421c}, -{0x248c, 0x0ca2}, -{0x248e, 0x421d}, -{0x2490, 0x0cac}, -{0x2492, 0x421e}, -{0x2494, 0x0cb8}, -{0x2496, 0x421f}, -{0x2498, 0x0cb6}, -{0x249a, 0x12b0}, -{0x249c, 0xf7ce}, -{0x249e, 0x1230}, -{0x24a0, 0x0cd2}, -{0x24a2, 0x1230}, -{0x24a4, 0x0cf4}, -{0x24a6, 0x1230}, -{0x24a8, 0x82c0}, -{0x24aa, 0x421c}, -{0x24ac, 0x0ca4}, -{0x24ae, 0x421d}, -{0x24b0, 0x0cae}, -{0x24b2, 0x421e}, -{0x24b4, 0x0cbc}, -{0x24b6, 0x421f}, -{0x24b8, 0x0cba}, -{0x24ba, 0x12b0}, -{0x24bc, 0xf7ce}, -{0x24be, 0x1230}, -{0x24c0, 0x0cd4}, -{0x24c2, 0x1230}, -{0x24c4, 0x0cf6}, -{0x24c6, 0x1230}, -{0x24c8, 0x8076}, -{0x24ca, 0x421c}, -{0x24cc, 0x0ca6}, -{0x24ce, 0x421d}, -{0x24d0, 0x0cb0}, -{0x24d2, 0x421e}, -{0x24d4, 0x0cc0}, -{0x24d6, 0x421f}, -{0x24d8, 0x0cbe}, -{0x24da, 0x12b0}, -{0x24dc, 0xf7ce}, -{0x24de, 0x425f}, -{0x24e0, 0x0c80}, -{0x24e2, 0xf35f}, -{0x24e4, 0x5031}, -{0x24e6, 0x0018}, -{0x24e8, 0x934f}, -{0x24ea, 0x2008}, -{0x24ec, 0x4382}, -{0x24ee, 0x0cce}, -{0x24f0, 0x4382}, -{0x24f2, 0x0cd0}, -{0x24f4, 0x4382}, -{0x24f6, 0x0cd2}, -{0x24f8, 0x4382}, -{0x24fa, 0x0cd4}, -{0x24fc, 0x425f}, -{0x24fe, 0x807c}, -{0x2500, 0xdb4f}, -{0x2502, 0xf37f}, -{0x2504, 0x934b}, -{0x2506, 0x2001}, -{0x2508, 0x5f0f}, -{0x250a, 0x4fc2}, -{0x250c, 0x807c}, -{0x250e, 0x0900}, -{0x2510, 0x7112}, -{0x2512, 0x415f}, -{0x2514, 0x0004}, -{0x2516, 0x12b0}, -{0x2518, 0xf760}, -{0x251a, 0x0b00}, -{0x251c, 0x7302}, -{0x251e, 0x0034}, -{0x2520, 0x3f8a}, -{0x2522, 0x0b00}, -{0x2524, 0x7302}, -{0x2526, 0x0034}, -{0x2528, 0x4392}, -{0x252a, 0x7004}, -{0x252c, 0x9382}, -{0x252e, 0x7114}, -{0x2530, 0x2016}, -{0x2532, 0x421e}, -{0x2534, 0x7100}, -{0x2536, 0x421f}, -{0x2538, 0x00a2}, -{0x253a, 0x9f0e}, -{0x253c, 0x2805}, -{0x253e, 0x421f}, -{0x2540, 0x7100}, -{0x2542, 0x9f82}, -{0x2544, 0x00a8}, -{0x2546, 0x2c02}, -{0x2548, 0x4382}, -{0x254a, 0x7004}, -{0x254c, 0x415f}, -{0x254e, 0x0004}, -{0x2550, 0x12b0}, -{0x2552, 0xf760}, -{0x2554, 0x930f}, -{0x2556, 0x276f}, -{0x2558, 0x4382}, -{0x255a, 0x8072}, -{0x255c, 0x3f1f}, -{0x255e, 0x421e}, -{0x2560, 0x7100}, -{0x2562, 0x421f}, -{0x2564, 0x00a6}, -{0x2566, 0x9f0e}, -{0x2568, 0x2805}, -{0x256a, 0x421f}, -{0x256c, 0x7100}, -{0x256e, 0x9f82}, -{0x2570, 0x00ac}, -{0x2572, 0x2c02}, -{0x2574, 0x4382}, -{0x2576, 0x7004}, -{0x2578, 0x430b}, -{0x257a, 0x4307}, -{0x257c, 0x4304}, -{0x257e, 0x4309}, -{0x2580, 0x403f}, -{0x2582, 0x7100}, -{0x2584, 0x4f2e}, -{0x2586, 0xf31e}, -{0x2588, 0x4e82}, -{0x258a, 0x804e}, -{0x258c, 0x4f2f}, -{0x258e, 0x4f0e}, -{0x2590, 0x503e}, -{0x2592, 0xffd8}, -{0x2594, 0x4e81}, -{0x2596, 0x0002}, -{0x2598, 0x9382}, -{0x259a, 0x82f4}, -{0x259c, 0x2464}, -{0x259e, 0x4f06}, -{0x25a0, 0x5036}, -{0x25a2, 0xffd6}, -{0x25a4, 0x9382}, -{0x25a6, 0x8058}, -{0x25a8, 0x245b}, -{0x25aa, 0x403f}, -{0x25ac, 0x0012}, -{0x25ae, 0x90b1}, -{0x25b0, 0x0010}, -{0x25b2, 0x0002}, -{0x25b4, 0x2823}, -{0x25b6, 0x450c}, -{0x25b8, 0x4508}, -{0x25ba, 0x5f08}, -{0x25bc, 0x9805}, -{0x25be, 0x2c13}, -{0x25c0, 0x4c0d}, -{0x25c2, 0x5d0d}, -{0x25c4, 0x5d0d}, -{0x25c6, 0x4d0a}, -{0x25c8, 0x503a}, -{0x25ca, 0x80bc}, -{0x25cc, 0x919d}, -{0x25ce, 0x0002}, -{0x25d0, 0x80bc}, -{0x25d2, 0x2436}, -{0x25d4, 0x9382}, -{0x25d6, 0x8058}, -{0x25d8, 0x2403}, -{0x25da, 0x968d}, -{0x25dc, 0x80bc}, -{0x25de, 0x2420}, -{0x25e0, 0x531c}, -{0x25e2, 0x980c}, -{0x25e4, 0x2bed}, -{0x25e6, 0x9292}, -{0x25e8, 0x804e}, -{0x25ea, 0x82f4}, -{0x25ec, 0x2417}, -{0x25ee, 0x5215}, -{0x25f0, 0x808a}, -{0x25f2, 0x5b05}, -{0x25f4, 0x4482}, -{0x25f6, 0x808a}, -{0x25f8, 0x4982}, -{0x25fa, 0x039c}, -{0x25fc, 0x415f}, -{0x25fe, 0x0004}, -{0x2600, 0xc312}, -{0x2602, 0x104f}, -{0x2604, 0xf3d1}, -{0x2606, 0x0004}, -{0x2608, 0xe3f1}, -{0x260a, 0x0004}, -{0x260c, 0x53d1}, -{0x260e, 0x0004}, -{0x2610, 0xf0f1}, -{0x2612, 0xffb8}, -{0x2614, 0x0004}, -{0x2616, 0xefc1}, -{0x2618, 0x0004}, -{0x261a, 0x3f98}, -{0x261c, 0x5705}, -{0x261e, 0x3fea}, -{0x2620, 0x4b0f}, -{0x2622, 0x5f0f}, -{0x2624, 0x4a9f}, -{0x2626, 0x0002}, -{0x2628, 0x0384}, -{0x262a, 0x431f}, -{0x262c, 0x4b0e}, -{0x262e, 0x930e}, -{0x2630, 0x2403}, -{0x2632, 0x5f0f}, -{0x2634, 0x831e}, -{0x2636, 0x23fd}, -{0x2638, 0xdf09}, -{0x263a, 0x5314}, -{0x263c, 0x531b}, -{0x263e, 0x3fd0}, -{0x2640, 0x4b0f}, -{0x2642, 0x5f0f}, -{0x2644, 0x4a9f}, -{0x2646, 0x0002}, -{0x2648, 0x0384}, -{0x264a, 0x431f}, -{0x264c, 0x4b0e}, -{0x264e, 0x930e}, -{0x2650, 0x2403}, -{0x2652, 0x5f0f}, -{0x2654, 0x831e}, -{0x2656, 0x23fd}, -{0x2658, 0xdf09}, -{0x265a, 0x5317}, -{0x265c, 0x531b}, -{0x265e, 0x3fba}, -{0x2660, 0x403f}, -{0x2662, 0x0006}, -{0x2664, 0x3fa4}, -{0x2666, 0x4f06}, -{0x2668, 0x5036}, -{0x266a, 0xffda}, -{0x266c, 0x3f9b}, -{0x266e, 0x40b2}, -{0x2670, 0x000e}, -{0x2672, 0x8050}, -{0x2674, 0x40b2}, -{0x2676, 0x02e6}, -{0x2678, 0x8052}, -{0x267a, 0x40b2}, -{0x267c, 0xf000}, -{0x267e, 0x82c6}, -{0x2680, 0x3e70}, -{0x2682, 0x4e8f}, -{0x2684, 0x0000}, -{0x2686, 0x4030}, -{0x2688, 0xf2bc}, -{0x268a, 0xb3e2}, -{0x268c, 0x00b4}, -{0x268e, 0x2002}, -{0x2690, 0x4030}, -{0x2692, 0xf232}, -{0x2694, 0x4391}, -{0x2696, 0x0000}, -{0x2698, 0x4030}, -{0x269a, 0xf232}, -{0x269c, 0x43d2}, -{0x269e, 0x0180}, -{0x26a0, 0x4392}, -{0x26a2, 0x760e}, -{0x26a4, 0x9382}, -{0x26a6, 0x760c}, -{0x26a8, 0x2002}, -{0x26aa, 0x0c64}, -{0x26ac, 0x3ffb}, -{0x26ae, 0x421f}, -{0x26b0, 0x760a}, -{0x26b2, 0x931f}, -{0x26b4, 0x2012}, -{0x26b6, 0x4292}, -{0x26b8, 0x018a}, -{0x26ba, 0x80b6}, -{0x26bc, 0x4292}, -{0x26be, 0x80b6}, -{0x26c0, 0x7600}, -{0x26c2, 0x12b0}, -{0x26c4, 0xfd6c}, -{0x26c6, 0x421f}, -{0x26c8, 0x80b6}, -{0x26ca, 0x12b0}, -{0x26cc, 0xfd80}, -{0x26ce, 0x4fc2}, -{0x26d0, 0x0188}, -{0x26d2, 0x4292}, -{0x26d4, 0x80b6}, -{0x26d6, 0x80ba}, -{0x26d8, 0x3fe3}, -{0x26da, 0x903f}, -{0x26dc, 0x0201}, -{0x26de, 0x23e0}, -{0x26e0, 0x5392}, -{0x26e2, 0x80b6}, -{0x26e4, 0x421e}, -{0x26e6, 0x80b6}, -{0x26e8, 0x108e}, -{0x26ea, 0xf37e}, -{0x26ec, 0xc312}, -{0x26ee, 0x100e}, -{0x26f0, 0x110e}, -{0x26f2, 0x110e}, -{0x26f4, 0x110e}, -{0x26f6, 0x421f}, -{0x26f8, 0x80ba}, -{0x26fa, 0x108f}, -{0x26fc, 0xf37f}, -{0x26fe, 0xc312}, -{0x2700, 0x100f}, -{0x2702, 0x110f}, -{0x2704, 0x110f}, -{0x2706, 0x110f}, -{0x2708, 0x9f0e}, -{0x270a, 0x27dd}, -{0x270c, 0x0261}, -{0x270e, 0x0000}, -{0x2710, 0x3fd5}, -{0x2712, 0x40b2}, -{0x2714, 0x1807}, -{0x2716, 0x0b82}, -{0x2718, 0x40b2}, -{0x271a, 0x3540}, -{0x271c, 0x0b84}, -{0x271e, 0x40b2}, -{0x2720, 0x3540}, -{0x2722, 0x0b86}, -{0x2724, 0x4382}, -{0x2726, 0x0b88}, -{0x2728, 0x4382}, -{0x272a, 0x0b8a}, -{0x272c, 0x4382}, -{0x272e, 0x0b8c}, -{0x2730, 0x40b2}, -{0x2732, 0x0600}, -{0x2734, 0x0b8e}, -{0x2736, 0x4382}, -{0x2738, 0x0ba6}, -{0x273a, 0x43c2}, -{0x273c, 0x01a0}, -{0x273e, 0x43c2}, -{0x2740, 0x01a1}, -{0x2742, 0x43c2}, -{0x2744, 0x019d}, -{0x2746, 0x40f2}, -{0x2748, 0x000a}, -{0x274a, 0x0f90}, -{0x274c, 0x43c2}, -{0x274e, 0x0f82}, -{0x2750, 0x43c2}, -{0x2752, 0x003d}, -{0x2754, 0x4030}, -{0x2756, 0xf0de}, -{0x2758, 0x5031}, -{0x275a, 0x0006}, -{0x275c, 0x4030}, -{0x275e, 0xfef4}, -{0x2760, 0x4f4e}, -{0x2762, 0x421f}, -{0x2764, 0x7316}, -{0x2766, 0xc312}, -{0x2768, 0x100f}, -{0x276a, 0x503f}, -{0x276c, 0xff9c}, -{0x276e, 0x4f82}, -{0x2770, 0x7334}, -{0x2772, 0x0f00}, -{0x2774, 0x7302}, -{0x2776, 0xb0b2}, -{0x2778, 0x000f}, -{0x277a, 0x7300}, -{0x277c, 0x200e}, -{0x277e, 0x403f}, -{0x2780, 0x0cd8}, -{0x2782, 0x43df}, -{0x2784, 0x0000}, -{0x2786, 0x43cf}, -{0x2788, 0x0000}, -{0x278a, 0x4ec2}, -{0x278c, 0x0c5a}, -{0x278e, 0x4ec2}, -{0x2790, 0x0c5c}, -{0x2792, 0x4ec2}, -{0x2794, 0x0c5e}, -{0x2796, 0x4ec2}, -{0x2798, 0x0c60}, -{0x279a, 0x421f}, -{0x279c, 0x7112}, -{0x279e, 0x93a2}, -{0x27a0, 0x7114}, -{0x27a2, 0x2408}, -{0x27a4, 0x9382}, -{0x27a6, 0x7112}, -{0x27a8, 0x2403}, -{0x27aa, 0x5292}, -{0x27ac, 0x8082}, -{0x27ae, 0x7114}, -{0x27b0, 0x430f}, -{0x27b2, 0x4130}, -{0x27b4, 0xf31f}, -{0x27b6, 0x27f6}, -{0x27b8, 0x4382}, -{0x27ba, 0x7f10}, -{0x27bc, 0x4392}, -{0x27be, 0x7708}, -{0x27c0, 0x4382}, -{0x27c2, 0x770e}, -{0x27c4, 0x40b2}, -{0x27c6, 0x0003}, -{0x27c8, 0x7114}, -{0x27ca, 0x431f}, -{0x27cc, 0x4130}, -{0x27ce, 0x120b}, -{0x27d0, 0x120a}, -{0x27d2, 0x1209}, -{0x27d4, 0x1208}, -{0x27d6, 0x1207}, -{0x27d8, 0x1206}, -{0x27da, 0x1205}, -{0x27dc, 0x1204}, -{0x27de, 0x8321}, -{0x27e0, 0x4039}, -{0x27e2, 0x0014}, -{0x27e4, 0x5109}, -{0x27e6, 0x4c07}, -{0x27e8, 0x4925}, -{0x27ea, 0x4991}, -{0x27ec, 0x0002}, -{0x27ee, 0x0000}, -{0x27f0, 0x4914}, -{0x27f2, 0x0004}, -{0x27f4, 0x4f0b}, -{0x27f6, 0x430a}, -{0x27f8, 0x4e08}, -{0x27fa, 0x4309}, -{0x27fc, 0xda08}, -{0x27fe, 0xdb09}, -{0x2800, 0x5d07}, -{0x2802, 0x432e}, -{0x2804, 0x421f}, -{0x2806, 0x0a86}, -{0x2808, 0x821e}, -{0x280a, 0x8058}, -{0x280c, 0x930e}, -{0x280e, 0x2403}, -{0x2810, 0x5f0f}, -{0x2812, 0x831e}, -{0x2814, 0x23fd}, -{0x2816, 0x8f07}, -{0x2818, 0x425f}, -{0x281a, 0x0ce1}, -{0x281c, 0xf37f}, -{0x281e, 0x421e}, -{0x2820, 0x00ba}, -{0x2822, 0x4f0a}, -{0x2824, 0x4e0c}, -{0x2826, 0x12b0}, -{0x2828, 0xfef8}, -{0x282a, 0x4e0f}, -{0x282c, 0x108f}, -{0x282e, 0x4f46}, -{0x2830, 0xc312}, -{0x2832, 0x1006}, -{0x2834, 0x5808}, -{0x2836, 0x6909}, -{0x2838, 0x5808}, -{0x283a, 0x6909}, -{0x283c, 0x5808}, -{0x283e, 0x6909}, -{0x2840, 0x5808}, -{0x2842, 0x6909}, -{0x2844, 0x5808}, -{0x2846, 0x6909}, -{0x2848, 0x5808}, -{0x284a, 0x6909}, -{0x284c, 0x470e}, -{0x284e, 0x430f}, -{0x2850, 0x480c}, -{0x2852, 0x490d}, -{0x2854, 0x4e0a}, -{0x2856, 0x4f0b}, -{0x2858, 0x12b0}, -{0x285a, 0xff2a}, -{0x285c, 0x5c06}, -{0x285e, 0x464e}, -{0x2860, 0xf07e}, -{0x2862, 0x003f}, -{0x2864, 0xb392}, -{0x2866, 0x732a}, -{0x2868, 0x2016}, -{0x286a, 0xb3a2}, -{0x286c, 0x732a}, -{0x286e, 0x2013}, -{0x2870, 0x9382}, -{0x2872, 0x8072}, -{0x2874, 0x2010}, -{0x2876, 0x93c2}, -{0x2878, 0x807c}, -{0x287a, 0x200d}, -{0x287c, 0x460c}, -{0x287e, 0x430d}, -{0x2880, 0x452e}, -{0x2882, 0x430f}, -{0x2884, 0x5e0c}, -{0x2886, 0x6f0d}, -{0x2888, 0xc312}, -{0x288a, 0x100d}, -{0x288c, 0x100c}, -{0x288e, 0x4c06}, -{0x2890, 0x4c4e}, -{0x2892, 0xf07e}, -{0x2894, 0x003f}, -{0x2896, 0x4685}, -{0x2898, 0x0000}, -{0x289a, 0xb0f2}, -{0x289c, 0x0010}, -{0x289e, 0x0c83}, -{0x28a0, 0x2409}, -{0x28a2, 0x4e4f}, -{0x28a4, 0x5f0f}, -{0x28a6, 0x5f0f}, -{0x28a8, 0x5f0f}, -{0x28aa, 0x5f0f}, -{0x28ac, 0x5f0f}, -{0x28ae, 0x4f84}, -{0x28b0, 0x0000}, -{0x28b2, 0x3c02}, -{0x28b4, 0x4384}, -{0x28b6, 0x0000}, -{0x28b8, 0x412f}, -{0x28ba, 0x468f}, -{0x28bc, 0x0000}, -{0x28be, 0x5321}, -{0x28c0, 0x4134}, -{0x28c2, 0x4135}, -{0x28c4, 0x4136}, -{0x28c6, 0x4137}, -{0x28c8, 0x4138}, -{0x28ca, 0x4139}, -{0x28cc, 0x413a}, -{0x28ce, 0x413b}, -{0x28d0, 0x4130}, -{0x28d2, 0x43a2}, -{0x28d4, 0x805a}, -{0x28d6, 0x40b2}, -{0x28d8, 0x000a}, -{0x28da, 0x805c}, -{0x28dc, 0x40b2}, -{0x28de, 0x0158}, -{0x28e0, 0x805e}, -{0x28e2, 0x40b2}, -{0x28e4, 0x017c}, -{0x28e6, 0x8060}, -{0x28e8, 0x40b2}, -{0x28ea, 0x02c4}, -{0x28ec, 0x8062}, -{0x28ee, 0x40b2}, -{0x28f0, 0x02da}, -{0x28f2, 0x8064}, -{0x28f4, 0x40b2}, -{0x28f6, 0x02e2}, -{0x28f8, 0x8066}, -{0x28fa, 0x40b2}, -{0x28fc, 0x0430}, -{0x28fe, 0x8068}, -{0x2900, 0x40b2}, -{0x2902, 0x0454}, -{0x2904, 0x806a}, -{0x2906, 0x40b2}, -{0x2908, 0x059c}, -{0x290a, 0x806c}, -{0x290c, 0x40b2}, -{0x290e, 0xfffe}, -{0x2910, 0x82ca}, -{0x2912, 0x40b2}, -{0x2914, 0xfff1}, -{0x2916, 0x82cc}, -{0x2918, 0x40b2}, -{0x291a, 0x0021}, -{0x291c, 0x82ce}, -{0x291e, 0x40b2}, -{0x2920, 0xfff1}, -{0x2922, 0x82d0}, -{0x2924, 0x40b2}, -{0x2926, 0x0025}, -{0x2928, 0x82d2}, -{0x292a, 0x40b2}, -{0x292c, 0xfffe}, -{0x292e, 0x82d4}, -{0x2930, 0x40b2}, -{0x2932, 0xfff2}, -{0x2934, 0x82d6}, -{0x2936, 0x40b2}, -{0x2938, 0x0021}, -{0x293a, 0x82d8}, -{0x293c, 0x40b2}, -{0x293e, 0xfff2}, -{0x2940, 0x82da}, -{0x2942, 0x40b2}, -{0x2944, 0x0022}, -{0x2946, 0x82dc}, -{0x2948, 0x40b2}, -{0x294a, 0xfffe}, -{0x294c, 0x82de}, -{0x294e, 0x40b2}, -{0x2950, 0xfff4}, -{0x2952, 0x82e0}, -{0x2954, 0x40b2}, -{0x2956, 0x0021}, -{0x2958, 0x82e2}, -{0x295a, 0x40b2}, -{0x295c, 0xfff4}, -{0x295e, 0x82e4}, -{0x2960, 0x40b2}, -{0x2962, 0x0025}, -{0x2964, 0x82e6}, -{0x2966, 0x40b2}, -{0x2968, 0xfffe}, -{0x296a, 0x82e8}, -{0x296c, 0x40b2}, -{0x296e, 0xfff8}, -{0x2970, 0x82ea}, -{0x2972, 0x40b2}, -{0x2974, 0xfff8}, -{0x2976, 0x82ec}, -{0x2978, 0x40b2}, -{0x297a, 0xfff8}, -{0x297c, 0x82ee}, -{0x297e, 0x40b2}, -{0x2980, 0xfffa}, -{0x2982, 0x82f0}, -{0x2984, 0x42a2}, -{0x2986, 0x807a}, -{0x2988, 0x42b2}, -{0x298a, 0x7706}, -{0x298c, 0x9382}, -{0x298e, 0x8058}, -{0x2990, 0x242f}, -{0x2992, 0x40b2}, -{0x2994, 0x0014}, -{0x2996, 0x7706}, -{0x2998, 0x40b2}, -{0x299a, 0x000a}, -{0x299c, 0x807a}, -{0x299e, 0x9382}, -{0x29a0, 0x82f4}, -{0x29a2, 0x240c}, -{0x29a4, 0x40b2}, -{0x29a6, 0xfff8}, -{0x29a8, 0x82d8}, -{0x29aa, 0x40b2}, -{0x29ac, 0xfffa}, -{0x29ae, 0x82dc}, -{0x29b0, 0x40b2}, -{0x29b2, 0x0021}, -{0x29b4, 0x82ec}, -{0x29b6, 0x40b2}, -{0x29b8, 0x0022}, -{0x29ba, 0x82f0}, -{0x29bc, 0x42a2}, -{0x29be, 0x805a}, -{0x29c0, 0x9382}, -{0x29c2, 0x82f4}, -{0x29c4, 0x240f}, -{0x29c6, 0x421e}, -{0x29c8, 0x807a}, -{0x29ca, 0x4e0f}, -{0x29cc, 0x12b0}, -{0x29ce, 0xfa4a}, -{0x29d0, 0x9382}, -{0x29d2, 0x82f4}, -{0x29d4, 0x2001}, -{0x29d6, 0x4130}, -{0x29d8, 0x430e}, -{0x29da, 0x421f}, -{0x29dc, 0x807a}, -{0x29de, 0x12b0}, -{0x29e0, 0xfa4a}, -{0x29e2, 0x3ff9}, -{0x29e4, 0x430e}, -{0x29e6, 0x421f}, -{0x29e8, 0x807a}, -{0x29ea, 0x12b0}, -{0x29ec, 0xfa4a}, -{0x29ee, 0x3feb}, -{0x29f0, 0x42a2}, -{0x29f2, 0x805a}, -{0x29f4, 0x40b2}, -{0x29f6, 0x0262}, -{0x29f8, 0x805c}, -{0x29fa, 0x40b2}, -{0x29fc, 0x02e0}, -{0x29fe, 0x805e}, -{0x2a00, 0x40b2}, -{0x2a02, 0x0532}, -{0x2a04, 0x8060}, -{0x2a06, 0x40b2}, -{0x2a08, 0xfff1}, -{0x2a0a, 0x82ca}, -{0x2a0c, 0x40b2}, -{0x2a0e, 0x0021}, -{0x2a10, 0x82cc}, -{0x2a12, 0x40b2}, -{0x2a14, 0xfff2}, -{0x2a16, 0x82ce}, -{0x2a18, 0x40b2}, -{0x2a1a, 0x0022}, -{0x2a1c, 0x82d0}, -{0x2a1e, 0x40b2}, -{0x2a20, 0xfff4}, -{0x2a22, 0x82d2}, -{0x2a24, 0x40b2}, -{0x2a26, 0x0021}, -{0x2a28, 0x82d4}, -{0x2a2a, 0x40b2}, -{0x2a2c, 0xfff8}, -{0x2a2e, 0x82d6}, -{0x2a30, 0x40b2}, -{0x2a32, 0xfffa}, -{0x2a34, 0x82d8}, -{0x2a36, 0x9382}, -{0x2a38, 0x82f4}, -{0x2a3a, 0x27c0}, -{0x2a3c, 0x40b2}, -{0x2a3e, 0xfffa}, -{0x2a40, 0x82d0}, -{0x2a42, 0x40b2}, -{0x2a44, 0x0022}, -{0x2a46, 0x82d8}, -{0x2a48, 0x3fb9}, -{0x2a4a, 0x120b}, -{0x2a4c, 0x120a}, -{0x2a4e, 0x4f0c}, -{0x2a50, 0x430d}, -{0x2a52, 0x9f0d}, -{0x2a54, 0x2c56}, -{0x2a56, 0x421a}, -{0x2a58, 0x8058}, -{0x2a5a, 0x421b}, -{0x2a5c, 0x82f4}, -{0x2a5e, 0x930a}, -{0x2a60, 0x244b}, -{0x2a62, 0x931d}, -{0x2a64, 0x243c}, -{0x2a66, 0x903d}, -{0x2a68, 0x0003}, -{0x2a6a, 0x2439}, -{0x2a6c, 0x903d}, -{0x2a6e, 0x0006}, -{0x2a70, 0x2436}, -{0x2a72, 0x923d}, -{0x2a74, 0x2434}, -{0x2a76, 0x922d}, -{0x2a78, 0x242c}, -{0x2a7a, 0x903d}, -{0x2a7c, 0x0009}, -{0x2a7e, 0x2429}, -{0x2a80, 0x930b}, -{0x2a82, 0x2420}, -{0x2a84, 0x903e}, -{0x2a86, 0x0007}, -{0x2a88, 0x2412}, -{0x2a8a, 0x4e0f}, -{0x2a8c, 0x5f0f}, -{0x2a8e, 0x4f92}, -{0x2a90, 0x82ca}, -{0x2a92, 0x7700}, -{0x2a94, 0x4d0f}, -{0x2a96, 0x5f0f}, -{0x2a98, 0x4f92}, -{0x2a9a, 0x805a}, -{0x2a9c, 0x7702}, -{0x2a9e, 0x40b2}, -{0x2aa0, 0x0003}, -{0x2aa2, 0x7704}, -{0x2aa4, 0x531e}, -{0x2aa6, 0x531d}, -{0x2aa8, 0x9c0d}, -{0x2aaa, 0x2bd9}, -{0x2aac, 0x3c2a}, -{0x2aae, 0x4292}, -{0x2ab0, 0x82d8}, -{0x2ab2, 0x7700}, -{0x2ab4, 0x4d0f}, -{0x2ab6, 0x5f0f}, -{0x2ab8, 0x4f92}, -{0x2aba, 0x805a}, -{0x2abc, 0x7702}, -{0x2abe, 0x43a2}, -{0x2ac0, 0x7704}, -{0x2ac2, 0x3ff0}, -{0x2ac4, 0x903e}, -{0x2ac6, 0x0011}, -{0x2ac8, 0x23e0}, -{0x2aca, 0x4292}, -{0x2acc, 0x82ec}, -{0x2ace, 0x7700}, -{0x2ad0, 0x3ff1}, -{0x2ad2, 0x4e0f}, -{0x2ad4, 0x5f0f}, -{0x2ad6, 0x4f92}, -{0x2ad8, 0x82ca}, -{0x2ada, 0x7700}, -{0x2adc, 0x3feb}, -{0x2ade, 0x4e0f}, -{0x2ae0, 0x5f0f}, -{0x2ae2, 0x4f92}, -{0x2ae4, 0x82ca}, -{0x2ae6, 0x7700}, -{0x2ae8, 0x4d0f}, -{0x2aea, 0x5f0f}, -{0x2aec, 0x4f92}, -{0x2aee, 0x805a}, -{0x2af0, 0x7702}, -{0x2af2, 0x4392}, -{0x2af4, 0x7704}, -{0x2af6, 0x3fd6}, -{0x2af8, 0x930d}, -{0x2afa, 0x27f1}, -{0x2afc, 0x932d}, -{0x2afe, 0x23e9}, -{0x2b00, 0x3fee}, -{0x2b02, 0x413a}, -{0x2b04, 0x413b}, -{0x2b06, 0x4130}, -{0x2b08, 0x120b}, -{0x2b0a, 0x120a}, -{0x2b0c, 0x1209}, -{0x2b0e, 0x1208}, -{0x2b10, 0x1207}, -{0x2b12, 0x1206}, -{0x2b14, 0x1205}, -{0x2b16, 0x1204}, -{0x2b18, 0x8321}, -{0x2b1a, 0x43c2}, -{0x2b1c, 0x00b5}, -{0x2b1e, 0x421f}, -{0x2b20, 0x82f4}, -{0x2b22, 0x930f}, -{0x2b24, 0x2403}, -{0x2b26, 0x40f2}, -{0x2b28, 0x0003}, -{0x2b2a, 0x00b5}, -{0x2b2c, 0x40b2}, -{0x2b2e, 0x0005}, -{0x2b30, 0x7534}, -{0x2b32, 0x43b2}, -{0x2b34, 0x7810}, -{0x2b36, 0x43b2}, -{0x2b38, 0x7812}, -{0x2b3a, 0x4382}, -{0x2b3c, 0x752a}, -{0x2b3e, 0x4382}, -{0x2b40, 0x752e}, -{0x2b42, 0x4291}, -{0x2b44, 0x8058}, -{0x2b46, 0x0000}, -{0x2b48, 0x9381}, -{0x2b4a, 0x0000}, -{0x2b4c, 0x24ff}, -{0x2b4e, 0x40b2}, -{0x2b50, 0x016c}, -{0x2b52, 0x780e}, -{0x2b54, 0x40b2}, -{0x2b56, 0x02d8}, -{0x2b58, 0x7810}, -{0x2b5a, 0x40b2}, -{0x2b5c, 0x0444}, -{0x2b5e, 0x7812}, -{0x2b60, 0x43a2}, -{0x2b62, 0x752a}, -{0x2b64, 0x43a2}, -{0x2b66, 0x752e}, -{0x2b68, 0x4292}, -{0x2b6a, 0x00ba}, -{0x2b6c, 0x0b92}, -{0x2b6e, 0x40b2}, -{0x2b70, 0x003c}, -{0x2b72, 0x7814}, -{0x2b74, 0x40b2}, -{0x2b76, 0x0c01}, -{0x2b78, 0x7500}, -{0x2b7a, 0x40b2}, -{0x2b7c, 0x0803}, -{0x2b7e, 0x7502}, -{0x2b80, 0x40b2}, -{0x2b82, 0x0807}, -{0x2b84, 0x7504}, -{0x2b86, 0x40b2}, -{0x2b88, 0x5803}, -{0x2b8a, 0x7506}, -{0x2b8c, 0x40b2}, -{0x2b8e, 0x0801}, -{0x2b90, 0x7508}, -{0x2b92, 0x40b2}, -{0x2b94, 0x0805}, -{0x2b96, 0x750a}, -{0x2b98, 0x40b2}, -{0x2b9a, 0x5801}, -{0x2b9c, 0x750c}, -{0x2b9e, 0x40b2}, -{0x2ba0, 0x0803}, -{0x2ba2, 0x750e}, -{0x2ba4, 0x40b2}, -{0x2ba6, 0x0802}, -{0x2ba8, 0x7510}, -{0x2baa, 0x40b2}, -{0x2bac, 0x0800}, -{0x2bae, 0x7512}, -{0x2bb0, 0x4f0c}, -{0x2bb2, 0x503c}, -{0x2bb4, 0x07f8}, -{0x2bb6, 0x4c82}, -{0x2bb8, 0x7530}, -{0x2bba, 0x503f}, -{0x2bbc, 0x07fa}, -{0x2bbe, 0x4f82}, -{0x2bc0, 0x7532}, -{0x2bc2, 0x425f}, -{0x2bc4, 0x00d2}, -{0x2bc6, 0x4f4e}, -{0x2bc8, 0x430d}, -{0x2bca, 0x421a}, -{0x2bcc, 0x0086}, -{0x2bce, 0x430b}, -{0x2bd0, 0x5d0a}, -{0x2bd2, 0x6e0b}, -{0x2bd4, 0x425f}, -{0x2bd6, 0x00d0}, -{0x2bd8, 0x4f47}, -{0x2bda, 0x4306}, -{0x2bdc, 0x4218}, -{0x2bde, 0x0084}, -{0x2be0, 0x4309}, -{0x2be2, 0x5608}, -{0x2be4, 0x6709}, -{0x2be6, 0x4382}, -{0x2be8, 0x733e}, -{0x2bea, 0x4215}, -{0x2bec, 0x7578}, -{0x2bee, 0x4304}, -{0x2bf0, 0x4216}, -{0x2bf2, 0x7560}, -{0x2bf4, 0x4307}, -{0x2bf6, 0x5406}, -{0x2bf8, 0x6507}, -{0x2bfa, 0x4305}, -{0x2bfc, 0x4a0e}, -{0x2bfe, 0x4b0f}, -{0x2c00, 0x503e}, -{0x2c02, 0xfffa}, -{0x2c04, 0x633f}, -{0x2c06, 0x480c}, -{0x2c08, 0x490d}, -{0x2c0a, 0x8e0c}, -{0x2c0c, 0x7f0d}, -{0x2c0e, 0x2801}, -{0x2c10, 0x4315}, -{0x2c12, 0x4a82}, -{0x2c14, 0x7314}, -{0x2c16, 0x4b82}, -{0x2c18, 0x7336}, -{0x2c1a, 0x93c2}, -{0x2c1c, 0x00bc}, -{0x2c1e, 0x2010}, -{0x2c20, 0xb315}, -{0x2c22, 0x240e}, -{0x2c24, 0x480f}, -{0x2c26, 0x503f}, -{0x2c28, 0x0006}, -{0x2c2a, 0x4f82}, -{0x2c2c, 0x7314}, -{0x2c2e, 0x480e}, -{0x2c30, 0x490f}, -{0x2c32, 0x503e}, -{0x2c34, 0x0006}, -{0x2c36, 0x630f}, -{0x2c38, 0x4f82}, -{0x2c3a, 0x7336}, -{0x2c3c, 0x4e0a}, -{0x2c3e, 0x4f0b}, -{0x2c40, 0x4a0d}, -{0x2c42, 0x4b0e}, -{0x2c44, 0x880d}, -{0x2c46, 0x790e}, -{0x2c48, 0x4d82}, -{0x2c4a, 0x7540}, -{0x2c4c, 0x4e82}, -{0x2c4e, 0x7574}, -{0x2c50, 0x4292}, -{0x2c52, 0x0088}, -{0x2c54, 0x7316}, -{0x2c56, 0x9381}, -{0x2c58, 0x0000}, -{0x2c5a, 0x2403}, -{0x2c5c, 0x4292}, -{0x2c5e, 0x008a}, -{0x2c60, 0x7316}, -{0x2c62, 0x425f}, -{0x2c64, 0x00bc}, -{0x2c66, 0xf37f}, -{0x2c68, 0xf50f}, -{0x2c6a, 0x2405}, -{0x2c6c, 0x40b2}, -{0x2c6e, 0x0006}, -{0x2c70, 0x7540}, -{0x2c72, 0x4382}, -{0x2c74, 0x7574}, -{0x2c76, 0x430c}, -{0x2c78, 0x4e0f}, -{0x2c7a, 0x4d0e}, -{0x2c7c, 0x860e}, -{0x2c7e, 0x770f}, -{0x2c80, 0x2c01}, -{0x2c82, 0x431c}, -{0x2c84, 0x430f}, -{0x2c86, 0x9382}, -{0x2c88, 0x8072}, -{0x2c8a, 0x2001}, -{0x2c8c, 0x431f}, -{0x2c8e, 0xfc0f}, -{0x2c90, 0x4382}, -{0x2c92, 0x7542}, -{0x2c94, 0x40b2}, -{0x2c96, 0x02d8}, -{0x2c98, 0x7544}, -{0x2c9a, 0x43b2}, -{0x2c9c, 0x7546}, -{0x2c9e, 0x43b2}, -{0x2ca0, 0x7548}, -{0x2ca2, 0x40b2}, -{0x2ca4, 0xffd7}, -{0x2ca6, 0x7806}, -{0x2ca8, 0x40b2}, -{0x2caa, 0xffeb}, -{0x2cac, 0x7808}, -{0x2cae, 0x40b2}, -{0x2cb0, 0x003c}, -{0x2cb2, 0x7804}, -{0x2cb4, 0x40b2}, -{0x2cb6, 0x0030}, -{0x2cb8, 0x7802}, -{0x2cba, 0x9381}, -{0x2cbc, 0x0000}, -{0x2cbe, 0x2412}, -{0x2cc0, 0x40b2}, -{0x2cc2, 0x016c}, -{0x2cc4, 0x7544}, -{0x2cc6, 0x40b2}, -{0x2cc8, 0x02d8}, -{0x2cca, 0x7546}, -{0x2ccc, 0x40b2}, -{0x2cce, 0x0444}, -{0x2cd0, 0x7548}, -{0x2cd2, 0x40b2}, -{0x2cd4, 0xffd7}, -{0x2cd6, 0x7808}, -{0x2cd8, 0x40b2}, -{0x2cda, 0xffeb}, -{0x2cdc, 0x780a}, -{0x2cde, 0x40b2}, -{0x2ce0, 0xffeb}, -{0x2ce2, 0x780c}, -{0x2ce4, 0x930f}, -{0x2ce6, 0x240f}, -{0x2ce8, 0x50b2}, -{0x2cea, 0x0042}, -{0x2cec, 0x7542}, -{0x2cee, 0x50b2}, -{0x2cf0, 0x0042}, -{0x2cf2, 0x7544}, -{0x2cf4, 0x9381}, -{0x2cf6, 0x0000}, -{0x2cf8, 0x2406}, -{0x2cfa, 0x50b2}, -{0x2cfc, 0x0042}, -{0x2cfe, 0x7546}, -{0x2d00, 0x50b2}, -{0x2d02, 0x0042}, -{0x2d04, 0x7548}, -{0x2d06, 0x42d2}, -{0x2d08, 0x00c8}, -{0x2d0a, 0x82f6}, -{0x2d0c, 0xb2e2}, -{0x2d0e, 0x01dc}, -{0x2d10, 0x2403}, -{0x2d12, 0x42d2}, -{0x2d14, 0x01dd}, -{0x2d16, 0x82f6}, -{0x2d18, 0xb3e2}, -{0x2d1a, 0x01dc}, -{0x2d1c, 0x2409}, -{0x2d1e, 0x43c2}, -{0x2d20, 0x82f6}, -{0x2d22, 0x421f}, -{0x2d24, 0x0084}, -{0x2d26, 0x9f82}, -{0x2d28, 0x01de}, -{0x2d2a, 0x2c02}, -{0x2d2c, 0x43d2}, -{0x2d2e, 0x82f6}, -{0x2d30, 0x42d2}, -{0x2d32, 0x82f6}, -{0x2d34, 0x00c8}, -{0x2d36, 0xb3d2}, -{0x2d38, 0x01dc}, -{0x2d3a, 0x240c}, -{0x2d3c, 0x434f}, -{0x2d3e, 0x93c2}, -{0x2d40, 0x82f6}, -{0x2d42, 0x2001}, -{0x2d44, 0x435f}, -{0x2d46, 0x4fc2}, -{0x2d48, 0x00c8}, -{0x2d4a, 0x3c04}, -{0x2d4c, 0x40b2}, -{0x2d4e, 0x02d8}, -{0x2d50, 0x780e}, -{0x2d52, 0x3f0a}, -{0x2d54, 0xd392}, -{0x2d56, 0x7102}, -{0x2d58, 0x5321}, -{0x2d5a, 0x4134}, -{0x2d5c, 0x4135}, -{0x2d5e, 0x4136}, -{0x2d60, 0x4137}, -{0x2d62, 0x4138}, -{0x2d64, 0x4139}, -{0x2d66, 0x413a}, -{0x2d68, 0x413b}, -{0x2d6a, 0x4130}, -{0x2d6c, 0x0260}, -{0x2d6e, 0x0000}, -{0x2d70, 0x0c64}, -{0x2d72, 0x0c64}, -{0x2d74, 0x0240}, -{0x2d76, 0x0000}, -{0x2d78, 0x0260}, -{0x2d7a, 0x0000}, -{0x2d7c, 0x0c1e}, -{0x2d7e, 0x4130}, -{0x2d80, 0x4f82}, -{0x2d82, 0x7600}, -{0x2d84, 0x0270}, -{0x2d86, 0x0000}, -{0x2d88, 0x0c1c}, -{0x2d8a, 0x0270}, -{0x2d8c, 0x0001}, -{0x2d8e, 0x421f}, -{0x2d90, 0x7606}, -{0x2d92, 0x4130}, -{0x2d94, 0x120b}, -{0x2d96, 0x120a}, -{0x2d98, 0x4f0a}, -{0x2d9a, 0x4e0b}, -{0x2d9c, 0x4382}, -{0x2d9e, 0x806e}, -{0x2da0, 0x43d2}, -{0x2da2, 0x0180}, -{0x2da4, 0x0260}, -{0x2da6, 0x0000}, -{0x2da8, 0x0c64}, -{0x2daa, 0x0c64}, -{0x2dac, 0x0240}, -{0x2dae, 0x0000}, -{0x2db0, 0x0260}, -{0x2db2, 0x0000}, -{0x2db4, 0x0c1e}, -{0x2db6, 0x0270}, -{0x2db8, 0x0001}, -{0x2dba, 0x4392}, -{0x2dbc, 0x7610}, -{0x2dbe, 0x4f82}, -{0x2dc0, 0x8048}, -{0x2dc2, 0x9382}, -{0x2dc4, 0x82f4}, -{0x2dc6, 0x2490}, -{0x2dc8, 0x421f}, -{0x2dca, 0x00ac}, -{0x2dcc, 0x503f}, -{0x2dce, 0xffd8}, -{0x2dd0, 0x4f82}, -{0x2dd2, 0x8086}, -{0x2dd4, 0x4382}, -{0x2dd6, 0x8078}, -{0x2dd8, 0x9382}, -{0x2dda, 0x8048}, -{0x2ddc, 0x2488}, -{0x2dde, 0x9382}, -{0x2de0, 0x82f4}, -{0x2de2, 0x247e}, -{0x2de4, 0x4b0f}, -{0x2de6, 0x5a0f}, -{0x2de8, 0x821f}, -{0x2dea, 0x8078}, -{0x2dec, 0x503f}, -{0x2dee, 0xfffd}, -{0x2df0, 0x4f82}, -{0x2df2, 0x80b6}, -{0x2df4, 0x12b0}, -{0x2df6, 0xfd80}, -{0x2df8, 0x4f82}, -{0x2dfa, 0x804a}, -{0x2dfc, 0x0c1c}, -{0x2dfe, 0x0270}, -{0x2e00, 0x0001}, -{0x2e02, 0x4292}, -{0x2e04, 0x7606}, -{0x2e06, 0x807e}, -{0x2e08, 0x0c1c}, -{0x2e0a, 0x0270}, -{0x2e0c, 0x0001}, -{0x2e0e, 0x421e}, -{0x2e10, 0x807e}, -{0x2e12, 0x4e0f}, -{0x2e14, 0xf03f}, -{0x2e16, 0x000f}, -{0x2e18, 0x108f}, -{0x2e1a, 0x521f}, -{0x2e1c, 0x804a}, -{0x2e1e, 0x4f82}, -{0x2e20, 0x8088}, -{0x2e22, 0x421d}, -{0x2e24, 0x7606}, -{0x2e26, 0x5d0d}, -{0x2e28, 0x5d0d}, -{0x2e2a, 0x5d0d}, -{0x2e2c, 0x5d0d}, -{0x2e2e, 0x4e0f}, -{0x2e30, 0xc312}, -{0x2e32, 0x100f}, -{0x2e34, 0x110f}, -{0x2e36, 0x110f}, -{0x2e38, 0x110f}, -{0x2e3a, 0x5f0d}, -{0x2e3c, 0x4d82}, -{0x2e3e, 0x8084}, -{0x2e40, 0x421e}, -{0x2e42, 0x82f4}, -{0x2e44, 0x930e}, -{0x2e46, 0x2447}, -{0x2e48, 0x421f}, -{0x2e4a, 0x8086}, -{0x2e4c, 0x8d0f}, -{0x2e4e, 0x4f82}, -{0x2e50, 0x8040}, -{0x2e52, 0x430d}, -{0x2e54, 0x9382}, -{0x2e56, 0x8058}, -{0x2e58, 0x2008}, -{0x2e5a, 0x421f}, -{0x2e5c, 0x8040}, -{0x2e5e, 0xf21f}, -{0x2e60, 0x8080}, -{0x2e62, 0xc312}, -{0x2e64, 0x100f}, -{0x2e66, 0x930f}, -{0x2e68, 0x2001}, -{0x2e6a, 0x431d}, -{0x2e6c, 0x4d82}, -{0x2e6e, 0x8074}, -{0x2e70, 0x930e}, -{0x2e72, 0x242b}, -{0x2e74, 0x421f}, -{0x2e76, 0x8084}, -{0x2e78, 0x930f}, -{0x2e7a, 0x2427}, -{0x2e7c, 0x430e}, -{0x2e7e, 0x9f82}, -{0x2e80, 0x8086}, -{0x2e82, 0x2801}, -{0x2e84, 0x431e}, -{0x2e86, 0x4e82}, -{0x2e88, 0x8046}, -{0x2e8a, 0x930e}, -{0x2e8c, 0x2414}, -{0x2e8e, 0x9382}, -{0x2e90, 0x8074}, -{0x2e92, 0x2411}, -{0x2e94, 0x421e}, -{0x2e96, 0x806e}, -{0x2e98, 0x903e}, -{0x2e9a, 0x0081}, -{0x2e9c, 0x2c0c}, -{0x2e9e, 0x4e0f}, -{0x2ea0, 0x5f0f}, -{0x2ea2, 0x5f0f}, -{0x2ea4, 0x429f}, -{0x2ea6, 0x8084}, -{0x2ea8, 0x80bc}, -{0x2eaa, 0x429f}, -{0x2eac, 0x8088}, -{0x2eae, 0x80be}, -{0x2eb0, 0x531e}, -{0x2eb2, 0x4e82}, -{0x2eb4, 0x806e}, -{0x2eb6, 0x421f}, -{0x2eb8, 0x8078}, -{0x2eba, 0x503f}, -{0x2ebc, 0x0003}, -{0x2ebe, 0x4f82}, -{0x2ec0, 0x8078}, -{0x2ec2, 0x921f}, -{0x2ec4, 0x8048}, -{0x2ec6, 0x2b8b}, -{0x2ec8, 0x3c12}, -{0x2eca, 0x430e}, -{0x2ecc, 0x9292}, -{0x2ece, 0x8086}, -{0x2ed0, 0x8084}, -{0x2ed2, 0x2bd9}, -{0x2ed4, 0x3fd7}, -{0x2ed6, 0x821d}, -{0x2ed8, 0x8086}, -{0x2eda, 0x4d82}, -{0x2edc, 0x8040}, -{0x2ede, 0x3fb9}, -{0x2ee0, 0x4b0f}, -{0x2ee2, 0x521f}, -{0x2ee4, 0x8078}, -{0x2ee6, 0x3f84}, -{0x2ee8, 0x421f}, -{0x2eea, 0x00a6}, -{0x2eec, 0x3f6f}, -{0x2eee, 0x413a}, -{0x2ef0, 0x413b}, -{0x2ef2, 0x4130}, -{0x2ef4, 0xdf02}, -{0x2ef6, 0x3ffe}, -{0x2ef8, 0x430e}, -{0x2efa, 0x930a}, -{0x2efc, 0x2407}, -{0x2efe, 0xc312}, -{0x2f00, 0x100c}, -{0x2f02, 0x2801}, -{0x2f04, 0x5a0e}, -{0x2f06, 0x5a0a}, -{0x2f08, 0x930c}, -{0x2f0a, 0x23f7}, -{0x2f0c, 0x4130}, -{0x2f0e, 0xee0e}, -{0x2f10, 0x403b}, -{0x2f12, 0x0011}, -{0x2f14, 0x3c05}, -{0x2f16, 0x100d}, -{0x2f18, 0x6e0e}, -{0x2f1a, 0x9a0e}, -{0x2f1c, 0x2801}, -{0x2f1e, 0x8a0e}, -{0x2f20, 0x6c0c}, -{0x2f22, 0x6d0d}, -{0x2f24, 0x831b}, -{0x2f26, 0x23f7}, -{0x2f28, 0x4130}, -{0x2f2a, 0xef0f}, -{0x2f2c, 0xee0e}, -{0x2f2e, 0x4039}, -{0x2f30, 0x0021}, -{0x2f32, 0x3c0a}, -{0x2f34, 0x1008}, -{0x2f36, 0x6e0e}, -{0x2f38, 0x6f0f}, -{0x2f3a, 0x9b0f}, -{0x2f3c, 0x2805}, -{0x2f3e, 0x2002}, -{0x2f40, 0x9a0e}, -{0x2f42, 0x2802}, -{0x2f44, 0x8a0e}, -{0x2f46, 0x7b0f}, -{0x2f48, 0x6c0c}, -{0x2f4a, 0x6d0d}, -{0x2f4c, 0x6808}, -{0x2f4e, 0x8319}, -{0x2f50, 0x23f1}, -{0x2f52, 0x4130}, -{0x2f54, 0x0000}, -{0x2ffe, 0xf0cc}, -{0x3000, 0x67f0}, -{0x3002, 0xe7f0}, -{0x3004, 0xc8ff}, -{0x3006, 0x0007}, -{0x3008, 0x8700}, -{0x300a, 0xc1ff}, -{0x300c, 0xfff8}, -{0x300e, 0x0007}, -{0x4000, 0x4500}, -{0x4002, 0x4440}, -{0x4004, 0xf04c}, -{0x4006, 0x0004}, -{0x4008, 0x0440}, -{0x400a, 0xf044}, -{0x400c, 0x4cc1}, -{0x400e, 0x0004}, -// EOFIRM -//-------------------------------------------------------------------- -// end of software code -//-------------------------------------------------------------------- -{0x0a00, 0x0000}, //stream off -{0x0b00, 0x001a}, //sreg00 -{0x0b02, 0x9887}, //sreg01 -{0x0b04, 0xc540}, //sreg02 -{0x0b06, 0xb540}, //sreg03 -{0x0b08, 0xc085}, //sreg04 -{0x0b0a, 0xd651}, //sreg05 -{0x0b0c, 0x0440}, //sreg06 -{0x0b0e, 0xc600}, //sreg07 -{0x0b10, 0x4d28}, //sreg08 -{0x0b12, 0x0000}, //sreg09 -{0x0b14, 0x0000}, //sreg10 -{0x0b16, 0x6e17}, //sreg11 -{0x0b18, 0xf205}, //sreg12 -{0x0b1a, 0x0000}, //sreg13 -{0x0b1c, 0x0000}, //sreg14 -{0x0b1e, 0x0081}, //sreg15 -{0x0b20, 0x0000}, //sreg16 -{0x0b22, 0xcc80}, //sreg17 -{0x0b24, 0x0000}, //sreg18 -{0x0b26, 0x0001}, //sreg19 -{0x0b28, 0x1026}, //sreg20 -{0x0b2a, 0x0000}, //sreg21 -{0x0c00, 0x1190}, //blc_ctrl0 - b4:dpc_en b0:blc_en, blc_ctrl1 - b7:bwi b4:act_ofs b0:tobp_ofs -{0x0c02, 0x0011}, //blc_ctrl2 - b0:median_out_en, blc_ctrl3 - b7:clip b5:dither_debug b4:dither_en b0:channel_blc -{0x0c04, 0x0000}, //blc_ctrl4 - b7:obp bypass -{0x0c06, 0x0200}, //blc_dig_offset -{0x0c10, 0x0040}, //act_rr_offset -{0x0c12, 0x0040}, //act_gr_offset -{0x0c14, 0x0040}, //act_gb_offset -{0x0c16, 0x0040}, //act_bb_offset -{0x0c18, 0x80ff}, //fobp_iir_ctrl0 -{0x0c60, 0x0660}, //ag_weight_bb -{0x0000, 0x0100}, //image orient -{0x0e0a, 0x0000}, //tg_pmem_cen enable -{0x004a, 0x0100}, //tg enable,hdr off -{0x000c, 0x0022}, //bininng off -{0x0008, 0x0b60}, //line length pck -{0x000a, 0x0b60}, //line length pck_prev -{0x0054, 0x0202}, //y dummy size -{0x0012, 0x000e}, //x addr start active -{0x0018, 0x0a31}, //x addr end active -{0x0034, 0x0700}, //y region sel -{0x0022, 0x0008}, //y addr start tobp -{0x0028, 0x0017}, //y addr end tobp -{0x0024, 0x003e}, //y addr start dummy -{0x002a, 0x0043}, //y addr end dummy -{0x0026, 0x0046}, //y addr start active -{0x002c, 0x07d1}, //y addr end active -{0x002e, 0x1111}, //y even/odd inc tobp -{0x0030, 0x1111}, //y even/odd inc dummy -{0x0032, 0x1111}, //y even/odd inc active -{0x001a, 0x1111}, //x even/odd inc dummy0 -{0x001c, 0x1111}, //x even/odd inc dummy1 -{0x001e, 0x1111}, //x even/odd inc active -{0x0006, 0x07c2}, //frame length lines -{0x0a22, 0x0000}, //digial binning mode off -{0x0a12, 0x0a10}, //x output size -{0x0a14, 0x078c}, //y output size -{0x003e, 0x0000}, //tg_ctl_1(0x3E)-crop enable, tg_ctl_2(0x3F)-OTP_Write_Func -{0x0004, 0x07d8}, //coarse integ time -{0x0002, 0x0000}, //fine integ time -{0x0a02, 0x0100}, //fast standby mode -{0x0a04, 0x014a}, //isp_en -{0x0508, 0x0100}, //r_dga_dither -{0x0a1a, 0x0800}, //DG Pedestal Enable -{0x0046, 0x0000}, //grouped para hold -{0x003a, 0x0000}, //analog gain 1x -{0x0036, 0x007f}, //ramp init/rst pofs -{0x0038, 0x7f00}, //ramp sig pofs -{0x004c, 0x7f7f}, //ramp prst/psig pofs -{0x0122, 0x0301}, //d2a_pxl_drv_pwr_hv/lv - rx pcp on -{0x0804, 0x0002}, //r_x_start -{0x004e, 0x0100}, //SREG update for ESD -{0x090c, 0x106c}, //mipi_vblank_delay -{0x090e, 0x0069}, //mipi_hblank_delay -{0x0f02, 0x000f}, //r_pll_cfg1 -//=============================================== -// mipi 2 lane 880Mbp -//=============================================== -{0x0902, 0x4319}, //mipi_tx_op_mode1, mipi_tx_op_mode2 -{0x0914, 0xc10c}, //mipi_exit_seq, tlpx -{0x0916, 0x061d}, //tclk_prepare, tclk_zero -{0x091c, 0x0e09}, //tclk_post, tclk_trail -{0x0918, 0x0307}, //tclk_pre, ths_prepare -{0x091a, 0x0c0c}, //ths_zero, ths_trail -{0x091e, 0x0a00}, //mipi_exit, null -}; - -struct msm_camera_i2c_reg_setting sr552_init = { - sr552_init_reg, sizeof(sr552_init_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_WORD_DATA, 100 -}; - -static struct msm_camera_i2c_reg_array init_otp_reg[] = { - {0x0A02, 0x01, 0x00, 0}, //fast sleep On - {0x0A00, 0x00, 0x00, 100}, // standby on - {0x0F02, 0x00, 0x00, 0}, //PLL disable - {0x011A, 0x01, 0x00, 0}, //CP TRIM_H - {0x011B, 0x09, 0x00, 0}, //IPGM TRIM_H - {0x0D04, 0x01, 0x00, 0}, //Fsync Output Enable - {0x0D00, 0x07, 0x00, 0}, //Fsync Output Drivability - {0x003F, 0x10, 0x00, 0}, //OTP R/W mode - {0x0a00, 0x01, 0x00, 0}, //standby off -}; - -struct msm_camera_i2c_reg_setting init_otp = { - init_otp_reg, sizeof(init_otp_reg)/sizeof(struct msm_camera_i2c_reg_array), MSM_CAMERA_I2C_WORD_ADDR, MSM_CAMERA_I2C_BYTE_DATA, 100 -}; - -extern uint8_t* get_eeprom_data_addr(void); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/Makefile deleted file mode 100755 index 738994c1539e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -ccflags-y += -DEXPORT_SYMTAB -obj-$(CONFIG_OIS) += msm_ois.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.c deleted file mode 100755 index 6f9bfd28e3c4..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.c +++ /dev/null @@ -1,2238 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "[%s::%d] " fmt, __func__, __LINE__ - -#include -#include -#include -#include -#include -#include -#include "msm_sd.h" -#include "msm_ois.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_dt_util.h" - - -DEFINE_MSM_MUTEX(msm_ois_mutex); - -#define OIS_CAL_DATA_INFO_START_ADDR (0x7400) - -#define MAX_RETRY_COUNT (3) - -#undef CDBG -#ifdef CONFIG_MSM_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#undef CDBG_I -#define CONFIG_MSM_CAMERA_DEBUG_INFO -#ifdef CONFIG_MSM_CAMERA_DEBUG_INFO -#define CDBG_I(fmt, args...) pr_info(fmt, ##args) -#else -#define CDBG_I(fmt, args...) do { } while (0) -#endif - - - -static struct i2c_driver msm_ois_i2c_driver; -struct msm_ois_ctrl_t *g_msm_ois_t; -extern struct class *camera_class; /*sys/class/camera*/ - -extern int16_t msm_actuator_move_for_ois_test(void); -extern void msm_actuator_power_for_ois_test(int on); - - -#define GPIO_LEVEL_LOW 0 -#define GPIO_LEVEL_HIGH 1 -#define GPIO_CAM_RESET 36 - -#define SYSFS_OIS_DEBUG_PATH "/sys/class/camera/ois/ois_exif" - -extern void *msm_get_eeprom_data_base(int id, uint32_t *size); - -#if defined(CONFIG_SEC_FACTORY) -int is_factory_mode = 1; -#else -int is_factory_mode = 0; -#endif - -static u8 *msm_eeprom_ois_base(int id) -{ - u32 size = 0; - u8 *ebase = (u8 *)msm_get_eeprom_data_base(id, &size); - if (!ebase) - return NULL; - - if (size < MODULE_OIS_TOTAL_SIZE) { - pr_err("%s eeprom size[%d] expected size[%d]\n", - __func__, size, MODULE_OIS_TOTAL_SIZE); - return NULL; - } - return (ebase + MODULE_OIS_START_ADDR); -} - -/* OIS_A7_START */ - -static int msm_ois_verify_sum(const char *mem, uint32_t size, uint32_t sum) -{ - uint32_t crc = ~0UL; - - /* check overflow */ - if (size > crc - sizeof(uint32_t)) - return -EINVAL; - - crc = crc32_le(crc, mem, size); - if (~crc != sum) { - pr_err("%s: expect 0x%x, result 0x%x\n", __func__, sum, ~crc); - return -EINVAL; - } - CDBG("%s: checksum pass 0x%x\n", __func__, sum); - return 0; -} - - -/* Byte swap short - change big-endian to little-endian */ -uint16_t swap_uint16( uint16_t val ) -{ - return (val << 8) | ((val >> 8) & 0xFF); -} - -uint32_t swap_uint32( uint32_t val ) -{ - val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF ); - return (val << 16) | (val >> 16); -} - -char ois_fw_full[40] = {0,}; -void msm_ois_get_fw(struct msm_ois_ver_t *info, u8 *buf) -{ - if (!buf || !info) - return; - - if (buf[0] == 'A' || buf[0] == 'B') { - info->core_ver = buf[0]; - info->gyro_sensor = buf[1]; - info->driver_ic = buf[2]; - info->year = buf[3]; - info->month = buf[4]; - info->iteration_0 = buf[5]; - info->iteration_1 = buf[6]; - } - - CDBG("%c%c%c%c%c%c%c\n", info->core_ver, info->gyro_sensor, info->driver_ic, - info->year, info->month, info->iteration_0, info->iteration_1); - -} - -void msm_ois_fw_tostrng(struct msm_ois_ver_t *info, u8 *buf) -{ - if (!info || (info->core_ver != 'A' && info->core_ver != 'B')) - sprintf(buf, "NULL"); - else - sprintf(buf, "%c%c%c%c%c%c%c", info->core_ver, info->gyro_sensor, - info->driver_ic, info->year, info->month, info->iteration_0, info->iteration_1); -} - - -void msm_ois_set_offset(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - - if (a_ctrl->fw_info.module_fw) { - /*Default: LOAD SHIFT DATA & CALIBRATION DATA FROM EEPROM */ - a_ctrl->fw_info.shift_offset = MODULE_OIS_SHIFT_DATA_OFFSET; - a_ctrl->fw_info.shift_data_size = MODULE_OIS_SHIFT_DATA_SIZE; - a_ctrl->fw_info.shift_chksum_offset = MODULE_OIS_SHIFT_DATA_CHK_SUM_OFFSET; - - a_ctrl->fw_info.cal_offset = MODULE_OIS_CAL_DATA_OFFSET; - a_ctrl->fw_info.cal_data_size = MODULE_OIS_CAL_DATA_MAP_SIZE; - a_ctrl->fw_info.cal_chksum_offset = MODULE_OIS_CAL_DATA_CHK_SUM_OFFSET; - } else { - /* LOAD SHIFT DATA & CALIBRATION DATA FROM PHONE */ - a_ctrl->fw_info.shift_offset = PHONE_OIS_SHIFT_DATA_OFFSET; - a_ctrl->fw_info.shift_data_size = PHONE_OIS_SHIFT_DATA_SIZE; - a_ctrl->fw_info.shift_chksum_offset = PHONE_OIS_SHIFT_DATA_CHK_SUM_OFFSET; - - a_ctrl->fw_info.cal_offset = PHONE_OIS_CAL_DATA_OFFSET; - a_ctrl->fw_info.cal_data_size = PHONE_OIS_CAL_DATA_MAP_SIZE; - a_ctrl->fw_info.cal_chksum_offset = PHONE_OIS_CAL_DATA_CHK_SUM_OFFSET; - } - - if (mode) { // Load phone FW - a_ctrl->fw_info.fw_offset = PHONE_OIS_FW_OFFSET; - a_ctrl->fw_info.fw_data_size = PHONE_OIS_FW_MAP_SIZE; - a_ctrl->fw_info.fw_chksum_offset = PHONE_OIS_FW_CHK_SUM_OFFSET; - - a_ctrl->fw_info.fa_fw_offset = PHONE_OIS_FW_FACTORY_OFFSET; - a_ctrl->fw_info.fa_fw_data_size = PHONE_OIS_FW_FACTORY_MAP_SIZE; - a_ctrl->fw_info.fa_fw_chksum_offset = PHONE_OIS_FW_FACTORY_CHK_SUM_OFFSET; - - a_ctrl->fw_info.load_fw = a_ctrl->fw_info.phone_fw; - a_ctrl->fw_info.is_phone_fw = 1; - CDBG_I("***** LOADING PHONE FIRMWARE *****\n"); - - } else { // Load Module FW - - a_ctrl->fw_info.fw_offset = MODULE_OIS_FW_OFFSET; - a_ctrl->fw_info.fw_data_size = MODULE_OIS_FW_MAP_SIZE; - a_ctrl->fw_info.fw_chksum_offset = MODULE_OIS_FW_CHK_SUM_OFFSET; - - a_ctrl->fw_info.fa_fw_offset = MODULE_OIS_FW_FACTORY_OFFSET; - a_ctrl->fw_info.fa_fw_data_size = MODULE_OIS_FW_FACTORY_MAP_SIZE; - a_ctrl->fw_info.fa_fw_chksum_offset = MODULE_OIS_FW_FACTORY_CHK_SUM_OFFSET; - - a_ctrl->fw_info.load_fw = a_ctrl->fw_info.module_fw; - CDBG_I("***** LOADING MODULE FIRMWARE *****\n"); - } -} - -int msm_ois_get_fw_revision(struct msm_ois_ver_t *info) -{ - int rev; - rev = (info->year - 64) * 1000; - rev += (info->month - 64) * 100; - rev += (info->iteration_1 - 48) * 10; - rev += (info->iteration_0 - 48); - - return rev; -} - -int msm_ois_cal_revision(char *cal_ver) -{ - int revision = 0; - - if (!cal_ver) - return 0; - - if( cal_ver[0] != 'V' - || cal_ver[1] < '0' || cal_ver[1] > '9' - || cal_ver[2] < '0' || cal_ver[2] > '9' - || cal_ver[3] < '0' || cal_ver[3] > '9' ) { - return 0; - } - - revision = ((cal_ver[1] - '0') * 100) + ((cal_ver[2] - '0') * 10) + (cal_ver[3] - '0'); - - CDBG_I(": %d\n", revision); - - return revision; -} - -void msm_ois_get_load_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - int is_phone_fw = 0; /* default is module firmware */ -/* - 1. If both phone & module firmware does not exist then return - - 2. If force flag set from sysfs or module firmware doesnot exist - but phone firmware exist then load phone firmware - - 3. If Both phone & module firmware exist & no force phone firmware flag set then, - i. If phone & module calibration version do not match then load module firmware - ii. Else if module firmware version greter that phone firmware then - then load module firmware - iii. Other wise load phone firmware -*/ - - if ((!a_ctrl->fw_info.module_fw) && (!a_ctrl->fw_info.phone_fw)) - return; - - if (!a_ctrl->fw_info.module_fw) { - is_phone_fw = 1; - } else if (!a_ctrl->fw_info.phone_fw) { - is_phone_fw = 0; - } else if (a_ctrl->fw_info.force_phone == true || - a_ctrl->fw_info.force_test == true) { - is_phone_fw = 1; - - } else { - int cal_rev_m, cal_rev_p; - cal_rev_m = msm_ois_cal_revision((char *)&a_ctrl->fw_info.module_fw[0x48]); - cal_rev_p = msm_ois_cal_revision((char *)&a_ctrl->fw_info.phone_fw[0x48]); - - CDBG_I("Calibration version: Module[%d] Phone[%d]\n", cal_rev_m, cal_rev_p); - - if (cal_rev_m == cal_rev_p) { - int fw_rev_m, fw_rev_p; - fw_rev_m = msm_ois_get_fw_revision(&a_ctrl->fw_info.module_ver); - fw_rev_p = msm_ois_get_fw_revision(&a_ctrl->fw_info.phone_ver); - - if (fw_rev_m < fw_rev_p) { - is_phone_fw = 1; - } - } - } - - msm_ois_set_offset(a_ctrl, is_phone_fw); -} - -void msm_ois_get_fw_version(struct msm_ois_ctrl_t *a_ctrl) -{ - struct msm_ois_ver_t l_fw_ver; - char P_FW[10] = {0,}, M_FW[10] = {0,}, L_FW[10] = {0,}; - - msm_ois_fw_tostrng(&a_ctrl->fw_info.module_ver, M_FW); - msm_ois_fw_tostrng(&a_ctrl->fw_info.phone_ver, P_FW); - - msm_ois_get_load_fw(a_ctrl); - if (a_ctrl->fw_info.load_fw) - msm_ois_get_fw(&l_fw_ver, &a_ctrl->fw_info.load_fw[0x40]); - - msm_ois_fw_tostrng(&l_fw_ver, L_FW); - - sprintf(ois_fw_full, "%s %s %s", M_FW, P_FW, L_FW); - CDBG_I("ois fw[%s]\n", ois_fw_full); -} - -void msm_ois_get_cal_version(struct msm_ois_ctrl_t *a_ctrl) -{ - u8 *buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return; - } - - memcpy(a_ctrl->fw_info.cal_info.cal_ver, &buf[0x48], 4); -} - -u8 i2c_write_buf[5000] = {0,}; -int msm_ois_i2c_write_multi(struct msm_ois_ctrl_t *a_ctrl, u16 addr, u8 *data, size_t size) -{ - int ret = 0, err = 0; - int retries = I2C_RETRY_COUNT; - ulong i = 0; - - struct i2c_client *client = a_ctrl->i2c_client.client; - uint16_t saddr = client->addr >> 1; - - struct i2c_msg msg = { - .addr = saddr, - .flags = 0, - .len = size + 2, - .buf = i2c_write_buf, - }; - - i2c_write_buf[0] = (addr & 0xFF00) >> 8; - i2c_write_buf[1] = addr & 0xFF; - - for (i = 0; i < size; i++) { - i2c_write_buf[i + 2] = *(data + i); - } - CDBG("OISLOG %s : W(0x%02X%02X, start:%02X, end:%02X)\n", __func__, - i2c_write_buf[0], i2c_write_buf[1], i2c_write_buf[2], i2c_write_buf[i + 1]); - - do { - ret = i2c_transfer(client->adapter, &msg, 1); - if (likely(ret == 1)) - break; - - usleep_range(10000,11000); - err = ret; - } while (--retries > 0); - - /* Retry occured */ - if (unlikely(retries < I2C_RETRY_COUNT)) { - pr_err("i2c_write: error %d, write (%04X, %04X), retry %d\n", - err, addr, *data, I2C_RETRY_COUNT - retries); - } - - if (unlikely(ret != 1)) { - pr_err("I2C does not work\n\n"); - return -EIO; - } - - return 0; -} - -static int msm_ois_i2c_read_multi(struct msm_ois_ctrl_t *a_ctrl, u16 addr, u8 *data, size_t size) -{ - int err; - u8 rxbuf[256], txbuf[2]; - struct i2c_msg msg[2]; - struct i2c_client *client = a_ctrl->i2c_client.client; - uint16_t saddr = client->addr >> 1; - - txbuf[0] = (addr & 0xff00) >> 8; - txbuf[1] = (addr & 0xff); - - msg[0].addr = saddr; - msg[0].flags = 0; - msg[0].len = 2; - msg[0].buf = txbuf; - - msg[1].addr = saddr; - msg[1].flags = I2C_M_RD; - msg[1].len = size; - msg[1].buf = rxbuf; - - err = i2c_transfer(client->adapter, msg, 2); - if (unlikely(err != 2)) { - pr_err("%s: register read fail", __func__); - return -EIO; - } - - memcpy(data, rxbuf, size); - return 0; -} - -u32 msm_ois_read_cal_checksum(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 read_data[4] = {0,}; - u32 checksum = 0; - - ret = msm_ois_i2c_read_multi(a_ctrl, 0xF008, read_data, 4); - if (ret) { - pr_err("i2c read fail\n"); - } - - checksum = (read_data[0] << 24) | (read_data[1] << 16) | (read_data[2] << 8) | (read_data[3]); - - CDBG("%s : R(0x%02X%02X%02X%02X)\n", - __func__, read_data[0], read_data[1], read_data[2], read_data[3]); - - return checksum; -} - -int msm_ois_load_phone_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - - int ret = 0; - long fsize = 0; - u8 *read_buf = NULL; - u8 *temp_buf = NULL; - - static char fw_name[100]; - struct file *fp = NULL; - mm_segment_t old_fs; - long nread; - //uint8_t core_ver = a_ctrl->fw_info.module_ver.core_ver; - uint8_t core_ver = 'B'; - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - if (!a_ctrl) { - pr_err("%s:%d a_ctrl is NULL\n", __func__, __LINE__); - goto p_err; - } - core_ver = a_ctrl->fw_info.module_ver.core_ver; - - if (a_ctrl->fw_info.phone_fw) { - /* reload phone f/w requested. free previous buffer */ - vfree(a_ctrl->fw_info.phone_fw); - a_ctrl->fw_info.phone_fw = NULL; - } - - if (a_ctrl->fw_info.force_test || core_ver == 'A') { - CDBG_I("Phone FW reading from [%s]\n", MSM_OIS_SP_FW_PATH); - snprintf(fw_name, sizeof(fw_name), "%s", MSM_OIS_SP_FW_PATH); - fp = filp_open(fw_name, O_RDONLY, 0); - if (IS_ERR_OR_NULL(fp)) { - pr_err("%s:%d Camera: Failed open phone firmware", __func__, __LINE__); - ret = -EIO; - fp = NULL; - goto p_err; - } - } else { - CDBG_I("Phone FW reading from [%s]\n", MSM_OIS_SE_FW_PATH); - snprintf(fw_name, sizeof(fw_name), "%s", MSM_OIS_SE_FW_PATH); - fp = filp_open(fw_name, O_RDONLY, 0); - if (IS_ERR(fp)) { - pr_err("%s:%d Camera: Failed open phone firmware", __func__, __LINE__); - ret = -EIO; - fp = NULL; - goto p_err; - } - } - - fsize = fp->f_path.dentry->d_inode->i_size; - CDBG_I("start, file path [%s], size %ld Bytes\n", fw_name, fsize); - - if (fsize > MSM_MAX_OIS_SIZE) { - CDBG_I("ERR: OIS FW is very large!\n"); - ret = -EIO; - goto p_err; - } else { - read_buf = vmalloc(fsize); - if (!read_buf) { - CDBG_I("ERR: Mem Allocation\n"); - ret = -EIO; - goto p_err; - } - memset(read_buf, 0x0, fsize); - } - - nread = vfs_read(fp, read_buf, fsize, &fp->f_pos); - if (nread != fsize) { - pr_err("failed to read firmware file, %ld Bytes", nread); - ret = -EIO; - goto p_err; - } - - a_ctrl->fw_info.phone_fw = read_buf; - - if (a_ctrl->fw_info.phone_fw) - msm_ois_get_fw(&a_ctrl->fw_info.phone_ver, &a_ctrl->fw_info.phone_fw[0x40]); - - if (a_ctrl->fw_info.phone_ver.core_ver != 'A' && - a_ctrl->fw_info.phone_ver.core_ver != 'B') { - - pr_err("%s:%d OIS phone firmware core version missmatch expected [A/B] got[%c]\n", - __func__, __LINE__, a_ctrl->fw_info.phone_ver.core_ver); - a_ctrl->fw_info.phone_fw = NULL; - - goto p_err; - } - - CDBG_I("OIS firmware is loaded from Phone binary.\n"); - -p_err: - if (read_buf && a_ctrl->fw_info.phone_fw == NULL) { - vfree(read_buf); - read_buf = NULL; - temp_buf = NULL; - } - if (fp) { - filp_close(fp, current->files); - fp = NULL; - } - set_fs(old_fs); - - return ret; -} - - -void msm_ois_load_module_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - a_ctrl->fw_info.module_fw = msm_eeprom_ois_base(0); - if (a_ctrl->fw_info.module_fw) - msm_ois_get_fw(&a_ctrl->fw_info.module_ver, &a_ctrl->fw_info.module_fw[0x40]); - - if (a_ctrl->fw_info.module_ver.core_ver != 'A' && - a_ctrl->fw_info.module_ver.core_ver != 'B') { - - pr_err("%s:%d OIS module firmware core version missmatch expected [A/B] got[%c]\n", - __func__, __LINE__, a_ctrl->fw_info.phone_ver.core_ver); - a_ctrl->fw_info.module_fw = NULL; - } - - return; -} - -int msm_ois_load_fw(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - if (a_ctrl->fw_info.is_loaded == false) { - msm_ois_load_module_fw(a_ctrl); - msm_ois_load_phone_fw(a_ctrl); - - msm_ois_get_fw_version(a_ctrl); - msm_ois_get_cal_version(a_ctrl); - - a_ctrl->fw_info.is_loaded = true; - } - return ret; -} - - -int msm_ois_download_factory_fw_set(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_set_fw_addr = 0; - uint16_t ois_set_fw_target_addr1; - uint16_t ois_set_fw_offset1 = 0; - uint16_t ois_set_fw_size1 = 0; - - uint16_t ois_set_fw_target_addr2; - uint16_t ois_set_fw_offset2 = 0; - uint16_t ois_set_fw_size2 = 0; - - uint16_t ois_set_fw_target_addr3; - uint16_t ois_set_fw_offset3 = 0; - uint16_t ois_set_fw_size3 = 0; - - u32 checksum_fw = 0; - u32 checksum_module = 0; - - CDBG_I("E"); - /* Access to "OIS FW DL" */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF010, 0x00); - if (ret < 0) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return 0; /* returning success: as withouth OIS camera must work */ - } - ois_set_fw_addr = a_ctrl->fw_info.fa_fw_offset; - CDBG_I("OIS SET FW Loading.\n"); - - ret = msm_ois_verify_sum(&buf[ois_set_fw_addr],\ - a_ctrl->fw_info.fa_fw_data_size, *(int *)(buf + a_ctrl->fw_info.fa_fw_chksum_offset)); - if (ret < 0) { - pr_err("%s: OIS_FW check sum verification failed! checksum[%p] fw[%p]\n", __func__, - &buf[a_ctrl->fw_info.fa_fw_chksum_offset], &buf[ois_set_fw_addr]); - return -EINVAL; - } - - ois_set_fw_target_addr1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_TARGET_ADDR_OFFSET])); - ois_set_fw_offset1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_OFFSET_ADDR_OFFSET])); - ois_set_fw_size1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size1 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr1, - &buf[ois_set_fw_addr+ois_set_fw_offset1], ois_set_fw_size1); - - ois_set_fw_target_addr2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_TARGET_ADDR_OFFSET])); - ois_set_fw_offset2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_OFFSET_ADDR_OFFSET])); - ois_set_fw_size2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size2 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr2, - &buf[ois_set_fw_addr+ois_set_fw_offset2], ois_set_fw_size2); - - ois_set_fw_target_addr3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_TARGET_ADDR_OFFSET])); - ois_set_fw_offset3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_OFFSET_ADDR_OFFSET])); - ois_set_fw_size3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size3 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr3, - &buf[ois_set_fw_addr+ois_set_fw_offset3], ois_set_fw_size3); - - checksum_fw = swap_uint32(*((int32_t *)&buf[ois_set_fw_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - if (checksum_fw != checksum_module) { - pr_err("%s: OIS FW check sum mismatch!\n", __func__); - ret = -EINVAL; - } - - CDBG_I("Success X\n"); - - CDBG("OIS SET FW addr = 0x%04X\n", ois_set_fw_addr); - CDBG("OIS SET FW #1 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr1, ois_set_fw_offset1, ois_set_fw_size1); - CDBG("OIS SET FW #2 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr2, ois_set_fw_offset2, ois_set_fw_size2); - CDBG("OIS SET FW #3 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr3, ois_set_fw_offset3, ois_set_fw_size3); - CDBG("OIS SET FW checksum = ( Phone-0x%08X : Module-0x%08X)\n", - checksum_fw, checksum_module); - return ret; -} - - - - -int msm_ois_download_fw_set(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_set_fw_addr = 0; - uint16_t ois_set_fw_target_addr1; - uint16_t ois_set_fw_offset1 = 0; - uint16_t ois_set_fw_size1 = 0; - - uint16_t ois_set_fw_target_addr2; - uint16_t ois_set_fw_offset2 = 0; - uint16_t ois_set_fw_size2 = 0; - - uint16_t ois_set_fw_target_addr3; - uint16_t ois_set_fw_offset3 = 0; - uint16_t ois_set_fw_size3 = 0; - - u32 checksum_fw = 0; - u32 checksum_module = 0; - - /* Access to "OIS FW DL" */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF010, 0x00); - if (ret < 0) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - buf = a_ctrl->fw_info.load_fw; - if (!buf) { - pr_err("%s eeprom base is NULL!\n", __func__); - return 0; /* returning success: as withouth OIS camera must work */ - } - ois_set_fw_addr = a_ctrl->fw_info.fw_offset;; - CDBG_I("OIS SET FW Loading...\n"); - - ret = msm_ois_verify_sum(&buf[ois_set_fw_addr],\ - a_ctrl->fw_info.fw_data_size, *(int *)(buf + a_ctrl->fw_info.fw_chksum_offset)); - if (ret < 0) { - pr_err("OIS_FW check sum verification failed! checksum[%p] fw[%p]\n", &buf[a_ctrl->fw_info.fw_chksum_offset],\ - &buf[ois_set_fw_addr]); - return -EINVAL; - } - - ois_set_fw_target_addr1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_TARGET_ADDR_OFFSET])); - ois_set_fw_offset1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_OFFSET_ADDR_OFFSET])); - ois_set_fw_size1 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D1_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size1 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr1, - &buf[ois_set_fw_addr+ois_set_fw_offset1], ois_set_fw_size1); - - ois_set_fw_target_addr2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_TARGET_ADDR_OFFSET])); - ois_set_fw_offset2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_OFFSET_ADDR_OFFSET])); - ois_set_fw_size2 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D2_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size2 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr2, - &buf[ois_set_fw_addr+ois_set_fw_offset2], ois_set_fw_size2); - - ois_set_fw_target_addr3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_TARGET_ADDR_OFFSET])); - ois_set_fw_offset3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_OFFSET_ADDR_OFFSET])); - ois_set_fw_size3 = - swap_uint16(*((uint16_t *)&buf[ois_set_fw_addr+OIS_SET_FW_D3_SIZE_ADDR_OFFSET])); - if (ois_set_fw_size3 > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_set_fw_target_addr3, - &buf[ois_set_fw_addr+ois_set_fw_offset3], ois_set_fw_size3); - - checksum_fw = swap_uint32(*((int32_t *)&buf[ois_set_fw_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - if (checksum_fw != checksum_module) { - pr_err("OIS FW check sum mismatch!\n"); - ret = -EINVAL; - } - - CDBG_I("Success X\n"); - - CDBG("OIS SET FW addr = 0x%04X\n", ois_set_fw_addr); - CDBG("OIS SET FW #1 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr1, ois_set_fw_offset1, ois_set_fw_size1); - CDBG("OIS SET FW #2 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr2, ois_set_fw_offset2, ois_set_fw_size2); - CDBG("OIS SET FW #3 target reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_set_fw_target_addr3, ois_set_fw_offset3, ois_set_fw_size3); - CDBG("OIS SET FW checksum = ( Phone-0x%08X : Module-0x%08X)\n", - checksum_fw, checksum_module); - return ret; -} - -int msm_ois_download_cal_data(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - int ret = 0; - u8 *buf = NULL; - - uint16_t ois_cal_start_addr = a_ctrl->fw_info.cal_offset; - uint16_t ois_cal_target_addr; - uint16_t ois_cal_offset = 0; - uint16_t ois_cal_size = 0; - - u32 checksum_fw = 0; - u32 checksum_cal = 0; - u32 checksum_module = 0; - - buf = a_ctrl->fw_info.module_fw; - if (!buf) { - pr_err("%s Module firmware is NULL! Trying phone firmware..\n", __func__); - buf = a_ctrl->fw_info.phone_fw; - if (!buf) { - pr_err("%s Phone firmware is NULL!\n", __func__); - return 0; /* returning success: as without OIS camera must work */ - } - } - - if (a_ctrl->fw_info.cal_chksum_offset != 0xFFFF) { - ret = msm_ois_verify_sum(&buf[ois_cal_start_addr],\ - a_ctrl->fw_info.cal_data_size, *(int *)(buf + a_ctrl->fw_info.cal_chksum_offset)); - if (ret < 0) { - pr_err("OIS_CAL check sum verification failed! checksum[%p] fw[%p]\n", &buf[a_ctrl->fw_info.cal_chksum_offset],\ - &buf[ois_cal_start_addr]); - return -EINVAL; - } - } - - ois_cal_target_addr = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_TRGT_ADDR_OFFSET])); - ois_cal_offset = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_OFFSET_OFFSET])); - ois_cal_size = swap_uint16(*((uint16_t *)&buf[ois_cal_start_addr + OIS_CAL_DATA_SIZE_OFFSET])); - if (ois_cal_size > 0) - ret = msm_ois_i2c_write_multi(a_ctrl, ois_cal_target_addr, - &buf[ois_cal_start_addr + ois_cal_offset], ois_cal_size); - - - if (mode == 0) - checksum_fw = swap_uint32(*((int32_t *)&buf[a_ctrl->fw_info.fw_offset])); - else - checksum_fw = swap_uint32(*((int32_t *)&buf[a_ctrl->fw_info.fa_fw_offset])); - - checksum_cal = swap_uint32(*((int32_t *)&buf[ois_cal_start_addr])); - checksum_module = msm_ois_read_cal_checksum(a_ctrl); - - /* OIS Download Complete */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0xF006, 0x00); - if (ret) { - pr_err("i2c write fail\n"); - ret = -EINVAL; - } - - - if (checksum_fw + checksum_cal != checksum_module) { - pr_err("%s:%d OIS CAL check sum mismatch! checksum_fw[%x] + checksum_fw[%x] != module_checksum[%x]\n", - __func__, __LINE__, checksum_fw, checksum_cal, checksum_module); - ret = -EINVAL; - } - - if (ret == 0) - CDBG_I("Success!"); - - CDBG("OIS Cal FW addr = 0x%04X\n", ois_cal_start_addr); - CDBG("OIS Cal target Reg. = 0x%04X, offset = 0x%04X, size = 0x%04X\n", - ois_cal_target_addr, ois_cal_offset, ois_cal_size); - CDBG("OIS Cal FW checksum = ( 0x%08X : 0x%08X)\n", checksum_fw, checksum_module); - - return ret; -} - - -int msm_ois_read_status(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret = 0; - u16 status = 0; - int wait_ready_cnt = 0; - - do { - ret = msm_ois_i2c_byte_read(a_ctrl, 0x6024, &status); - if (ret < 0) { - pr_err("i2c read fail\n"); - } - - if (status != 0) - break; - - usleep_range(5000, 5010); - wait_ready_cnt ++; - } while(wait_ready_cnt < 200); - - if (status) { - CDBG_I("ois status ready(%d), wait(%d ms)\n", status, wait_ready_cnt * 5); - } else { - pr_err("ois status NOT ready(%d), wait(%d ms)\n", status, wait_ready_cnt * 5); - ret = -EINVAL; - } - - return ret; -} - -int msm_ois_fw_update(struct msm_ois_ctrl_t *a_ctrl, int mode) -{ - int ret = 0; - int retry_cnt = 0; - - CDBG_I("E\n"); - - /* Select FW (PHONE or EEPROM) */ - //msm_ois_check_fw(core); - - /* Download FW (SET or FACTORY) */ - retry_cnt = 3; - do { - if (mode == 0) - ret = msm_ois_download_fw_set(a_ctrl); - else - ret = msm_ois_download_factory_fw_set(a_ctrl); - if (ret) { - pr_err("%s:%d ois fw write fail, ret(%d)\n", __func__, __LINE__, ret); - goto out; - } - retry_cnt--; - }while( ret && (retry_cnt > 0)); - - /* Dwonload OIS Cal data */ - ret = msm_ois_download_cal_data(a_ctrl, mode); - if (ret) { - pr_err("%s:%d ois caldata write fail\n", __func__, __LINE__); - goto out; - } - - -#if defined(OIS_TEST_WITHOUT_FW) - /* OIS Servo On, OIS Off, Gyro On */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); - - /* OIS Servo On / OIS Off */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - ret |= msm_ois_read_status(a_ctrl); - - /* OIS Mode */ - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x7B); - ret |= msm_ois_read_status(a_ctrl); - - /* Compensation angle */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0x40); - ret |= msm_ois_read_status(a_ctrl); - - /* OIS On */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); - ret |= msm_ois_read_status(a_ctrl); - - if (ret) { - pr_err("OIS Test fail\n"); - } -#endif -out: - CDBG_I("Status[%s] X\n", ret ? "Failed!":"Success!"); - - return ret; -} - -int msm_ois_set_mode_still(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x7B); /*OIS Mode Still*/ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0x40); /*revision angle*/ - ret |= msm_ois_read_status(a_ctrl); - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); /* Servo Off/ OIS On */ - ret |= msm_ois_read_status(a_ctrl); - - return ret; -} - -int msm_ois_set_mode_recording(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6021, 0x61); /*OIS Mode Still*/ - ret |= msm_ois_read_status(a_ctrl); - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6025, 0xE0); /*revision angle*/ - ret |= msm_ois_read_status(a_ctrl); - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x02); /* Servo Off/ OIS On */ - ret |= msm_ois_read_status(a_ctrl); - - return ret; -} - - -static int msm_ois_set_mode_sin_x(struct msm_ois_ctrl_t *a_ctrl) -{ - int rc; - rc = msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x00); // Sin Mode Off - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); // Servo_ON - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6131, 0x01); // Frequency = 1Hz - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6132, 0x30); // AMP = 48 - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x03); // Manual Mode - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x01); // Xì¶• Sin_Mode ë™ìž‘ - - return rc; -} - -static int msm_ois_set_mode_sin_y(struct msm_ois_ctrl_t *a_ctrl) -{ - int rc; - rc = msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x00); // Sin Mode Off - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); // Servo_ON - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6131, 0x01); // Frequency = 1Hz - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6132, 0x30); // AMP = 48 - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x03); // Manual Mode - rc |= msm_ois_i2c_byte_write(a_ctrl, 0x6130, 0x02); // Yì¶• Sin_Mode ë™ìž‘ - - return rc; -} - -/* OIS_A7_END */ - -static int msm_ois_get_fw_status(struct msm_ois_ctrl_t *a_ctrl) -{ - int ret; - /* OIS Status Read */ - ret = msm_ois_read_status(a_ctrl); - if (ret) { - pr_err("%s:%d OIS Active Failed!\n", __func__, __LINE__); - return -EIO; - } - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* OIS Servo On/ OIS Off */ - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); /* Gyro On*/ - - ret |= msm_ois_read_status(a_ctrl); - - return 0; -} - - -static int32_t msm_ois_set_mode(struct msm_ois_ctrl_t *a_ctrl, - uint16_t mode) -{ - int rc = 0; - switch(mode) { - case OIS_MODE_ON_STILL: - if (a_ctrl->ois_mode != OIS_MODE_ON_STILL) { - CDBG_I("SET :: OIS_MODE_ON_STILL\n"); - rc = msm_ois_set_mode_still(a_ctrl); - a_ctrl->ois_mode = OIS_MODE_ON_STILL; - } - break; - case OIS_MODE_ON_ZOOM: - CDBG_I("SET :: OIS_MODE_ON_ZOOM\n"); - rc = -EINVAL; - break; - case OIS_MODE_ON_VIDEO: - if (a_ctrl->ois_mode != OIS_MODE_ON_VIDEO) { - CDBG_I("SET :: OIS_MODE_ON_VIDEO\n"); - rc = msm_ois_set_mode_recording(a_ctrl); - a_ctrl->ois_mode = OIS_MODE_ON_VIDEO; - } - break; - case OIS_MODE_SINE_X: - CDBG_I("SET :: OIS_MODE_SINE_X\n"); - rc = msm_ois_set_mode_sin_x(a_ctrl); - break; - - case OIS_MODE_SINE_Y: - CDBG_I("SET :: OIS_MODE_SINE_Y\n"); - rc = msm_ois_set_mode_sin_y(a_ctrl); - break; - - case OIS_MODE_CENTERING: - CDBG_I("SET :: OIS_MODE_CENTERING\n"); - rc = -EINVAL; - break; - default: - rc = msm_ois_set_mode_still(a_ctrl); - break; - } - return rc; -} - -int msm_ois_i2c_byte_read(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t *data) -{ - int rc = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_read( - &a_ctrl->i2c_client, addr, data, MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) { - pr_err("ois i2c byte read failed addr : 0x%x data : 0x%x ", addr, *data); - return rc; - } - - CDBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return 0; -} - -int msm_ois_i2c_byte_write(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t data) -{ - int rc = 0; - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &a_ctrl->i2c_client, addr, data, MSM_CAMERA_I2C_BYTE_DATA); - - if (rc < 0) { - pr_err("ois i2c byte write failed addr : 0x%x data : 0x%x ", addr, data); - return rc; - } - - CDBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, data); - return 0; -} - -uint16_t msm_ois_calcchecksum(unsigned char *data, int size) -{ - int i = 0; - uint16_t result = 0; - - for( i = 0; i < size; i += 2) { - result = result + (0xFFFF & (((*(data + i + 1)) << 8) | (*(data + i)))); - } - return result; -} - -#if 0 -static int32_t msm_ois_vreg_control(struct msm_ois_ctrl_t *a_ctrl, int config) -{ - int rc = 0, i, cnt; - int idx = 0; - struct msm_ois_vreg *vreg_cfg; - - CDBG_I("Enter\n"); - vreg_cfg = &a_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt){ - pr_err("failed\n"); - return 0; - } - CDBG("[num_vreg::%d]", cnt); - - if (cnt >= MSM_OIS_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - if(config) { - idx = i; - } - else { - idx = cnt - (i + 1); - } - - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = msm_camera_config_single_vreg(&(a_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[idx], - (struct regulator **)&vreg_cfg->data[idx], - config); - } else { - rc = msm_camera_config_single_vreg(&(a_ctrl->i2c_client.client->dev), - &vreg_cfg->cam_vreg[idx], - (struct regulator **)&vreg_cfg->data[idx], - config); - } - - } - return rc; -} -#endif - -static int32_t msm_ois_config(struct msm_ois_ctrl_t *a_ctrl, - void __user *argp) -{ - struct msm_ois_cfg_data *cdata = - (struct msm_ois_cfg_data *)argp; - int32_t rc = 0; - int retries = 2; - - mutex_lock(a_ctrl->ois_mutex); - CDBG_I("%s type [%d] E\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_OIS_SET_MODE: - CDBG("CFG_OIS_SET_MODE value :: %d\n", cdata->set_mode_value); - do{ - rc = msm_ois_set_mode(a_ctrl, cdata->set_mode_value); - if (rc){ - pr_err("set mode failed %d\n", rc); - if (--retries < 0) - break; - } - }while(rc); - break; - case CFG_OIS_READ_MODULE_VER: - CDBG("CFG_OIS_READ_MODULE_VER enter \n"); - //rc = msm_ois_read_module_ver(a_ctrl); - if (rc < 0) - pr_err("read module version failed, skip fw update from phone %d\n", rc); - - if (copy_to_user(cdata->version, &a_ctrl->fw_info.module_ver, sizeof(struct msm_ois_ver_t))) - pr_err("copy to user failed \n"); - break; - - case CFG_OIS_READ_PHONE_VER: - CDBG("CFG_OIS_READ_PHONE_VER enter \n"); - if(isalnum(a_ctrl->fw_info.module_ver.gyro_sensor)) - { - //rc = msm_ois_read_phone_ver(a_ctrl); - if (rc < 0) - pr_err("There is no OIS FW in the system. skip fw update from phone %d\n", rc); - - if (copy_to_user(cdata->version, &a_ctrl->fw_info.phone_ver, sizeof(struct msm_ois_ver_t))) - pr_err("copy to user failed \n"); - } - break; - - case CFG_OIS_READ_CAL_INFO: - CDBG("CFG_OIS_READ_CAL_INFO enter \n"); - if (rc < 0) - pr_err("ois read user data failed %d\n", rc); - - if (copy_to_user(cdata->ois_cal_info, &a_ctrl->fw_info.cal_info, sizeof(struct msm_ois_cal_info_t))) - pr_err("copy to user failed\n"); - break; - - case CFG_OIS_FW_UPDATE: - CDBG("CFG_OIS_FW_UPDATE enter \n"); - a_ctrl->ois_mode = OIS_MODE_OFF; - rc = msm_ois_fw_update(a_ctrl, is_factory_mode); - if (rc < 0) - pr_err("ois fw update failed %d\n", rc); - break; - case CFG_OIS_GET_FW_STATUS: - CDBG("CFG_OIS_GET_FW_STATUS enter \n"); - rc = msm_ois_get_fw_status(a_ctrl); - if (rc) - pr_err("previous fw update failed , force update will be done %d\n", rc); - break; - - case CFG_OIS_POWERDOWN: - //rc = msm_ois_power_down(a_ctrl); - rc = msm_ois_disable_reset(a_ctrl); - if (rc < 0) - pr_err("msm_ois_power_down failed %d\n", rc); - break; - - case CFG_OIS_POWERUP: - rc = msm_ois_power_up(a_ctrl); - if (rc < 0) - pr_err("Failed ois power up%d\n", rc); - break; - - default: - break; - } - mutex_unlock(a_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_get_subdev_id(struct msm_ois_ctrl_t *a_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = a_ctrl->pdev->id; - else - *subdev_id = a_ctrl->subdev_id; - - CDBG_I("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_seq = msm_camera_qup_i2c_write_seq, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_ois_open(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG_I("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - if (a_ctrl->gpio_conf && a_ctrl->gpio_conf->cam_gpio_req_tbl) { - CDBG("%s:%d request gpio\n", __func__, __LINE__); - rc = msm_camera_request_gpio_table( - a_ctrl->gpio_conf->cam_gpio_req_tbl, - a_ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - } - msm_ois_power_up(a_ctrl); - a_ctrl->is_camera_run = TRUE; - a_ctrl->is_set_debug_info = FALSE; - - a_ctrl->ois_mode = OIS_MODE_OFF; - msm_ois_load_fw(a_ctrl); - - CDBG("Exit\n"); - return rc; -} - -static int msm_ois_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG_I("Enter\n"); - if (!a_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - if (a_ctrl->gpio_conf && a_ctrl->gpio_conf->cam_gpio_req_tbl) { - CDBG("%s:%d release gpio\n", __func__, __LINE__); - msm_camera_request_gpio_table( - a_ctrl->gpio_conf->cam_gpio_req_tbl, - a_ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - if (a_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &a_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - a_ctrl->is_camera_run = FALSE; - msm_ois_power_down(a_ctrl); - - - if (a_ctrl->fw_info.phone_fw && !(a_ctrl->fw_info.is_phone_fw)) { - vfree(a_ctrl->fw_info.phone_fw); - a_ctrl->fw_info.phone_fw = NULL; - } - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_ois_internal_ops = { - .open = msm_ois_open, - .close = msm_ois_close, -}; - -static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG_I("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_ois_get_subdev_id(a_ctrl, argp); - case VIDIOC_MSM_OIS_IO_CFG: - return msm_ois_config(a_ctrl, argp); - case MSM_SD_SHUTDOWN: - msm_ois_close(sd, NULL); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_ois_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(a_ctrl->ois_mutex); - if (on) - rc = msm_ois_power_up(a_ctrl); - else - rc = msm_ois_power_down(a_ctrl); - mutex_unlock(a_ctrl->ois_mutex); - CDBG_I("Exit Power[%s] Status[%d]\n", on? "ON" : "OFF", rc); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ois_subdev_core_ops = { - .ioctl = msm_ois_subdev_ioctl, - .s_power = msm_ois_power, -}; - -static struct v4l2_subdev_ops msm_ois_subdev_ops = { - .core = &msm_ois_subdev_core_ops, -}; - -static int msm_ois_power_up(struct msm_ois_ctrl_t *ctrl) -{ - int rc = -1; - CDBG("%s:%d E\n", __func__, __LINE__); - - if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_DOWN) { - - CDBG("[%p] [%p]\n", ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - - rc = gpio_request(ctrl->ois_en, "ois_en"); - if (rc) { - pr_err("%s:%d Failed rc[%d]\n", __func__, __LINE__, rc); - gpio_free(ctrl->ois_en); - goto ERR; - } - - rc = gpio_request(ctrl->ois_reset, "ois_reset"); - if (rc) { - pr_err("%s:%d Failed rc[%d]\n", __func__, __LINE__, rc); - gpio_free(ctrl->ois_en); - gpio_free(ctrl->ois_reset); - goto ERR; - } - - gpio_direction_output(ctrl->ois_en, 1); - usleep_range(10000, 10010); /* 10ms sleep*/ - gpio_direction_output(ctrl->ois_reset, 1); - usleep_range(10000, 10010); /* 10ms sleep*/ - CDBG_I("GPIO status En[%d] Reset[%d]\n", gpio_get_value(ctrl->ois_en), gpio_get_value(ctrl->ois_reset)); - - ctrl->ois_state = OIS_POWER_UP; - rc = 0; - } - - CDBG("%s:%d X\n", __func__, __LINE__); - return rc; -ERR: - pr_err("%s:%d Failed!\n", __func__, __LINE__); - return -EINVAL; -} -static int msm_ois_disable_reset(struct msm_ois_ctrl_t *ctrl) -{ - if (gpio_get_value(ctrl->ois_reset) != 0) { - gpio_direction_output(ctrl->ois_reset, 0); - usleep_range(1000, 1010); // delay 1ms - CDBG_I("GPIO status Reset[%d]\n", gpio_get_value(ctrl->ois_reset)); - gpio_free(ctrl->ois_reset); - } - - return 0; -} - -static int msm_ois_power_down(struct msm_ois_ctrl_t *ctrl) -{ - CDBG("%s:%d E\n", __func__, __LINE__); - - if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_UP) { - - CDBG("[%p] [%p]\n", ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - - gpio_direction_output(ctrl->ois_en, 0); - - if (gpio_get_value(ctrl->ois_reset) != 0) { - gpio_direction_output(ctrl->ois_reset, 0); - usleep_range(1000, 1010); // delay 1ms - CDBG_I("GPIO status Reset[%d]\n", gpio_get_value(ctrl->ois_reset)); - gpio_free(ctrl->ois_reset); - } - - CDBG_I("GPIO status En[%d]\n", gpio_get_value(ctrl->ois_en)); - gpio_free(ctrl->ois_en); - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - ctrl->ois_state = OIS_POWER_DOWN; - } - - CDBG_I("X\n"); - return 0; -} - -static int msm_ois_pinctrl_init(struct msm_ois_ctrl_t *ctrl, - struct device_node *of_node) -{ - struct msm_pinctrl_info *ois_pctrl = NULL; - ois_pctrl = &ctrl->pinctrl_info; - ois_pctrl->pinctrl = devm_pinctrl_get(ctrl->dev); - if (IS_ERR_OR_NULL(ois_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - - ois_pctrl->gpio_state_active = - pinctrl_lookup_state(ois_pctrl->pinctrl, - OIS_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(ois_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - - ois_pctrl->gpio_state_suspend - = pinctrl_lookup_state(ois_pctrl->pinctrl, - OIS_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(ois_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - - return 0; -} - - - -static int32_t msm_ois_get_gpio_data(struct msm_ois_ctrl_t *ctrl, - struct device_node *of_node) -{ - int rc = 0; - - ctrl->ois_en = of_get_named_gpio(of_node, "ois,ois-en", 0); - if (ctrl->ois_en < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - ctrl->ois_reset = of_get_named_gpio(of_node, "ois,ois-reset", 0); - if (ctrl->ois_reset < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - rc = msm_ois_pinctrl_init(ctrl, of_node); - - if (rc < 0) { - pr_err("%s:%d failed!\n", __func__, __LINE__); - return -EINVAL; - } - - pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - - - return 0; -} - -static int32_t msm_ois_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - uint32_t temp; - struct msm_ois_ctrl_t *ois_ctrl_t = NULL; - struct msm_ois_vreg *vreg_cfg; - bool check_use_gpios; - - CDBG_I("Enter\n"); - - if (client == NULL) { - pr_err("msm_ois_i2c_probe: client is null\n"); - rc = -EINVAL; - goto probe_failure; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - goto probe_failure; - } - - if (!client->dev.of_node) { - ois_ctrl_t = (struct msm_ois_ctrl_t *)(id->driver_data); - } else { - ois_ctrl_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!ois_ctrl_t) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - ois_ctrl_t->dev = &client->dev; - - CDBG("client = 0x%pK\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &ois_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", ois_ctrl_t->subdev_id, rc); - ois_ctrl_t->cam_name = ois_ctrl_t->subdev_id; - if (rc < 0) { - pr_err("failed rc %d\n", rc); - kfree(ois_ctrl_t);//prevent - return rc; - } - check_use_gpios = of_property_read_bool(client->dev.of_node, "unuse-gpios"); - CDBG("%s: check unuse-gpio flag(%d)\n", - __FUNCTION__, check_use_gpios); - if (!check_use_gpios) { - rc = msm_ois_get_gpio_data(ois_ctrl_t, - client->dev.of_node); - } - } - - if (of_find_property(client->dev.of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &ois_ctrl_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data(client->dev.of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(ois_ctrl_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - rc = of_property_read_u32(client->dev.of_node, "ois,slave-addr", - &temp); - if (rc < 0) { - pr_err("%s failed rc %d\n", __func__, rc); - kfree(ois_ctrl_t); - return rc; - } - client->addr = temp; - CDBG("Slave ID[0x%x]\n", client->addr); - - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - ois_ctrl_t->i2c_driver = &msm_ois_i2c_driver; - - CDBG("client = %x\n", (unsigned int) client); - ois_ctrl_t->i2c_client.client = client; - ois_ctrl_t->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - /* Set device type as I2C */ - ois_ctrl_t->ois_device_type = MSM_CAMERA_I2C_DEVICE; - ois_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - ois_ctrl_t->ois_state = OIS_POWER_DOWN; - ois_ctrl_t->is_camera_run = FALSE; - ois_ctrl_t->ois_mode = OIS_MODE_OFF; - ois_ctrl_t->fw_info.is_loaded = false; - - ois_ctrl_t->cam_name = ois_ctrl_t->subdev_id; - CDBG("ois_ctrl_t->cam_name: %d", ois_ctrl_t->cam_name); - /* Assign name for sub device */ - snprintf(ois_ctrl_t->msm_sd.sd.name, sizeof(ois_ctrl_t->msm_sd.sd.name), - "%s", ois_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&ois_ctrl_t->msm_sd.sd, - ois_ctrl_t->i2c_client.client, - ois_ctrl_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&ois_ctrl_t->msm_sd.sd, ois_ctrl_t); - ois_ctrl_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - ois_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&ois_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - ois_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ois_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - ois_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0xB; - msm_sd_register(&ois_ctrl_t->msm_sd); - //g_ois_i2c_client.client = ois_ctrl_t->i2c_client.client; - g_msm_ois_t = ois_ctrl_t; - -// is_factory_mode = 0; - - CDBG("Succeded Exit\n"); - return rc; -probe_failure: - if (ois_ctrl_t) - kfree(ois_ctrl_t); - return rc; -} - -static int32_t msm_ois_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_ois_ctrl_t *msm_ois_t = NULL; - struct msm_ois_vreg *vreg_cfg; - - CDBG_I("Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_ois_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!msm_ois_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - msm_ois_t->subdev_id = pdev->id; - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_ois_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_ois_t->cci_master, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_ois_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_ois_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - msm_ois_t->ois_mutex = &msm_ois_mutex; - msm_ois_t->cam_name = pdev->id; - - /* Set platform device handle */ - msm_ois_t->pdev = pdev; - /* Set device type as platform device */ - msm_ois_t->ois_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_ois_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_ois_t->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - msm_ois_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_ois_t->i2c_client.cci_client) { - kfree(msm_ois_t->vreg_cfg.cam_vreg); - kfree(msm_ois_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - msm_ois_t->is_camera_run= FALSE; - - cci_client = msm_ois_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_ois_t->msm_sd.sd, - msm_ois_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_ois_t->msm_sd.sd, msm_ois_t); - msm_ois_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - msm_ois_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_ois_t->msm_sd.sd.name, - ARRAY_SIZE(msm_ois_t->msm_sd.sd.name), "msm_ois"); - media_entity_init(&msm_ois_t->msm_sd.sd.entity, 0, NULL, 0); - msm_ois_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_ois_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - msm_ois_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0xB; - rc = msm_sd_register(&msm_ois_t->msm_sd); - //g_ois_i2c_client.cci_client = msm_ois_t->i2c_client.cci_client; - g_msm_ois_t = msm_ois_t; - - CDBG("Exit[rc::%d]\n", rc); - return rc; -} - -static const struct i2c_device_id msm_ois_i2c_id[] = { - { "msm_ois", (kernel_ulong_t)NULL }, - { } -}; -static const struct of_device_id msm_ois_dt_match[] = { - {.compatible = "qcom,ois", .data = NULL}, - {} -}; - -static struct i2c_driver msm_ois_i2c_driver = { - .id_table = msm_ois_i2c_id, - .probe = msm_ois_i2c_probe, - .remove = __exit_p(msm_ois_i2c_remove), - .driver = { - .name = "msm_ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -MODULE_DEVICE_TABLE(of, msm_ois_dt_match); - -static struct platform_driver msm_ois_platform_driver = { - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -static bool msm_ois_diff_test(struct msm_ois_ctrl_t *a_ctrl, int *x_diff, int *y_diff) -{ - int ret; - int X_Max, X_Min, Y_Max, Y_Min; - int default_diff = 1100; - u8 m_val[2] = {0,}; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); - - if (ret < 0) { - return false; - } - msm_ois_read_status(a_ctrl); - - msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x04); // Calibration Mode - - m_val[0] = 0x03; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x00); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - X_Max = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0xFD; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x00); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - X_Min = (m_val[0] << 8) + m_val[1]; - - - m_val[0] = 0x00; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6064, m_val, 2); - msleep(100); - - m_val[0] = 0x03; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x01); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - Y_Max = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0xFD; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - msm_ois_i2c_byte_write(a_ctrl, 0x6060, 0x01); - msm_ois_i2c_read_multi(a_ctrl, 0x6062, m_val, 2); - Y_Min = (m_val[0] << 8) + m_val[1]; - - m_val[0] = 0x00; - m_val[1] = 0x00; - msm_ois_i2c_write_multi(a_ctrl, 0x6066, m_val, 2); - msleep(100); - - msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x00); // Standby Mode - - *x_diff = abs(X_Max - X_Min); - *y_diff = abs(Y_Max - Y_Min); - - - if (*x_diff > default_diff && *y_diff > default_diff) { - return true; - } else { - return false; - } - -} - -static int msm_ois_gyro_selftest(struct msm_ois_ctrl_t *a_ctrl) - { - int ret; - u16 status = 0; - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x04); // Calibration Mode - if (ret < 0) { - return 0; - } - msleep(10); - msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x02); - msleep(10); - msm_ois_i2c_byte_write(a_ctrl, 0x6138, 0x00); - msm_ois_read_status(a_ctrl); - - //msleep(50); - - msm_ois_i2c_byte_read(a_ctrl, 0x6139, &status); - CDBG_I("status[%d]\n", status); - return status == 3 ? 0 : 1; //OK = 3 , NG = 0~2 -} - -static int msm_is_ois_get_offset(struct msm_ois_ctrl_t *a_ctrl, long *raw_data_x, long *raw_data_y) -{ - char *buf = NULL; - uint16_t x_temp = 0, y_temp = 0; - int16_t x_gyro = 0, y_gyro = 0; - u16 cal_offset = a_ctrl->fw_info.cal_offset; - - CDBG("E\n"); - - buf = a_ctrl->fw_info.module_fw; - if (!buf) - return -1; - - if (cal_offset == 0xFFFF) { - pr_err("%s:%d invalid calibration offset!\n", __func__, __LINE__); - return -1; - } - - x_temp = (buf [cal_offset + 0x18] << 8) - + buf [cal_offset + 0x19]; - x_gyro = *((int16_t *)(&x_temp)); - - y_temp = (buf [cal_offset + 0x1A] << 8) - + buf [cal_offset + 0x1B]; - y_gyro = *((int16_t *)(&y_temp)); - - *raw_data_x = x_gyro; - *raw_data_y = y_gyro; - - - CDBG("X\n"); - return 0; -} - -static int msm_ois_gyro_offset_adjustment(struct msm_ois_ctrl_t *a_ctrl, long *gyro_offset_x, long *gyro_offset_y) -{ - int i; - int ret; - int scale_factor; - u16 x_sum = 0, y_sum = 0, sum = 0; - u16 x_gyro = 0, y_gyro = 0; - u8 status[2] = {0}; - u8 avg_cnt = 10; - - CDBG_I("E\n"); - - *gyro_offset_x = 0; - *gyro_offset_y = 0; - - if( msm_ois_cal_revision(a_ctrl->fw_info.cal_info.cal_ver) < 4 ) - scale_factor = OIS_GYRO_SCALE_FACTOR_V003; - else - scale_factor = OIS_GYRO_SCALE_FACTOR_V004; - - ret = msm_ois_i2c_byte_write(a_ctrl, 0x6020, 0x01); /* Servo On/ OIS Off */ - msleep(100); - ret |= msm_ois_read_status(a_ctrl); - if (ret) - goto out; - - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6023, 0x00); /* Gyro On*/ - if (ret) - goto out; - - for(i = 1; i <= avg_cnt; i++) { - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6088, 0x00); - ret |= msm_ois_read_status(a_ctrl); - - msm_ois_i2c_read_multi(a_ctrl, 0x608A, status, 2); - x_gyro = (status[0] << 8) + status[1]; - sum = *((int16_t *)(&x_gyro)); - y_sum = y_sum + sum; - x_sum = x_sum + x_gyro; - - CDBG_I("i[%d] x_offset[%d]\n", i, x_gyro); - ret |= msm_ois_i2c_byte_write(a_ctrl, 0x6088, 0x01); - ret |= msm_ois_read_status(a_ctrl); - - msm_ois_i2c_read_multi(a_ctrl, 0x608A, status, 2); - y_gyro = (status[0] << 8) + status[1]; - sum = *((int16_t *)(&y_gyro)); - y_sum = y_sum + sum; - CDBG_I("i[%d] y_offset[%d]\n", i, y_gyro); - } - - x_sum = x_sum * 1000 / avg_cnt; - y_sum = y_sum * 1000 / avg_cnt; - - *gyro_offset_x = x_sum / scale_factor; - *gyro_offset_y = y_sum / scale_factor; - - CDBG_I("X Offset[%ld], Y Offset[%ld]\n", *gyro_offset_x, *gyro_offset_y); - - return 0; -out: - pr_err("%s:%d Failed!\n", __func__, __LINE__); - return -EINVAL; -} - - - -static ssize_t gyro_selftest_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - int result_total = 0; - bool result_offset = true, result_selftest = false; - unsigned char selftest_ret = 0; - long raw_data_x = 0, raw_data_y = 0; - int final_x1, final_x2, final_y1, final_y2; - - msm_ois_gyro_offset_adjustment(g_msm_ois_t, &raw_data_x, &raw_data_y); - msleep(50); - selftest_ret = msm_ois_gyro_selftest(g_msm_ois_t); - - if (selftest_ret == 0x0) - result_selftest = true; - - if (abs(raw_data_x) > 35000 || abs(raw_data_y) > 35000) - result_offset = false; - - if (result_offset && result_selftest) - result_total = 0; - else if (!result_offset && !result_selftest) - result_total = 3; - else if (!result_offset) - result_total = 1; - else if (!result_selftest) - result_total = 2; - - final_x1 = abs(raw_data_x / 1000); - final_y1 = abs(raw_data_y / 1000); - final_x2 = abs(raw_data_x % 1000); - final_y2 = abs(raw_data_y % 1000); - - pr_err("Result : 0 (success), 1 (offset fail), 2 (selftest fail) , 3 (both fail) \n"); - pr_err("Result : %d, result x = %d.%03d, result y = %d.%03d\n", - result_total , final_x1, final_x2, final_y1, final_y2); - - if (raw_data_x < 0 && raw_data_y < 0) - return sprintf(buf, "%d,-%d.%03d,-%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else if (raw_data_x < 0) - return sprintf(buf, "%d,-%d.%03d,%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else if (raw_data_y < 0) - return sprintf(buf, "%d,%d.%03d,-%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); - else - return sprintf(buf, "%d,%d.%03d,%d.%03d\n", result_total, final_x1, final_x2, final_y1, final_y2); -} - -static ssize_t ois_hall_cal_test_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - int result; - int x_diff = 0, y_diff = 0; - msm_actuator_power_for_ois_test(1); - usleep_range(20000, 20010); - msm_actuator_move_for_ois_test(); - result = msm_ois_diff_test(g_msm_ois_t, &x_diff, &y_diff); - msm_actuator_power_for_ois_test(0); - return sprintf(buf, "%d,%d,%d\n", result == true ? 0 : 1, x_diff, y_diff); -} - - -static ssize_t gyro_rawdata_test_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - long raw_data_x = 0, raw_data_y = 0; - - msm_is_ois_get_offset(g_msm_ois_t, &raw_data_x, &raw_data_y); - - CDBG_I("raw data x = %ld.%03ld, raw data y = %ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - raw_data_y /1000, raw_data_y % 1000); - - if (raw_data_x < 0 && raw_data_y < 0) { - return sprintf(buf, "-%ld.%03ld,-%ld.%03ld\n", abs(raw_data_x /1000), abs(raw_data_x % 1000), - abs(raw_data_y /1000), abs(raw_data_y % 1000)); - } else if (raw_data_x < 0) { - return sprintf(buf, "-%ld.%03ld,%ld.%03ld\n", abs(raw_data_x /1000), abs(raw_data_x % 1000), - raw_data_y /1000, raw_data_y % 1000); - } else if (raw_data_y < 0) { - return sprintf(buf, "%ld.%03ld,-%ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - abs(raw_data_y /1000), abs(raw_data_y % 1000)); - } else { - return sprintf(buf, "%ld.%03ld,%ld.%03ld\n", raw_data_x /1000, raw_data_x % 1000, - raw_data_y /1000, raw_data_y % 1000); - } -} - -static ssize_t ois_fw_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] OIS_fw_ver : %s\n", ois_fw_full); - return sprintf(buf, "%s", ois_fw_full); -} - -static ssize_t ois_fw_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(ois_fw_full, sizeof(ois_fw_full), "%s", buf); - - return size; -} - - -static ssize_t ois_power_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) -{ - int rc = 0; - bool is_camera_run = g_msm_ois_t->is_camera_run; - - if((g_msm_ois_t->i2c_client.client==NULL)&&(g_msm_ois_t->pdev==NULL)) { - return size; - } - - if(!is_camera_run){ - switch (buf[0]) { - case '0' : - msm_ois_power_down(g_msm_ois_t); - pr_err("ois_power_store : power down \n"); - break; - case '1' : - rc = msm_ois_power_up(g_msm_ois_t); - if (rc == 0) { - msm_ois_fw_update(g_msm_ois_t, 1); - msm_ois_read_status(g_msm_ois_t); - } - pr_err("ois_power_store : power up rc[%d]\n", rc); - break; - default: - break; - } - } - return size; -} - - -static ssize_t sysfs_ois_force_fw_load(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) -{ - if((g_msm_ois_t->i2c_client.client==NULL)&&(g_msm_ois_t->pdev==NULL)) - return size; - - if (g_msm_ois_t->is_camera_run || g_msm_ois_t->ois_state != OIS_POWER_DOWN) - return size; - - switch (buf[0]) { - case '1' : - g_msm_ois_t->fw_info.is_loaded = false; - g_msm_ois_t->fw_info.force_phone = true; - msm_ois_load_fw(g_msm_ois_t); - pr_err("load phone fw force 1\n"); - break; - case '2' : - g_msm_ois_t->fw_info.is_loaded = false; - g_msm_ois_t->fw_info.force_test = true; - msm_ois_load_fw(g_msm_ois_t); - pr_err("load phone fw force 2\n"); - break; - default: - break; - } - return size; -} - - -char ois_debug[40] = "NULL NULL NULL\n"; -static ssize_t ois_exif_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] ois_debug : %s\n", ois_debug); - return snprintf(buf, sizeof(ois_debug), "%s", ois_debug); -} - -static ssize_t ois_exif_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf: %s\n", buf); - snprintf(ois_debug, sizeof(ois_debug), "%s", buf); - - return size; -} - - -static DEVICE_ATTR(selftest, S_IRUGO, gyro_selftest_show, NULL); -static DEVICE_ATTR(ois_diff, S_IRUGO, ois_hall_cal_test_show, NULL); -static DEVICE_ATTR(ois_rawdata, S_IRUGO, gyro_rawdata_test_show, NULL); -static DEVICE_ATTR(ois_power, S_IWUGO, NULL, ois_power_store); -static DEVICE_ATTR(oisfw, S_IRUGO|S_IWUSR|S_IWGRP, ois_fw_full_show, ois_fw_full_store); -static DEVICE_ATTR(ois_exif, S_IRUGO|S_IWUSR|S_IWGRP, ois_exif_show, ois_exif_store); -static DEVICE_ATTR(load_fw, S_IWUGO, NULL, sysfs_ois_force_fw_load); - - -static int __init msm_ois_init_module(void) -{ - int32_t rc = 0; - struct device *cam_ois; - - CDBG_I("Enter\n"); - - if (!IS_ERR(camera_class)) { //for sysfs - cam_ois = device_create(camera_class, NULL, 0, NULL, "ois"); - if (IS_ERR(cam_ois)) { - pr_err("Failed to create device(ois) in camera_class!\n"); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_power) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_power.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_selftest) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_selftest.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_diff) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_diff.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_ois_rawdata) < 0) { - pr_err("failed to create device file, %s\n", - dev_attr_ois_rawdata.attr.name); - rc = -ENOENT; - } - if (device_create_file(cam_ois, &dev_attr_oisfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_oisfw.attr.name); - rc = -ENODEV; - } - if (device_create_file(cam_ois, &dev_attr_ois_exif) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_ois_exif.attr.name); - rc = -ENODEV; - } - - if (device_create_file(cam_ois, &dev_attr_load_fw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_load_fw.attr.name); - rc = -ENODEV; - } - - - } else { - pr_err("Failed to create device(ois) because of no camera class!\n"); - rc = -EINVAL; - } - - rc = platform_driver_probe(&msm_ois_platform_driver, - msm_ois_platform_probe); - if (rc < 0) { - pr_err("%s:%d failed platform driver probe rc %d\n", - __func__, __LINE__, rc); - } else { - CDBG("%s:%d platform_driver_probe rc %d\n", __func__, __LINE__, rc); - } - rc = i2c_add_driver(&msm_ois_i2c_driver); - if (rc < 0) - pr_err("%s:%d failed i2c driver probe rc %d\n", - __func__, __LINE__, rc); - else - CDBG("%s:%d i2c_add_driver rc %d\n", __func__, __LINE__, rc); - - return rc; -} - -module_init(msm_ois_init_module); -MODULE_DESCRIPTION("MSM OIS"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.h deleted file mode 100755 index 365e56a8f81d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/external/msm_ois.h +++ /dev/null @@ -1,225 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_OIS_H -#define MSM_OIS_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "../../include/media/msm_cam_sensor.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_OIS_MAX_VREGS (10) -#define NUM_OIS_VERSION_STR (6) - -enum msm_ois_state_t { - OIS_POWER_UP, - OIS_POWER_DOWN, -}; - - -struct msm_ois_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_OIS_MAX_VREGS]; - int num_vreg; -}; - -struct msm_ois_ver_t { - uint8_t core_ver; - uint8_t gyro_sensor; - uint8_t driver_ic; - uint8_t year; - uint8_t month; - uint8_t iteration_1; - uint8_t iteration_0; -}; - -struct msm_ois_debug_t { - int err_reg; - int status_reg; - char phone_ver[NUM_OIS_VERSION_STR+1]; - char module_ver[NUM_OIS_VERSION_STR+1]; - char cal_ver[NUM_OIS_VERSION_STR+1]; -}; - -enum msm_ois_modes{ - OIS_MODE_OFF = 1, - OIS_MODE_ON = 2, - OIS_MODE_ON_STILL = 3, - OIS_MODE_ON_ZOOM = 4, - OIS_MODE_ON_VIDEO = 5, - OIS_MODE_SINE_X = 6, - OIS_MODE_SINE_Y = 7, - OIS_MODE_CENTERING = 8, - OIS_MODE_MAX, -}; - -typedef struct __msm_ois_fw_info { - bool is_loaded; - bool force_phone; - bool force_test; - u8 *phone_fw; - u8 *module_fw; - u8 *load_fw; - - u16 shift_offset; - u16 shift_data_size; - u16 shift_chksum_offset; - - u16 fw_offset; //Set F/W Offset - u16 fw_data_size; - u16 fw_chksum_offset; - - u16 cal_offset; - u16 cal_data_size; - u16 cal_chksum_offset; - - u16 fa_fw_offset; //Factory F/W Offset - u16 fa_fw_data_size; - u16 fa_fw_chksum_offset; - - - struct msm_ois_ver_t phone_ver; - struct msm_ois_ver_t module_ver; - struct msm_ois_cal_info_t cal_info; - bool is_phone_fw; - char load_fw_name[256]; -} msm_ois_fw_info_t; - -struct msm_ois_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct device *dev; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t ois_device_type; - struct msm_sd_subdev msm_sd; - enum af_camera_name cam_name; - struct mutex *ois_mutex; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *ois_v4l2_subdev_ops; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_ois_state_t ois_state; - enum msm_camera_i2c_data_type i2c_data_type; - enum msm_ois_modes ois_mode; - struct msm_ois_vreg vreg_cfg; - struct msm_camera_gpio_conf *gpio_conf; - msm_ois_fw_info_t fw_info; - bool is_camera_run; - bool is_set_debug_info; - struct msm_ois_debug_t debug_info; - int ois_en; - int ois_reset; - struct msm_pinctrl_info pinctrl_info; - uint8_t pinctrl_status; -}; - - -#define OIS_PINCTRL_STATE_DEFAULT "ois_default" -#define OIS_PINCTRL_STATE_SLEEP "ois_suspend" - -/*SAMSUNG ELECTRONICS FIRMWARE*/ -#define MSM_OIS_SE_FW_PATH "/system/etc/firmware/ois_SE_BU24219.bin" -/*SELF PRODUCTION FIRMWARE*/ -#define MSM_OIS_SP_FW_PATH "/system/etc/firmware/ois_SP_BU24219.bin" - -#define MSM_MAX_OIS_SIZE (64 * 1024) - -#define I2C_RETRY_COUNT 3 - -#define MODULE_OIS_TOTAL_SIZE 0x1800 -#define MODULE_OIS_START_ADDR 0x2000 - -#define MODULE_OIS_HDR_OFFSET 0x0000 -#define MODULE_OIS_HDR_CHK_SUM_OFFSET 0x00FC - -#define MODULE_OIS_CAL_DATA_OFFSET 0x0100 -#define MODULE_OIS_CAL_DATA_CHK_SUM_OFFSET 0x019C -#define MODULE_OIS_CAL_DATA_MAP_SIZE 0x0060 - -#define MODULE_OIS_SHIFT_DATA_OFFSET 0x01A0 -#define MODULE_OIS_SHIFT_DATA_CHK_SUM_OFFSET 0x01FC -#define MODULE_OIS_SHIFT_DATA_SIZE 0x0030 - -#define MODULE_OIS_FW_OFFSET 0x0200 -#define MODULE_OIS_FW_CHK_SUM_OFFSET 0x05FC -#define MODULE_OIS_FW_MAP_SIZE 0x03FC - -#define MODULE_OIS_FW_FACTORY_OFFSET 0x0600 -#define MODULE_OIS_FW_FACTORY_CHK_SUM_OFFSET 0x17FC -#define MODULE_OIS_FW_FACTORY_MAP_SIZE 0x11FC - - -#define PHONE_OIS_TOTAL_SIZE 0x3000 -#define PHONE_OIS_START_ADDR 0x0000 - -#define PHONE_OIS_HDR_OFFSET 0x0000 -#define PHONE_OIS_HDR_CHK_SUM_OFFSET 0xFFFF - -#define PHONE_OIS_CAL_DATA_OFFSET 0x0080 -#define PHONE_OIS_CAL_DATA_CHK_SUM_OFFSET 0xFFFF -#define PHONE_OIS_CAL_DATA_MAP_SIZE 0x0060 - -#define PHONE_OIS_SHIFT_DATA_OFFSET 0xFFFF -#define PHONE_OIS_SHIFT_DATA_CHK_SUM_OFFSET 0xFFFF -#define PHONE_OIS_SHIFT_DATA_SIZE 0xFFFF - -#define PHONE_OIS_FW_OFFSET 0x0100 -#define PHONE_OIS_FW_CHK_SUM_OFFSET 0x04FC -#define PHONE_OIS_FW_MAP_SIZE 0x03FC - -#define PHONE_OIS_FW_FACTORY_OFFSET 0x0500 -#define PHONE_OIS_FW_FACTORY_CHK_SUM_OFFSET 0x16FC -#define PHONE_OIS_FW_FACTORY_MAP_SIZE 0x11FC - - -#define OIS_SET_FW_D1_OFFSET_ADDR_OFFSET 0x04 -#define OIS_SET_FW_D1_SIZE_ADDR_OFFSET 0x06 -#define OIS_SET_FW_D1_TARGET_ADDR_OFFSET 0x08 - -#define OIS_SET_FW_D2_OFFSET_ADDR_OFFSET 0x0A -#define OIS_SET_FW_D2_SIZE_ADDR_OFFSET 0x0C -#define OIS_SET_FW_D2_TARGET_ADDR_OFFSET 0x0E - -#define OIS_SET_FW_D3_OFFSET_ADDR_OFFSET 0x10 -#define OIS_SET_FW_D3_SIZE_ADDR_OFFSET 0x12 -#define OIS_SET_FW_D3_TARGET_ADDR_OFFSET 0x14 - -#define OIS_CAL_DATA_OFFSET_OFFSET 0x04 -#define OIS_CAL_DATA_SIZE_OFFSET 0x06 -#define OIS_CAL_DATA_TRGT_ADDR_OFFSET 0x08 - - -#define OIS_GYRO_SCALE_FACTOR_V003 262 -#define OIS_GYRO_SCALE_FACTOR_V004 131 - - - -void msm_is_ois_offset_test(long *raw_data_x, long *raw_data_y, bool is_need_cal); -u8 msm_is_ois_self_test(void); - -int msm_ois_i2c_byte_read(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t *data); -int msm_ois_i2c_byte_write(struct msm_ois_ctrl_t *a_ctrl, uint32_t addr, uint16_t data); - -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *a_ctrl); -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *a_ctrl); -static int msm_ois_disable_reset(struct msm_ois_ctrl_t *a_ctrl); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/Makefile deleted file mode 100644 index f3f1cd6eec85..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -obj-$(CONFIG_MSMB_CAMERA) += msm_led_flash.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_i2c_trigger.o -obj-$(CONFIG_MSMB_CAMERA) += adp1660.o -obj-$(CONFIG_MSMB_CAMERA) += bd7710.o -obj-$(CONFIG_MSMB_CAMERA) += msm_led_torch.o -obj-$(CONFIG_MSMB_CAMERA) += lm3642.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/adp1660.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/adp1660.c deleted file mode 100644 index f57843c6ff2a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/adp1660.c +++ /dev/null @@ -1,212 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "qcom,led-flash" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver adp1660_i2c_driver; - -static struct msm_camera_i2c_reg_array adp1660_init_array[] = { - {0x01, 0x03}, - {0x02, 0x0F}, - {0x09, 0x28}, -}; - -static struct msm_camera_i2c_reg_array adp1660_off_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_release_array[] = { - {0x0f, 0x00}, -}; - -static struct msm_camera_i2c_reg_array adp1660_low_array[] = { - {0x08, 0x04}, - {0x06, 0x1E}, - {0x01, 0xBD}, - {0x0f, 0x01}, -}; - -static struct msm_camera_i2c_reg_array adp1660_high_array[] = { - {0x02, 0x4F}, - {0x06, 0x3C}, - {0x09, 0x3C}, - {0x0f, 0x03}, - {0x01, 0xBB}, -}; - -static void __exit msm_flash_adp1660_i2c_remove(void) -{ - i2c_del_driver(&adp1660_i2c_driver); - return; -} - -static const struct of_device_id adp1660_trigger_dt_match[] = { - {.compatible = "qcom,led-flash", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, adp1660_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"qcom,led-flash", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id adp1660_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_adp1660_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_adp1660_i2c_probe: id is NULL"); - id = adp1660_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver adp1660_i2c_driver = { - .id_table = adp1660_i2c_id, - .probe = msm_flash_adp1660_i2c_probe, - .remove = __exit_p(msm_flash_adp1660_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int msm_flash_adp1660_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - match = of_match_device(adp1660_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver adp1660_platform_driver = { - .probe = msm_flash_adp1660_platform_probe, - .driver = { - .name = "qcom,led-flash", - .owner = THIS_MODULE, - .of_match_table = adp1660_trigger_dt_match, - }, -}; - -static int __init msm_flash_adp1660_init_module(void) -{ - int32_t rc = 0; - rc = platform_driver_register(&adp1660_platform_driver); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&adp1660_i2c_driver); -} - -static void __exit msm_flash_adp1660_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&adp1660_platform_driver); - else - i2c_del_driver(&adp1660_i2c_driver); -} - -static struct msm_camera_i2c_client adp1660_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting adp1660_init_setting = { - .reg_setting = adp1660_init_array, - .size = ARRAY_SIZE(adp1660_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_off_setting = { - .reg_setting = adp1660_off_array, - .size = ARRAY_SIZE(adp1660_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_release_setting = { - .reg_setting = adp1660_release_array, - .size = ARRAY_SIZE(adp1660_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_low_setting = { - .reg_setting = adp1660_low_array, - .size = ARRAY_SIZE(adp1660_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting adp1660_high_setting = { - .reg_setting = adp1660_high_array, - .size = ARRAY_SIZE(adp1660_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t adp1660_regs = { - .init_setting = &adp1660_init_setting, - .off_setting = &adp1660_off_setting, - .low_setting = &adp1660_low_setting, - .high_setting = &adp1660_high_setting, - .release_setting = &adp1660_release_setting, -}; - -static struct msm_flash_fn_t adp1660_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &adp1660_i2c_client, - .reg_setting = &adp1660_regs, - .func_tbl = &adp1660_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_adp1660_init_module); -module_exit(msm_flash_adp1660_exit_module); -MODULE_DESCRIPTION("adp1660 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/bd7710.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/bd7710.c deleted file mode 100644 index 4e18537f9bf7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/bd7710.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include "msm_led_flash.h" - -#define FLASH_NAME "rohm-flash,bd7710" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver bd7710_i2c_driver; - -static struct msm_camera_i2c_reg_array bd7710_init_array[] = { - {0x00, 0x10}, -}; - -static struct msm_camera_i2c_reg_array bd7710_off_array[] = { - {0x05, 0x00}, - {0x02, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_release_array[] = { - {0x00, 0x00}, -}; - -static struct msm_camera_i2c_reg_array bd7710_low_array[] = { - {0x05, 0x25}, - {0x00, 0x38}, - {0x02, 0x40}, -}; - -static struct msm_camera_i2c_reg_array bd7710_high_array[] = { - {0x05, 0x25}, - {0x02, 0xBF}, -}; - -static void __exit msm_flash_bd7710_i2c_remove(void) -{ - i2c_del_driver(&bd7710_i2c_driver); - return; -} - -static const struct of_device_id bd7710_trigger_dt_match[] = { - {.compatible = "rohm-flash,bd7710", .data = &fctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, bd7710_trigger_dt_match); - -static const struct i2c_device_id flash_i2c_id[] = { - {"rohm-flash,bd7710", (kernel_ulong_t)&fctrl}, - { } -}; - -static const struct i2c_device_id bd7710_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static int msm_flash_bd7710_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - if (!id) { - pr_err("msm_flash_bd7710_i2c_probe: id is NULL"); - id = bd7710_i2c_id; - } - - return msm_flash_i2c_probe(client, id); -} - -static struct i2c_driver bd7710_i2c_driver = { - .id_table = bd7710_i2c_id, - .probe = msm_flash_bd7710_i2c_probe, - .remove = __exit_p(msm_flash_bd7710_i2c_remove), - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int msm_flash_bd7710_platform_probe(struct platform_device *pdev) -{ - const struct of_device_id *match; - - match = of_match_device(bd7710_trigger_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - return msm_flash_probe(pdev, match->data); -} - -static struct platform_driver bd7710_platform_driver = { - .probe = msm_flash_bd7710_platform_probe, - .driver = { - .name = "rohm-flash,bd7710", - .owner = THIS_MODULE, - .of_match_table = bd7710_trigger_dt_match, - }, -}; - -static int __init msm_flash_bd7710_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_register(&bd7710_platform_driver); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&bd7710_i2c_driver); -} - -static void __exit msm_flash_bd7710_exit_module(void) -{ - if (fctrl.pdev) - platform_driver_unregister(&bd7710_platform_driver); - else - i2c_del_driver(&bd7710_i2c_driver); -} - -static struct msm_camera_i2c_client bd7710_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting bd7710_init_setting = { - .reg_setting = bd7710_init_array, - .size = ARRAY_SIZE(bd7710_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_off_setting = { - .reg_setting = bd7710_off_array, - .size = ARRAY_SIZE(bd7710_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_release_setting = { - .reg_setting = bd7710_release_array, - .size = ARRAY_SIZE(bd7710_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_low_setting = { - .reg_setting = bd7710_low_array, - .size = ARRAY_SIZE(bd7710_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting bd7710_high_setting = { - .reg_setting = bd7710_high_array, - .size = ARRAY_SIZE(bd7710_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t bd7710_regs = { - .init_setting = &bd7710_init_setting, - .off_setting = &bd7710_off_setting, - .low_setting = &bd7710_low_setting, - .high_setting = &bd7710_high_setting, - .release_setting = &bd7710_release_setting, -}; - -static struct msm_flash_fn_t bd7710_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_led_init, - .flash_led_release = msm_flash_led_release, - .flash_led_off = msm_flash_led_off, - .flash_led_low = msm_flash_led_low, - .flash_led_high = msm_flash_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &bd7710_i2c_client, - .reg_setting = &bd7710_regs, - .func_tbl = &bd7710_func_tbl, -}; - -/*subsys_initcall(msm_flash_i2c_add_driver);*/ -module_init(msm_flash_bd7710_init_module); -module_exit(msm_flash_bd7710_exit_module); -MODULE_DESCRIPTION("bd7710 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/lm3642.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/lm3642.c deleted file mode 100755 index 9a3237050fec..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/lm3642.c +++ /dev/null @@ -1,399 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include -#include -#include "msm_camera_io_util.h" -#include "msm_led_flash.h" - -#define FLASH_NAME "ti,lm3642" - -#define CONFIG_LM3642_DEBUG -#ifdef CONFIG_LM3642_DEBUG -#define LM3642_DBG(fmt, args...) pr_err(fmt, ##args) -#else -#define LM3642_DBG(fmt, args...) -#endif - - -static struct msm_led_flash_ctrl_t fctrl; -static struct i2c_driver lm3642_i2c_driver; - -static struct msm_camera_i2c_reg_array lm3642_init_array[] = { - {0x0A, 0x00}, - {0x08, 0x07}, - {0x09, 0x19}, -}; - -static struct msm_camera_i2c_reg_array lm3642_off_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_release_array[] = { - {0x0A, 0x00}, -}; - -static struct msm_camera_i2c_reg_array lm3642_low_array[] = { - {0x0A, 0x22}, -}; - -static struct msm_camera_i2c_reg_array lm3642_high_array[] = { - {0x0A, 0x23}, -}; - - -static const struct of_device_id lm3642_i2c_trigger_dt_match[] = { - {.compatible = "ti,lm3642"}, - {} -}; - -MODULE_DEVICE_TABLE(of, lm3642_i2c_trigger_dt_match); -static const struct i2c_device_id lm3642_i2c_id[] = { - {FLASH_NAME, (kernel_ulong_t)&fctrl}, - { } -}; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (value > LED_OFF) { - if(fctrl.func_tbl->flash_led_low) - fctrl.func_tbl->flash_led_low(&fctrl); - } else { - if(fctrl.func_tbl->flash_led_off) - fctrl.func_tbl->flash_led_off(&fctrl); - } -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -static int32_t msm_lm3642_torch_create_classdev(struct device *dev , - void *data) -{ - int rc; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - rc = led_classdev_register(dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; - -int msm_flash_lm3642_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return rc; -} - -int msm_flash_lm3642_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->release_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - return 0; -} - -int msm_flash_lm3642_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_lm3642_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_lm3642_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - LM3642_DBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - - power_info = &flashdata->power_info; - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} -static int msm_flash_lm3642_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - if (!id) { - pr_err("msm_flash_lm3642_i2c_probe: id is NULL"); - id = lm3642_i2c_id; - } - rc = msm_flash_i2c_probe(client, id); - - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - pr_err("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - - if (!rc) - msm_lm3642_torch_create_classdev(&(client->dev),NULL); - return rc; -} - -static int msm_flash_lm3642_i2c_remove(struct i2c_client *client) -{ - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int rc = 0 ; - LM3642_DBG("%s entry\n", __func__); - flashdata = fctrl.flashdata; - power_info = &flashdata->power_info; - - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl.pinctrl_info.use_pinctrl == true) { - rc = pinctrl_select_state(fctrl.pinctrl_info.pinctrl, - fctrl.pinctrl_info.gpio_state_suspend); - if (rc) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - return rc; -} - - -static struct i2c_driver lm3642_i2c_driver = { - .id_table = lm3642_i2c_id, - .probe = msm_flash_lm3642_i2c_probe, - .remove = msm_flash_lm3642_i2c_remove, - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = lm3642_i2c_trigger_dt_match, - }, -}; - -static int __init msm_flash_lm3642_init(void) -{ - LM3642_DBG("%s entry\n", __func__); - return i2c_add_driver(&lm3642_i2c_driver); -} - -static void __exit msm_flash_lm3642_exit(void) -{ - LM3642_DBG("%s entry\n", __func__); - i2c_del_driver(&lm3642_i2c_driver); - return; -} - - -static struct msm_camera_i2c_client lm3642_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static struct msm_camera_i2c_reg_setting lm3642_init_setting = { - .reg_setting = lm3642_init_array, - .size = ARRAY_SIZE(lm3642_init_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_off_setting = { - .reg_setting = lm3642_off_array, - .size = ARRAY_SIZE(lm3642_off_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_release_setting = { - .reg_setting = lm3642_release_array, - .size = ARRAY_SIZE(lm3642_release_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_low_setting = { - .reg_setting = lm3642_low_array, - .size = ARRAY_SIZE(lm3642_low_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_camera_i2c_reg_setting lm3642_high_setting = { - .reg_setting = lm3642_high_array, - .size = ARRAY_SIZE(lm3642_high_array), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, -}; - -static struct msm_led_flash_reg_t lm3642_regs = { - .init_setting = &lm3642_init_setting, - .off_setting = &lm3642_off_setting, - .low_setting = &lm3642_low_setting, - .high_setting = &lm3642_high_setting, - .release_setting = &lm3642_release_setting, -}; - -static struct msm_flash_fn_t lm3642_func_tbl = { - .flash_get_subdev_id = msm_led_i2c_trigger_get_subdev_id, - .flash_led_config = msm_led_i2c_trigger_config, - .flash_led_init = msm_flash_lm3642_led_init, - .flash_led_release = msm_flash_lm3642_led_release, - .flash_led_off = msm_flash_lm3642_led_off, - .flash_led_low = msm_flash_lm3642_led_low, - .flash_led_high = msm_flash_lm3642_led_high, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .flash_i2c_client = &lm3642_i2c_client, - .reg_setting = &lm3642_regs, - .func_tbl = &lm3642_func_tbl, -}; - -module_init(msm_flash_lm3642_init); -module_exit(msm_flash_lm3642_exit); -MODULE_DESCRIPTION("lm3642 FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.c deleted file mode 100644 index 736a212f8cea..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.c +++ /dev/null @@ -1,1139 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#include "msm_flash.h" -#include "msm_camera_dt_util.h" -#include "msm_cci.h" - -#undef CDBG -#define CDBG(fmt, args...) pr_err(fmt, ##args) - -DEFINE_MSM_MUTEX(msm_flash_mutex); - -static struct v4l2_file_operations msm_flash_v4l2_subdev_fops; -static struct led_trigger *torch_trigger; - -static const struct of_device_id msm_flash_dt_match[] = { - {.compatible = "qcom,camera-flash", .data = NULL}, - {} -}; - -static struct msm_flash_table msm_i2c_flash_table; -static struct msm_flash_table msm_gpio_flash_table; -static struct msm_flash_table msm_pmic_flash_table; - -static struct msm_flash_table *flash_table[] = { - &msm_i2c_flash_table, - &msm_gpio_flash_table, - &msm_pmic_flash_table -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -void msm_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (!torch_trigger) { - pr_err("No torch trigger found, can't set brightness\n"); - return; - } - - led_trigger_event(torch_trigger, value); -}; - -static struct led_classdev msm_torch_led[MAX_LED_TRIGGERS] = { - { - .name = "torch-light0", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, - { - .name = "torch-light1", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, - { - .name = "torch-light2", - .brightness_set = msm_torch_brightness_set, - .brightness = LED_OFF, - }, -}; - -static int32_t msm_torch_create_classdev(struct platform_device *pdev, - void *data) -{ - int32_t rc = 0; - int32_t i = 0; - struct msm_flash_ctrl_t *fctrl = - (struct msm_flash_ctrl_t *)data; - - if (!fctrl) { - pr_err("Invalid fctrl\n"); - return -EINVAL; - } - - for (i = 0; i < fctrl->torch_num_sources; i++) { - if (fctrl->torch_trigger[i]) { - torch_trigger = fctrl->torch_trigger[i]; - CDBG("%s:%d msm_torch_brightness_set for torch %d", - __func__, __LINE__, i); - msm_torch_brightness_set(&msm_torch_led[i], - LED_OFF); - - rc = led_classdev_register(&pdev->dev, - &msm_torch_led[i]); - if (rc) { - pr_err("Failed to register %d led dev. rc = %d\n", - i, rc); - return rc; - } - } else { - pr_err("Invalid fctrl->torch_trigger[%d]\n", i); - return -EINVAL; - } - } - - return 0; -}; - -static int32_t msm_flash_get_subdev_id( - struct msm_flash_ctrl_t *flash_ctrl, void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (flash_ctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = flash_ctrl->pdev->id; - else - *subdev_id = flash_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_i2c_write_table( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_camera_i2c_reg_setting_array *settings) -{ - struct msm_camera_i2c_reg_setting conf_array; - - conf_array.addr_type = settings->addr_type; - conf_array.data_type = settings->data_type; - conf_array.delay = settings->delay; - conf_array.reg_setting = settings->reg_setting_a; - conf_array.size = settings->size; - - return flash_ctrl->flash_i2c_client.i2c_func_tbl->i2c_write_table( - &flash_ctrl->flash_i2c_client, &conf_array); -} - -static int32_t msm_flash_i2c_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t rc = 0; - struct msm_flash_init_info_t *flash_init_info = - flash_data->cfg.flash_init_info; - struct msm_camera_i2c_reg_setting_array *settings = NULL; -#ifdef CONFIG_COMPAT - struct msm_sensor_power_setting_array32 *power_setting_array32 = NULL; -#endif - if (!flash_init_info || !flash_init_info->power_setting_array) { - pr_err("%s:%d failed: Null pointer\n", __func__, __LINE__); - return -EFAULT; - } - -#ifdef CONFIG_COMPAT - if (is_compat_task()) { - power_setting_array32 = kzalloc( - sizeof(struct msm_sensor_power_setting_array32), - GFP_KERNEL); - if (!power_setting_array32) { - pr_err("%s mem allocation failed %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(power_setting_array32, - (void *)flash_init_info->power_setting_array, - sizeof(struct msm_sensor_power_setting_array32))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - kfree(power_setting_array32); - return -EFAULT; - } - - flash_ctrl->power_setting_array.size = - power_setting_array32->size; - flash_ctrl->power_setting_array.size_down = - power_setting_array32->size_down; - flash_ctrl->power_setting_array.power_down_setting = - compat_ptr(power_setting_array32->power_down_setting); - flash_ctrl->power_setting_array.power_setting = - compat_ptr(power_setting_array32->power_setting); - - /* Validate power_up array size and power_down array size */ - if ((!flash_ctrl->power_setting_array.size) || - (flash_ctrl->power_setting_array.size > - MAX_POWER_CONFIG) || - (!flash_ctrl->power_setting_array.size_down) || - (flash_ctrl->power_setting_array.size_down > - MAX_POWER_CONFIG)) { - - pr_err("failed: invalid size %d, size_down %d", - flash_ctrl->power_setting_array.size, - flash_ctrl->power_setting_array.size_down); - kfree(power_setting_array32); - power_setting_array32 = NULL; - return -EINVAL; - } - - memcpy(&flash_ctrl->power_setting_array.power_down_setting_a, - &power_setting_array32->power_down_setting_a, - sizeof(power_setting_array32->power_down_setting_a)); - memcpy(&flash_ctrl->power_setting_array.power_setting_a, - &power_setting_array32->power_setting_a, - sizeof(power_setting_array32->power_setting_a)); - } -#endif - if (copy_from_user(&flash_ctrl->power_setting_array, - (void *)flash_init_info->power_setting_array, - sizeof(struct msm_sensor_power_setting_array))) { - pr_err("%s copy_from_user failed %d\n", __func__, __LINE__); - return -EFAULT; - } - - flash_ctrl->power_info.power_setting = - flash_ctrl->power_setting_array.power_setting_a; - flash_ctrl->power_info.power_down_setting = - flash_ctrl->power_setting_array.power_down_setting_a; - flash_ctrl->power_info.power_setting_size = - flash_ctrl->power_setting_array.size; - flash_ctrl->power_info.power_down_setting_size = - flash_ctrl->power_setting_array.size_down; - - if ((flash_ctrl->power_info.power_setting_size > MAX_POWER_CONFIG) || - (flash_ctrl->power_info.power_down_setting_size > MAX_POWER_CONFIG)) { - pr_err("%s:%d invalid power setting size=%d size_down=%d\n", - __func__, __LINE__, - flash_ctrl->power_info.power_setting_size, - flash_ctrl->power_info.power_down_setting_size); - rc = -EINVAL; - goto msm_flash_i2c_init_fail; - } - - rc = msm_camera_power_up(&flash_ctrl->power_info, - flash_ctrl->flash_device_type, - &flash_ctrl->flash_i2c_client); - if (rc < 0) { - pr_err("%s msm_camera_power_up failed %d\n", - __func__, __LINE__); - goto msm_flash_i2c_init_fail; - } - - if (flash_data->cfg.flash_init_info->settings) { - settings = kzalloc(sizeof( - struct msm_camera_i2c_reg_setting_array), GFP_KERNEL); - if (!settings) { - pr_err("%s mem allocation failed %d\n", - __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(settings, (void *)flash_init_info->settings, - sizeof(struct msm_camera_i2c_reg_setting_array))) { - kfree(settings); - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - - rc = msm_flash_i2c_write_table(flash_ctrl, settings); - kfree(settings); - - if (rc < 0) { - pr_err("%s:%d msm_flash_i2c_write_table rc %d failed\n", - __func__, __LINE__, rc); - } - } - - return 0; - -msm_flash_i2c_init_fail: - return rc; -} - -static int32_t msm_flash_gpio_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t i = 0; - int32_t rc = 0; - - CDBG("Enter"); - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - flash_ctrl->flash_op_current[i] = LED_FULL; - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - flash_ctrl->torch_op_current[i] = LED_HALF; - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) { - if (!flash_ctrl->torch_trigger[i]) { - if (i < flash_ctrl->flash_num_sources) - flash_ctrl->torch_trigger[i] = - flash_ctrl->flash_trigger[i]; - else - flash_ctrl->torch_trigger[i] = - flash_ctrl->flash_trigger[ - flash_ctrl->flash_num_sources - 1]; - } - } - - rc = flash_ctrl->func_tbl->camera_flash_off(flash_ctrl, flash_data); - - CDBG("Exit"); - return rc; -} - -static int32_t msm_flash_i2c_release( - struct msm_flash_ctrl_t *flash_ctrl) -{ - return 0; -} - -static int32_t msm_flash_off(struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t i = 0; - - CDBG("Enter\n"); - - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - if (flash_ctrl->flash_trigger[i]) - led_trigger_event(flash_ctrl->flash_trigger[i], 0); - - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - if (flash_ctrl->torch_trigger[i]) - led_trigger_event(flash_ctrl->torch_trigger[i], 0); - - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_i2c_write_setting_array( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t rc = 0; - struct msm_camera_i2c_reg_setting_array *settings = NULL; - - if (!flash_data->cfg.settings) { - pr_err("%s:%d failed: Null pointer\n", __func__, __LINE__); - return -EFAULT; - } - - settings = kzalloc(sizeof(struct msm_camera_i2c_reg_setting_array), - GFP_KERNEL); - if (!settings) { - pr_err("%s mem allocation failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - if (copy_from_user(settings, (void *)flash_data->cfg.settings, - sizeof(struct msm_camera_i2c_reg_setting_array))) { - kfree(settings); - pr_err("%s copy_from_user failed %d\n", __func__, __LINE__); - return -EFAULT; - } - - rc = msm_flash_i2c_write_table(flash_ctrl, settings); - kfree(settings); - - if (rc < 0) { - pr_err("%s:%d msm_flash_i2c_write_table rc = %d failed\n", - __func__, __LINE__, rc); - } - return rc; -} - -static int32_t msm_flash_init( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - uint32_t i = 0; - int32_t rc = -EFAULT; - enum msm_flash_driver_type flash_driver_type = FLASH_DRIVER_DEFAULT; - - CDBG("Enter"); - - if (flash_ctrl->flash_state == MSM_CAMERA_FLASH_INIT) { - pr_err("%s:%d Invalid flash state = %d", - __func__, __LINE__, flash_ctrl->flash_state); - return 0; - } - - if (flash_data->cfg.flash_init_info->flash_driver_type == - FLASH_DRIVER_DEFAULT) { - flash_driver_type = flash_ctrl->flash_driver_type; - } else if (flash_data->cfg.flash_init_info->flash_driver_type == - flash_ctrl->flash_driver_type) { - flash_driver_type = flash_ctrl->flash_driver_type; - } - - if (flash_driver_type == FLASH_DRIVER_DEFAULT) { - pr_err("%s:%d invalid flash_driver_type", __func__, __LINE__); - return -EINVAL; - } - - for (i = 0; i < ARRAY_SIZE(flash_table); i++) { - if (flash_driver_type == flash_table[i]->flash_driver_type) { - flash_ctrl->func_tbl = &flash_table[i]->func_tbl; - rc = 0; - } - } - - if (rc < 0) { - pr_err("%s:%d failed invalid flash_driver_type %d\n", - __func__, __LINE__, - flash_data->cfg.flash_init_info->flash_driver_type); - } - - rc = flash_ctrl->func_tbl->camera_flash_init( - flash_ctrl, flash_data); - if (rc < 0) { - pr_err("%s:%d camera_flash_init failed rc = %d", - __func__, __LINE__, rc); - return rc; - } - - flash_ctrl->flash_state = MSM_CAMERA_FLASH_INIT; - - CDBG("Exit"); - return 0; -} - -#ifdef CONFIG_COMPAT -static int32_t msm_flash_init_prepare( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - return msm_flash_init(flash_ctrl, flash_data); -} -#else -static int32_t msm_flash_init_prepare( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - struct msm_flash_cfg_data_t flash_data_k; - struct msm_flash_init_info_t flash_init_info; - int32_t i = 0; - - flash_data_k.cfg_type = flash_data->cfg_type; - for (i = 0; i < MAX_LED_TRIGGERS; i++) { - flash_data_k.flash_current[i] = - flash_data->flash_current[i]; - flash_data_k.flash_duration[i] = - flash_data->flash_duration[i]; - } - - flash_data_k.cfg.flash_init_info = &flash_init_info; - if (copy_from_user(&flash_init_info, - (void *)(flash_data->cfg.flash_init_info), - sizeof(struct msm_flash_init_info_t))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - return msm_flash_init(flash_ctrl, &flash_data_k); -} -#endif - -static int32_t msm_flash_low( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - uint32_t curr = 0, max_current = 0; - int32_t i = 0; - - CDBG("Enter\n"); - /* Turn off flash triggers */ - for (i = 0; i < flash_ctrl->flash_num_sources; i++) - led_trigger_event(flash_ctrl->flash_trigger[i], 0); - - /* Turn on flash triggers */ - for (i = 0; i < flash_ctrl->torch_num_sources; i++) { - if (flash_ctrl->torch_trigger[i]) { - max_current = flash_ctrl->torch_max_current[i]; - if (flash_data->cfg.flash_current[i] >= 0 && - flash_data->cfg.flash_current[i] < - max_current) { - curr = flash_data->cfg.flash_current[i]; - } else { - curr = flash_ctrl->torch_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr); - } - led_trigger_event(flash_ctrl->torch_trigger[i], - curr); - } - } - - CDBG("Exit\n"); - return 0; -} - -static int32_t msm_flash_high( - struct msm_flash_ctrl_t *flash_ctrl, - struct msm_flash_cfg_data_t *flash_data) -{ - int32_t curr = 0; - int32_t max_current = 0; - int32_t i = 0; - - /* Turn off torch triggers */ - for (i = 0; i < flash_ctrl->torch_num_sources; i++) - led_trigger_event(flash_ctrl->torch_trigger[i], 0); - - /* Turn on flash triggers */ - for (i = 0; i < flash_ctrl->flash_num_sources; i++) { - if (flash_ctrl->flash_trigger[i]) { - max_current = flash_ctrl->flash_max_current[i]; - if (flash_data->cfg.flash_current[i] >= 0 && - flash_data->cfg.flash_current[i] < - max_current) { - curr = flash_data->cfg.flash_current[i]; - } else { - curr = flash_ctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr); - } - led_trigger_event(flash_ctrl->flash_trigger[i], - curr); - } - } - return 0; -} - -static int32_t msm_flash_release( - struct msm_flash_ctrl_t *flash_ctrl) -{ - int32_t rc = 0; - if (flash_ctrl->flash_state == MSM_CAMERA_FLASH_RELEASE) { - pr_err("%s:%d Invalid flash state = %d", - __func__, __LINE__, flash_ctrl->flash_state); - return 0; - } - - rc = flash_ctrl->func_tbl->camera_flash_off(flash_ctrl, NULL); - if (rc < 0) { - pr_err("%s:%d camera_flash_init failed rc = %d", - __func__, __LINE__, rc); - return rc; - } - flash_ctrl->flash_state = MSM_CAMERA_FLASH_RELEASE; - return 0; -} - -static int32_t msm_flash_config(struct msm_flash_ctrl_t *flash_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct msm_flash_cfg_data_t *flash_data = - (struct msm_flash_cfg_data_t *) argp; - - mutex_lock(flash_ctrl->flash_mutex); - - CDBG("Enter %s type %d\n", __func__, flash_data->cfg_type); - - switch (flash_data->cfg_type) { - case CFG_FLASH_INIT: - rc = msm_flash_init_prepare(flash_ctrl, flash_data); - break; - case CFG_FLASH_RELEASE: - rc = flash_ctrl->func_tbl->camera_flash_release( - flash_ctrl); - break; - case CFG_FLASH_OFF: - rc = flash_ctrl->func_tbl->camera_flash_off( - flash_ctrl, flash_data); - break; - case CFG_FLASH_LOW: - rc = flash_ctrl->func_tbl->camera_flash_low( - flash_ctrl, flash_data); - break; - case CFG_FLASH_HIGH: - rc = flash_ctrl->func_tbl->camera_flash_high( - flash_ctrl, flash_data); - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(flash_ctrl->flash_mutex); - - CDBG("Exit %s type %d\n", __func__, flash_data->cfg_type); - - return rc; -} - -static long msm_flash_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_flash_ctrl_t *fctrl = NULL; - void __user *argp = (void __user *)arg; - - CDBG("Enter\n"); - - if (!sd) { - pr_err("sd NULL\n"); - return -EINVAL; - } - fctrl = v4l2_get_subdevdata(sd); - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_flash_get_subdev_id(fctrl, argp); - case VIDIOC_MSM_FLASH_CFG: - return msm_flash_config(fctrl, argp); - case MSM_SD_NOTIFY_FREEZE: - return 0; - case MSM_SD_SHUTDOWN: - *(int *)argp = MSM_CAMERA_LED_RELEASE; - return msm_flash_config(fctrl, argp); - default: - pr_err_ratelimited("invalid cmd %d\n", cmd); - return -ENOIOCTLCMD; - } - CDBG("Exit\n"); -} - -static struct v4l2_subdev_core_ops msm_flash_subdev_core_ops = { - .ioctl = msm_flash_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_flash_subdev_ops = { - .core = &msm_flash_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_flash_internal_ops; - -static int32_t msm_flash_get_gpio_dt_data(struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0, i = 0; - uint16_t *gpio_array = NULL; - int16_t gpio_array_size = 0; - struct msm_camera_gpio_conf *gconf = NULL; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size > 0) { - fctrl->power_info.gpio_conf = - kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!fctrl->power_info.gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - gconf = fctrl->power_info.gpio_conf; - - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto free_gpio_conf; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - if (((int16_t)gpio_array[i]) < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -EINVAL; - goto free_gpio_array; - } - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_gpio_array; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_cam_gpio_req_tbl; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto free_cam_gpio_set_tbl; - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_GPIO; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - return 0; - -free_cam_gpio_set_tbl: - kfree(gconf->cam_gpio_set_tbl); -free_cam_gpio_req_tbl: - kfree(gconf->cam_gpio_req_tbl); -free_gpio_array: - kfree(gpio_array); -free_gpio_conf: - kfree(fctrl->power_info.gpio_conf); - return rc; -} - -static int32_t msm_flash_get_pmic_source_info( - struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0; - uint32_t count = 0, i = 0; - struct device_node *flash_src_node = NULL; - struct device_node *torch_src_node = NULL; - - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl->flash_num_sources = count; - CDBG("%s:%d flash_num_sources = %d", - __func__, __LINE__, fctrl->flash_num_sources); - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "qcom,default-led-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger read failed\n"); - of_node_put(flash_src_node); - continue; - } - } - - CDBG("default trigger %s\n", - fctrl->flash_trigger_name[i]); - - /* Read operational-current */ - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl->flash_op_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - /* Read max-current */ - rc = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl->flash_max_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->flash_op_current[i]); - - led_trigger_register_simple( - fctrl->flash_trigger_name[i], - &fctrl->flash_trigger[i]); - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_PMIC; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - if (of_get_property(of_node, "qcom,torch-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl->torch_num_sources = count; - CDBG("%s:%d torch_num_sources = %d", - __func__, __LINE__, fctrl->torch_num_sources); - for (i = 0; i < count; i++) { - torch_src_node = of_parse_phandle(of_node, - "qcom,torch-source", i); - if (!torch_src_node) { - pr_err("torch_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(torch_src_node, - "qcom,default-led-trigger", - &fctrl->torch_trigger_name[i]); - if (rc < 0) { - rc = of_property_read_string(torch_src_node, - "linux,default-trigger", - &fctrl->torch_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger read failed\n"); - of_node_put(torch_src_node); - continue; - } - } - - CDBG("default trigger %s\n", - fctrl->torch_trigger_name[i]); - - /* Read operational-current */ - rc = of_property_read_u32(torch_src_node, - "qcom,current", - &fctrl->torch_op_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(torch_src_node); - continue; - } - - /* Read max-current */ - rc = of_property_read_u32(torch_src_node, - "qcom,max-current", - &fctrl->torch_max_current[i]); - if (rc < 0) { - pr_err("current: read failed\n"); - of_node_put(torch_src_node); - continue; - } - - of_node_put(torch_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->torch_op_current[i]); - - led_trigger_register_simple( - fctrl->torch_trigger_name[i], - &fctrl->torch_trigger[i]); - } - if (fctrl->flash_driver_type == FLASH_DRIVER_DEFAULT) - fctrl->flash_driver_type = FLASH_DRIVER_PMIC; - CDBG("%s:%d fctrl->flash_driver_type = %d", __func__, __LINE__, - fctrl->flash_driver_type); - } - - return 0; -} - -static int32_t msm_flash_get_dt_data(struct device_node *of_node, - struct msm_flash_ctrl_t *fctrl) -{ - int32_t rc = 0; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - /* Read the sub device */ - rc = of_property_read_u32(of_node, "cell-index", &fctrl->pdev->id); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - return rc; - } - - CDBG("subdev id %d\n", fctrl->subdev_id); - - fctrl->flash_driver_type = FLASH_DRIVER_DEFAULT; - - /* Read the CCI master. Use M0 if not available in the node */ - rc = of_property_read_u32(of_node, "qcom,cci-master", - &fctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, fctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - fctrl->cci_i2c_master = MASTER_0; - rc = 0; - } else { - fctrl->flash_driver_type = FLASH_DRIVER_I2C; - } - - /* Read the gpio information from device tree */ - rc = msm_flash_get_gpio_dt_data(of_node, fctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_gpio_dt_data failed rc %d\n", - __func__, __LINE__, rc); - return rc; - } - - /* Read the flash and torch source info from device tree node */ - rc = msm_flash_get_pmic_source_info(of_node, fctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_pmic_source_info failed rc %d\n", - __func__, __LINE__, rc); - return rc; - } - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_flash_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct msm_flash_cfg_data_t32 *u32 = - (struct msm_flash_cfg_data_t32 *)arg; - struct msm_flash_cfg_data_t flash_data; - struct msm_flash_init_info_t32 flash_init_info32; - struct msm_flash_init_info_t flash_init_info; - - CDBG("Enter"); - flash_data.cfg_type = u32->cfg_type; - switch (cmd) { - case VIDIOC_MSM_FLASH_CFG32: - cmd = VIDIOC_MSM_FLASH_CFG; - switch (flash_data.cfg_type) { - case CFG_FLASH_OFF: - case CFG_FLASH_LOW: - case CFG_FLASH_HIGH: - flash_data.cfg.settings = compat_ptr(u32->cfg.settings); - break; - case CFG_FLASH_INIT: - flash_data.cfg.flash_init_info = &flash_init_info; - if (copy_from_user(&flash_init_info32, - (void *)compat_ptr(u32->cfg.flash_init_info), - sizeof(struct msm_flash_init_info_t32))) { - pr_err("%s copy_from_user failed %d\n", - __func__, __LINE__); - return -EFAULT; - } - flash_init_info.flash_driver_type = - flash_init_info32.flash_driver_type; - flash_init_info.settings = - compat_ptr(flash_init_info32.settings); - flash_init_info.power_setting_array = - compat_ptr( - flash_init_info32.power_setting_array); - break; - default: - break; - } - break; - default: - return msm_flash_subdev_ioctl(sd, cmd, arg); - } - - rc = msm_flash_subdev_ioctl(sd, cmd, &flash_data); - CDBG("Exit"); - return rc; -} - -static long msm_flash_subdev_fops_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_flash_subdev_do_ioctl); -} -#endif -static int32_t msm_flash_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_flash_ctrl_t *flash_ctrl = NULL; - struct msm_camera_cci_client *cci_client = NULL; - - CDBG("Enter"); - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - flash_ctrl = kzalloc(sizeof(struct msm_flash_ctrl_t), GFP_KERNEL); - if (!flash_ctrl) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - memset(flash_ctrl, 0, sizeof(struct msm_flash_ctrl_t)); - - flash_ctrl->pdev = pdev; - - rc = msm_flash_get_dt_data(pdev->dev.of_node, flash_ctrl); - if (rc < 0) { - pr_err("%s:%d msm_flash_get_dt_data failed\n", - __func__, __LINE__); - kfree(flash_ctrl); - return -EINVAL; - } - - flash_ctrl->flash_state = MSM_CAMERA_FLASH_RELEASE; - flash_ctrl->power_info.dev = &flash_ctrl->pdev->dev; - flash_ctrl->flash_device_type = MSM_CAMERA_PLATFORM_DEVICE; - flash_ctrl->flash_mutex = &msm_flash_mutex; - flash_ctrl->flash_i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - flash_ctrl->flash_i2c_client.cci_client = kzalloc( - sizeof(struct msm_camera_cci_client), GFP_KERNEL); - if (!flash_ctrl->flash_i2c_client.cci_client) { - kfree(flash_ctrl); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = flash_ctrl->flash_i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = flash_ctrl->cci_i2c_master; - - /* Initialize sub device */ - v4l2_subdev_init(&flash_ctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&flash_ctrl->msm_sd.sd, flash_ctrl); - - flash_ctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - flash_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(flash_ctrl->msm_sd.sd.name, - ARRAY_SIZE(flash_ctrl->msm_sd.sd.name), - "msm_camera_flash"); - media_entity_init(&flash_ctrl->msm_sd.sd.entity, 0, NULL, 0); - flash_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - flash_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_FLASH; - flash_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; - msm_sd_register(&flash_ctrl->msm_sd); - - CDBG("%s:%d flash sd name = %s", __func__, __LINE__, - flash_ctrl->msm_sd.sd.entity.name); - msm_flash_v4l2_subdev_fops = v4l2_subdev_fops; -#ifdef CONFIG_COMPAT - msm_flash_v4l2_subdev_fops.compat_ioctl32 = - msm_flash_subdev_fops_ioctl; -#endif - flash_ctrl->msm_sd.sd.devnode->fops = &msm_flash_v4l2_subdev_fops; - - if (flash_ctrl->flash_driver_type == FLASH_DRIVER_PMIC) - rc = msm_torch_create_classdev(pdev, flash_ctrl); - - CDBG("probe success\n"); - return rc; -} - -MODULE_DEVICE_TABLE(of, msm_flash_dt_match); - -static struct platform_driver msm_flash_platform_driver = { - .probe = msm_flash_platform_probe, - .driver = { - .name = "qcom,camera-flash", - .owner = THIS_MODULE, - .of_match_table = msm_flash_dt_match, - }, -}; - -static int __init msm_flash_init_module(void) -{ - int32_t rc = 0; - CDBG("Enter\n"); - rc = platform_driver_register(&msm_flash_platform_driver); - if (rc) - pr_err("platform probe for flash failed"); - - return rc; -} - -static void __exit msm_flash_exit_module(void) -{ - platform_driver_unregister(&msm_flash_platform_driver); - return; -} - -static struct msm_flash_table msm_pmic_flash_table = { - .flash_driver_type = FLASH_DRIVER_PMIC, - .func_tbl = { - .camera_flash_init = msm_flash_off, - .camera_flash_release = msm_flash_release, - .camera_flash_off = msm_flash_off, - .camera_flash_low = msm_flash_low, - .camera_flash_high = msm_flash_high, - }, -}; - -static struct msm_flash_table msm_gpio_flash_table = { - .flash_driver_type = FLASH_DRIVER_GPIO, - .func_tbl = { - .camera_flash_init = msm_flash_gpio_init, - .camera_flash_release = msm_flash_release, - .camera_flash_off = msm_flash_off, - .camera_flash_low = msm_flash_low, - .camera_flash_high = msm_flash_high, - }, -}; - -static struct msm_flash_table msm_i2c_flash_table = { - .flash_driver_type = FLASH_DRIVER_I2C, - .func_tbl = { - .camera_flash_init = msm_flash_i2c_init, - .camera_flash_release = msm_flash_i2c_release, - .camera_flash_off = msm_flash_i2c_write_setting_array, - .camera_flash_low = msm_flash_i2c_write_setting_array, - .camera_flash_high = msm_flash_i2c_write_setting_array, - }, -}; - -module_init(msm_flash_init_module); -module_exit(msm_flash_exit_module); -MODULE_DESCRIPTION("MSM FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.h deleted file mode 100644 index c2da26c541ef..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_flash.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef MSM_FLASH_H -#define MSM_FLASH_H - -#include -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include -#include "msm_camera_i2c.h" -#include "msm_sd.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -enum msm_camera_flash_state_t { - MSM_CAMERA_FLASH_INIT, - MSM_CAMERA_FLASH_RELEASE, -}; - -struct msm_flash_ctrl_t; - -struct msm_flash_func_t { - int32_t (*camera_flash_init)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_release)(struct msm_flash_ctrl_t *); - int32_t (*camera_flash_off)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_low)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); - int32_t (*camera_flash_high)(struct msm_flash_ctrl_t *, - struct msm_flash_cfg_data_t *); -}; - -struct msm_flash_table { - enum msm_flash_driver_type flash_driver_type; - struct msm_flash_func_t func_tbl; -}; - -struct msm_flash_reg_t { - struct msm_camera_i2c_reg_setting *init_setting; - struct msm_camera_i2c_reg_setting *off_setting; - struct msm_camera_i2c_reg_setting *release_setting; - struct msm_camera_i2c_reg_setting *low_setting; - struct msm_camera_i2c_reg_setting *high_setting; -}; - -struct msm_flash_ctrl_t { - struct msm_camera_i2c_client flash_i2c_client; - struct msm_sd_subdev msm_sd; - struct platform_device *pdev; - struct msm_flash_func_t *func_tbl; - struct msm_camera_power_ctrl_t power_info; - - /* Flash */ - uint32_t flash_num_sources; - const char *flash_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; - uint32_t flash_op_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_duration[MAX_LED_TRIGGERS]; - - /* Torch */ - uint32_t torch_num_sources; - const char *torch_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *torch_trigger[MAX_LED_TRIGGERS]; - uint32_t torch_op_current[MAX_LED_TRIGGERS]; - uint32_t torch_max_current[MAX_LED_TRIGGERS]; - - void *data; - enum msm_camera_device_type_t flash_device_type; - enum cci_i2c_master_t cci_i2c_master; - uint32_t subdev_id; - struct mutex *flash_mutex; - struct msm_sensor_power_setting_array power_setting_array; - - /* flash driver type */ - enum msm_flash_driver_type flash_driver_type; - - /* flash state */ - enum msm_camera_flash_state_t flash_state; -}; - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id); - -int msm_flash_probe(struct platform_device *pdev, const void *data); - -int32_t msm_flash_create_v4lsubdev(struct platform_device *pdev, - void *data); -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data); - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_flash_ctrl_t *fctrl, - void *arg); - -int32_t msm_led_i2c_trigger_config(struct msm_flash_ctrl_t *fctrl, - void *data); - -int msm_flash_led_init(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_release(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_off(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_low(struct msm_flash_ctrl_t *fctrl); -int msm_flash_led_high(struct msm_flash_ctrl_t *fctrl); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.c deleted file mode 100644 index 86058a9ca7b8..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.c +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include "msm_led_flash.h" -#include - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -static long msm_led_flash_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_led_flash_ctrl_t *fctrl = NULL; - void __user *argp = (void __user *)arg; - if (!sd) { - pr_err("sd NULL\n"); - return -EINVAL; - } - fctrl = v4l2_get_subdevdata(sd); - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return fctrl->func_tbl->flash_get_subdev_id(fctrl, argp); - case VIDIOC_MSM_FLASH_LED_DATA_CFG: - return fctrl->func_tbl->flash_led_config(fctrl, argp); - case MSM_SD_SHUTDOWN: - *(int *)argp = MSM_CAMERA_LED_RELEASE; - return fctrl->func_tbl->flash_led_config(fctrl, argp); - default: - pr_err_ratelimited("invalid cmd %d\n", cmd); - return -ENOIOCTLCMD; - } -} - -static struct v4l2_subdev_core_ops msm_flash_subdev_core_ops = { - .ioctl = msm_led_flash_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_flash_subdev_ops = { - .core = &msm_flash_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_flash_internal_ops; - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->pdev = pdev; - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - fctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x1; -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashen-gpio", 0); -#else - fctrl->led_irq_gpio1 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led1-gpio", 0); -#endif - if (fctrl->led_irq_gpio1 < 0) { - pr_err("Fail : can't get led1-gpio\n"); - return -EINVAL; - } -#if defined(CONFIG_FLED_SM5701) - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "flashtorch-gpio", 0); -#else - fctrl->led_irq_gpio2 = of_get_named_gpio(fctrl->pdev->dev.of_node, "qcom,led2-gpio", 0); -#endif - if (fctrl->led_irq_gpio2 < 0) { - pr_err("Fail : can't get led2-gpio\n"); - return -EINVAL; - } - - msm_sd_register(&fctrl->msm_sd); - - CDBG("probe success\n"); - return 0; -} - -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - CDBG("Enter\n"); - - if (!fctrl) { - pr_err("fctrl NULL\n"); - return -EINVAL; - } - - /* Initialize sub device */ - v4l2_subdev_init(&fctrl->msm_sd.sd, &msm_flash_subdev_ops); - v4l2_set_subdevdata(&fctrl->msm_sd.sd, fctrl); - - fctrl->msm_sd.sd.internal_ops = &msm_flash_internal_ops; - fctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(fctrl->msm_sd.sd.name, ARRAY_SIZE(fctrl->msm_sd.sd.name), - "msm_flash"); - media_entity_init(&fctrl->msm_sd.sd.entity, 0, NULL, 0); - fctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - fctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_LED_FLASH; - msm_sd_register(&fctrl->msm_sd); - - CDBG("probe success\n"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.h deleted file mode 100644 index ad6aba89c7ee..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_flash.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#ifndef MSM_LED_FLASH_H -#define MSM_LED_FLASH_H - -#include -#include -#include -#include "../../include/media/msm_cam_sensor.h" -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_sd.h" - - -struct msm_led_flash_ctrl_t; - -struct msm_flash_fn_t { - int32_t (*flash_get_subdev_id)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_config)(struct msm_led_flash_ctrl_t *, void *); - int32_t (*flash_led_init)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_release)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_off)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_low)(struct msm_led_flash_ctrl_t *); - int32_t (*flash_led_high)(struct msm_led_flash_ctrl_t *); -}; - -struct msm_led_flash_reg_t { - struct msm_camera_i2c_reg_setting *init_setting; - struct msm_camera_i2c_reg_setting *off_setting; - struct msm_camera_i2c_reg_setting *release_setting; - struct msm_camera_i2c_reg_setting *low_setting; - struct msm_camera_i2c_reg_setting *high_setting; -}; - -struct msm_led_flash_ctrl_t { - struct msm_camera_i2c_client *flash_i2c_client; - struct msm_sd_subdev msm_sd; - struct platform_device *pdev; - struct msm_flash_fn_t *func_tbl; - struct msm_camera_sensor_board_info *flashdata; - struct msm_led_flash_reg_t *reg_setting; - const char *flash_trigger_name[MAX_LED_TRIGGERS]; - struct led_trigger *flash_trigger[MAX_LED_TRIGGERS]; - uint32_t flash_num_sources; - uint32_t flash_op_current[MAX_LED_TRIGGERS]; - uint32_t flash_max_current[MAX_LED_TRIGGERS]; - const char *torch_trigger_name; - struct led_trigger *torch_trigger; - uint32_t torch_op_current; - uint32_t torch_max_current; - void *data; - uint32_t num_sources; - enum msm_camera_device_type_t flash_device_type; - enum cci_i2c_master_t cci_i2c_master; - enum msm_camera_led_config_t led_state; - uint32_t subdev_id; - struct msm_pinctrl_info pinctrl_info; - int led_irq_gpio1; - int led_irq_gpio2; -}; - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id); - -int msm_flash_probe(struct platform_device *pdev, const void *data); - -int32_t msm_led_flash_create_v4lsubdev(struct platform_device *pdev, - void *data); -int32_t msm_led_i2c_flash_create_v4lsubdev(void *data); - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg); - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data); - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl); -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_i2c_trigger.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_i2c_trigger.c deleted file mode 100644 index f374ce639341..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_i2c_trigger.c +++ /dev/null @@ -1,746 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#include "msm_led_flash.h" -#include "msm_camera_io_util.h" -#include "../msm_sensor.h" -#include "msm_led_flash.h" -#include "../cci/msm_cci.h" -#include - -#define FLASH_NAME "camera-led-flash" -#define CAM_FLASH_PINCTRL_STATE_SLEEP "cam_flash_suspend" -#define CAM_FLASH_PINCTRL_STATE_DEFAULT "cam_flash_default" -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int32_t msm_led_i2c_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - *subdev_id = fctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - return 0; -} - -int32_t msm_led_i2c_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl->func_tbl) { - pr_err("failed\n"); - return -EINVAL; - } - switch (cfg->cfgtype) { - - case MSM_CAMERA_LED_INIT: - if (fctrl->func_tbl->flash_led_init) - rc = fctrl->func_tbl->flash_led_init(fctrl); - break; - - case MSM_CAMERA_LED_RELEASE: - if (fctrl->func_tbl->flash_led_release) - rc = fctrl->func_tbl-> - flash_led_release(fctrl); - break; - - case MSM_CAMERA_LED_OFF: - if (fctrl->func_tbl->flash_led_off) - rc = fctrl->func_tbl->flash_led_off(fctrl); - break; - - case MSM_CAMERA_LED_LOW: - if (fctrl->func_tbl->flash_led_low) - rc = fctrl->func_tbl->flash_led_low(fctrl); - break; - - case MSM_CAMERA_LED_HIGH: - if (fctrl->func_tbl->flash_led_high) - rc = fctrl->func_tbl->flash_led_high(fctrl); - break; - default: - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -static int msm_flash_pinctrl_init(struct msm_led_flash_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *flash_pctrl = NULL; - flash_pctrl = &ctrl->pinctrl_info; - if (flash_pctrl->use_pinctrl != true) { - pr_err("%s: %d PINCTRL is not enables in Flash driver node\n", - __func__, __LINE__); - return 0; - } - flash_pctrl->pinctrl = devm_pinctrl_get(&ctrl->pdev->dev); - - if (IS_ERR_OR_NULL(flash_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_active = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_DEFAULT); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - flash_pctrl->gpio_state_suspend = pinctrl_lookup_state( - flash_pctrl->pinctrl, - CAM_FLASH_PINCTRL_STATE_SLEEP); - - if (IS_ERR_OR_NULL(flash_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - - -int msm_flash_led_init(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - if (power_info->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - power_info->gpio_conf->cam_gpiomux_conf_tbl, - power_info->gpio_conf->cam_gpiomux_conf_tbl_size); - } - - /* CCI Init */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("cci_init failed\n"); - return rc; - } - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - if (fctrl->pinctrl_info.use_pinctrl == true) { - CDBG("%s:%d PC:: flash pins setting to active state", - __func__, __LINE__); - rc = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_active); - if (rc) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - msleep(20); - - CDBG("before FL_RESET\n"); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->init_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - fctrl->led_state = MSM_CAMERA_LED_INIT; - return rc; -} - -int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0, ret = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - - - if (fctrl->led_state != MSM_CAMERA_LED_INIT) { - pr_err("%s:%d invalid led state\n", __func__, __LINE__); - return -EINVAL; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_LOW); - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - if (power_info->gpio_conf->gpio_num_info-> - valid[SENSOR_GPIO_FL_RESET] == 1) - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_RESET], - GPIO_OUT_LOW); - - if (fctrl->pinctrl_info.use_pinctrl == true) { - ret = pinctrl_select_state(fctrl->pinctrl_info.pinctrl, - fctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - } - rc = msm_camera_request_gpio_table( - power_info->gpio_conf->cam_gpio_req_tbl, - power_info->gpio_conf->cam_gpio_req_tbl_size, 0); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - - fctrl->led_state = MSM_CAMERA_LED_RELEASE; - /* CCI deInit */ - if (fctrl->flash_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_util( - fctrl->flash_i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_deinit failed\n"); - } - - return 0; -} - -int msm_flash_led_off(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - - if (!fctrl) { - pr_err("%s:%d fctrl NULL\n", __func__, __LINE__); - return -EINVAL; - } - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - CDBG("%s:%d called\n", __func__, __LINE__); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->off_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_LOW); - - return rc; -} - -int msm_flash_led_low(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->low_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -int msm_flash_led_high(struct msm_led_flash_ctrl_t *fctrl) -{ - int rc = 0; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - CDBG("%s:%d called\n", __func__, __LINE__); - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_EN], - GPIO_OUT_HIGH); - - gpio_set_value_cansleep( - power_info->gpio_conf->gpio_num_info-> - gpio_num[SENSOR_GPIO_FL_NOW], - GPIO_OUT_HIGH); - - if (fctrl->flash_i2c_client && fctrl->reg_setting) { - rc = fctrl->flash_i2c_client->i2c_func_tbl->i2c_write_table( - fctrl->flash_i2c_client, - fctrl->reg_setting->high_setting); - if (rc < 0) - pr_err("%s:%d failed\n", __func__, __LINE__); - } - - return rc; -} - -static int32_t msm_led_get_dt_data(struct device_node *of_node, - struct msm_led_flash_ctrl_t *fctrl) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct device_node *flash_src_node = NULL; - struct msm_camera_sensor_board_info *flashdata = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - uint32_t count = 0; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl->flashdata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!fctrl->flashdata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - flashdata = fctrl->flashdata; - power_info = &flashdata->power_info; - - rc = of_property_read_u32(of_node, "cell-index", &fctrl->subdev_id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - - CDBG("subdev id %d\n", fctrl->subdev_id); - - rc = of_property_read_string(of_node, "label", - &flashdata->sensor_name); - CDBG("%s label %s, rc %d\n", __func__, - flashdata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &fctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, fctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - fctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - fctrl->pinctrl_info.use_pinctrl = false; - fctrl->pinctrl_info.use_pinctrl = of_property_read_bool(of_node, - "qcom,enable_pinctrl"); - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("failed\n"); - return -EINVAL; - } - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl->flash_trigger_name[i]); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl->flash_trigger_name[i]); - - rc = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl->flash_op_current[i]); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - of_node_put(flash_src_node); - continue; - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl->flash_op_current[i]); - - led_trigger_register_simple( - fctrl->flash_trigger_name[i], - &fctrl->flash_trigger[i]); - } - - } else { /*Handle LED Flash Ctrl by GPIO*/ - power_info->gpio_conf = - kzalloc(sizeof(struct msm_camera_gpio_conf), - GFP_KERNEL); - if (!power_info->gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - gconf = power_info->gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR4; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR4; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR5; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR6; - } - } - - flashdata->slave_info = - kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!flashdata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR8; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR9; - } - fctrl->flashdata->slave_info->sensor_slave_addr = id_info[0]; - fctrl->flashdata->slave_info->sensor_id_reg_addr = id_info[1]; - fctrl->flashdata->slave_info->sensor_id = id_info[2]; - - kfree(gpio_array); - return rc; -ERROR9: - kfree(fctrl->flashdata->slave_info); -ERROR8: - kfree(fctrl->flashdata->power_info.gpio_conf->gpio_num_info); -ERROR6: - kfree(gconf->cam_gpio_set_tbl); -ERROR5: - kfree(gconf->cam_gpio_req_tbl); -ERROR4: - kfree(gconf); -ERROR1: - kfree(fctrl->flashdata); - kfree(gpio_array); - } - return rc; -} - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -#ifdef CONFIG_DEBUG_FS -static int set_led_status(void *data, u64 val) -{ - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - int rc = -1; - pr_debug("set_led_status: Enter val: %llu", val); - if (!fctrl) { - pr_err("set_led_status: fctrl is NULL"); - return rc; - } - if (!fctrl->func_tbl) { - pr_err("set_led_status: fctrl->func_tbl is NULL"); - return rc; - } - if (val == 0) { - pr_debug("set_led_status: val is disable"); - rc = msm_flash_led_off(fctrl); - } else { - pr_debug("set_led_status: val is enable"); - rc = msm_flash_led_low(fctrl); - } - - return rc; -} - -DEFINE_SIMPLE_ATTRIBUTE(ledflashdbg_fops, - NULL, set_led_status, "%llu\n"); -#endif - -int msm_flash_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = NULL; -#ifdef CONFIG_DEBUG_FS - struct dentry *dentry; -#endif - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - goto probe_failure; - } - - fctrl = (struct msm_led_flash_ctrl_t *)(id->driver_data); - if (fctrl->flash_i2c_client) - fctrl->flash_i2c_client->client = client; - /* Set device type as I2C */ - fctrl->flash_device_type = MSM_CAMERA_I2C_DEVICE; - - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", id->name); - - rc = msm_led_get_dt_data(client->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - - msm_flash_pinctrl_init(fctrl); - if (fctrl->flash_i2c_client != NULL) { - fctrl->flash_i2c_client->client = client; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - fctrl->flash_i2c_client->client->addr = - fctrl->flashdata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - - rc = msm_led_i2c_flash_create_v4lsubdev(fctrl); -#ifdef CONFIG_DEBUG_FS - dentry = debugfs_create_file("ledflash", S_IRUGO, NULL, (void *)fctrl, - &ledflashdbg_fops); - if (!dentry) - pr_err("Failed to create the debugfs ledflash file"); -#endif - CDBG("%s:%d probe success\n", __func__, __LINE__); - return 0; - -probe_failure: - CDBG("%s:%d probe failed\n", __func__, __LINE__); - return rc; -} - -int msm_flash_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - struct device_node *of_node = pdev->dev.of_node; - struct msm_camera_cci_client *cci_client = NULL; - - if (!of_node || !fctrl) { - pr_err("%s of_node is NULL or fctrl is NULL, line %d\n",__func__,__LINE__); - rc = -EFAULT; - goto probe_failure; - } - fctrl->pdev = pdev; - - rc = msm_led_get_dt_data(pdev->dev.of_node, fctrl); - if (rc < 0) { - pr_err("%s failed line %d rc = %d\n", __func__, __LINE__, rc); - rc = -EFAULT; - goto probe_failure; - } - - msm_flash_pinctrl_init(fctrl); - /* Assign name for sub device */ - snprintf(fctrl->msm_sd.sd.name, sizeof(fctrl->msm_sd.sd.name), - "%s", fctrl->flashdata->sensor_name); - /* Set device type as Platform*/ - fctrl->flash_device_type = MSM_CAMERA_PLATFORM_DEVICE; - - if (NULL == fctrl->flash_i2c_client) { - pr_err("%s flash_i2c_client NULL\n", - __func__); - rc = -EFAULT; - goto probe_failure; - } - - fctrl->flash_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!fctrl->flash_i2c_client->cci_client) { - pr_err("%s failed line %d kzalloc failed\n", - __func__, __LINE__); - rc = -ENOMEM; - goto probe_failure; - } - - cci_client = fctrl->flash_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = fctrl->cci_i2c_master; - if (fctrl->flashdata->slave_info->sensor_slave_addr) - cci_client->sid = - fctrl->flashdata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - - if (!fctrl->flash_i2c_client->i2c_func_tbl) - fctrl->flash_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - - rc = msm_led_flash_create_v4lsubdev(pdev, fctrl); - - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - goto probe_failure1; - } - - CDBG("%s: probe success\n", __func__); - return 0; - -probe_failure1: - kfree(fctrl->flash_i2c_client->cci_client); - -probe_failure: - - pr_err("%s probe failed\n", __func__); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_torch.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_torch.c deleted file mode 100644 index ff6369634541..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_torch.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_led_flash.h" - -static struct led_trigger *torch_trigger; - -static void msm_led_torch_brightness_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (!torch_trigger) { - pr_err("No torch trigger found, can't set brightness\n"); - return; - } - - led_trigger_event(torch_trigger, value); -}; - -static struct led_classdev msm_torch_led = { - .name = "torch-light", - .brightness_set = msm_led_torch_brightness_set, - .brightness = LED_OFF, -}; - -int32_t msm_led_torch_create_classdev(struct platform_device *pdev, - void *data) -{ - int rc; - struct msm_led_flash_ctrl_t *fctrl = - (struct msm_led_flash_ctrl_t *)data; - - if (!fctrl || !fctrl->torch_trigger) { - pr_err("Invalid fctrl or torch trigger\n"); - return -EINVAL; - } - - torch_trigger = fctrl->torch_trigger; - msm_led_torch_brightness_set(&msm_torch_led, LED_OFF); - - rc = led_classdev_register(&pdev->dev, &msm_torch_led); - if (rc) { - pr_err("Failed to register led dev. rc = %d\n", rc); - return rc; - } - - return 0; -}; diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_trigger.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_trigger.c deleted file mode 100644 index c89f31fa6382..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/flash/msm_led_trigger.c +++ /dev/null @@ -1,760 +0,0 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include -#if defined(CONFIG_FLED_SM5701) -#include -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -#include -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) -#include -#endif -#ifdef CONFIG_FLED_SM5703 -#include -#endif -#include "msm_led_flash.h" - -#define FLASH_NAME "camera-led-flash" - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -extern int32_t msm_led_torch_create_classdev( - struct platform_device *pdev, void *data); -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -extern void rt5033_fled_strobe_critial_section_lock(struct rt_fled_info *fled_info); -extern void rt5033_fled_strobe_critial_section_unlock(struct rt_fled_info *fled_info); -extern bool assistive_light; -#endif - -#if defined(CONFIG_FLED_SM5701) -extern bool assistive_light; -#endif - -#ifdef CONFIG_FLED_SM5703_EXT_GPIO -extern bool assistive_light; -extern int32_t sm5703_fled_notification(struct sm_fled_info *info); -static int led_prev_mode = 0; -#if defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_MACH_J3LTE_CHN_CTC) || defined(CONFIG_MACH_J3LTE_CHN_TW) -extern int32_t sm5703_fled_set_preflash(struct sm_fled_info *info); -#endif -#endif - -static enum flash_type flashtype; -static struct msm_led_flash_ctrl_t fctrl; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO -static bool lock_state = false; -#endif - -#if defined(CONFIG_LEDS_SM5705) -extern int sm5705_fled_led_off(unsigned char index); -extern int sm5705_fled_torch_on(unsigned char index); -extern int sm5705_fled_flash_on(unsigned char index); -#endif - -static int32_t msm_led_trigger_get_subdev_id(struct msm_led_flash_ctrl_t *fctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - if (!subdev_id) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -EINVAL; - } - *subdev_id = fctrl->pdev->id; - CDBG("%s:%d subdev_id %d\n", __func__, __LINE__, *subdev_id); - return 0; -} - -#if defined(CONFIG_LEDS_SM5705) -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - //uint32_t i; - - pr_err("[%s] flash type[%d]E\n", __func__, cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - sm5705_fled_led_off(0); - break; - case MSM_CAMERA_LED_PREFLASH: - case MSM_CAMERA_LED_LOW: - sm5705_fled_torch_on(0); - break; - case MSM_CAMERA_LED_HIGH: - sm5705_fled_flash_on(0); - break; - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - pr_err("soumyadarshi INIT flash do nothing\n"); - sm5705_fled_led_off(0); - break; - default: - break; - } - return rc; -} -#elif defined(CONFIG_FLED_SM5703) && defined(CONFIG_FRONT_FLASH) -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - int flash_id = 0; - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); - - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - - pr_err("[CAM_LED]FLASH ID:%d\n", cfg->torch_current); - switch (cfg->torch_current) { - case 0: - flash_id = BACK_CAMERA_B; - break; - - case 1: - flash_id = FRONT_CAMERA_B; - break; - - case 3: - flash_id = 4; //INIT&RELEASE - break; - - default: - pr_err("[CAM_LED]default is back:%d\n", cfg->torch_current); - flash_id = 0; - break; - } - - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - pr_err("[CAM_LED]LED STATE OFF.\n"); - if(flash_id == FRONT_CAMERA_B){ -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(0); - break; -#endif - }else if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; - } - - case MSM_CAMERA_LED_LOW: - pr_err("[CAM_LED]LED STATE LOW.\n"); - if (flash_id == FRONT_CAMERA_B) { -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(1); - break; -#endif - }else if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; - } - - case MSM_CAMERA_LED_HIGH: - pr_err("[CAM_LED]LED STATE HIGH.\n"); - if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; - } - - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - CDBG("[CAM_LED]LED STATE INIT/RELEASE.\n"); - if(flash_id == BACK_CAMERA_B){ -#if defined(CONFIG_FLED_SM5703) - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } else if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif - } - else if(flash_id == FRONT_CAMERA_B){ -#if defined(CONFIG_FLED_KTD2692) - ktd2692_flash_on(0); -#endif - } - break; - - default: - pr_err("[CAM_LED]LED STATE error!\n"); - rc = -EFAULT; - break; - - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -#else -static int32_t msm_led_trigger_config(struct msm_led_flash_ctrl_t *fctrl, - void *data) -{ - int rc = 0; - struct msm_camera_led_cfg_t *cfg = (struct msm_camera_led_cfg_t *)data; - uint32_t i; -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - rt_fled_info_t *fled_info = rt_fled_get_info_by_name(NULL); -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) || defined(CONFIG_FLED_SM5703) - sm_fled_info_t *fled_info = sm_fled_get_info_by_name(NULL); -#endif -#if 0 - uint32_t curr_l, max_curr_l; -#endif - CDBG("called led_state %d\n", cfg->cfgtype); - - if (!fctrl) { - pr_err("[%s:%d]failed\n", __func__, __LINE__); - return -EINVAL; - } - - switch (cfg->cfgtype) { - case MSM_CAMERA_LED_OFF: - pr_err("MSM_CAMERA_LED_OFF\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - } - -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - break; -#if 0 - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; -#endif -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) && (defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_MACH_J3LTE_CHN_CTC)|| defined(CONFIG_MACH_J3LTE_CHN_TW)) - case MSM_CAMERA_LED_PREFLASH: - pr_err("MSM_CAMERA_LED_PRELFASH\n"); - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - sm5703_fled_set_preflash(fled_info); - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); - break; -#endif - case MSM_CAMERA_LED_LOW: - pr_err("MSM_CAMERA_LED_LOW\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_TORCH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(MOVIE_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_MOVIE); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 1); - gpio_free(fctrl->led_irq_gpio1); -#endif - break; -#if 0 - if (fctrl->torch_trigger) { - max_curr_l = fctrl->torch_max_current; - if (cfg->torch_current > 0 && - cfg->torch_current < max_curr_l) { - curr_l = cfg->torch_current; - } else { - curr_l = fctrl->torch_op_current; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->torch_trigger, - curr_l); - } - break; -#endif - - case MSM_CAMERA_LED_HIGH: - pr_err("MSM_CAMERA_LED_HIGH\n"); -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - rt5033_fled_strobe_critial_section_lock(fled_info); - lock_state = true; - } -#endif -#ifdef CONFIG_FLED_SM5703_EXT_GPIO - if (assistive_light == true) { - pr_err("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_FLASH); - sm5703_fled_notification(fled_info); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - } - -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(FLASH_MODE); - sm5701_set_fleden(SM5701_FLEDEN_ON_FLASH); -#else - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio2, 1); - gpio_free(fctrl->led_irq_gpio2); -#endif - break; -#if 0 - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) { - max_curr_l = fctrl->flash_max_current[i]; - if (cfg->flash_current[i] > 0 && - cfg->flash_current[i] < max_curr_l) { - curr_l = cfg->flash_current[i]; - } else { - curr_l = fctrl->flash_op_current[i]; - pr_debug("LED current clamped to %d\n", - curr_l); - } - led_trigger_event(fctrl->flash_trigger[i], - curr_l); - } - break; -#endif - case MSM_CAMERA_LED_INIT: - case MSM_CAMERA_LED_RELEASE: - CDBG("MSM_CAMERA_LED_INIT\n"); -#if defined(CONFIG_FLED_SM5703_EXT_GPIO) - - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - if (fled_info) { - flashlight_set_mode(fled_info->flashlight_dev, FLASHLIGHT_MODE_OFF); - flashlight_strobe(fled_info->flashlight_dev, TURN_WAY_GPIO); - sm5703_fled_notification(fled_info); - - } -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#ifdef CONFIG_LEDS_S2MU003 - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } -#endif -#if defined(CONFIG_FLED_SM5701) - if (assistive_light == true) { - CDBG("When assistive light, Not control flash\n"); - return 0; - } - sm5701_led_ready(LED_DISABLE); - sm5701_set_fleden(SM5701_FLEDEN_DISABLED); -#else - gpio_request(fctrl->led_irq_gpio1, NULL); - gpio_request(fctrl->led_irq_gpio2, NULL); - gpio_direction_output(fctrl->led_irq_gpio1, 0); - gpio_direction_output(fctrl->led_irq_gpio2, 0); - gpio_free(fctrl->led_irq_gpio1); - gpio_free(fctrl->led_irq_gpio2); -#endif -#ifdef CONFIG_FLED_RT5033_EXT_GPIO - if (lock_state) { - if (fled_info) { - rt5033_fled_strobe_critial_section_unlock(fled_info); - lock_state = false; - } - } -#endif - for (i = 0; i < fctrl->num_sources; i++) - if (fctrl->flash_trigger[i]) - led_trigger_event(fctrl->flash_trigger[i], 0); - if (fctrl->torch_trigger) - led_trigger_event(fctrl->torch_trigger, 0); - break; - default: - pr_err("LED state error!\n"); - rc = -EFAULT; - break; - } - CDBG("flash_set_led_state: return %d\n", rc); - return rc; -} -#endif - -static const struct of_device_id msm_led_trigger_dt_match[] = { - {.compatible = "qcom,camera-led-flash"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_led_trigger_dt_match); - -static struct platform_driver msm_led_trigger_driver = { - .driver = { - .name = FLASH_NAME, - .owner = THIS_MODULE, - .of_match_table = msm_led_trigger_dt_match, - }, -}; - -static int32_t msm_led_trigger_probe(struct platform_device *pdev) -{ - int32_t rc = 0, rc_1 = 0, i = 0; - struct device_node *of_node = pdev->dev.of_node; - struct device_node *flash_src_node = NULL; - uint32_t count = 0; - struct led_trigger *temp = NULL; - - CDBG("called\n"); - - if (!of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - fctrl.pdev = pdev; - fctrl.num_sources = 0; - - rc = of_property_read_u32(of_node, "cell-index", &pdev->id); - if (rc < 0) { - pr_err("failed\n"); - return -EINVAL; - } - CDBG("pdev id %d\n", pdev->id); - - rc = of_property_read_u32(of_node, - "qcom,flash-type", &flashtype); - if (rc < 0) { - pr_err("flash-type: read failed\n"); - return -EINVAL; - } - - if (of_get_property(of_node, "qcom,flash-source", &count)) { - count /= sizeof(uint32_t); - CDBG("count %d\n", count); - if (count > MAX_LED_TRIGGERS) { - pr_err("invalid count\n"); - return -EINVAL; - } - fctrl.num_sources = count; - for (i = 0; i < count; i++) { - flash_src_node = of_parse_phandle(of_node, - "qcom,flash-source", i); - if (!flash_src_node) { - pr_err("flash_src_node NULL\n"); - continue; - } - - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.flash_trigger_name[i]); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - of_node_put(flash_src_node); - continue; - } - - CDBG("default trigger %s\n", - fctrl.flash_trigger_name[i]); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.flash_op_current[i] = LED_FULL; - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.flash_op_current[i]); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.flash_max_current[i]); - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - of_node_put(flash_src_node); - continue; - } - } - - of_node_put(flash_src_node); - - CDBG("max_current[%d] %d\n", - i, fctrl.flash_op_current[i]); - - led_trigger_register_simple(fctrl.flash_trigger_name[i], - &fctrl.flash_trigger[i]); - - if (flashtype == GPIO_FLASH) - if (fctrl.flash_trigger[i]) - temp = fctrl.flash_trigger[i]; - } - - /* Torch source */ - flash_src_node = of_parse_phandle(of_node, "qcom,torch-source", - 0); - if (flash_src_node) { - rc = of_property_read_string(flash_src_node, - "linux,default-trigger", - &fctrl.torch_trigger_name); - if (rc < 0) { - pr_err("default-trigger: read failed\n"); - goto torch_failed; - } - - CDBG("default trigger %s\n", - fctrl.torch_trigger_name); - - if (flashtype == GPIO_FLASH) { - /* use fake current */ - fctrl.torch_op_current = LED_HALF; - if (temp) - fctrl.torch_trigger = temp; - else - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } else { - rc = of_property_read_u32(flash_src_node, - "qcom,current", - &fctrl.torch_op_current); - rc_1 = of_property_read_u32(flash_src_node, - "qcom,max-current", - &fctrl.torch_max_current); - - if ((rc < 0) || (rc_1 < 0)) { - pr_err("current: read failed\n"); - goto torch_failed; - } - - CDBG("torch max_current %d\n", - fctrl.torch_op_current); - - led_trigger_register_simple( - fctrl.torch_trigger_name, - &fctrl.torch_trigger); - } -torch_failed: - of_node_put(flash_src_node); - } - } - - rc = msm_led_flash_create_v4lsubdev(pdev, &fctrl); - if (!rc) { - msm_led_torch_create_classdev(pdev, &fctrl); - } - - return rc; -} - -static int __init msm_led_trigger_add_driver(void) -{ - CDBG("called\n"); - return platform_driver_probe(&msm_led_trigger_driver, - msm_led_trigger_probe); -} - -static struct msm_flash_fn_t msm_led_trigger_func_tbl = { - .flash_get_subdev_id = msm_led_trigger_get_subdev_id, - .flash_led_config = msm_led_trigger_config, -}; - -static struct msm_led_flash_ctrl_t fctrl = { - .func_tbl = &msm_led_trigger_func_tbl, -}; -#if defined(CONFIG_FLED_SM5703) -int set_led_flash(int mode) -{ - struct msm_camera_led_cfg_t cfg; - int rc = 0; - cfg.cfgtype = mode; - - if (led_prev_mode && mode) - return -1; - - rc = msm_led_trigger_config(&fctrl, &mode); - - if (rc == 0) - led_prev_mode = mode; - - return rc; -} -EXPORT_SYMBOL(set_led_flash); -#endif -module_init(msm_led_trigger_add_driver); -MODULE_DESCRIPTION("LED TRIGGER FLASH"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0310.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0310.c deleted file mode 100644 index 9f6253acb6ee..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0310.c +++ /dev/null @@ -1,1197 +0,0 @@ -/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define GC0310_SENSOR_NAME "gc0310" -#define PLATFORM_DRIVER_NAME "msm_camera_gc0310" -#define gc0310_obj gc0310_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(gc0310_mut); -static struct msm_sensor_ctrl_t gc0310_s_ctrl; - -static struct msm_sensor_power_setting gc0310_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = { - {0xfe, 0xf0}, - {0xfe, 0xf0}, - {0xfe, 0x00}, - {0xfc, 0x0e}, - {0xfc, 0x0e}, - {0xf2, 0x80}, - {0xf3, 0x00}, - {0xf7, 0x1f}, - {0xf8, 0x03}, - {0xf9, 0x8e}, - {0xfa, 0x11}, - {0x00, 0x2f}, - {0x01, 0x0f}, - {0x02, 0x04}, - {0x03, 0x02}, - {0x04, 0x58}, - {0x05, 0x00}, - {0x06, 0xde}, - {0x07, 0x00}, - {0x08, 0x24}, - {0x09, 0x00}, - {0x0a, 0x00}, - {0x0b, 0x00}, - {0x0c, 0x06}, - {0x0d, 0x01}, - {0x0e, 0xe8}, - {0x0f, 0x02}, - {0x10, 0x88}, - {0x16, 0x00}, - {0x17, 0x14}, - {0x18, 0x1a}, - {0x19, 0x14}, - {0x1b, 0x48}, - {0x1e, 0x6b}, - {0x1f, 0x28}, - {0x20, 0x8b}, - {0x21, 0x49}, - {0x22, 0xb0}, - {0x23, 0x04}, - {0x24, 0x16}, - {0x34, 0x20}, - {0x26, 0x23}, - {0x28, 0xff}, - {0x29, 0x00}, - {0x33, 0x10}, - {0x37, 0x20}, - {0x47, 0x80}, - {0x4e, 0x66}, - {0xa8, 0x02}, - {0xa9, 0x80}, - {0x40, 0xdf}, - {0x41, 0x25}, - {0x42, 0xcf}, - {0x44, 0x02}, - {0x46, 0x06}, - {0x4a, 0x11}, - {0x4b, 0x01}, - {0x4c, 0x20}, - {0x4d, 0x05}, - {0x4f, 0x01}, - {0x50, 0x01}, - {0x55, 0x01}, - {0x56, 0xe0}, - {0x57, 0x02}, - {0x58, 0x80}, - {0x70, 0x70}, - {0x5a, 0x84}, - {0x5b, 0xc9}, - {0x5c, 0xed}, - {0x77, 0x74}, - {0x78, 0x40}, - {0x79, 0x5f}, - {0x80, 0x00}, - {0x82, 0x08}, - {0x83, 0x0b}, - {0x89, 0xf0}, - {0x8f, 0xaa}, - {0x90, 0x8c}, - {0x91, 0x90}, - {0x92, 0x03}, - {0x93, 0x03}, - {0x94, 0x05}, - {0x95, 0x65}, - {0x96, 0xf0}, - {0xfe, 0x00}, - {0x9a, 0x20}, - {0x9b, 0x80}, - {0x9c, 0x40}, - {0x9d, 0x80}, - {0xa1, 0x30}, - {0xa2, 0x32}, - {0xa4, 0x30}, - {0xa5, 0x30}, - {0xaa, 0x10}, - {0xac, 0x22}, - {0xad, 0x28}, - {0xbf, 0x06}, - {0xc0, 0x12}, - {0xc1, 0x28}, - {0xc2, 0x41}, - {0xc3, 0x5a}, - {0xc4, 0x6c}, - {0xc5, 0x7a}, - {0xc6, 0x96}, - {0xc7, 0xac}, - {0xc8, 0xbc}, - {0xc9, 0xc9}, - {0xca, 0xd3}, - {0xcb, 0xdd}, - {0xcc, 0xe5}, - {0xcd, 0xf1}, - {0xce, 0xfa}, - {0xcf, 0xff}, - {0xd0, 0x40}, - {0xd1, 0x30}, - {0xd2, 0x30}, - {0xd3, 0x40}, - {0xfe, 0x00}, - {0xd6, 0xf2}, - {0xd7, 0x1b}, - {0xdd, 0x72}, - {0xde, 0xe5}, - {0xe4, 0x86}, - {0xe5, 0x30}, - {0xfe, 0x01}, - {0x05, 0x30}, - {0x06, 0x75}, - {0x07, 0x40}, - {0x08, 0xb0}, - {0x0a, 0xc5}, - {0x0b, 0x11}, - {0x0c, 0x00}, - {0x12, 0x52}, - {0x13, 0x34}, - {0x18, 0x95}, - {0x19, 0x96}, - {0x1e, 0x41}, - {0x1f, 0x40}, - {0x20, 0x40}, - {0x25, 0x00}, - {0x26, 0x83}, - {0x27, 0x02}, - {0x28, 0x0c}, - {0x29, 0x03}, - {0x2a, 0x12}, - {0x2b, 0x04}, - {0x2c, 0x18}, - {0x2d, 0x0a}, - {0x2e, 0x3c}, - {0x3c, 0x20}, - {0x3e, 0x40}, - {0x3f, 0x57}, - {0x40, 0x7b}, - {0x03, 0x60}, - {0x44, 0x02}, - {0x1c, 0x91}, - {0x21, 0x15}, - {0x50, 0x80}, - {0x56, 0x04}, - {0x59, 0x08}, - {0x5b, 0x02}, - {0x61, 0x8d}, - {0x62, 0xa7}, - {0x63, 0xd0}, - {0x65, 0x06}, - {0x66, 0x06}, - {0x67, 0x84}, - {0x69, 0x08}, - {0x6a, 0x50}, - {0x6b, 0x01}, - {0x6c, 0x00}, - {0x6d, 0x02}, - {0x6e, 0xf0}, - {0x6f, 0x80}, - {0x78, 0xb8}, - {0x79, 0x75}, - {0x7a, 0x58}, - {0x7b, 0x60}, - {0x7c, 0x0c}, - {0x86, 0x00}, - {0x87, 0x00}, - {0x8b, 0x00}, - {0x8c, 0x00}, - {0x8a, 0x06}, - {0x8f, 0x00}, - {0x90, 0x00}, - {0x91, 0x00}, - {0x92, 0xed}, - {0x93, 0xd2}, - {0x95, 0x0e}, - {0x96, 0xed}, - {0x97, 0x38}, - {0x98, 0x0e}, - {0x9a, 0x38}, - {0x9b, 0x0e}, - {0x9c, 0x7d}, - {0x9d, 0x39}, - {0x9f, 0x00}, - {0xa0, 0x00}, - {0xa1, 0x00}, - {0xa2, 0x00}, - {0x86, 0x30}, - {0x87, 0x52}, - {0x88, 0x00}, - {0x89, 0x00}, - {0xa4, 0x00}, - {0xa5, 0x00}, - {0xa6, 0xbb}, - {0xa7, 0xa1}, - {0xa9, 0xbf}, - {0xaa, 0x98}, - {0xab, 0xa9}, - {0xac, 0x8a}, - {0xae, 0xbe}, - {0xaf, 0xa9}, - {0xb0, 0xc9}, - {0xb1, 0x90}, - {0xb3, 0x00}, - {0xb4, 0x00}, - {0xb5, 0x00}, - {0xb6, 0x00}, - {0x8b, 0xbe}, - {0x8c, 0x8a}, - {0x8d, 0x00}, - {0x8e, 0x00}, - {0x94, 0x50}, - {0x99, 0xa6}, - {0x9e, 0xaa}, - {0xa3, 0x00}, - {0x8a, 0x0a}, - {0xa8, 0x50}, - {0xad, 0x55}, - {0xb2, 0x55}, - {0xb7, 0x00}, - {0x8f, 0x05}, - {0xb8, 0xb8}, - {0xb9, 0xb1}, - {0xfe, 0x01}, - {0xd0, 0x38}, - {0xd1, 0xf7}, - {0xd2, 0x03}, - {0xd3, 0xf0}, - {0xd4, 0x40}, - {0xd5, 0xf5}, - {0xd6, 0x3f}, - {0xd7, 0xf8}, - {0xd8, 0x05}, - {0xd9, 0x08}, - {0xda, 0x38}, - {0xdb, 0xe9}, - {0xfe, 0x01}, - {0x76, 0x80}, - {0xc1, 0x3c}, - {0xc2, 0x50}, - {0xc3, 0x00}, - {0xc4, 0x68}, - {0xc5, 0x3a}, - {0xc6, 0x3a}, - {0xc7, 0x28}, - {0xc8, 0x18}, - {0xc9, 0x18}, - {0xdc, 0x20}, - {0xdd, 0x10}, - {0xdf, 0x00}, - {0xde, 0x00}, - {0x01, 0x10}, - {0x0b, 0x31}, - {0x0e, 0x50}, - {0x0f, 0x0f}, - {0x10, 0x6e}, - {0x12, 0xa0}, - {0x15, 0x60}, - {0x16, 0x60}, - {0x17, 0xe0}, - {0xcc, 0x10}, - {0xcd, 0x10}, - {0xce, 0xa0}, - {0xcf, 0xe0}, - {0x45, 0xf7}, - {0x46, 0xff}, - {0x47, 0x15}, - {0x48, 0x03}, - {0x4f, 0x60}, - {0xfe, 0x03}, - {0x01, 0x03}, - {0x02, 0x22}, - {0x03, 0x94}, - {0x04, 0x01}, - {0x05, 0x00}, - {0x06, 0x80}, - {0x10, 0x84}, - {0x11, 0x1e}, - {0x12, 0x00}, - {0x13, 0x05}, - {0x15, 0x10}, - {0x17, 0xf0}, - {0x21, 0x02}, - {0x22, 0x02}, - {0x23, 0x04}, - {0x24, 0x10}, - {0x29, 0x02}, - {0x2a, 0x04}, - {0xfe, 0x00}, -}; - -static struct msm_camera_i2c_reg_setting gc0310_recommend_setting[] = { - { - .reg_setting = gc0310_recommend_setting_list, - .size = ARRAY_SIZE(gc0310_recommend_setting_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info gc0310_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_start_settings_list[] = { - {0xfe, 0x03,}, - {0x10, 0x94,}, - {0xfe, 0x00,}, -}; - -static struct msm_camera_i2c_reg_setting gc0310_start_settings[] = { - { - .reg_setting = gc0310_start_settings_list, - .size = ARRAY_SIZE(gc0310_start_settings_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_array gc0310_stop_settings_list[] = { - {0xfe, 0x03,}, - {0x10, 0x84,}, - {0xfe, 0x00,}, -}; - -static struct msm_camera_i2c_reg_setting gc0310_stop_settings[] = { - { - .reg_setting = gc0310_stop_settings_list, - .size = ARRAY_SIZE(gc0310_stop_settings_list), - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BYTE_DATA, - .delay = 0, - }, -}; - -static const struct i2c_device_id gc0310_i2c_id[] = { - {GC0310_SENSOR_NAME, (kernel_ulong_t)&gc0310_s_ctrl}, - { } -}; - -static int32_t msm_gc0310_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0310_s_ctrl); -} - -static struct i2c_driver gc0310_i2c_driver = { - .id_table = gc0310_i2c_id, - .probe = msm_gc0310_i2c_probe, - .driver = { - .name = GC0310_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0310_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id gc0310_dt_match[] = { - {.compatible = "shinetech,gc0310", .data = &gc0310_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0310_dt_match); - -static int32_t gc0310_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(gc0310_dt_match, &pdev->dev); - if (!match) - return -EFAULT; - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver gc0310_platform_driver = { - .driver = { - .name = "shinetech,gc0310", - .owner = THIS_MODULE, - .of_match_table = gc0310_dt_match, - }, - .probe = gc0310_platform_probe, -}; - -static int __init gc0310_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = i2c_add_driver(&gc0310_i2c_driver); - if (!rc) - return rc; - pr_err("%s:%d rc \n", __func__, __LINE__); - return platform_driver_register(&gc0310_platform_driver); -} - -static void __exit gc0310_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (gc0310_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0310_s_ctrl); - platform_driver_unregister(&gc0310_platform_driver); - } else - i2c_del_driver(&gc0310_i2c_driver); - return; -} - -int32_t gc0310_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - pr_err("%s:%d res =%d\n gc0310_recommend_setting ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_stop_settings); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_start_settings); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - pr_err("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info *sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - sensor_slave_info = kmalloc(sizeof(struct msm_camera_sensor_slave_info) - * 1, GFP_KERNEL); - - if (!sensor_slave_info) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - if (copy_from_user(sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info->slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info->slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info->addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info->power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info->power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size || - conf_array.size > I2C_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size || - conf_array.size > I2C_SEQ_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_COMPAT -int32_t gc0310_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_recommend_setting); - pr_err("%s:%d res =%d\n gc0310_recommend_setting ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_stop_settings); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_table( - s_ctrl->sensor_i2c_client, gc0310_start_settings); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - pr_err("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info *sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - sensor_slave_info = kmalloc(sizeof(struct msm_camera_sensor_slave_info) - * 1, GFP_KERNEL); - - if (!sensor_slave_info) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - if (copy_from_user(sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info->slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info->slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info->addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info->power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info->power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size || - conf_array.size > I2C_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size || - conf_array.size > I2C_SEQ_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} -#endif - -static struct msm_sensor_fn_t gc0310_sensor_func_tbl = { - .sensor_config = gc0310_sensor_config, -#ifdef CONFIG_COMPAT - .sensor_config32 = gc0310_sensor_config32, -#endif - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t gc0310_s_ctrl = { - .sensor_i2c_client = &gc0310_sensor_i2c_client, - .power_setting_array.power_setting = gc0310_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0310_power_setting), - .msm_sensor_mutex = &gc0310_mut, - .sensor_v4l2_subdev_info = gc0310_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0310_subdev_info), - .func_tbl = &gc0310_sensor_func_tbl, -}; - -module_init(gc0310_init_module); -module_exit(gc0310_exit_module); -MODULE_DESCRIPTION("Aptina 0.3MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0339.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0339.c deleted file mode 100644 index bada8365fc4c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/gc0339.c +++ /dev/null @@ -1,704 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" - - -#define GC0339_SENSOR_NAME "gc0339" -DEFINE_MSM_MUTEX(gc0339_mut); - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl; - -static struct msm_sensor_power_setting gc0339_power_setting[] = { - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info gc0339_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_gc0339_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &gc0339_s_ctrl); -} - -static const struct i2c_device_id gc0339_i2c_id[] = { - {GC0339_SENSOR_NAME, (kernel_ulong_t)&gc0339_s_ctrl}, - { } -}; - -static struct i2c_driver gc0339_i2c_driver = { - .id_table = gc0339_i2c_id, - .probe = msm_gc0339_i2c_probe, - .driver = { - .name = GC0339_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client gc0339_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -int32_t gc0339_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - gpio_conf->cam_gpiomux_conf_tbl, - gpio_conf->cam_gpiomux_conf_tbl_size); - } - - rc = msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) { - pr_err("%s: request gpio failed\n", __func__); - return rc; - } - for (index = 0; index < power_setting_array->size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= - power_info->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - power_info->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - power_info->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - pr_debug("%s:%d gpio set val %d\n", __func__, __LINE__, - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x10, MSM_CAMERA_I2C_BYTE_DATA); - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) { - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - goto power_up_failed; - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - return rc; -} - -int32_t gc0339_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t index = 0; - struct msm_sensor_power_setting_array *power_setting_array = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_camera_sensor_board_info *data = s_ctrl->sensordata; - struct msm_camera_power_ctrl_t *power_info = &data->power_info; - struct msm_camera_gpio_conf *gpio_conf = power_info->gpio_conf; - - CDBG("%s:%d\n", __func__, __LINE__); - power_setting_array = &s_ctrl->power_setting_array; - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_util( - s_ctrl->sensor_i2c_client, MSM_CCI_RELEASE); - } - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0xfc, - 0x01, MSM_CAMERA_I2C_BYTE_DATA); - - for (index = (power_setting_array->size - 1); index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &power_setting_array->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - msm_cam_clk_enable(power_info->dev, - &power_info->clk_info[0], - (struct clk **)&power_setting->data[0], - power_info->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]) - gpio_set_value_cansleep( - gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - continue; - } - msm_camera_config_single_vreg(power_info->dev, - &power_info->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } - } - msm_camera_request_gpio_table( - gpio_conf->cam_gpio_req_tbl, - gpio_conf->cam_gpio_req_tbl_size, 0); - CDBG("%s exit\n", __func__); - return 0; -} - -int32_t gc0339_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.addr_type == MSM_CAMERA_I2C_WORD_ADDR - || conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA - || !conf_array.size) - break; - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static struct msm_sensor_fn_t gc0339_sensor_fn_t = { - .sensor_power_up = gc0339_power_up, - .sensor_power_down = gc0339_power_down, - .sensor_match_id = gc0339_match_id, - .sensor_config = gc0339_config, -}; - - -static struct msm_sensor_ctrl_t gc0339_s_ctrl = { - .sensor_i2c_client = &gc0339_sensor_i2c_client, - .power_setting_array.power_setting = gc0339_power_setting, - .power_setting_array.size = ARRAY_SIZE(gc0339_power_setting), - .msm_sensor_mutex = &gc0339_mut, - .sensor_v4l2_subdev_info = gc0339_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(gc0339_subdev_info), - .func_tbl = &gc0339_sensor_fn_t, -}; - -static const struct of_device_id gc0339_dt_match[] = { - {.compatible = "shinetech,gc0339", .data = &gc0339_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, gc0339_dt_match); - -static struct platform_driver gc0339_platform_driver = { - .driver = { - .name = "shinetech,gc0339", - .owner = THIS_MODULE, - .of_match_table = gc0339_dt_match, - }, -}; - -static int32_t gc0339_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(gc0339_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init gc0339_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&gc0339_platform_driver, - gc0339_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&gc0339_i2c_driver); -} - -static void __exit gc0339_exit_module(void) -{ - if (gc0339_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&gc0339_s_ctrl); - platform_driver_unregister(&gc0339_platform_driver); - } else - i2c_del_driver(&gc0339_i2c_driver); - return; -} - -module_init(gc0339_init_module); -module_exit(gc0339_exit_module); -MODULE_DESCRIPTION("gc0339"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/hi256.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/hi256.c deleted file mode 100644 index d19f11344230..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/hi256.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define HI256_SENSOR_NAME "hi256" -#define PLATFORM_DRIVER_NAME "msm_camera_hi256" - -//#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(hi256_mut); -static struct msm_sensor_ctrl_t hi256_s_ctrl; - -static struct msm_sensor_power_setting hi256_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_uxga_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x0a}, - {0x22, 0x00}, - {0x23, 0x0a}, - {0x40, 0x01}, - {0x41, 0x68}, - {0x42, 0x00}, - {0x43, 0x12}, - {0x03, 0x10}, - {0x3f, 0x00}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0xfd}, - {0x03, 0x00}, - {0x10, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x0c}, - {0x31, 0x80}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_start_settings[] = { - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf hi256_stop_settings[] = { - {0x03, 0x00}, - {0x01, 0xf1}, -}; - -static struct msm_camera_i2c_reg_conf hi256_recommend_settings[] = { - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - - {0x08, 0x0f}, - {0x0a, 0x00}, - - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - - {0x03, 0x00}, - {0x10, 0x13}, - {0x11, 0x90}, /* no H/V flip */ - {0x12, 0x00}, - {0x0b, 0xaa}, - {0x0c, 0xaa}, - {0x0d, 0xaa}, - {0x20, 0x00}, - {0x21, 0x06}, - {0x22, 0x00}, - {0x23, 0x05}, - {0x24, 0x04}, - {0x25, 0xb0}, - {0x26, 0x06}, - {0x27, 0x40}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x45, 0x04}, - {0x46, 0x18}, - {0x47, 0xd8}, - {0x80, 0x2e}, - {0x81, 0x7e}, - {0x82, 0x90}, - {0x83, 0x00}, - {0x84, 0x0c}, - {0x85, 0x00}, - {0x90, 0x0c}, - {0x91, 0x0c}, - {0x92, 0x78}, - {0x93, 0x70}, - {0x94, 0xff}, - {0x95, 0xff}, - {0x96, 0xdc}, - {0x97, 0xfe}, - {0x98, 0x38}, - {0xa0, 0x45}, - {0xa2, 0x45}, - {0xa4, 0x45}, - {0xa6, 0x45}, - {0xa8, 0x45}, - {0xaa, 0x45}, - {0xac, 0x45}, - {0xae, 0x45}, - {0x99, 0x43}, - {0x9a, 0x43}, - {0x9b, 0x43}, - {0x9c, 0x43}, - {0x03, 0x02}, - {0x12, 0x03}, - {0x13, 0x03}, - {0x15, 0x00}, - {0x16, 0x00}, - {0x17, 0x8C}, - {0x18, 0x4c}, - {0x19, 0x00}, - {0x1a, 0x39}, - {0x1c, 0x09}, - {0x1d, 0x40}, - {0x1e, 0x30}, - {0x1f, 0x10}, - {0x20, 0x77}, - {0x21, 0x6d}, - {0x22, 0x77}, - {0x23, 0x30}, - {0x24, 0x77}, - {0x27, 0x3c}, - {0x2b, 0x80}, - {0x2e, 0x00}, - {0x2f, 0x00}, - {0x30, 0x05}, - {0x50, 0x20}, - {0x52, 0x01}, - {0x53, 0xc1}, - {0x55, 0x1c}, - {0x56, 0x11}, - {0x58, 0x22}, - {0x59, 0x20}, - {0x5d, 0xa2}, - {0x5e, 0x5a}, - {0x60, 0x87}, - {0x61, 0x99}, - {0x62, 0x88}, - {0x63, 0x97}, - {0x64, 0x88}, - {0x65, 0x97}, - {0x67, 0x0c}, - {0x68, 0x0c}, - {0x69, 0x0c}, - {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}, - {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}, - {0xd4, 0x0c}, - {0xd5, 0x0c}, - {0xd6, 0x78}, - {0xd7, 0x70}, - {0xe0, 0xc4}, - {0xe1, 0xc4}, - {0xe2, 0xc4}, - {0xe3, 0xc4}, - {0xe4, 0x00}, - {0xe8, 0x80}, - {0xe9, 0x40}, - {0xea, 0x7f}, - {0xf0, 0xc1}, - {0xf1, 0xc1}, - {0xf2, 0xc1}, - {0xf3, 0xc1}, - {0xf4, 0xc1}, - {0x03, 0x03}, - {0x10, 0x10}, - {0x03, 0x10}, - {0x10, 0x03}, - {0x12, 0x30}, - {0x13, 0x02}, - {0x20, 0x00}, - {0x30, 0x00}, - {0x31, 0x00}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x30}, - {0x35, 0x00}, - {0x36, 0x00}, - {0x38, 0x00}, - {0x3e, 0x58}, - {0x3f, 0x00}, - {0x40, 0x80}, - {0x41, 0x00}, - {0x48, 0x95}, - {0x60, 0x67}, - {0x61, 0x88}, - {0x62, 0x90}, - {0x63, 0x50}, - {0x64, 0x41}, - {0x66, 0x42}, - {0x67, 0x20}, - {0x6a, 0x71}, - {0x6b, 0x84}, - {0x6c, 0x72}, - {0x6d, 0x83}, - {0x03, 0x11}, - {0x10, 0x7f}, - {0x11, 0x40}, - {0x12, 0x0a}, - {0x13, 0xbb}, - {0x26, 0x31}, - {0x27, 0x34}, - {0x28, 0x0f}, - {0x29, 0x10}, - {0x2b, 0x30}, - {0x2c, 0x32}, - {0x30, 0x70}, - {0x31, 0x10}, - {0x32, 0x58}, - {0x33, 0x09}, - {0x34, 0x06}, - {0x35, 0x03}, - {0x36, 0x70}, - {0x37, 0x18}, - {0x38, 0x58}, - {0x39, 0x09}, - {0x3a, 0x06}, - {0x3b, 0x03}, - {0x3c, 0x80}, - {0x3d, 0x18}, - {0x3e, 0x80}, - {0x3f, 0x0c}, - {0x40, 0x05}, - {0x41, 0x06}, - {0x42, 0x80}, - {0x43, 0x18}, - {0x44, 0x80}, - {0x45, 0x0c}, - {0x46, 0x05}, - {0x47, 0x06}, - {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, 0x18}, - {0x5b, 0x00}, - {0x5c, 0x00}, - {0x60, 0x3f}, - {0x62, 0x60}, - {0x70, 0x06}, - {0x03, 0x12}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x25, 0x00}, - {0x28, 0x00}, - {0x29, 0x00}, - {0x2a, 0x00}, - {0x30, 0x50}, - {0x31, 0x18}, - {0x32, 0x32}, - {0x33, 0x40}, - {0x34, 0x50}, - {0x35, 0x70}, - {0x36, 0xa0}, - {0x40, 0xa0}, - {0x41, 0x40}, - {0x42, 0xa0}, - {0x43, 0x90}, - {0x44, 0x90}, - {0x45, 0x80}, - {0x46, 0xb0}, - {0x47, 0x55}, - {0x48, 0xa0}, - {0x49, 0x90}, - {0x4a, 0x90}, - {0x4b, 0x80}, - {0x4c, 0xb0}, - {0x4d, 0x40}, - {0x4e, 0x90}, - {0x4f, 0x60}, - {0x50, 0xa0}, - {0x51, 0x80}, - {0x52, 0xb0}, - {0x53, 0x40}, - {0x54, 0x90}, - {0x55, 0x60}, - {0x56, 0xa0}, - {0x57, 0x80}, - {0x58, 0x90}, - {0x59, 0x40}, - {0x5a, 0xd0}, - {0x5b, 0xd0}, - {0x5c, 0xe0}, - {0x5d, 0x80}, - {0x5e, 0x88}, - {0x5f, 0x40}, - {0x60, 0xe0}, - {0x61, 0xe0}, - {0x62, 0xe0}, - {0x63, 0x80}, - {0x70, 0x15}, - {0x71, 0x01}, - {0x72, 0x18}, - {0x73, 0x01}, - {0x74, 0x25}, - {0x75, 0x15}, - {0x80, 0x20}, - {0x81, 0x40}, - {0x82, 0x65}, - {0x85, 0x1a}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x90, 0x5d}, - {0xD0, 0x0c}, - {0xD1, 0x80}, - {0xD2, 0x17}, - {0xD3, 0x00}, - {0xD4, 0x00}, - {0xD5, 0x0f}, - {0xD6, 0xff}, - {0xD7, 0xff}, - {0x3b, 0x06}, - {0x3c, 0x06}, - {0xc5, 0x00}, - {0xc6, 0x00}, - {0x03, 0x13}, - {0x10, 0xcb}, - {0x11, 0x7b}, - {0x12, 0x07}, - {0x14, 0x00}, - {0x20, 0x15}, - {0x21, 0x13}, - {0x22, 0x33}, - {0x23, 0x05}, - {0x24, 0x09}, - {0x25, 0x0a}, - {0x26, 0x18}, - {0x27, 0x30}, - {0x29, 0x12}, - {0x2a, 0x50}, - {0x2b, 0x02}, - {0x2c, 0x02}, - {0x25, 0x06}, - {0x2d, 0x0c}, - {0x2e, 0x12}, - {0x2f, 0x12}, - {0x50, 0x10}, - {0x51, 0x14}, - {0x52, 0x12}, - {0x53, 0x0c}, - {0x54, 0x0f}, - {0x55, 0x0c}, - {0x56, 0x10}, - {0x57, 0x13}, - {0x58, 0x12}, - {0x59, 0x0c}, - {0x5a, 0x0f}, - {0x5b, 0x0c}, - {0x5c, 0x25}, - {0x5d, 0x25}, - {0x5e, 0x25}, - {0x5f, 0x25}, - {0x60, 0x25}, - {0x61, 0x25}, - {0x62, 0x25}, - {0x63, 0x25}, - {0x64, 0x25}, - {0x65, 0x25}, - {0x66, 0x25}, - {0x67, 0x25}, - {0x68, 0x07}, - {0x69, 0x07}, - {0x6a, 0x07}, - {0x6b, 0x05}, - {0x6c, 0x05}, - {0x6d, 0x05}, - {0x6e, 0x07}, - {0x6f, 0x07}, - {0x70, 0x07}, - {0x71, 0x05}, - {0x72, 0x05}, - {0x73, 0x05}, - {0x80, 0x01}, - {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}, - {0x03, 0x14}, - {0x10, 0x11}, - {0x14, 0x80}, - {0x15, 0x80}, - {0x16, 0x80}, - {0x17, 0x80}, - {0x18, 0x80}, - {0x19, 0x80}, - {0x20, 0x80}, - {0x21, 0x80}, - {0x22, 0x80}, - {0x23, 0x80}, - {0x24, 0x80}, - {0x30, 0xc8}, - {0x31, 0x2b}, - {0x32, 0x00}, - {0x33, 0x00}, - {0x34, 0x90}, - {0x40, 0x32}, - {0x50, 0x21}, - {0x60, 0x19}, - {0x70, 0x21}, - {0x03, 0x15}, - {0x10, 0x0f}, - {0x14, 0x46}, - {0x15, 0x36}, - {0x16, 0x26}, - {0x17, 0x2f}, - {0x30, 0x8f}, - {0x31, 0x59}, - {0x32, 0x0a}, - {0x33, 0x15}, - {0x34, 0x5b}, - {0x35, 0x06}, - {0x36, 0x07}, - {0x37, 0x40}, - {0x38, 0x87}, - {0x40, 0x94}, - {0x41, 0x20}, - {0x42, 0x89}, - {0x43, 0x84}, - {0x44, 0x03}, - {0x45, 0x01}, - {0x46, 0x88}, - {0x47, 0x9c}, - {0x48, 0x28}, - {0x50, 0x02}, - {0x51, 0x82}, - {0x52, 0x00}, - {0x53, 0x07}, - {0x54, 0x11}, - {0x55, 0x98}, - {0x56, 0x00}, - {0x57, 0x0b}, - {0x58, 0x8b}, - {0x80, 0x03}, - {0x85, 0x40}, - {0x87, 0x02}, - {0x88, 0x00}, - {0x89, 0x00}, - {0x8a, 0x00}, - {0x03, 0x16}, - {0x10, 0x31}, - {0x18, 0x5e}, - {0x19, 0x5d}, - {0x1a, 0x0e}, - {0x1b, 0x01}, - {0x1c, 0xdc}, - {0x1d, 0xfe}, - {0x30, 0x00}, - {0x31, 0x0a}, - {0x32, 0x1f}, - {0x33, 0x33}, - {0x34, 0x53}, - {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}, - {0x50, 0x00}, - {0x51, 0x08}, - {0x52, 0x1e}, - {0x53, 0x36}, - {0x54, 0x5a}, - {0x55, 0x75}, - {0x56, 0x8d}, - {0x57, 0xa1}, - {0x58, 0xb2}, - {0x59, 0xbe}, - {0x5a, 0xc9}, - {0x5b, 0xd2}, - {0x5c, 0xdb}, - {0x5d, 0xe3}, - {0x5e, 0xeb}, - {0x5f, 0xf0}, - {0x60, 0xf5}, - {0x61, 0xf7}, - {0x62, 0xf8}, - {0x70, 0x00}, - {0x71, 0x08}, - {0x72, 0x17}, - {0x73, 0x2f}, - {0x74, 0x53}, - {0x75, 0x6c}, - {0x76, 0x81}, - {0x77, 0x94}, - {0x78, 0xa4}, - {0x79, 0xb3}, - {0x7a, 0xc0}, - {0x7b, 0xcb}, - {0x7c, 0xd5}, - {0x7d, 0xde}, - {0x7e, 0xe6}, - {0x7f, 0xee}, - {0x80, 0xf4}, - {0x81, 0xfa}, - {0x82, 0xff}, - {0x03, 0x17}, - {0x10, 0xf7}, - {0xC4, 0x66}, - {0xC5, 0x55}, - {0x03, 0x20}, - {0x11, 0x1c}, - {0x18, 0x30}, - {0x1a, 0x08}, - {0x20, 0x05}, - {0x21, 0x30}, - {0x22, 0x10}, - {0x23, 0x00}, - {0x24, 0x00}, - {0x28, 0xe7}, - {0x29, 0x0d}, - {0x2a, 0xf0}, - {0x2b, 0x34}, - {0x30, 0x78}, - {0x2c, 0xc2}, - {0x2d, 0xff}, - {0x2e, 0x33}, - {0x30, 0x78}, - {0x32, 0x03}, - {0x33, 0x2e}, - {0x34, 0x30}, - {0x35, 0xd4}, - {0x36, 0xfe}, - {0x37, 0x32}, - {0x38, 0x04}, - {0x39, 0x22}, - {0x3a, 0xde}, - {0x3b, 0x22}, - {0x3c, 0xde}, - {0x50, 0x45}, - {0x51, 0x88}, - {0x56, 0x03}, - {0x57, 0xf7}, - {0x58, 0x14}, - {0x59, 0x88}, - {0x5a, 0x04}, - {0x60, 0xaa}, - {0x61, 0xaa}, - {0x62, 0xaa}, - {0x63, 0xaa}, - {0x64, 0xaa}, - {0x65, 0xaa}, - {0x66, 0xab}, - {0x67, 0xEa}, - {0x68, 0xab}, - {0x69, 0xEa}, - {0x6a, 0xaa}, - {0x6b, 0xaa}, - {0x6c, 0xaa}, - {0x6d, 0xaa}, - {0x6e, 0xaa}, - {0x6f, 0xaa}, - {0x70, 0x76}, - {0x71, 0x80}, - {0x76, 0x43}, - {0x77, 0x04}, - {0x78, 0x23}, - {0x79, 0x46}, - {0x7a, 0x23}, - {0x7b, 0x22}, - {0x7d, 0x23}, - {0x83, 0x01}, - {0x84, 0x5f}, - {0x85, 0x90}, - {0x86, 0x01}, - {0x87, 0x2c}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x8B, 0x75}, - {0x8C, 0x30}, - {0x8D, 0x61}, - {0x8E, 0x44}, - {0x9c, 0x08}, - {0x9d, 0x34}, - {0x9e, 0x01}, - {0x9f, 0x2c}, - {0xb0, 0x18}, - {0xb1, 0x14}, - {0xb2, 0x80}, - {0xb3, 0x18}, - {0xb4, 0x1a}, - {0xb5, 0x44}, - {0xb6, 0x2f}, - {0xb7, 0x28}, - {0xb8, 0x25}, - {0xb9, 0x22}, - {0xba, 0x21}, - {0xbb, 0x20}, - {0xbc, 0x32}, - {0xbd, 0x30}, - {0xc0, 0x10}, - {0xc1, 0x2b}, - {0xc2, 0x2b}, - {0xc3, 0x2b}, - {0xc4, 0x08}, - {0xc8, 0x40}, - {0xc9, 0x40}, - {0x03, 0x22}, - {0x10, 0xfd}, - {0x11, 0x2e}, - {0x19, 0x01}, - {0x20, 0x10}, - {0x21, 0x80}, - {0x24, 0x01}, - {0x30, 0x80}, - {0x31, 0x80}, - {0x38, 0x11}, - {0x39, 0x34}, - {0x40, 0xfa}, - {0x41, 0x44}, - {0x42, 0x43}, - {0x43, 0xf6}, - {0x44, 0x44}, - {0x45, 0x33}, - {0x46, 0x00}, - {0x50, 0xb2}, - {0x51, 0x81}, - {0x52, 0x98}, - {0x80, 0x38}, - {0x81, 0x20}, - {0x82, 0x38}, - {0x83, 0x5e}, - {0x84, 0x18}, - {0x85, 0x58}, - {0x86, 0x20}, - {0x87, 0x49}, - {0x88, 0x33}, - {0x89, 0x37}, - {0x8a, 0x2a}, - {0x8b, 0x41}, - {0x8c, 0x39}, - {0x8d, 0x34}, - {0x8e, 0x29}, - {0x8f, 0x53}, - {0x90, 0x52}, - {0x91, 0x51}, - {0x92, 0x4e}, - {0x93, 0x46}, - {0x94, 0x3d}, - {0x95, 0x34}, - {0x96, 0x2e}, - {0x97, 0x29}, - {0x98, 0x22}, - {0x99, 0x1c}, - {0x9a, 0x18}, - {0x9b, 0x77}, - {0x9c, 0x77}, - {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}, - {0xb4, 0xea}, - {0xb8, 0xa0}, - {0xb9, 0x00}, - {0x03, 0x48}, - {0x70, 0x03}, - {0x71, 0x30}, - {0x72, 0x81}, - {0x73, 0x10}, - {0x70, 0x85}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x03, 0x48}, - {0x70, 0x95}, - {0x10, 0x1c}, - {0x11, 0x10}, - {0x12, 0x00}, - {0x14, 0x00}, - {0x16, 0x04}, - {0x18, 0x80}, - {0x19, 0x00}, - {0x1a, 0xa0}, - {0x1b, 0x0d}, - {0x1c, 0x01}, - {0x1d, 0x0a}, - {0x1e, 0x07}, - {0x1f, 0x0b}, - {0x23, 0x01}, - {0x24, 0x1e}, - {0x25, 0x00}, - {0x26, 0x00}, - {0x27, 0x08}, - {0x28, 0x00}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x32, 0x13}, - {0x33, 0x0c}, - {0x34, 0x04}, - {0x35, 0x06}, - {0x36, 0x01}, - {0x37, 0x06}, - {0x39, 0x4f}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x03, 0x00}, - {0x0e, 0x03}, - {0x0e, 0x73}, - {0x03, 0x00}, - {0x01, 0xf0}, -}; - -static struct v4l2_subdev_info hi256_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf hi256_svga_settings[] = { - {0x03, 0x20}, - {0x10, 0x1c}, - {0x03, 0x22}, - {0x10, 0x69}, - {0x03, 0x00}, - {0x10, 0x13}, - {0x12, 0x00}, - {0x20, 0x00}, - {0x21, 0x04}, - {0x22, 0x00}, - {0x23, 0x07}, - {0x40, 0x01}, - {0x41, 0x78}, - {0x42, 0x00}, - {0x43, 0x14}, - {0x03, 0x10}, - {0x3f, 0x02}, - {0x03, 0x12}, - {0x20, 0x0f}, - {0x21, 0x0f}, - {0x90, 0x5d}, - {0x03, 0x13}, - {0x80, 0x00}, - {0x03, 0x48}, - {0x72, 0x81}, - {0x30, 0x06}, - {0x31, 0x40}, - {0x03, 0x20}, - {0x88, 0x01}, - {0x89, 0x5f}, - {0x8a, 0x90}, - {0x03, 0x20}, - {0x10, 0x9c}, - {0x03, 0x22}, - {0x10, 0xe9}, -}; - -static struct msm_camera_i2c_reg_conf hi256_sleep_settings[] = { - - {0x03, 0x00}, - {0x01, 0xf1}, - {0x03, 0x02}, - {0x55, 0x10}, - - {0x01, 0xf1}, - {0x01, 0xf3}, - {0x01, 0xf1}, - -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_saturation[11][3] = { - { - {0x03, 0x10}, - {0x61, 0x1c}, - {0x62, 0x1c}, - }, - { - {0x03, 0x10}, - {0x61, 0x30}, - {0x62, 0x30}, - }, - { - {0x03, 0x10}, - {0x61, 0x44}, - {0x62, 0x44}, - }, - { - {0x03, 0x10}, - {0x61, 0x58}, - {0x62, 0x58}, - }, - { - {0x03, 0x10}, - {0x61, 0x6c}, - {0x62, 0x6c}, - }, - { - {0x03, 0x10}, - {0x61, 0x80}, - {0x62, 0x80}, - }, - { - {0x03, 0x10}, - {0x61, 0x94}, - {0x62, 0x94}, - }, - { - {0x03, 0x10}, - {0x61, 0xa8}, - {0x62, 0xa8}, - }, - { - {0x03, 0x10}, - {0x61, 0xbc}, - {0x62, 0xbc}, - }, - { - {0x03, 0x10}, - {0x61, 0xd0}, - {0x62, 0xd0}, - }, - { - {0x03, 0x10}, - {0x61, 0xe4}, - {0x62, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_contrast[11][3] = { - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x1c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x30}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x44}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x58}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x6c}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x80}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0x94}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xa8}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xbc}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xd0}, - }, - { - {0x03, 0x10}, - {0x13, 0x02}, - {0x48, 0xe4}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_sharpness[7][9] = { - { - {0x03, 0x13}, - {0x20, 0x00}, - {0x21, 0x00}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x00}, - {0x91, 0x00}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 0*/ - { - {0x03, 0x13}, - {0x20, 0x04}, - {0x21, 0x03}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x08}, - {0x91, 0x08}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 1*/ - { - {0x03, 0x13}, - {0x20, 0x08}, - {0x21, 0x07}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0x32}, - {0x91, 0x32}, - {0x94, 0x04}, - {0x95, 0x0a}, - }, /* SHARPNESS LEVEL 2*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x09}, - {0x24, 0x11}, - {0x90, 0x05}, - {0x91, 0x05}, - {0x94, 0x10}, - {0x95, 0x5a}, - }, /* SHARPNESS LEVEL 3*/ - { - {0x03, 0x13}, - {0x20, 0x15}, - {0x21, 0x15}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xaf}, - {0x91, 0xaf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 4*/ - { - {0x03, 0x13}, - {0x20, 0x20}, - {0x21, 0x20}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xdf}, - {0x91, 0xdf}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 5*/ - { - {0x03, 0x13}, - {0x20, 0x25}, - {0x21, 0x25}, - {0x23, 0x04}, - {0x24, 0x80}, - {0x90, 0xff}, - {0x91, 0xff}, - {0x94, 0x24}, - {0x95, 0x65}, - }, /* SHARPNESS LEVEL 6*/ -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_iso[7][3] = { - /* auto */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* auto hjt */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - {0xb0, 0x18}, - }, - /* iso 100 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x1B}, - }, - /* iso 200 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x35}, - }, - /* iso 400 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x65}, - }, - /* iso 800 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0x95}, - }, - /* iso 1600 */ - { - {0x03, 0x20}, - {0x10, 0x0c}, - {0xb0, 0xd0}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_exposure_compensation[5][2] = { - /* -2 */ - { - {0x03, 0x10}, - {0x40, 0xa4}, - }, - /* -1 */ - { - {0x03, 0x10}, - {0x40, 0x94}, - }, - /* 0 */ - { - {0x03, 0x10}, - {0x40, 0x80}, - }, - /* 1 */ - { - {0x03, 0x10}, - {0x40, 0x14}, - }, - /* 2 */ - { - {0x03, 0x10}, - {0x40, 0x24}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_antibanding[][2] = { - /* OFF */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, - /* 50Hz */ - { - {0x03, 0x20}, - {0x10, 0x9c}, - }, - /* 60Hz */ - { - {0x03, 0x20}, - {0x10, 0x8c}, - }, - /* AUTO */ - { - {0x03, 0x20}, - {0x10, 0xcc}, - }, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_normal[] = { - /* normal: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0X30}, - {0x13, 0x0a}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_black_white[] = { - /* B&W: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x02}, - {0x44, 0x80}, - {0x45, 0x80}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_negative[] = { - /* Negative: */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x08}, - {0x13, 0x0a}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_old_movie[] = { - /* Sepia(antique): */ - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x03}, - {0x12, 0x33}, - {0x13, 0x0a}, - {0x44, 0x25}, - {0x45, 0xa6}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_effect_solarize[] = { - {0x03, 0x20}, - {0x28, 0xe7}, - {0x03, 0x10}, - {0x11, 0x0b}, - {0x12, 0x00}, - {0x13, 0x00}, - {0x14, 0x00}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_auto[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_portrait[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_landscape[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x05}, - {0x89, 0x7e}, - {0x8a, 0x40}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_scene_night[] = { - /* */ - {0x03, 0x20}, - {0x10, 0x1c}, - {0x18, 0x38}, - {0x88, 0x09}, - {0x89, 0x27}, - {0x8a, 0xc0}, - {0x10, 0x9c}, - {0x18, 0x30}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_auto[] = { - /* Auto: */ - {0x03, 0x22}, - {0x11, 0x2e}, - {0x83, 0x60}, - {0x84, 0x0a}, - {0x85, 0x60}, - {0x86, 0x15}, - {0x10, 0xfd}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_sunny[] = { - /* Sunny: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x33}, - {0x82, 0x3d}, - {0x83, 0x2e}, - {0x84, 0x24}, - {0x85, 0x43}, - {0x86, 0x3d}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_cloudy[] = { - /* Cloudy: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x49}, - {0x82, 0x24}, - {0x83, 0x50}, - {0x84, 0x45}, - {0x85, 0x24}, - {0x86, 0x1E}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_office[] = { - /* Office: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x20}, - {0x82, 0x58}, - {0x83, 0x27}, - {0x84, 0x22}, - {0x85, 0x58}, - {0x86, 0x52}, -}; - -static struct msm_camera_i2c_reg_conf HI256_reg_wb_home[] = { - /* Home: */ - {0x03, 0x22}, - {0x11, 0x28}, - {0x80, 0x29}, - {0x82, 0x54}, - {0x83, 0x2e}, - {0x84, 0x23}, - {0x85, 0x58}, - {0x86, 0x4f}, -}; - - -static const struct i2c_device_id hi256_i2c_id[] = { - {HI256_SENSOR_NAME, (kernel_ulong_t)&hi256_s_ctrl}, - { } -}; - -static int32_t msm_hi256_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &hi256_s_ctrl); -} - -static struct i2c_driver hi256_i2c_driver = { - .id_table = hi256_i2c_id, - .probe = msm_hi256_i2c_probe, - .driver = { - .name = HI256_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client hi256_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, -}; - -static const struct of_device_id hi256_dt_match[] = { - {.compatible = "shinetech,hi256", .data = &hi256_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, hi256_dt_match); - -static struct platform_driver hi256_platform_driver = { - .driver = { - .name = "shinetech,hi256", - .owner = THIS_MODULE, - .of_match_table = hi256_dt_match, - }, -}; - -static void hi256_i2c_write_table(struct msm_sensor_ctrl_t *s_ctrl, - struct msm_camera_i2c_reg_conf *table, - int num) -{ - int i = 0; - int rc = 0; - for (i = 0; i < num; ++i) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - msleep(100); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write( - s_ctrl->sensor_i2c_client, table->reg_addr, - table->reg_data, - MSM_CAMERA_I2C_BYTE_DATA); - } - table++; - } -} - -static int32_t hi256_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - hi256_i2c_write_table(s_ctrl, &hi256_sleep_settings[0], - ARRAY_SIZE(hi256_sleep_settings)); - return msm_sensor_power_down(s_ctrl); -} - -static int32_t hi256_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(hi256_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init hi256_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&hi256_platform_driver, - hi256_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&hi256_i2c_driver); -} - -static void __exit hi256_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (hi256_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&hi256_s_ctrl); - platform_driver_unregister(&hi256_platform_driver); - } else - i2c_del_driver(&hi256_i2c_driver); - return; -} - -static int32_t hi256_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: hi256 read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != s_ctrl->sensordata->slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - return rc; -} - -static void hi256_set_stauration(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_saturation[value][0], - ARRAY_SIZE(HI256_reg_saturation[value])); -} - -static void hi256_set_contrast(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_contrast[value][0], - ARRAY_SIZE(HI256_reg_contrast[value])); -} - -static void hi256_set_sharpness(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - int val = value / 6; - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_sharpness[val][0], - ARRAY_SIZE(HI256_reg_sharpness[val])); -} - - -static void hi256_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_iso[value][0], - ARRAY_SIZE(HI256_reg_iso[value])); -} - -static void hi256_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - int val = (value + 12) / 6; - pr_debug("%s %d", __func__, val); - hi256_i2c_write_table(s_ctrl, &HI256_reg_exposure_compensation[val][0], - ARRAY_SIZE(HI256_reg_exposure_compensation[val])); -} - -static void hi256_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_EFFECT_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - break; - } - case MSM_CAMERA_EFFECT_MODE_MONO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_black_white[0], - ARRAY_SIZE(HI256_reg_effect_black_white)); - break; - } - case MSM_CAMERA_EFFECT_MODE_NEGATIVE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_negative[0], - ARRAY_SIZE(HI256_reg_effect_negative)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SEPIA: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_old_movie[0], - ARRAY_SIZE(HI256_reg_effect_old_movie)); - break; - } - case MSM_CAMERA_EFFECT_MODE_SOLARIZE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_solarize[0], - ARRAY_SIZE(HI256_reg_effect_solarize)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_effect_normal[0], - ARRAY_SIZE(HI256_reg_effect_normal)); - } -} - -static void hi256_set_antibanding(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - hi256_i2c_write_table(s_ctrl, &HI256_reg_antibanding[value][0], - ARRAY_SIZE(HI256_reg_antibanding[value])); -} - -static void hi256_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_SCENE_MODE_OFF: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - break; - } - case MSM_CAMERA_SCENE_MODE_NIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_night[0], - ARRAY_SIZE(HI256_reg_scene_night)); - break; - } - case MSM_CAMERA_SCENE_MODE_LANDSCAPE: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_landscape[0], - ARRAY_SIZE(HI256_reg_scene_landscape)); - break; - } - case MSM_CAMERA_SCENE_MODE_PORTRAIT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_portrait[0], - ARRAY_SIZE(HI256_reg_scene_portrait)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_scene_auto[0], - ARRAY_SIZE(HI256_reg_scene_auto)); - } -} - -static void hi256_set_white_balance_mode(struct msm_sensor_ctrl_t *s_ctrl, - int value) -{ - pr_debug("%s %d", __func__, value); - switch (value) { - case MSM_CAMERA_WB_MODE_AUTO: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - break; - } - case MSM_CAMERA_WB_MODE_INCANDESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_home[0], - ARRAY_SIZE(HI256_reg_wb_home)); - break; - } - case MSM_CAMERA_WB_MODE_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_sunny[0], - ARRAY_SIZE(HI256_reg_wb_sunny)); - break; - } - case MSM_CAMERA_WB_MODE_FLUORESCENT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_office[0], - ARRAY_SIZE(HI256_reg_wb_office)); - break; - } - case MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT: { - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_cloudy[0], - ARRAY_SIZE(HI256_reg_wb_cloudy)); - break; - } - default: - hi256_i2c_write_table(s_ctrl, &HI256_reg_wb_auto[0], - ARRAY_SIZE(HI256_reg_wb_auto)); - } -} - -int32_t hi256_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - CDBG("init setting"); - hi256_i2c_write_table(s_ctrl, - &hi256_recommend_settings[0], - ARRAY_SIZE(hi256_recommend_settings)); - CDBG("init setting X"); - break; - case CFG_SET_RESOLUTION: { - int val = 0; - if (copy_from_user(&val, - (void *)cdata->cfg.setting, sizeof(int))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (val == 0) - hi256_i2c_write_table(s_ctrl, &hi256_uxga_settings[0], - ARRAY_SIZE(hi256_uxga_settings)); - else if (val == 1) - hi256_i2c_write_table(s_ctrl, &hi256_svga_settings[0], - ARRAY_SIZE(hi256_svga_settings)); - break; - } - case CFG_SET_STOP_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_stop_settings[0], - ARRAY_SIZE(hi256_stop_settings)); - break; - case CFG_SET_START_STREAM: - hi256_i2c_write_table(s_ctrl, - &hi256_start_settings[0], - ARRAY_SIZE(hi256_start_settings)); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *) - sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - hi256_set_stauration(s_ctrl, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - hi256_set_contrast(s_ctrl, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - hi256_set_sharpness(s_ctrl, shp_lev); - break; - } - case CFG_SET_ISO: { - int32_t iso_lev; - if (copy_from_user(&iso_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: ISO Value is %d", __func__, iso_lev); - hi256_set_iso(s_ctrl, iso_lev); - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - int32_t ec_lev; - if (copy_from_user(&ec_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Exposure compensation Value is %d", - __func__, ec_lev); - hi256_set_exposure_compensation(s_ctrl, ec_lev); - break; - } - case CFG_SET_EFFECT: { - int32_t effect_mode; - if (copy_from_user(&effect_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Effect mode is %d", __func__, effect_mode); - hi256_set_effect(s_ctrl, effect_mode); - break; - } - case CFG_SET_ANTIBANDING: { - int32_t antibanding_mode; - if (copy_from_user(&antibanding_mode, - (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: anti-banding mode is %d", __func__, - antibanding_mode); - hi256_set_antibanding(s_ctrl, antibanding_mode); - break; - } - case CFG_SET_BESTSHOT_MODE: { - int32_t bs_mode; - if (copy_from_user(&bs_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: best shot mode is %d", __func__, bs_mode); - hi256_set_scene_mode(s_ctrl, bs_mode); - break; - } - case CFG_SET_WHITE_BALANCE: { - int32_t wb_mode; - if (copy_from_user(&wb_mode, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: white balance is %d", __func__, wb_mode); - hi256_set_white_balance_mode(s_ctrl, wb_mode); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t hi256_sensor_func_tbl = { - .sensor_config = hi256_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = hi256_sensor_power_down, - .sensor_match_id = hi256_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t hi256_s_ctrl = { - .sensor_i2c_client = &hi256_sensor_i2c_client, - .power_setting_array.power_setting = hi256_power_setting, - .power_setting_array.size = ARRAY_SIZE(hi256_power_setting), - .msm_sensor_mutex = &hi256_mut, - .sensor_v4l2_subdev_info = hi256_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(hi256_subdev_info), - .func_tbl = &hi256_sensor_func_tbl, -}; - -module_init(hi256_init_module); -module_exit(hi256_exit_module); -MODULE_DESCRIPTION("Hi256 2MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx132.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx132.c deleted file mode 100644 index f9d057ac403c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx132.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX132_SENSOR_NAME "imx132" -DEFINE_MSM_MUTEX(imx132_mut); - -static struct msm_sensor_ctrl_t imx132_s_ctrl; - -static struct msm_sensor_power_setting imx132_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx132_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SRGGB10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx132_i2c_id[] = { - {IMX132_SENSOR_NAME, (kernel_ulong_t)&imx132_s_ctrl}, - { } -}; - -static int32_t msm_imx132_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx132_s_ctrl); -} -static struct i2c_driver imx132_i2c_driver = { - .id_table = imx132_i2c_id, - .probe = msm_imx132_i2c_probe, - .driver = { - .name = IMX132_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx132_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx132_dt_match[] = { - {.compatible = "qcom,imx132", .data = &imx132_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx132_dt_match); - -static struct platform_driver imx132_platform_driver = { - .driver = { - .name = "qcom,imx132", - .owner = THIS_MODULE, - .of_match_table = imx132_dt_match, - }, -}; - -static int32_t imx132_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx132_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx132_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx132_platform_driver, - imx132_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx132_i2c_driver); -} - -static void __exit imx132_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx132_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx132_s_ctrl); - platform_driver_unregister(&imx132_platform_driver); - } else - i2c_del_driver(&imx132_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx132_s_ctrl = { - .sensor_i2c_client = &imx132_sensor_i2c_client, - .power_setting_array.power_setting = imx132_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx132_power_setting), - .msm_sensor_mutex = &imx132_mut, - .sensor_v4l2_subdev_info = imx132_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx132_subdev_info), -}; - -module_init(imx132_init_module); -module_exit(imx132_exit_module); -MODULE_DESCRIPTION("imx132"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx134.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx134.c deleted file mode 100644 index 17a50889a88a..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx134.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX134_SENSOR_NAME "imx134" -DEFINE_MSM_MUTEX(imx134_mut); - -static struct msm_sensor_ctrl_t imx134_s_ctrl; - -static struct msm_sensor_power_setting imx134_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx134_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx134_i2c_id[] = { - {IMX134_SENSOR_NAME, (kernel_ulong_t)&imx134_s_ctrl}, - { } -}; - -static int32_t msm_imx134_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx134_s_ctrl); -} - -static struct i2c_driver imx134_i2c_driver = { - .id_table = imx134_i2c_id, - .probe = msm_imx134_i2c_probe, - .driver = { - .name = IMX134_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx134_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx134_dt_match[] = { - {.compatible = "sne,imx134", .data = &imx134_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx134_dt_match); - -static struct platform_driver imx134_platform_driver = { - .driver = { - .name = "sne,imx134", - .owner = THIS_MODULE, - .of_match_table = imx134_dt_match, - }, -}; - -static int32_t imx134_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx134_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx134_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx134_platform_driver, - imx134_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx134_i2c_driver); -} - -static void __exit imx134_exit_module(void) -{ - pr_debug("%s:%d\n", __func__, __LINE__); - if (imx134_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx134_s_ctrl); - platform_driver_unregister(&imx134_platform_driver); - } else { - i2c_del_driver(&imx134_i2c_driver); - } - return; -} - -static struct msm_sensor_ctrl_t imx134_s_ctrl = { - .sensor_i2c_client = &imx134_sensor_i2c_client, - .power_setting_array.power_setting = imx134_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx134_power_setting), - .msm_sensor_mutex = &imx134_mut, - .sensor_v4l2_subdev_info = imx134_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx134_subdev_info), -}; - -module_init(imx134_init_module); -module_exit(imx134_exit_module); -MODULE_DESCRIPTION("imx134"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx135.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx135.c deleted file mode 100644 index c26e4fffbd4f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/imx135.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define IMX135_SENSOR_NAME "imx135" -DEFINE_MSM_MUTEX(imx135_mut); - -static struct msm_sensor_ctrl_t imx135_s_ctrl; - -static struct msm_sensor_power_setting imx135_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info imx135_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id imx135_i2c_id[] = { - {IMX135_SENSOR_NAME, (kernel_ulong_t)&imx135_s_ctrl}, - { } -}; - -static int32_t msm_imx135_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &imx135_s_ctrl); -} - -static struct i2c_driver imx135_i2c_driver = { - .id_table = imx135_i2c_id, - .probe = msm_imx135_i2c_probe, - .driver = { - .name = IMX135_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client imx135_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id imx135_dt_match[] = { - {.compatible = "qcom,imx135", .data = &imx135_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, imx135_dt_match); - -static struct platform_driver imx135_platform_driver = { - .driver = { - .name = "qcom,imx135", - .owner = THIS_MODULE, - .of_match_table = imx135_dt_match, - }, -}; - -static int32_t imx135_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(imx135_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init imx135_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&imx135_platform_driver, - imx135_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&imx135_i2c_driver); -} - -static void __exit imx135_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (imx135_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&imx135_s_ctrl); - platform_driver_unregister(&imx135_platform_driver); - } else - i2c_del_driver(&imx135_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t imx135_s_ctrl = { - .sensor_i2c_client = &imx135_sensor_i2c_client, - .power_setting_array.power_setting = imx135_power_setting, - .power_setting_array.size = ARRAY_SIZE(imx135_power_setting), - .msm_sensor_mutex = &imx135_mut, - .sensor_v4l2_subdev_info = imx135_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(imx135_subdev_info), -}; - -module_init(imx135_init_module); -module_exit(imx135_exit_module); -MODULE_DESCRIPTION("imx135"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/Makefile deleted file mode 100644 index 3a84e0d0614d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_camera_io_util.o msm_camera_cci_i2c.o msm_camera_qup_i2c.o msm_camera_i2c_mux.o msm_camera_spi.o msm_camera_dt_util.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_cci_i2c.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_cci_i2c.c deleted file mode 100644 index 70c70f5b5030..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_cci_i2c.c +++ /dev/null @@ -1,632 +0,0 @@ -/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" -#include "msm_cci.h" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = data_type; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char *buf = NULL; - int i; - struct msm_camera_cci_ctrl cci_ctrl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - if (num_byte > I2C_REG_DATA_MAX) { - pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n", - __func__, num_byte, I2C_REG_DATA_MAX); - return rc; - } - - buf = kzalloc(num_byte, GFP_KERNEL); - if (!buf) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - cci_ctrl.status = 0; //prevent - cci_ctrl.cmd = MSM_CCI_I2C_READ; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_read_cfg.addr = addr; - cci_ctrl.cfg.cci_i2c_read_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_read_cfg.data = buf; - cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - kfree(buf); - return rc; -} - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array reg_conf_tbl; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - CDBG("%s:%d reg addr = 0x%x data type: %d\n", - __func__, __LINE__, addr, data_type); - reg_conf_tbl.reg_addr = addr; - reg_conf_tbl.reg_data = data; - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = ®_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = 1; -#if defined(CONFIG_SR200PC20) || defined(CONFIG_SR352) || defined(CONFIG_SR130PC20) - if (addr == 0xff){ - pr_err("delay START = %d\n", (int)data*10); - mdelay(data*10); - return 0; - } -#endif - -#if defined(CONFIG_DB8221A) - if (addr == 0xfe){ - pr_err("delay START = %d\n", (int)data*10); - msleep(data); - return 0; - } -#endif - - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint8_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl = {0}; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - - reg_conf_tbl = kzalloc(num_byte * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - } - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BYTE_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc); - rc = cci_ctrl.status; - kfree(reg_conf_tbl); - reg_conf_tbl = NULL; - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - uint32_t i = 0; - struct msm_camera_cci_ctrl cci_ctrl; - struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - reg_conf_tbl = (struct msm_camera_i2c_reg_array *) - kzalloc(num_byte * sizeof(struct msm_camera_i2c_reg_array), GFP_KERNEL); - if (!reg_conf_tbl) { - pr_err("%s:%d failed: no memory", __func__, __LINE__); - return -ENOMEM; - } - - CDBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - memset(reg_conf_tbl, 0, - num_byte * sizeof(struct msm_camera_i2c_reg_array)); - reg_conf_tbl[0].reg_addr = addr; - for (i = 0; i < num_byte; i++) { - reg_conf_tbl[i].reg_data = data[i]; - reg_conf_tbl[i].delay = 0; - CDBG("%s:%d data[%d] %x\n", __func__, __LINE__, i, - reg_conf_tbl[i].reg_data); - } - cci_ctrl.status = 0;//prevent - cci_ctrl.cmd = MSM_CCI_I2C_WRITE_BURST; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = reg_conf_tbl; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = MSM_CAMERA_I2C_BURST_DATA; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = num_byte; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s:%d failed: VIDIOC_MSM_CCI_CFG rc %d\n", __func__, __LINE__, - rc); - } - - rc = cci_ctrl.status; - kfree(reg_conf_tbl); - return rc; -} - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - return rc; -} - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - //struct msm_camera_i2c_reg_array *reg_array = NULL; - struct msm_camera_i2c_burst_reg_array *reg_array = NULL; - - if (!client || !write_setting) { - pr_err("[CCI]%s:%d failed\n", __func__, __LINE__); - return rc; - } - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA - && write_setting->data_type != MSM_CAMERA_I2C_BURST_DATA)) { - pr_err("[CCI]%s:%d failed data_type(%d)\n", __func__, __LINE__, write_setting->data_type); - return rc; - } - - reg_array = - (struct msm_camera_i2c_burst_reg_array *)write_setting->reg_setting; -/* - pr_err("%s:%d size %d addr %x\n", __func__, __LINE__, - reg_array->delay, reg_array->reg_addr); -*/ - rc = msm_camera_cci_i2c_write_burst(client, reg_array->reg_addr, - reg_array->reg_burst_data, reg_array->reg_data_size); - if (rc < 0) { - pr_err("%s:%d failed: msm_camera_cci_i2c_write_seq rc %d\n", - __func__, __LINE__, rc); - } - - return rc; -} - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - if (reg_setting->reg_data_size > I2C_SEQ_REG_DATA_MAX) { - pr_err("%s: number of bytes %u exceeding the max supported %d\n", - __func__, reg_setting->reg_data_size, I2C_SEQ_REG_DATA_MAX); - return rc; - } - - if (reg_setting->reg_data_size > I2C_SEQ_REG_DATA_MAX) { - pr_err("%s: number of bytes %u exceeding the max supported %d\n", - __func__, reg_setting->reg_data_size, I2C_SEQ_REG_DATA_MAX); - return rc; - } - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_cci_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - return rc; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int32_t rc = -EFAULT; - struct msm_camera_cci_ctrl cci_ctrl; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - cci_ctrl.cmd = MSM_CCI_I2C_WRITE; - cci_ctrl.cci_info = client->cci_client; - cci_ctrl.cfg.cci_i2c_write_cfg.reg_setting = - write_setting->reg_setting; - cci_ctrl.cfg.cci_i2c_write_cfg.data_type = write_setting->data_type; - cci_ctrl.cfg.cci_i2c_write_cfg.addr_type = client->addr_type; - cci_ctrl.cfg.cci_i2c_write_cfg.size = write_setting->size; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s: line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - rc = cci_ctrl.status; - return rc; -} - -static int32_t msm_camera_cci_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - rc = msm_camera_cci_i2c_compare(client, - addr, data, data_type); - return rc; -} - -static int32_t msm_camera_cci_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_cci_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_cci_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_cci_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_cci_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_cci_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_cci_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_cci_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_cci_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_cci_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_cci_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd) -{ - int32_t rc = 0; - struct msm_camera_cci_ctrl cci_ctrl; - - CDBG("%s line %d\n", __func__, __LINE__); - cci_ctrl.cmd = cci_cmd; - cci_ctrl.cci_info = client->cci_client; - rc = v4l2_subdev_call(client->cci_client->cci_subdev, - core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl); - if (rc < 0) { - pr_err("%s line %d rc = %d\n", __func__, __LINE__, rc); - return rc; - } - return cci_ctrl.status; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.c deleted file mode 100644 index a22ad60d50b7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.c +++ /dev/null @@ -1,1834 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include "msm_cci.h" - -#define CAM_SENSOR_PINCTRL_STATE_SLEEP "cam_suspend" -#define CAM_SENSOR_PINCTRL_STATE_DEFAULT "cam_default" -//#define CONFIG_MSM_CAMERA_DT_DEBUG -#undef CDBG -#ifdef CONFIG_MSM_CAMERA_DT_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size) -{ - uint16_t i = 0; - int j = 0; - - /* Validate input parameters */ - if (!cam_vreg || !power_setting) { - pr_err("%s:%d failed: cam_vreg %pK power_setting %pK", __func__, - __LINE__, cam_vreg, power_setting); - return -EINVAL; - } - - /* Validate size of num_vreg */ - if (num_vreg <= 0) { - pr_err("failed: num_vreg %d", num_vreg); - return -EINVAL; - } - - for (i = 0; i < power_setting_size; i++) { - if (power_setting[i].seq_type != SENSOR_VREG) - continue; - - switch (power_setting[i].seq_val) { - case CAM_VDIG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vdig")) { - CDBG("%s:%d i %d j %d cam_vdig\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VIO: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vio")) { - CDBG("%s:%d i %d j %d cam_vio\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VANA: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vana")) { - CDBG("%s:%d i %d j %d cam_vana\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; - - case CAM_VAF: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vaf")) { - CDBG("%s:%d i %d j %d cam_vaf\n", - __func__, __LINE__, i, j); - power_setting[i].seq_val = j; - break; - } - } - break; -#if defined(CONFIG_OIS) - case CAM_VMOIS: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vm_ois")) { - pr_info("%s:%d i %d j %d cam_vaf\n", - __FUNCTION__, __LINE__, i, j); - power_setting[i].seq_val = j; - if (power_setting[i].config_val != 0) { - cam_vreg[j].min_voltage = cam_vreg[j].max_voltage = - power_setting[i].config_val; - pr_info("%s:%d af min max voltage %ld\n", __FUNCTION__, - __LINE__, power_setting[i].config_val); - break; - } - } - } - break; - - case CAM_VDDOIS: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(cam_vreg[j].reg_name, "cam_vdd_ois")) { - pr_info("%s:%d i %d j %d cam_vaf\n", - __FUNCTION__, __LINE__, i, j); - power_setting[i].seq_val = j; - if (power_setting[i].config_val != 0) { - cam_vreg[j].min_voltage = cam_vreg[j].max_voltage = - power_setting[i].config_val; - pr_info("%s:%d af min max voltage %ld\n", __FUNCTION__, - __LINE__, power_setting[i].config_val); - break; - } - } - } - break; -#endif - default: - pr_err("%s:%d invalid seq_val %d\n", __func__, - __LINE__, power_setting[i].seq_val); - break; - } - } - - return 0; -} - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info) -{ - int rc = 0, i = 0; - uint32_t val = 0, count = 0; - uint32_t *val_array = NULL; - struct device_node *src_node = NULL; - struct msm_sensor_info_t *sensor_info; - - sensor_info = kzalloc(sizeof(*sensor_info), GFP_KERNEL); - if (!sensor_info) { - pr_err("%s:%d failed\n", __func__, __LINE__); - return -ENOMEM; - } - for (i = 0; i < SUB_MODULE_MAX; i++) - sensor_info->subdev_id[i] = -1; - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_ACTUATOR] = val; - of_node_put(src_node); - src_node = NULL; - } -#if defined(CONFIG_OIS) - src_node = of_parse_phandle(of_node, "qcom,ois-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,ois cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_OIS] = val; - of_node_put(src_node); - src_node = NULL; - } -#endif - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", 0); - if (!src_node) { - CDBG("%s:%d eeprom src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,eeprom-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,eeprom-sd-index %d, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_EEPROM] = val; - } else - rc = 0; - - src_node = of_parse_phandle(of_node, "qcom,led-flash-src", 0); - if (!src_node) { - CDBG("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - CDBG("%s qcom,led flash cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_LED_FLASH] = val; - of_node_put(src_node); - src_node = NULL; - } - - rc = of_property_read_u32(of_node, "qcom,strobe-flash-sd-index", &val); - if (rc != -EINVAL) { - CDBG("%s qcom,strobe-flash-sd-index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, __LINE__, rc); - goto ERROR; - } - sensor_info->subdev_id[SUB_MODULE_STROBE_FLASH] = val; - } else - rc = 0; - - if (of_get_property(of_node, "qcom,csiphy-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csiphy-sd-index count %d > 2\n", - __func__, count); - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csiphy-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id[SUB_MODULE_CSIPHY + i] = - val_array[i]; - CDBG("%s csiphy_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csiphy-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - if (of_get_property(of_node, "qcom,csid-sd-index", &count)) { - count /= sizeof(uint32_t); - if (count > 2) { - pr_err("%s qcom,csid-sd-index count %d > 2\n", - __func__, count); - rc = -EINVAL; - goto ERROR; - } - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - rc = of_property_read_u32_array(of_node, "qcom,csid-sd-index", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - kfree(val_array); - goto ERROR; - } - for (i = 0; i < count; i++) { - sensor_info->subdev_id - [SUB_MODULE_CSID + i] = val_array[i]; - CDBG("%s csid_core[%d] = %d\n", - __func__, i, val_array[i]); - } - kfree(val_array); - } else { - pr_err("%s:%d qcom,csid-sd-index not present\n", __func__, - __LINE__); - rc = -EINVAL; - goto ERROR; - } - - *s_info = sensor_info; - return rc; -ERROR: - kfree(sensor_info); - return rc; -} - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info) -{ - int rc = 0; - uint32_t val = 0; - struct msm_actuator_info *actuator_info; - - rc = of_property_read_u32(of_node, "qcom,actuator-cam-name", &val); - CDBG("%s qcom,actuator-cam-name %d, rc %d\n", __func__, val, rc); - if (rc < 0) - return 0; - - actuator_info = kzalloc(sizeof(*actuator_info), GFP_KERNEL); - if (!actuator_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR; - } - - actuator_info->cam_name = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-pwd", &val); - CDBG("%s qcom,actuator-vcm-pwd %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_pwd = val; - - rc = of_property_read_u32(of_node, "qcom,actuator-vcm-enable", &val); - CDBG("%s qcom,actuator-vcm-enable %d, rc %d\n", __func__, val, rc); - if (!rc) - actuator_info->vcm_enable = val; - - *act_info = actuator_info; - return 0; -ERROR: - kfree(actuator_info); - return rc; -} - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params) -{ - int rc = 0; - uint32_t val = 0; - struct msm_camera_csi_lane_params *clp; - - clp = kzalloc(sizeof(*clp), GFP_KERNEL); - if (!clp) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *csi_lane_params = clp; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-assign", &val); - CDBG("%s qcom,csi-lane-assign 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_assign = val; - - rc = of_property_read_u32(of_node, "qcom,csi-lane-mask", &val); - CDBG("%s qcom,csi-lane-mask 0x%x, rc %d\n", __func__, val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR; - } - clp->csi_lane_mask = val; - - return rc; -ERROR: - kfree(clp); - return rc; -} - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info) -{ - int rc = 0, i, j; - int count = 0; - const char *seq_name = NULL; - uint32_t *array = NULL; - struct msm_sensor_power_setting *ps; - - struct msm_sensor_power_setting *power_setting; - uint16_t *power_setting_size, size = 0; - bool need_reverse = 0; - - if (!power_info) - return -EINVAL; - - power_setting = power_info->power_setting; - power_setting_size = &power_info->power_setting_size; - - count = of_property_count_strings(of_node, "qcom,cam-power-seq-type"); - *power_setting_size = count; - - CDBG("%s qcom,cam-power-seq-type count %d\n", __func__, count); - - if (count <= 0) - return 0; - - ps = kzalloc(sizeof(*ps) * count, GFP_KERNEL); - if (!ps) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - power_setting = ps; - power_info->power_setting = ps; - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-type", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - if (!strcmp(seq_name, "sensor_vreg")) { - ps[i].seq_type = SENSOR_VREG; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_gpio")) { - ps[i].seq_type = SENSOR_GPIO; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_clk")) { - ps[i].seq_type = SENSOR_CLK; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else if (!strcmp(seq_name, "sensor_i2c_mux")) { - ps[i].seq_type = SENSOR_I2C_MUX; - CDBG("%s:%d seq_type[%d] %d\n", __func__, __LINE__, - i, ps[i].seq_type); - } else { - CDBG("%s: unrecognized seq-type\n", __func__); - rc = -EILSEQ; - goto ERROR1; - } - } - - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-power-seq-val", i, - &seq_name); - CDBG("%s seq_name[%d] = %s\n", __func__, i, - seq_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - switch (ps[i].seq_type) { - case SENSOR_VREG: - for (j = 0; j < num_vreg; j++) { - if (!strcmp(seq_name, cam_vreg[j].reg_name)) - break; - } - if (j < num_vreg) - ps[i].seq_val = j; - else - rc = -EILSEQ; - break; - case SENSOR_GPIO: - if (!strcmp(seq_name, "sensor_gpio_reset")) - ps[i].seq_val = SENSOR_GPIO_RESET; - else if (!strcmp(seq_name, "sensor_gpio_standby")) - ps[i].seq_val = SENSOR_GPIO_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vt_reset")) - ps[i].seq_val = SENSOR_GPIO_VT_RESET; - else if (!strcmp(seq_name, "sensor_gpio_vt_standby")) - ps[i].seq_val = SENSOR_GPIO_VT_STANDBY; - else if (!strcmp(seq_name, "sensor_gpio_vio")) - ps[i].seq_val = SENSOR_GPIO_VIO; - else if (!strcmp(seq_name, "sensor_gpio_vdig")) - ps[i].seq_val = SENSOR_GPIO_VDIG; - else if (!strcmp(seq_name, "sensor_gpio_vana")) - ps[i].seq_val = SENSOR_GPIO_VANA; - else if (!strcmp(seq_name, "qcom,gpio-ext-vana-power")) - ps[i].seq_val = SENSOR_GPIO_EXT_VANA_POWER; - else if (!strcmp(seq_name, "qcom,gpio-ext-camio-en")) - ps[i].seq_val = SENSOR_GPIO_EXT_CAMIO_EN; -#if defined(CONFIG_OIS) - else if (!strcmp(seq_name, "qcom,gpio-ois-enable")) - { - ps[i].seq_val = SENSOR_GPIO_OIS_EN; - pr_err("Sequence Value is ps[%d].seq_val --> %d",i,ps[i].seq_val); - } - else if (!strcmp(seq_name, "qcom,gpio-ois-reset")) - { - ps[i].seq_val = SENSOR_GPIO_OIS_RESET; - pr_err("Sequence Value is ps[%d].seq_val --> %d",i,ps[i].seq_val); - } -#endif - else - rc = -EILSEQ; - break; - case SENSOR_CLK: - if (!strcmp(seq_name, "sensor_cam_mclk")) - ps[i].seq_val = SENSOR_CAM_MCLK; - else if (!strcmp(seq_name, "sensor_cam_clk")) - ps[i].seq_val = SENSOR_CAM_CLK; - else - rc = -EILSEQ; - break; - case SENSOR_I2C_MUX: - if (!strcmp(seq_name, "none")) - ps[i].seq_val = 0; - else - rc = -EILSEQ; - break; - default: - rc = -EILSEQ; - break; - } - if (rc < 0) { - CDBG("%s: unrecognized seq-val\n", __func__); - goto ERROR1; - } - } - - array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-cfg-val", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (ps[i].seq_type == SENSOR_GPIO) { - if (array[i] == 0) - ps[i].config_val = GPIO_OUT_LOW; - else if (array[i] == 1) - ps[i].config_val = GPIO_OUT_HIGH; - } else { - ps[i].config_val = array[i]; - } - CDBG("%s power_setting[%d].config_val = %ld\n", __func__, i, - ps[i].config_val); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-power-seq-delay", - array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - ps[i].delay = array[i]; - CDBG("%s power_setting[%d].delay = %d\n", __func__, - i, ps[i].delay); - } - kfree(array); - - size = *power_setting_size; - - if (NULL != ps && 0 != size) - need_reverse = 1; - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - memcpy(power_info->power_down_setting, - ps, sizeof(*ps) * size); - - power_info->power_down_setting_size = size; -#if defined(CONFIG_MACH_O7_CHN_OPEN) - if(size == 2) - need_reverse=0; -#endif - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } -#if defined(CONFIG_MACH_ROSSA_TMO) - for (c = 0; c < size; c ++) { - if(power_info->power_down_setting[c].seq_val == SENSOR_GPIO_VDIG) - { - int i = c + 1; - power_down_setting_t = power_info->power_down_setting[c]; - power_info->power_down_setting[c] = power_info->power_down_setting[i]; - power_info->power_down_setting[i] = power_down_setting_t; - power_info->power_down_setting[c].delay = 0; - break; - } - } -#endif - } - return rc; -ERROR2: - kfree(array); -ERROR1: - kfree(ps); - power_setting_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-req-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-req-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_req_tbl = kzalloc(sizeof(struct gpio) * count, - GFP_KERNEL); - if (!gconf->cam_gpio_req_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_req_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio req tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_req_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_req_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_req_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-req-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_req_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_req_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_req_tbl[i].flags); - } - - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,gpio-req-tbl-label", i, - &gconf->cam_gpio_req_tbl[i].label); - CDBG("%s cam_gpio_req_tbl[%d].label = %s\n", __func__, i, - gconf->cam_gpio_req_tbl[i].label); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_req_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_req_tbl_size = 0; - return rc; -} - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *val_array = NULL; - - if (!of_get_property(of_node, "qcom,gpio-set-tbl-num", &count)) - return 0; - - count /= sizeof(uint32_t); - if (!count) { - pr_err("%s qcom,gpio-set-tbl-num 0\n", __func__); - return 0; - } - - val_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!val_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - gconf->cam_gpio_set_tbl = kzalloc(sizeof(struct msm_gpio_set_tbl) * - count, GFP_KERNEL); - if (!gconf->cam_gpio_set_tbl) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - gconf->cam_gpio_set_tbl_size = count; - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-num", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - if (val_array[i] >= gpio_array_size) { - pr_err("%s gpio set tbl index %d invalid\n", - __func__, val_array[i]); - return -EINVAL; - } - gconf->cam_gpio_set_tbl[i].gpio = gpio_array[val_array[i]]; - CDBG("%s cam_gpio_set_tbl[%d].gpio = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].gpio); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-flags", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].flags = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].flags = %ld\n", __func__, i, - gconf->cam_gpio_set_tbl[i].flags); - } - - rc = of_property_read_u32_array(of_node, "qcom,gpio-set-tbl-delay", - val_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - gconf->cam_gpio_set_tbl[i].delay = val_array[i]; - CDBG("%s cam_gpio_set_tbl[%d].delay = %d\n", __func__, i, - gconf->cam_gpio_set_tbl[i].delay); - } - - kfree(val_array); - return rc; - -ERROR2: - kfree(gconf->cam_gpio_set_tbl); -ERROR1: - kfree(val_array); - gconf->cam_gpio_set_tbl_size = 0; - return rc; -} - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size) -{ - int rc = 0, val = 0; - - gconf->gpio_num_info = kzalloc(sizeof(struct msm_camera_gpio_num_info), - GFP_KERNEL); - if (!gconf->gpio_num_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - return rc; - } - - rc = of_property_read_u32(of_node, "qcom,gpio-vio", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vio invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VIO] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VIO]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vana", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vana invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VANA] = 1; - CDBG("%s qcom,gpio-vana %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VANA]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vdig", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vdig failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vdig invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VDIG] = 1; - CDBG("%s qcom,gpio-vdig %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VDIG]); - } else - rc = 0; - -#if defined(CONFIG_MACH_ROSSA_TMO) || defined(CONFIG_SEC_A8_PROJECT) || defined(CONFIG_SEC_A7X_PROJECT) - rc = of_property_read_u32(of_node, "qcom,gpio-vt-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_RESET] = 1; - CDBG("%s qcom,gpio-vt-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET]); - } else - rc = 0; -#endif - rc = of_property_read_u32(of_node, "qcom,gpio-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_RESET] = 1; - CDBG("%s qcom,gpio-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_RESET]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_STANDBY] = 1; - CDBG("%s qcom,gpio-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY]); - } else - rc = 0; - -#if defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT)\ - || defined(CONFIG_SEC_XCOVER3_PROJECT) || defined(CONFIG_SEC_J1X_PROJECT) - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vana-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vana failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_VANA_POWER] = 1; - CDBG("%s qcom,gpio-ext-vana-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_VANA_POWER]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-ext-vio-power", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vio failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_EXT_CAMIO_EN] = 1; - CDBG("%s qcom,gpio-ext-vio-power %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_EXT_CAMIO_EN]); - } else - rc = 0; - -#endif - - rc = of_property_read_u32(of_node, "qcom,gpio-vt-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_RESET] = 1; - CDBG("%s qcom,gpio-vt-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_RESET]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-vt-standby", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-vt-standby failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-vt-standby invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_VT_STANDBY] = 1; - CDBG("%s qcom,gpio-vt-standby %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_VT_STANDBY]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-af-pwdm", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-af-pwdm failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-af-pwdm invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_AF_PWDM] = 1; - CDBG("%s qcom,gpio-af-pwdm %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-en", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-en failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-en invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_EN] = 1; - CDBG("%s qcom,gpio-flash-en %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_EN]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-now", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%d read qcom,gpio-flash-now failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-now invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_NOW] = 1; - CDBG("%s qcom,gpio-flash-now %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_NOW]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-flash-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%dread qcom,gpio-flash-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-flash-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_FL_RESET] = 1; - CDBG("%s qcom,gpio-flash-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_FL_RESET]); - } else - rc = 0; -#if defined(CONFIG_OIS) - rc = of_property_read_u32(of_node, "qcom,gpio-ois-enable", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%dread qcom,gpio-ois-enable failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-ois-enable invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_EN] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_OIS_EN] = 1; - pr_err("%s qcom,gpio-ois-enable %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_EN]); - } else - rc = 0; - - rc = of_property_read_u32(of_node, "qcom,gpio-ois-reset", &val); - if (rc != -EINVAL) { - if (rc < 0) { - pr_err("%s:%dread qcom,gpio-ois-reset failed rc %d\n", - __func__, __LINE__, rc); - goto ERROR; - } else if (val >= gpio_array_size) { - pr_err("%s:%d qcom,gpio-ois-reset invalid %d\n", - __func__, __LINE__, val); - rc = -EINVAL; - goto ERROR; - } - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_RESET] = - gpio_array[val]; - gconf->gpio_num_info->valid[SENSOR_GPIO_OIS_RESET] = 1; - pr_err("%s qcom,gpio-ois-reset %d\n", __func__, - gconf->gpio_num_info->gpio_num[SENSOR_GPIO_OIS_RESET]); - } else - rc = 0; -#endif - return rc; - -ERROR: - kfree(gconf->gpio_num_info); - gconf->gpio_num_info = NULL; - return rc; -} - -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf) -{ - int rc = 0, val = 0; - char camera_info[100] = {0, }; - - rc = of_property_read_u32(of_node, "cam,isp", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcpy(camera_info, "ISP="); - switch(val) { - case CAM_INFO_ISP_TYPE_INTERNAL : - strcat(camera_info, "INT;"); - break; - case CAM_INFO_ISP_TYPE_EXTERNAL : - strcat(camera_info, "EXT;"); - break; - case CAM_INFO_ISP_TYPE_SOC : - strcat(camera_info, "SOC;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,cal_memory", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CALMEM="); - switch(val) { - case CAM_INFO_CAL_MEM_TYPE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CAL_MEM_TYPE_FROM : - case CAM_INFO_CAL_MEM_TYPE_EEPROM : - case CAM_INFO_CAL_MEM_TYPE_OTP : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,read_version", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "READVER="); - switch(val) { - case CAM_INFO_READ_VER_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_READ_VER_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,core_voltage", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "COREVOLT="); - switch(val) { - case CAM_INFO_CORE_VOLT_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_CORE_VOLT_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,upgrade", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "UPGRADE="); - switch(val) { - case CAM_INFO_FW_UPGRADE_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_FW_UPGRADE_SYSFS : - strcat(camera_info, "SYSFS;"); - break; - case CAM_INFO_FW_UPGRADE_CAMON : - strcat(camera_info, "CAMON;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,companion_chip", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "CC="); - switch(val) { - case CAM_INFO_COMPANION_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_COMPANION_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - rc = of_property_read_u32(of_node, "cam,ois", - &val); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - strcat(camera_info, "OIS="); - switch(val) { - case CAM_INFO_OIS_NONE : - strcat(camera_info, "N;"); - break; - case CAM_INFO_OIS_USE : - strcat(camera_info, "Y;"); - break; - default : - strcat(camera_info, "NULL;"); - break; - } - - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; - -ERROR1: - strcpy(camera_info, "ISP=NULL;CALMEM=NULL;READVER=NULL;COREVOLT=NULL;UPGRADE=NULL;FW_CC=NULL;OIS=NULL"); - snprintf(buf, sizeof(camera_info), "%s", camera_info); - return 0; -} -#endif - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg) -{ - int rc = 0, i = 0; - uint32_t count = 0; - uint32_t *vreg_array = NULL; - struct camera_vreg_t *vreg = NULL; - - count = of_property_count_strings(of_node, "qcom,cam-vreg-name"); - CDBG("%s qcom,cam-vreg-name count %d\n", __func__, count); - - if (!count) - return 0; - - vreg = kzalloc(sizeof(*vreg) * count, GFP_KERNEL); - if (!vreg) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - *cam_vreg = vreg; - *num_vreg = count; - for (i = 0; i < count; i++) { - rc = of_property_read_string_index(of_node, - "qcom,cam-vreg-name", i, - &vreg[i].reg_name); - CDBG("%s reg_name[%d] = %s\n", __func__, i, - vreg[i].reg_name); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR1; - } - } - - vreg_array = kzalloc(sizeof(uint32_t) * count, GFP_KERNEL); - if (!vreg_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto ERROR1; - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-type", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].type = vreg_array[i]; - CDBG("%s cam_vreg[%d].type = %d\n", __func__, i, - vreg[i].type); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-min-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].min_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].min_voltage = %d\n", __func__, - i, vreg[i].min_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-max-voltage", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].max_voltage = vreg_array[i]; - CDBG("%s cam_vreg[%d].max_voltage = %d\n", __func__, - i, vreg[i].max_voltage); - } - - rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-op-mode", - vreg_array, count); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto ERROR2; - } - for (i = 0; i < count; i++) { - vreg[i].op_mode = vreg_array[i]; - CDBG("%s cam_vreg[%d].op_mode = %d\n", __func__, i, - vreg[i].op_mode); - } - - kfree(vreg_array); - return rc; -ERROR2: - kfree(vreg_array); -ERROR1: - kfree(vreg); - *num_vreg = 0; - return rc; -} - -static int msm_camera_enable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_INIT, NULL); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_CFG, (void *)&i2c_conf->i2c_mux_mode); - return 0; -} - -static int msm_camera_disable_i2c_mux(struct msm_camera_i2c_conf *i2c_conf) -{ - struct v4l2_subdev *i2c_mux_sd = - dev_get_drvdata(&i2c_conf->mux_dev->dev); - v4l2_subdev_call(i2c_mux_sd, core, ioctl, - VIDIOC_MSM_I2C_MUX_RELEASE, NULL); - return 0; -} - -static int msm_camera_pinctrl_init(struct msm_camera_power_ctrl_t *ctrl) -{ - struct msm_pinctrl_info *sensor_pctrl = NULL; - - sensor_pctrl = &ctrl->pinctrl_info; - sensor_pctrl->pinctrl = devm_pinctrl_get(ctrl->dev); - if (IS_ERR_OR_NULL(sensor_pctrl->pinctrl)) { - pr_err("%s:%d Getting pinctrl handle failed\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_active = - pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_DEFAULT); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_active)) { - pr_err("%s:%d Failed to get the active state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - sensor_pctrl->gpio_state_suspend - = pinctrl_lookup_state(sensor_pctrl->pinctrl, - CAM_SENSOR_PINCTRL_STATE_SLEEP); - if (IS_ERR_OR_NULL(sensor_pctrl->gpio_state_suspend)) { - pr_err("%s:%d Failed to get the suspend state pinctrl handle\n", - __func__, __LINE__); - return -EINVAL; - } - return 0; -} - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int rc = 0, index = 0, no_gpio = 0, ret = 0; - struct msm_sensor_power_setting *power_setting = NULL; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (ctrl->gpio_conf->cam_gpiomux_conf_tbl != NULL) { - pr_err("%s:%d mux install\n", __func__, __LINE__); - msm_gpiomux_install( - (struct msm_gpiomux_config *) - ctrl->gpio_conf->cam_gpiomux_conf_tbl, - ctrl->gpio_conf->cam_gpiomux_conf_tbl_size); - } - ret = msm_camera_pinctrl_init(ctrl); - if (ret < 0) { - pr_err("%s:%d Initialization of pinctrl failed\n", - __func__, __LINE__); - ctrl->cam_pinctrl_status = 0; - } else { - ctrl->cam_pinctrl_status = 1; - } - - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - rc = msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 1); - if (rc < 0) - no_gpio = rc; - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_active); - if (ret) - pr_err("%s:%d cannot set pin to active state", - __func__, __LINE__); - } - for (index = 0; index < ctrl->power_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - case SENSOR_CLK: - if (power_setting->seq_val >= ctrl->clk_info_size) { - pr_err("%s clk index %d >= max %d\n", __func__, - power_setting->seq_val, - ctrl->clk_info_size); - goto power_up_failed; - } - if (power_setting->config_val) - ctrl->clk_info[power_setting->seq_val]. - clk_rate = power_setting->config_val; - - rc = msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 1); - if (rc < 0) { - pr_err("%s: clk enable failed\n", - __func__); - goto power_up_failed; - } - break; - case SENSOR_GPIO: - if (no_gpio) { - pr_err("%s: request gpio failed\n", __func__); - return no_gpio; - } - if (power_setting->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - CDBG("%s:%d gpio set val %d\n", __func__, __LINE__, - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val]); - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], - power_setting->config_val); - break; - case SENSOR_VREG: - if (power_setting->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - power_setting->seq_val, - SENSOR_GPIO_MAX); - goto power_up_failed; - } -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - power_setting->config_val); -#else - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 1); -#endif - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_enable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (power_setting->delay) { - usleep_range(power_setting->delay * 100, - (power_setting->delay * 100) + 100); - } -#else - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } -#endif - } - - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_INIT); - if (rc < 0) { - pr_err("%s cci_init failed\n", __func__); - goto power_up_failed; - } - } - - CDBG("%s exit\n", __func__); - return 0; -power_up_failed: - pr_err("%s:%d failed\n", __func__, __LINE__); - for (index--; index >= 0; index--) { - CDBG("%s index %d\n", __func__, index); - power_setting = &ctrl->power_setting[index]; - CDBG("%s type %d\n", __func__, power_setting->seq_type); - switch (power_setting->seq_type) { - - case SENSOR_CLK: - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&power_setting->data[0], - ctrl->clk_info_size, - 0); - break; - case SENSOR_GPIO: - if (!ctrl->gpio_conf->gpio_num_info->valid - [power_setting->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [power_setting->seq_val], GPIOF_OUT_INIT_LOW); - break; - case SENSOR_VREG: -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [power_setting->seq_val].regulator[0], - 0); -#else - - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[power_setting->seq_val], - (struct regulator **)&power_setting->data[0], - 0); -#endif - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - power_setting->seq_type); - break; - } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (power_setting->delay) { - usleep_range(power_setting->delay * 100, - (power_setting->delay * 100) + 100); - } -#else - if (power_setting->delay > 20) { - msleep(power_setting->delay); - } else if (power_setting->delay) { - usleep_range(power_setting->delay * 1000, - (power_setting->delay * 1000) + 1000); - } -#endif - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state\n", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if (ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - return rc; -} - -static struct msm_sensor_power_setting* -msm_camera_get_power_settings(struct msm_camera_power_ctrl_t *ctrl, - enum msm_sensor_power_seq_type_t seq_type, - uint16_t seq_val) -{ - struct msm_sensor_power_setting *power_setting, *ps = NULL; - int idx; - - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == seq_type && - power_setting->seq_val == seq_val) { - ps = power_setting; - return ps; - } - - } - return ps; -} - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client) -{ - int index = 0, ret = 0; - struct msm_sensor_power_setting *pd = NULL; - struct msm_sensor_power_setting *ps; - - CDBG("%s:%d\n", __func__, __LINE__); - if (!ctrl || !sensor_i2c_client) { - pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl, - sensor_i2c_client); - return -EINVAL; - } - if (device_type == MSM_CAMERA_PLATFORM_DEVICE) - sensor_i2c_client->i2c_func_tbl->i2c_util( - sensor_i2c_client, MSM_CCI_RELEASE); - - for (index = 0; index < ctrl->power_down_setting_size; index++) { - CDBG("%s index %d\n", __func__, index); - pd = &ctrl->power_down_setting[index]; - ps = NULL; - CDBG("%s type %d\n", __func__, pd->seq_type); - switch (pd->seq_type) { - case SENSOR_CLK: - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - if (ps) - msm_cam_clk_enable(ctrl->dev, - &ctrl->clk_info[0], - (struct clk **)&ps->data[0], - ctrl->clk_info_size, - 0); - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_GPIO: - if (pd->seq_val >= SENSOR_GPIO_MAX || - !ctrl->gpio_conf->gpio_num_info) { - pr_err("%s gpio index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - if (!ctrl->gpio_conf->gpio_num_info->valid - [pd->seq_val]) - continue; - gpio_set_value_cansleep( - ctrl->gpio_conf->gpio_num_info->gpio_num - [pd->seq_val], - 0); - break; - case SENSOR_VREG: - if (pd->seq_val >= CAM_VREG_MAX) { - pr_err("%s vreg index %d >= max %d\n", __func__, - pd->seq_val, - SENSOR_GPIO_MAX); - continue; - } - - ps = msm_camera_get_power_settings(ctrl, - pd->seq_type, - pd->seq_val); - - if (ps) -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ctrl->cam_vreg\ - [pd->seq_val].regulator[0], - 0); -#else - msm_camera_config_single_vreg(ctrl->dev, - &ctrl->cam_vreg[pd->seq_val], - (struct regulator **)&ps->data[0], - 0); -#endif - else - pr_err("%s error in power up/down seq data\n", - __func__); - break; - case SENSOR_I2C_MUX: - if (ctrl->i2c_conf && ctrl->i2c_conf->use_i2c_mux) - msm_camera_disable_i2c_mux(ctrl->i2c_conf); - break; - default: - pr_err("%s error power seq type %d\n", __func__, - pd->seq_type); - break; - } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if (pd->delay) { - usleep_range(pd->delay * 100, - (pd->delay * 100) + 100); - } -#else - if (pd->delay > 20) { - msleep(pd->delay); - } else if (pd->delay) { - usleep_range(pd->delay * 1000, - (pd->delay * 1000) + 1000); - } -#endif - } - if (ctrl->cam_pinctrl_status) { - ret = pinctrl_select_state(ctrl->pinctrl_info.pinctrl, - ctrl->pinctrl_info.gpio_state_suspend); - if (ret) - pr_err("%s:%d cannot set pin to suspend state", - __func__, __LINE__); - devm_pinctrl_put(ctrl->pinctrl_info.pinctrl); - } - ctrl->cam_pinctrl_status = 0; - if(ctrl->gpio_conf->cam_gpio_req_tbl_size > 0) { - msm_camera_request_gpio_table( - ctrl->gpio_conf->cam_gpio_req_tbl, - ctrl->gpio_conf->cam_gpio_req_tbl_size, 0); - } - CDBG("%s exit\n", __func__); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.h deleted file mode 100644 index d10948b9af1f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_dt_util.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_DT_UTIL_H__ -#define MSM_CAMERA_DT_UTIL_H__ - -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_i2c.h" - -int msm_sensor_get_sub_module_index(struct device_node *of_node, - struct msm_sensor_info_t **s_info); - -int msm_sensor_get_dt_actuator_data(struct device_node *of_node, - struct msm_actuator_info **act_info); - -int msm_sensor_get_dt_csi_data(struct device_node *of_node, - struct msm_camera_csi_lane_params **csi_lane_params); - -int msm_camera_get_dt_power_setting_data(struct device_node *of_node, - struct camera_vreg_t *cam_vreg, int num_vreg, - struct msm_camera_power_ctrl_t *power_info); - -int msm_camera_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int msm_camera_get_dt_vreg_data(struct device_node *of_node, - struct camera_vreg_t **cam_vreg, int *num_vreg); - -#if defined (CONFIG_CAMERA_SYSFS_V2) -int msm_camera_get_dt_camera_info(struct device_node *of_node, char *buf); -#endif - -int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl, - enum msm_camera_device_type_t device_type, - struct msm_camera_i2c_client *sensor_i2c_client); - -int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg, - int num_vreg, struct msm_sensor_power_setting *power_setting, - uint16_t power_setting_size); -int query_cam_power_status(void); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c.h deleted file mode 100644 index 00a2a6332e78..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_CAMERA_CCI_I2C_H -#define MSM_CAMERA_CCI_I2C_H - -#include -#include -#include "../../include/media/msm_cam_sensor.h" - -struct msm_camera_i2c_client { - struct msm_camera_i2c_fn_t *i2c_func_tbl; - struct i2c_client *client; - struct msm_camera_cci_client *cci_client; - struct msm_camera_spi_client *spi_client; - enum msm_camera_i2c_reg_addr_type addr_type; -}; - -struct msm_camera_i2c_fn_t { - int (*i2c_read) (struct msm_camera_i2c_client *, uint32_t, uint16_t *, - enum msm_camera_i2c_data_type); - int32_t (*i2c_read_seq)(struct msm_camera_i2c_client *, uint32_t, - uint8_t *, uint32_t); - int (*i2c_write) (struct msm_camera_i2c_client *, uint32_t, uint16_t, - enum msm_camera_i2c_data_type); - int (*i2c_write_seq) (struct msm_camera_i2c_client *, uint32_t , - uint8_t *, uint32_t); - int32_t (*i2c_write_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_burst_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_write_seq_table)(struct msm_camera_i2c_client *, - struct msm_camera_i2c_seq_reg_setting *); - int32_t (*i2c_write_table_w_microdelay) - (struct msm_camera_i2c_client *, - struct msm_camera_i2c_reg_setting *); - int32_t (*i2c_util)(struct msm_camera_i2c_client *, uint16_t); - int32_t (*i2c_write_conf_tbl)(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - int32_t (*i2c_poll)(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); -}; - -int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_cci_i2c_write_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_burst_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_seq_table( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_cci_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client, - uint16_t cci_cmd); - -int32_t msm_camera_cci_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting); - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.c deleted file mode 100644 index cd2af2c2751e..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundatation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "msm_camera_i2c_mux.h" - -/* TODO move this somewhere else */ -#define MSM_I2C_MUX_DRV_NAME "msm_cam_i2c_mux" -static int msm_i2c_mux_config(struct i2c_mux_device *mux_device, uint8_t *mode) -{ - uint32_t val; - val = msm_camera_io_r(mux_device->ctl_base); - if (*mode == MODE_DUAL) { - msm_camera_io_w(val | 0x3, mux_device->ctl_base); - } else if (*mode == MODE_L) { - msm_camera_io_w(((val | 0x2) & ~(0x1)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config left value is %d\n", val); - } else { - msm_camera_io_w(((val | 0x1) & ~(0x2)), mux_device->ctl_base); - val = msm_camera_io_r(mux_device->ctl_base); - CDBG("the camio mode config right value is %d\n", val); - } - return 0; -} - -static int msm_i2c_mux_init(struct i2c_mux_device *mux_device) -{ - int rc = 0, val = 0; - if (mux_device->use_count == 0) { - mux_device->ctl_base = ioremap(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem)); - if (!mux_device->ctl_base) { - rc = -ENOMEM; - return rc; - } - mux_device->rw_base = ioremap(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem)); - if (!mux_device->rw_base) { - rc = -ENOMEM; - iounmap(mux_device->ctl_base); - return rc; - } - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val | 0x200), mux_device->rw_base); - } - mux_device->use_count++; - return 0; -}; - -static int msm_i2c_mux_release(struct i2c_mux_device *mux_device) -{ - int val = 0; - mux_device->use_count--; - if (mux_device->use_count == 0) { - val = msm_camera_io_r(mux_device->rw_base); - msm_camera_io_w((val & ~0x200), mux_device->rw_base); - iounmap(mux_device->rw_base); - iounmap(mux_device->ctl_base); - } - return 0; -} - -static long msm_i2c_mux_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - mux_device = v4l2_get_subdevdata(sd); - if (mux_device == NULL) { - rc = -ENOMEM; - return rc; - } - mutex_lock(&mux_device->mutex); - switch (cmd) { - case VIDIOC_MSM_I2C_MUX_CFG: - rc = msm_i2c_mux_config(mux_device, (uint8_t *) arg); - break; - case VIDIOC_MSM_I2C_MUX_INIT: - rc = msm_i2c_mux_init(mux_device); - break; - case VIDIOC_MSM_I2C_MUX_RELEASE: - rc = msm_i2c_mux_release(mux_device); - break; - default: - rc = -ENOIOCTLCMD; - } - mutex_unlock(&mux_device->mutex); - return rc; -} - -static struct v4l2_subdev_core_ops msm_i2c_mux_subdev_core_ops = { - .ioctl = &msm_i2c_mux_subdev_ioctl, -}; - -static const struct v4l2_subdev_ops msm_i2c_mux_subdev_ops = { - .core = &msm_i2c_mux_subdev_core_ops, -}; - -static int i2c_mux_probe(struct platform_device *pdev) -{ - struct i2c_mux_device *mux_device; - int rc = 0; - CDBG("%s: device id = %d\n", __func__, pdev->id); - mux_device = kzalloc(sizeof(struct i2c_mux_device), GFP_KERNEL); - if (!mux_device) { - pr_err("%s: no enough memory\n", __func__); - return -ENOMEM; - } - - v4l2_subdev_init(&mux_device->subdev, &msm_i2c_mux_subdev_ops); - v4l2_set_subdevdata(&mux_device->subdev, mux_device); - platform_set_drvdata(pdev, &mux_device->subdev); - mutex_init(&mux_device->mutex); - - mux_device->ctl_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_ctl"); - if (!mux_device->ctl_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->ctl_io = request_mem_region(mux_device->ctl_mem->start, - resource_size(mux_device->ctl_mem), pdev->name); - if (!mux_device->ctl_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->rw_mem = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "i2c_mux_rw"); - if (!mux_device->rw_mem) { - pr_err("%s: no mem resource?\n", __func__); - rc = -ENODEV; - goto i2c_mux_no_resource; - } - mux_device->rw_io = request_mem_region(mux_device->rw_mem->start, - resource_size(mux_device->rw_mem), pdev->name); - if (!mux_device->rw_io) { - pr_err("%s: no valid mem region\n", __func__); - rc = -EBUSY; - goto i2c_mux_no_resource; - } - mux_device->pdev = pdev; - return 0; - -i2c_mux_no_resource: - mutex_destroy(&mux_device->mutex); - kfree(mux_device); - return 0; -} - -static struct platform_driver i2c_mux_driver = { - .probe = i2c_mux_probe, - .driver = { - .name = MSM_I2C_MUX_DRV_NAME, - .owner = THIS_MODULE, - }, -}; - -static int __init msm_camera_i2c_mux_init_module(void) -{ - return platform_driver_register(&i2c_mux_driver); -} - -static void __exit msm_camera_i2c_mux_exit_module(void) -{ - platform_driver_unregister(&i2c_mux_driver); -} - -module_init(msm_camera_i2c_mux_init_module); -module_exit(msm_camera_i2c_mux_exit_module); -MODULE_DESCRIPTION("MSM Camera I2C mux driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.h deleted file mode 100644 index 30f908b12e15..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_i2c_mux.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_I2C_MUX_H -#define MSM_I2C_MUX_H - -#include -#include - -struct i2c_mux_device { - struct platform_device *pdev; - struct v4l2_subdev subdev; - struct resource *ctl_mem; - struct resource *ctl_io; - void __iomem *ctl_base; - struct resource *rw_mem; - struct resource *rw_io; - void __iomem *rw_base; - struct mutex mutex; - unsigned use_count; -}; - -struct i2c_mux_cfg_params { - struct v4l2_subdev *subdev; - void *parms; -}; - -#define VIDIOC_MSM_I2C_MUX_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct i2c_mux_cfg_params) - -#define VIDIOC_MSM_I2C_MUX_INIT \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct v4l2_subdev*) - -#define VIDIOC_MSM_I2C_MUX_RELEASE \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct v4l2_subdev*) - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.c deleted file mode 100644 index 3b309af15e8d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.c +++ /dev/null @@ -1,689 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include -#include "msm_camera_io_util.h" - -#define BUFF_SIZE_128 128 -#define CDBG(fmt, args...) pr_err(fmt, ##args) - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#ifdef CONFIG_MFD_RT5033_RESET_WA -#ifdef CONFIG_CAM_USE_EXT_VANA_GPIO -#define RT5033_RESET_WA_VREG_NAME ("cam_vdig") -#else -#define RT5033_RESET_WA_VREG_NAME ("cam_vana") -#endif -#endif - -#if defined(CONFIG_MACH_A5_CHN_CTC) || defined(CONFIG_MACH_A5_CHN_OPEN) || defined(CONFIG_MACH_A5_CHN_ZH) || defined(CONFIG_MACH_A5_CHN_ZT) -extern unsigned int system_rev; -#define RESET_REV_CHECK_NUM 10 -#endif - -#if defined(CONFIG_SEC_A7X_PROJECT) -extern unsigned int system_rev; -#endif - -void msm_camera_io_w(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - writel_relaxed((data), (addr)); -} - -void msm_camera_io_w_mb(u32 data, void __iomem *addr) -{ - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - wmb(); - writel_relaxed((data), (addr)); - wmb(); -} - -u32 msm_camera_io_r(void __iomem *addr) -{ - uint32_t data = readl_relaxed(addr); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -u32 msm_camera_io_r_mb(void __iomem *addr) -{ - uint32_t data; - rmb(); - data = readl_relaxed(addr); - rmb(); - CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data)); - return data; -} - -void msm_camera_io_memcpy_toio(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < len; i++) - writel_relaxed(*s++, d++); -} - -void msm_camera_io_dump(void __iomem *addr, int size) -{ - char line_str[BUFF_SIZE_128], *p_str; - int i; - u32 *p = (u32 *) addr; - u32 data; - CDBG("%s: %pK %d\n", __func__, addr, size); - line_str[0] = '\0'; - p_str = line_str; - for (i = 0; i < size/4; i++) { - if (i % 4 == 0) { - snprintf(p_str, 12, "0x%p: ", p); - p_str += 10; - } - data = readl_relaxed(p++); - snprintf(p_str, 12, "%d ", data); - p_str += 9; - if ((i + 1) % 4 == 0) { - CDBG("%s\n", line_str); - line_str[0] = '\0'; - p_str = line_str; - } - } - if (line_str[0] != '\0') - CDBG("%s\n", line_str); -} - -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len); - msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4); - msm_camera_io_dump(dest_addr, len); -} - -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len) -{ - int i; - u32 *d = (u32 *) dest_addr; - u32 *s = (u32 *) src_addr; - - for (i = 0; i < (len / 4); i++) - msm_camera_io_w_mb(*s++, d++); -} - -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk) -{ - int i; - int rc = 0; - struct clk *mux_clk = NULL; - struct clk *src_clk = NULL; - - for (i = 0; i < num_clk; i++) { - if (clk_src_info[i].clk_name) { - mux_clk = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(mux_clk)) { - pr_err("%s get failed\n", - clk_info[i].clk_name); - continue; - } - src_clk = clk_get(dev, clk_src_info[i].clk_name); - if (IS_ERR(src_clk)) { - pr_err("%s get failed\n", - clk_src_info[i].clk_name); - continue; - } - clk_set_parent(mux_clk, src_clk); - } - } - return rc; -} - -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable) -{ - int i; - int rc = 0; - long clk_rate; - if (enable) { - for (i = 0; i < num_clk; i++) { - CDBG("%s enable %s\n", __func__, - clk_info[i].clk_name); - clk_ptr[i] = clk_get(dev, clk_info[i].clk_name); - if (IS_ERR(clk_ptr[i])) { - pr_err("%s get failed\n", clk_info[i].clk_name); - rc = PTR_ERR(clk_ptr[i]); - goto cam_clk_get_err; - } - if (clk_info[i].clk_rate > 0) { - rc = clk_set_rate(clk_ptr[i], - clk_info[i].clk_rate); - if (rc < 0) { - pr_err("%s set failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } else if (clk_info[i].clk_rate == INIT_RATE) { - clk_rate = clk_get_rate(clk_ptr[i]); - if (clk_rate == 0) { - clk_rate = - clk_round_rate(clk_ptr[i], 0); - if (clk_rate < 0) { - pr_err("%s round rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - rc = clk_set_rate(clk_ptr[i], - clk_rate); - if (rc < 0) { - pr_err("%s set rate failed\n", - clk_info[i].clk_name); - goto cam_clk_set_err; - } - } - } - rc = clk_prepare(clk_ptr[i]); - if (rc < 0) { - pr_err("%s prepare failed\n", - clk_info[i].clk_name); - goto cam_clk_prepare_err; - } - - rc = clk_enable(clk_ptr[i]); - if (rc < 0) { - pr_err("%s enable failed\n", - clk_info[i].clk_name); - goto cam_clk_enable_err; - } - if (clk_info[i].delay > 20) { - msleep(clk_info[i].delay); - } else if (clk_info[i].delay) { - usleep_range(clk_info[i].delay * 1000, - (clk_info[i].delay * 1000) + 1000); - } - } - } else { - for (i = num_clk - 1; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - CDBG("%s disable %s\n", __func__, - clk_info[i].clk_name); - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - } - return rc; - - -cam_clk_enable_err: - clk_unprepare(clk_ptr[i]); -cam_clk_prepare_err: -cam_clk_set_err: - clk_put(clk_ptr[i]); -cam_clk_get_err: - for (i--; i >= 0; i--) { - if (clk_ptr[i] != NULL) { - clk_disable(clk_ptr[i]); - clk_unprepare(clk_ptr[i]); - clk_put(clk_ptr[i]); - } - } - return rc; -} - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config) -{ - int i = 0, j = 0; - int rc = 0; - struct camera_vreg_t *curr_vreg; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (cam_vreg == NULL) { - pr_err("%s:%d cam_vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (config) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - reg_ptr[j] = regulator_get(dev, - curr_vreg->reg_name); - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s get failed\n", - __func__, - curr_vreg->reg_name); - reg_ptr[j] = NULL; - goto vreg_get_fail; - } - if (curr_vreg->type == REG_LDO) { - rc = regulator_set_voltage( - reg_ptr[j], - curr_vreg->min_voltage, - curr_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (curr_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode( - reg_ptr[j], - curr_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s:%s set optimum mode fail\n", - __func__, - curr_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - if (reg_ptr[j]) { - if (curr_vreg->type == REG_LDO) { - if (curr_vreg->op_mode >= 0) { - regulator_set_optimum_mode( - reg_ptr[j], 0); - } - regulator_set_voltage( - reg_ptr[j], 0, curr_vreg-> - max_voltage); - } - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - } - } - } - return 0; - -vreg_unconfig: -if (curr_vreg->type == REG_LDO) - regulator_set_optimum_mode(reg_ptr[j], 0); - -vreg_set_opt_mode_fail: -if (curr_vreg->type == REG_LDO) - regulator_set_voltage(reg_ptr[j], 0, - curr_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(reg_ptr[j]); - reg_ptr[j] = NULL; - -vreg_get_fail: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - curr_vreg = &cam_vreg[j]; - goto vreg_unconfig; - } - return -ENODEV; -} - -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable) -{ - int i = 0, j = 0, rc = 0; - - if (num_vreg_seq > num_vreg) { - pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__); - return -EINVAL; - } - if (!num_vreg_seq) - num_vreg_seq = num_vreg; - - if (enable) { - for (i = 0; i < num_vreg_seq; i++) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - if (IS_ERR(reg_ptr[j])) { - pr_err("%s: %s null regulator\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - rc = regulator_enable(reg_ptr[j]); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg[j].reg_name); - goto disable_vreg; - } - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } else { - for (i = num_vreg_seq-1; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - } - return rc; -disable_vreg: - for (i--; i >= 0; i--) { - if (vreg_seq) { - j = vreg_seq[i]; - if (j >= num_vreg) - continue; - } else - j = i; - regulator_disable(reg_ptr[j]); - if (cam_vreg[j].delay > 20) - msleep(cam_vreg[j].delay); - else if (cam_vreg[j].delay) - usleep_range(cam_vreg[j].delay * 1000, - (cam_vreg[j].delay * 1000) + 1000); - } - return rc; -} - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting) -{ - int rc = 0; - if (!bus_perf_client) { - pr_err("%s: Bus Client NOT Registered!!!\n", __func__); - return; - } - - switch (perf_setting) { - case S_EXIT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - msm_bus_scale_unregister_client(bus_perf_client); - break; - case S_PREVIEW: - rc = msm_bus_scale_client_update_request(bus_perf_client, 1); - break; - case S_VIDEO: - rc = msm_bus_scale_client_update_request(bus_perf_client, 2); - break; - case S_CAPTURE: - rc = msm_bus_scale_client_update_request(bus_perf_client, 3); - break; - case S_ZSL: - rc = msm_bus_scale_client_update_request(bus_perf_client, 4); - break; - case S_LIVESHOT: - rc = msm_bus_scale_client_update_request(bus_perf_client, 5); - break; - case S_DEFAULT: - break; - default: - pr_warning("%s: INVALID CASE\n", __func__); - } -} - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en) -{ - int rc = 0, i; - - if (gpio_en) { - for (i = 0; i < gpio_tbl_size; i++) { - gpio_set_value_cansleep(gpio_tbl[i].gpio, - gpio_tbl[i].flags); - usleep_range(gpio_tbl[i].delay, - gpio_tbl[i].delay + 1000); - } - } else { - for (i = gpio_tbl_size - 1; i >= 0; i--) { - if (gpio_tbl[i].flags) - gpio_set_value_cansleep(gpio_tbl[i].gpio, - GPIOF_OUT_INIT_LOW); - } - } - return rc; -} - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config) -{ - int rc = 0; -#ifdef CONFIG_MFD_RT5033_RESET_WA - int rt_rc = 0; -#endif - - if (config) { - if (!dev || !cam_vreg || !reg_ptr || !(cam_vreg->reg_name)) { - pr_err("%s: get failed NULL parameter\n", __func__); - goto vreg_get_fail; - } - CDBG("%s enable %s\n", __func__, cam_vreg->reg_name); - if (!strncmp(cam_vreg->reg_name, "cam_vdig", 8)) { -#if defined(CONFIG_SEC_ROSSA_PROJECT) - *reg_ptr = regulator_get(dev, "CAM_SENSOR_IO_1.8V"); -#else - *reg_ptr = regulator_get(dev, "CAM_SENSOR_CORE_1.2V"); -#endif - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } - -#if defined(CONFIG_SEC_A8_PROJECT) || defined(CONFIG_SEC_O7_PROJECT) || defined(CONFIG_MACH_J7_USA_SPR) - else if (!strncmp(cam_vreg->reg_name, "cam_vaf", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#else - else if (!strncmp(cam_vreg->reg_name, "cam_vana", 8)) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#endif -#if defined(CONFIG_SEC_A7X_PROJECT) - else if (!strncmp(cam_vreg->reg_name, "cam_vaf", 8) && system_rev == 0) { - *reg_ptr = regulator_get(dev, "CAM_SENSOR_A2.8V"); - if (IS_ERR(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - } -#endif - else { - CDBG("Regulator - Entering Else Part\n"); - *reg_ptr = regulator_get(dev, cam_vreg->reg_name); - if (IS_ERR_OR_NULL(*reg_ptr)) { - pr_err("%s: %s get failed\n", __func__, - cam_vreg->reg_name); - *reg_ptr = NULL; - goto vreg_get_fail; - } - if (cam_vreg->type == REG_LDO) { - CDBG("LDO - Inside REG_LDO\n"); - rc = regulator_set_voltage( - *reg_ptr, cam_vreg->min_voltage, - cam_vreg->max_voltage); - if (rc < 0) { - pr_err("%s: %s set voltage failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_voltage_fail; - } - if (cam_vreg->op_mode >= 0) { - rc = regulator_set_optimum_mode(*reg_ptr, - cam_vreg->op_mode); - if (rc < 0) { - pr_err( - "%s: %s set optimum mode failed\n", - __func__, cam_vreg->reg_name); - goto vreg_set_opt_mode_fail; - } - } - } - } -#ifdef CONFIG_MFD_RT5033_RESET_WA - if (!strncmp(cam_vreg->reg_name, RT5033_RESET_WA_VREG_NAME, 8)){ - rt_rc = regulator_get_status(*reg_ptr); -#if defined(CONFIG_MACH_A5_CHN_CTC) || defined(CONFIG_MACH_A5_CHN_OPEN) || defined(CONFIG_MACH_A5_CHN_ZH) || defined(CONFIG_MACH_A5_CHN_ZT) - if ((system_rev > RESET_REV_CHECK_NUM && rt_rc==2) || rt_rc==8) -#else - if((rt_rc == 2) || (rt_rc == 8)) -#endif - { - BUG_ON(1); - } else { - pr_err("[RT5033] result : 0x%x\n", rt_rc); - } - } -#endif - CDBG("Going to Enable the Regulator %s,%d\n",cam_vreg->reg_name,__LINE__); - rc = regulator_enable(*reg_ptr); - CDBG("After Enabling the Regulator %s - rc=%d\n",cam_vreg->reg_name,rc); - if (rc < 0) { - pr_err("%s: %s enable failed\n", - __func__, cam_vreg->reg_name); - goto vreg_unconfig; - } - } else { - CDBG("Regulator - %s,%d\n",__func__,__LINE__); - if (*reg_ptr) { - CDBG("%s disable %s\n", __func__, cam_vreg->reg_name); - regulator_disable(*reg_ptr); - if (cam_vreg->type == REG_LDO) { - if (cam_vreg->op_mode >= 0) - regulator_set_optimum_mode(*reg_ptr, 0); - regulator_set_voltage( - *reg_ptr, 0, cam_vreg->max_voltage); - } - regulator_put(*reg_ptr); - *reg_ptr = NULL; - } - } - CDBG("Before Return - %s,%d\n",__func__,__LINE__); - return 0; - -vreg_unconfig: -if (cam_vreg->type == REG_LDO) - regulator_set_optimum_mode(*reg_ptr, 0); - -vreg_set_opt_mode_fail: -if (cam_vreg->type == REG_LDO) - regulator_set_voltage(*reg_ptr, 0, cam_vreg->max_voltage); - -vreg_set_voltage_fail: - regulator_put(*reg_ptr); - *reg_ptr = NULL; - -vreg_get_fail: - return -ENODEV; -} - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en) -{ - int rc = 0, i = 0, err = 0; - - if (!gpio_tbl || !size) { - pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__, - __LINE__, gpio_tbl, size); - return -EINVAL; - } - for (i = 0; i < size; i++) { - CDBG("%s:%d i %d, gpio %d dir %ld\n", __func__, __LINE__, i, - gpio_tbl[i].gpio, gpio_tbl[i].flags); - } - if (gpio_en) { - for (i = 0; i < size; i++) { - err = gpio_request_one(gpio_tbl[i].gpio, - gpio_tbl[i].flags, gpio_tbl[i].label); - if (err) { - /* - * After GPIO request fails, contine to - * apply new gpios, outout a error message - * for driver bringup debug - */ - pr_err("%s:%d gpio %d:%s request fails\n", - __func__, __LINE__, - gpio_tbl[i].gpio, gpio_tbl[i].label); - } - } - } else { - gpio_free_array(gpio_tbl, size); - } - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.h deleted file mode 100644 index 04d34092b90b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_io_util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_IO_UTIL_H -#define __MSM_CAMERA_IO_UTIL_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include "../../include/media/msm_cam_sensor.h" - -#define NO_SET_RATE -1 -#define INIT_RATE -2 - -void msm_camera_io_w(u32 data, void __iomem *addr); -void msm_camera_io_w_mb(u32 data, void __iomem *addr); -u32 msm_camera_io_r(void __iomem *addr); -u32 msm_camera_io_r_mb(void __iomem *addr); -void msm_camera_io_dump(void __iomem *addr, int size); -void msm_camera_io_memcpy(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -void msm_camera_io_memcpy_mb(void __iomem *dest_addr, - void __iomem *src_addr, u32 len); -int msm_cam_clk_sel_src(struct device *dev, struct msm_cam_clk_info *clk_info, - struct msm_cam_clk_info *clk_src_info, int num_clk); -int msm_cam_clk_enable(struct device *dev, struct msm_cam_clk_info *clk_info, - struct clk **clk_ptr, int num_clk, int enable); - -int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int config); -int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg, - int num_vreg, enum msm_camera_vreg_name_t *vreg_seq, - int num_vreg_seq, struct regulator **reg_ptr, int enable); - -void msm_camera_bus_scale_cfg(uint32_t bus_perf_client, - enum msm_bus_perf_setting perf_setting); - -int msm_camera_set_gpio_table(struct msm_gpio_set_tbl *gpio_tbl, - uint8_t gpio_tbl_size, int gpio_en); - -void msm_camera_config_single_gpio(uint16_t gpio, unsigned long flags, - int gpio_en); - -int msm_camera_config_single_vreg(struct device *dev, - struct camera_vreg_t *cam_vreg, struct regulator **reg_ptr, int config); - -int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size, - int gpio_en); - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_qup_i2c.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_qup_i2c.c deleted file mode 100644 index d88312d0bd79..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_qup_i2c.c +++ /dev/null @@ -1,586 +0,0 @@ -/* Copyright (c) 2011, 2013-2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_i2c.h" - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -#define I2C_COMPARE_MATCH 0 -#define I2C_COMPARE_MISMATCH 1 -#define I2C_POLL_MAX_ITERATION 20 - -static int32_t msm_camera_qup_i2c_rxdata( - struct msm_camera_i2c_client *dev_client, unsigned char *rxdata, - int data_length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msgs[] = { - { - .addr = saddr, - .flags = 0, - .len = dev_client->addr_type, - .buf = rxdata, - }, - { - .addr = saddr, - .flags = I2C_M_RD, - .len = data_length, - .buf = rxdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msgs, 2); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_rxdata failed 0x%x\n", saddr); - return rc; -} - -static int32_t msm_camera_qup_i2c_txdata( - struct msm_camera_i2c_client *dev_client, unsigned char *txdata, - int length) -{ - int32_t rc = 0; - uint16_t saddr = dev_client->client->addr >> 1; - struct i2c_msg msg[] = { - { - .addr = saddr, - .flags = 0, - .len = length, - .buf = txdata, - }, - }; - rc = i2c_transfer(dev_client->client->adapter, msg, 1); - if (rc < 0) - S_I2C_DBG("msm_camera_qup_i2c_txdata faild 0x%x\n", saddr); - return rc; -} - -int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char *buf = NULL; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - if (client->addr_type > UINT_MAX - data_type) { - pr_err("%s: integer overflow prevented\n", __func__); - return rc; - } - - buf = kzalloc(client->addr_type+data_type, GFP_KERNEL); - if (!buf) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, data_type); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - kfree(buf); - buf = NULL; - return rc; - } - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = buf[0]; - else - *data = buf[0] << 8 | buf[1]; - - S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data); - kfree(buf); - buf = NULL; - return rc; -} - -int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char *buf = NULL; - int i; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - if (num_byte > I2C_REG_DATA_MAX) { - pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n", - __func__, num_byte, I2C_REG_DATA_MAX); - return rc; - } - if (client->addr_type > UINT_MAX - num_byte) { - pr_err("%s: integer overflow prevented\n", __func__); - return rc; - } - - buf = kzalloc(client->addr_type+num_byte, GFP_KERNEL); - if (!buf) { - pr_err("%s:%d no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - } - rc = msm_camera_qup_i2c_rxdata(client, buf, num_byte); - if (rc < 0) { - S_I2C_DBG("%s fail\n", __func__); - kfree(buf); - buf = NULL; - return rc; - } - - S_I2C_DBG("%s addr = 0x%x", __func__, addr); - for (i = 0; i < num_byte; i++) { - data[i] = buf[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - kfree(buf); - buf = NULL; - return rc; -} - -int32_t msm_camera_qup_i2c_write(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+data_type]; - uint8_t len = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (data_type != MSM_CAMERA_I2C_BYTE_DATA - && data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x data type: %d\n", - __func__, addr, data_type); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - S_I2C_DBG("Data: 0x%x\n", data); - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) { - buf[len] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - len += 1; - } else if (data_type == MSM_CAMERA_I2C_WORD_DATA) { - buf[len] = data >> BITS_PER_BYTE; - buf[len+1] = data; - S_I2C_DBG("Byte %d: 0x%x\n", len, buf[len]); - S_I2C_DBG("Byte %d: 0x%x\n", len+1, buf[len+1]); - len += 2; - } - rc = msm_camera_qup_i2c_txdata(client, buf, len); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - int32_t rc = -EFAULT; - unsigned char buf[client->addr_type+num_byte]; - uint8_t len = 0, i = 0; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || num_byte == 0) - return rc; - - S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n", - __func__, addr, num_byte); - if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) { - buf[0] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - len = 1; - } else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) { - buf[0] = addr >> BITS_PER_BYTE; - buf[1] = addr; - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len, buf[len]); - S_I2C_DBG("%s byte %d: 0x%x\n", __func__, - len+1, buf[len+1]); - len = 2; - } - for (i = 0; i < num_byte; i++) { - buf[i+len] = data[i]; - S_I2C_DBG("Byte %d: 0x%x\n", i+len, buf[i+len]); - S_I2C_DBG("Data: 0x%x\n", data[i]); - } - rc = msm_camera_qup_i2c_txdata(client, buf, len+num_byte); - if (rc < 0) - S_I2C_DBG("%s fail\n", __func__); - return rc; -} - -int32_t msm_camera_qup_i2c_write_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - for (i = 0; i < write_setting->size; i++) { - CDBG("%s addr 0x%x data 0x%x\n", __func__, - reg_setting->reg_addr, reg_setting->reg_data); - - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client, - struct msm_camera_i2c_seq_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t client_addr_type; - - if (!client || !write_setting) - return rc; - - if ((write_setting->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && write_setting->addr_type != MSM_CAMERA_I2C_WORD_ADDR)) { - pr_err("%s Invalide addr type %d\n", __func__, - write_setting->addr_type); - return rc; - } - - reg_setting = write_setting->reg_setting; - client_addr_type = client->addr_type; - client->addr_type = write_setting->addr_type; - - if (reg_setting->reg_data_size > I2C_SEQ_REG_DATA_MAX) { - pr_err("%s: number of bytes %u exceeding the max supported %d\n", - __func__, reg_setting->reg_data_size, I2C_SEQ_REG_DATA_MAX); - return rc; - } - - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write_seq(client, reg_setting->reg_addr, - reg_setting->reg_data, reg_setting->reg_data_size); - if (rc < 0) - break; - reg_setting++; - } - if (write_setting->delay > 20) - msleep(write_setting->delay); - else if (write_setting->delay) - usleep_range(write_setting->delay * 1000, (write_setting->delay - * 1000) + 1000); - - client->addr_type = client_addr_type; - return rc; -} - -int32_t msm_camera_qup_i2c_write_table_w_microdelay( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_setting *write_setting) -{ - int i; - int32_t rc = -EFAULT; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (!client || !write_setting) - return rc; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR - && client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - || (write_setting->data_type != MSM_CAMERA_I2C_BYTE_DATA - && write_setting->data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - reg_setting = write_setting->reg_setting; - for (i = 0; i < write_setting->size; i++) { - rc = msm_camera_qup_i2c_write(client, reg_setting->reg_addr, - reg_setting->reg_data, write_setting->data_type); - if (rc < 0) - break; - if (reg_setting->delay) - usleep_range(reg_setting->delay, - reg_setting->delay + 1000); - reg_setting++; - } - return rc; -} - -static int32_t msm_camera_qup_i2c_compare(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data = 0; - int data_len = 0; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - data_len = data_type; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - data_len = MSM_CAMERA_I2C_BYTE_DATA; - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - data_len = MSM_CAMERA_I2C_WORD_DATA; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_len); - if (rc < 0) - return rc; - - rc = I2C_COMPARE_MISMATCH; - switch (data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - if (data == reg_data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - case MSM_CAMERA_I2C_SET_WORD_MASK: - if ((reg_data & data) == data) - rc = I2C_COMPARE_MATCH; - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - if (!(reg_data & data)) - rc = I2C_COMPARE_MATCH; - break; - default: - pr_err("%s: Unsupport data type: %d\n", __func__, data_type); - break; - } - - S_I2C_DBG("%s: Register and data match result %d\n", __func__, - rc); - return rc; -} - -int32_t msm_camera_qup_i2c_poll(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - int i; - S_I2C_DBG("%s: addr: 0x%x data: 0x%x dt: %d\n", - __func__, addr, data, data_type); - - for (i = 0; i < I2C_POLL_MAX_ITERATION; i++) { - rc = msm_camera_qup_i2c_compare(client, - addr, data, data_type); - if (rc == 0 || rc < 0) - break; - usleep_range(10000, 11000); - } - return rc; -} - -static int32_t msm_camera_qup_i2c_set_mask(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t mask, - enum msm_camera_i2c_data_type data_type, uint16_t set_mask) -{ - int32_t rc; - uint16_t reg_data; - - rc = msm_camera_qup_i2c_read(client, addr, ®_data, data_type); - if (rc < 0) { - S_I2C_DBG("%s read fail\n", __func__); - return rc; - } - S_I2C_DBG("%s addr: 0x%x data: 0x%x setmask: 0x%x\n", - __func__, addr, reg_data, mask); - - if (set_mask) - reg_data |= mask; - else - reg_data &= ~mask; - S_I2C_DBG("%s write: 0x%x\n", __func__, reg_data); - - rc = msm_camera_qup_i2c_write(client, addr, reg_data, data_type); - if (rc < 0) - S_I2C_DBG("%s write fail\n", __func__); - - return rc; -} - -static int32_t msm_camera_qup_i2c_set_write_mask_data( - struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t data, int16_t mask, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc; - uint16_t reg_data; - CDBG("%s\n", __func__); - if (mask == -1) - return 0; - if (mask == 0) { - rc = msm_camera_qup_i2c_write(client, addr, data, data_type); - } else { - rc = msm_camera_qup_i2c_read(client, addr, ®_data, - data_type); - if (rc < 0) { - CDBG("%s read fail\n", __func__); - return rc; - } - reg_data &= ~mask; - reg_data |= (data & mask); - rc = msm_camera_qup_i2c_write(client, addr, reg_data, - data_type); - if (rc < 0) - CDBG("%s write fail\n", __func__); - } - return rc; -} - - -int32_t msm_camera_qup_i2c_write_conf_tbl( - struct msm_camera_i2c_client *client, - struct msm_camera_i2c_reg_conf *reg_conf_tbl, uint16_t size, - enum msm_camera_i2c_data_type data_type) -{ - int i; - int32_t rc = -EFAULT; - pr_err("%s, E. ", __func__); - for (i = 0; i < size; i++) { - enum msm_camera_i2c_data_type dt; - if (reg_conf_tbl->cmd_type == MSM_CAMERA_I2C_CMD_POLL) { - rc = msm_camera_qup_i2c_poll(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->dt); - } else { - if (reg_conf_tbl->dt == 0) - dt = data_type; - else - dt = reg_conf_tbl->dt; - switch (dt) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = msm_camera_qup_i2c_write( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, dt); - break; - case MSM_CAMERA_I2C_SET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_BYTE_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_BYTE_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 1); - break; - case MSM_CAMERA_I2C_UNSET_WORD_MASK: - rc = msm_camera_qup_i2c_set_mask(client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - MSM_CAMERA_I2C_WORD_DATA, 0); - break; - case MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA: - rc = msm_camera_qup_i2c_set_write_mask_data( - client, - reg_conf_tbl->reg_addr, - reg_conf_tbl->reg_data, - reg_conf_tbl->mask, - MSM_CAMERA_I2C_BYTE_DATA); - break; - default: - pr_err("%s: Unsupport data type: %d\n", - __func__, dt); - break; - } - } - if (rc < 0) - break; - reg_conf_tbl++; - } - return rc; -} - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.c deleted file mode 100644 index bed6b6043816..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#include "../../include/soc/qcom/camera2.h" -#include "msm_camera_spi.h" - -#undef SPIDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define SPIDBG(fmt, args...) pr_debug(fmt, ##args) -#define S_I2C_DBG(fmt, args...) pr_debug(fmt, ##args) -#else -#define SPIDBG(fmt, args...) do { } while (0) -#define S_I2C_DBG(fmt, args...) do { } while (0) -#endif - -static int msm_camera_spi_txfr(struct spi_device *spi, char *txbuf, - char *rxbuf, int num_byte) -{ - struct spi_transfer t; - struct spi_message m; - - memset(&t, 0, sizeof(t)); - t.tx_buf = txbuf; - t.rx_buf = rxbuf; - t.len = num_byte; - spi_message_init(&m); - spi_message_add_tail(&t, &m); - - return spi_sync(spi, &m); -} - -/** - * msm_camera_set_addr() - helper function to set transfer address - * @addr: device address - * @addr_len: the addr field length of an instruction - * @type: type (i.e. byte-length) of @addr - * @str: shifted address output, must be zeroed when passed in - * - * This helper function sets @str based on the addr field length of an - * instruction and the data length. - */ -static void msm_camera_set_addr(uint32_t addr, uint8_t addr_len, - enum msm_camera_i2c_reg_addr_type type, - char *str) -{ - int i, len; - - if (addr_len < type) - SPIDBG("%s: omitting higher bits in address\n", __func__); - - /* only support transfer MSB first for now */ - len = addr_len - type; - for (i = len; i < addr_len; i++) { - if (i >= 0) - str[i] = (addr >> (BITS_PER_BYTE * (addr_len - i - 1))) - & 0xFF; - } - -} - -/** - * msm_camera_spi_tx_helper() - wrapper for SPI transaction - * @client: io client - * @inst: inst of this transaction - * @addr: device addr following the inst - * @data: output byte array (could be NULL) - * @num_byte: size of @data - * @tx, rx: optional transfer buffer. It must be at least header - * + @num_byte long. - * - * This is the core function for SPI transaction, except for writes. It first - * checks address type, then allocates required memory for tx/rx buffers. - * It sends out , and optionally receives @num_byte of response, - * if @data is not NULL. This function does not check for wait conditions, - * and will return immediately once bus transaction finishes. - * - * This function will allocate buffers of header + @num_byte long. For - * large transfers, the allocation could fail. External buffer @tx, @rx - * should be passed in to bypass allocation. The size of buffer should be - * at least header + num_byte long. Since buffer is managed externally, - * @data will be ignored, and read results will be in @rx. - * @tx, @rx also can be used for repeated transfers to improve performance. - */ -int32_t msm_camera_spi_tx_helper(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst, uint32_t addr, uint8_t *data, - uint32_t num_byte, char *tx, char *rx) -{ - int32_t rc = -EINVAL; - struct spi_device *spi = client->spi_client->spi_master; - char *ctx = NULL, *crx = NULL; - uint32_t len, hlen; - uint8_t retries = client->spi_client->retries; - - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - - hlen = msm_camera_spi_get_hlen(inst); - len = hlen + num_byte; - - if (tx) - ctx = tx; - else - ctx = kzalloc(len, GFP_KERNEL); - if (!ctx) - return -ENOMEM; - - if (num_byte) { - if (rx) - crx = rx; - else - crx = kzalloc(len, GFP_KERNEL); - if (!crx) { - if (!tx) - kfree(ctx); - return -ENOMEM; - } - } else { - crx = NULL; - } - - ctx[0] = inst->opcode; - msm_camera_set_addr(addr, inst->addr_len, client->addr_type, ctx + 1); - while ((rc = msm_camera_spi_txfr(spi, ctx, crx, len)) && retries) { - retries--; - msleep(client->spi_client->retry_delay); - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - goto out; - } - if (data && num_byte && !rx) - memcpy(data, crx + hlen, num_byte); - -out: - if (!tx) - kfree(ctx); - if (!rx) - kfree(crx); - return rc; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type) -{ - int32_t rc = -EINVAL; - uint8_t temp[2]; - - if ((data_type != MSM_CAMERA_I2C_BYTE_DATA) - && (data_type != MSM_CAMERA_I2C_WORD_DATA)) - return rc; - - rc = msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read, addr, &temp[0], - data_type, NULL, NULL); - if (rc < 0) - return rc; - - if (data_type == MSM_CAMERA_I2C_BYTE_DATA) - *data = temp[0]; - else - *data = (temp[0] << BITS_PER_BYTE) | temp[1]; - - SPIDBG("%s: addr 0x%x, data %u\n", __func__, addr, *data); - return rc; -} - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, data, num_byte, - NULL, NULL); -} - -/** - * msm_camera_spi_read_seq_l()- function for large SPI reads - * @client: io client - * @addr: device address to read - * @num_byte: read length - * @tx,rx: pre-allocated SPI buffer. Its size must be at least - * header + num_byte - * - * This function is used for large transactions. Instead of allocating SPI - * buffer each time, caller is responsible for pre-allocating memory buffers. - * Memory buffer must be at least header + num_byte. Header length can be - * obtained by msm_camera_spi_get_hlen(). - */ -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.read_seq, addr, NULL, num_byte, - tx, rx); -} - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - return msm_camera_spi_tx_helper(client, - &client->spi_client->cmd_tbl.query_id, addr, data, num_byte, - NULL, NULL); -} - -static int32_t msm_camera_spi_read_status_reg( - struct msm_camera_i2c_client *client, uint8_t *status) -{ - struct msm_camera_spi_inst *rs = - &client->spi_client->cmd_tbl.read_status; - if (rs->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - return msm_camera_spi_tx_helper(client, rs, 0, status, 1, NULL, NULL); -} - -static int32_t msm_camera_spi_device_busy(struct msm_camera_i2c_client *client, - uint8_t *busy) -{ - int rc; - uint8_t st = 0; - rc = msm_camera_spi_read_status_reg(client, &st); - if (rc < 0) { - SPIDBG("%s: failed to read status reg\n", __func__); - return rc; - } - *busy = st & client->spi_client->busy_mask; - return 0; -} - -static int32_t msm_camera_spi_wait(struct msm_camera_i2c_client *client, - struct msm_camera_spi_inst *inst) -{ - uint8_t busy; - int i, rc; - SPIDBG("%s: op 0x%x wait start\n", __func__, inst->opcode); - for (i = 0; i <= inst->delay_count; i++) { - rc = msm_camera_spi_device_busy(client, &busy); - if (rc < 0) - return rc; - if (!busy) - break; - else - msleep(inst->delay_intv); - SPIDBG("%s: op 0x%x wait\n", __func__, inst->opcode); - } - if (i > inst->delay_count) { - SPIDBG("%s: op %x timed out\n", __func__, inst->opcode); - return -ETIMEDOUT; - } - SPIDBG("%s: op %x finished\n", __func__, inst->opcode); - return 0; -} - -static int32_t msm_camera_spi_write_enable( - struct msm_camera_i2c_client *client) -{ - struct msm_camera_spi_inst *we = - &client->spi_client->cmd_tbl.write_enable; - int rc; - if (we->addr_len != 0) { - pr_err("%s: not implemented yet\n", __func__); - return -EINVAL; - } - rc = msm_camera_spi_tx_helper(client, we, 0, NULL, 0, NULL, NULL); - if (rc < 0) - SPIDBG("%s: write enable failed\n", __func__); - return rc; -} - -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size) -{ - struct msm_camera_spi_inst *se = &client->spi_client->cmd_tbl.erase; - int rc = 0; - uint32_t cur; - uint32_t end = addr + size; - uint32_t erase_size = client->spi_client->erase_size; - end = addr + size; - for (cur = rounddown(addr, erase_size); cur < end; cur += erase_size) { - SPIDBG("%s: erasing 0x%x\n", __func__, cur); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - rc = msm_camera_spi_tx_helper(client, se, cur, NULL, 0, - NULL, NULL); - if (rc < 0) { - SPIDBG("%s: erase failed\n", __func__); - return rc; - } - rc = msm_camera_spi_wait(client, se); - if (rc < 0) { - SPIDBG("%s: erase timedout\n", __func__); - return rc; - } - } - return rc; -} -/** - * msm_camera_spi_page_program() - core function to perform write - * @client: need for obtaining SPI device - * @addr: address to program on device - * @data: data to write - * @len: size of data - * @tx: tx buffer, size >= header + len - * - * This function performs SPI write, and has no boundary check. Writing range - * should not cross page boundary, or data will be corrupted. Transaction is - * guaranteed to be finished when it returns. This function should never be - * used outside msm_camera_spi_write_seq(). - */ -static int32_t msm_camera_spi_page_program(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint16_t len, uint8_t *tx) -{ - int rc; - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - struct spi_device *spi = client->spi_client->spi_master; - uint8_t retries = client->spi_client->retries; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - SPIDBG("%s: addr 0x%x, size 0x%x\n", __func__, addr, len); - rc = msm_camera_spi_write_enable(client); - if (rc < 0) - return rc; - memset(tx, 0, header_len); - tx[0] = pg->opcode; - msm_camera_set_addr(addr, pg->addr_len, client->addr_type, tx + 1); - memcpy(tx + header_len, data, len); - SPIDBG("%s: tx(%u): %02x %02x %02x %02x\n", __func__, - len, tx[0], tx[1], tx[2], tx[3]); - while ((rc = spi_write(spi, tx, len + header_len)) && retries) { - rc = msm_camera_spi_wait(client, pg); - msleep(client->spi_client->retry_delay); - retries--; - } - if (rc < 0) { - SPIDBG("%s: failed %d\n", __func__, rc); - return rc; - } - rc = msm_camera_spi_wait(client, pg); - return rc; -} -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte) -{ - struct msm_camera_spi_inst *pg = - &client->spi_client->cmd_tbl.page_program; - const uint32_t page_size = client->spi_client->page_size; - uint8_t header_len = sizeof(pg->opcode) + pg->addr_len + pg->dummy_len; - uint16_t len; - uint32_t cur_len, end; - char *tx, *pdata = data; - int rc = -EINVAL; - if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_WORD_ADDR) - && (client->addr_type != MSM_CAMERA_I2C_3B_ADDR)) - return rc; - /* single page write */ - if ((addr % page_size) + num_byte <= page_size) { - len = header_len + num_byte; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - rc = msm_camera_spi_page_program(client, addr, data, - num_byte, tx); - if (rc < 0) - goto ERROR; - goto OUT; - } - /* multi page write */ - len = header_len + page_size; - tx = kmalloc(len, GFP_KERNEL); - if (!tx) - goto NOMEM; - while (num_byte) { - end = min(page_size, (addr % page_size) + num_byte); - cur_len = end - (addr % page_size); - rc = msm_camera_spi_page_program(client, addr, pdata, - cur_len, tx); - if (rc < 0) - goto ERROR; - addr += cur_len; - pdata += cur_len; - num_byte -= cur_len; - } - goto OUT; -NOMEM: - SPIDBG("%s: memory allocation failed\n", __func__); - return -ENOMEM; -ERROR: - SPIDBG("%s: error write\n", __func__); -OUT: - kfree(tx); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.h deleted file mode 100644 index 0949667b3c72..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/io/msm_camera_spi.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __MSM_CAMERA_SPI_H -#define __MSM_CAMERA_SPI_H - -#include -#include "../../include/media/msm_cam_sensor.h" -#include "msm_camera_i2c.h" - -/** - * Common SPI communication scheme - * tx: [addr][wait][write buffer] - * rx: [read buffer] - * Some inst require polling busy reg until it's done - */ -struct msm_camera_spi_inst { - uint8_t opcode; /* one-byte opcode */ - uint8_t addr_len; /* addr len in bytes */ - uint8_t dummy_len; /* setup cycles */ - uint8_t delay_intv; /* delay intv for this inst (ms) */ - uint8_t delay_count; /* total delay count for this inst */ -}; - -struct msm_camera_spi_inst_tbl { - struct msm_camera_spi_inst read; - struct msm_camera_spi_inst read_seq; - struct msm_camera_spi_inst query_id; - struct msm_camera_spi_inst page_program; - struct msm_camera_spi_inst write_enable; - struct msm_camera_spi_inst read_status; - struct msm_camera_spi_inst erase; -}; - -struct msm_camera_spi_client { - struct spi_device *spi_master; - struct msm_camera_spi_inst_tbl cmd_tbl; - uint8_t device_id; - uint8_t device_id0; - uint8_t device_id1; - uint8_t device_id2; - uint8_t mfr_id; - uint8_t mfr_id0; - uint8_t mfr_id1; - uint8_t mfr_id2; - uint8_t retry_delay; /* ms */ - uint8_t retries; /* retry times upon failure */ - uint8_t busy_mask; /* busy bit in status reg */ - uint16_t page_size; /* page size for page program */ - uint32_t erase_size; /* minimal erase size */ -}; - -static __always_inline -uint16_t msm_camera_spi_get_hlen(struct msm_camera_spi_inst *inst) -{ - return sizeof(inst->opcode) + inst->addr_len + inst->dummy_len; -} - -int32_t msm_camera_spi_read(struct msm_camera_i2c_client *client, - uint32_t addr, uint16_t *data, - enum msm_camera_i2c_data_type data_type); - -int32_t msm_camera_spi_read_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_read_seq_l(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t num_byte, char *tx, char *rx); - -int32_t msm_camera_spi_query_id(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); - -int32_t msm_camera_spi_write_seq(struct msm_camera_i2c_client *client, - uint32_t addr, uint8_t *data, uint32_t num_byte); -int32_t msm_camera_spi_erase(struct msm_camera_i2c_client *client, - uint32_t addr, uint32_t size); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.c deleted file mode 100644 index f2f7a81baf9c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.c +++ /dev/null @@ -1,1825 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#include -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#include "msm_camera_i2c_mux.h" -#include -#include -#include - -#if defined(CONFIG_MUIC_UNIVERSAL_SM5705_AFC) -#define DISABLE_AFC -#endif - -#ifdef DISABLE_AFC -#include -#endif -//#define CONFIG_MSMB_CAMERA_DEBUG -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif -struct task_struct *qdaemon_task; - -#if defined(CONFIG_FLED_KTD2692) -extern void ktd2692_flash_on(unsigned data); -#endif - -int is_cam_powerd_on = 0; - -static void msm_sensor_adjust_mclk(struct msm_camera_power_ctrl_t *ctrl) -{ - int idx; - struct msm_sensor_power_setting *power_setting; - for (idx = 0; idx < ctrl->power_setting_size; idx++) { - power_setting = &ctrl->power_setting[idx]; - if (power_setting->seq_type == SENSOR_CLK && - power_setting->seq_val == SENSOR_CAM_MCLK) { - if (power_setting->config_val == 24000000) { - power_setting->config_val = 23880000; - CDBG("%s MCLK request adjusted to 23.88MHz\n" - , __func__); - } - break; - } - } - - return; -} - -static int32_t msm_camera_get_power_settimgs_from_sensor_lib( - struct msm_camera_power_ctrl_t *power_info, - struct msm_sensor_power_setting_array *power_setting_array) -{ - int32_t rc = 0; - uint32_t size; - struct msm_sensor_power_setting *ps; - bool need_reverse = 0; - - if ((NULL == power_info->power_setting) || - (0 == power_info->power_setting_size)) { - - ps = power_setting_array->power_setting; - size = power_setting_array->size; - if ((NULL == ps) || (0 == size)) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -EINVAL; - goto FAILED_1; - } - - power_info->power_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FAILED_1; - } - memcpy(power_info->power_setting, - power_setting_array->power_setting, - sizeof(*ps) * size); - power_info->power_setting_size = size; - } - - ps = power_setting_array->power_down_setting; - size = power_setting_array->size_down; - if (NULL == ps || 0 == size) { - ps = power_info->power_setting; - size = power_info->power_setting_size; - need_reverse = 1; - } - - power_info->power_down_setting = - kzalloc(sizeof(*ps) * size, GFP_KERNEL); - if (!power_info->power_down_setting) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_UP; - } - memcpy(power_info->power_down_setting, - ps, - sizeof(*ps) * size); - power_info->power_down_setting_size = size; - - if (need_reverse) { - int c, end = size - 1; - struct msm_sensor_power_setting power_down_setting_t; - for (c = 0; c < size/2; c++) { - power_down_setting_t = - power_info->power_down_setting[c]; - power_info->power_down_setting[c] = - power_info->power_down_setting[end]; - power_info->power_down_setting[end] = - power_down_setting_t; - end--; - } - } - - return 0; -FREE_UP: - kfree(power_info->power_setting); -FAILED_1: - return rc; -} - -static int32_t msm_sensor_get_dt_data(struct device_node *of_node, - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0, i = 0, ret = 0; - struct msm_camera_gpio_conf *gconf = NULL; - struct msm_camera_sensor_board_info *sensordata = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - uint32_t id_info[3]; - - s_ctrl->sensordata = kzalloc(sizeof( - struct msm_camera_sensor_board_info), - GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - rc = of_property_read_string(of_node, "qcom,sensor-name", - &sensordata->sensor_name); - CDBG("%s qcom,sensor-name %s, rc %d\n", __func__, - sensordata->sensor_name, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("%s qcom,cci-master %d, rc %d\n", __func__, s_ctrl->cci_i2c_master, - rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSORDATA; - } - - /* Get sensor mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - CDBG("%s:%d Default sensor mount angle\n", - __func__, __LINE__); - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Default sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = 0; - } - CDBG("%s qcom,sensor-position %d\n", __func__, - sensordata->sensor_info->position); - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Default sensor mode\n", __func__, __LINE__); - sensordata->sensor_info->modes_supported = 0; - } - CDBG("%s qcom,sensor-mode %d\n", __func__, - sensordata->sensor_info->modes_supported); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 %d\n", __func__, - s_ctrl->set_mclk_23880000); - - rc = msm_sensor_get_dt_csi_data(of_node, &sensordata->csi_lane_params); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SENSOR_INFO; - } - - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) - goto FREE_CSI; - - rc = msm_camera_get_dt_power_setting_data(of_node, - sensordata->power_info.cam_vreg, - sensordata->power_info.num_vreg, - &sensordata->power_info); - - - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - - rc = msm_camera_get_power_settimgs_from_sensor_lib( - &sensordata->power_info, - &s_ctrl->power_setting_array); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_VREG; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_PS; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("%s gpio count %d\n", __func__, gpio_array_size); - - if (gpio_array_size) { - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, - GFP_KERNEL); - if (!gpio_array) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("%s gpio_array[%d] = %d\n", __func__, i, - gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_get_dt_gpio_set_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_REQ_TBL; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, - gpio_array, gpio_array_size); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_SET_TBL; - } - } - rc = msm_sensor_get_dt_actuator_data(of_node, - &sensordata->actuator_info); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_GPIO_PIN_TBL; - } - - sensordata->slave_info = kzalloc(sizeof(struct msm_camera_slave_info), - GFP_KERNEL); - if (!sensordata->slave_info) { - pr_err("%s failed %d\n", __func__, __LINE__); - rc = -ENOMEM; - goto FREE_ACTUATOR_INFO; - } - - rc = of_property_read_u32_array(of_node, "qcom,slave-id", - id_info, 3); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_SLAVE_INFO; - } - - sensordata->slave_info->sensor_slave_addr = id_info[0]; - sensordata->slave_info->sensor_id_reg_addr = id_info[1]; - sensordata->slave_info->sensor_id = id_info[2]; - CDBG("%s:%d slave addr 0x%x sensor reg 0x%x id 0x%x\n", - __func__, __LINE__, - sensordata->slave_info->sensor_slave_addr, - sensordata->slave_info->sensor_id_reg_addr, - sensordata->slave_info->sensor_id); - - /*Optional property, don't return error if absent */ - ret = of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("%s qcom,misc_regulator %s, rc %d\n", __func__, - sensordata->misc_regulator, ret); - - kfree(gpio_array); - - return rc; - -FREE_SLAVE_INFO: - kfree(s_ctrl->sensordata->slave_info); -FREE_ACTUATOR_INFO: - kfree(s_ctrl->sensordata->actuator_info); -FREE_GPIO_PIN_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); -FREE_GPIO_SET_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); -FREE_GPIO_REQ_TBL: - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(s_ctrl->sensordata->power_info.gpio_conf); -FREE_PS: - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->power_info.power_down_setting); -FREE_VREG: - kfree(s_ctrl->sensordata->power_info.cam_vreg); -FREE_CSI: - kfree(s_ctrl->sensordata->csi_lane_params); -FREE_SENSOR_INFO: - kfree(s_ctrl->sensordata->sensor_info); -FREE_SENSORDATA: - kfree(s_ctrl->sensordata); - kfree(gpio_array); - return rc; -} - -static void msm_sensor_misc_regulator( - struct msm_sensor_ctrl_t *sctrl, uint32_t enable) -{ - int32_t rc = 0; - if (enable) { - sctrl->misc_regulator = (void *)rpm_regulator_get( - &sctrl->pdev->dev, sctrl->sensordata->misc_regulator); - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode(sctrl->misc_regulator, - RPM_REGULATOR_MODE_HPM); - if (rc < 0) { - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } else { - pr_err("%s: Failed to vote for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - } - } else { - if (sctrl->misc_regulator) { - rc = rpm_regulator_set_mode( - (struct rpm_regulator *)sctrl->misc_regulator, - RPM_REGULATOR_MODE_AUTO); - if (rc < 0) - pr_err("%s: Failed to set for rpm regulator on %s: %d\n", - __func__, - sctrl->sensordata->misc_regulator, rc); - rpm_regulator_put(sctrl->misc_regulator); - } - } -} - -int32_t msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (!s_ctrl->pdev && !s_ctrl->sensor_i2c_client->client) - return 0; - kfree(s_ctrl->sensordata->slave_info); - kfree(s_ctrl->sensordata->cam_slave_info); - kfree(s_ctrl->sensordata->actuator_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_set_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata->power_info.power_setting); - kfree(s_ctrl->sensordata->csi_lane_params); - kfree(s_ctrl->sensordata->sensor_info); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(s_ctrl->sensordata); - return 0; -} - -static struct msm_cam_clk_info cam_8960_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_clk", 24000000}, -}; - -static struct msm_cam_clk_info cam_8610_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -static struct msm_cam_clk_info cam_8974_clk_info[] = { - [SENSOR_CAM_MCLK] = {"cam_src_clk", 24000000}, - [SENSOR_CAM_CLK] = {"cam_clk", 0}, -}; - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl) -{ - struct msm_camera_power_ctrl_t *power_info; - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_i2c_client *sensor_i2c_client; - int rc = 0; - uint8_t camera_id; - - if (!s_ctrl) { - pr_err("%s:%d failed: s_ctrl %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - power_info = &s_ctrl->sensordata->power_info; - sensor_device_type = s_ctrl->sensor_device_type; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - -#if defined(CONFIG_FLED_KTD2692) - if((s_ctrl->sensordata->slave_info->sensor_id == 0x5e30) || (s_ctrl->sensordata->slave_info->sensor_id == 0x0552)){ - pr_err("%s : Front LED turn off\n", __func__); - ktd2692_flash_on(0); - } -#endif - - camera_id = s_ctrl->sensordata->sensor_info->position; - if (!power_info || !sensor_i2c_client) { - pr_err("%s:%d failed: power_info %pK sensor_i2c_client %pK\n", - __func__, __LINE__, power_info, sensor_i2c_client); - return -EINVAL; - } - -#ifdef DISABLE_AFC - if(0==camera_id) - { - muic_check_afc_state(0); - } -#endif - rc = msm_camera_power_down(power_info, sensor_device_type, - sensor_i2c_client); - - if (rc == 0) - is_cam_powerd_on = 0; - - return rc; -} - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - struct msm_camera_power_ctrl_t *power_info; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; - uint8_t camera_id; - uint32_t retry = 0; - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - - - power_info = &s_ctrl->sensordata->power_info; - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - camera_id = s_ctrl->sensordata->sensor_info->position; - if (!power_info || !sensor_i2c_client || !slave_info || - !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK %pK\n", - __func__, __LINE__, power_info, - sensor_i2c_client, slave_info, sensor_name); - return -EINVAL; - } - - CDBG("set__mclk_23880000: %d", s_ctrl->set_mclk_23880000); - if (s_ctrl->set_mclk_23880000) - msm_sensor_adjust_mclk(power_info); - qdaemon_task = current; -#ifdef DISABLE_AFC - if(0==camera_id) - { - for (retry = 0; retry < 3; retry++) { - if(muic_check_afc_state(1) == 1) - break; - - pr_err("%s:%d ERROR: AFC disable unsuccessfull retrying after 30ms\n", __func__, __LINE__); - msleep(30); - } - - if (retry == 3) { - pr_err("%s:%d ERROR: AFC disable failed\n", __func__, __LINE__); - return -EINVAL; - } - } -#endif - - for (retry = 0; retry < 3; retry++) { - rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type, - sensor_i2c_client); - if (rc < 0) - return rc; - rc = msm_sensor_check_id(s_ctrl); - if (rc < 0) { - msm_camera_power_down(power_info, - s_ctrl->sensor_device_type, sensor_i2c_client); - msleep(20); - continue; - } else { - break; - } - } - if (rc == 0) - is_cam_powerd_on = 1; - - return rc; -} - - -int query_cam_power_status(void) -{ - return is_cam_powerd_on; -} - - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - struct msm_camera_i2c_client *sensor_i2c_client; - struct msm_camera_slave_info *slave_info; - const char *sensor_name; -#if defined(CONFIG_SEC_ROSSA_PROJECT) - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; -#endif - - if (!s_ctrl) { - pr_err("%s:%d failed: %pK\n", - __func__, __LINE__, s_ctrl); - return -EINVAL; - } - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %pK %pK %pK\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (slave_info->sensor_id == 0xb4) - data_type = MSM_CAMERA_I2C_BYTE_DATA; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, data_type); - if (chipid != slave_info->sensor_id) { - if(slave_info->sensor_id== 0x4405) - { - uint16_t original_sid = 0; - chipid = 0; - original_sid = sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x50 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr,&chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - chipid = 0; - s_ctrl->sensor_i2c_client->cci_client->sid = 0x40 >> 1; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, &chipid, data_type); - printk("%s: read id: %x expected id %x:\n", __func__, chipid, - s_ctrl->sensordata->slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - // If sensor id not matched finally, restore sensor_id and sid to original values. - pr_err("msm_sensor_match_id chip id doesnot match\n"); - s_ctrl->sensor_i2c_client->cci_client->sid = original_sid; - return 0; - } - } - } - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; - } -#else - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, slave_info->sensor_id_reg_addr, - &chipid, MSM_CAMERA_I2C_WORD_DATA); -#endif - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x%x:\n", __func__, chipid, - slave_info->sensor_id); - if (chipid != slave_info->sensor_id) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return 0; //to pass DFMS with removing REAR cam - } - return rc; -} - -static struct msm_sensor_ctrl_t *get_sctrl(struct v4l2_subdev *sd) -{ - return container_of(container_of(sd, struct msm_sd_subdev, sd), - struct msm_sensor_ctrl_t, msm_sd); -} - -static void msm_sensor_stop_stream(struct msm_sensor_ctrl_t *s_ctrl) -{ - mutex_lock(s_ctrl->msm_sensor_mutex); - if (s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &s_ctrl->stop_setting); - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return; -} - -static int msm_sensor_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - /* TO-DO: Need to set AF status register address and expected value - We need to check the AF status in the sensor register and - set the status in the *status variable accordingly*/ - return 0; -} - -static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - void __user *argp = (void __user *)arg; - if (!s_ctrl) { - pr_err("%s s_ctrl NULL\n", __func__); - return -EBADF; - } - switch (cmd) { - case VIDIOC_MSM_SENSOR_CFG: - return s_ctrl->func_tbl->sensor_config(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_GET_AF_STATUS: - return msm_sensor_get_af_status(s_ctrl, argp); - case VIDIOC_MSM_SENSOR_RELEASE: - msm_sensor_stop_stream(s_ctrl); - return 0; - case MSM_SD_SHUTDOWN: - return 0; - case VIDIOC_MSM_SENSOR_NATIVE_CMD: - if( s_ctrl->func_tbl->sensor_native_control != NULL ) - return s_ctrl->func_tbl->sensor_native_control(s_ctrl, argp); - else - pr_err("s_ctrl->func_tbl->sensor_native_control is NULL\n"); - - default: - return -ENOIOCTLCMD; - } -} - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - pr_err("CFG_GET_SENSOR_INFO\n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - pr_err("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int s_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - p_ctrl = &s_ctrl->sensordata->power_info; - - /* Update power up sequence */ - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (s_index = 0; s_index < - p_ctrl->power_setting_size; s_index++) { - CDBG("%s i %d power up setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_setting[s_index].seq_type, - p_ctrl->power_setting[s_index].seq_val, - p_ctrl->power_setting[s_index].config_val, - p_ctrl->power_setting[s_index].delay); - } - - /* Update power down sequence */ - if (!sensor_slave_info.power_setting_array.power_down_setting || - 0 == size) { - pr_err("%s: Missing dedicated power down sequence\n", - __func__); - break; - } - size = sensor_slave_info.power_setting_array.size_down; - - if (p_ctrl->power_down_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_down_setting); - p_ctrl->power_down_setting = tmp; - } - p_ctrl->power_down_setting_size = size; - - - rc = copy_from_user(p_ctrl->power_down_setting, (void *) - sensor_slave_info.power_setting_array. - power_down_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_down_setting); - rc = -EFAULT; - break; - } - for (s_index = 0; s_index < - p_ctrl->power_down_setting_size; s_index++) { - CDBG("%s i %d power DOWN setting %d %d %ld %d\n", - __func__, - s_index, - p_ctrl->power_down_setting[s_index].seq_type, - p_ctrl->power_down_setting[s_index].seq_val, - p_ctrl->power_down_setting[s_index].config_val, - p_ctrl->power_down_setting[s_index].delay); - } - - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_burst_reg_array *burst_reg_setting = NULL; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint8_t *reg_data = NULL; - uint32_t i = 0, size = 0; - - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (conf_array.data_type == MSM_CAMERA_I2C_BURST_DATA) { - CDBG("%s:%d MSM_CAMERA_I2C_BURST_DATA\n", __func__, __LINE__); - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - burst_reg_setting = (void *)kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_burst_reg_array)), GFP_KERNEL); - if (!burst_reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user((void *)burst_reg_setting, - (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_burst_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(burst_reg_setting); - rc = -EFAULT; - break; - } - - size = conf_array.size; - conf_array.size = 1; - - for (i = 0; i < size; i++) { - reg_data = kzalloc(burst_reg_setting[i].reg_data_size * - (sizeof(uint8_t)), GFP_KERNEL); - if (!reg_data) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_data, - (void *)burst_reg_setting[i].reg_burst_data, - burst_reg_setting[i].reg_data_size * - (sizeof(uint8_t)))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_data); - continue; - } - - burst_reg_setting[i].reg_burst_data = reg_data; - conf_array.reg_setting = &burst_reg_setting[i]; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_burst_table( - s_ctrl->sensor_i2c_client, &conf_array); - if (rc < 0) { - pr_err("%s:%d failed i2c_write_table rc %d\n", __func__, - __LINE__, rc); - } - kfree(reg_data); - } - - kfree(reg_setting); - }else { - CDBG("%s:%d CFG_WRITE_I2C_ARRAY\n", __func__, __LINE__); - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - - if (conf_array.data_type == MSM_CAMERA_I2C_VARIABLE_LENGTH_DATA) { - struct msm_camera_i2c_reg_array* reg_array = (struct msm_camera_i2c_reg_array*)conf_array.reg_setting; - for (i = 0; i < conf_array.size;i++) { - if (i < 3) { - pr_err("%s:%d ASWOOGI addr : 0x%x, data : 0x%x, type : %d \n", - __func__, __LINE__, reg_array[i].reg_addr, reg_array[i].reg_data, reg_array[i].data_type); - } - -#if defined(CONFIG_SEC_A8_PROJECT) - /* delay */ - if (reg_array[i].reg_addr == 0xFFFF) { - pr_err("[Delay] start\n"); - usleep_range(reg_array[i].reg_data*1000, reg_array[i].reg_data*1000+10); - pr_err("[Delay] exit\n"); - } else { -#endif - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - reg_array[i].reg_addr, - reg_array[i].reg_data, - reg_array[i].data_type); - if (rc < 0) { - pr_err("%s:%d i2c_Write failed \n", - __func__, __LINE__); - } - } -#if defined(CONFIG_SEC_A8_PROJECT) - } -#endif - } else { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - } - kfree(reg_setting); - } - - kfree(burst_reg_setting); - burst_reg_setting = NULL; - break; - } - case CFG_SLAVE_READ_I2C: { - struct msm_camera_i2c_read_config read_config; - uint16_t local_data = 0; - uint16_t orig_slave_addr = 0, read_slave_addr = 0; - if (copy_from_user(&read_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_read_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - read_slave_addr = read_config.slave_addr; - CDBG("%s:CFG_SLAVE_READ_I2C:", __func__); - CDBG("%s:slave_addr=0x%x reg_addr=0x%x, data_type=%d\n", - __func__, read_config.slave_addr, - read_config.reg_addr, read_config.data_type); - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - read_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - read_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - read_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - read_config.reg_addr, - &local_data, read_config.data_type); - if (rc < 0) { - pr_err("%s:%d: i2c_read failed\n", __func__, __LINE__); - break; - } - if (copy_to_user((void __user *)read_config.data, - (void *)&local_data, sizeof(uint16_t))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - break; - } - case CFG_SLAVE_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_array_write_config write_config; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - uint16_t write_slave_addr = 0; - uint16_t orig_slave_addr = 0; - - if (copy_from_user(&write_config, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_array_write_config))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s:CFG_SLAVE_WRITE_I2C_ARRAY:", __func__); - CDBG("%s:slave_addr=0x%x, array_size=%d\n", __func__, - write_config.slave_addr, - write_config.conf_array.size); - - if (!write_config.conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(write_config.conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, - (void *)(write_config.conf_array.reg_setting), - write_config.conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - write_config.conf_array.reg_setting = reg_setting; - write_slave_addr = write_config.slave_addr; - if (s_ctrl->sensor_i2c_client->cci_client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->cci_client->sid; - s_ctrl->sensor_i2c_client->cci_client->sid = - write_slave_addr >> 1; - } else if (s_ctrl->sensor_i2c_client->client) { - orig_slave_addr = - s_ctrl->sensor_i2c_client->client->addr; - s_ctrl->sensor_i2c_client->client->addr = - write_slave_addr >> 1; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - CDBG("%s:orig_slave_addr=0x%x, new_slave_addr=0x%x", - __func__, orig_slave_addr, - write_slave_addr >> 1); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &(write_config.conf_array)); - if (s_ctrl->sensor_i2c_client->cci_client) { - s_ctrl->sensor_i2c_client->cci_client->sid = - orig_slave_addr; - } else if (s_ctrl->sensor_i2c_client->client) { - s_ctrl->sensor_i2c_client->client->addr = - orig_slave_addr; - } else { - pr_err("%s: error: no i2c/cci client found.", __func__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_DOWN) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_up) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 1); - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_UP; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_POWER_DOWN: - kfree(s_ctrl->stop_setting.reg_setting); - s_ctrl->stop_setting.reg_setting = NULL; - if (s_ctrl->sensor_state != MSM_SENSOR_POWER_UP) { - pr_err("%s:%d failed: invalid state %d\n", __func__, - __LINE__, s_ctrl->sensor_state); - rc = -EFAULT; - break; - } - if (s_ctrl->func_tbl->sensor_power_down) { - if (s_ctrl->sensordata->misc_regulator) - msm_sensor_misc_regulator(s_ctrl, 0); - - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - if (rc < 0) { - pr_err("%s:%d failed rc %d\n", __func__, - __LINE__, rc); - break; - } - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - pr_err("%s:%d sensor state %d\n", __func__, __LINE__, - s_ctrl->sensor_state); - } else { - rc = -EFAULT; - } - break; - - case CFG_SET_STOP_STREAM_SETTING: { -#if defined(CONFIG_SEC_A8_PROJECT) - uint16_t lb=0; - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - CDBG("[%s:%d] CFG_SET_STOP_STREAM_SETTING\n", __func__, __LINE__); - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - CDBG("%s:%d conf_array.size = %d,\n", __func__, __LINE__, conf_array.size); - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - - pr_err("[%s:%d] write start\n", __func__, __LINE__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - pr_err("[%s:%d] write end\n", __func__, __LINE__); - - pr_err("[%s:%d] read start\n", __func__, __LINE__); - for (i = 0 ; i < 8 ; i++) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x0005, - &lb, MSM_CAMERA_I2C_BYTE_DATA); - if(lb == 0xFF) { - CDBG("[%s:%d] 0x%x\n", __func__, __LINE__, lb); - break; - } else { - CDBG("[%s:%d] 0x%x\n", __func__, __LINE__, lb); - } - } - pr_err("[%s:%d] read end\n", __func__, __LINE__); - - kfree(reg_setting); - break; -#else - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - - if (!stop_setting->size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, - stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; -#endif - } - - case CFG_SET_SENSOR_OTP_CAL: { - const uint16_t otp_start = 0xa3d, otp_end = 0xa42; - uint16_t otp_cal_data[6], temp_data; - int idx = 0; - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A02, 0x0F, // Set the PAGE15 of OTP set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x01, // Set read mode of NVM controller Interface - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - for (i = otp_start; i <= otp_end; i++) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - i, &otp_cal_data[idx++], - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C read\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_err("%s: 0x%x, 0x%x\n", __func__, i, otp_cal_data[idx - 1]); - if ((i+1)%2) { - temp_data = ((otp_cal_data[idx - 2] << 8) & 0xFF00) | - (otp_cal_data[idx - 1] & 0xFF); - // Valid check : +-50% - if (temp_data > 0x180 || temp_data < 0x80) { - pr_err("%s: range over (0x%x)\n", __func__, temp_data); - rc = -EFAULT; - break; - } - } - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x0A00, 0x00, // Disable NVM controller - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - if (rc >= 0) { - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020E, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x020F, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0210, otp_cal_data[0], // R msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0211, otp_cal_data[1], // R lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0212, otp_cal_data[4], // B msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0213, otp_cal_data[5], // B lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0214, otp_cal_data[2], // G msb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - if (s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, 0x0215, otp_cal_data[3], // G lsb - MSM_CAMERA_I2C_BYTE_DATA) < 0) { - pr_err("%s:%d Failed I2C write\n", __func__, __LINE__); - } - } - break; - } - - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc; - - if (s_ctrl->func_tbl->sensor_match_id) - rc = s_ctrl->func_tbl->sensor_match_id(s_ctrl); - else - rc = msm_sensor_match_id(s_ctrl); - if (rc < 0) - pr_err("%s:%d match id failed rc %d\n", __func__, __LINE__, rc); - rc = 0; - return rc; -} - -static int msm_sensor_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - mutex_lock(s_ctrl->msm_sensor_mutex); - if (!on && s_ctrl->sensor_state == MSM_SENSOR_POWER_UP) { - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - s_ctrl->sensor_state = MSM_SENSOR_POWER_DOWN; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - return rc; -} - -static int msm_sensor_v4l2_enum_fmt(struct v4l2_subdev *sd, - unsigned int index, enum v4l2_mbus_pixelcode *code) -{ - struct msm_sensor_ctrl_t *s_ctrl = get_sctrl(sd); - - if ((unsigned int)index >= s_ctrl->sensor_v4l2_subdev_info_size) - return -EINVAL; - - *code = s_ctrl->sensor_v4l2_subdev_info[index].code; - return 0; -} - -static struct v4l2_subdev_core_ops msm_sensor_subdev_core_ops = { - .ioctl = msm_sensor_subdev_ioctl, - .s_power = msm_sensor_power, -}; - -static struct v4l2_subdev_video_ops msm_sensor_subdev_video_ops = { - .enum_mbus_fmt = msm_sensor_v4l2_enum_fmt, -}; - -static struct v4l2_subdev_ops msm_sensor_subdev_ops = { - .core = &msm_sensor_subdev_core_ops, - .video = &msm_sensor_subdev_video_ops, -}; - -static struct msm_sensor_fn_t msm_sensor_func_tbl = { - .sensor_config = msm_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_burst_table = msm_camera_cci_i2c_write_burst_table, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_write_conf_tbl = msm_camera_cci_i2c_write_conf_tbl, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_write_conf_tbl = msm_camera_qup_i2c_write_conf_tbl, -}; - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data) -{ - int rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = - (struct msm_sensor_ctrl_t *)data; - struct msm_camera_cci_client *cci_client = NULL; - uint32_t session_id; - unsigned long mount_pos = 0; - s_ctrl->pdev = pdev; - CDBG("%s called data %p\n", __func__, data); - CDBG("%s pdev name %s\n", __func__, pdev->id_entry->name); - if (pdev->dev.of_node) { - rc = msm_sensor_get_dt_data(pdev->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - s_ctrl->sensordata->power_info.dev = &pdev->dev; - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - /* TODO: get CCI subdev */ - cci_client = s_ctrl->sensor_i2c_client->cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = - s_ctrl->sensordata->slave_info->sensor_slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - kfree(cci_client); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, cam_8974_clk_info, - sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, - s_ctrl->sensordata->sensor_name); - kfree(s_ctrl->sensordata->power_info.clk_info); - kfree(cci_client); - return rc; - } - - pr_info("%s %s probe succeeded\n", __func__, - s_ctrl->sensordata->sensor_name); - v4l2_subdev_init(&s_ctrl->msm_sd.sd, - s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint32_t session_id; - unsigned long mount_pos = 0; - CDBG("%s %s_i2c_probe called\n", __func__, client->name); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!client->dev.of_node) { - CDBG("msm_sensor_i2c_probe: of_node is NULL"); - s_ctrl = (struct msm_sensor_ctrl_t *)(id->driver_data); - if (!s_ctrl) { - pr_err("%s:%d sensor ctrl structure NULL\n", __func__, - __LINE__); - return -EINVAL; - } - s_ctrl->sensordata = client->dev.platform_data; - } else { - CDBG("msm_sensor_i2c_probe: of_node exisists"); - rc = msm_sensor_get_dt_data(client->dev.of_node, s_ctrl); - if (rc < 0) { - pr_err("%s failed line %d\n", __func__, __LINE__); - return rc; - } - } - - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - if (s_ctrl->sensordata == NULL) { - pr_err("%s %s NULL sensor data\n", __func__, client->name); - return -EFAULT; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - if (s_ctrl->sensordata->slave_info->sensor_slave_addr) - s_ctrl->sensor_i2c_client->client->addr = - s_ctrl->sensordata->slave_info-> - sensor_slave_addr; - } else { - pr_err("%s %s sensor_i2c_client NULL\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - if (!client->dev.of_node) { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8960_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8960_clk_info, sizeof(cam_8960_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8960_clk_info); - } else { - s_ctrl->sensordata->power_info.clk_info = - kzalloc(sizeof(cam_8610_clk_info), GFP_KERNEL); - if (!s_ctrl->sensordata->power_info.clk_info) { - pr_err("%s:%d failed nomem\n", __func__, __LINE__); - return -ENOMEM; - } - memcpy(s_ctrl->sensordata->power_info.clk_info, - cam_8610_clk_info, sizeof(cam_8610_clk_info)); - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8610_clk_info); - } - - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s %s power up failed\n", __func__, client->name); - kfree(s_ctrl->sensordata->power_info.clk_info); - return rc; - } - - CDBG("%s %s probe succeeded\n", __func__, client->name); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", id->name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = - s_ctrl->msm_sd.sd.name; - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - rc = camera_init_v4l2(&s_ctrl->sensor_i2c_client->client->dev, - &session_id); - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - return rc; -} - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = -ENOMEM; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_cam_clk_info *clk_info = NULL; - unsigned long mount_pos = 0; - - /* Validate input parameters */ - if (!s_ctrl) { - pr_err("%s:%d failed: invalid params s_ctrl %pK\n", __func__, - __LINE__, s_ctrl); - return -EINVAL; - } - - if (!s_ctrl->sensor_i2c_client) { - pr_err("%s:%d failed: invalid params sensor_i2c_client %pK\n", - __func__, __LINE__, s_ctrl->sensor_i2c_client); - return -EINVAL; - } - - /* Initialize cci_client */ - s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client->cci_client) { - pr_err("%s:%d failed: no memory cci_client %pK\n", __func__, - __LINE__, s_ctrl->sensor_i2c_client->cci_client); - return -ENOMEM; - } - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = s_ctrl->sensor_i2c_client->cci_client; - - /* Get CCI subdev */ - cci_client->cci_subdev = msm_cci_get_subdev(); - - /* Update CCI / I2C function table */ - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_cci_func_tbl; - } else { - if (!s_ctrl->sensor_i2c_client->i2c_func_tbl) { - CDBG("%s:%d\n", __func__, __LINE__); - s_ctrl->sensor_i2c_client->i2c_func_tbl = - &msm_sensor_qup_func_tbl; - } - } - - /* Update function table driven by ioctl */ - if (!s_ctrl->func_tbl) - s_ctrl->func_tbl = &msm_sensor_func_tbl; - - /* Update v4l2 subdev ops table */ - if (!s_ctrl->sensor_v4l2_subdev_ops) - s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops; - - /* Initialize clock info */ - clk_info = kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL); - if (!clk_info) { - pr_err("%s:%d failed no memory clk_info %pK\n", __func__, - __LINE__, clk_info); - rc = -ENOMEM; - goto FREE_CCI_CLIENT; - } - memcpy(clk_info, cam_8974_clk_info, sizeof(cam_8974_clk_info)); - s_ctrl->sensordata->power_info.clk_info = clk_info; - s_ctrl->sensordata->power_info.clk_info_size = - ARRAY_SIZE(cam_8974_clk_info); - - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - return 0; - -FREE_CCI_CLIENT: - kfree(cci_client); - return rc; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.h deleted file mode 100755 index 2f02dbab7128..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_H -#define MSM_SENSOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../include/soc/qcom/camera2.h" -#include "../include/media/msm_cam_sensor.h" -#include -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_sd.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -struct msm_sensor_ctrl_t; - -enum msm_sensor_state_t { - MSM_SENSOR_POWER_DOWN, - MSM_SENSOR_POWER_UP, -}; - -struct msm_sensor_fn_t { - int (*sensor_config) (struct msm_sensor_ctrl_t *, void __user *); - int (*sensor_power_down) (struct msm_sensor_ctrl_t *); - int (*sensor_power_up) (struct msm_sensor_ctrl_t *); - int (*sensor_match_id) (struct msm_sensor_ctrl_t *); - int (*sensor_native_control) (struct msm_sensor_ctrl_t *, void __user *); -}; - - -struct msm_sensor_ctrl_t { - struct platform_device *pdev; - struct mutex *msm_sensor_mutex; - - enum msm_camera_device_type_t sensor_device_type; - struct msm_camera_sensor_board_info *sensordata; - struct msm_sensor_power_setting_array power_setting_array; - struct msm_sensor_packed_cfg_t *cfg_override; - struct msm_sd_subdev msm_sd; - enum cci_i2c_master_t cci_i2c_master; - - struct msm_camera_i2c_client *sensor_i2c_client; - struct v4l2_subdev_info *sensor_v4l2_subdev_info; - uint8_t sensor_v4l2_subdev_info_size; - struct v4l2_subdev_ops *sensor_v4l2_subdev_ops; - struct msm_sensor_fn_t *func_tbl; - struct msm_camera_i2c_reg_setting stop_setting; - void *misc_regulator; - enum msm_sensor_state_t sensor_state; - uint8_t is_probe_succeed; - uint32_t id; - struct device_node *of_node; - enum msm_camera_stream_type_t camera_stream_type; - uint32_t set_mclk_23880000; -}; - -int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp); - -int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_check_id(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_platform_probe(struct platform_device *pdev, - const void *data); -int msm_sensor_update_cfg(struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id, struct msm_sensor_ctrl_t *s_ctrl); - -int msm_sensor_free_sensor_data(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl); - -int32_t msm_sensor_get_dt_gpio_req_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_get_dt_gpio_set_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); - -int32_t msm_sensor_init_gpio_pin_tbl(struct device_node *of_node, - struct msm_camera_gpio_conf *gconf, uint16_t *gpio_array, - uint16_t gpio_array_size); -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.c deleted file mode 100644 index d01d051451bd..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.c +++ /dev/null @@ -1,1308 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define SENSOR_DRIVER_I2C "camera" -/* Header file declaration */ -#include "msm_sensor.h" -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#include -#include -#include -#include -#include -static char *regs_table = NULL; -static int table_size; -#endif -#if defined(CONFIG_SR200PC20) -#include "sr200pc20.h" -#endif -#if defined(CONFIG_S5K4ECGX) -#include "s5k4ecgx.h" -#endif -#if defined(CONFIG_SR352) -#include "sr352.h" -#endif -#if defined(CONFIG_SR130PC20) -#include "sr130pc20.h" -#endif -#if defined(CONFIG_DB8221A) -#include "db8221a.h" -#endif - -/* Logging macro */ -//#define MSM_SENSOR_DRIVER_DEBUG -#undef CDBG -#ifdef MSM_SENSOR_DRIVER_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define SENSOR_MAX_MOUNTANGLE (360) - -#ifdef CONFIG_CAM_DISABLE_LPM_MODE -extern int poweroff_charging; -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -extern char rear_cam_info[100]; //camera_info -extern char front_cam_info[100]; //camera_info -#endif - -/* Static declaration */ -static struct msm_sensor_ctrl_t *g_sctrl[MAX_CAMERAS]; - -#if defined(CONFIG_SR352) -static struct msm_sensor_fn_t sr352_sensor_func_tbl = { - .sensor_config = sr352_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr352_sensor_native_control, -}; -#endif - -#if defined(CONFIG_SR130PC20) -static struct msm_sensor_fn_t sr130pc20_sensor_func_tbl = { - .sensor_config = sr130pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr130pc20_sensor_native_control, -}; -#endif - -#if defined(CONFIG_SR200PC20) -static struct msm_sensor_fn_t sr200pc20_sensor_func_tbl = { - .sensor_config = sr200pc20_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = sr200pc20_sensor_native_control, -}; -#endif -#if defined(CONFIG_S5K4ECGX) -static struct msm_sensor_fn_t s5k4ecgx_sensor_func_tbl = { - .sensor_config = s5k4ecgx_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = s5k4ecgx_sensor_match_id, - .sensor_native_control = s5k4ecgx_sensor_native_control, -}; -#endif -#if defined(CONFIG_DB8221A) -static struct msm_sensor_fn_t db8221a_sensor_func_tbl = { - .sensor_config = db8221a_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, - .sensor_native_control = db8221a_sensor_native_control, -}; -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); - -static int msm_sensor_platform_remove(struct platform_device *pdev) -{ - struct msm_sensor_ctrl_t *s_ctrl; - - pr_err("%s: sensor FREE\n", __func__); - - s_ctrl = g_sctrl[pdev->id]; - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - g_sctrl[pdev->id] = NULL; - - return 0; -} - - -static const struct of_device_id msm_sensor_driver_dt_match[] = { - {.compatible = "qcom,camera"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_sensor_driver_dt_match); - -static struct platform_driver msm_sensor_platform_driver = { - .driver = { - .name = "qcom,camera", - .owner = THIS_MODULE, - .of_match_table = msm_sensor_driver_dt_match, - }, - .remove = msm_sensor_platform_remove, -}; - -static struct v4l2_subdev_info msm_sensor_driver_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_sensor_driver_create_i2c_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - struct i2c_client *client = s_ctrl->sensor_i2c_client->client; - - CDBG("%s %s I2c probe succeeded\n", __func__, client->name); - rc = camera_init_v4l2(&client->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_i2c_v4l2 rc %d", rc); - return rc; - } - CDBG("%s rc %d session_id %d\n", __func__, rc, session_id); - snprintf(s_ctrl->msm_sd.sd.name, - sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_i2c_subdev_init(&s_ctrl->msm_sd.sd, client, - s_ctrl->sensor_v4l2_subdev_ops); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, client); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->sensordata->sensor_info->session_id = session_id; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - CDBG("%s:%d\n", __func__, __LINE__); - return rc; -} - -static int32_t msm_sensor_driver_create_v4l_subdev - (struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint32_t session_id = 0; - - rc = camera_init_v4l2(&s_ctrl->pdev->dev, &session_id); - if (rc < 0) { - pr_err("failed: camera_init_v4l2 rc %d", rc); - return rc; - } - CDBG("rc %d session_id %d", rc, session_id); - s_ctrl->sensordata->sensor_info->session_id = session_id; - - /* Create /dev/v4l-subdevX device */ - v4l2_subdev_init(&s_ctrl->msm_sd.sd, s_ctrl->sensor_v4l2_subdev_ops); - snprintf(s_ctrl->msm_sd.sd.name, sizeof(s_ctrl->msm_sd.sd.name), "%s", - s_ctrl->sensordata->sensor_name); - v4l2_set_subdevdata(&s_ctrl->msm_sd.sd, s_ctrl->pdev); - s_ctrl->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&s_ctrl->msm_sd.sd.entity, 0, NULL, 0); - s_ctrl->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_ctrl->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR; - s_ctrl->msm_sd.sd.entity.name = s_ctrl->msm_sd.sd.name; - s_ctrl->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x3; - msm_sd_register(&s_ctrl->msm_sd); - return rc; -} - -static int32_t msm_sensor_fill_eeprom_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - const char *eeprom_name; - struct device_node *src_node = NULL; - uint32_t val = 0, count = 0, eeprom_name_len; - int i; - int32_t *eeprom_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - const void *p; - - if (!s_ctrl->sensordata->eeprom_name || !of_node) - return -EINVAL; - - eeprom_name_len = strlen(s_ctrl->sensordata->eeprom_name); - if (eeprom_name_len >= MAX_SENSOR_NAME) - return -EINVAL; - - sensor_info = s_ctrl->sensordata->sensor_info; - eeprom_subdev_id = &sensor_info->subdev_id[SUB_MODULE_EEPROM]; - /* - * string for eeprom name is valid, set sudev id to -1 - * and try to found new id - */ - *eeprom_subdev_id = -1; - - if (0 == eeprom_name_len) - return 0; - - CDBG("Try to find eeprom subdev for %s\n", - s_ctrl->sensordata->eeprom_name); - p = of_get_property(of_node, "qcom,eeprom-src", &count); - if (!p || !count) - return 0; - - count /= sizeof(uint32_t); - for (i = 0; i < count; i++) { - eeprom_name = NULL; - src_node = of_parse_phandle(of_node, "qcom,eeprom-src", i); - if (!src_node) { - pr_err("eeprom src node NULL\n"); - continue; - } - rc = of_property_read_string(src_node, "qcom,eeprom-name", - &eeprom_name); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - if (strcmp(eeprom_name, s_ctrl->sensordata->eeprom_name)) - continue; - - rc = of_property_read_u32(src_node, "cell-index", &val); - - CDBG("%s qcom,eeprom cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("failed\n"); - of_node_put(src_node); - continue; - } - - *eeprom_subdev_id = val; - CDBG("Done. Eeprom subdevice id is %d\n", val); - of_node_put(src_node); - src_node = NULL; - break; - } - - return rc; -} - -static int32_t msm_sensor_fill_actuator_subdevid_by_name( - struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct device_node *src_node = NULL; - uint32_t val = 0, actuator_name_len; - int32_t *actuator_subdev_id; - struct msm_sensor_info_t *sensor_info; - struct device_node *of_node = s_ctrl->of_node; - - if (!s_ctrl->sensordata->actuator_name || !of_node) - return -EINVAL; - - actuator_name_len = strlen(s_ctrl->sensordata->actuator_name); - if (actuator_name_len >= MAX_SENSOR_NAME) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is greater than max len\n"); - return -EINVAL; - } - - sensor_info = s_ctrl->sensordata->sensor_info; - actuator_subdev_id = &sensor_info->subdev_id[SUB_MODULE_ACTUATOR]; - /* - * string for actuator name is valid, set sudev id to -1 - * and try to found new id - */ - *actuator_subdev_id = -1; - - if (0 == actuator_name_len) { - pr_err("msm_sensor_fill_actuator_subdevid_by_name: actuator_name_len is zero\n"); - return 0; - } - - src_node = of_parse_phandle(of_node, "qcom,actuator-src", 0); - if (!src_node) { - pr_err("%s:%d src_node NULL\n", __func__, __LINE__); - } else { - rc = of_property_read_u32(src_node, "cell-index", &val); - pr_err("%s qcom,actuator cell index %d, rc %d\n", __func__, - val, rc); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return -EINVAL; - } - *actuator_subdev_id = val; - of_node_put(src_node); - src_node = NULL; - } - - return rc; -} - -static int32_t msm_sensor_fill_slave_info_init_params( - struct msm_camera_sensor_slave_info *slave_info, - struct msm_sensor_info_t *sensor_info) -{ - struct msm_sensor_init_params *sensor_init_params; - if (!slave_info || !sensor_info) - return -EINVAL; - - if (!slave_info->is_init_params_valid) - return 0; - - sensor_init_params = &slave_info->sensor_init_params; - if (INVALID_CAMERA_B != sensor_init_params->position) - sensor_info->position = - sensor_init_params->position; - - if (SENSOR_MAX_MOUNTANGLE > sensor_init_params->sensor_mount_angle) { - sensor_info->sensor_mount_angle = - sensor_init_params->sensor_mount_angle; - sensor_info->is_mount_angle_valid = 1; - } - - if (CAMERA_MODE_INVALID != sensor_init_params->modes_supported) - sensor_info->modes_supported = - sensor_init_params->modes_supported; - - return 0; -} - - -static int32_t msm_sensor_validate_slave_info( - struct msm_sensor_info_t *sensor_info) -{ - if (INVALID_CAMERA_B == sensor_info->position) { - sensor_info->position = BACK_CAMERA_B; - CDBG("%s:%d Set default sensor position\n", - __func__, __LINE__); - } - if (CAMERA_MODE_INVALID == sensor_info->modes_supported) { - sensor_info->modes_supported = CAMERA_MODE_2D_B; - CDBG("%s:%d Set default sensor modes_supported\n", - __func__, __LINE__); - } - if (SENSOR_MAX_MOUNTANGLE <= sensor_info->sensor_mount_angle) { - sensor_info->sensor_mount_angle = 0; - CDBG("%s:%d Set default sensor mount angle\n", - __func__, __LINE__); - sensor_info->is_mount_angle_valid = 1; - } - return 0; -} - -/* static function definition */ -int32_t msm_sensor_driver_probe(void *setting) -{ - int32_t rc = 0; - uint16_t i = 0, size = 0, size_down = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_camera_sensor_slave_info *slave_info = NULL; - struct msm_sensor_power_setting *power_setting = NULL; - struct msm_sensor_power_setting *power_down_setting = NULL; - struct msm_camera_slave_info *camera_info = NULL; - struct msm_camera_power_ctrl_t *power_info = NULL; - int c, end; - struct msm_sensor_power_setting power_down_setting_t; - unsigned long mount_pos = 0; - int probe_fail = 0; - - /* Validate input parameters */ - if (!setting) { - pr_err("failed: slave_info %pK", setting); - return -EINVAL; - } - - /* Allocate memory for slave info */ - slave_info = kzalloc(sizeof(*slave_info), GFP_KERNEL); - if (!slave_info) - return -ENOMEM; - - if (copy_from_user(slave_info, (void *)setting, sizeof(*slave_info))) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_SLAVE_INFO; - } - - /* Print slave info */ - CDBG("camera id %d", slave_info->camera_id); - CDBG("slave_addr 0x%x", slave_info->slave_addr); - CDBG("addr_type %d", slave_info->addr_type); - CDBG("sensor_id_reg_addr 0x%x", - slave_info->sensor_id_info.sensor_id_reg_addr); - CDBG("sensor_id 0x%x", slave_info->sensor_id_info.sensor_id); - CDBG("size %d", slave_info->power_setting_array.size); - CDBG("size down %d", slave_info->power_setting_array.size_down); - CDBG("sensor_name %s", slave_info->sensor_name); - - if (slave_info->is_init_params_valid) { - CDBG("position %d", - slave_info->sensor_init_params.position); - CDBG("mount %d", - slave_info->sensor_init_params.sensor_mount_angle); - } - - /* Validate camera id */ - if (slave_info->camera_id >= MAX_CAMERAS) { - pr_err("failed: invalid camera id %d max %d", - slave_info->camera_id, MAX_CAMERAS); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } - - /* Extract s_ctrl from camera id */ - s_ctrl = g_sctrl[slave_info->camera_id]; - if (!s_ctrl) { - pr_err("failed: s_ctrl %pK for camera_id %d", s_ctrl, - slave_info->camera_id); - rc = -EINVAL; - goto FREE_SLAVE_INFO; - } -#if defined(CONFIG_SR352) && defined(CONFIG_SR130PC20) - if ( slave_info->camera_id == CAMERA_2 ) { - s_ctrl->func_tbl = &sr130pc20_sensor_func_tbl ; - } else { - s_ctrl->func_tbl = &sr352_sensor_func_tbl ; - } -#endif -#if defined(CONFIG_SR200PC20) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &sr200pc20_sensor_func_tbl ; - } -#endif -#if defined(CONFIG_S5K4ECGX) - if (slave_info->camera_id == CAMERA_0){ - s_ctrl->func_tbl = &s5k4ecgx_sensor_func_tbl; - } -#endif -#if defined(CONFIG_DB8221A) - if(slave_info->camera_id == CAMERA_2){ - s_ctrl->func_tbl = &db8221a_sensor_func_tbl ; - } -#endif - CDBG("s_ctrl[%d] %pK", slave_info->camera_id, s_ctrl); - - if (s_ctrl->is_probe_succeed == 1) { - /* - * Different sensor on this camera slot has been connected - * and probe already succeeded for that sensor. Ignore this - * probe - */ - pr_err("slot %d has some other sensor", slave_info->camera_id); - rc = 0; - goto FREE_SLAVE_INFO; - } - - size = slave_info->power_setting_array.size; - /* Allocate memory for power up setting */ - power_setting = kzalloc(sizeof(*power_setting) * size, GFP_KERNEL); - if (!power_setting) { - pr_err("failed: no memory power_setting %pK", power_setting); - rc = -ENOMEM; - goto FREE_SLAVE_INFO; - } - - if (copy_from_user(power_setting, - (void *)slave_info->power_setting_array.power_setting, - sizeof(*power_setting) * size)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_SETTING; - } - - /* Print power setting */ - for (i = 0; i < size; i++) { - CDBG("UP seq_type %d seq_val %d config_val %ld delay %d", - power_setting[i].seq_type, power_setting[i].seq_val, - power_setting[i].config_val, power_setting[i].delay); - } - /*DOWN*/ - size_down = slave_info->power_setting_array.size_down; - if (!size_down) - size_down = size; - /* Allocate memory for power down setting */ - power_down_setting = - kzalloc(sizeof(*power_setting) * size_down, GFP_KERNEL); - if (!power_down_setting) { - pr_err("failed: no memory power_setting %pK", - power_down_setting); - rc = -ENOMEM; - goto FREE_POWER_SETTING; - } - - if (slave_info->power_setting_array.power_down_setting) { - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_down_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - } else { - pr_err("failed: no power_down_setting"); - if (copy_from_user(power_down_setting, - (void *)slave_info->power_setting_array. - power_setting, - sizeof(*power_down_setting) * size_down)) { - pr_err("failed: copy_from_user"); - rc = -EFAULT; - goto FREE_POWER_DOWN_SETTING; - } - - /*reverce*/ - end = size_down - 1; - for (c = 0; c < size_down/2; c++) { - power_down_setting_t = power_down_setting[c]; - power_down_setting[c] = power_down_setting[end]; - power_down_setting[end] = power_down_setting_t; - end--; - } - - } - - /* Print power setting */ - for (i = 0; i < size_down; i++) { - CDBG("DOWN seq_type %d seq_val %d config_val %ld delay %d", - power_down_setting[i].seq_type, - power_down_setting[i].seq_val, - power_down_setting[i].config_val, - power_down_setting[i].delay); - } - - camera_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL); - if (!camera_info) - goto FREE_POWER_DOWN_SETTING; - - - /* Fill power up setting and power up setting size */ - power_info = &s_ctrl->sensordata->power_info; - power_info->power_setting = power_setting; - power_info->power_setting_size = size; - power_info->power_down_setting = power_down_setting; - power_info->power_down_setting_size = size_down; - - s_ctrl->sensordata->slave_info = camera_info; - - /* Fill sensor slave info */ - camera_info->sensor_slave_addr = slave_info->slave_addr; - camera_info->sensor_id_reg_addr = - slave_info->sensor_id_info.sensor_id_reg_addr; - camera_info->sensor_id = slave_info->sensor_id_info.sensor_id; - - /* Fill CCI master, slave address and CCI default params */ - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - rc = -EINVAL; - goto FREE_CAMERA_INFO; - } - /* Fill sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = slave_info->addr_type; - if (s_ctrl->sensor_i2c_client->client) - s_ctrl->sensor_i2c_client->client->addr = - camera_info->sensor_slave_addr; - - cci_client = s_ctrl->sensor_i2c_client->cci_client; - if (!cci_client) { - pr_err("failed: cci_client %pK", cci_client); - goto FREE_CAMERA_INFO; - } - cci_client->cci_i2c_master = s_ctrl->cci_i2c_master; - cci_client->sid = slave_info->slave_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->i2c_freq_mode = slave_info->i2c_freq_mode; - - /* Parse and fill vreg params for powerup settings */ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_setting, - power_info->power_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_power_setting_data rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Parse and fill vreg params for powerdown settings*/ - rc = msm_camera_fill_vreg_params( - power_info->cam_vreg, - power_info->num_vreg, - power_info->power_down_setting, - power_info->power_down_setting_size); - if (rc < 0) { - pr_err("failed: msm_camera_fill_vreg_params for PDOWN rc %d", - rc); - goto FREE_CAMERA_INFO; - } - - /* Update sensor, actuator and eeprom name in - * sensor control structure */ - s_ctrl->sensordata->sensor_name = slave_info->sensor_name; - s_ctrl->sensordata->eeprom_name = slave_info->eeprom_name; - s_ctrl->sensordata->actuator_name = slave_info->actuator_name; - - /* - * Update eeporm subdevice Id by input eeprom name - */ - rc = msm_sensor_fill_eeprom_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - /* - * Update actuator subdevice Id by input actuator name - */ - rc = msm_sensor_fill_actuator_subdevid_by_name(s_ctrl); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - goto FREE_CAMERA_INFO; - } - msm_sensor_remove_dev_node_for_eeprom(slave_info->camera_id, - s_ctrl->sensordata->sensor_info->subdev_id[SUB_MODULE_EEPROM]); - /* Power up and probe sensor */ - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - if (rc < 0) { - pr_err("%s power up failed", slave_info->sensor_name); - probe_fail = rc; -// goto FREE_CAMERA_INFO; - } - - pr_err("%s probe succeeded", slave_info->sensor_name); - - /* - Set probe succeeded flag to 1 so that no other camera shall - * probed on this slot - */ - s_ctrl->is_probe_succeed = 1; - - /* - * Create /dev/videoX node, comment for now until dummy /dev/videoX - * node is created and used by HAL - */ - - if (s_ctrl->sensor_device_type == MSM_CAMERA_PLATFORM_DEVICE) - rc = msm_sensor_driver_create_v4l_subdev(s_ctrl); - else - rc = msm_sensor_driver_create_i2c_v4l_subdev(s_ctrl); - if (rc < 0) { - pr_err("failed: camera creat v4l2 rc %d", rc); - goto CAMERA_POWER_DOWN; - } - - memcpy(slave_info->subdev_name, s_ctrl->msm_sd.sd.entity.name, - sizeof(slave_info->subdev_name)); - slave_info->is_probe_succeed = 1; - slave_info->sensor_info.session_id = s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - slave_info->sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - pr_err("sensor_subdev_id = %d i = %d\n",slave_info->sensor_info.subdev_id[i], i); - } - if (copy_to_user((void __user *)setting, - (void *)slave_info, sizeof(*slave_info))) { - pr_err("%s:%d copy failed\n", __func__, __LINE__); - rc = -EFAULT; - } - - /* Power down */ - s_ctrl->func_tbl->sensor_power_down(s_ctrl); - - rc = msm_sensor_fill_slave_info_init_params( - slave_info, - s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Fill slave info failed", slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - rc = msm_sensor_validate_slave_info(s_ctrl->sensordata->sensor_info); - if (rc < 0) { - pr_err("%s Validate slave info failed", - slave_info->sensor_name); - goto FREE_CAMERA_INFO; - } - /* Update sensor mount angle and position in media entity flag */ - mount_pos = s_ctrl->sensordata->sensor_info->position << 16; - mount_pos = mount_pos | ((s_ctrl->sensordata->sensor_info-> - sensor_mount_angle / 90) << 8); - s_ctrl->msm_sd.sd.entity.flags = mount_pos | MEDIA_ENT_FL_DEFAULT; - - /*Save sensor info*/ - s_ctrl->sensordata->cam_slave_info = slave_info; - - if(probe_fail) { - rc = probe_fail; - } - - return rc; - -CAMERA_POWER_DOWN: - s_ctrl->func_tbl->sensor_power_down(s_ctrl); -FREE_CAMERA_INFO: - kfree(camera_info); -FREE_POWER_DOWN_SETTING: - kfree(power_down_setting); -FREE_POWER_SETTING: - kfree(power_setting); -FREE_SLAVE_INFO: - kfree(slave_info); - return rc; -} - -static int32_t msm_sensor_driver_get_gpio_data( - struct msm_camera_sensor_board_info *sensordata, - struct device_node *of_node) -{ - int32_t rc = 0, i = 0; - struct msm_camera_gpio_conf *gconf = NULL; - uint16_t *gpio_array = NULL; - uint16_t gpio_array_size = 0; - - /* Validate input paramters */ - if (!sensordata || !of_node) { - pr_err("failed: invalid params sensordata %p of_node %p", - sensordata, of_node); - return -EINVAL; - } - - sensordata->power_info.gpio_conf = kzalloc( - sizeof(struct msm_camera_gpio_conf), GFP_KERNEL); - if (!sensordata->power_info.gpio_conf) { - pr_err("failed"); - return -ENOMEM; - } - gconf = sensordata->power_info.gpio_conf; - - gpio_array_size = of_gpio_count(of_node); - CDBG("gpio count %d", gpio_array_size); - if (!gpio_array_size) - return 0; - - gpio_array = kzalloc(sizeof(uint16_t) * gpio_array_size, GFP_KERNEL); - if (!gpio_array) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - for (i = 0; i < gpio_array_size; i++) { - gpio_array[i] = of_get_gpio(of_node, i); - CDBG("gpio_array[%d] = %d", i, gpio_array[i]); - } - - rc = msm_camera_get_dt_gpio_req_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_CONF; - } - - rc = msm_camera_init_gpio_pin_tbl(of_node, gconf, gpio_array, - gpio_array_size); - if (rc < 0) { - pr_err("failed"); - goto FREE_GPIO_REQ_TBL; - } - - kfree(gpio_array); - return rc; - -FREE_GPIO_REQ_TBL: - kfree(sensordata->power_info.gpio_conf->cam_gpio_req_tbl); -FREE_GPIO_CONF: - kfree(sensordata->power_info.gpio_conf); - kfree(gpio_array); - return rc; -} - -static int32_t msm_sensor_driver_get_dt_data(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - struct msm_camera_sensor_board_info *sensordata = NULL; - struct device_node *of_node = s_ctrl->of_node; - uint32_t cell_id; - - s_ctrl->sensordata = kzalloc(sizeof(*sensordata), GFP_KERNEL); - if (!s_ctrl->sensordata) { - pr_err("failed: no memory"); - return -ENOMEM; - } - - sensordata = s_ctrl->sensordata; - - /* - * Read cell index - this cell index will be the camera slot where - * this camera will be mounted - */ - rc = of_property_read_u32(of_node, "cell-index", &cell_id); - if (rc < 0) { - pr_err("failed: cell-index rc %d", rc); - goto FREE_SENSOR_DATA; - } - s_ctrl->id = cell_id; - - /* Validate cell_id */ - if (cell_id >= MAX_CAMERAS) { - pr_err("failed: invalid cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Check whether g_sctrl is already filled for this cell_id */ - if (g_sctrl[cell_id]) { - pr_err("failed: sctrl already filled for cell_id %d", cell_id); - rc = -EINVAL; - goto FREE_SENSOR_DATA; - } - - /* Read subdev info */ - rc = msm_sensor_get_sub_module_index(of_node, &sensordata->sensor_info); - if (rc < 0) { - pr_err("failed"); - goto FREE_SENSOR_DATA; - } - - /* Read vreg information */ - rc = msm_camera_get_dt_vreg_data(of_node, - &sensordata->power_info.cam_vreg, - &sensordata->power_info.num_vreg); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_vreg_data rc %d", rc); - goto FREE_SUB_MODULE_DATA; - } - - /* Read gpio information */ - rc = msm_sensor_driver_get_gpio_data(sensordata, of_node); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_get_gpio_data rc %d", rc); - goto FREE_VREG_DATA; - } - - /* Get CCI master */ - rc = of_property_read_u32(of_node, "qcom,cci-master", - &s_ctrl->cci_i2c_master); - CDBG("qcom,cci-master %d, rc %d", s_ctrl->cci_i2c_master, rc); - if (rc < 0) { - /* Set default master 0 */ - s_ctrl->cci_i2c_master = MASTER_0; - rc = 0; - } - - /* Get mount angle */ - if (0 > of_property_read_u32(of_node, "qcom,mount-angle", - &sensordata->sensor_info->sensor_mount_angle)) { - /* Invalidate mount angle flag */ - sensordata->sensor_info->is_mount_angle_valid = 0; - sensordata->sensor_info->sensor_mount_angle = 0; - } else { - sensordata->sensor_info->is_mount_angle_valid = 1; - } - CDBG("%s qcom,mount-angle %d\n", __func__, - sensordata->sensor_info->sensor_mount_angle); - if (0 > of_property_read_u32(of_node, "qcom,sensor-position", - &sensordata->sensor_info->position)) { - CDBG("%s:%d Invalid sensor position\n", __func__, __LINE__); - sensordata->sensor_info->position = INVALID_CAMERA_B; - } - if (0 > of_property_read_u32(of_node, "qcom,sensor-mode", - &sensordata->sensor_info->modes_supported)) { - CDBG("%s:%d Invalid sensor mode supported\n", - __func__, __LINE__); - sensordata->sensor_info->modes_supported = CAMERA_MODE_INVALID; - } - /* Get vdd-cx regulator */ - /*Optional property, don't return error if absent */ - of_property_read_string(of_node, "qcom,vdd-cx-name", - &sensordata->misc_regulator); - CDBG("qcom,misc_regulator %s", sensordata->misc_regulator); - - s_ctrl->set_mclk_23880000 = of_property_read_bool(of_node, - "qcom,mclk-23880000"); - - CDBG("%s qcom,mclk-23880000 = %d\n", __func__, - s_ctrl->set_mclk_23880000); - -#if defined (CONFIG_CAMERA_SYSFS_V2) - /* camera information */ - if (cell_id == 0) { - rc = msm_camera_get_dt_camera_info(of_node, rear_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } else { - rc = msm_camera_get_dt_camera_info(of_node, front_cam_info); - if (rc < 0) { - pr_err("failed: msm_camera_get_dt_camera_info rc %d", rc); - goto FREE_VREG_DATA; - } - } -#endif - return rc; - -FREE_VREG_DATA: - kfree(sensordata->power_info.cam_vreg); -FREE_SUB_MODULE_DATA: - kfree(sensordata->sensor_info); -FREE_SENSOR_DATA: - kfree(sensordata); - return rc; -} - -static int32_t msm_sensor_driver_parse(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - - CDBG("Enter"); - /* Validate input parameters */ - - - /* Allocate memory for sensor_i2c_client */ - s_ctrl->sensor_i2c_client = kzalloc(sizeof(*s_ctrl->sensor_i2c_client), - GFP_KERNEL); - if (!s_ctrl->sensor_i2c_client) { - pr_err("failed: no memory sensor_i2c_client %pK", - s_ctrl->sensor_i2c_client); - return -ENOMEM; - } - - /* Allocate memory for mutex */ - s_ctrl->msm_sensor_mutex = kzalloc(sizeof(*s_ctrl->msm_sensor_mutex), - GFP_KERNEL); - if (!s_ctrl->msm_sensor_mutex) { - pr_err("failed: no memory msm_sensor_mutex %pK", - s_ctrl->msm_sensor_mutex); - goto FREE_SENSOR_I2C_CLIENT; - } - - /* Parse dt information and store in sensor control structure */ - rc = msm_sensor_driver_get_dt_data(s_ctrl); - if (rc < 0) { - pr_err("failed: rc %d", rc); - goto FREE_MUTEX; - } - - /* Initialize mutex */ - mutex_init(s_ctrl->msm_sensor_mutex); - - /* Initilize v4l2 subdev info */ - s_ctrl->sensor_v4l2_subdev_info = msm_sensor_driver_subdev_info; - s_ctrl->sensor_v4l2_subdev_info_size = - ARRAY_SIZE(msm_sensor_driver_subdev_info); - - /* Initialize default parameters */ - rc = msm_sensor_init_default_params(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_init_default_params rc %d", rc); - goto FREE_DT_DATA; - } - - /* Store sensor control structure in static database */ - g_sctrl[s_ctrl->id] = s_ctrl; - pr_err("g_sctrl[%d] %pK", s_ctrl->id, g_sctrl[s_ctrl->id]); - - return rc; - -FREE_DT_DATA: - kfree(s_ctrl->sensordata->power_info.gpio_conf->gpio_num_info); - kfree(s_ctrl->sensordata->power_info.gpio_conf->cam_gpio_req_tbl); - kfree(s_ctrl->sensordata->power_info.gpio_conf); - kfree(s_ctrl->sensordata->power_info.cam_vreg); - kfree(s_ctrl->sensordata); -FREE_MUTEX: - kfree(s_ctrl->msm_sensor_mutex); -FREE_SENSOR_I2C_CLIENT: - kfree(s_ctrl->sensor_i2c_client); - return rc; -} - -static int32_t msm_sensor_driver_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl = NULL; - - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) - return -ENOMEM; - - platform_set_drvdata(pdev, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE; - s_ctrl->of_node = pdev->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - /* Fill platform device */ - pdev->id = s_ctrl->id; - s_ctrl->pdev = pdev; - - /* Fill device in power info */ - s_ctrl->sensordata->power_info.dev = &pdev->dev; - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int32_t msm_sensor_driver_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int32_t rc = 0; - struct msm_sensor_ctrl_t *s_ctrl; - - CDBG("\n\nEnter: msm_sensor_driver_i2c_probe"); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("%s %s i2c_check_functionality failed\n", - __func__, client->name); - rc = -EFAULT; - return rc; - } - - /* Create sensor control structure */ - s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL); - if (!s_ctrl) - return -ENOMEM; - - i2c_set_clientdata(client, s_ctrl); - - /* Initialize sensor device type */ - s_ctrl->sensor_device_type = MSM_CAMERA_I2C_DEVICE; - s_ctrl->of_node = client->dev.of_node; - - rc = msm_sensor_driver_parse(s_ctrl); - if (rc < 0) { - pr_err("failed: msm_sensor_driver_parse rc %d", rc); - goto FREE_S_CTRL; - } - - if (s_ctrl->sensor_i2c_client != NULL) { - s_ctrl->sensor_i2c_client->client = client; - s_ctrl->sensordata->power_info.dev = &client->dev; - - } - - return rc; -FREE_S_CTRL: - kfree(s_ctrl); - return rc; -} - -static int msm_sensor_driver_i2c_remove(struct i2c_client *client) -{ - struct msm_sensor_ctrl_t *s_ctrl = i2c_get_clientdata(client); - - pr_err("%s: sensor FREE\n", __func__); - - if (!s_ctrl) { - pr_err("%s: sensor device is NULL\n", __func__); - return 0; - } - - g_sctrl[s_ctrl->id] = NULL; - msm_sensor_free_sensor_data(s_ctrl); - kfree(s_ctrl->msm_sensor_mutex); - kfree(s_ctrl->sensor_i2c_client); - kfree(s_ctrl); - - return 0; -} - -static const struct i2c_device_id i2c_id[] = { - {SENSOR_DRIVER_I2C, (kernel_ulong_t)NULL}, - { } -}; - -static struct i2c_driver msm_sensor_driver_i2c = { - .id_table = i2c_id, - .probe = msm_sensor_driver_i2c_probe, - .remove = msm_sensor_driver_i2c_remove, - .driver = { - .name = SENSOR_DRIVER_I2C, - }, -}; - -static int __init msm_sensor_driver_init(void) -{ - int32_t rc = 0; - - CDBG("Enter"); - -#ifdef CONFIG_CAM_DISABLE_LPM_MODE - if(poweroff_charging) { - pr_err("%s : Camera is not probed in LPM mode", __func__); - return 0; - } -#endif - - rc = platform_driver_probe(&msm_sensor_platform_driver, - msm_sensor_driver_platform_probe); - if (!rc) { - CDBG("probe success"); - return rc; - } else { - CDBG("probe i2c"); - rc = i2c_add_driver(&msm_sensor_driver_i2c); - } - - return rc; -} - - -static void __exit msm_sensor_driver_exit(void) -{ - CDBG("Enter"); - platform_driver_unregister(&msm_sensor_platform_driver); - i2c_del_driver(&msm_sensor_driver_i2c); - return; -} - -#if defined CONFIG_SEC_CAMERA_TUNING -int register_table_init(char *filename) { - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return -1; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - return -1; - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - return -1; - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to if part of string compare sr352_regs_table"); - regs_table = dp; - table_size = lsize; - *((regs_table+ table_size) - 1) = '\0'; - return 0; -} - -void register_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (regs_table) { - vfree(regs_table); - regs_table = NULL; - } -} - -int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name) { - char *start, *end, *reg,reg_buf[7], data_buf[7]; - int rc,addr,value; - addr=0; - rc=0; - value=0; - - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - *(reg_buf + 4) = '\0'; - *(data_buf + 4) = '\0'; - } else { - *(reg_buf + 6) = '\0'; - *(data_buf + 6) = '\0'; - } - if(regs_table == NULL) { - pr_err("regs_table is null "); - return -1; - } - pr_err("@@@ %s",name); - start = strstr(regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf, (reg + 7), 4); - } else { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf, (reg + 9), 6); - } - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!"); - if(data_type == MSM_CAMERA_I2C_BYTE_DATA) { - start = (reg + 14); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } else { - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - } else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - } - pr_err("register_read_from_sdcard end!"); - return rc; -} - -#endif - -module_init(msm_sensor_driver_init); -module_exit(msm_sensor_driver_exit); -MODULE_DESCRIPTION("msm_sensor_driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.h deleted file mode 100644 index a0aaa3818309..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_driver.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_DRIVER_H -#define MSM_SENSOR_DRIVER_H - -#include "msm_sensor.h" - -int32_t msm_sensor_driver_probe(void *setting); -int32_t msm_sensor_remove_dev_node_for_eeprom(int id,int remove); -struct yuv_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int aeawblock; - unsigned int resolution; - unsigned int prev_resolution; -}; - -struct yuv_ctrl { - struct yuv_userset settings; - int op_mode; - int prev_mode; - int streamon; - int vtcall_mode; - int exif_iso; - int exif_shutterspeed; -}; - - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.c deleted file mode 100644 index 1df276128710..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.c +++ /dev/null @@ -1,717 +0,0 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "MSM-SENSOR-INIT %s:%d " fmt "\n", __func__, __LINE__ - -/* Header files */ -#include -#include "msm_sensor_init.h" -#include "msm_sensor_driver.h" -#include "msm_sensor.h" -#include "msm_sd.h" - -/* Logging macro */ -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -struct class *camera_class = NULL; -struct device *cam_dev_back = NULL; -struct device *cam_dev_front = NULL; - -uint16_t rear_vendor_id = 0; - -static struct msm_sensor_init_t *s_init; - -/* Static function declaration */ -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg); - -/* Static structure declaration */ -static struct v4l2_subdev_core_ops msm_sensor_init_subdev_core_ops = { - .ioctl = msm_sensor_init_subdev_ioctl, -}; - -static struct v4l2_subdev_ops msm_sensor_init_subdev_ops = { - .core = &msm_sensor_init_subdev_core_ops, -}; - -static const struct v4l2_subdev_internal_ops msm_sensor_init_internal_ops; - -static int msm_sensor_wait_for_probe_done(struct msm_sensor_init_t *s_init) -{ - int rc; - int tm = 10000; - - if (s_init->module_init_status == 1) { - pr_err("msm_cam_get_module_init_status -2\n"); - return 0; - } - rc = wait_event_interruptible_timeout(s_init->state_wait, - (s_init->module_init_status == 1), msecs_to_jiffies(tm)); - if (rc < 0) - pr_err("%s:%d wait failed\n", __func__, __LINE__); - else if (rc == 0) - pr_err("%s:%d wait timeout\n", __func__, __LINE__); - - return rc; -} - -/* Static function definition */ -static int32_t msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, - void *arg) -{ - int32_t rc = 0; - struct sensor_init_cfg_data *cfg = (struct sensor_init_cfg_data *)arg; - - /* Validate input parameters */ - if (!s_init || !cfg) { - pr_err("failed: s_init %pK cfg %pK", s_init, cfg); - return -EINVAL; - } - - switch (cfg->cfgtype) { - case CFG_SINIT_PROBE: - mutex_lock(&s_init->imutex); - s_init->module_init_status = 0; - rc = msm_sensor_driver_probe(cfg->cfg.setting); - mutex_unlock(&s_init->imutex); - if (rc < 0) - pr_err("failed: msm_sensor_driver_probe rc %d", rc); - break; - - case CFG_SINIT_PROBE_DONE: - s_init->module_init_status = 1; - wake_up(&s_init->state_wait); - break; - - case CFG_SINIT_PROBE_WAIT_DONE: - msm_sensor_wait_for_probe_done(s_init); - break; - - default: - pr_err("default"); - break; - } - - return rc; -} - -static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - int32_t rc = 0; - struct msm_sensor_init_t *s_init = v4l2_get_subdevdata(sd); - CDBG("Enter"); - - /* Validate input parameters */ - if (!s_init) { - pr_err("failed: s_init %pK", s_init); - return -EINVAL; - } - - switch (cmd) { - case VIDIOC_MSM_SENSOR_INIT_CFG: - rc = msm_sensor_driver_cmd(s_init, arg); - break; - - default: - pr_err_ratelimited("default\n"); - break; - } - - return rc; -} - - -static ssize_t back_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - -#if defined(CONFIG_IMX219) - char type[] = "SONY_IMX219\n"; -#elif defined(CONFIG_S5K4H5YB) - char type[] = "SLSI_S5K4H5YB\n"; -#elif defined(CONFIG_S5K4H5YC) - char type[] = "SLSI_S5K4H5YC\n"; -#elif defined(CONFIG_S5K3L2XX) - char type[] = "SLSI_S5K3L2XX\n"; -#elif defined(CONFIG_S5K4ECGX) - char type[] = "SLSI_S5K4ECGX\n"; -#elif defined(CONFIG_IMX135) - char type[] = "SONY_IMX135\n"; -#elif defined(CONFIG_SR544) - char type[] = "SILICONFILE_SR544\n"; -#elif defined(CONFIG_S5K3P3SX) - char type[] = "SLSI_S5K3P3SX\n"; -#elif defined(CONFIG_SR352) - char type[] = "SILICONFILE_SR352\n"; -#else - char type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(type), "%s", type); -} - -static ssize_t front_camera_type_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K6A3YX) - char cam_type[] = "SLSI_S5K6A3YX\n"; -#elif defined(CONFIG_S5K5E3YX) - char cam_type[] = "SLSI_S5K5E3YX\n"; -#elif defined(CONFIG_SR552) - char cam_type[] = "SLSI_SR522\n"; -#elif defined(CONFIG_SR200PC20) - char cam_type[] = "SILICONFILE_SR200PC20\n"; -#elif defined(CONFIG_SR130PC20) - char cam_type[] = "SILICONFILE_SR130PC20\n"; -#elif defined(CONFIG_DB8221A) - char cam_type[] = "DONGBU_DB8221A\n"; -#else - char cam_type[] = "NULL\n"; -#endif - - return snprintf(buf, sizeof(cam_type), "%s", cam_type); -} - -char cam_fw_ver[25] = "NULL NULL\n"; -static ssize_t back_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ -#if defined(CONFIG_S5K4ECGX) - char cam_fw[] = "S5K4ECGX N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#elif defined(CONFIG_SR352) - char cam_fw[] = "SR352 N\n"; - return snprintf(buf, sizeof(cam_fw), "%s", cam_fw); -#else - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_ver); - return snprintf(buf, sizeof(cam_fw_ver), "%s", cam_fw_ver); -#endif -} - -static ssize_t back_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_ver, sizeof(cam_fw_ver), "%s", buf); - - return size; -} - -char cam_load_fw[25] = "NULL\n"; -static ssize_t back_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", cam_load_fw); - return snprintf(buf, sizeof(cam_load_fw), "%s", cam_load_fw); -} - -static ssize_t back_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_load_fw, sizeof(cam_load_fw), "%s\n", buf); - return size; -} - -char cam_cal[40] = "NULL NULL NULL\n";//cam map - -static ssize_t back_cal_data_check_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_cal : %s\n", cam_cal); - return snprintf(buf, sizeof(cam_cal), "%s", cam_cal); -} - -static ssize_t back_cal_data_check_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_cal, sizeof(cam_cal), "%s", buf); - return size; -} - -char cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t back_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_full_ver); - return snprintf(buf, sizeof(cam_fw_full_ver), "%s", cam_fw_full_ver); -} - -static ssize_t back_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_full_ver, sizeof(cam_fw_full_ver), "%s", buf); - return size; -} - -static ssize_t rear_camera_isp_core_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char isp_core[] = "0.9000\n"; - return snprintf(buf, sizeof(isp_core), "%s", isp_core); -} -static ssize_t rear_camera_vendorid_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - char vendor_id[16] = {0}; - if (rear_vendor_id) - sprintf(vendor_id, "0x0%x\n", rear_vendor_id); - else - strncpy(vendor_id, "NULL\n", sizeof(vendor_id)); - - return snprintf(buf, sizeof(vendor_id), "%s", vendor_id); -} - -char cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_user_ver); - return snprintf(buf, sizeof(cam_fw_user_ver), "%s", cam_fw_user_ver); -} - -static ssize_t back_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_user_ver, sizeof(cam_fw_user_ver), "%s", buf); - - return size; -} - -char cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t back_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", cam_fw_factory_ver); - return snprintf(buf, sizeof(cam_fw_factory_ver), "%s", cam_fw_factory_ver); -} - -static ssize_t back_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(cam_fw_factory_ver, sizeof(cam_fw_factory_ver), "%s", buf); - - return size; -} - -char front_cam_fw_user_ver[40] = "NULL NULL\n";//multi module -static ssize_t front_camera_firmware_user_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", front_cam_fw_user_ver); - return snprintf(buf, sizeof(front_cam_fw_user_ver), "%s", front_cam_fw_user_ver); -} - -static ssize_t front_camera_firmware_user_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_user_ver, sizeof(front_cam_fw_user_ver), "%s", buf); - - return size; -} - -char front_cam_fw_factory_ver[40] = "NULL NULL\n";//multi module -static ssize_t front_camera_firmware_factory_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_fw_ver : %s\n", front_cam_fw_factory_ver); - return snprintf(buf, sizeof(front_cam_fw_factory_ver), "%s", front_cam_fw_factory_ver); -} - -static ssize_t front_camera_firmware_factory_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_factory_ver, sizeof(front_cam_fw_factory_ver), "%s", buf); - - return size; -} - - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) - char front_cam_fw_ver[25] = "S5K5E3YX N\n"; -#elif defined(CONFIG_SR552) - char front_cam_fw_ver[25] = "SR552 N\n"; -#elif defined(CONFIG_S5K6A3YX) - char front_cam_fw_ver[25] = "S5K6A3YX N\n"; -#elif defined(CONFIG_SR200PC20) - char front_cam_fw_ver[25] = "SR200PC20M N\n"; -#elif defined(CONFIG_SR130PC20) - char front_cam_fw_ver[25] = "SR130PC20 N\n"; -#elif defined(CONFIG_DB8221A) - char front_cam_fw_ver[25] = "DB8221A N\n"; -#else - char front_cam_fw_ver[25] = "NULL NULL\n"; -#endif -static ssize_t front_camera_firmware_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_ver : %s\n", front_cam_fw_ver); - return snprintf(buf, sizeof(front_cam_fw_ver), "%s", front_cam_fw_ver); -} - -static ssize_t front_camera_firmware_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_ver, sizeof(front_cam_fw_ver), "%s", buf); - - return size; -} - -#if defined(CONFIG_S5K5E3YX) && !defined(CONFIG_MSM_FRONT_EEPROM) -char front_cam_load_fw[25] = "S5K5E3YX\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "S5K5E3YX N N\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - //snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#else -char front_cam_load_fw[25] = "NULL\n"; -static ssize_t front_camera_firmware_load_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_load_fw : %s\n", front_cam_load_fw); - return snprintf(buf, sizeof(front_cam_load_fw), "%s", front_cam_load_fw); -} -static ssize_t front_camera_firmware_load_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_load_fw, sizeof(front_cam_load_fw), "%s\n", buf); - return size; -} - -char front_cam_fw_full_ver[40] = "NULL NULL NULL\n";//multi module -static ssize_t front_camera_firmware_full_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] front_cam_fw_full_ver : %s\n", front_cam_fw_full_ver); - return snprintf(buf, sizeof(front_cam_fw_full_ver), "%s", front_cam_fw_full_ver); -} -static ssize_t front_camera_firmware_full_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); - snprintf(front_cam_fw_full_ver, sizeof(front_cam_fw_full_ver), "%s", buf); - return size; -} -#endif - -#if defined (CONFIG_CAMERA_SYSFS_V2) -char rear_cam_info[100] = "NULL\n"; //camera_info -static ssize_t rear_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", rear_cam_info); - return snprintf(buf, sizeof(rear_cam_info), "%s", rear_cam_info); -} - -static ssize_t rear_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(rear_cam_info, sizeof(rear_cam_info), "%s", buf); - - return size; -} - -char front_cam_info[100] = "NULL\n"; //camera_info -static ssize_t front_camera_info_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - CDBG("[FW_DBG] cam_info : %s\n", front_cam_info); - return snprintf(buf, sizeof(front_cam_info), "%s", front_cam_info); -} - -static ssize_t front_camera_info_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - CDBG("[FW_DBG] buf : %s\n", buf); -// snprintf(front_cam_info, sizeof(front_cam_info), "%s", buf); - - return size; -} -#endif - -static DEVICE_ATTR(rear_camtype, S_IRUGO, back_camera_type_show, NULL); -static DEVICE_ATTR(rear_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_show, back_camera_firmware_store); -static DEVICE_ATTR(rear_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_user_show, back_camera_firmware_user_store); -static DEVICE_ATTR(rear_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_factory_show, back_camera_firmware_factory_store); -static DEVICE_ATTR(rear_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - back_camera_firmware_load_show, back_camera_firmware_load_store); -static DEVICE_ATTR(rear_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - back_camera_firmware_full_show, back_camera_firmware_full_store); -static DEVICE_ATTR(isp_core, S_IRUGO, rear_camera_isp_core_show, NULL); -static DEVICE_ATTR(front_camtype, S_IRUGO, front_camera_type_show, NULL); -static DEVICE_ATTR(front_camfw, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_show, front_camera_firmware_store); -static DEVICE_ATTR(front_camfw_load, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_load_show, front_camera_firmware_load_store); - -static DEVICE_ATTR(front_camfw_full, S_IRUGO | S_IWUSR | S_IWGRP, - front_camera_firmware_full_show, front_camera_firmware_full_store); -static DEVICE_ATTR(front_checkfw_user, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_user_show, front_camera_firmware_user_store); -static DEVICE_ATTR(front_checkfw_factory, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_firmware_factory_show, front_camera_firmware_factory_store); - -static DEVICE_ATTR(rear_vendorid, S_IRUGO, rear_camera_vendorid_show, NULL); -static DEVICE_ATTR(rear_afcal, S_IRUGO|S_IWUSR|S_IWGRP, - back_cal_data_check_show, back_cal_data_check_store); -#if defined (CONFIG_CAMERA_SYSFS_V2) -static DEVICE_ATTR(rear_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - rear_camera_info_show, rear_camera_info_store); -static DEVICE_ATTR(front_caminfo, S_IRUGO|S_IWUSR|S_IWGRP, - front_camera_info_show, front_camera_info_store); -#endif - -int32_t msm_sensor_remove_dev_node_for_eeprom(int id, int remove) -{ - if(id == CAMERA_0) { - if(remove == -1) { - device_remove_file(cam_dev_back, &dev_attr_rear_camfw_full); - pr_err("[CAM][Rear] EEPROM node removed\n"); - } - } else { - if(remove == -1) { - device_remove_file(cam_dev_front, &dev_attr_front_camfw_full); - pr_err("[CAM][Front] EEPROM node removed\n"); - } - } - return 0; -} -static int __init msm_sensor_init_module(void) -{ - struct msm_sensor_init_t *s_init = NULL; - int rc = 0; - - if (camera_class == NULL){ - camera_class = class_create(THIS_MODULE, "camera"); - if (IS_ERR(camera_class)) - pr_err("failed to create device cam_dev_rear!\n"); - } - /* Allocate memory for msm_sensor_init control structure */ - s_init = kzalloc(sizeof(struct msm_sensor_init_t), GFP_KERNEL); - if (!s_init) { - class_destroy(camera_class); - return -ENOMEM; - } - - pr_err("MSM_SENSOR_INIT_MODULE %pK", NULL); - - /* Initialize mutex */ - mutex_init(&s_init->imutex); - - /* Create /dev/v4l-subdevX for msm_sensor_init */ - v4l2_subdev_init(&s_init->msm_sd.sd, &msm_sensor_init_subdev_ops); - snprintf(s_init->msm_sd.sd.name, sizeof(s_init->msm_sd.sd.name), "%s", - "msm_sensor_init"); - v4l2_set_subdevdata(&s_init->msm_sd.sd, s_init); - s_init->msm_sd.sd.internal_ops = &msm_sensor_init_internal_ops; - s_init->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - rc = media_entity_init(&s_init->msm_sd.sd.entity, 0, NULL, 0); - if (rc < 0) - goto entity_fail; - s_init->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - s_init->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_SENSOR_INIT; - s_init->msm_sd.sd.entity.name = s_init->msm_sd.sd.name; - s_init->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x6; - rc = msm_sd_register(&s_init->msm_sd); - if (rc < 0) - goto msm_sd_register_fail; - - cam_dev_back = device_create(camera_class, NULL, - 1, NULL, "rear"); - if (IS_ERR(cam_dev_back)) { - printk("Failed to create cam_dev_back device!\n"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - if (device_create_file(cam_dev_back, &dev_attr_rear_afcal) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_afcal.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_isp_core) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_isp_core.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_back, &dev_attr_rear_vendorid) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_vendorid.attr.name); - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_back, &dev_attr_rear_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_caminfo.attr.name); - goto device_create_fail; - } -#endif - - cam_dev_front = device_create(camera_class, NULL, - 2, NULL, "front"); - if (IS_ERR(cam_dev_front)) { - printk("Failed to create cam_dev_front device!"); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camtype) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camtype.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_camfw.attr.name); - goto device_create_fail; - } - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_load) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_load.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_camfw_full) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_rear_camfw_full.attr.name); - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_checkfw_user) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_checkfw_user.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - - if (device_create_file(cam_dev_front, &dev_attr_front_checkfw_factory) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_checkfw_factory.attr.name); - rc = -ENODEV; - goto device_create_fail; - } - -#if defined (CONFIG_CAMERA_SYSFS_V2) - if (device_create_file(cam_dev_front, &dev_attr_front_caminfo) < 0) { - printk("Failed to create device file!(%s)!\n", - dev_attr_front_caminfo.attr.name); - goto device_create_fail; - } -#endif - - init_waitqueue_head(&s_init->state_wait); - - return 0; -device_create_fail: - msm_sd_unregister(&s_init->msm_sd); -msm_sd_register_fail: - media_entity_cleanup(&s_init->msm_sd.sd.entity); -entity_fail: - mutex_destroy(&s_init->imutex); - kfree(s_init); - class_destroy(camera_class); - return rc; -} - -static void __exit msm_sensor_exit_module(void) -{ - msm_sd_unregister(&s_init->msm_sd); - mutex_destroy(&s_init->imutex); - kfree(s_init); - return; -} - -module_init(msm_sensor_init_module); -module_exit(msm_sensor_exit_module); -MODULE_DESCRIPTION("msm_sensor_init"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.h deleted file mode 100644 index a9700ec94d43..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/msm_sensor_init.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef MSM_SENSOR_INIT_H -#define MSM_SENSOR_INIT_H - -#include "msm_sensor.h" - -struct msm_sensor_init_t { - struct mutex imutex; - struct msm_sd_subdev msm_sd; - int module_init_status; - wait_queue_head_t state_wait; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/mt9m114.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/mt9m114.c deleted file mode 100644 index 97feef3d945c..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/mt9m114.c +++ /dev/null @@ -1,1510 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define MT9M114_SENSOR_NAME "mt9m114" -#define PLATFORM_DRIVER_NAME "msm_camera_mt9m114" -#define mt9m114_obj mt9m114_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -/* Sysctl registers */ -#define MT9M114_COMMAND_REGISTER 0x0080 -#define MT9M114_COMMAND_REGISTER_APPLY_PATCH (1 << 0) -#define MT9M114_COMMAND_REGISTER_SET_STATE (1 << 1) -#define MT9M114_COMMAND_REGISTER_REFRESH (1 << 2) -#define MT9M114_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) -#define MT9M114_COMMAND_REGISTER_OK (1 << 15) - -DEFINE_MSM_MUTEX(mt9m114_mut); -static struct msm_sensor_ctrl_t mt9m114_s_ctrl; - -static struct msm_sensor_power_setting mt9m114_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 100, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_720p_settings[] = { - {0xdc00, 0x50, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x52, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_POLL}, - - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ -}; - -static struct msm_camera_i2c_reg_conf mt9m114_recommend_settings[] = { - {0x301A, 0x0200, MSM_CAMERA_I2C_SET_WORD_MASK}, - {0x098E, 0, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_enable = 1*/ - {0xC97E, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - /*cam_sysctl_pll_divider_m_n = 288*/ - {0xC980, 0x0120,}, - /*cam_sysctl_pll_divider_p = 1792*/ - {0xC982, 0x0700,}, - /*output_control = 32769*/ - {0xC984, 0x8001,}, - /*mipi_timing_t_hs_zero = 3840*/ - {0xC988, 0x0F00,}, - /*mipi_timing_t_hs_exit_hs_trail = 2823*/ - {0xC98A, 0x0B07,}, - /*mipi_timing_t_clk_post_clk_pre = 3329*/ - {0xC98C, 0x0D01,}, - /*mipi_timing_t_clk_trail_clk_zero = 1821*/ - {0xC98E, 0x071D,}, - /*mipi_timing_t_lpx = 6*/ - {0xC990, 0x0006,}, - /*mipi_timing_init_timing = 2572*/ - {0xC992, 0x0A0C,}, - {0xC800, 0x007C,},/*y_addr_start = 124*/ - {0xC802, 0x0004,},/*x_addr_start = 4*/ - {0xC804, 0x0353,},/*y_addr_end = 851*/ - {0xC806, 0x050B,},/*x_addr_end = 1291*/ - {0xC808, 0x02DC,},/*pixclk = 48000000*/ - {0xC80A, 0x6C00,},/*pixclk = 48000000*/ - {0xC80C, 0x0001,},/*row_speed = 1*/ - {0xC80E, 0x00DB,},/*fine_integ_time_min = 219*/ - {0xC810, 0x05BD,},/*fine_integ_time_max = 1469*/ - {0xC812, 0x03E8,},/*frame_length_lines = 1000*/ - {0xC814, 0x0640,},/*line_length_pck = 1600*/ - {0xC816, 0x0060,},/*fine_correction = 96*/ - {0xC818, 0x02D3,},/*cpipe_last_row = 723*/ - {0xC826, 0x0020,},/*reg_0_data = 32*/ - {0xC834, 0x0000,},/*sensor_control_read_mode = 0*/ - {0xC854, 0x0000,},/*crop_window_xoffset = 0*/ - {0xC856, 0x0000,},/*crop_window_yoffset = 0*/ - {0xC858, 0x0500,},/*crop_window_width = 1280*/ - {0xC85A, 0x02D0,},/*crop_window_height = 720*/ - {0xC85C, 0x03, MSM_CAMERA_I2C_BYTE_DATA}, /*crop_cropmode = 3*/ - {0xC868, 0x0500,},/*output_width = 1280*/ - {0xC86A, 0x02D0,},/*output_height = 720*/ - {0xC878, 0x00, MSM_CAMERA_I2C_BYTE_DATA}, /*aet_aemode = 0*/ - {0xC88C, 0x1E00,},/*aet_max_frame_rate = 7680*/ - {0xC88E, 0x1E00,},/*aet_min_frame_rate = 7680*/ - {0xC914, 0x0000,},/*stat_awb_window_xstart = 0*/ - {0xC916, 0x0000,},/*stat_awb_window_ystart = 0*/ - {0xC918, 0x04FF,},/*stat_awb_window_xend = 1279*/ - {0xC91A, 0x02CF,},/*stat_awb_window_yend = 719*/ - {0xC91C, 0x0000,},/*stat_ae_window_xstart = 0*/ - {0xC91E, 0x0000,},/*stat_ae_window_ystart = 0*/ - {0xC920, 0x00FF,},/*stat_ae_window_xend = 255*/ - {0xC922, 0x008F,},/*stat_ae_window_yend = 143*/ - - /*Sensor optimization*/ - {0x316A, 0x8270,}, - {0x316C, 0x8270,}, - {0x3ED0, 0x2305,}, - {0x3ED2, 0x77CF,}, - {0x316E, 0x8202,}, - {0x3180, 0x87FF,}, - {0x30D4, 0x6080,}, - {0xA802, 0x0008,},/*AE_TRACK_MODE*/ - {0x3E14, 0xFF39,}, - {0x0982, 0x0001,},/*ACCESS_CTL_STAT*/ - {0x098A, 0x5000,},/*PHYSICAL_ADDRESS_ACCESS*/ - {0xD000, 0x70CF,}, - {0xD002, 0xFFFF,}, - {0xD004, 0xC5D4,}, - {0xD006, 0x903A,}, - {0xD008, 0x2144,}, - {0xD00A, 0x0C00,}, - {0xD00C, 0x2186,}, - {0xD00E, 0x0FF3,}, - {0xD010, 0xB844,}, - {0xD012, 0xB948,}, - {0xD014, 0xE082,}, - {0xD016, 0x20CC,}, - {0xD018, 0x80E2,}, - {0xD01A, 0x21CC,}, - {0xD01C, 0x80A2,}, - {0xD01E, 0x21CC,}, - {0xD020, 0x80E2,}, - {0xD022, 0xF404,}, - {0xD024, 0xD801,}, - {0xD026, 0xF003,}, - {0xD028, 0xD800,}, - {0xD02A, 0x7EE0,}, - {0xD02C, 0xC0F1,}, - {0xD02E, 0x08BA,}, - {0xD030, 0x0600,}, - {0xD032, 0xC1A1,}, - {0xD034, 0x76CF,}, - {0xD036, 0xFFFF,}, - {0xD038, 0xC130,}, - {0xD03A, 0x6E04,}, - {0xD03C, 0xC040,}, - {0xD03E, 0x71CF,}, - {0xD040, 0xFFFF,}, - {0xD042, 0xC790,}, - {0xD044, 0x8103,}, - {0xD046, 0x77CF,}, - {0xD048, 0xFFFF,}, - {0xD04A, 0xC7C0,}, - {0xD04C, 0xE001,}, - {0xD04E, 0xA103,}, - {0xD050, 0xD800,}, - {0xD052, 0x0C6A,}, - {0xD054, 0x04E0,}, - {0xD056, 0xB89E,}, - {0xD058, 0x7508,}, - {0xD05A, 0x8E1C,}, - {0xD05C, 0x0809,}, - {0xD05E, 0x0191,}, - {0xD060, 0xD801,}, - {0xD062, 0xAE1D,}, - {0xD064, 0xE580,}, - {0xD066, 0x20CA,}, - {0xD068, 0x0022,}, - {0xD06A, 0x20CF,}, - {0xD06C, 0x0522,}, - {0xD06E, 0x0C5C,}, - {0xD070, 0x04E2,}, - {0xD072, 0x21CA,}, - {0xD074, 0x0062,}, - {0xD076, 0xE580,}, - {0xD078, 0xD901,}, - {0xD07A, 0x79C0,}, - {0xD07C, 0xD800,}, - {0xD07E, 0x0BE6,}, - {0xD080, 0x04E0,}, - {0xD082, 0xB89E,}, - {0xD084, 0x70CF,}, - {0xD086, 0xFFFF,}, - {0xD088, 0xC8D4,}, - {0xD08A, 0x9002,}, - {0xD08C, 0x0857,}, - {0xD08E, 0x025E,}, - {0xD090, 0xFFDC,}, - {0xD092, 0xE080,}, - {0xD094, 0x25CC,}, - {0xD096, 0x9022,}, - {0xD098, 0xF225,}, - {0xD09A, 0x1700,}, - {0xD09C, 0x108A,}, - {0xD09E, 0x73CF,}, - {0xD0A0, 0xFF00,}, - {0xD0A2, 0x3174,}, - {0xD0A4, 0x9307,}, - {0xD0A6, 0x2A04,}, - {0xD0A8, 0x103E,}, - {0xD0AA, 0x9328,}, - {0xD0AC, 0x2942,}, - {0xD0AE, 0x7140,}, - {0xD0B0, 0x2A04,}, - {0xD0B2, 0x107E,}, - {0xD0B4, 0x9349,}, - {0xD0B6, 0x2942,}, - {0xD0B8, 0x7141,}, - {0xD0BA, 0x2A04,}, - {0xD0BC, 0x10BE,}, - {0xD0BE, 0x934A,}, - {0xD0C0, 0x2942,}, - {0xD0C2, 0x714B,}, - {0xD0C4, 0x2A04,}, - {0xD0C6, 0x10BE,}, - {0xD0C8, 0x130C,}, - {0xD0CA, 0x010A,}, - {0xD0CC, 0x2942,}, - {0xD0CE, 0x7142,}, - {0xD0D0, 0x2250,}, - {0xD0D2, 0x13CA,}, - {0xD0D4, 0x1B0C,}, - {0xD0D6, 0x0284,}, - {0xD0D8, 0xB307,}, - {0xD0DA, 0xB328,}, - {0xD0DC, 0x1B12,}, - {0xD0DE, 0x02C4,}, - {0xD0E0, 0xB34A,}, - {0xD0E2, 0xED88,}, - {0xD0E4, 0x71CF,}, - {0xD0E6, 0xFF00,}, - {0xD0E8, 0x3174,}, - {0xD0EA, 0x9106,}, - {0xD0EC, 0xB88F,}, - {0xD0EE, 0xB106,}, - {0xD0F0, 0x210A,}, - {0xD0F2, 0x8340,}, - {0xD0F4, 0xC000,}, - {0xD0F6, 0x21CA,}, - {0xD0F8, 0x0062,}, - {0xD0FA, 0x20F0,}, - {0xD0FC, 0x0040,}, - {0xD0FE, 0x0B02,}, - {0xD100, 0x0320,}, - {0xD102, 0xD901,}, - {0xD104, 0x07F1,}, - {0xD106, 0x05E0,}, - {0xD108, 0xC0A1,}, - {0xD10A, 0x78E0,}, - {0xD10C, 0xC0F1,}, - {0xD10E, 0x71CF,}, - {0xD110, 0xFFFF,}, - {0xD112, 0xC7C0,}, - {0xD114, 0xD840,}, - {0xD116, 0xA900,}, - {0xD118, 0x71CF,}, - {0xD11A, 0xFFFF,}, - {0xD11C, 0xD02C,}, - {0xD11E, 0xD81E,}, - {0xD120, 0x0A5A,}, - {0xD122, 0x04E0,}, - {0xD124, 0xDA00,}, - {0xD126, 0xD800,}, - {0xD128, 0xC0D1,}, - {0xD12A, 0x7EE0,}, - {0x098E, 0x0000,}, - - {0x0982, 0x0001,}, - {0x098A, 0x5C10,}, - {0xDC10, 0xC0F1,}, - {0xDC12, 0x0CDA,}, - {0xDC14, 0x0580,}, - {0xDC16, 0x76CF,}, - {0xDC18, 0xFF00,}, - {0xDC1A, 0x2184,}, - {0xDC1C, 0x9624,}, - {0xDC1E, 0x218C,}, - {0xDC20, 0x8FC3,}, - {0xDC22, 0x75CF,}, - {0xDC24, 0xFFFF,}, - {0xDC26, 0xE058,}, - {0xDC28, 0xF686,}, - {0xDC2A, 0x1550,}, - {0xDC2C, 0x1080,}, - {0xDC2E, 0xE001,}, - {0xDC30, 0x1D50,}, - {0xDC32, 0x1002,}, - {0xDC34, 0x1552,}, - {0xDC36, 0x1100,}, - {0xDC38, 0x6038,}, - {0xDC3A, 0x1D52,}, - {0xDC3C, 0x1004,}, - {0xDC3E, 0x1540,}, - {0xDC40, 0x1080,}, - {0xDC42, 0x081B,}, - {0xDC44, 0x00D1,}, - {0xDC46, 0x8512,}, - {0xDC48, 0x1000,}, - {0xDC4A, 0x00C0,}, - {0xDC4C, 0x7822,}, - {0xDC4E, 0x2089,}, - {0xDC50, 0x0FC1,}, - {0xDC52, 0x2008,}, - {0xDC54, 0x0F81,}, - {0xDC56, 0xFFFF,}, - {0xDC58, 0xFF80,}, - {0xDC5A, 0x8512,}, - {0xDC5C, 0x1801,}, - {0xDC5E, 0x0052,}, - {0xDC60, 0xA512,}, - {0xDC62, 0x1544,}, - {0xDC64, 0x1080,}, - {0xDC66, 0xB861,}, - {0xDC68, 0x262F,}, - {0xDC6A, 0xF007,}, - {0xDC6C, 0x1D44,}, - {0xDC6E, 0x1002,}, - {0xDC70, 0x20CA,}, - {0xDC72, 0x0021,}, - {0xDC74, 0x20CF,}, - {0xDC76, 0x04E1,}, - {0xDC78, 0x0850,}, - {0xDC7A, 0x04A1,}, - {0xDC7C, 0x21CA,}, - {0xDC7E, 0x0021,}, - {0xDC80, 0x1542,}, - {0xDC82, 0x1140,}, - {0xDC84, 0x8D2C,}, - {0xDC86, 0x6038,}, - {0xDC88, 0x1D42,}, - {0xDC8A, 0x1004,}, - {0xDC8C, 0x1542,}, - {0xDC8E, 0x1140,}, - {0xDC90, 0xB601,}, - {0xDC92, 0x046D,}, - {0xDC94, 0x0580,}, - {0xDC96, 0x78E0,}, - {0xDC98, 0xD800,}, - {0xDC9A, 0xB893,}, - {0xDC9C, 0x002D,}, - {0xDC9E, 0x04A0,}, - {0xDCA0, 0xD900,}, - {0xDCA2, 0x78E0,}, - {0xDCA4, 0x72CF,}, - {0xDCA6, 0xFFFF,}, - {0xDCA8, 0xE058,}, - {0xDCAA, 0x2240,}, - {0xDCAC, 0x0340,}, - {0xDCAE, 0xA212,}, - {0xDCB0, 0x208A,}, - {0xDCB2, 0x0FFF,}, - {0xDCB4, 0x1A42,}, - {0xDCB6, 0x0004,}, - {0xDCB8, 0xD830,}, - {0xDCBA, 0x1A44,}, - {0xDCBC, 0x0002,}, - {0xDCBE, 0xD800,}, - {0xDCC0, 0x1A50,}, - {0xDCC2, 0x0002,}, - {0xDCC4, 0x1A52,}, - {0xDCC6, 0x0004,}, - {0xDCC8, 0x1242,}, - {0xDCCA, 0x0140,}, - {0xDCCC, 0x8A2C,}, - {0xDCCE, 0x6038,}, - {0xDCD0, 0x1A42,}, - {0xDCD2, 0x0004,}, - {0xDCD4, 0x1242,}, - {0xDCD6, 0x0141,}, - {0xDCD8, 0x70CF,}, - {0xDCDA, 0xFF00,}, - {0xDCDC, 0x2184,}, - {0xDCDE, 0xB021,}, - {0xDCE0, 0xD800,}, - {0xDCE2, 0xB893,}, - {0xDCE4, 0x07E5,}, - {0xDCE6, 0x0460,}, - {0xDCE8, 0xD901,}, - {0xDCEA, 0x78E0,}, - {0xDCEC, 0xC0F1,}, - {0xDCEE, 0x0BFA,}, - {0xDCF0, 0x05A0,}, - {0xDCF2, 0x216F,}, - {0xDCF4, 0x0043,}, - {0xDCF6, 0xC1A4,}, - {0xDCF8, 0x220A,}, - {0xDCFA, 0x1F80,}, - {0xDCFC, 0xFFFF,}, - {0xDCFE, 0xE058,}, - {0xDD00, 0x2240,}, - {0xDD02, 0x134F,}, - {0xDD04, 0x1A48,}, - {0xDD06, 0x13C0,}, - {0xDD08, 0x1248,}, - {0xDD0A, 0x1002,}, - {0xDD0C, 0x70CF,}, - {0xDD0E, 0x7FFF,}, - {0xDD10, 0xFFFF,}, - {0xDD12, 0xE230,}, - {0xDD14, 0xC240,}, - {0xDD16, 0xDA00,}, - {0xDD18, 0xF00C,}, - {0xDD1A, 0x1248,}, - {0xDD1C, 0x1003,}, - {0xDD1E, 0x1301,}, - {0xDD20, 0x04CB,}, - {0xDD22, 0x7261,}, - {0xDD24, 0x2108,}, - {0xDD26, 0x0081,}, - {0xDD28, 0x2009,}, - {0xDD2A, 0x0080,}, - {0xDD2C, 0x1A48,}, - {0xDD2E, 0x10C0,}, - {0xDD30, 0x1248,}, - {0xDD32, 0x100B,}, - {0xDD34, 0xC300,}, - {0xDD36, 0x0BE7,}, - {0xDD38, 0x90C4,}, - {0xDD3A, 0x2102,}, - {0xDD3C, 0x0003,}, - {0xDD3E, 0x238C,}, - {0xDD40, 0x8FC3,}, - {0xDD42, 0xF6C7,}, - {0xDD44, 0xDAFF,}, - {0xDD46, 0x1A05,}, - {0xDD48, 0x1082,}, - {0xDD4A, 0xC241,}, - {0xDD4C, 0xF005,}, - {0xDD4E, 0x7A6F,}, - {0xDD50, 0xC241,}, - {0xDD52, 0x1A05,}, - {0xDD54, 0x10C2,}, - {0xDD56, 0x2000,}, - {0xDD58, 0x8040,}, - {0xDD5A, 0xDA00,}, - {0xDD5C, 0x20C0,}, - {0xDD5E, 0x0064,}, - {0xDD60, 0x781C,}, - {0xDD62, 0xC042,}, - {0xDD64, 0x1C0E,}, - {0xDD66, 0x3082,}, - {0xDD68, 0x1A48,}, - {0xDD6A, 0x13C0,}, - {0xDD6C, 0x7548,}, - {0xDD6E, 0x7348,}, - {0xDD70, 0x7148,}, - {0xDD72, 0x7648,}, - {0xDD74, 0xF002,}, - {0xDD76, 0x7608,}, - {0xDD78, 0x1248,}, - {0xDD7A, 0x1000,}, - {0xDD7C, 0x1400,}, - {0xDD7E, 0x300B,}, - {0xDD80, 0x084D,}, - {0xDD82, 0x02C5,}, - {0xDD84, 0x1248,}, - {0xDD86, 0x1000,}, - {0xDD88, 0xE101,}, - {0xDD8A, 0x1001,}, - {0xDD8C, 0x04CB,}, - {0xDD8E, 0x1A48,}, - {0xDD90, 0x1000,}, - {0xDD92, 0x7361,}, - {0xDD94, 0x1408,}, - {0xDD96, 0x300B,}, - {0xDD98, 0x2302,}, - {0xDD9A, 0x02C0,}, - {0xDD9C, 0x780D,}, - {0xDD9E, 0x2607,}, - {0xDDA0, 0x903E,}, - {0xDDA2, 0x07D6,}, - {0xDDA4, 0xFFE3,}, - {0xDDA6, 0x792F,}, - {0xDDA8, 0x09CF,}, - {0xDDAA, 0x8152,}, - {0xDDAC, 0x1248,}, - {0xDDAE, 0x100E,}, - {0xDDB0, 0x2400,}, - {0xDDB2, 0x334B,}, - {0xDDB4, 0xE501,}, - {0xDDB6, 0x7EE2,}, - {0xDDB8, 0x0DBF,}, - {0xDDBA, 0x90F2,}, - {0xDDBC, 0x1B0C,}, - {0xDDBE, 0x1382,}, - {0xDDC0, 0xC123,}, - {0xDDC2, 0x140E,}, - {0xDDC4, 0x3080,}, - {0xDDC6, 0x7822,}, - {0xDDC8, 0x1A07,}, - {0xDDCA, 0x1002,}, - {0xDDCC, 0x124C,}, - {0xDDCE, 0x1000,}, - {0xDDD0, 0x120B,}, - {0xDDD2, 0x1081,}, - {0xDDD4, 0x1207,}, - {0xDDD6, 0x1083,}, - {0xDDD8, 0x2142,}, - {0xDDDA, 0x004B,}, - {0xDDDC, 0x781B,}, - {0xDDDE, 0x0B21,}, - {0xDDE0, 0x02E2,}, - {0xDDE2, 0x1A4C,}, - {0xDDE4, 0x1000,}, - {0xDDE6, 0xE101,}, - {0xDDE8, 0x0915,}, - {0xDDEA, 0x00C2,}, - {0xDDEC, 0xC101,}, - {0xDDEE, 0x1204,}, - {0xDDF0, 0x1083,}, - {0xDDF2, 0x090D,}, - {0xDDF4, 0x00C2,}, - {0xDDF6, 0xE001,}, - {0xDDF8, 0x1A4C,}, - {0xDDFA, 0x1000,}, - {0xDDFC, 0x1A06,}, - {0xDDFE, 0x1002,}, - {0xDE00, 0x234A,}, - {0xDE02, 0x1000,}, - {0xDE04, 0x7169,}, - {0xDE06, 0xF008,}, - {0xDE08, 0x2053,}, - {0xDE0A, 0x0003,}, - {0xDE0C, 0x6179,}, - {0xDE0E, 0x781C,}, - {0xDE10, 0x2340,}, - {0xDE12, 0x104B,}, - {0xDE14, 0x1203,}, - {0xDE16, 0x1083,}, - {0xDE18, 0x0BF1,}, - {0xDE1A, 0x90C2,}, - {0xDE1C, 0x1202,}, - {0xDE1E, 0x1080,}, - {0xDE20, 0x091D,}, - {0xDE22, 0x0004,}, - {0xDE24, 0x70CF,}, - {0xDE26, 0xFFFF,}, - {0xDE28, 0xC644,}, - {0xDE2A, 0x881B,}, - {0xDE2C, 0xE0B2,}, - {0xDE2E, 0xD83C,}, - {0xDE30, 0x20CA,}, - {0xDE32, 0x0CA2,}, - {0xDE34, 0x1A01,}, - {0xDE36, 0x1002,}, - {0xDE38, 0x1A4C,}, - {0xDE3A, 0x1080,}, - {0xDE3C, 0x02B9,}, - {0xDE3E, 0x05A0,}, - {0xDE40, 0xC0A4,}, - {0xDE42, 0x78E0,}, - {0xDE44, 0xC0F1,}, - {0xDE46, 0xFF95,}, - {0xDE48, 0xD800,}, - {0xDE4A, 0x71CF,}, - {0xDE4C, 0xFF00,}, - {0xDE4E, 0x1FE0,}, - {0xDE50, 0x19D0,}, - {0xDE52, 0x001C,}, - {0xDE54, 0x19D1,}, - {0xDE56, 0x001C,}, - {0xDE58, 0x70CF,}, - {0xDE5A, 0xFFFF,}, - {0xDE5C, 0xE058,}, - {0xDE5E, 0x901F,}, - {0xDE60, 0xB861,}, - {0xDE62, 0x19D2,}, - {0xDE64, 0x001C,}, - {0xDE66, 0xC0D1,}, - {0xDE68, 0x7EE0,}, - {0xDE6A, 0x78E0,}, - {0xDE6C, 0xC0F1,}, - {0xDE6E, 0x0A7A,}, - {0xDE70, 0x0580,}, - {0xDE72, 0x70CF,}, - {0xDE74, 0xFFFF,}, - {0xDE76, 0xC5D4,}, - {0xDE78, 0x9041,}, - {0xDE7A, 0x9023,}, - {0xDE7C, 0x75CF,}, - {0xDE7E, 0xFFFF,}, - {0xDE80, 0xE058,}, - {0xDE82, 0x7942,}, - {0xDE84, 0xB967,}, - {0xDE86, 0x7F30,}, - {0xDE88, 0xB53F,}, - {0xDE8A, 0x71CF,}, - {0xDE8C, 0xFFFF,}, - {0xDE8E, 0xC84C,}, - {0xDE90, 0x91D3,}, - {0xDE92, 0x108B,}, - {0xDE94, 0x0081,}, - {0xDE96, 0x2615,}, - {0xDE98, 0x1380,}, - {0xDE9A, 0x090F,}, - {0xDE9C, 0x0C91,}, - {0xDE9E, 0x0A8E,}, - {0xDEA0, 0x05A0,}, - {0xDEA2, 0xD906,}, - {0xDEA4, 0x7E10,}, - {0xDEA6, 0x2615,}, - {0xDEA8, 0x1380,}, - {0xDEAA, 0x0A82,}, - {0xDEAC, 0x05A0,}, - {0xDEAE, 0xD960,}, - {0xDEB0, 0x790F,}, - {0xDEB2, 0x090D,}, - {0xDEB4, 0x0133,}, - {0xDEB6, 0xAD0C,}, - {0xDEB8, 0xD904,}, - {0xDEBA, 0xAD2C,}, - {0xDEBC, 0x79EC,}, - {0xDEBE, 0x2941,}, - {0xDEC0, 0x7402,}, - {0xDEC2, 0x71CF,}, - {0xDEC4, 0xFF00,}, - {0xDEC6, 0x2184,}, - {0xDEC8, 0xB142,}, - {0xDECA, 0x1906,}, - {0xDECC, 0x0E44,}, - {0xDECE, 0xFFDE,}, - {0xDED0, 0x70C9,}, - {0xDED2, 0x0A5A,}, - {0xDED4, 0x05A0,}, - {0xDED6, 0x8D2C,}, - {0xDED8, 0xAD0B,}, - {0xDEDA, 0xD800,}, - {0xDEDC, 0xAD01,}, - {0xDEDE, 0x0219,}, - {0xDEE0, 0x05A0,}, - {0xDEE2, 0xA513,}, - {0xDEE4, 0xC0F1,}, - {0xDEE6, 0x71CF,}, - {0xDEE8, 0xFFFF,}, - {0xDEEA, 0xC644,}, - {0xDEEC, 0xA91B,}, - {0xDEEE, 0xD902,}, - {0xDEF0, 0x70CF,}, - {0xDEF2, 0xFFFF,}, - {0xDEF4, 0xC84C,}, - {0xDEF6, 0x093E,}, - {0xDEF8, 0x03A0,}, - {0xDEFA, 0xA826,}, - {0xDEFC, 0xFFDC,}, - {0xDEFE, 0xF1B5,}, - {0xDF00, 0xC0F1,}, - {0xDF02, 0x09EA,}, - {0xDF04, 0x0580,}, - {0xDF06, 0x75CF,}, - {0xDF08, 0xFFFF,}, - {0xDF0A, 0xE058,}, - {0xDF0C, 0x1540,}, - {0xDF0E, 0x1080,}, - {0xDF10, 0x08A7,}, - {0xDF12, 0x0010,}, - {0xDF14, 0x8D00,}, - {0xDF16, 0x0813,}, - {0xDF18, 0x009E,}, - {0xDF1A, 0x1540,}, - {0xDF1C, 0x1081,}, - {0xDF1E, 0xE181,}, - {0xDF20, 0x20CA,}, - {0xDF22, 0x00A1,}, - {0xDF24, 0xF24B,}, - {0xDF26, 0x1540,}, - {0xDF28, 0x1081,}, - {0xDF2A, 0x090F,}, - {0xDF2C, 0x0050,}, - {0xDF2E, 0x1540,}, - {0xDF30, 0x1081,}, - {0xDF32, 0x0927,}, - {0xDF34, 0x0091,}, - {0xDF36, 0x1550,}, - {0xDF38, 0x1081,}, - {0xDF3A, 0xDE00,}, - {0xDF3C, 0xAD2A,}, - {0xDF3E, 0x1D50,}, - {0xDF40, 0x1382,}, - {0xDF42, 0x1552,}, - {0xDF44, 0x1101,}, - {0xDF46, 0x1D52,}, - {0xDF48, 0x1384,}, - {0xDF4A, 0xB524,}, - {0xDF4C, 0x082D,}, - {0xDF4E, 0x015F,}, - {0xDF50, 0xFF55,}, - {0xDF52, 0xD803,}, - {0xDF54, 0xF033,}, - {0xDF56, 0x1540,}, - {0xDF58, 0x1081,}, - {0xDF5A, 0x0967,}, - {0xDF5C, 0x00D1,}, - {0xDF5E, 0x1550,}, - {0xDF60, 0x1081,}, - {0xDF62, 0xDE00,}, - {0xDF64, 0xAD2A,}, - {0xDF66, 0x1D50,}, - {0xDF68, 0x1382,}, - {0xDF6A, 0x1552,}, - {0xDF6C, 0x1101,}, - {0xDF6E, 0x1D52,}, - {0xDF70, 0x1384,}, - {0xDF72, 0xB524,}, - {0xDF74, 0x0811,}, - {0xDF76, 0x019E,}, - {0xDF78, 0xB8A0,}, - {0xDF7A, 0xAD00,}, - {0xDF7C, 0xFF47,}, - {0xDF7E, 0x1D40,}, - {0xDF80, 0x1382,}, - {0xDF82, 0xF01F,}, - {0xDF84, 0xFF5A,}, - {0xDF86, 0x8D01,}, - {0xDF88, 0x8D40,}, - {0xDF8A, 0xE812,}, - {0xDF8C, 0x71CF,}, - {0xDF8E, 0xFFFF,}, - {0xDF90, 0xC644,}, - {0xDF92, 0x893B,}, - {0xDF94, 0x7030,}, - {0xDF96, 0x22D1,}, - {0xDF98, 0x8062,}, - {0xDF9A, 0xF20A,}, - {0xDF9C, 0x0A0F,}, - {0xDF9E, 0x009E,}, - {0xDFA0, 0x71CF,}, - {0xDFA2, 0xFFFF,}, - {0xDFA4, 0xC84C,}, - {0xDFA6, 0x893B,}, - {0xDFA8, 0xE902,}, - {0xDFAA, 0xFFCF,}, - {0xDFAC, 0x8D00,}, - {0xDFAE, 0xB8E7,}, - {0xDFB0, 0x26CA,}, - {0xDFB2, 0x1022,}, - {0xDFB4, 0xF5E2,}, - {0xDFB6, 0xFF3C,}, - {0xDFB8, 0xD801,}, - {0xDFBA, 0x1D40,}, - {0xDFBC, 0x1002,}, - {0xDFBE, 0x0141,}, - {0xDFC0, 0x0580,}, - {0xDFC2, 0x78E0,}, - {0xDFC4, 0xC0F1,}, - {0xDFC6, 0xC5E1,}, - {0xDFC8, 0xFF34,}, - {0xDFCA, 0xDD00,}, - {0xDFCC, 0x70CF,}, - {0xDFCE, 0xFFFF,}, - {0xDFD0, 0xE090,}, - {0xDFD2, 0xA8A8,}, - {0xDFD4, 0xD800,}, - {0xDFD6, 0xB893,}, - {0xDFD8, 0x0C8A,}, - {0xDFDA, 0x0460,}, - {0xDFDC, 0xD901,}, - {0xDFDE, 0x71CF,}, - {0xDFE0, 0xFFFF,}, - {0xDFE2, 0xDC10,}, - {0xDFE4, 0xD813,}, - {0xDFE6, 0x0B96,}, - {0xDFE8, 0x0460,}, - {0xDFEA, 0x72A9,}, - {0xDFEC, 0x0119,}, - {0xDFEE, 0x0580,}, - {0xDFF0, 0xC0F1,}, - {0xDFF2, 0x71CF,}, - {0xDFF4, 0x0000,}, - {0xDFF6, 0x5BAE,}, - {0xDFF8, 0x7940,}, - {0xDFFA, 0xFF9D,}, - {0xDFFC, 0xF135,}, - {0xDFFE, 0x78E0,}, - {0xE000, 0xC0F1,}, - {0xE002, 0x70CF,}, - {0xE004, 0x0000,}, - {0xE006, 0x5CBA,}, - {0xE008, 0x7840,}, - {0xE00A, 0x70CF,}, - {0xE00C, 0xFFFF,}, - {0xE00E, 0xE058,}, - {0xE010, 0x8800,}, - {0xE012, 0x0815,}, - {0xE014, 0x001E,}, - {0xE016, 0x70CF,}, - {0xE018, 0xFFFF,}, - {0xE01A, 0xC84C,}, - {0xE01C, 0x881A,}, - {0xE01E, 0xE080,}, - {0xE020, 0x0EE0,}, - {0xE022, 0xFFC1,}, - {0xE024, 0xF121,}, - {0xE026, 0x78E0,}, - {0xE028, 0xC0F1,}, - {0xE02A, 0xD900,}, - {0xE02C, 0xF009,}, - {0xE02E, 0x70CF,}, - {0xE030, 0xFFFF,}, - {0xE032, 0xE0AC,}, - {0xE034, 0x7835,}, - {0xE036, 0x8041,}, - {0xE038, 0x8000,}, - {0xE03A, 0xE102,}, - {0xE03C, 0xA040,}, - {0xE03E, 0x09F3,}, - {0xE040, 0x8114,}, - {0xE042, 0x71CF,}, - {0xE044, 0xFFFF,}, - {0xE046, 0xE058,}, - {0xE048, 0x70CF,}, - {0xE04A, 0xFFFF,}, - {0xE04C, 0xC594,}, - {0xE04E, 0xB030,}, - {0xE050, 0xFFDD,}, - {0xE052, 0xD800,}, - {0xE054, 0xF109,}, - {0xE056, 0x0000,}, - {0xE058, 0x0300,}, - {0xE05A, 0x0204,}, - {0xE05C, 0x0700,}, - {0xE05E, 0x0000,}, - {0xE060, 0x0000,}, - {0xE062, 0x0000,}, - {0xE064, 0x0000,}, - {0xE066, 0x0000,}, - {0xE068, 0x0000,}, - {0xE06A, 0x0000,}, - {0xE06C, 0x0000,}, - {0xE06E, 0x0000,}, - {0xE070, 0x0000,}, - {0xE072, 0x0000,}, - {0xE074, 0x0000,}, - {0xE076, 0x0000,}, - {0xE078, 0x0000,}, - {0xE07A, 0x0000,}, - {0xE07C, 0x0000,}, - {0xE07E, 0x0000,}, - {0xE080, 0x0000,}, - {0xE082, 0x0000,}, - {0xE084, 0x0000,}, - {0xE086, 0x0000,}, - {0xE088, 0x0000,}, - {0xE08A, 0x0000,}, - {0xE08C, 0x0000,}, - {0xE08E, 0x0000,}, - {0xE090, 0x0000,}, - {0xE092, 0x0000,}, - {0xE094, 0x0000,}, - {0xE096, 0x0000,}, - {0xE098, 0x0000,}, - {0xE09A, 0x0000,}, - {0xE09C, 0x0000,}, - {0xE09E, 0x0000,}, - {0xE0A0, 0x0000,}, - {0xE0A2, 0x0000,}, - {0xE0A4, 0x0000,}, - {0xE0A6, 0x0000,}, - {0xE0A8, 0x0000,}, - {0xE0AA, 0x0000,}, - {0xE0AC, 0xFFFF,}, - {0xE0AE, 0xCB68,}, - {0xE0B0, 0xFFFF,}, - {0xE0B2, 0xDFF0,}, - {0xE0B4, 0xFFFF,}, - {0xE0B6, 0xCB6C,}, - {0xE0B8, 0xFFFF,}, - {0xE0BA, 0xE000,}, - {0x098E, 0x0000,}, - - /*MIPI setting for SOC1040*/ - {0x3C5A, 0x0009,}, - {0x3C44, 0x0080,},/*MIPI_CUSTOM_SHORT_PKT*/ - - /*[Tuning_settings]*/ - - /*[CCM]*/ - {0xC892, 0x0267,},/*CAM_AWB_CCM_L_0*/ - {0xC894, 0xFF1A,},/*CAM_AWB_CCM_L_1*/ - {0xC896, 0xFFB3,},/*CAM_AWB_CCM_L_2*/ - {0xC898, 0xFF80,},/*CAM_AWB_CCM_L_3*/ - {0xC89A, 0x0166,},/*CAM_AWB_CCM_L_4*/ - {0xC89C, 0x0003,},/*CAM_AWB_CCM_L_5*/ - {0xC89E, 0xFF9A,},/*CAM_AWB_CCM_L_6*/ - {0xC8A0, 0xFEB4,},/*CAM_AWB_CCM_L_7*/ - {0xC8A2, 0x024D,},/*CAM_AWB_CCM_L_8*/ - {0xC8A4, 0x01BF,},/*CAM_AWB_CCM_M_0*/ - {0xC8A6, 0xFF01,},/*CAM_AWB_CCM_M_1*/ - {0xC8A8, 0xFFF3,},/*CAM_AWB_CCM_M_2*/ - {0xC8AA, 0xFF75,},/*CAM_AWB_CCM_M_3*/ - {0xC8AC, 0x0198,},/*CAM_AWB_CCM_M_4*/ - {0xC8AE, 0xFFFD,},/*CAM_AWB_CCM_M_5*/ - {0xC8B0, 0xFF9A,},/*CAM_AWB_CCM_M_6*/ - {0xC8B2, 0xFEE7,},/*CAM_AWB_CCM_M_7*/ - {0xC8B4, 0x02A8,},/*CAM_AWB_CCM_M_8*/ - {0xC8B6, 0x01D9,},/*CAM_AWB_CCM_R_0*/ - {0xC8B8, 0xFF26,},/*CAM_AWB_CCM_R_1*/ - {0xC8BA, 0xFFF3,},/*CAM_AWB_CCM_R_2*/ - {0xC8BC, 0xFFB3,},/*CAM_AWB_CCM_R_3*/ - {0xC8BE, 0x0132,},/*CAM_AWB_CCM_R_4*/ - {0xC8C0, 0xFFE8,},/*CAM_AWB_CCM_R_5*/ - {0xC8C2, 0xFFDA,},/*CAM_AWB_CCM_R_6*/ - {0xC8C4, 0xFECD,},/*CAM_AWB_CCM_R_7*/ - {0xC8C6, 0x02C2,},/*CAM_AWB_CCM_R_8*/ - {0xC8C8, 0x0075,},/*CAM_AWB_CCM_L_RG_GAIN*/ - {0xC8CA, 0x011C,},/*CAM_AWB_CCM_L_BG_GAIN*/ - {0xC8CC, 0x009A,},/*CAM_AWB_CCM_M_RG_GAIN*/ - {0xC8CE, 0x0105,},/*CAM_AWB_CCM_M_BG_GAIN*/ - {0xC8D0, 0x00A4,},/*CAM_AWB_CCM_R_RG_GAIN*/ - {0xC8D2, 0x00AC,},/*CAM_AWB_CCM_R_BG_GAIN*/ - {0xC8D4, 0x0A8C,},/*CAM_AWB_CCM_L_CTEMP*/ - {0xC8D6, 0x0F0A,},/*CAM_AWB_CCM_M_CTEMP*/ - {0xC8D8, 0x1964,},/*CAM_AWB_CCM_R_CTEMP*/ - - /*[AWB]*/ - {0xC914, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_XSTART*/ - {0xC916, 0x0000,},/*CAM_STAT_AWB_CLIP_WINDOW_YSTART*/ - {0xC918, 0x04FF,},/*CAM_STAT_AWB_CLIP_WINDOW_XEND*/ - {0xC91A, 0x02CF,},/*CAM_STAT_AWB_CLIP_WINDOW_YEND*/ - {0xC904, 0x0033,},/*CAM_AWB_AWB_XSHIFT_PRE_ADJ*/ - {0xC906, 0x0040,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F2, 0x03, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_XSCALE*/ - {0xC8F3, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_AWB_YSCALE*/ - {0xC906, 0x003C,},/*CAM_AWB_AWB_YSHIFT_PRE_ADJ*/ - {0xC8F4, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_0*/ - {0xC8F6, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_1*/ - {0xC8F8, 0x0000,},/*CAM_AWB_AWB_WEIGHTS_2*/ - {0xC8FA, 0xE724,},/*CAM_AWB_AWB_WEIGHTS_3*/ - {0xC8FC, 0x1583,},/*CAM_AWB_AWB_WEIGHTS_4*/ - {0xC8FE, 0x2045,},/*CAM_AWB_AWB_WEIGHTS_5*/ - {0xC900, 0x03FF,},/*CAM_AWB_AWB_WEIGHTS_6*/ - {0xC902, 0x007C,},/*CAM_AWB_AWB_WEIGHTS_7*/ - {0xC90C, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_L*/ - {0xC90D, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_L*/ - {0xC90E, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_L*/ - {0xC90F, 0x88, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_R_R*/ - {0xC910, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_G_R*/ - {0xC911, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AWB_K_B_R*/ - - /*[Step7-CPIPE_Preference]*/ - {0xC926, 0x0020,},/*CAM_LL_START_BRIGHTNESS*/ - {0xC928, 0x009A,},/*CAM_LL_STOP_BRIGHTNESS*/ - {0xC946, 0x0070,},/*CAM_LL_START_GAIN_METRIC*/ - {0xC948, 0x00F3,},/*CAM_LL_STOP_GAIN_METRIC*/ - {0xC952, 0x0020,},/*CAM_LL_START_TARGET_LUMA_BM*/ - {0xC954, 0x009A,},/*CAM_LL_STOP_TARGET_LUMA_BM*/ - {0xC92A, 0x80, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_SATURATION*/ - {0xC92B, 0x4B, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_SATURATION*/ - {0xC92C, 0x00, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DESATURATION*/ - {0xC92D, 0xFF, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_END_DESATURATION*/ - {0xC92E, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_DEMOSAIC*/ - {0xC92F, 0x02, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_GAIN*/ - {0xC930, 0x06, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_AP_THRESH*/ - {0xC931, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_DEMOSAIC*/ - {0xC932, 0x01, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_GAIN*/ - {0xC933, 0x0C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_AP_THRESH*/ - {0xC934, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_RED*/ - {0xC935, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_GREEN*/ - {0xC936, 0x3C, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_BLUE*/ - {0xC937, 0x0F, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_NR_THRESH*/ - {0xC938, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_RED*/ - {0xC939, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_GREEN*/ - {0xC93A, 0x64, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_BLUE*/ - {0xC93B, 0x32, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_NR_THRESH*/ - {0xC93C, 0x0020,},/*CAM_LL_START_CONTRAST_BM*/ - {0xC93E, 0x009A,},/*CAM_LL_STOP_CONTRAST_BM*/ - {0xC940, 0x00DC,},/*CAM_LL_GAMMA*/ - /*CAM_LL_START_CONTRAST_GRADIENT*/ - {0xC942, 0x38, MSM_CAMERA_I2C_BYTE_DATA}, - /*CAM_LL_STOP_CONTRAST_GRADIENT*/ - {0xC943, 0x30, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC944, 0x50, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_START_CONTRAST_LUMA*/ - {0xC945, 0x19, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_STOP_CONTRAST_LUMA*/ - {0xC94A, 0x0230,},/*CAM_LL_START_FADE_TO_BLACK_LUMA*/ - {0xC94C, 0x0010,},/*CAM_LL_STOP_FADE_TO_BLACK_LUMA*/ - {0xC94E, 0x01CD,},/*CAM_LL_CLUSTER_DC_TH_BM*/ - {0xC950, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_CLUSTER_DC_GATE*/ - {0xC951, 0x40, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_LL_SUMMING_SENSITIVITY*/ - /*CAM_AET_TARGET_AVERAGE_LUMA_DARK*/ - {0xC87B, 0x1B, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x0E, MSM_CAMERA_I2C_BYTE_DATA},/*CAM_AET_AEMODE*/ - {0xC890, 0x0080,},/*CAM_AET_TARGET_GAIN*/ - {0xC886, 0x0100,},/*CAM_AET_AE_MAX_VIRT_AGAIN*/ - {0xC87C, 0x005A,},/*CAM_AET_BLACK_CLIPPING_TARGET*/ - {0xB42A, 0x05, MSM_CAMERA_I2C_BYTE_DATA},/*CCM_DELTA_GAIN*/ - /*AE_TRACK_AE_TRACKING_DAMPENING*/ - {0xA80A, 0x20, MSM_CAMERA_I2C_BYTE_DATA}, - {0x3C44, 0x0080,}, - {0x3C40, 0x0004, MSM_CAMERA_I2C_UNSET_WORD_MASK}, - {0xA802, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xC908, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC879, 0x01, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC909, 0x01, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, - {0xA80A, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xA80B, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xAC16, 0x18, MSM_CAMERA_I2C_BYTE_DATA}, - {0xC878, 0x08, MSM_CAMERA_I2C_SET_BYTE_MASK}, - {0xBC02, 0x08, MSM_CAMERA_I2C_UNSET_BYTE_MASK}, -}; - -static struct v4l2_subdev_info mt9m114_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf mt9m114_config_change_settings[] = { - {0xdc00, 0x28, MSM_CAMERA_I2C_BYTE_DATA, MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {MT9M114_COMMAND_REGISTER, (MT9M114_COMMAND_REGISTER_OK | - MT9M114_COMMAND_REGISTER_SET_STATE), MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_CMD_WRITE}, - {MT9M114_COMMAND_REGISTER, MT9M114_COMMAND_REGISTER_SET_STATE, - MSM_CAMERA_I2C_UNSET_WORD_MASK, MSM_CAMERA_I2C_CMD_POLL}, - {0xDC01, 0x31, MSM_CAMERA_I2C_BYTE_DATA}, -}; - -static const struct i2c_device_id mt9m114_i2c_id[] = { - {MT9M114_SENSOR_NAME, (kernel_ulong_t)&mt9m114_s_ctrl}, - { } -}; - -static int32_t msm_mt9m114_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &mt9m114_s_ctrl); -} - -static struct i2c_driver mt9m114_i2c_driver = { - .id_table = mt9m114_i2c_id, - .probe = msm_mt9m114_i2c_probe, - .driver = { - .name = MT9M114_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client mt9m114_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id mt9m114_dt_match[] = { - {.compatible = "qcom,mt9m114", .data = &mt9m114_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, mt9m114_dt_match); - -static struct platform_driver mt9m114_platform_driver = { - .driver = { - .name = "qcom,mt9m114", - .owner = THIS_MODULE, - .of_match_table = mt9m114_dt_match, - }, -}; - -static int32_t mt9m114_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(mt9m114_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init mt9m114_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&mt9m114_platform_driver, - mt9m114_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&mt9m114_i2c_driver); -} - -static void __exit mt9m114_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (mt9m114_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&mt9m114_s_ctrl); - platform_driver_unregister(&mt9m114_platform_driver); - } else - i2c_del_driver(&mt9m114_i2c_driver); - return; -} - -int32_t mt9m114_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_recommend_settings, - ARRAY_SIZE(mt9m114_recommend_settings), - MSM_CAMERA_I2C_WORD_DATA); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_RESOLUTION: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, mt9m114_720p_settings, - ARRAY_SIZE(mt9m114_720p_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_SET_STOP_STREAM: - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - mt9m114_config_change_settings, - ARRAY_SIZE(mt9m114_config_change_settings), - MSM_CAMERA_I2C_WORD_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id 0x%x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - int32_t sat_lev; - if (copy_from_user(&sat_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Saturation Value is %d", __func__, sat_lev); - break; - } - case CFG_SET_CONTRAST: { - int32_t con_lev; - if (copy_from_user(&con_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Contrast Value is %d", __func__, con_lev); - break; - } - case CFG_SET_SHARPNESS: { - int32_t shp_lev; - if (copy_from_user(&shp_lev, (void *)cdata->cfg.setting, - sizeof(int32_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - pr_debug("%s: Sharpness Value is %d", __func__, shp_lev); - break; - } - case CFG_SET_AUTOFOCUS: { - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - } - case CFG_CANCEL_AUTOFOCUS: { - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t mt9m114_sensor_func_tbl = { - .sensor_config = mt9m114_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t mt9m114_s_ctrl = { - .sensor_i2c_client = &mt9m114_sensor_i2c_client, - .power_setting_array.power_setting = mt9m114_power_setting, - .power_setting_array.size = ARRAY_SIZE(mt9m114_power_setting), - .msm_sensor_mutex = &mt9m114_mut, - .sensor_v4l2_subdev_info = mt9m114_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(mt9m114_subdev_info), - .func_tbl = &mt9m114_sensor_func_tbl, -}; - -module_init(mt9m114_init_module); -module_exit(mt9m114_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/Makefile b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/Makefile deleted file mode 100644 index 9a683edd5406..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/io -ccflags-y += -Idrivers/media/platform/msm/camera_v2_j7lte/sensor/cci -obj-$(CONFIG_MSMB_CAMERA) += msm_ois.o diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.c deleted file mode 100644 index 01348061146b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.c +++ /dev/null @@ -1,763 +0,0 @@ -/* Copyright (c) 2014 - 2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__ - -#include -#include "msm_sd.h" -#include "msm_ois.h" -#include "msm_cci.h" - -DEFINE_MSM_MUTEX(msm_ois_mutex); -/*#define MSM_OIS_DEBUG*/ -#undef CDBG -#ifdef MSM_OIS_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) pr_debug(fmt, ##args) -#endif - -#define MAX_POLL_COUNT 100 - -static struct v4l2_file_operations msm_ois_v4l2_subdev_fops; -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *o_ctrl); -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *o_ctrl); - -static struct i2c_driver msm_ois_i2c_driver; - -static int32_t msm_ois_write_settings(struct msm_ois_ctrl_t *o_ctrl, - uint16_t size, struct reg_settings_ois_t *settings) -{ - int32_t rc = -EFAULT; - int32_t i = 0; - struct msm_camera_i2c_seq_reg_array reg_setting; - CDBG("Enter\n"); - - for (i = 0; i < size; i++) { - switch (settings[i].i2c_operation) { - case MSM_OIS_WRITE: { - switch (settings[i].data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_write( - &o_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - settings[i].data_type); - break; - case MSM_CAMERA_I2C_DWORD_DATA: - reg_setting.reg_addr = settings[i].reg_addr; - reg_setting.reg_data[0] = (uint8_t) - ((settings[i].reg_data & - 0xFF000000) >> 24); - reg_setting.reg_data[1] = (uint8_t) - ((settings[i].reg_data & - 0x00FF0000) >> 16); - reg_setting.reg_data[2] = (uint8_t) - ((settings[i].reg_data & - 0x0000FF00) >> 8); - reg_setting.reg_data[3] = (uint8_t) - (settings[i].reg_data & 0x000000FF); - reg_setting.reg_data_size = 4; - rc = o_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_seq(&o_ctrl->i2c_client, - reg_setting.reg_addr, - reg_setting.reg_data, - reg_setting.reg_data_size); - if (rc < 0) - return rc; - break; - - default: - pr_err("Unsupport data type: %d\n", - settings[i].data_type); - break; - } - } - break; - - case MSM_OIS_POLL: { - int32_t poll_count = 0; - switch (settings[i].data_type) { - case MSM_CAMERA_I2C_BYTE_DATA: - case MSM_CAMERA_I2C_WORD_DATA: - do { - rc = o_ctrl->i2c_client.i2c_func_tbl - ->i2c_poll(&o_ctrl->i2c_client, - settings[i].reg_addr, - settings[i].reg_data, - settings[i].data_type); - - if (poll_count++ > MAX_POLL_COUNT) { - pr_err("MSM_OIS_POLL failed"); - break; - } - } while (rc != 0); - break; - - default: - pr_err("Unsupport data type: %d\n", - settings[i].data_type); - break; - } - } - } - - if (settings[i].delay > 20) - msleep(settings[i].delay); - else if (0 != settings[i].delay) - usleep_range(settings[i].delay * 1000, - (settings[i].delay * 1000) + 1000); - - if (rc < 0) - break; - } - - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_vreg_control(struct msm_ois_ctrl_t *o_ctrl, - int config) -{ - int rc = 0, i, cnt; - struct msm_ois_vreg *vreg_cfg; - - vreg_cfg = &o_ctrl->vreg_cfg; - cnt = vreg_cfg->num_vreg; - if (!cnt) - return 0; - - if (cnt >= MSM_OIS_MAX_VREGS) { - pr_err("%s failed %d cnt %d\n", __func__, __LINE__, cnt); - return -EINVAL; - } - - for (i = 0; i < cnt; i++) { - rc = msm_camera_config_single_vreg(&(o_ctrl->pdev->dev), - &vreg_cfg->cam_vreg[i], - (struct regulator **)&vreg_cfg->data[i], - config); - } - return rc; -} - -static int32_t msm_ois_power_down(struct msm_ois_ctrl_t *o_ctrl) -{ - int32_t rc = 0; - CDBG("Enter\n"); - if (o_ctrl->ois_state != OIS_POWER_DOWN) { - - rc = msm_ois_vreg_control(o_ctrl, 0); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - o_ctrl->i2c_tbl_index = 0; - o_ctrl->ois_state = OIS_POWER_DOWN; - } - CDBG("Exit\n"); - return rc; -} - -static int msm_ois_init(struct msm_ois_ctrl_t *o_ctrl) -{ - int rc = 0; - CDBG("Enter\n"); - - if (!o_ctrl) { - pr_err("failed\n"); - return -EINVAL; - } - - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &o_ctrl->i2c_client, MSM_CCI_INIT); - if (rc < 0) - pr_err("cci_init failed\n"); - } - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_control(struct msm_ois_ctrl_t *o_ctrl, - struct msm_ois_set_info_t *set_info) -{ - struct reg_settings_ois_t *settings = NULL; - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - CDBG("Enter\n"); - - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - cci_client = o_ctrl->i2c_client.cci_client; - cci_client->sid = - set_info->ois_params.i2c_addr >> 1; - cci_client->retries = 3; - cci_client->id_map = 0; - cci_client->cci_i2c_master = o_ctrl->cci_master; - } else { - o_ctrl->i2c_client.client->addr = - set_info->ois_params.i2c_addr; - } - o_ctrl->i2c_client.addr_type = MSM_CAMERA_I2C_WORD_ADDR; - - - if (set_info->ois_params.setting_size > 0 && - set_info->ois_params.setting_size - < MAX_OIS_REG_SETTINGS) { - settings = kmalloc( - sizeof(struct reg_settings_ois_t) * - (set_info->ois_params.setting_size), - GFP_KERNEL); - if (settings == NULL) { - pr_err("Error allocating memory\n"); - return -EFAULT; - } - if (copy_from_user(settings, - (void *)set_info->ois_params.settings, - set_info->ois_params.setting_size * - sizeof(struct reg_settings_ois_t))) { - kfree(settings); - pr_err("Error copying\n"); - return -EFAULT; - } - - rc = msm_ois_write_settings(o_ctrl, - set_info->ois_params.setting_size, - settings); - kfree(settings); - if (rc < 0) { - pr_err("Error\n"); - return -EFAULT; - } - } - - CDBG("Exit\n"); - - return rc; -} - - -static int32_t msm_ois_config(struct msm_ois_ctrl_t *o_ctrl, - void __user *argp) -{ - struct msm_ois_cfg_data *cdata = - (struct msm_ois_cfg_data *)argp; - int32_t rc = 0; - mutex_lock(o_ctrl->ois_mutex); - CDBG("Enter\n"); - CDBG("%s type %d\n", __func__, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_OIS_INIT: - rc = msm_ois_init(o_ctrl); - if (rc < 0) - pr_err("msm_ois_init failed %d\n", rc); - break; - case CFG_OIS_POWERDOWN: - rc = msm_ois_power_down(o_ctrl); - if (rc < 0) - pr_err("msm_ois_power_down failed %d\n", rc); - break; - case CFG_OIS_POWERUP: - rc = msm_ois_power_up(o_ctrl); - if (rc < 0) - pr_err("Failed ois power up%d\n", rc); - break; - case CFG_OIS_CONTROL: - rc = msm_ois_control(o_ctrl, &cdata->cfg.set_info); - if (rc < 0) - pr_err("Failed ois control%d\n", rc); - break; - case CFG_OIS_I2C_WRITE_SEQ_TABLE: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - -#ifdef CONFIG_COMPAT - if (is_compat_task()) { - memcpy(&conf_array, - (void *)cdata->cfg.settings, - sizeof(struct msm_camera_i2c_seq_reg_setting)); - } else -#endif - if (copy_from_user(&conf_array, - (void *)cdata->cfg.settings, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = o_ctrl->i2c_client.i2c_func_tbl-> - i2c_write_seq_table(&o_ctrl->i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - default: - break; - } - mutex_unlock(o_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_get_subdev_id(struct msm_ois_ctrl_t *o_ctrl, - void *arg) -{ - uint32_t *subdev_id = (uint32_t *)arg; - CDBG("Enter\n"); - if (!subdev_id) { - pr_err("failed\n"); - return -EINVAL; - } - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) - *subdev_id = o_ctrl->pdev->id; - else - *subdev_id = o_ctrl->subdev_id; - - CDBG("subdev_id %d\n", *subdev_id); - CDBG("Exit\n"); - return 0; -} - -static struct msm_camera_i2c_fn_t msm_sensor_cci_func_tbl = { - .i2c_read = msm_camera_cci_i2c_read, - .i2c_read_seq = msm_camera_cci_i2c_read_seq, - .i2c_write = msm_camera_cci_i2c_write, - .i2c_write_table = msm_camera_cci_i2c_write_table, - .i2c_write_seq = msm_camera_cci_i2c_write_seq, - .i2c_write_seq_table = msm_camera_cci_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_cci_i2c_write_table_w_microdelay, - .i2c_util = msm_sensor_cci_i2c_util, - .i2c_poll = msm_camera_cci_i2c_poll, -}; - -static struct msm_camera_i2c_fn_t msm_sensor_qup_func_tbl = { - .i2c_read = msm_camera_qup_i2c_read, - .i2c_read_seq = msm_camera_qup_i2c_read_seq, - .i2c_write = msm_camera_qup_i2c_write, - .i2c_write_table = msm_camera_qup_i2c_write_table, - .i2c_write_seq = msm_camera_qup_i2c_write_seq, - .i2c_write_seq_table = msm_camera_qup_i2c_write_seq_table, - .i2c_write_table_w_microdelay = - msm_camera_qup_i2c_write_table_w_microdelay, - .i2c_poll = msm_camera_qup_i2c_poll, -}; - -static int msm_ois_close(struct v4l2_subdev *sd, - struct v4l2_subdev_fh *fh) { - int rc = 0; - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - if (!o_ctrl || !o_ctrl->i2c_client.i2c_func_tbl) { - /* check to make sure that init happens before release */ - pr_err("failed\n"); - return -EINVAL; - } - if (o_ctrl->ois_device_type == MSM_CAMERA_PLATFORM_DEVICE) { - rc = o_ctrl->i2c_client.i2c_func_tbl->i2c_util( - &o_ctrl->i2c_client, MSM_CCI_RELEASE); - if (rc < 0) - pr_err("cci_init failed\n"); - } - - CDBG("Exit\n"); - return rc; -} - -static const struct v4l2_subdev_internal_ops msm_ois_internal_ops = { - .close = msm_ois_close, -}; - -static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd, - unsigned int cmd, void *arg) -{ - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - void __user *argp = (void __user *)arg; - CDBG("Enter\n"); - CDBG("%s:%d o_ctrl %p argp %p\n", __func__, __LINE__, o_ctrl, argp); - switch (cmd) { - case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID: - return msm_ois_get_subdev_id(o_ctrl, argp); - case VIDIOC_MSM_OIS_CFG: - return msm_ois_config(o_ctrl, argp); - case MSM_SD_SHUTDOWN: - if (!o_ctrl->i2c_client.i2c_func_tbl) { - pr_err("o_ctrl->i2c_client.i2c_func_tbl NULL\n"); - return -EINVAL; - } else { - return msm_ois_close(sd, NULL); - } - default: - return -ENOIOCTLCMD; - } -} - -static int32_t msm_ois_power_up(struct msm_ois_ctrl_t *o_ctrl) -{ - int rc = 0; - CDBG("%s called\n", __func__); - - rc = msm_ois_vreg_control(o_ctrl, 1); - if (rc < 0) { - pr_err("%s failed %d\n", __func__, __LINE__); - return rc; - } - - o_ctrl->ois_state = OIS_POWER_UP; - CDBG("Exit\n"); - return rc; -} - -static int32_t msm_ois_power(struct v4l2_subdev *sd, int on) -{ - int rc = 0; - struct msm_ois_ctrl_t *o_ctrl = v4l2_get_subdevdata(sd); - CDBG("Enter\n"); - mutex_lock(o_ctrl->ois_mutex); - if (on) - rc = msm_ois_power_up(o_ctrl); - else - rc = msm_ois_power_down(o_ctrl); - mutex_unlock(o_ctrl->ois_mutex); - CDBG("Exit\n"); - return rc; -} - -static struct v4l2_subdev_core_ops msm_ois_subdev_core_ops = { - .ioctl = msm_ois_subdev_ioctl, - .s_power = msm_ois_power, -}; - -static struct v4l2_subdev_ops msm_ois_subdev_ops = { - .core = &msm_ois_subdev_core_ops, -}; - -static const struct i2c_device_id msm_ois_i2c_id[] = { - {"qcom,ois", (kernel_ulong_t)NULL}, - { } -}; - -static int32_t msm_ois_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - int rc = 0; - struct msm_ois_ctrl_t *ois_ctrl_t = NULL; - CDBG("Enter\n"); - - if (client == NULL) { - pr_err("msm_ois_i2c_probe: client is null\n"); - return -EINVAL; - } - - ois_ctrl_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!ois_ctrl_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { - pr_err("i2c_check_functionality failed\n"); - rc = -EINVAL; - goto probe_failure; - } - - CDBG("client = 0x%p\n", client); - - rc = of_property_read_u32(client->dev.of_node, "cell-index", - &ois_ctrl_t->subdev_id); - CDBG("cell-index %d, rc %d\n", ois_ctrl_t->subdev_id, rc); - if (rc < 0) { - pr_err("failed rc %d\n", rc); - goto probe_failure; - } - - ois_ctrl_t->i2c_driver = &msm_ois_i2c_driver; - ois_ctrl_t->i2c_client.client = client; - /* Set device type as I2C */ - ois_ctrl_t->ois_device_type = MSM_CAMERA_I2C_DEVICE; - ois_ctrl_t->i2c_client.i2c_func_tbl = &msm_sensor_qup_func_tbl; - ois_ctrl_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - ois_ctrl_t->ois_mutex = &msm_ois_mutex; - - /* Assign name for sub device */ - snprintf(ois_ctrl_t->msm_sd.sd.name, sizeof(ois_ctrl_t->msm_sd.sd.name), - "%s", ois_ctrl_t->i2c_driver->driver.name); - - /* Initialize sub device */ - v4l2_i2c_subdev_init(&ois_ctrl_t->msm_sd.sd, - ois_ctrl_t->i2c_client.client, - ois_ctrl_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&ois_ctrl_t->msm_sd.sd, ois_ctrl_t); - ois_ctrl_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - ois_ctrl_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - media_entity_init(&ois_ctrl_t->msm_sd.sd.entity, 0, NULL, 0); - ois_ctrl_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - ois_ctrl_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - ois_ctrl_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&ois_ctrl_t->msm_sd); - ois_ctrl_t->ois_state = OIS_POWER_DOWN; - pr_info("msm_ois_i2c_probe: succeeded\n"); - CDBG("Exit\n"); - -probe_failure: - kfree(ois_ctrl_t); - return rc; -} - -#ifdef CONFIG_COMPAT -static long msm_ois_subdev_do_ioctl( - struct file *file, unsigned int cmd, void *arg) -{ - long rc = 0; - struct video_device *vdev = video_devdata(file); - struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev); - struct msm_ois_cfg_data32 *u32 = - (struct msm_ois_cfg_data32 *)arg; - struct msm_ois_cfg_data ois_data; - void *parg = arg; - struct msm_camera_i2c_seq_reg_setting settings; - struct msm_camera_i2c_seq_reg_setting32 settings32; - - ois_data.cfgtype = u32->cfgtype; - - switch (cmd) { - case VIDIOC_MSM_OIS_CFG32: - cmd = VIDIOC_MSM_OIS_CFG; - - switch (u32->cfgtype) { - case CFG_OIS_CONTROL: - ois_data.cfg.set_info.ois_params.setting_size = - u32->cfg.set_info.ois_params.setting_size; - ois_data.cfg.set_info.ois_params.i2c_addr = - u32->cfg.set_info.ois_params.i2c_addr; - ois_data.cfg.set_info.ois_params.i2c_addr_type = - u32->cfg.set_info.ois_params.i2c_addr_type; - ois_data.cfg.set_info.ois_params.i2c_data_type = - u32->cfg.set_info.ois_params.i2c_data_type; - ois_data.cfg.set_info.ois_params.settings = - compat_ptr(u32->cfg.set_info.ois_params. - settings); - parg = &ois_data; - break; - case CFG_OIS_I2C_WRITE_SEQ_TABLE: - if (copy_from_user(&settings32, - (void *)compat_ptr(u32->cfg.settings), - sizeof( - struct msm_camera_i2c_seq_reg_setting32))) { - pr_err("copy_from_user failed\n"); - return -EFAULT; - } - - settings.addr_type = settings32.addr_type; - settings.delay = settings32.delay; - settings.size = settings32.size; - settings.reg_setting = - compat_ptr(settings32.reg_setting); - - ois_data.cfgtype = u32->cfgtype; - ois_data.cfg.settings = &settings; - parg = &ois_data; - break; - default: - parg = &ois_data; - break; - } - } - rc = msm_ois_subdev_ioctl(sd, cmd, parg); - - return rc; -} - -static long msm_ois_subdev_fops_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return video_usercopy(file, cmd, arg, msm_ois_subdev_do_ioctl); -} -#endif - -static int32_t msm_ois_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - struct msm_camera_cci_client *cci_client = NULL; - struct msm_ois_ctrl_t *msm_ois_t = NULL; - struct msm_ois_vreg *vreg_cfg; - CDBG("Enter\n"); - - if (!pdev->dev.of_node) { - pr_err("of_node NULL\n"); - return -EINVAL; - } - - msm_ois_t = kzalloc(sizeof(struct msm_ois_ctrl_t), - GFP_KERNEL); - if (!msm_ois_t) { - pr_err("%s:%d failed no memory\n", __func__, __LINE__); - return -ENOMEM; - } - rc = of_property_read_u32((&pdev->dev)->of_node, "cell-index", - &pdev->id); - CDBG("cell-index %d, rc %d\n", pdev->id, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - rc = of_property_read_u32((&pdev->dev)->of_node, "qcom,cci-master", - &msm_ois_t->cci_master); - CDBG("qcom,cci-master %d, rc %d\n", msm_ois_t->cci_master, rc); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - - if (of_find_property((&pdev->dev)->of_node, - "qcom,cam-vreg-name", NULL)) { - vreg_cfg = &msm_ois_t->vreg_cfg; - rc = msm_camera_get_dt_vreg_data((&pdev->dev)->of_node, - &vreg_cfg->cam_vreg, &vreg_cfg->num_vreg); - if (rc < 0) { - kfree(msm_ois_t); - pr_err("failed rc %d\n", rc); - return rc; - } - } - - msm_ois_t->ois_v4l2_subdev_ops = &msm_ois_subdev_ops; - msm_ois_t->ois_mutex = &msm_ois_mutex; - - /* Set platform device handle */ - msm_ois_t->pdev = pdev; - /* Set device type as platform device */ - msm_ois_t->ois_device_type = MSM_CAMERA_PLATFORM_DEVICE; - msm_ois_t->i2c_client.i2c_func_tbl = &msm_sensor_cci_func_tbl; - msm_ois_t->i2c_client.cci_client = kzalloc(sizeof( - struct msm_camera_cci_client), GFP_KERNEL); - if (!msm_ois_t->i2c_client.cci_client) { - kfree(msm_ois_t->vreg_cfg.cam_vreg); - kfree(msm_ois_t); - pr_err("failed no memory\n"); - return -ENOMEM; - } - - cci_client = msm_ois_t->i2c_client.cci_client; - cci_client->cci_subdev = msm_cci_get_subdev(); - cci_client->cci_i2c_master = MASTER_MAX; - v4l2_subdev_init(&msm_ois_t->msm_sd.sd, - msm_ois_t->ois_v4l2_subdev_ops); - v4l2_set_subdevdata(&msm_ois_t->msm_sd.sd, msm_ois_t); - msm_ois_t->msm_sd.sd.internal_ops = &msm_ois_internal_ops; - msm_ois_t->msm_sd.sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(msm_ois_t->msm_sd.sd.name, - ARRAY_SIZE(msm_ois_t->msm_sd.sd.name), "msm_ois"); - media_entity_init(&msm_ois_t->msm_sd.sd.entity, 0, NULL, 0); - msm_ois_t->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV; - msm_ois_t->msm_sd.sd.entity.group_id = MSM_CAMERA_SUBDEV_OIS; - msm_ois_t->msm_sd.close_seq = MSM_SD_CLOSE_2ND_CATEGORY | 0x2; - msm_sd_register(&msm_ois_t->msm_sd); - msm_ois_t->ois_state = OIS_POWER_DOWN; - msm_ois_v4l2_subdev_fops = v4l2_subdev_fops; -#ifdef CONFIG_COMPAT - msm_ois_v4l2_subdev_fops.compat_ioctl32 = - msm_ois_subdev_fops_ioctl; -#endif - msm_ois_t->msm_sd.sd.devnode->fops = - &msm_ois_v4l2_subdev_fops; - - CDBG("Exit\n"); - return rc; -} - -static const struct of_device_id msm_ois_i2c_dt_match[] = { - {.compatible = "qcom,ois"}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ois_i2c_dt_match); - -static struct i2c_driver msm_ois_i2c_driver = { - .id_table = msm_ois_i2c_id, - .probe = msm_ois_i2c_probe, - .remove = __exit_p(msm_ois_i2c_remove), - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_i2c_dt_match, - }, -}; - -static const struct of_device_id msm_ois_dt_match[] = { - {.compatible = "qcom,ois", .data = NULL}, - {} -}; - -MODULE_DEVICE_TABLE(of, msm_ois_dt_match); - -static struct platform_driver msm_ois_platform_driver = { - .probe = msm_ois_platform_probe, - .driver = { - .name = "qcom,ois", - .owner = THIS_MODULE, - .of_match_table = msm_ois_dt_match, - }, -}; - -static int __init msm_ois_init_module(void) -{ - int32_t rc = 0; - CDBG("Enter\n"); - rc = platform_driver_register(&msm_ois_platform_driver); - if (!rc) - return rc; - CDBG("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&msm_ois_i2c_driver); -} - -static void __exit msm_ois_exit_module(void) -{ - platform_driver_unregister(&msm_ois_platform_driver); - i2c_del_driver(&msm_ois_i2c_driver); - return; -} - -module_init(msm_ois_init_module); -module_exit(msm_ois_exit_module); -MODULE_DESCRIPTION("MSM OIS"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.h deleted file mode 100644 index a9d41c4dc607..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ois/msm_ois.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ -#ifndef MSM_OIS_H -#define MSM_OIS_H - -#include -#include -#include "../../include/soc/qcom/camera2.h" -#include -#include "../../include/media/msmb_camera.h" -#include "msm_camera_i2c.h" -#include "msm_camera_dt_util.h" -#include "msm_camera_io_util.h" - -#define DEFINE_MSM_MUTEX(mutexname) \ - static struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) - -#define MSM_OIS_MAX_VREGS (10) - -struct msm_ois_ctrl_t; - -enum msm_ois_state_t { - OIS_POWER_UP, - OIS_POWER_DOWN, -}; - -struct msm_ois_vreg { - struct camera_vreg_t *cam_vreg; - void *data[MSM_OIS_MAX_VREGS]; - int num_vreg; -}; - -struct msm_ois_ctrl_t { - struct i2c_driver *i2c_driver; - struct platform_driver *pdriver; - struct platform_device *pdev; - struct msm_camera_i2c_client i2c_client; - enum msm_camera_device_type_t ois_device_type; - struct msm_sd_subdev msm_sd; - struct mutex *ois_mutex; - enum msm_camera_i2c_data_type i2c_data_type; - struct v4l2_subdev sdev; - struct v4l2_subdev_ops *ois_v4l2_subdev_ops; - void *user_data; - uint16_t i2c_tbl_index; - enum cci_i2c_master_t cci_master; - uint32_t subdev_id; - enum msm_ois_state_t ois_state; - struct msm_ois_vreg vreg_cfg; -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov12830.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov12830.c deleted file mode 100644 index fb6d548f1f22..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov12830.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV12830_SENSOR_NAME "ov12830" -DEFINE_MSM_MUTEX(ov12830_mut); - -static struct msm_sensor_ctrl_t ov12830_s_ctrl; - -static struct msm_sensor_power_setting ov12830_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov12830_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov12830_i2c_id[] = { - {OV12830_SENSOR_NAME, - (kernel_ulong_t)&ov12830_s_ctrl}, - { } -}; - -static int msm_ov12830_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov12830_s_ctrl); -} - -static struct i2c_driver ov12830_i2c_driver = { - .id_table = ov12830_i2c_id, - .probe = msm_ov12830_i2c_probe, - .driver = { - .name = OV12830_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov12830_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov12830_dt_match[] = { - {.compatible = "qcom,ov12830", - .data = &ov12830_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov12830_dt_match); - -static struct platform_driver ov12830_platform_driver = { - .driver = { - .name = "qcom,ov12830", - .owner = THIS_MODULE, - .of_match_table = ov12830_dt_match, - }, -}; - -static int32_t ov12830_platform_probe - (struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov12830_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov12830_init_module(void) -{ - int32_t rc = 0; - pr_debug("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov12830_platform_driver, - ov12830_platform_probe); - if (!rc) - return rc; - pr_debug("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov12830_i2c_driver); -} - -static void __exit ov12830_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov12830_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov12830_s_ctrl); - platform_driver_unregister - (&ov12830_platform_driver); - } else { - i2c_del_driver(&ov12830_i2c_driver); - } -} - -static struct msm_sensor_ctrl_t ov12830_s_ctrl = { - .sensor_i2c_client = &ov12830_sensor_i2c_client, - .power_setting_array.power_setting = ov12830_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov12830_power_setting), - .msm_sensor_mutex = &ov12830_mut, - .sensor_v4l2_subdev_info = ov12830_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov12830_subdev_info), -}; - -module_init(ov12830_init_module); -module_exit(ov12830_exit_module); -MODULE_DESCRIPTION("ov12830"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov2720.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov2720.c deleted file mode 100644 index 397564b3ef62..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov2720.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV2720_SENSOR_NAME "ov2720" -DEFINE_MSM_MUTEX(ov2720_mut); - -static struct msm_sensor_ctrl_t ov2720_s_ctrl; - -static struct msm_sensor_power_setting ov2720_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov2720_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov2720_i2c_id[] = { - {OV2720_SENSOR_NAME, (kernel_ulong_t)&ov2720_s_ctrl}, - { } -}; - -static int32_t msm_ov2720_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov2720_s_ctrl); -} - -static struct i2c_driver ov2720_i2c_driver = { - .id_table = ov2720_i2c_id, - .probe = msm_ov2720_i2c_probe, - .driver = { - .name = OV2720_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov2720_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov2720_dt_match[] = { - {.compatible = "qcom,ov2720", .data = &ov2720_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov2720_dt_match); - -static struct platform_driver ov2720_platform_driver = { - .driver = { - .name = "qcom,ov2720", - .owner = THIS_MODULE, - .of_match_table = ov2720_dt_match, - }, -}; - -static int32_t ov2720_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov2720_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov2720_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov2720_platform_driver, - ov2720_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov2720_i2c_driver); -} - -static void __exit ov2720_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov2720_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov2720_s_ctrl); - platform_driver_unregister(&ov2720_platform_driver); - } else - i2c_del_driver(&ov2720_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov2720_s_ctrl = { - .sensor_i2c_client = &ov2720_sensor_i2c_client, - .power_setting_array.power_setting = ov2720_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov2720_power_setting), - .msm_sensor_mutex = &ov2720_mut, - .sensor_v4l2_subdev_info = ov2720_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov2720_subdev_info), -}; - -module_init(ov2720_init_module); -module_exit(ov2720_exit_module); -MODULE_DESCRIPTION("ov2720"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5645.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5645.c deleted file mode 100755 index 7b84d8392571..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5645.c +++ /dev/null @@ -1,958 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define OV5645_SENSOR_NAME "ov5645" -#define PLATFORM_DRIVER_NAME "msm_camera_ov5645" -#define ov5645_obj ov5645_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(ov5645_mut); -static struct msm_sensor_ctrl_t ov5645_s_ctrl; - -static struct msm_sensor_power_setting ov5645_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_sxga_settings[] = { - {0x3612, 0xa9,}, - {0x3614, 0x50,}, - {0x3618, 0x00,}, - {0x3034, 0x18,}, - {0x3035, 0x21,}, - {0x3036, 0x70,}, - {0x3600, 0x09,}, - {0x3601, 0x43,}, - {0x3708, 0x66,}, - {0x370c, 0xc3,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x06,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9d,}, - {0x3808, 0x05,}, - {0x3809, 0x00,}, - {0x380a, 0x03,}, - {0x380b, 0xc0,}, - {0x380c, 0x07,}, - {0x380d, 0x68,}, - {0x380e, 0x03,}, - {0x380f, 0xd8,}, - {0x3813, 0x06,}, - {0x3814, 0x31,}, - {0x3815, 0x31,}, - {0x3820, 0x47,}, - {0x3a02, 0x03,}, - {0x3a03, 0xd8,}, - {0x3a08, 0x01,}, - {0x3a09, 0xf8,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0xa4,}, - {0x3a0e, 0x02,}, - {0x3a0d, 0x02,}, - {0x3a14, 0x03,}, - {0x3a15, 0xd8,}, - {0x3a18, 0x00,}, - {0x4004, 0x02,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - -}; - -static struct msm_camera_i2c_reg_conf ov5645_full_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x00,}, - {0x3801, 0x00,}, - {0x3802, 0x00,}, - {0x3803, 0x00,}, - {0x3804, 0x0a,}, - {0x3805, 0x3f,}, - {0x3806, 0x07,}, - {0x3807, 0x9f,}, - {0x3808, 0x0a,}, - {0x3809, 0x20,}, - {0x380a, 0x07,}, - {0x380b, 0x98,}, - {0x380c, 0x0b,}, - {0x380d, 0x1c,}, - {0x380e, 0x07,}, - {0x380f, 0xb0,}, - {0x3813, 0x06,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x07,}, - {0x3a03, 0xb0,}, - {0x3a08, 0x01,}, - {0x3a09, 0x27,}, - {0x3a0a, 0x00,}, - {0x3a0b, 0xf6,}, - {0x3a0e, 0x06,}, - {0x3a0d, 0x08,}, - {0x3a14, 0x07,}, - {0x3a15, 0xb0,}, - {0x3a18, 0x01,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4837, 0x0b,}, - {0x4202, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_1080P_settings[] = { - {0x3612, 0xab,}, - {0x3614, 0x50,}, - {0x3618, 0x04,}, - {0x3034, 0x18,}, - {0x3035, 0x11,}, - {0x3036, 0x54,}, - {0x3600, 0x08,}, - {0x3601, 0x33,}, - {0x3708, 0x63,}, - {0x370c, 0xc0,}, - {0x3800, 0x01,}, - {0x3801, 0x50,}, - {0x3802, 0x01,}, - {0x3803, 0xb2,}, - {0x3804, 0x08,}, - {0x3805, 0xef,}, - {0x3806, 0x05,}, - {0x3807, 0xf1,}, - {0x3808, 0x07,}, - {0x3809, 0x80,}, - {0x380a, 0x04,}, - {0x380b, 0x38,}, - {0x380c, 0x09,}, - {0x380d, 0xc4,}, - {0x380e, 0x04,}, - {0x380f, 0x60,}, - {0x3813, 0x04,}, - {0x3814, 0x11,}, - {0x3815, 0x11,}, - {0x3820, 0x47,}, - {0x4514, 0x88,}, - {0x3a02, 0x04,}, - {0x3a03, 0x60,}, - {0x3a08, 0x01,}, - {0x3a09, 0x50,}, - {0x3a0a, 0x01,}, - {0x3a0b, 0x18,}, - {0x3a0e, 0x03,}, - {0x3a0d, 0x04,}, - {0x3a14, 0x04,}, - {0x3a15, 0x60,}, - {0x3a18, 0x00,}, - {0x4004, 0x06,}, - {0x4005, 0x18,}, - {0x4300, 0x30,}, - {0x4202, 0x00,}, - {0x4837, 0x0b,}, -}; - - -static struct msm_camera_i2c_reg_conf ov5645_recommend_settings[] = { - {0x3103, 0x11,}, - {0x3008, 0x82,}, - {0x3008, 0x42,}, - {0x3103, 0x03,}, - {0x3503, 0x07,}, - {0x3002, 0x1c,}, - {0x3006, 0xc3,}, - {0x300e, 0x45,}, - {0x3017, 0x00,}, - {0x3018, 0x00,}, - {0x302e, 0x0b,}, - {0x3037, 0x13,}, - {0x3108, 0x01,}, - {0x3611, 0x06,}, - {0x3500, 0x00,}, - {0x3501, 0x01,}, - {0x3502, 0x00,}, - {0x350a, 0x00,}, - {0x350b, 0x3f,}, - {0x3620, 0x33,}, - {0x3621, 0xe0,}, - {0x3622, 0x01,}, - {0x3630, 0x2e,}, - {0x3631, 0x00,}, - {0x3632, 0x32,}, - {0x3633, 0x52,}, - {0x3634, 0x70,}, - {0x3635, 0x13,}, - {0x3636, 0x03,}, - {0x3703, 0x5a,}, - {0x3704, 0xa0,}, - {0x3705, 0x1a,}, - {0x3709, 0x12,}, - {0x370b, 0x61,}, - {0x370f, 0x10,}, - {0x3715, 0x78,}, - {0x3717, 0x01,}, - {0x371b, 0x20,}, - {0x3731, 0x12,}, - {0x3901, 0x0a,}, - {0x3905, 0x02,}, - {0x3906, 0x10,}, - {0x3719, 0x86,}, - {0x3810, 0x00,}, - {0x3811, 0x10,}, - {0x3812, 0x00,}, - {0x3821, 0x01,}, - {0x3824, 0x01,}, - {0x3826, 0x03,}, - {0x3828, 0x08,}, - {0x3a19, 0xf8,}, - {0x3c01, 0x34,}, - {0x3c04, 0x28,}, - {0x3c05, 0x98,}, - {0x3c07, 0x07,}, - {0x3c09, 0xc2,}, - {0x3c0a, 0x9c,}, - {0x3c0b, 0x40,}, - {0x3c01, 0x34,}, - {0x4001, 0x02,}, - {0x4514, 0x00,}, - {0x4520, 0xb0,}, - {0x460b, 0x37,}, - {0x460c, 0x20,}, - {0x4818, 0x01,}, - {0x481d, 0xf0,}, - {0x481f, 0x50,}, - {0x4823, 0x70,}, - {0x4831, 0x14,}, - {0x5000, 0xa7,}, - {0x5001, 0x83,}, - {0x501d, 0x00,}, - {0x501f, 0x00,}, - {0x503d, 0x00,}, - {0x505c, 0x30,}, - {0x5181, 0x59,}, - {0x5183, 0x00,}, - {0x5191, 0xf0,}, - {0x5192, 0x03,}, - {0x5684, 0x10,}, - {0x5685, 0xa0,}, - {0x5686, 0x0c,}, - {0x5687, 0x78,}, - {0x5a00, 0x08,}, - {0x5a21, 0x00,}, - {0x5a24, 0x00,}, - {0x3008, 0x02,}, - {0x3503, 0x00,}, - {0x5180, 0xff,}, - {0x5181, 0xf2,}, - {0x5182, 0x00,}, - {0x5183, 0x14,}, - {0x5184, 0x25,}, - {0x5185, 0x24,}, - {0x5186, 0x09,}, - {0x5187, 0x09,}, - {0x5188, 0x0a,}, - {0x5189, 0x75,}, - {0x518a, 0x52,}, - {0x518b, 0xea,}, - {0x518c, 0xa8,}, - {0x518d, 0x42,}, - {0x518e, 0x38,}, - {0x518f, 0x56,}, - {0x5190, 0x42,}, - {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, 0x08,}, - {0x5384, 0x0a,}, - {0x5385, 0x7e,}, - {0x5386, 0x88,}, - {0x5387, 0x7c,}, - {0x5388, 0x6c,}, - {0x5389, 0x10,}, - {0x538a, 0x01,}, - {0x538b, 0x98,}, - {0x5300, 0x08,}, - {0x5301, 0x30,}, - {0x5302, 0x10,}, - {0x5303, 0x00,}, - {0x5304, 0x08,}, - {0x5305, 0x30,}, - {0x5306, 0x08,}, - {0x5307, 0x16,}, - {0x5309, 0x08,}, - {0x530a, 0x30,}, - {0x530b, 0x04,}, - {0x530c, 0x06,}, - {0x5480, 0x01,}, - {0x5481, 0x08,}, - {0x5482, 0x14,}, - {0x5483, 0x28,}, - {0x5484, 0x51,}, - {0x5485, 0x65,}, - {0x5486, 0x71,}, - {0x5487, 0x7d,}, - {0x5488, 0x87,}, - {0x5489, 0x91,}, - {0x548a, 0x9a,}, - {0x548b, 0xaa,}, - {0x548c, 0xb8,}, - {0x548d, 0xcd,}, - {0x548e, 0xdd,}, - {0x548f, 0xea,}, - {0x5490, 0x1d,}, - {0x5580, 0x02,}, - {0x5583, 0x40,}, - {0x5584, 0x10,}, - {0x5589, 0x10,}, - {0x558a, 0x00,}, - {0x558b, 0xf8,}, - {0x5800, 0x3f,}, - {0x5801, 0x16,}, - {0x5802, 0x0e,}, - {0x5803, 0x0d,}, - {0x5804, 0x17,}, - {0x5805, 0x3f,}, - {0x5806, 0x0b,}, - {0x5807, 0x06,}, - {0x5808, 0x04,}, - {0x5809, 0x04,}, - {0x580a, 0x06,}, - {0x580b, 0x0b,}, - {0x580c, 0x09,}, - {0x580d, 0x03,}, - {0x580e, 0x00,}, - {0x580f, 0x00,}, - {0x5810, 0x03,}, - {0x5811, 0x08,}, - {0x5812, 0x0a,}, - {0x5813, 0x03,}, - {0x5814, 0x00,}, - {0x5815, 0x00,}, - {0x5816, 0x04,}, - {0x5817, 0x09,}, - {0x5818, 0x0f,}, - {0x5819, 0x08,}, - {0x581a, 0x06,}, - {0x581b, 0x06,}, - {0x581c, 0x08,}, - {0x581d, 0x0c,}, - {0x581e, 0x3f,}, - {0x581f, 0x1e,}, - {0x5820, 0x12,}, - {0x5821, 0x13,}, - {0x5822, 0x21,}, - {0x5823, 0x3f,}, - {0x5824, 0x68,}, - {0x5825, 0x28,}, - {0x5826, 0x2c,}, - {0x5827, 0x28,}, - {0x5828, 0x08,}, - {0x5829, 0x48,}, - {0x582a, 0x64,}, - {0x582b, 0x62,}, - {0x582c, 0x64,}, - {0x582d, 0x28,}, - {0x582e, 0x46,}, - {0x582f, 0x62,}, - {0x5830, 0x60,}, - {0x5831, 0x62,}, - {0x5832, 0x26,}, - {0x5833, 0x48,}, - {0x5834, 0x66,}, - {0x5835, 0x44,}, - {0x5836, 0x64,}, - {0x5837, 0x28,}, - {0x5838, 0x66,}, - {0x5839, 0x48,}, - {0x583a, 0x2c,}, - {0x583b, 0x28,}, - {0x583c, 0x26,}, - {0x583d, 0xae,}, - {0x5025, 0x00,}, - {0x3a0f, 0x30,}, - {0x3a10, 0x28,}, - {0x3a1b, 0x30,}, - {0x3a1e, 0x26,}, - {0x3a11, 0x60,}, - {0x3a1f, 0x14,}, - {0x0601, 0x02,}, - {0x3008, 0x42,}, - -}; - -static struct v4l2_subdev_info ov5645_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov5645_start_settings[] = { - {0x3008, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_stop_settings[] = { - {0x3008, 0x42,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_enable_aec_settings[] = { - {0x3503, 0x00,}, - {0x3406, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf ov5645_disable_aec_settings[] = { - {0x3503, 0x07,}, - {0x3406, 0x01,}, -}; - -static const struct i2c_device_id ov5645_i2c_id[] = { - {OV5645_SENSOR_NAME, (kernel_ulong_t)&ov5645_s_ctrl}, - { } -}; - -static int32_t msm_ov5645_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5645_s_ctrl); -} - -static struct i2c_driver ov5645_i2c_driver = { - .id_table = ov5645_i2c_id, - .probe = msm_ov5645_i2c_probe, - .driver = { - .name = OV5645_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5645_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov5645_dt_match[] = { - {.compatible = "ovti,ov5645", .data = &ov5645_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5645_dt_match); - -static int32_t ov5645_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(ov5645_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver ov5645_platform_driver = { - .driver = { - .name = "ovti,ov5645", - .owner = THIS_MODULE, - .of_match_table = ov5645_dt_match, - }, - .probe = ov5645_platform_probe, -}; - -static int __init ov5645_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_register(&ov5645_platform_driver); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov5645_i2c_driver); -} - -static void __exit ov5645_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (ov5645_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5645_s_ctrl); - platform_driver_unregister(&ov5645_platform_driver); - } else - i2c_del_driver(&ov5645_i2c_driver); - return; -} - -int32_t ov5645_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_recommend_settings, - ARRAY_SIZE(ov5645_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_full_settings, - ARRAY_SIZE(ov5645_full_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov5645_full_settings ", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_QTR) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_sxga_settings, - ARRAY_SIZE(ov5645_sxga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_sxga_settings\n", - __func__, __LINE__, res); - } else if (res == MSM_SENSOR_RES_2) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, - ov5645_1080P_settings, - ARRAY_SIZE(ov5645_1080P_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d ov5645_1080P_settings\n", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_stop_settings, - ARRAY_SIZE(ov5645_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - if (s_ctrl->camera_stream_type != MSM_CAMERA_STREAM_SNAPSHOT) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_enable_aec_settings, - ARRAY_SIZE(ov5645_enable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } else { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_disable_aec_settings, - ARRAY_SIZE(ov5645_disable_aec_settings), - MSM_CAMERA_I2C_BYTE_DATA); - } - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov5645_start_settings, - ARRAY_SIZE(ov5645_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(struct msm_sensor_power_setting) - * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x sensor addr type %d sensor reg %x\n" - "sensor id %x\n", __func__, - sensor_slave_info.slave_addr, - sensor_slave_info.addr_type, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -static struct msm_sensor_fn_t ov5645_sensor_func_tbl = { - .sensor_config = ov5645_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t ov5645_s_ctrl = { - .sensor_i2c_client = &ov5645_sensor_i2c_client, - .power_setting_array.power_setting = ov5645_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov5645_power_setting), - .msm_sensor_mutex = &ov5645_mut, - .sensor_v4l2_subdev_info = ov5645_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov5645_subdev_info), - .func_tbl = &ov5645_sensor_func_tbl, -}; - -module_init(ov5645_init_module); -module_exit(ov5645_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5648.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5648.c deleted file mode 100644 index 99224684a131..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov5648.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV5648_SENSOR_NAME "ov5648" -DEFINE_MSM_MUTEX(ov5648_mut); - -static struct msm_sensor_ctrl_t ov5648_s_ctrl; - -static struct msm_sensor_power_setting ov5648_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_VDIG, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov5648_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov5648_i2c_id[] = { - {OV5648_SENSOR_NAME, - (kernel_ulong_t)&ov5648_s_ctrl}, - { } -}; - -static int32_t msm_ov5648_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov5648_s_ctrl); -} - -static struct i2c_driver ov5648_i2c_driver = { - .id_table = ov5648_i2c_id, - .probe = msm_ov5648_i2c_probe, - .driver = { - .name = OV5648_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov5648_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov5648_s_ctrl = { - .sensor_i2c_client = &ov5648_sensor_i2c_client, - .power_setting_array.power_setting = ov5648_power_setting, - .power_setting_array.size = - ARRAY_SIZE(ov5648_power_setting), - .msm_sensor_mutex = &ov5648_mut, - .sensor_v4l2_subdev_info = ov5648_subdev_info, - .sensor_v4l2_subdev_info_size = - ARRAY_SIZE(ov5648_subdev_info), -}; - -static const struct of_device_id ov5648_dt_match[] = { - { - .compatible = "ovti,ov5648", - .data = &ov5648_s_ctrl - }, - {} -}; - -MODULE_DEVICE_TABLE(of, ov5648_dt_match); - -static struct platform_driver ov5648_platform_driver = { - .driver = { - .name = "ovti,ov5648", - .owner = THIS_MODULE, - .of_match_table = ov5648_dt_match, - }, -}; - -static int32_t ov5648_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov5648_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov5648_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov5648_platform_driver, - ov5648_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov5648_i2c_driver); -} - -static void __exit ov5648_exit_module(void) -{ - if (ov5648_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov5648_s_ctrl); - platform_driver_unregister(&ov5648_platform_driver); - } else - i2c_del_driver(&ov5648_i2c_driver); - return; -} - -module_init(ov5648_init_module); -module_exit(ov5648_exit_module); -MODULE_DESCRIPTION("ov5648"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov7695.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov7695.c deleted file mode 100644 index 6927f466062b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov7695.c +++ /dev/null @@ -1,808 +0,0 @@ -/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" -#define OV7695_SENSOR_NAME "ov7695" -#define PLATFORM_DRIVER_NAME "msm_camera_ov7695" -#define ov7695_obj ov7695_##obj - -/*#define CONFIG_MSMB_CAMERA_DEBUG*/ -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - - -DEFINE_MSM_MUTEX(ov7695_mut); -static struct msm_sensor_ctrl_t ov7695_s_ctrl; - -static struct msm_sensor_power_setting ov7695_power_setting[] = { - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 10, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov7695_vga_settings[] = { - {0x3630, 0x79,}, -}; - -static struct msm_camera_i2c_reg_conf ov7695_recommend_settings[] = { - {0x0103, 0x01,}, - {0x0100, 0x01,}, - {0x3620, 0x2f,}, - {0x3623, 0x12,}, - {0x3718, 0x88,}, - {0x3703, 0x80,}, - {0x3712, 0x40,}, - {0x3706, 0x40,}, - {0x3631, 0x44,}, - {0x3632, 0x05,}, - {0x3013, 0xd0,}, - {0x3705, 0x1d,}, - {0x3713, 0x0e,}, - {0x3012, 0x0a,}, - {0x3717, 0x18,}, - {0x3621, 0x47,}, - {0x0309, 0x24,}, - {0x3820, 0x90,}, - {0x4803, 0x08,}, - {0x0101, 0x01,}, - {0x5100, 0x01,}, - {0x4500, 0x24,}, - {0x5301, 0x05,}, - {0x5302, 0x0c,}, - {0x5303, 0x1c,}, - {0x5304, 0x2a,}, - {0x5305, 0x39,}, - {0x5306, 0x45,}, - {0x5307, 0x52,}, - {0x5308, 0x5d,}, - {0x5309, 0x68,}, - {0x530a, 0x7f,}, - {0x530b, 0x91,}, - {0x530c, 0xa5,}, - {0x530d, 0xc6,}, - {0x530e, 0xde,}, - {0x530f, 0xef,}, - {0x5310, 0x16,}, - {0x520a, 0x74,}, //f4 - {0x520b, 0x64,}, //f4 - {0x520c, 0xd4,}, //f4 - {0x5504, 0x08,}, - {0x5505, 0x48,}, - {0x5506, 0x07,}, - {0x5507, 0x0b,}, - {0x3a18, 0x01,}, - {0x3a19, 0x00,}, - {0x3503, 0x03,}, - {0x3500, 0x00,}, - {0x3501, 0x21,}, - {0x3502, 0x00,}, - {0x350a, 0x00,}, - {0x350b, 0x00,}, - {0x4008, 0x02,}, - {0x4009, 0x09,}, - {0x3002, 0x09,}, - {0x3024, 0x00,}, - {0x3503, 0x00,}, - {0x0101, 0x01,}, - {0x5002, 0x48,}, - {0x5910, 0x00,}, - {0x3a0f, 0x58,}, - {0x3a10, 0x50,}, - {0x3a1b, 0x5a,}, - {0x3a1e, 0x4e,}, - {0x3a11, 0xa0,}, - {0x3a1f, 0x28,}, - {0x3a18, 0x00,}, - {0x3a19, 0xf8,}, - {0x3503, 0x00,}, - {0x3a0d, 0x04,}, - {0x5000, 0xff,}, - {0x5001, 0x3f,}, - {0x5100, 0x1 ,}, //01 - {0x5101, 0x25,}, //48 - {0x5102, 0x0 ,}, //00 - {0x5103, 0xf3,}, //f8 - {0x5104, 0x7f,}, //04 - {0x5105, 0x5 ,}, //00 - {0x5106, 0xff,}, //00 - {0x5107, 0xf ,}, //00 - {0x5108, 0x1 ,}, //01 - {0x5109, 0x1f,}, //48 - {0x510a, 0x0 ,}, //00 - {0x510b, 0xde,}, //f8 - {0x510c, 0x56,}, //03 - {0x510d, 0x5 ,}, //00 - {0x510e, 0xff,}, //00 - {0x510f, 0xf ,}, //00 - {0x5110, 0x1 ,}, //01 - {0x5111, 0x23,}, //48 - {0x5112, 0x0 ,}, //00 - {0x5113, 0xe3,}, //f8 - {0x5114, 0x5c,}, //03 - {0x5115, 0x5 ,}, //00 - {0x5116, 0xff,}, //00 - {0x5117, 0xf ,}, //00 - {0x520a, 0x74,}, //f4 - {0x520b, 0x64,}, //f4 - {0x520c, 0xd4,}, //f4 - {0x5004, 0x41,}, - {0x5006, 0x41,}, - {0x5301, 0x05,}, - {0x5302, 0x0c,}, - {0x5303, 0x1c,}, - {0x5304, 0x2a,}, - {0x5305, 0x39,}, - {0x5306, 0x45,}, - {0x5307, 0x53,}, - {0x5308, 0x5d,}, - {0x5309, 0x68,}, - {0x530a, 0x7f,}, - {0x530b, 0x91,}, - {0x530c, 0xa5,}, - {0x530d, 0xc6,}, - {0x530e, 0xde,}, - {0x530f, 0xef,}, - {0x5310, 0x16,}, - {0x5003, 0x80,}, - {0x5500, 0x08,}, - {0x5501, 0x48,}, - {0x5502, 0x18,}, - {0x5503, 0x04,}, - {0x5504, 0x08,}, - {0x5505, 0x48,}, - {0x5506, 0x02,}, - {0x5507, 0x16,}, - {0x5508, 0x2d,}, - {0x5509, 0x08,}, - {0x550a, 0x48,}, - {0x550b, 0x06,}, - {0x550c, 0x04,}, - {0x550d, 0x01,}, - {0x5800, 0x02,}, - {0x5803, 0x2e,}, - {0x5804, 0x20,}, - {0x5600, 0x00,}, - {0x5601, 0x2c,}, - {0x5602, 0x5a,}, - {0x5603, 0x06,}, - {0x5604, 0x1c,}, - {0x5605, 0x65,}, - {0x5606, 0x81,}, - {0x5607, 0x9f,}, - {0x5608, 0x8a,}, - {0x5609, 0x15,}, - {0x560a, 0x01,}, - {0x560b, 0x9c,}, - {0x3811, 0x07,}, - {0x3813, 0x06,}, - {0x3630, 0x79,}, -}; - -static struct v4l2_subdev_info ov7695_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_YUYV8_2X8, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static struct msm_camera_i2c_reg_conf ov7695_start_settings[] = { - {0x301a, 0xf0}, -}; - -static struct msm_camera_i2c_reg_conf ov7695_stop_settings[] = { - {0x301a, 0xf4}, -}; - -static const struct i2c_device_id ov7695_i2c_id[] = { - {OV7695_SENSOR_NAME, (kernel_ulong_t)&ov7695_s_ctrl}, - { } -}; - -static int32_t msm_ov7695_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov7695_s_ctrl); -} - -static struct i2c_driver ov7695_i2c_driver = { - .id_table = ov7695_i2c_id, - .probe = msm_ov7695_i2c_probe, - .driver = { - .name = OV7695_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov7695_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov7695_dt_match[] = { - {.compatible = "ovti,ov7695", .data = &ov7695_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov7695_dt_match); - -static int32_t ov7695_platform_probe(struct platform_device *pdev) -{ - int32_t rc; - const struct of_device_id *match; - match = of_match_device(ov7695_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static struct platform_driver ov7695_platform_driver = { - .driver = { - .name = "ovti,ov7695", - .owner = THIS_MODULE, - .of_match_table = ov7695_dt_match, - }, - .probe = ov7695_platform_probe, -}; - -static int __init ov7695_init_module(void) -{ - int32_t rc; - pr_err("%s:%d\n", __func__, __LINE__); - rc = platform_driver_register(&ov7695_platform_driver); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov7695_i2c_driver); -} - -static void __exit ov7695_exit_module(void) -{ - pr_err("%s:%d\n", __func__, __LINE__); - if (ov7695_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov7695_s_ctrl); - platform_driver_unregister(&ov7695_platform_driver); - } else - i2c_del_driver(&ov7695_i2c_driver); - return; -} - -int32_t ov7695_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.subdev_intf[i] = - s_ctrl->sensordata->sensor_info->subdev_intf[i]; - } - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_recommend_settings, - ARRAY_SIZE(ov7695_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, (void *)cdata->cfg.setting, - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_vga_settings, - ARRAY_SIZE(ov7695_vga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov7695_vga_settings ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_stop_settings, - ARRAY_SIZE(ov7695_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_start_settings, - ARRAY_SIZE(ov7695_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - if (!conf_array.size || - conf_array.size > I2C_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = - MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, (void *)cdata->cfg.setting, - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_COMPAT -int32_t ov7695_sensor_config32(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data32 *cdata = (struct sensorb_cfg_data32 *)argp; - long rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) { - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.subdev_intf[i] = - s_ctrl->sensordata->sensor_info->subdev_intf[i]; - } - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - break; - case CFG_SET_INIT_SETTING: - /* 1. Write Recommend settings */ - /* 2. Write change settings */ - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_recommend_settings, - ARRAY_SIZE(ov7695_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - - case CFG_SET_RESOLUTION: { - /*copy from user the desired resoltuion*/ - enum msm_sensor_resolution_t res = MSM_SENSOR_INVALID_RES; - if (copy_from_user(&res, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(enum msm_sensor_resolution_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - pr_err("%s:%d res =%d\n", __func__, __LINE__, res); - - if (res == MSM_SENSOR_RES_FULL) { - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_vga_settings, - ARRAY_SIZE(ov7695_vga_settings), - MSM_CAMERA_I2C_BYTE_DATA); - pr_err("%s:%d res =%d\n ov7695_vga_settings ", - __func__, __LINE__, res); - } else { - pr_err("%s:%d failed resoultion set\n", __func__, - __LINE__); - rc = -EFAULT; - } - } - break; - case CFG_SET_STOP_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_stop_settings, - ARRAY_SIZE(ov7695_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl( - s_ctrl->sensor_i2c_client, ov7695_start_settings, - ARRAY_SIZE(ov7695_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting32 conf_array32; - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array32, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(struct msm_camera_i2c_reg_setting32))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - conf_array.addr_type = conf_array32.addr_type; - conf_array.data_type = conf_array32.data_type; - conf_array.delay = conf_array32.delay; - conf_array.size = conf_array32.size; - conf_array.reg_setting = compat_ptr(conf_array32.reg_setting); - conf_array.qup_i2c_batch = conf_array32.qup_i2c_batch; - - if (!conf_array.size || - conf_array.size > I2C_REG_DATA_MAX) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - else - rc = -EFAULT; - break; - case CFG_SET_STREAM_TYPE: { - enum msm_camera_stream_type_t stream_type = - MSM_CAMERA_STREAM_INVALID; - if (copy_from_user(&stream_type, - (void *)compat_ptr(cdata->cfg.setting), - sizeof(enum msm_camera_stream_type_t))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - s_ctrl->camera_stream_type = stream_type; - break; - } - case CFG_SET_SATURATION: - break; - case CFG_SET_CONTRAST: - break; - case CFG_SET_SHARPNESS: - break; - case CFG_SET_AUTOFOCUS: - /* TO-DO: set the Auto Focus */ - pr_debug("%s: Setting Auto Focus", __func__); - break; - case CFG_CANCEL_AUTOFOCUS: - /* TO-DO: Cancel the Auto Focus */ - pr_debug("%s: Cancelling Auto Focus", __func__); - break; - case CFG_SET_ISO: - break; - case CFG_SET_EXPOSURE_COMPENSATION: - break; - case CFG_SET_EFFECT: - break; - case CFG_SET_ANTIBANDING: - break; - case CFG_SET_BESTSHOT_MODE: - break; - case CFG_SET_WHITE_BALANCE: - break; - default: - pr_err("Invalid cfgtype func %s line %d cfgtype = %d\n", - __func__, __LINE__, (int32_t)cdata->cfgtype); - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} -#endif - -static struct msm_sensor_fn_t ov7695_sensor_func_tbl = { - .sensor_config = ov7695_sensor_config, -#ifdef CONFIG_COMPAT - .sensor_config32 = ov7695_sensor_config32, -#endif - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = msm_sensor_match_id, -}; - -static struct msm_sensor_ctrl_t ov7695_s_ctrl = { - .sensor_i2c_client = &ov7695_sensor_i2c_client, - .power_setting_array.power_setting = ov7695_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov7695_power_setting), - .msm_sensor_mutex = &ov7695_mut, - .sensor_v4l2_subdev_info = ov7695_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov7695_subdev_info), - .func_tbl = &ov7695_sensor_func_tbl, -}; - -module_init(ov7695_init_module); -module_exit(ov7695_exit_module); -MODULE_DESCRIPTION("Aptina 0.3MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8825.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8825.c deleted file mode 100644 index e17c94e85b50..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8825.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8825_SENSOR_NAME "ov8825" -DEFINE_MSM_MUTEX(ov8825_mut); - -static struct msm_sensor_ctrl_t ov8825_s_ctrl; - -static struct msm_sensor_power_setting ov8825_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8825_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8825_i2c_id[] = { - {OV8825_SENSOR_NAME, (kernel_ulong_t)&ov8825_s_ctrl}, - { } -}; - -static int32_t msm_ov8825_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8825_s_ctrl); -} - -static struct i2c_driver ov8825_i2c_driver = { - .id_table = ov8825_i2c_id, - .probe = msm_ov8825_i2c_probe, - .driver = { - .name = OV8825_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8825_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8825_dt_match[] = { - {.compatible = "qcom,ov8825", .data = &ov8825_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8825_dt_match); - -static struct platform_driver ov8825_platform_driver = { - .driver = { - .name = "qcom,ov8825", - .owner = THIS_MODULE, - .of_match_table = ov8825_dt_match, - }, -}; - -static int32_t ov8825_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8825_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8825_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8825_platform_driver, - ov8825_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8825_i2c_driver); -} - -static void __exit ov8825_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8825_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8825_s_ctrl); - platform_driver_unregister(&ov8825_platform_driver); - } else - i2c_del_driver(&ov8825_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8825_s_ctrl = { - .sensor_i2c_client = &ov8825_sensor_i2c_client, - .power_setting_array.power_setting = ov8825_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8825_power_setting), - .msm_sensor_mutex = &ov8825_mut, - .sensor_v4l2_subdev_info = ov8825_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8825_subdev_info), -}; - -module_init(ov8825_init_module); -module_exit(ov8825_exit_module); -MODULE_DESCRIPTION("ov8825"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8865.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8865.c deleted file mode 100644 index 6d788f592b17..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov8865.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define OV8865_SENSOR_NAME "ov8865" -DEFINE_MSM_MUTEX(ov8865_mut); - -static struct msm_sensor_ctrl_t ov8865_s_ctrl; - -static struct msm_sensor_power_setting ov8865_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_AF_PWDM, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov8865_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id ov8865_i2c_id[] = { - {OV8865_SENSOR_NAME, (kernel_ulong_t)&ov8865_s_ctrl}, - { } -}; - -static int32_t msm_ov8865_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov8865_s_ctrl); -} - -static struct i2c_driver ov8865_i2c_driver = { - .id_table = ov8865_i2c_id, - .probe = msm_ov8865_i2c_probe, - .driver = { - .name = OV8865_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov8865_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id ov8865_dt_match[] = { - {.compatible = "ovti,ov8865", .data = &ov8865_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov8865_dt_match); - -static struct platform_driver ov8865_platform_driver = { - .driver = { - .name = "ovti,ov8865", - .owner = THIS_MODULE, - .of_match_table = ov8865_dt_match, - }, -}; - -static int32_t ov8865_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(ov8865_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov8865_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&ov8865_platform_driver, - ov8865_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&ov8865_i2c_driver); -} - -static void __exit ov8865_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (ov8865_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov8865_s_ctrl); - platform_driver_unregister(&ov8865_platform_driver); - } else - i2c_del_driver(&ov8865_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t ov8865_s_ctrl = { - .sensor_i2c_client = &ov8865_sensor_i2c_client, - .power_setting_array.power_setting = ov8865_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov8865_power_setting), - .msm_sensor_mutex = &ov8865_mut, - .sensor_v4l2_subdev_info = ov8865_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov8865_subdev_info), -}; - -module_init(ov8865_init_module); -module_exit(ov8865_exit_module); -MODULE_DESCRIPTION("ov8865"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov9724.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov9724.c deleted file mode 100644 index 99bf03ab1aa0..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/ov9724.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" - -#define OV9724_SENSOR_NAME "ov9724" -DEFINE_MSM_MUTEX(ov9724_mut); - -static struct msm_sensor_ctrl_t ov9724_s_ctrl; - -static struct msm_sensor_power_setting ov9724_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 10, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 10, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info ov9724_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static int32_t msm_ov9724_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &ov9724_s_ctrl); -} - -static const struct i2c_device_id ov9724_i2c_id[] = { - {OV9724_SENSOR_NAME, (kernel_ulong_t)&ov9724_s_ctrl}, - { } -}; - -static struct i2c_driver ov9724_i2c_driver = { - .id_table = ov9724_i2c_id, - .probe = msm_ov9724_i2c_probe, - .driver = { - .name = OV9724_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client ov9724_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static struct msm_sensor_ctrl_t ov9724_s_ctrl = { - .sensor_i2c_client = &ov9724_sensor_i2c_client, - .power_setting_array.power_setting = ov9724_power_setting, - .power_setting_array.size = ARRAY_SIZE(ov9724_power_setting), - .msm_sensor_mutex = &ov9724_mut, - .sensor_v4l2_subdev_info = ov9724_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(ov9724_subdev_info), -}; - -static const struct of_device_id ov9724_dt_match[] = { - {.compatible = "qcom,ov9724", .data = &ov9724_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, ov9724_dt_match); - -static struct platform_driver ov9724_platform_driver = { - .driver = { - .name = "qcom,ov9724", - .owner = THIS_MODULE, - .of_match_table = ov9724_dt_match, - }, -}; - -static int32_t ov9724_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - - match = of_match_device(ov9724_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init ov9724_init_module(void) -{ - int32_t rc = 0; - - rc = platform_driver_probe(&ov9724_platform_driver, - ov9724_platform_probe); - if (!rc) - return rc; - return i2c_add_driver(&ov9724_i2c_driver); -} - -static void __exit ov9724_exit_module(void) -{ - if (ov9724_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&ov9724_s_ctrl); - platform_driver_unregister(&ov9724_platform_driver); - } else - i2c_del_driver(&ov9724_i2c_driver); - return; -} - -module_init(ov9724_init_module); -module_exit(ov9724_exit_module); -MODULE_DESCRIPTION("ov9724"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k3l1yx.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k3l1yx.c deleted file mode 100644 index 225e81d94cdb..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k3l1yx.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define S5K3L1YX_SENSOR_NAME "s5k3l1yx" -DEFINE_MSM_MUTEX(s5k3l1yx_mut); - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl; - -static struct msm_sensor_power_setting s5k3l1yx_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VAF, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 0, - }, -}; - -static struct v4l2_subdev_info s5k3l1yx_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SBGGR10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k3l1yx_i2c_id[] = { - {S5K3L1YX_SENSOR_NAME, (kernel_ulong_t)&s5k3l1yx_s_ctrl}, - { } -}; - -static int32_t msm_s5k3l1yx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k3l1yx_s_ctrl); -} - -static struct i2c_driver s5k3l1yx_i2c_driver = { - .id_table = s5k3l1yx_i2c_id, - .probe = msm_s5k3l1yx_i2c_probe, - .driver = { - .name = S5K3L1YX_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k3l1yx_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k3l1yx_dt_match[] = { - {.compatible = "qcom,s5k3l1yx", .data = &s5k3l1yx_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k3l1yx_dt_match); - -static struct platform_driver s5k3l1yx_platform_driver = { - .driver = { - .name = "qcom,s5k3l1yx", - .owner = THIS_MODULE, - .of_match_table = s5k3l1yx_dt_match, - }, -}; - -static int32_t s5k3l1yx_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k3l1yx_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k3l1yx_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k3l1yx_platform_driver, - s5k3l1yx_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k3l1yx_i2c_driver); -} - -static void __exit s5k3l1yx_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k3l1yx_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k3l1yx_s_ctrl); - platform_driver_unregister(&s5k3l1yx_platform_driver); - } else - i2c_del_driver(&s5k3l1yx_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k3l1yx_s_ctrl = { - .sensor_i2c_client = &s5k3l1yx_sensor_i2c_client, - .power_setting_array.power_setting = s5k3l1yx_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k3l1yx_power_setting), - .msm_sensor_mutex = &s5k3l1yx_mut, - .sensor_v4l2_subdev_info = s5k3l1yx_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k3l1yx_subdev_info), -}; - -module_init(s5k3l1yx_init_module); -module_exit(s5k3l1yx_exit_module); -MODULE_DESCRIPTION("s5k3l1yx"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4e1.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4e1.c deleted file mode 100644 index 5c70df2dec56..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4e1.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#define s5k4e1_SENSOR_NAME "s5k4e1" -DEFINE_MSM_MUTEX(s5k4e1_mut); - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl; - -static struct msm_sensor_power_setting s5k4e1_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 1, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 30, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 24000000, - .delay = 1, - }, - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 1, - }, -}; - -static struct v4l2_subdev_info s5k4e1_subdev_info[] = { - { - .code = V4L2_MBUS_FMT_SGRBG10_1X10, - .colorspace = V4L2_COLORSPACE_JPEG, - .fmt = 1, - .order = 0, - }, -}; - -static const struct i2c_device_id s5k4e1_i2c_id[] = { - {s5k4e1_SENSOR_NAME, (kernel_ulong_t)&s5k4e1_s_ctrl}, - { } -}; - -static int32_t msm_s5k4e1_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - return msm_sensor_i2c_probe(client, id, &s5k4e1_s_ctrl); -} - -static struct i2c_driver s5k4e1_i2c_driver = { - .id_table = s5k4e1_i2c_id, - .probe = msm_s5k4e1_i2c_probe, - .driver = { - .name = s5k4e1_SENSOR_NAME, - }, -}; - -static struct msm_camera_i2c_client s5k4e1_sensor_i2c_client = { - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, -}; - -static const struct of_device_id s5k4e1_dt_match[] = { - {.compatible = "shinetech,s5k4e1", .data = &s5k4e1_s_ctrl}, - {} -}; - -MODULE_DEVICE_TABLE(of, s5k4e1_dt_match); - -static struct platform_driver s5k4e1_platform_driver = { - .driver = { - .name = "shinetech,s5k4e1", - .owner = THIS_MODULE, - .of_match_table = s5k4e1_dt_match, - }, -}; - -static int32_t s5k4e1_platform_probe(struct platform_device *pdev) -{ - int32_t rc = 0; - const struct of_device_id *match; - match = of_match_device(s5k4e1_dt_match, &pdev->dev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init s5k4e1_init_module(void) -{ - int32_t rc = 0; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&s5k4e1_platform_driver, - s5k4e1_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&s5k4e1_i2c_driver); -} - -static void __exit s5k4e1_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (s5k4e1_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&s5k4e1_s_ctrl); - platform_driver_unregister(&s5k4e1_platform_driver); - } else - i2c_del_driver(&s5k4e1_i2c_driver); - return; -} - -static struct msm_sensor_ctrl_t s5k4e1_s_ctrl = { - .sensor_i2c_client = &s5k4e1_sensor_i2c_client, - .power_setting_array.power_setting = s5k4e1_power_setting, - .power_setting_array.size = ARRAY_SIZE(s5k4e1_power_setting), - .msm_sensor_mutex = &s5k4e1_mut, - .sensor_v4l2_subdev_info = s5k4e1_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(s5k4e1_subdev_info), -}; - -module_init(s5k4e1_init_module); -module_exit(s5k4e1_exit_module); -MODULE_DESCRIPTION("s5k4e1"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx.h deleted file mode 100755 index 99f074fd6786..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __S5K4ECGX_H__ -#define __S5K4ECGX_H__ - -#include "msm_sensor.h" - -#undef DEBUG_LEVEL_HIGH -#undef CDBG - -#define DEBUG_LEVEL_HIGH -#ifdef DEBUG_LEVEL_HIGH -#define CDBG(fmt, args...) printk("[S5K4ECGX] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -#define LOW_LIGHT_LEVEL 0x40 -#define BURST_MODE_BUFFER_MAX_SIZE 128 -#define BURST_REG 0x0F12 - -struct s5k4ecgx_userset { - unsigned int metering; - unsigned int exposure; - unsigned int wb; - unsigned int iso; - unsigned int effect; - unsigned int scenemode; - unsigned int resolution; - unsigned int ae_awb_lock; - unsigned int focus_mode; - unsigned int flash_mode; - unsigned int lowLight; - unsigned int is_touchaf; - unsigned int is_preflash; -}; - -struct s5k4ecgx_ctrl { - struct s5k4ecgx_userset settings; - unsigned int op_mode; - unsigned int prev_mode; - unsigned int streamon; - unsigned int exif_iso; - unsigned int exif_shutterspeed ; -}; - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl); - -extern int set_led_flash(int mode); - -#endif //__S5K4ECGX_H__ diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs.h deleted file mode 100755 index 5ab1dcdcdeb3..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs.h +++ /dev/null @@ -1,6083 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0092,},//adlc_enable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA}, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable}, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0006,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x000C,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0402,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0600,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x05E0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0390,}, -{0x0F12, 0x03B0,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039E,}, -{0x0F12, 0x0338,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x02FE,}, -{0x0F12, 0x0352,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x031E,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x02E8,}, -{0x0F12, 0x023A,}, -{0x0F12, 0x02A4,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x0272,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0256,}, -{0x0F12, 0x01F6,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x01E6,}, -{0x0F12, 0x0236,}, -{0x0F12, 0x01CA,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x01AA,}, -{0x0F12, 0x020C,}, -{0x0F12, 0x019E,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x0126,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0264,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x025A,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0006,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x3A98,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: 60Hz 5F:50Hz */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, - {0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0200,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0414,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x3718,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2A36,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x2A36,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000}, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232D,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x212B,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1E26,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame}, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //Hsize : 640 1280 1024 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight//Vsize : 480 960 768 -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV}, 7:RAW}, 9:JPEG -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x29FE,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0920,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0060,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0348,},//_ccm_oscar_iSaturation [7:0] AFIT - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0AC0,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x5018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x00F0,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x05A0,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x0414,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x3718,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x2A36,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x2A36,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x232D,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x1D22,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x212B,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x0C0C,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x1E26,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x0A0A,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0404,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x0C0F,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x0808,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ -/* FOR HD CAMCORDER */ - -#if 0 -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,},/*REG_TC_GP_PrevReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_PrevReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_PrevInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_PrevInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_GP_CapReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_GP_CapReqInputHeight */ -{0x0F12, 0x0010,},/*REG_TC_GP_CapInputWidthOfs */ -{0x0F12, 0x000C,},/*REG_TC_GP_CapInputHeightOfs */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_PrevZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_PrevZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x0F12, 0x0A00,},/*REG_TC_PZOOM_CapZoomReqInputWidth */ -{0x0F12, 0x0780,},/*REG_TC_PZOOM_CapZoomReqInputHeight */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputWidthOfs */ -{0x0F12, 0x0000,},/*REG_TC_PZOOM_CapZoomReqInputHeightOfs */ -#endif - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - - -#endif - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_gte.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_gte.h deleted file mode 100755 index 2f4b69ff1a34..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_gte.h +++ /dev/null @@ -1,6220 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -#if defined(CONFIG_SEC_GTES_PROJECT) || defined(CONFIG_SEC_GTEL_PROJECT) -#define FLICKER_DEFAULT -#endif - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { - -//=============================================================== -// 01.Init arm -//============================================================== -{0xFCFC, 0xD000,}, /*01.Start Setting*/ -{0x0010, 0x0001,},/*S/W Reset */ -{0x1030, 0x0000,},/*contint_host_int */ -{0x0014, 0x0001,}, /*sw_load_complete-Release CORE(Arm)from reset state*/ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -//=============================================================== -// 02.ETC Setting -//============================================================== - -{0x0028, 0xD000,}, //02.ETC Setting -{0x002A, 0x1082,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1084,}, -{0x0F12, 0x0155,}, -{0x002A, 0x1086,}, -{0x0F12, 0x0055,}, -{0x002A, 0x1088,}, -{0x0F12, 0x0555,}, -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -// YOU are RESPONSIBLE for the FAILURE that will happen in the future. - -{0x0028, 0xD000,}, // 03.Analog Setting & ASP Control-1 -{0x002A, 0x007A,}, -{0x0F12, 0x0000,},//config_clk_setting -{0x002A, 0xE406,}, -{0x0F12, 0x0082,},//Fadlc_disable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},//adlc_fadlc_filter_co -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,},//adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,},//adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,},//adlc_qec -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //aig_shutter_width -{0x0F12, 0x0023,}, //aig_cds_tune -{0x0F12, 0x8080,}, //aig_cds_option -{0x0F12, 0x03AF,}, //aig_mx -{0x0F12, 0x000A,}, //aig_mode_en -{0x0F12, 0xAA54,}, //aig_ms -{0x0F12, 0x0040,}, //aig_rmp_tune_1 -{0x0F12, 0x464E,}, //aig_rmp_tune_2 -{0x0F12, 0x0240,}, //aig_bist_sig_width_e -{0x0F12, 0x0240,}, //aig_bist_sig_width_o -{0x0F12, 0x0040,}, //aig_dbs_bist -{0x0F12, 0x1000,}, //aig_dbs_tune -{0x0F12, 0x55FF,}, //aig_bias_tune -{0x0F12, 0xD000,}, //aig_ref_tune_1 -{0x0F12, 0x0010,}, //aig_ref_tune_2 -{0x0F12, 0x0202,}, //aig_reg_tune_1 -{0x0F12, 0x0401,}, //aig_reg_tune_2 -{0x0F12, 0x0022,}, //aig_rosc_tune -{0x0F12, 0x0088,}, //aig_dbr_tune_1 -{0x0F12, 0x009F,}, //aig_dbr_tune_2 -{0x0F12, 0x0000,}, //aig_bist_en_cintr -{0x0F12, 0x1800,}, //aig_vdec_tune -{0x0F12, 0x0088,}, //aig_pmg_reg_tune -{0x0F12, 0x0000,}, //aig_pmg_tune_1 -{0x0F12, 0x2428,}, //aig_shutter_gap -{0x0F12, 0x0000,}, //aig_atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //aig_hvs_test_reg -{0x0F12, 0x0000,}, //aig_dbus_bist_auto -{0x0F12, 0x0000,},//aig_dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //aig_1h_time_1 -{0x0F12, 0x080C,},//aig_1h_time_2 - - - -//================================================================= -// Trap & Patch -//=================================================================== - -// TnP setting -// Start of Patch data -{0x0028, 0x7000,}, // 05.Trap and Patch -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x4B44,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4845,}, -{0x0F12, 0x2200,}, -{0x0F12, 0xC008,}, -{0x0F12, 0x6001,}, -{0x0F12, 0x4944,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2401,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFCA4,}, -{0x0F12, 0x4943,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x2702,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC9E,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x4C42,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x2600,}, -{0x0F12, 0x8066,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4841,}, -{0x0F12, 0x6041,}, -{0x0F12, 0x4941,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x2503,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC90,}, -{0x0F12, 0x483D,}, -{0x0F12, 0x4940,}, -{0x0F12, 0x30C0,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0x4F3B,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x3F80,}, -{0x0F12, 0x6438,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x493F,}, -{0x0F12, 0x6388,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493E,}, -{0x0F12, 0x483F,}, -{0x0F12, 0x2504,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC7F,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493D,}, -{0x0F12, 0x483E,}, -{0x0F12, 0x2505,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A7,}, -{0x0F12, 0x483C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x493C,}, -{0x0F12, 0x2506,}, -{0x0F12, 0x1D80,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8A0,}, -{0x0F12, 0x4838,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4939,}, -{0x0F12, 0x2507,}, -{0x0F12, 0x300C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF899,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4937,}, -{0x0F12, 0x2508,}, -{0x0F12, 0x3010,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF892,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4935,}, -{0x0F12, 0x4835,}, -{0x0F12, 0x2509,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC5E,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4934,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x250A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC58,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x4833,}, -{0x0F12, 0x250B,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC52,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4932,}, -{0x0F12, 0x4832,}, -{0x0F12, 0x250C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC4C,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4931,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x250D,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC46,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x4830,}, -{0x0F12, 0x250E,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC40,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x492F,}, -{0x0F12, 0x482F,}, -{0x0F12, 0x250F,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC3A,}, -{0x0F12, 0x8626,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8660,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x64F8,}, -{0x0F12, 0x492C,}, -{0x0F12, 0x482D,}, -{0x0F12, 0x2410,}, -{0x0F12, 0x002A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC2E,}, -{0x0F12, 0x492B,}, -{0x0F12, 0x482C,}, -{0x0F12, 0x0022,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFC29,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x019C,}, -{0x0F12, 0x4EC2,}, -{0x0F12, 0x73FF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x1F90,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3CCD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE38B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3D05,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D63,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3D9F,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3E4B,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3DFF,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x00FF,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x3FC7,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x053D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A89,}, -{0x0F12, 0x6CD2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x4015,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x9E65,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4089,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x40FD,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4119,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x8F01,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x41BB,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x7F3F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4249,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x43B5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x430F,}, // End of TnP -{0x0F12, 0x7000,}, -{0x0F12, 0x4365,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA70B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4387,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x400D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBD4,}, -{0x0F12, 0x49F8,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x500C,}, -{0x0F12, 0xBC70,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x4AF3,}, -{0x0F12, 0x8992,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00D,}, -{0x0F12, 0x2300,}, -{0x0F12, 0x1A89,}, -{0x0F12, 0xD400,}, -{0x0F12, 0x000B,}, -{0x0F12, 0x0419,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x23FF,}, -{0x0F12, 0x33C1,}, -{0x0F12, 0x1810,}, -{0x0F12, 0x4298,}, -{0x0F12, 0xD800,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x0418,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4AEB,}, -{0x0F12, 0x8150,}, -{0x0F12, 0x8191,}, -{0x0F12, 0x4770,}, -{0x0F12, 0xB5F3,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xB081,}, -{0x0F12, 0x9802,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x0600,}, -{0x0F12, 0x0E00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FE4,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFBA0,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x4329,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x4331,}, -{0x0F12, 0x8079,}, -{0x0F12, 0x49DA,}, -{0x0F12, 0x8809,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD102,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB99,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x9902,}, -{0x0F12, 0x6008,}, -{0x0F12, 0xBCFE,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x9C04,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x9400,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB94,}, -{0x0F12, 0x4AD1,}, -{0x0F12, 0x8811,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD00F,}, -{0x0F12, 0x8820,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x8861,}, -{0x0F12, 0x8853,}, -{0x0F12, 0x4299,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x1E40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x8851,}, -{0x0F12, 0x8061,}, -{0x0F12, 0x4368,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x6060,}, -{0x0F12, 0xBC38,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x0015,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x3910,}, -{0x0F12, 0x408A,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4FBE,}, -{0x0F12, 0x0016,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x43A9,}, -{0x0F12, 0x8039,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x43B1,}, -{0x0F12, 0x8079,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB6D,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0x48B6,}, -{0x0F12, 0x8800,}, -{0x0F12, 0x0400,}, -{0x0F12, 0xD507,}, -{0x0F12, 0x4BB5,}, -{0x0F12, 0x7819,}, -{0x0F12, 0x4AB5,}, -{0x0F12, 0x7810,}, -{0x0F12, 0x7018,}, -{0x0F12, 0x7011,}, -{0x0F12, 0x49B4,}, -{0x0F12, 0x8188,}, -{0x0F12, 0xBCF8,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB538,}, -{0x0F12, 0x48B2,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB58,}, -{0x0F12, 0x48B1,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x69C2,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x31A8,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD008,}, -{0x0F12, 0x61C4,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x6242,}, -{0x0F12, 0x6282,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x881A,}, -{0x0F12, 0x6302,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x6342,}, -{0x0F12, 0x6A02,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x6204,}, -{0x0F12, 0x6849,}, -{0x0F12, 0x6281,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x6301,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x6341,}, -{0x0F12, 0x49A5,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x63C1,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB40,}, -{0x0F12, 0xE7A6,}, -{0x0F12, 0xB5F0,}, -{0x0F12, 0xB08B,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x49A1,}, -{0x0F12, 0x89CC,}, -{0x0F12, 0x4E9E,}, -{0x0F12, 0x6AB1,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD101,}, -{0x0F12, 0x489F,}, -{0x0F12, 0x6081,}, -{0x0F12, 0x6A70,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB37,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4A96,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x9109,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x0349,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD200,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4A92,}, -{0x0F12, 0x8211,}, -{0x0F12, 0x4D97,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x9108,}, -{0x0F12, 0x4A8B,}, -{0x0F12, 0x2303,}, -{0x0F12, 0x3222,}, -{0x0F12, 0x1F91,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB28,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x488E,}, -{0x0F12, 0x4987,}, -{0x0F12, 0x6BC2,}, -{0x0F12, 0x6AC0,}, -{0x0F12, 0x4282,}, -{0x0F12, 0xD201,}, -{0x0F12, 0x8CC8,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x88E8,}, -{0x0F12, 0x9007,}, -{0x0F12, 0x2240,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0x194B,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x3680,}, -{0x0F12, 0x8BB2,}, -{0x0F12, 0xAF04,}, -{0x0F12, 0x527A,}, -{0x0F12, 0x4A7D,}, -{0x0F12, 0x188A,}, -{0x0F12, 0x8897,}, -{0x0F12, 0x83B7,}, -{0x0F12, 0x33A0,}, -{0x0F12, 0x891F,}, -{0x0F12, 0xAE01,}, -{0x0F12, 0x5277,}, -{0x0F12, 0x8A11,}, -{0x0F12, 0x8119,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3E9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB09,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFB0F,}, -{0x0F12, 0x4F79,}, -{0x0F12, 0x37A8,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD10A,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD001,}, -{0x0F12, 0x1CC0,}, -{0x0F12, 0xD105,}, -{0x0F12, 0x4874,}, -{0x0F12, 0x8829,}, -{0x0F12, 0x3818,}, -{0x0F12, 0x6840,}, -{0x0F12, 0x4348,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x4972,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x6B89,}, -{0x0F12, 0x4288,}, -{0x0F12, 0xD300,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x6078,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x0041,}, -{0x0F12, 0xAA04,}, -{0x0F12, 0x5A53,}, -{0x0F12, 0x194A,}, -{0x0F12, 0x269C,}, -{0x0F12, 0x52B3,}, -{0x0F12, 0xAB01,}, -{0x0F12, 0x5A59,}, -{0x0F12, 0x32A0,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x2806,}, -{0x0F12, 0xD3F0,}, -{0x0F12, 0x4965,}, -{0x0F12, 0x9809,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x9808,}, -{0x0F12, 0x8028,}, -{0x0F12, 0x9807,}, -{0x0F12, 0x80E8,}, -{0x0F12, 0x1FE0,}, -{0x0F12, 0x38FD,}, -{0x0F12, 0xD13B,}, -{0x0F12, 0x4D64,}, -{0x0F12, 0x89E8,}, -{0x0F12, 0x1FC1,}, -{0x0F12, 0x39FF,}, -{0x0F12, 0xD136,}, -{0x0F12, 0x4C5F,}, -{0x0F12, 0x8AE0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFADE,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x8B20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAE2,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x6AA1,}, -{0x0F12, 0x6878,}, -{0x0F12, 0x1809,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB5,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0022,}, -{0x0F12, 0x3246,}, -{0x0F12, 0x0011,}, -{0x0F12, 0x310A,}, -{0x0F12, 0x2305,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAB2,}, -{0x0F12, 0x66E8,}, -{0x0F12, 0x6B23,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0031,}, -{0x0F12, 0x0018,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFAD3,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8518,}, -{0x0F12, 0x6EEA,}, -{0x0F12, 0x6B60,}, -{0x0F12, 0x9900,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACC,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8558,}, -{0x0F12, 0x0029,}, -{0x0F12, 0x980A,}, -{0x0F12, 0x3170,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFACD,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x3060,}, -{0x0F12, 0x8A02,}, -{0x0F12, 0x4946,}, -{0x0F12, 0x3128,}, -{0x0F12, 0x808A,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x80CA,}, -{0x0F12, 0x8A80,}, -{0x0F12, 0x8108,}, -{0x0F12, 0xB00B,}, -{0x0F12, 0xBCF0,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x2400,}, -{0x0F12, 0x4D46,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8881,}, -{0x0F12, 0x4846,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABC,}, -{0x0F12, 0x4842,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFABF,}, -{0x0F12, 0x4B42,}, -{0x0F12, 0x220D,}, -{0x0F12, 0x0712,}, -{0x0F12, 0x18A8,}, -{0x0F12, 0x8806,}, -{0x0F12, 0x00E1,}, -{0x0F12, 0x18C9,}, -{0x0F12, 0x81CE,}, -{0x0F12, 0x8846,}, -{0x0F12, 0x818E,}, -{0x0F12, 0x8886,}, -{0x0F12, 0x824E,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8208,}, -{0x0F12, 0x3508,}, -{0x0F12, 0x042D,}, -{0x0F12, 0x0C2D,}, -{0x0F12, 0x1C64,}, -{0x0F12, 0x0424,}, -{0x0F12, 0x0C24,}, -{0x0F12, 0x2C07,}, -{0x0F12, 0xD3EC,}, -{0x0F12, 0xE658,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x4834,}, -{0x0F12, 0x4C34,}, -{0x0F12, 0x88C0,}, -{0x0F12, 0x8060,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x8020,}, -{0x0F12, 0x4831,}, -{0x0F12, 0x3820,}, -{0x0F12, 0x8BC0,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA9C,}, -{0x0F12, 0x88E0,}, -{0x0F12, 0x4A31,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x4930,}, -{0x0F12, 0x8849,}, -{0x0F12, 0x2900,}, -{0x0F12, 0xD009,}, -{0x0F12, 0x2001,}, -{0x0F12, 0x03C0,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xBC10,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0x8050,}, -{0x0F12, 0x8920,}, -{0x0F12, 0x80D0,}, -{0x0F12, 0x8960,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x89A1,}, -{0x0F12, 0x0409,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x8111,}, -{0x0F12, 0x89E3,}, -{0x0F12, 0x8A24,}, -{0x0F12, 0x2B00,}, -{0x0F12, 0xD104,}, -{0x0F12, 0x17C3,}, -{0x0F12, 0x0F5B,}, -{0x0F12, 0x1818,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8090,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD1E6,}, -{0x0F12, 0x17C8,}, -{0x0F12, 0x0F40,}, -{0x0F12, 0x1840,}, -{0x0F12, 0x10C0,}, -{0x0F12, 0x8110,}, -{0x0F12, 0xE7E0,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x4919,}, -{0x0F12, 0x2204,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x8849,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA6A,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE7D2,}, -{0x0F12, 0x38D4,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17D0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x5000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x171A,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FCA,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC5,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2FC6,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2ED8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BD0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x17E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2DE8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x37E0,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1484,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA006,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0724,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xA000,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x2270,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x146C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x49C7,}, -{0x0F12, 0x2208,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x5E8A,}, -{0x0F12, 0x0140,}, -{0x0F12, 0x1A80,}, -{0x0F12, 0x0280,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA30,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE798,}, -{0x0F12, 0xB5FE,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6825,}, -{0x0F12, 0x6866,}, -{0x0F12, 0x68A0,}, -{0x0F12, 0x9001,}, -{0x0F12, 0x68E7,}, -{0x0F12, 0x1BA8,}, -{0x0F12, 0x42B5,}, -{0x0F12, 0xDA00,}, -{0x0F12, 0x1B70,}, -{0x0F12, 0x9000,}, -{0x0F12, 0x49BB,}, -{0x0F12, 0x48BC,}, -{0x0F12, 0x884A,}, -{0x0F12, 0x8843,}, -{0x0F12, 0x435A,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x0A92,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x8880,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0411,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x1409,}, -{0x0F12, 0x1400,}, -{0x0F12, 0x1A08,}, -{0x0F12, 0x49B0,}, -{0x0F12, 0x39E0,}, -{0x0F12, 0x6148,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x3040,}, -{0x0F12, 0x7880,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD103,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xFA03,}, -{0x0F12, 0x8839,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD814,}, -{0x0F12, 0x8879,}, -{0x0F12, 0x9800,}, -{0x0F12, 0x4281,}, -{0x0F12, 0xD20C,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FF,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9FB,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F7,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0029,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F2,}, -{0x0F12, 0x9801,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9F5,}, -{0x0F12, 0x6020,}, -{0x0F12, 0xE5D0,}, -{0x0F12, 0xB57C,}, -{0x0F12, 0x489A,}, -{0x0F12, 0xA901,}, -{0x0F12, 0x0004,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF979,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x88D9,}, -{0x0F12, 0x8898,}, -{0x0F12, 0x4B95,}, -{0x0F12, 0x3346,}, -{0x0F12, 0x1E9A,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9ED,}, -{0x0F12, 0x4894,}, -{0x0F12, 0x4992,}, -{0x0F12, 0x3812,}, -{0x0F12, 0x3140,}, -{0x0F12, 0x8A42,}, -{0x0F12, 0x888B,}, -{0x0F12, 0x18D2,}, -{0x0F12, 0x8242,}, -{0x0F12, 0x8AC2,}, -{0x0F12, 0x88C9,}, -{0x0F12, 0x1851,}, -{0x0F12, 0x82C1,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x4669,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF961,}, -{0x0F12, 0x488D,}, -{0x0F12, 0x214D,}, -{0x0F12, 0x8301,}, -{0x0F12, 0x2196,}, -{0x0F12, 0x8381,}, -{0x0F12, 0x211D,}, -{0x0F12, 0x3020,}, -{0x0F12, 0x8001,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9DB,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9E1,}, -{0x0F12, 0x4888,}, -{0x0F12, 0x4C88,}, -{0x0F12, 0x6E00,}, -{0x0F12, 0x60E0,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8818,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x0025,}, -{0x0F12, 0x1A40,}, -{0x0F12, 0x3540,}, -{0x0F12, 0x61A8,}, -{0x0F12, 0x487F,}, -{0x0F12, 0x9900,}, -{0x0F12, 0x3060,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF9D9,}, -{0x0F12, 0x466B,}, -{0x0F12, 0x8819,}, -{0x0F12, 0x1DE0,}, -{0x0F12, 0x30F9,}, -{0x0F12, 0x8741,}, -{0x0F12, 0x8859,}, -{0x0F12, 0x8781,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x71A0,}, -{0x0F12, 0x74A8,}, -{0x0F12, 0xBC7C,}, -{0x0F12, 0xBC08,}, -{0x0F12, 0x4718,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0005,}, -{0x0F12, 0x6808,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x684A,}, -{0x0F12, 0x0412,}, -{0x0F12, 0x0C12,}, -{0x0F12, 0x688E,}, -{0x0F12, 0x68CC,}, -{0x0F12, 0x4970,}, -{0x0F12, 0x884B,}, -{0x0F12, 0x4343,}, -{0x0F12, 0x0A98,}, -{0x0F12, 0x2304,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18C0,}, -{0x0F12, 0x02C0,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x88CB,}, -{0x0F12, 0x4353,}, -{0x0F12, 0x0A9A,}, -{0x0F12, 0x2308,}, -{0x0F12, 0x5ECB,}, -{0x0F12, 0x18D1,}, -{0x0F12, 0x02C9,}, -{0x0F12, 0x0C09,}, -{0x0F12, 0x2701,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x40AA,}, -{0x0F12, 0x9200,}, -{0x0F12, 0x002A,}, -{0x0F12, 0x3A10,}, -{0x0F12, 0x4097,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA06,}, -{0x0F12, 0x4A69,}, -{0x0F12, 0x9B00,}, -{0x0F12, 0x8812,}, -{0x0F12, 0x439A,}, -{0x0F12, 0x4B67,}, -{0x0F12, 0x801A,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x4B66,}, -{0x0F12, 0x885A,}, -{0x0F12, 0x43BA,}, -{0x0F12, 0x805A,}, -{0x0F12, 0x0023,}, -{0x0F12, 0x0032,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF981,}, -{0x0F12, 0x2D10,}, -{0x0F12, 0xDA05,}, -{0x0F12, 0x4961,}, -{0x0F12, 0x9A00,}, -{0x0F12, 0x8808,}, -{0x0F12, 0x4310,}, -{0x0F12, 0x8008,}, -{0x0F12, 0xE003,}, -{0x0F12, 0x485E,}, -{0x0F12, 0x8841,}, -{0x0F12, 0x4339,}, -{0x0F12, 0x8041,}, -{0x0F12, 0x4D5B,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x3580,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E30,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF98D,}, -{0x0F12, 0x8030,}, -{0x0F12, 0x2000,}, -{0x0F12, 0x88AA,}, -{0x0F12, 0x5E20,}, -{0x0F12, 0x2100,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF986,}, -{0x0F12, 0x8020,}, -{0x0F12, 0xE587,}, -{0x0F12, 0xB510,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF989,}, -{0x0F12, 0x4A53,}, -{0x0F12, 0x8D50,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD007,}, -{0x0F12, 0x494E,}, -{0x0F12, 0x31C0,}, -{0x0F12, 0x684B,}, -{0x0F12, 0x4950,}, -{0x0F12, 0x4283,}, -{0x0F12, 0xD202,}, -{0x0F12, 0x8D90,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE6A0,}, -{0x0F12, 0x8DD0,}, -{0x0F12, 0x81C8,}, -{0x0F12, 0xE69D,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF97E,}, -{0x0F12, 0x4D49,}, -{0x0F12, 0x8E28,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD01F,}, -{0x0F12, 0x4E49,}, -{0x0F12, 0x4844,}, -{0x0F12, 0x68B4,}, -{0x0F12, 0x6800,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD903,}, -{0x0F12, 0x1A21,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1847,}, -{0x0F12, 0xE006,}, -{0x0F12, 0x4284,}, -{0x0F12, 0xD203,}, -{0x0F12, 0x1B01,}, -{0x0F12, 0x0849,}, -{0x0F12, 0x1A47,}, -{0x0F12, 0xE000,}, -{0x0F12, 0x0027,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x493B,}, -{0x0F12, 0x3120,}, -{0x0F12, 0x7A0C,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD004,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0039,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8C3,}, -{0x0F12, 0x8668,}, -{0x0F12, 0x2C00,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x60B7,}, -{0x0F12, 0xE54D,}, -{0x0F12, 0x20FF,}, -{0x0F12, 0x1C40,}, -{0x0F12, 0x8668,}, -{0x0F12, 0xE549,}, -{0x0F12, 0xB510,}, -{0x0F12, 0x000C,}, -{0x0F12, 0x6820,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x4933,}, -{0x0F12, 0x8E0A,}, -{0x0F12, 0x2A00,}, -{0x0F12, 0xD003,}, -{0x0F12, 0x8E49,}, -{0x0F12, 0x0200,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF8AD,}, -{0x0F12, 0x6020,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0xE661,}, -{0x0F12, 0xB570,}, -{0x0F12, 0x680C,}, -{0x0F12, 0x4D2F,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x6F29,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF946,}, -{0x0F12, 0x6F69,}, -{0x0F12, 0x1D20,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF942,}, -{0x0F12, 0x4827,}, -{0x0F12, 0x8E00,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD006,}, -{0x0F12, 0x4922,}, -{0x0F12, 0x2214,}, -{0x0F12, 0x3168,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x383C,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF93F,}, -{0x0F12, 0xE488,}, -{0x0F12, 0xB5F8,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x4D24,}, -{0x0F12, 0x8B68,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD012,}, -{0x0F12, 0x4823,}, -{0x0F12, 0x8A00,}, -{0x0F12, 0x06C0,}, -{0x0F12, 0xD50E,}, -{0x0F12, 0x4822,}, -{0x0F12, 0x7800,}, -{0x0F12, 0x2800,}, -{0x0F12, 0xD00A,}, -{0x0F12, 0x481D,}, -{0x0F12, 0x6FC1,}, -{0x0F12, 0x2000,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF923,}, -{0x0F12, 0x8B28,}, -{0x0F12, 0x2201,}, -{0x0F12, 0x2180,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF92C,}, -{0x0F12, 0x8328,}, -{0x0F12, 0x2101,}, -{0x0F12, 0x000D,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x3810,}, -{0x0F12, 0x4081,}, -{0x0F12, 0x40A5,}, -{0x0F12, 0x4F11,}, -{0x0F12, 0x000E,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x43A8,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE002,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x43B0,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xF000,}, -{0x0F12, 0xF920,}, -{0x0F12, 0x2C10,}, -{0x0F12, 0xDA03,}, -{0x0F12, 0x8838,}, -{0x0F12, 0x4328,}, -{0x0F12, 0x8038,}, -{0x0F12, 0xE4EF,}, -{0x0F12, 0x8878,}, -{0x0F12, 0x4330,}, -{0x0F12, 0x8078,}, -{0x0F12, 0xE4EB,}, -{0x0F12, 0x2558,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2AB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x145E,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2698,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2BB8,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x2998,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x1100,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x4780,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xE200,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x210C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x308C,}, -{0x0F12, 0x7000,}, -{0x0F12, 0xB040,}, -{0x0F12, 0xD000,}, -{0x0F12, 0x3858,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x1789,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x16F1,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC3B1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xC36D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF6D7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xB49D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EDF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x448D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x29EC,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2EF1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEE03,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xA58B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C49,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C63,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x2DB7,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xEB3D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF061,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF0EF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x2824,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8EDD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8DCB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x8E17,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x98C5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7C7D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7E31,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7EAB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x7501,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0xF63F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x3D0B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x29BF,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xF004,}, -{0x0F12, 0xE51F,}, -{0x0F12, 0x26D8,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x306B,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4778,}, -{0x0F12, 0x46C0,}, -{0x0F12, 0xC000,}, -{0x0F12, 0xE59F,}, -{0x0F12, 0xFF1C,}, -{0x0F12, 0xE12F,}, -{0x0F12, 0x6099,}, -{0x0F12, 0x0000,},// End of Patch Data(Last : 7000449Eh) -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0B64) -// Addr : 3AF8 Size : 2914(B62h) - - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//=================================================================== -// OTP setting -//=================================================================== -{0x002A, 0x0722,}, // OTP block -{0x0F12, 0x0100,}, -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - - - - -//=================================================================== -// GAS setting (Shading) -//=================================================================== -// If OTP is used, GAS setting should be deleted. -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B -// Outdoor GAS Alpha -{0x0F12, 0x4600,}, //TVAR_ash_GASOutdoorAlpha_0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASOutdoorAlpha_3_ B -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, //REG_ANALOG_SETTING2 -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_0_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_4_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_7_ -{0x0F12, 0x0007,}, //senHal_ContPtrs_senModesDataArr_8_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_11_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_12_ -{0x0F12, 0x024E,}, //senHal_ContPtrs_senModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_15_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_16_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_19_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_20_ -{0x0F12, 0x05BA,}, //senHal_ContPtrs_senModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_23_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_24_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_31_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_32_ -{0x0F12, 0x00CF,}, //senHal_ContPtrs_senModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_35_ -{0x0F12, 0x0075,}, //senHal_ContPtrs_senModesDataArr_36_ -{0x0F12, 0x00D6,}, //senHal_ContPtrs_senModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_39_ -{0x0F12, 0x0004,}, //senHal_ContPtrs_senModesDataArr_40_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_43_ -{0x0F12, 0x00F0,}, //senHal_ContPtrs_senModesDataArr_44_ -{0x0F12, 0x01F4,}, //senHal_ContPtrs_senModesDataArr_45_ -{0x0F12, 0x029E,}, //senHal_ContPtrs_senModesDataArr_46_ -{0x0F12, 0x05B2,}, //senHal_ContPtrs_senModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_51_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_52_ -{0x0F12, 0x0228,}, //senHal_ContPtrs_senModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_57_ -{0x0F12, 0x0208,}, //senHal_ContPtrs_senModesDataArr_58_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_63_ -{0x0F12, 0x0218,}, //senHal_ContPtrs_senModesDataArr_64_ -{0x0F12, 0x0238,}, //senHal_ContPtrs_senModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senModesDataArr_71_ -{0x0F12, 0x00DE,}, //senHal_ContPtrs_senModesDataArr_72_ -{0x0F12, 0x05C0,}, //senHal_ContPtrs_senModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_75_ -{0x0F12, 0x00DF,}, //senHal_ContPtrs_senModesDataArr_76_ -{0x0F12, 0x00E4,}, //senHal_ContPtrs_senModesDataArr_77_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_78_ -{0x0F12, 0x01FD,}, //senHal_ContPtrs_senModesDataArr_79_ -{0x0F12, 0x05B6,}, //senHal_ContPtrs_senModesDataArr_80_ -{0x0F12, 0x05BB,}, //senHal_ContPtrs_senModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_93_ -{0x0F12, 0x01F8,}, //senHal_ContPtrs_senModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_96_ -{0x0F12, 0x0077,}, //senHal_ContPtrs_senModesDataArr_97_ -{0x0F12, 0x007E,}, //senHal_ContPtrs_senModesDataArr_98_ -{0x0F12, 0x024F,}, //senHal_ContPtrs_senModesDataArr_99_ -{0x0F12, 0x025E,}, //senHal_ContPtrs_senModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senModesDataArr_104_ - -{0x0F12, 0x0004,}, //senHal_ContPtrs_senAvgModesDataArr_0_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_1_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_2_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_3_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_4_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_5_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_6_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_7_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_8_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_9_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_10_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_11_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_12_ -{0x0F12, 0x0326,}, //senHal_ContPtrs_senAvgModesDataArr_13_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_14_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_15_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_16_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_17_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_18_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_19_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_20_ -{0x0F12, 0x09D5,}, //senHal_ContPtrs_senAvgModesDataArr_21_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_22_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_23_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_24_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_25_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_26_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_27_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_28_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_29_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_30_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_31_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_32_ -{0x0F12, 0x0084,}, //senHal_ContPtrs_senAvgModesDataArr_33_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_34_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_35_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_36_ -{0x0F12, 0x008D,}, //senHal_ContPtrs_senAvgModesDataArr_37_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_38_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_39_ -{0x0F12, 0x0008,}, //senHal_ContPtrs_senAvgModesDataArr_40_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_41_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_42_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_43_ -{0x0F12, 0x00AA,}, //senHal_ContPtrs_senAvgModesDataArr_44_ -{0x0F12, 0x02AA,}, //senHal_ContPtrs_senAvgModesDataArr_45_ -{0x0F12, 0x03AD,}, //senHal_ContPtrs_senAvgModesDataArr_46_ -{0x0F12, 0x09CD,}, //senHal_ContPtrs_senAvgModesDataArr_47_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_48_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_49_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_50_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_51_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_52_ -{0x0F12, 0x02DE,}, //senHal_ContPtrs_senAvgModesDataArr_53_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_54_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_55_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_56_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_57_ -{0x0F12, 0x02BE,}, //senHal_ContPtrs_senAvgModesDataArr_58_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_59_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_60_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_61_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_62_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_63_ -{0x0F12, 0x02CE,}, //senHal_ContPtrs_senAvgModesDataArr_64_ -{0x0F12, 0x02EE,}, //senHal_ContPtrs_senAvgModesDataArr_65_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_66_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_67_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_68_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_69_ -{0x0F12, 0x0001,}, //senHal_ContPtrs_senAvgModesDataArr_70_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_71_ -{0x0F12, 0x0095,}, //senHal_ContPtrs_senAvgModesDataArr_72_ -{0x0F12, 0x09DB,}, //senHal_ContPtrs_senAvgModesDataArr_73_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_74_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_75_ -{0x0F12, 0x0096,}, //senHal_ContPtrs_senAvgModesDataArr_76_ -{0x0F12, 0x009B,}, //senHal_ContPtrs_senAvgModesDataArr_77_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_78_ -{0x0F12, 0x02B3,}, //senHal_ContPtrs_senAvgModesDataArr_79_ -{0x0F12, 0x09D1,}, //senHal_ContPtrs_senAvgModesDataArr_80_ -{0x0F12, 0x09D6,}, //senHal_ContPtrs_senAvgModesDataArr_81_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_82_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_83_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_84_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_85_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_86_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_87_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_88_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_89_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_90_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_91_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_92_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_93_ -{0x0F12, 0x02AE,}, //senHal_ContPtrs_senAvgModesDataArr_94_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_95_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_96_ -{0x0F12, 0x0009,}, //senHal_ContPtrs_senAvgModesDataArr_97_ -{0x0F12, 0x0010,}, //senHal_ContPtrs_senAvgModesDataArr_98_ -{0x0F12, 0x0327,}, //senHal_ContPtrs_senAvgModesDataArr_99_ -{0x0F12, 0x0336,}, //senHal_ContPtrs_senAvgModesDataArr_100_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_101_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_102_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_103_ -{0x0F12, 0x0000,}, //senHal_ContPtrs_senAvgModesDataArr_104_ - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_ register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType -{0x0F12, 0x0000,}, //senHal_SamplingMode 0000 : 2PLA, 0001 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable, [1] HPLA enable - -{0x002A, 0x1B00,}, //Add for low lux flash from LSI -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels - -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin - -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC - -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs - -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x0010,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x0020,}, //setot_usFullXBayerOffset// - - -//=================================================================== -// 08.AF Setting -//=================================================================== - -{0x0028, 0x7000,}, // -{0x002A, 0x01FC,}, // -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio - -{0x002A, 0x01FE,}, // -{0x0F12, 0x0003,},//REG_TC_IPRM_CM_Init_AfModeType VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, // -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1 AF Enable GPIO 6 -{0x002A, 0x020C,}, // -{0x0F12, 0x2F0C,},//REG_TC_IPRM_CM_Init_Mi2cBits -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz IIC Speed -// AF Window Settings -{0x002A, 0x0294,}, // -{0x0F12, 0x0100,},//REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,},//REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,},//REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,},//REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, // LSI_Cho AF Window Center from_LSI -{0x0F12, 0x0166,},//REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, // LSI_Cho AF Fail when Size change from_LSI -{0x0F12, 0x0132,},//REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -// 2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E0,}, -{0x0F12, 0x0802,}, -// Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, -{0x0F12, 0x0098,}, -// Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xD000,}, -// AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, -{0x0F12, 0x0320,}, -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, - -{0x0F12, 0x0018,}, -{0x0F12, 0x0024,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x002C,}, -{0x0F12, 0x002E,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0088,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00B8,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00C8,}, - -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x3FF0,}, -{0x0F12, 0x03E8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00E0,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, - -//=================================================================== -// AWB setting -//=================================================================== -// AWB White Locus should be in front of REG_TC_IPRM_InitParamsUpdated // - -// AWB init Start point -{0x002A, 0x145E,}, -{0x0F12, 0x0580,},//awbb_GainsInit_0_ -{0x0F12, 0x0428,},//awbb_GainsInit_1_ -{0x0F12, 0x07B0,}, - -// White Locus -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,},//awbb_IntcR -{0x0F12, 0x0121,},//awbb_IntcB - -// Indoor Zone -{0x002A, 0x101C,}, -{0x0F12, 0x0370,}, -{0x0F12, 0x03AC,}, -{0x0F12, 0x0314,}, -{0x0F12, 0x03AE,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x0396,}, -{0x0F12, 0x0298,}, -{0x0F12, 0x0368,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x0336,}, -{0x0F12, 0x0254,}, -{0x0F12, 0x0306,}, -{0x0F12, 0x023C,}, -{0x0F12, 0x02DC,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x02BA,}, -{0x0F12, 0x0210,}, -{0x0F12, 0x02A0,}, -{0x0F12, 0x01FC,}, -{0x0F12, 0x028A,}, -{0x0F12, 0x01EE,}, -{0x0F12, 0x0274,}, -{0x0F12, 0x01E0,}, -{0x0F12, 0x025E,}, -{0x0F12, 0x01D8,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x01CC,}, -{0x0F12, 0x0238,}, -{0x0F12, 0x01C0,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x01F0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1074,}, -{0x0F12, 0x011A,}, -// Outdoor Zone -{0x002A, 0x1078,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0260,}, -{0x0F12, 0x0212,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x0262,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0206,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0218,}, -{0x0F12, 0x022C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0004,}, -{0x002A, 0x10AC,}, -{0x0F12, 0x0007,}, -{0x002A, 0x10B0,}, -{0x0F12, 0x0224,}, - - -{0x002A, 0x10B4,},//LowBr Zone -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, - - -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x0AF0,}, -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, - -// grid const -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x0347,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x1060,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x1150,}, -{0x0F12, 0x11E5,}, -{0x0F12, 0x120A,}, -{0x0F12, 0x1296,}, -{0x0F12, 0x00AB,}, -{0x0F12, 0x00BF,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0093,}, - -// Indoor Grid Offset_LYA -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFD8,}, -{0x0F12, 0xFFF0,}, -{0x0F12, 0xFFF5,}, -{0x0F12, 0xFFC9,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x0028,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFFE2,}, -{0x0F12, 0xFFDD,}, -{0x0F12, 0xFFB5,}, -{0x0F12, 0xFF51,}, -{0x0F12, 0xFDA8,}, -{0x0F12, 0xFDA8,}, - -// Outdoor Grid Offset_LYA -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, - - -//================================================================================== -// 10.Clock Setting PCLK X -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, ///*REG_TC_DBG 7F: Auto 5F:Manual */ -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,},///AFC_SmallP_MaxFrames default :2 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :2 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :2 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :2 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :2 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :2 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,},//TVAR_ae_BrAve// - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene // -{0x002A, 0x148A,}, -{0x0F12, 0x000F,},//ae_StatMode// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - - - - -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0100,}, - - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - - - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control // -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei// - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //REG_TC_FLS_Mode - -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //fls_afl_usCounter - -{0x002A, 0x17F6,}, -{0x0F12, 0x0252,}, //fls_afl_DefaultWPr //5C 54 54 -{0x0F12, 0x0252,}, //fls_afl_DefaultWPb //28 30 28 - -{0x002A, 0x1840,}, -{0x0F12, 0x0001,},//fls_afl_bFlsMode - -{0x0F12, 0x0100,},//fls_afl_FlsAFIn_0_ -{0x0F12, 0x0120,},//fls_afl_FlsAFIn_1_ -{0x0F12, 0x0180,},//fls_afl_FlsAFIn_2_ -{0x0F12, 0x0200,},//fls_afl_FlsAFIn_3_ -{0x0F12, 0x0400,},//fls_afl_FlsAFIn_4_ -{0x0F12, 0x0800,},//fls_afl_FlsAFIn_5_ -{0x0F12, 0x0A00,},//fls_afl_FlsAFIn_6_ -{0x0F12, 0x1000,},//fls_afl_FlsAFIn_7_ - -{0x0F12, 0x0100,},//fls_afl_FlsAFOut_0_ -{0x0F12, 0x00A0,},//fls_afl_FlsAFOut_1_ -{0x0F12, 0x0090,},//fls_afl_FlsAFOut_2_ -{0x0F12, 0x0080,},//fls_afl_FlsAFOut_3_ -{0x0F12, 0x0070,},//fls_afl_FlsAFOut_4_ -{0x0F12, 0x0045,},//fls_afl_FlsAFOut_5_ -{0x0F12, 0x0030,},//fls_afl_FlsAFOut_6_ -{0x0F12, 0x0010,}, //fls_afl_FlsAFOut_7_ - -{0x002A, 0x1884,}, -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_0_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_1_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_2_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_3_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_4_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_5_ -{0x0F12, 0x0100,},//fls_afl_FlsNBOut_6_ -{0x0F12, 0x0100,}, //fls_afl_FlsNBOut_7_ - -{0x002A, 0x1826,}, - -{0x0F12, 0x0100,},//fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,},//fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,},//fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,},//fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0x0F12, 0x0030,},//fls_afl_FlashWP_Lei_Thres2_0_ -{0x0F12, 0x0040,},//fls_afl_FlashWP_Lei_Thres2_1_ -{0x0F12, 0x0048,},//fls_afl_FlashWP_Lei_Thres2_2_ -{0x0F12, 0x0050,},//fls_afl_FlashWP_Lei_Thres2_3_ -{0x0F12, 0x0060,}, //fls_afl_FlashWP_Lei_Thres2_4_ - -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,},// TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x0F12, 0x0088,},// TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, - -{0x002A, 0x479C,}, - -{0x0F12, 0x0120,},//Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, - -{0x0F12, 0x003C,},// Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x002B,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - //CCM -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0125,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x017C,}, -{0x0F12, 0x0194,}, - -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM - -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pBaseCcms -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, -{0x0F12, 0x7000,}, //TVAR_wbt_pOutdoorCcm - -{0x002A, 0x4800,}, // Horizon -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -{0x0F12, 0x0208,},//TVAR_wbt_pBaseCcms[18]/* inca A */ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] /*WW*/ -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] // CW -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] // D50 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] // D65 -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - -//=================================================================== -// 16.GAMMA -//=================================================================== -//RGB Indoor Gamma -{0x002A, 0x0734,}, ///*R*/ -{0x0F12, 0x0001,}, -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,},// /*G*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, -{0x0F12, 0x0001,}, // /*B*/ -{0x0F12, 0x0003,}, -{0x0F12, 0x000F,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x00D9,}, -{0x0F12, 0x0138,}, -{0x0F12, 0x0163,}, -{0x0F12, 0x0189,}, -{0x0F12, 0x01C6,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0247,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x02B5,}, -{0x0F12, 0x030F,}, -{0x0F12, 0x035F,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x03D8,}, -{0x0F12, 0x03FF,}, - - -{0x0F12, 0x0007,},//RED -{0x0F12, 0x0012,}, -{0x0F12, 0x0020,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x0071,}, -{0x0F12, 0x00DA,}, -{0x0F12, 0x0137,}, -{0x0F12, 0x0161,}, -{0x0F12, 0x0187,}, -{0x0F12, 0x01C3,}, -{0x0F12, 0x01FE,}, -{0x0F12, 0x021B,}, -{0x0F12, 0x0245,}, -{0x0F12, 0x028C,}, -{0x0F12, 0x02CB,}, -{0x0F12, 0x0325,}, -{0x0F12, 0x0365,}, -{0x0F12, 0x039A,}, -{0x0F12, 0x03C7,}, -{0x0F12, 0x03F4,}, - -{0x0F12, 0x0005,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x006F,}, -{0x0F12, 0x00D8,}, -{0x0F12, 0x0135,}, -{0x0F12, 0x015F,}, -{0x0F12, 0x0185,}, -{0x0F12, 0x01C1,}, -{0x0F12, 0x01F3,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x024A,}, -{0x0F12, 0x0291,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x032A,}, -{0x0F12, 0x036A,}, -{0x0F12, 0x039F,}, -{0x0F12, 0x03CC,}, -{0x0F12, 0x03F9,}, - -{0x0F12, 0x0003,},//Blue -{0x0F12, 0x000E,}, -{0x0F12, 0x001C,}, -{0x0F12, 0x0034,}, -{0x0F12, 0x006D,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0133,}, -{0x0F12, 0x015D,}, -{0x0F12, 0x0183,}, -{0x0F12, 0x01BF,}, -{0x0F12, 0x01F5,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x024C,}, -{0x0F12, 0x0293,}, -{0x0F12, 0x02D2,}, -{0x0F12, 0x032C,}, -{0x0F12, 0x036C,}, -{0x0F12, 0x03A1,}, -{0x0F12, 0x03CE,}, -{0x0F12, 0x03FB,}, - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, // Noise Index setting -{0x0F12, 0x0050,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x00B0,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0196,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0245,}, ///*afit_uNoiseIndInDoor */ -{0x0F12, 0x0300,}, ///*afit_uNoiseIndInDoor */ -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, ///*afit_usGamutTh */ -{0x0F12, 0x0005,}, ///*afit_usNeargrayOffset */ -{0x0F12, 0x0000,}, ///*afit_bUseSenBpr */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_0_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_1_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_2_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_3_ */ -{0x0F12, 0x01CC,}, ///*afit_usBprThr_4_ */ -{0x0F12, 0x0180,}, ///*afit_NIContrastAFITValue */ -{0x0F12, 0x0196,}, ///*afit_NIContrastTh */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, ///* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, ///*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, ///*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, // 0000, -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x23CE,}, //70000D1A //[0]CAFITB_bnr_bypass -{0x0F12, 0xFDC8,}, //70000D1C //[0]CAFITB_bnr_bSlopenessTune -{0x0F12, 0x112E,}, //70000D1E //[0]CAFITB_ee_bReduceNegMedSh -{0x0F12, 0x93A5,}, //70000D20 //[0]CAFITB_dmsc_bDoDesat -{0x0F12, 0xFE67,}, //70000D22 //[0]CAFITB_postdmsc_bSat -{0x0F12, 0x0000,}, //70000D24 //[0]CAFITB_yuviirnr_bWideY // - - -//=================================================================== -// 18.JPEG Thumnail Setting -//=================================================================== -// JPEG Quality -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality - - -{0x0F12, 0x0001,}, //REG_TC_THUMB_Thumb_bActive // JPEG Thumnail -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth //640 -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight //480 -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format //YUV - - -{0x002A, 0x17DC,}, // JPEG setting -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode //0:continus capture frame, 1:single capture frame - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//=================================================================== -// Input Width & Height -//=================================================================== -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0006,}, -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A10,}, -{0x0F12, 0x078C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0001,}, - - -//=================================================================== -// Preview -//=================================================================== -{0x002A, 0x02A6,}, //Preview config[0] 640 480 10~30fps -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 //03E8h:10fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x02D0,}, -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0003,}, //REG_0TC_PCFG_uCaptureMirror - -//=================================================================== -// Capture -//=================================================================== -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //REG_0TC_CCFG_usWidth //2576 -{0x0F12, 0x078C,}, //REG_0TC_CCFG_usHeight //1932 -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format //5:YUV, 7:RAW, 9:JPEG -{0x0F12, 0x36B0,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask //[1]:PCLK Inversion -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize //2064d -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets //2304d //Must be multiples of 16 -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//=========================================================== -// 21.Select Cofigration Display -//=========================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0f12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged ' -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync// -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - - - - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, ///*ESD Check*/ -{0x0F12, 0xAAAA,}, -{0x0028, 0x147C,}, -{0x0F12, 0x0170,}, -{0x0028, 0x1482,}, -{0x0F12, 0x01E0,}, - - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x0570,}, // - -{0x002A, 0x04C6,}, //RGB gain changed -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x06A0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x04C0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0420,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0430,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0990,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, - - -{0x002A, 0x04BA,}, //R gain -{0x0F12, 0x05C0,}, - -{0x002A, 0x04BE,}, //G gain -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, //B gain -{0x0F12, 0x07F0,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, -{0xFFFF, 0x000A,}, /*Delay 10ms*/ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType*/ -{0x0F12, 0x0100,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x01BA,},/*REG_SF_USER_IsoVal/1BA/1CA:16.9msec/1AA: 17.8msec */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0374,},//0415LYAtest_036A/*REG_SF_IsoVal/36A/370:8.9msec/360:8.8msec/400:7.5msec*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,},/*REG_SF_USER_FlickerQuant */ -{0x0F12, 0x0001,},/*REG_SF_USER_FlickerQuantChanged */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x06F4,},//0423_0781},//06E8//0415LYAtest_06F4/*REGSFUSER_IsoVal/6F4*/ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,},/*lt_bUseSecISODgain */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x0268,},/*REG_TC_GP_PrevConfigChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, //default -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x005C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0012,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001A,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0022,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0032,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003F,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0059,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0066,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, - - -/* Sharpness 0*/ -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,},/*_ee_iLowSharpPower*/ - -/* Saturation 0*/ -{0x002A, 0x0234,}, -{0x0F12, 0x0000,},/*REG_TC_UserSaturation */ -{0x002A, 0x06B8,}, -{0x0F12, 0x452C,}, -{0x0F12, 0x0005,},/*lt_uMaxLei */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0350,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset init */ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult1 -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult1 -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult1 - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},//afit_bUseNB_Afit */ - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,},/*REG_TC_DBG_AutoAlgEnBits */ - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0000,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},/*lt_bUseSecISODgain */ - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,},/*af_search_usSingleAfFlags */ - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, /*af_pos_usTableLastInd*/ -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,},/*lt_uMaxLei */ -{0x0F12, 0x00FF,},/*lt_usMinExp */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFE0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0A78,},/*_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset*/ - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ */ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ */ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ */ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ */ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//0423_0682}, REG_0TC_PCFG_usMaxFrTimeMsecMult10 /*09C4h:4fps */ -{0x0F12, 0x014A,},/*REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps */ - -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMaxFrTimeMsecMult10 1388h:2fps */ -{0x0F12, 0x1388,},/*REG_0TC_CCFG_usMinFrTimeMsecMult10 1388h:2fps */ - -{0x002A, 0x1648,},/*af_search_usSingleAfFlags */ -{0x0F12, 0x9000,}, - -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,},/*af_pos_usTableLastInd */ -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,},/*ae_WeightTbl_16 */ -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,},//lt_uLimitHigh -{0x0F12, 0x00D0,},//lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},//afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,},//REG_SF_USER_IsoType -{0x0F12, 0x0200,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},//REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},//REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},//REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},//REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreview -{0x0F12, 0x0001,},//REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - - {0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x0377,},//037D//037F//037E//0380//0384//0374//0415LYAtest_0340 /*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -{0x002A, 0x1484,}, -{0x0F12, 0x0045,},/*TVAR_ae_BrAve */ - -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,},/*REG_SF_USER_IsoType */ -{0x0F12, 0x00D0,},/*REG_SF_USER_IsoVal */ -{0x0F12, 0x0001,},/*REG_SF_USER_IsoChanged */ -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,},/*lt_bUseSecISODgain */ - -{0x002A, 0x0234,}, -{0x0F12, 0x0030,},/*REG_TC_UserSaturation */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,},/*REG_TC_DBG_AutoAlgEnBits AWB Off */ - - -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, - -{0x002A, 0x04C6,},/*REG_SF_USER_RGBGainChanged */ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, - -// AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, // lt_uLimitHigh -{0x0F12, 0x00D4,}, // lt_uLimitLow - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},// lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ */ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ */ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},/*lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ */ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//0423_0682},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMaxFrTimeMsecMult10 // 2710h:1fps -{0x0F12, 0x2710,},// REG_0TC_CCFG_usMinFrTimeMsecMult10 // 2710h:1fps - -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, // REG_SF_USER_IsoType -{0x0F12, 0x0100,}, // REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, // REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, // lt_bUseSecISODgain - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, /*REG_TC_DBG_AutoAlgEnBits AWB Off */ - -{0x0020, 0x04BA,}, -{0x0F10, 0x04DA,}, - -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, - -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, - -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, /*REG_SF_USER_RGBGainChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -//{0x002A, 0x18AC,}, -//{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -//{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -//{0x0F12, 0x07dc,},/*senHal_uMinColsBin */ -//{0x0F12, 0x05c0,},/*senHal_uMinColsNoBin */ - - -// METERING -{0x002A, 0x1492,},// Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - - - - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2318,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x7818,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0250,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x8018,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x0A1A,}, -{0x0F12, 0x2318,}, - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,},//5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,},/*[15:8]fadlc_filter_co_b}, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,},/*senHal_uAddColsBin */ -{0x0F12, 0x0060,},/*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,},/*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,},/*senHal_uMinColsNoBin */ - - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,},/*ae_GainIn_0_ */ -{0x0F12, 0x0020,},/*ae_GainIn_1_ */ -{0x0F12, 0x0040,},/*ae_GainIn_2_ */ -{0x0F12, 0x0080,},/*ae_GainIn_3_ */ -{0x0F12, 0x0100,},/*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainIn_5_ */ -{0x0F12, 0x0400,},/*ae_GainIn_6_ */ -{0x0F12, 0x0800,},/*ae_GainIn_7_ */ -{0x0F12, 0x2000,},/*ae_GainIn_8_ */ -{0x0F12, 0x0010,},/*ae_GainOut_0_ */ -{0x0F12, 0x0020,},/*ae_GainOut_1_ */ -{0x0F12, 0x0040,},/*ae_GainOut_2_ */ -{0x0F12, 0x0080,},/*ae_GainOut_3_ */ -{0x0F12, 0x0100,},/*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,},/*ae_GainOut_5_ */ -{0x0F12, 0x0400,},/*ae_GainOut_6_ */ -{0x0F12, 0x0800,},/*ae_GainOut_7_ */ -{0x0F12, 0x2000,},/*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,},/*lt_uLimitHigh */ -{0x0F12, 0x00EF,},/*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,},/*lt_uInitPostToleranceCnt*/ - -{0x002A, 0x0582,}, -{0x0F12, 0x0000,},/*lt_uSlowFilterCoef */ - - -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,},/*TNP_Regs_BUse1FrameAE (0: off}, 1: on)*/ - - -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, - -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,},/* on/off AFIT by NB option */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor */ - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,},/*7000098C_BRIGHTNESS AFIT 0 */ -{0x0F12, 0x0000,},/*7000098E_CONTRAST */ -{0x0F12, 0x0000,},/*70000990_SATURATION */ -{0x0F12, 0x0000,},/*70000992_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000994_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000996_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000998_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*7000099A_postdmsc_iHighBright */ -{0x0F12, 0x005F,},/*7000099C_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*7000099E_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*700009A0_postdmsc_iTune */ -{0x0F12, 0x0040,},/*700009A2_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*700009A4_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*700009A6_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*700009A8_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0040,},/*700009AA_yuvemix_mPosRanges_1 */ -{0x0F12, 0x00A0,},/*700009AC_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*700009AE_bnr_edge_low */ -{0x0F12, 0x0201,},/*700009B0_bnr_repl_force */ -{0x0F12, 0x0204,},/*700009B2_bnr_iHotThreshLow */ -{0x0F12, 0x3604,},/*700009B4_bnr_iColdThreshLow */ -{0x0F12, 0x032A,},/*700009B6_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*700009B8_bnr_DISP_Limit_High */ -{0x0F12, 0x1205,},/*700009BA_bnr_iDistSigmaMax */ -{0x0F12, 0x400D,},/*700009BC_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0080,},/*700009BE_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x2080,},/*700009C0_bnr_iDirMinThres */ -{0x0F12, 0x3840,},/*700009C2_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0638,},/*700009C4_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*700009C6_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*700009C8_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*700009CA_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*700009CC_bnr_AddNoisePower1 */ -{0x0F12, 0x0400,},/*700009CE_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*700009D0_bnr_iRadialLimit */ -{0x0F12, 0x102A,},/*700009D2_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*700009D4_ee_iFSVarThHigh */ -{0x0F12, 0x0600,},/*700009D6_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*700009D8_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*700009DA_ee_iRadialPower */ -{0x0F12, 0x1802,},/*700009DC_ee_iROADThres */ -{0x0F12, 0x0000,},/*700009DE_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*700009E0_ee_iROADNeiThres */ -{0x0F12, 0x2828,},/*700009E2_ee_iSmoothEdgeThres */ -{0x0F12, 0x040F,},/*700009E4_ee_iWSharpen */ -{0x0F12, 0x0101,},/*700009E6_ee_iWShThresh */ -{0x0F12, 0x0800,},/*700009E8_ee_iEmbossCentAdd */ -{0x0F12, 0x1804,},/*700009EA_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*700009EC_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*700009EE_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*700009F0_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*700009F2_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*700009F4_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*700009F6_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0004,},/*700009F8_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*700009FA_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*700009FC_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*700009FE_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000A00_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000A02_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000A04_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000A06_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000A08_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000A0A_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000A0C_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000A0E_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1C04,},/*70000A10_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0214,},/*70000A12_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1002,},/*70000A14_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0610,},/*70000A16_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000A18_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x2318,},/*70000A1A_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000A1C_RGBGamma2_iLinearity */ -{0x0F12, 0x0350,},/*70000A1E_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000A20_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000A22_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000A24_bnr_iClustThresh_H */ -{0x0F12, 0x3141,},/*70000A26_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000A28_ee_iLowSharpPower */ -{0x0F12, 0x3140,},/*70000A2A_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000A2C_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000A2E_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000A30_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000A32_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x3601,},/*70000A34_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x242A,},/*70000A36_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x3660,},/*70000A38_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF2A,},/*70000A3A_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000A3C_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000A3E_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000A40_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000A42_BRIGHTNESS AFIT 1 */ -{0x0F12, 0x0000,},/*70000A44_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000A46_SATURATION */ -{0x0F12, 0x0000,},/*70000A48_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000A4A_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000A4C_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000A4E_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000A50_postdmsc_iHighBright */ -{0x0F12, 0x0051,},/*70000A52_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000A54_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000A56_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000A58_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000A5A_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000A5C_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000A5E_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000A60_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000A62_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000A64_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000A66_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000A68_bnr_iHotThreshLow */ -{0x0F12, 0x2404,},/*70000A6A_bnr_iColdThreshLow */ -{0x0F12, 0x031B,},/*70000A6C_bnr_DispTH_High */ -{0x0F12, 0x0103,},/*70000A6E_bnr_DISP_Limit_High */ -{0x0F12, 0x1004,},/*70000A70_bnr_iDistSigmaMax */ -{0x0F12, 0x3A0C,},/*70000A72_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0070,},/*70000A74_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1C80,},/*70000A76_bnr_iDirMinThres */ -{0x0F12, 0x3030,},/*70000A78_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0630,},/*70000A7A_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000A7C_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000A7E_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000A80_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000A82_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000A84_bnr_iRadialTune */ -{0x0F12, 0x245A,},/*70000A86_bnr_iRadialLimit */ -{0x0F12, 0x1018,},/*70000A88_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000A8A_ee_iFSVarThHigh */ -{0x0F12, 0x0B00,},/*70000A8C_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000A8E_ee_iFSVarCountTh */ -{0x0F12, 0x0505,},/*70000A90_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000A92_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000A94_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000A96_ee_iROADNeiThres */ -{0x0F12, 0x2928,},/*70000A98_ee_iSmoothEdgeThres */ -{0x0F12, 0x0415,},/*70000A9A_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000A9C_ee_iWShThresh */ -{0x0F12, 0x0800,},/*70000A9E_ee_iEmbossCentAdd */ -{0x0F12, 0x1004,},/*70000AA0_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000AA2_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000AA4_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000AA6_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000AA8_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000AAA_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000AAC_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0003,},/*70000AAE_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000AB0_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000AB2_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000AB4_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000AB6_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000AB8_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000ABA_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000ABC_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000ABE_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000AC0_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000AC2_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000AC4_yuviirnr_iVertLength_UV */ -{0x0F12, 0x1F04,},/*70000AC6_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0218,},/*70000AC8_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1102,},/*70000ACA_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0611,},/*70000ACC_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000ACE_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x7818,},/*70000AD0_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000AD2_RGBGamma2_iLinearity */ -{0x0F12, 0x0380,},/*70000AD4_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000AD6_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000AD8_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000ADA_bnr_iClustThresh_H */ -{0x0F12, 0x2832,},/*70000ADC_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000ADE_ee_iLowSharpPower */ -{0x0F12, 0x272C,},/*70000AE0_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000AE2_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000AE4_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000AE6_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000AE8_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x2401,},/*70000AEA_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x241B,},/*70000AEC_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x1E60,},/*70000AEE_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF18,},/*70000AF0_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000AF2_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000AF4_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000AF6_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000AF8_BRIGHTNESS AFIT 2 */ -{0x0F12, 0x0000,},/*70000AFA_CONTRAST */ -{0x0F12, 0xFFFB,},/*70000AFC_SATURATION */ -{0x0F12, 0x0000,},/*70000AFE_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000B00_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000B02_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000B04_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000B06_postdmsc_iHighBright */ -{0x0F12, 0x0043,},/*70000B08_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000B0A_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000B0C_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000B0E_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000B10_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000B12_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000B14_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000B16_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000B18_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000B1A_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000B1C_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000B1E_bnr_iHotThreshLow */ -{0x0F12, 0x1B04,},/*70000B20_bnr_iColdThreshLow */ -{0x0F12, 0x0312,},/*70000B22_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000B24_bnr_DISP_Limit_High */ -{0x0F12, 0x0C03,},/*70000B26_bnr_iDistSigmaMax */ -{0x0F12, 0x2806,},/*70000B28_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0060,},/*70000B2A_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1580,},/*70000B2C_bnr_iDirMinThres */ -{0x0F12, 0x2020,},/*70000B2E_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000B30_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000B32_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000B34_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000B36_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000B38_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000B3A_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000B3C_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000B3E_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000B40_ee_iFSVarThHigh */ -{0x0F12, 0x0E00,},/*70000B42_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000B44_ee_iFSVarCountTh */ -{0x0F12, 0x0504,},/*70000B46_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000B48_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000B4A_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000B4C_ee_iROADNeiThres */ -{0x0F12, 0x2B28,},/*70000B4E_ee_iSmoothEdgeThres */ -{0x0F12, 0x0417,},/*70000B50_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000B52_ee_iWShThresh */ -{0x0F12, 0x8000,},/*70000B54_ee_iEmbossCentAdd */ -{0x0F12, 0x0A04,},/*70000B56_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000B58_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000B5A_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000B5C_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000B5E_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000B60_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000B62_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000B64_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000B66_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000B68_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000B6A_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000B6C_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000B6E_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000B70_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0207,},/*70000B72_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000B74_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000B76_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000B78_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000B7A_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2404,},/*70000B7C_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0221,},/*70000B7E_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1202,},/*70000B80_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0613,},/*70000B82_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000B84_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000B86_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000B88_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000B8A_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000B8C_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000B8E_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000B90_bnr_iClustThresh_H */ -{0x0F12, 0x2630,},/*70000B92_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000B94_ee_iLowSharpPower */ -{0x0F12, 0x1616,},/*70000B96_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000B98_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000B9A_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000B9C_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000B9E_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1B01,},/*70000BA0_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x2412,},/*70000BA2_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0C60,},/*70000BA4_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0C,},/*70000BA6_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000BA8_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000BAA_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000BAC_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000BAE_BRIGHTNESS AFIT 3 */ -{0x0F12, 0x0000,},/*70000BB0_CONTRAST */ -{0x0F12, 0x0000,},/*70000BB2_SATURATION */ -{0x0F12, 0x0000,},/*70000BB4_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000BB6_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000BB8_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000BBA_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000BBC_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000BBE_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000BC0_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000BC2_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000BC4_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000BC6_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000BC8_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000BCA_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000BCC_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000BCE_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000BD0_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000BD2_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000BD4_bnr_iHotThreshLow */ -{0x0F12, 0x1504,},/*70000BD6_bnr_iColdThreshLow */ -{0x0F12, 0x030F,},/*70000BD8_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000BDA_bnr_DISP_Limit_High */ -{0x0F12, 0x0902,},/*70000BDC_bnr_iDistSigmaMax */ -{0x0F12, 0x2004,},/*70000BDE_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0050,},/*70000BE0_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x1140,},/*70000BE2_bnr_iDirMinThres */ -{0x0F12, 0x201C,},/*70000BE4_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000BE6_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000BE8_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000BEA_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000BEC_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000BEE_bnr_AddNoisePower1 */ -{0x0F12, 0x0300,},/*70000BF0_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000BF2_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000BF4_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000BF6_ee_iFSVarThHigh */ -{0x0F12, 0x1000,},/*70000BF8_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000BFA_ee_iFSVarCountTh */ -{0x0F12, 0x0503,},/*70000BFC_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000BFE_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000C00_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000C02_ee_iROADNeiThres */ -{0x0F12, 0x3028,},/*70000C04_ee_iSmoothEdgeThres */ -{0x0F12, 0x041A,},/*70000C06_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000C08_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000C0A_ee_iEmbossCentAdd */ -{0x0F12, 0x0904,},/*70000C0C_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000C0E_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000C10_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000C12_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000C14_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000C16_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000C18_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000C1A_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000C1C_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000C1E_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000C20_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000C22_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000C24_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000C26_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0206,},/*70000C28_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000C2A_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000C2C_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0305,},/*70000C2E_yuviirnr_iUVNormShift */ -{0x0F12, 0x0406,},/*70000C30_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2804,},/*70000C32_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x0228,},/*70000C34_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000C36_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000C38_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000C3A_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000C3C_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000C3E_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000C40_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000C42_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000C44_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000C46_bnr_iClustThresh_H */ -{0x0F12, 0x232B,},/*70000C48_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000C4A_ee_iLowSharpPower */ -{0x0F12, 0x1414,},/*70000C4C_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000C4E_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000C50_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000C52_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000C54_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x1501,},/*70000C56_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240F,},/*70000C58_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0A60,},/*70000C5A_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF0A,},/*70000C5C_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000C5E_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000C60_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000C62_bnr_nClustLevel_C */ -{0x0F12, 0x0000,},/*70000C64_BRIGHTNESS AFIT 4 */ -{0x0F12, 0x0000,},/*70000C66_CONTRAST */ -{0x0F12, 0x0000,},/*70000C68_SATURATION */ -{0x0F12, 0x0000,},/*70000C6A_SHARP_BLUR */ -{0x0F12, 0x0000,},/*70000C6C_GLAMOUR */ -{0x0F12, 0x00C0,},/*70000C6E_bnr_edge_high */ -{0x0F12, 0x0064,},/*70000C70_postdmsc_iLowBright */ -{0x0F12, 0x0384,},/*70000C72_postdmsc_iHighBright */ -{0x0F12, 0x0032,},/*70000C74_postdmsc_iLowSat */ -{0x0F12, 0x01F4,},/*70000C76_postdmsc_iHighSat */ -{0x0F12, 0x0070,},/*70000C78_postdmsc_iTune */ -{0x0F12, 0x0040,},/*70000C7A_yuvemix_mNegRanges_0 */ -{0x0F12, 0x00A0,},/*70000C7C_yuvemix_mNegRanges_1 */ -{0x0F12, 0x0100,},/*70000C7E_yuvemix_mNegRanges_2 */ -{0x0F12, 0x0010,},/*70000C80_yuvemix_mPosRanges_0 */ -{0x0F12, 0x0060,},/*70000C82_yuvemix_mPosRanges_1 */ -{0x0F12, 0x0100,},/*70000C84_yuvemix_mPosRanges_2 */ -{0x0F12, 0x1430,},/*70000C86_bnr_edge_low */ -{0x0F12, 0x0201,},/*70000C88_bnr_repl_force */ -{0x0F12, 0x0204,},/*70000C8A_bnr_iHotThreshLow */ -{0x0F12, 0x0F04,},/*70000C8C_bnr_iColdThreshLow */ -{0x0F12, 0x030C,},/*70000C8E_bnr_DispTH_High */ -{0x0F12, 0x0003,},/*70000C90_bnr_DISP_Limit_High */ -{0x0F12, 0x0602,},/*70000C92_bnr_iDistSigmaMax */ -{0x0F12, 0x1803,},/*70000C94_bnr_iDiffSigmaHigh */ -{0x0F12, 0x0040,},/*70000C96_bnr_iNormalizedSTD_Limit */ -{0x0F12, 0x0E20,},/*70000C98_bnr_iDirMinThres */ -{0x0F12, 0x2018,},/*70000C9A_bnr_iDirFltDiffThresLow */ -{0x0F12, 0x0620,},/*70000C9C_bnr_iDirSmoothPowerLow */ -{0x0F12, 0x0306,},/*70000C9E_bnr_iHighMaxSlopeAllowed */ -{0x0F12, 0x2003,},/*70000CA0_bnr_iHighSlopeThresh */ -{0x0F12, 0xFF01,},/*70000CA2_bnr_iSlopeBlurStrength */ -{0x0F12, 0x0000,},/*70000CA4_bnr_AddNoisePower1 */ -{0x0F12, 0x0200,},/*70000CA6_bnr_iRadialTune */ -{0x0F12, 0x145A,},/*70000CA8_bnr_iRadialLimit */ -{0x0F12, 0x1010,},/*70000CAA_ee_iFSMagThHigh */ -{0x0F12, 0x000B,},/*70000CAC_ee_iFSVarThHigh */ -{0x0F12, 0x1200,},/*70000CAE_ee_iFSThHigh */ -{0x0F12, 0x5A0F,},/*70000CB0_ee_iFSVarCountTh */ -{0x0F12, 0x0502,},/*70000CB2_ee_iRadialPower */ -{0x0F12, 0x1802,},/*70000CB4_ee_iROADThres */ -{0x0F12, 0x0000,},/*70000CB6_ee_iROADSubMaxNR */ -{0x0F12, 0x2006,},/*70000CB8_ee_iROADNeiThres */ -{0x0F12, 0x4028,},/*70000CBA_ee_iSmoothEdgeThres */ -{0x0F12, 0x0430,},/*70000CBC_ee_iWSharpen */ -{0x0F12, 0x0101,},/*70000CBE_ee_iWShThresh */ -{0x0F12, 0xFF00,},/*70000CC0_ee_iEmbossCentAdd */ -{0x0F12, 0x0804,},/*70000CC2_ee_iReduceEdgeThresh */ -{0x0F12, 0x4008,},/*70000CC4_dmsc_iDesatThresh */ -{0x0F12, 0x0540,},/*70000CC6_dmsc_iDemBlurLow */ -{0x0F12, 0x8006,},/*70000CC8_dmsc_iDecisionThresh */ -{0x0F12, 0x0020,},/*70000CCA_dmsc_iMonochrom */ -{0x0F12, 0x0000,},/*70000CCC_dmsc_iGRDenoiseVal */ -{0x0F12, 0x1800,},/*70000CCE_dmsc_iEdgeDesatThrLow */ -{0x0F12, 0x0002,},/*70000CD0_dmsc_iNearGrayDesat */ -{0x0F12, 0x1E10,},/*70000CD2_postdmsc_iBCoeff */ -{0x0F12, 0x000B,},/*70000CD4_postdmsc_iWideMult */ -{0x0F12, 0x0607,},/*70000CD6_yuvemix_mNegSlopes_1 */ -{0x0F12, 0x0005,},/*70000CD8_yuvemix_mNegSlopes_3 */ -{0x0F12, 0x0607,},/*70000CDA_yuvemix_mPosSlopes_1 */ -{0x0F12, 0x0405,},/*70000CDC_yuvemix_mPosSlopes_3 */ -{0x0F12, 0x0205,},/*70000CDE_yuviirnr_iXSupportUV */ -{0x0F12, 0x0304,},/*70000CE0_yuviirnr_iHighYNorm */ -{0x0F12, 0x0409,},/*70000CE2_yuviirnr_iHighUVNorm */ -{0x0F12, 0x0306,},/*70000CE4_yuviirnr_iUVNormShift */ -{0x0F12, 0x0407,},/*70000CE6_yuviirnr_iVertLength_UV */ -{0x0F12, 0x2C04,},/*70000CE8_yuviirnr_iDiffThreshH_Y */ -{0x0F12, 0x022C,},/*70000CEA_yuviirnr_iDiffThreshH_UV */ -{0x0F12, 0x1402,},/*70000CEC_yuviirnr_iMaxThreshH_Y */ -{0x0F12, 0x0618,},/*70000CEE_yuviirnr_iMaxThreshH_UV */ -{0x0F12, 0x1A02,},/*70000CF0_yuviirnr_iYNRStrengthH */ -{0x0F12, 0x8018,},/*70000CF2_yuviirnr_iUVNRStrengthH */ -{0x0F12, 0x0080,},/*70000CF4_RGBGamma2_iLinearity */ -{0x0F12, 0x0080,},/*70000CF6_ccm_oscar_iSaturation */ -{0x0F12, 0x0180,},/*70000CF8_RGB2YUV_iRGBGain */ -{0x0F12, 0x0A0A,},/*70000CFA_bnr_iClustMulT_H */ -{0x0F12, 0x0101,},/*70000CFC_bnr_iClustThresh_H */ -{0x0F12, 0x1114,},/*70000CFE_bnr_iDenThreshLow */ -{0x0F12, 0x6024,},/*70000D00_ee_iLowSharpPower */ -{0x0F12, 0x1212,},/*70000D02_ee_iLowShDenoise */ -{0x0F12, 0xFFFF,},/*70000D04_ee_iLowSharpClamp */ -{0x0F12, 0x0808,},/*70000D06_ee_iReduceEdgeMinMult */ -{0x0F12, 0x0A01,},/*70000D08_bnr_nClustLevel_H_Bin */ -{0x0F12, 0x010A,},/*70000D0A_bnr_iClustMulT_C_Bin */ -{0x0F12, 0x0F01,},/*70000D0C_bnr_iClustThresh_C_Bin */ -{0x0F12, 0x240C,},/*70000D0E_bnr_iDenThreshHigh_Bin */ -{0x0F12, 0x0860,},/*70000D10_ee_iHighSharpPower_Bin */ -{0x0F12, 0xFF08,},/*70000D12_ee_iHighShDenoise_Bin */ -{0x0F12, 0x08FF,},/*70000D14_ee_iHighSharpClamp_Bin */ -{0x0F12, 0x0008,},/*70000D16_ee_iReduceEdgeSlope_Bin */ -{0x0F12, 0x0001,},/*70000D18_bnr_nClustLevel_C */ - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,},/*lt_ExpGain_ExpCurveGainMaxStr*/ - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,},/*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,},/*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,},//REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,},/*#REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_CapConfigChanged */ -#if 0 -{0x002A, 0x023E,}, -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,},/*#REG_TC_GP_EnablePreviewChanged */ -#endif -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1500,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xF132,}, -{0x0F12, 0x0006,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0000,}, // 110404 AE haunting -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - - -#if !defined(FLICKER_DEFAULT) -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_60hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0001,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_50hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; -#endif - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_640_480[]= -{ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //senHal_uMinColsBin -{0x0F12, 0x06C8,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, //REG_0TC_PCFG_usWidth //640 -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usHeight //480 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_720[]={ -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, - -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x07DC,}, /*senHal_uMinColsBin */ -{0x0F12, 0x05C0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, /*REG_TC_GP_PrevReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_GP_PrevReqInputHeight //1536 */ -{0x0F12, 0x0010,}, /*REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2*/ -{0x0F12, 0x00FC,}, /*REG_TC_GP_PrevInputHeightOfs/(1944-1536)/2*/ -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, /*REG_TC_PZOOM_PrevZoomReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_PZOOM_PrevZoomReqInputHeight //1536 */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x02D0,}, /*REG_0TC_PCFG_usHeight //720 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_960[]={ -{0xFCFC, 0xD000,}, - -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, - -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ - -{0x002A, 0x0494,}, -{0x0F12, 0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x03C0,}, /*REG_0TC_PCFG_usHeight //960 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_stop_stream[]={ -{0x0028, 0x7000,}, -{0x002A, 0x023E,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /*REG_TC_GP_EnablePreviewChanged */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_j1x.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_j1x.h deleted file mode 100755 index 0161eddb683d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_regs_j1x.h +++ /dev/null @@ -1,6217 +0,0 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -#ifndef __S5K4ECGX_REGS_H__ -#define __S5K4ECGX_REGS_H__ - -static struct msm_camera_i2c_reg_conf s5k4ecgx_init_regs[] = { -{0xFCFC, 0xD000,}, -{0x0010, 0x0001,}, //S/W Reset -{0x1030, 0x0000,}, //contint_host_int -{0x0014, 0x0001,}, //sw_load_complete - Release CORE (Arm) from reset state - -{0xFFFF, 0x000A,}, //p10 //Delay 10ms - -{0xFCFC, 0xD000,}, -//================================================================================== -//02.ETC Setting -//================================================================================== - -{0x0028, 0xD000,}, //Driving Current -{0x002A, 0x1082,}, -{0x0F12, 0x0000,}, //cregs_d0_d4_cd10 //D4[9:8], D3[7:6], D2[5:4], D1[3:2], D0[1:0] -{0x002A, 0x1084,}, -{0x0F12, 0x0000,}, //cregs_d5_d9_cd10 //D9[9:8], D8[7:6], D7[5:4], D6[3:2], D5[1:0] -{0x002A, 0x1086,}, -{0x0F12, 0x0000,}, //gpio_cd10 -{0x002A, 0x1088,}, -{0x0F12, 0x0000,}, //cregs_clks_output_cd10 //SDA[11:10], SCL[9:8], PCLK[7:6], VSYNC[3:2], HSYNC[1:0] -{0x002A, 0x100E,}, -{0x0F12, 0x0000,}, //pclk_delay_r - -//================================================================================== -// 03.Analog Setting1 & ASP Control -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future - -{0x0028, 0xD000,}, -{0x002A, 0x007A,}, //config_clk_setting -{0x0F12, 0x0000,}, -{0x002A, 0xE406,}, //[7]f_ladlc_en [6:5]f max [4]fadlc_en [3:2]L max [1]ladlc_en [0]adlc_ch_sel -{0x0F12, 0x0082,}, //Fadlc_disable -{0x002A, 0xE410,}, -{0x0F12, 0x3804,}, //[15:8]fadlc_filter_co_b, [7:0]fadlc_filter_co_a -{0x002A, 0xE41A,}, -{0x0F12, 0x0010,}, //adlc_ptune_total -{0x002A, 0xF132,}, -{0x0F12, 0x0200,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0200,}, //110404 AE haunting - from_LSI -{0x002A, 0xE420,}, -{0x0F12, 0x0003,}, //adlc_fadlc_filter_refresh -{0x0F12, 0x0060,}, //adlc_filter_level_diff_threshold -{0x002A, 0xE42E,}, -{0x0F12, 0x0004,}, //dithered l-ADLC(4bit) -{0x002A, 0xF400,}, -{0x0F12, 0x5A3C,}, //[15:8]stx_width, [7:0]dstx_width -{0x0F12, 0x0023,}, //[14]binning_test [13]gain_mode [11:12]row_id [10]cfpn_test [9]pd_pix [8]teg_en, [7]adc_res, [6]smp_en, [5]ldb_en, [4]ld_en, [3]clp_en [2]srx_en, [1]dshut_en, [0]dcds_en -{0x0F12, 0x8080,}, //CDS option -{0x0F12, 0x03AF,}, //[11:6]rst_mx, [5:0]sig_mx -{0x0F12, 0x000A,}, //Avg mode -{0x0F12, 0xAA54,}, //x1~x1.49:No MS, x1.5~x3.99:MS2, x4~x16:MS4 -{0x0F12, 0x0040,}, //RMP option [6]1: RES gain -{0x0F12, 0x464E,}, //[14]msoff_en, [13:8]off_rst, [7:0]adc_sat -{0x0F12, 0x0240,}, //bist_sig_width_e -{0x0F12, 0x0240,}, //bist_sig_width_o -{0x0F12, 0x0040,}, //[9]dbs_bist_en, [8:0]bist_rst_width -{0x0F12, 0x1000,}, //[15]aac_en, [14]GCLK_DIV2_EN, [13:10]dl_cont [9:8]dbs_mode, [7:0]dbs_option -{0x0F12, 0x55FF,}, //bias [15:12]pix, [11:8]pix_bst [7:4]comp2, [3:0]comp1 -{0x0F12, 0xD000,}, //[15:8]clp_lvl, [7:0]ref_option, [5]pix_bst_en -{0x0F12, 0x0010,}, //[7:0]monit -{0x0F12, 0x0202,}, //[15:8]dbr_tune_tgsl, [7:0]dbr_tune_pix -{0x0F12, 0x0401,}, //[15:8]dbr_tune_ntg, [7:0]dbr_tune_rg -{0x0F12, 0x0022,}, //[15:8]reg_option, [7:4]rosc_tune_ncp, [3:0]rosc_tune_cp -{0x0F12, 0x0088,}, //PD [8]inrush_ctrl, [7]fblv, [6]reg_ntg, [5]reg_tgsl, [4]reg_rg, [3]reg_pix, [2]ncp_rosc, [1]cp_rosc, [0]cp -{0x0F12, 0x009F,}, //[9]capa_ctrl_en, [8:7]fb_lv, [6:5]dbr_clk_sel, [4:0]cp_capa -{0x0F12, 0x0000,}, //[15:0]blst_en_cintr -{0x0F12, 0x1800,}, //[11]blst_en, [10]rfpn_test, [9]sl_off, [8]tx_off, [7:0]rdv_option -{0x0F12, 0x0088,}, //[15:0]pmg_reg_tune -{0x0F12, 0x0000,}, //[15:1]analog_dummy, [0]pd_reg_test -{0x0F12, 0x2428,}, //[13:11]srx_gap1, [10:8]srx_gap0, [7:0]stx_gap -{0x0F12, 0x0000,}, //[0]atx_option -{0x0F12, 0x03EE,}, //aig_avg_half -{0x0F12, 0x0000,}, //[0]hvs_test_reg -{0x0F12, 0x0000,}, //[0]dbus_bist_auto -{0x0F12, 0x0000,}, //[7:0]dbr_option -{0x002A, 0xF552,}, -{0x0F12, 0x0708,}, //[7:0]lat_st, [15:8]lat_width -{0x0F12, 0x080C,}, //[7:0]hold_st, [15:8]hold_width - -//================================================================================= -// 04.Trap and Patch -//================================================================================= -// Start of Patch data - -{0x0028, 0x7000,}, -{0x002A, 0x3AF8,}, -{0x0F12, 0xB5F8,}, // 70003AF8 -{0x0F12, 0x4B44,}, // 70003AFA -{0x0F12, 0x4944,}, // 70003AFC -{0x0F12, 0x4845,}, // 70003AFE -{0x0F12, 0x2200,}, // 70003B00 -{0x0F12, 0xC008,}, // 70003B02 -{0x0F12, 0x6001,}, // 70003B04 -{0x0F12, 0x4944,}, // 70003B06 -{0x0F12, 0x4844,}, // 70003B08 -{0x0F12, 0x2401,}, // 70003B0A -{0x0F12, 0xF000,}, // 70003B0C -{0x0F12, 0xFCA4,}, // 70003B0E -{0x0F12, 0x4943,}, // 70003B10 -{0x0F12, 0x4844,}, // 70003B12 -{0x0F12, 0x2702,}, // 70003B14 -{0x0F12, 0x0022,}, // 70003B16 -{0x0F12, 0xF000,}, // 70003B18 -{0x0F12, 0xFC9E,}, // 70003B1A -{0x0F12, 0x0260,}, // 70003B1C -{0x0F12, 0x4C42,}, // 70003B1E -{0x0F12, 0x8020,}, // 70003B20 -{0x0F12, 0x2600,}, // 70003B22 -{0x0F12, 0x8066,}, // 70003B24 -{0x0F12, 0x4941,}, // 70003B26 -{0x0F12, 0x4841,}, // 70003B28 -{0x0F12, 0x6041,}, // 70003B2A -{0x0F12, 0x4941,}, // 70003B2C -{0x0F12, 0x4842,}, // 70003B2E -{0x0F12, 0x003A,}, // 70003B30 -{0x0F12, 0x2503,}, // 70003B32 -{0x0F12, 0xF000,}, // 70003B34 -{0x0F12, 0xFC90,}, // 70003B36 -{0x0F12, 0x483D,}, // 70003B38 -{0x0F12, 0x4940,}, // 70003B3A -{0x0F12, 0x30C0,}, // 70003B3C -{0x0F12, 0x63C1,}, // 70003B3E -{0x0F12, 0x4F3B,}, // 70003B40 -{0x0F12, 0x483F,}, // 70003B42 -{0x0F12, 0x3F80,}, // 70003B44 -{0x0F12, 0x6438,}, // 70003B46 -{0x0F12, 0x483E,}, // 70003B48 -{0x0F12, 0x493F,}, // 70003B4A -{0x0F12, 0x6388,}, // 70003B4C -{0x0F12, 0x002A,}, // 70003B4E -{0x0F12, 0x493E,}, // 70003B50 -{0x0F12, 0x483F,}, // 70003B52 -{0x0F12, 0x2504,}, // 70003B54 -{0x0F12, 0xF000,}, // 70003B56 -{0x0F12, 0xFC7F,}, // 70003B58 -{0x0F12, 0x002A,}, // 70003B5A -{0x0F12, 0x493D,}, // 70003B5C -{0x0F12, 0x483E,}, // 70003B5E -{0x0F12, 0x2505,}, // 70003B60 -{0x0F12, 0xF000,}, // 70003B62 -{0x0F12, 0xF8A7,}, // 70003B64 -{0x0F12, 0x483C,}, // 70003B66 -{0x0F12, 0x002A,}, // 70003B68 -{0x0F12, 0x493C,}, // 70003B6A -{0x0F12, 0x2506,}, // 70003B6C -{0x0F12, 0x1D80,}, // 70003B6E -{0x0F12, 0xF000,}, // 70003B70 -{0x0F12, 0xF8A0,}, // 70003B72 -{0x0F12, 0x4838,}, // 70003B74 -{0x0F12, 0x002A,}, // 70003B76 -{0x0F12, 0x4939,}, // 70003B78 -{0x0F12, 0x2507,}, // 70003B7A -{0x0F12, 0x300C,}, // 70003B7C -{0x0F12, 0xF000,}, // 70003B7E -{0x0F12, 0xF899,}, // 70003B80 -{0x0F12, 0x4835,}, // 70003B82 -{0x0F12, 0x002A,}, // 70003B84 -{0x0F12, 0x4937,}, // 70003B86 -{0x0F12, 0x2508,}, // 70003B88 -{0x0F12, 0x3010,}, // 70003B8A -{0x0F12, 0xF000,}, // 70003B8C -{0x0F12, 0xF892,}, // 70003B8E -{0x0F12, 0x002A,}, // 70003B90 -{0x0F12, 0x4935,}, // 70003B92 -{0x0F12, 0x4835,}, // 70003B94 -{0x0F12, 0x2509,}, // 70003B96 -{0x0F12, 0xF000,}, // 70003B98 -{0x0F12, 0xFC5E,}, // 70003B9A -{0x0F12, 0x002A,}, // 70003B9C -{0x0F12, 0x4934,}, // 70003B9E -{0x0F12, 0x4834,}, // 70003BA0 -{0x0F12, 0x250A,}, // 70003BA2 -{0x0F12, 0xF000,}, // 70003BA4 -{0x0F12, 0xFC58,}, // 70003BA6 -{0x0F12, 0x002A,}, // 70003BA8 -{0x0F12, 0x4933,}, // 70003BAA -{0x0F12, 0x4833,}, // 70003BAC -{0x0F12, 0x250B,}, // 70003BAE -{0x0F12, 0xF000,}, // 70003BB0 -{0x0F12, 0xFC52,}, // 70003BB2 -{0x0F12, 0x002A,}, // 70003BB4 -{0x0F12, 0x4932,}, // 70003BB6 -{0x0F12, 0x4832,}, // 70003BB8 -{0x0F12, 0x250C,}, // 70003BBA -{0x0F12, 0xF000,}, // 70003BBC -{0x0F12, 0xFC4C,}, // 70003BBE -{0x0F12, 0x002A,}, // 70003BC0 -{0x0F12, 0x4931,}, // 70003BC2 -{0x0F12, 0x4831,}, // 70003BC4 -{0x0F12, 0x250D,}, // 70003BC6 -{0x0F12, 0xF000,}, // 70003BC8 -{0x0F12, 0xFC46,}, // 70003BCA -{0x0F12, 0x002A,}, // 70003BCC -{0x0F12, 0x4930,}, // 70003BCE -{0x0F12, 0x4830,}, // 70003BD0 -{0x0F12, 0x250E,}, // 70003BD2 -{0x0F12, 0xF000,}, // 70003BD4 -{0x0F12, 0xFC40,}, // 70003BD6 -{0x0F12, 0x002A,}, // 70003BD8 -{0x0F12, 0x492F,}, // 70003BDA -{0x0F12, 0x482F,}, // 70003BDC -{0x0F12, 0x250F,}, // 70003BDE -{0x0F12, 0xF000,}, // 70003BE0 -{0x0F12, 0xFC3A,}, // 70003BE2 -{0x0F12, 0x8626,}, // 70003BE4 -{0x0F12, 0x20FF,}, // 70003BE6 -{0x0F12, 0x1C40,}, // 70003BE8 -{0x0F12, 0x8660,}, // 70003BEA -{0x0F12, 0x482C,}, // 70003BEC -{0x0F12, 0x64F8,}, // 70003BEE -{0x0F12, 0x492C,}, // 70003BF0 -{0x0F12, 0x482D,}, // 70003BF2 -{0x0F12, 0x2410,}, // 70003BF4 -{0x0F12, 0x002A,}, // 70003BF6 -{0x0F12, 0xF000,}, // 70003BF8 -{0x0F12, 0xFC2E,}, // 70003BFA -{0x0F12, 0x492B,}, // 70003BFC -{0x0F12, 0x482C,}, // 70003BFE -{0x0F12, 0x0022,}, // 70003C00 -{0x0F12, 0xF000,}, // 70003C02 -{0x0F12, 0xFC29,}, // 70003C04 -{0x0F12, 0xBCF8,}, // 70003C06 -{0x0F12, 0xBC08,}, // 70003C08 -{0x0F12, 0x4718,}, // 70003C0A -{0x0F12, 0x019C,}, // 70003C0C -{0x0F12, 0x4EC2,}, // 70003C0E -{0x0F12, 0x73FF,}, // 70003C10 -{0x0F12, 0x0000,}, // 70003C12 -{0x0F12, 0x1F90,}, // 70003C14 -{0x0F12, 0x7000,}, // 70003C16 -{0x0F12, 0x3CCD,}, // 70003C18 -{0x0F12, 0x7000,}, // 70003C1A -{0x0F12, 0xE38B,}, // 70003C1C -{0x0F12, 0x0000,}, // 70003C1E -{0x0F12, 0x3D05,}, // 70003C20 -{0x0F12, 0x7000,}, // 70003C22 -{0x0F12, 0xC3B1,}, // 70003C24 -{0x0F12, 0x0000,}, // 70003C26 -{0x0F12, 0x4780,}, // 70003C28 -{0x0F12, 0x7000,}, // 70003C2A -{0x0F12, 0x3D63,}, // 70003C2C -{0x0F12, 0x7000,}, // 70003C2E -{0x0F12, 0x0080,}, // 70003C30 -{0x0F12, 0x7000,}, // 70003C32 -{0x0F12, 0x3D9F,}, // 70003C34 -{0x0F12, 0x7000,}, // 70003C36 -{0x0F12, 0xB49D,}, // 70003C38 -{0x0F12, 0x0000,}, // 70003C3A -{0x0F12, 0x3E4B,}, // 70003C3C -{0x0F12, 0x7000,}, // 70003C3E -{0x0F12, 0x3DFF,}, // 70003C40 -{0x0F12, 0x7000,}, // 70003C42 -{0x0F12, 0xFFFF,}, // 70003C44 -{0x0F12, 0x00FF,}, // 70003C46 -{0x0F12, 0x17E0,}, // 70003C48 -{0x0F12, 0x7000,}, // 70003C4A -{0x0F12, 0x3FC7,}, // 70003C4C -{0x0F12, 0x7000,}, // 70003C4E -{0x0F12, 0x053D,}, // 70003C50 -{0x0F12, 0x0000,}, // 70003C52 -{0x0F12, 0x0000,}, // 70003C54 -{0x0F12, 0x0A89,}, // 70003C56 -{0x0F12, 0x6CD2,}, // 70003C58 -{0x0F12, 0x0000,}, // 70003C5A -{0x0F12, 0x02C9,}, // 70003C5C -{0x0F12, 0x0000,}, // 70003C5E -{0x0F12, 0x0000,}, // 70003C60 -{0x0F12, 0x0A9A,}, // 70003C62 -{0x0F12, 0x0000,}, // 70003C64 -{0x0F12, 0x02D2,}, // 70003C66 -{0x0F12, 0x4015,}, // 70003C68 -{0x0F12, 0x7000,}, // 70003C6A -{0x0F12, 0x9E65,}, // 70003C6C -{0x0F12, 0x0000,}, // 70003C6E -{0x0F12, 0x4089,}, // 70003C70 -{0x0F12, 0x7000,}, // 70003C72 -{0x0F12, 0x7C49,}, // 70003C74 -{0x0F12, 0x0000,}, // 70003C76 -{0x0F12, 0x40FD,}, // 70003C78 -{0x0F12, 0x7000,}, // 70003C7A -{0x0F12, 0x7C63,}, // 70003C7C -{0x0F12, 0x0000,}, // 70003C7E -{0x0F12, 0x4119,}, // 70003C80 -{0x0F12, 0x7000,}, // 70003C82 -{0x0F12, 0x8F01,}, // 70003C84 -{0x0F12, 0x0000,}, // 70003C86 -{0x0F12, 0x41BB,}, // 70003C88 -{0x0F12, 0x7000,}, // 70003C8A -{0x0F12, 0x7F3F,}, // 70003C8C -{0x0F12, 0x0000,}, // 70003C8E -{0x0F12, 0x4249,}, // 70003C90 -{0x0F12, 0x7000,}, // 70003C92 -{0x0F12, 0x98C5,}, // 70003C94 -{0x0F12, 0x0000,}, // 70003C96 -{0x0F12, 0x43B5,}, // 70003C98 -{0x0F12, 0x7000,}, // 70003C9A -{0x0F12, 0x6099,}, // 70003C9C -{0x0F12, 0x0000,}, // 70003C9E -{0x0F12, 0x430F,}, // 70003CA0 -{0x0F12, 0x7000,}, // 70003CA2 -{0x0F12, 0x4365,}, // 70003CA4 -{0x0F12, 0x7000,}, // 70003CA6 -{0x0F12, 0xA70B,}, // 70003CA8 -{0x0F12, 0x0000,}, // 70003CAA -{0x0F12, 0x4387,}, // 70003CAC -{0x0F12, 0x7000,}, // 70003CAE -{0x0F12, 0x400D,}, // 70003CB0 -{0x0F12, 0x0000,}, // 70003CB2 -{0x0F12, 0xB570,}, // 70003CB4 -{0x0F12, 0x000C,}, // 70003CB6 -{0x0F12, 0x0015,}, // 70003CB8 -{0x0F12, 0x0029,}, // 70003CBA -{0x0F12, 0xF000,}, // 70003CBC -{0x0F12, 0xFBD4,}, // 70003CBE -{0x0F12, 0x49F8,}, // 70003CC0 -{0x0F12, 0x00A8,}, // 70003CC2 -{0x0F12, 0x500C,}, // 70003CC4 -{0x0F12, 0xBC70,}, // 70003CC6 -{0x0F12, 0xBC08,}, // 70003CC8 -{0x0F12, 0x4718,}, // 70003CCA -{0x0F12, 0x6808,}, // 70003CCC -{0x0F12, 0x0400,}, // 70003CCE -{0x0F12, 0x0C00,}, // 70003CD0 -{0x0F12, 0x6849,}, // 70003CD2 -{0x0F12, 0x0409,}, // 70003CD4 -{0x0F12, 0x0C09,}, // 70003CD6 -{0x0F12, 0x4AF3,}, // 70003CD8 -{0x0F12, 0x8992,}, // 70003CDA -{0x0F12, 0x2A00,}, // 70003CDC -{0x0F12, 0xD00D,}, // 70003CDE -{0x0F12, 0x2300,}, // 70003CE0 -{0x0F12, 0x1A89,}, // 70003CE2 -{0x0F12, 0xD400,}, // 70003CE4 -{0x0F12, 0x000B,}, // 70003CE6 -{0x0F12, 0x0419,}, // 70003CE8 -{0x0F12, 0x0C09,}, // 70003CEA -{0x0F12, 0x23FF,}, // 70003CEC -{0x0F12, 0x33C1,}, // 70003CEE -{0x0F12, 0x1810,}, // 70003CF0 -{0x0F12, 0x4298,}, // 70003CF2 -{0x0F12, 0xD800,}, // 70003CF4 -{0x0F12, 0x0003,}, // 70003CF6 -{0x0F12, 0x0418,}, // 70003CF8 -{0x0F12, 0x0C00,}, // 70003CFA -{0x0F12, 0x4AEB,}, // 70003CFC -{0x0F12, 0x8150,}, // 70003CFE -{0x0F12, 0x8191,}, // 70003D00 -{0x0F12, 0x4770,}, // 70003D02 -{0x0F12, 0xB5F3,}, // 70003D04 -{0x0F12, 0x0004,}, // 70003D06 -{0x0F12, 0xB081,}, // 70003D08 -{0x0F12, 0x9802,}, // 70003D0A -{0x0F12, 0x6800,}, // 70003D0C -{0x0F12, 0x0600,}, // 70003D0E -{0x0F12, 0x0E00,}, // 70003D10 -{0x0F12, 0x2201,}, // 70003D12 -{0x0F12, 0x0015,}, // 70003D14 -{0x0F12, 0x0021,}, // 70003D16 -{0x0F12, 0x3910,}, // 70003D18 -{0x0F12, 0x408A,}, // 70003D1A -{0x0F12, 0x40A5,}, // 70003D1C -{0x0F12, 0x4FE4,}, // 70003D1E -{0x0F12, 0x0016,}, // 70003D20 -{0x0F12, 0x2C10,}, // 70003D22 -{0x0F12, 0xDA03,}, // 70003D24 -{0x0F12, 0x8839,}, // 70003D26 -{0x0F12, 0x43A9,}, // 70003D28 -{0x0F12, 0x8039,}, // 70003D2A -{0x0F12, 0xE002,}, // 70003D2C -{0x0F12, 0x8879,}, // 70003D2E -{0x0F12, 0x43B1,}, // 70003D30 -{0x0F12, 0x8079,}, // 70003D32 -{0x0F12, 0xF000,}, // 70003D34 -{0x0F12, 0xFBA0,}, // 70003D36 -{0x0F12, 0x2C10,}, // 70003D38 -{0x0F12, 0xDA03,}, // 70003D3A -{0x0F12, 0x8839,}, // 70003D3C -{0x0F12, 0x4329,}, // 70003D3E -{0x0F12, 0x8039,}, // 70003D40 -{0x0F12, 0xE002,}, // 70003D42 -{0x0F12, 0x8879,}, // 70003D44 -{0x0F12, 0x4331,}, // 70003D46 -{0x0F12, 0x8079,}, // 70003D48 -{0x0F12, 0x49DA,}, // 70003D4A -{0x0F12, 0x8809,}, // 70003D4C -{0x0F12, 0x2900,}, // 70003D4E -{0x0F12, 0xD102,}, // 70003D50 -{0x0F12, 0xF000,}, // 70003D52 -{0x0F12, 0xFB99,}, // 70003D54 -{0x0F12, 0x2000,}, // 70003D56 -{0x0F12, 0x9902,}, // 70003D58 -{0x0F12, 0x6008,}, // 70003D5A -{0x0F12, 0xBCFE,}, // 70003D5C -{0x0F12, 0xBC08,}, // 70003D5E -{0x0F12, 0x4718,}, // 70003D60 -{0x0F12, 0xB538,}, // 70003D62 -{0x0F12, 0x9C04,}, // 70003D64 -{0x0F12, 0x0015,}, // 70003D66 -{0x0F12, 0x002A,}, // 70003D68 -{0x0F12, 0x9400,}, // 70003D6A -{0x0F12, 0xF000,}, // 70003D6C -{0x0F12, 0xFB94,}, // 70003D6E -{0x0F12, 0x4AD1,}, // 70003D70 -{0x0F12, 0x8811,}, // 70003D72 -{0x0F12, 0x2900,}, // 70003D74 -{0x0F12, 0xD00F,}, // 70003D76 -{0x0F12, 0x8820,}, // 70003D78 -{0x0F12, 0x4281,}, // 70003D7A -{0x0F12, 0xD20C,}, // 70003D7C -{0x0F12, 0x8861,}, // 70003D7E -{0x0F12, 0x8853,}, // 70003D80 -{0x0F12, 0x4299,}, // 70003D82 -{0x0F12, 0xD200,}, // 70003D84 -{0x0F12, 0x1E40,}, // 70003D86 -{0x0F12, 0x0400,}, // 70003D88 -{0x0F12, 0x0C00,}, // 70003D8A -{0x0F12, 0x8020,}, // 70003D8C -{0x0F12, 0x8851,}, // 70003D8E -{0x0F12, 0x8061,}, // 70003D90 -{0x0F12, 0x4368,}, // 70003D92 -{0x0F12, 0x1840,}, // 70003D94 -{0x0F12, 0x6060,}, // 70003D96 -{0x0F12, 0xBC38,}, // 70003D98 -{0x0F12, 0xBC08,}, // 70003D9A -{0x0F12, 0x4718,}, // 70003D9C -{0x0F12, 0xB5F8,}, // 70003D9E -{0x0F12, 0x0004,}, // 70003DA0 -{0x0F12, 0x6808,}, // 70003DA2 -{0x0F12, 0x0400,}, // 70003DA4 -{0x0F12, 0x0C00,}, // 70003DA6 -{0x0F12, 0x2201,}, // 70003DA8 -{0x0F12, 0x0015,}, // 70003DAA -{0x0F12, 0x0021,}, // 70003DAC -{0x0F12, 0x3910,}, // 70003DAE -{0x0F12, 0x408A,}, // 70003DB0 -{0x0F12, 0x40A5,}, // 70003DB2 -{0x0F12, 0x4FBE,}, // 70003DB4 -{0x0F12, 0x0016,}, // 70003DB6 -{0x0F12, 0x2C10,}, // 70003DB8 -{0x0F12, 0xDA03,}, // 70003DBA -{0x0F12, 0x8839,}, // 70003DBC -{0x0F12, 0x43A9,}, // 70003DBE -{0x0F12, 0x8039,}, // 70003DC0 -{0x0F12, 0xE002,}, // 70003DC2 -{0x0F12, 0x8879,}, // 70003DC4 -{0x0F12, 0x43B1,}, // 70003DC6 -{0x0F12, 0x8079,}, // 70003DC8 -{0x0F12, 0xF000,}, // 70003DCA -{0x0F12, 0xFB6D,}, // 70003DCC -{0x0F12, 0x2C10,}, // 70003DCE -{0x0F12, 0xDA03,}, // 70003DD0 -{0x0F12, 0x8838,}, // 70003DD2 -{0x0F12, 0x4328,}, // 70003DD4 -{0x0F12, 0x8038,}, // 70003DD6 -{0x0F12, 0xE002,}, // 70003DD8 -{0x0F12, 0x8878,}, // 70003DDA -{0x0F12, 0x4330,}, // 70003DDC -{0x0F12, 0x8078,}, // 70003DDE -{0x0F12, 0x48B6,}, // 70003DE0 -{0x0F12, 0x8800,}, // 70003DE2 -{0x0F12, 0x0400,}, // 70003DE4 -{0x0F12, 0xD507,}, // 70003DE6 -{0x0F12, 0x4BB5,}, // 70003DE8 -{0x0F12, 0x7819,}, // 70003DEA -{0x0F12, 0x4AB5,}, // 70003DEC -{0x0F12, 0x7810,}, // 70003DEE -{0x0F12, 0x7018,}, // 70003DF0 -{0x0F12, 0x7011,}, // 70003DF2 -{0x0F12, 0x49B4,}, // 70003DF4 -{0x0F12, 0x8188,}, // 70003DF6 -{0x0F12, 0xBCF8,}, // 70003DF8 -{0x0F12, 0xBC08,}, // 70003DFA -{0x0F12, 0x4718,}, // 70003DFC -{0x0F12, 0xB538,}, // 70003DFE -{0x0F12, 0x48B2,}, // 70003E00 -{0x0F12, 0x4669,}, // 70003E02 -{0x0F12, 0xF000,}, // 70003E04 -{0x0F12, 0xFB58,}, // 70003E06 -{0x0F12, 0x48B1,}, // 70003E08 -{0x0F12, 0x49B0,}, // 70003E0A -{0x0F12, 0x69C2,}, // 70003E0C -{0x0F12, 0x2400,}, // 70003E0E -{0x0F12, 0x31A8,}, // 70003E10 -{0x0F12, 0x2A00,}, // 70003E12 -{0x0F12, 0xD008,}, // 70003E14 -{0x0F12, 0x61C4,}, // 70003E16 -{0x0F12, 0x684A,}, // 70003E18 -{0x0F12, 0x6242,}, // 70003E1A -{0x0F12, 0x6282,}, // 70003E1C -{0x0F12, 0x466B,}, // 70003E1E -{0x0F12, 0x881A,}, // 70003E20 -{0x0F12, 0x6302,}, // 70003E22 -{0x0F12, 0x885A,}, // 70003E24 -{0x0F12, 0x6342,}, // 70003E26 -{0x0F12, 0x6A02,}, // 70003E28 -{0x0F12, 0x2A00,}, // 70003E2A -{0x0F12, 0xD00A,}, // 70003E2C -{0x0F12, 0x6204,}, // 70003E2E -{0x0F12, 0x6849,}, // 70003E30 -{0x0F12, 0x6281,}, // 70003E32 -{0x0F12, 0x466B,}, // 70003E34 -{0x0F12, 0x8819,}, // 70003E36 -{0x0F12, 0x6301,}, // 70003E38 -{0x0F12, 0x8859,}, // 70003E3A -{0x0F12, 0x6341,}, // 70003E3C -{0x0F12, 0x49A5,}, // 70003E3E -{0x0F12, 0x88C9,}, // 70003E40 -{0x0F12, 0x63C1,}, // 70003E42 -{0x0F12, 0xF000,}, // 70003E44 -{0x0F12, 0xFB40,}, // 70003E46 -{0x0F12, 0xE7A6,}, // 70003E48 -{0x0F12, 0xB5F0,}, // 70003E4A -{0x0F12, 0xB08B,}, // 70003E4C -{0x0F12, 0x20FF,}, // 70003E4E -{0x0F12, 0x1C40,}, // 70003E50 -{0x0F12, 0x49A1,}, // 70003E52 -{0x0F12, 0x89CC,}, // 70003E54 -{0x0F12, 0x4E9E,}, // 70003E56 -{0x0F12, 0x6AB1,}, // 70003E58 -{0x0F12, 0x4284,}, // 70003E5A -{0x0F12, 0xD101,}, // 70003E5C -{0x0F12, 0x489F,}, // 70003E5E -{0x0F12, 0x6081,}, // 70003E60 -{0x0F12, 0x6A70,}, // 70003E62 -{0x0F12, 0x0200,}, // 70003E64 -{0x0F12, 0xF000,}, // 70003E66 -{0x0F12, 0xFB37,}, // 70003E68 -{0x0F12, 0x0400,}, // 70003E6A -{0x0F12, 0x0C00,}, // 70003E6C -{0x0F12, 0x4A96,}, // 70003E6E -{0x0F12, 0x8A11,}, // 70003E70 -{0x0F12, 0x9109,}, // 70003E72 -{0x0F12, 0x2101,}, // 70003E74 -{0x0F12, 0x0349,}, // 70003E76 -{0x0F12, 0x4288,}, // 70003E78 -{0x0F12, 0xD200,}, // 70003E7A -{0x0F12, 0x0001,}, // 70003E7C -{0x0F12, 0x4A92,}, // 70003E7E -{0x0F12, 0x8211,}, // 70003E80 -{0x0F12, 0x4D97,}, // 70003E82 -{0x0F12, 0x8829,}, // 70003E84 -{0x0F12, 0x9108,}, // 70003E86 -{0x0F12, 0x4A8B,}, // 70003E88 -{0x0F12, 0x2303,}, // 70003E8A -{0x0F12, 0x3222,}, // 70003E8C -{0x0F12, 0x1F91,}, // 70003E8E -{0x0F12, 0xF000,}, // 70003E90 -{0x0F12, 0xFB28,}, // 70003E92 -{0x0F12, 0x8028,}, // 70003E94 -{0x0F12, 0x488E,}, // 70003E96 -{0x0F12, 0x4987,}, // 70003E98 -{0x0F12, 0x6BC2,}, // 70003E9A -{0x0F12, 0x6AC0,}, // 70003E9C -{0x0F12, 0x4282,}, // 70003E9E -{0x0F12, 0xD201,}, // 70003EA0 -{0x0F12, 0x8CC8,}, // 70003EA2 -{0x0F12, 0x8028,}, // 70003EA4 -{0x0F12, 0x88E8,}, // 70003EA6 -{0x0F12, 0x9007,}, // 70003EA8 -{0x0F12, 0x2240,}, // 70003EAA -{0x0F12, 0x4310,}, // 70003EAC -{0x0F12, 0x80E8,}, // 70003EAE -{0x0F12, 0x2000,}, // 70003EB0 -{0x0F12, 0x0041,}, // 70003EB2 -{0x0F12, 0x194B,}, // 70003EB4 -{0x0F12, 0x001E,}, // 70003EB6 -{0x0F12, 0x3680,}, // 70003EB8 -{0x0F12, 0x8BB2,}, // 70003EBA -{0x0F12, 0xAF04,}, // 70003EBC -{0x0F12, 0x527A,}, // 70003EBE -{0x0F12, 0x4A7D,}, // 70003EC0 -{0x0F12, 0x188A,}, // 70003EC2 -{0x0F12, 0x8897,}, // 70003EC4 -{0x0F12, 0x83B7,}, // 70003EC6 -{0x0F12, 0x33A0,}, // 70003EC8 -{0x0F12, 0x891F,}, // 70003ECA -{0x0F12, 0xAE01,}, // 70003ECC -{0x0F12, 0x5277,}, // 70003ECE -{0x0F12, 0x8A11,}, // 70003ED0 -{0x0F12, 0x8119,}, // 70003ED2 -{0x0F12, 0x1C40,}, // 70003ED4 -{0x0F12, 0x0400,}, // 70003ED6 -{0x0F12, 0x0C00,}, // 70003ED8 -{0x0F12, 0x2806,}, // 70003EDA -{0x0F12, 0xD3E9,}, // 70003EDC -{0x0F12, 0xF000,}, // 70003EDE -{0x0F12, 0xFB09,}, // 70003EE0 -{0x0F12, 0xF000,}, // 70003EE2 -{0x0F12, 0xFB0F,}, // 70003EE4 -{0x0F12, 0x4F79,}, // 70003EE6 -{0x0F12, 0x37A8,}, // 70003EE8 -{0x0F12, 0x2800,}, // 70003EEA -{0x0F12, 0xD10A,}, // 70003EEC -{0x0F12, 0x1FE0,}, // 70003EEE -{0x0F12, 0x38FD,}, // 70003EF0 -{0x0F12, 0xD001,}, // 70003EF2 -{0x0F12, 0x1CC0,}, // 70003EF4 -{0x0F12, 0xD105,}, // 70003EF6 -{0x0F12, 0x4874,}, // 70003EF8 -{0x0F12, 0x8829,}, // 70003EFA -{0x0F12, 0x3818,}, // 70003EFC -{0x0F12, 0x6840,}, // 70003EFE -{0x0F12, 0x4348,}, // 70003F00 -{0x0F12, 0x6078,}, // 70003F02 -{0x0F12, 0x4972,}, // 70003F04 -{0x0F12, 0x6878,}, // 70003F06 -{0x0F12, 0x6B89,}, // 70003F08 -{0x0F12, 0x4288,}, // 70003F0A -{0x0F12, 0xD300,}, // 70003F0C -{0x0F12, 0x0008,}, // 70003F0E -{0x0F12, 0x6078,}, // 70003F10 -{0x0F12, 0x2000,}, // 70003F12 -{0x0F12, 0x0041,}, // 70003F14 -{0x0F12, 0xAA04,}, // 70003F16 -{0x0F12, 0x5A53,}, // 70003F18 -{0x0F12, 0x194A,}, // 70003F1A -{0x0F12, 0x269C,}, // 70003F1C -{0x0F12, 0x52B3,}, // 70003F1E -{0x0F12, 0xAB01,}, // 70003F20 -{0x0F12, 0x5A59,}, // 70003F22 -{0x0F12, 0x32A0,}, // 70003F24 -{0x0F12, 0x8111,}, // 70003F26 -{0x0F12, 0x1C40,}, // 70003F28 -{0x0F12, 0x0400,}, // 70003F2A -{0x0F12, 0x0C00,}, // 70003F2C -{0x0F12, 0x2806,}, // 70003F2E -{0x0F12, 0xD3F0,}, // 70003F30 -{0x0F12, 0x4965,}, // 70003F32 -{0x0F12, 0x9809,}, // 70003F34 -{0x0F12, 0x8208,}, // 70003F36 -{0x0F12, 0x9808,}, // 70003F38 -{0x0F12, 0x8028,}, // 70003F3A -{0x0F12, 0x9807,}, // 70003F3C -{0x0F12, 0x80E8,}, // 70003F3E -{0x0F12, 0x1FE0,}, // 70003F40 -{0x0F12, 0x38FD,}, // 70003F42 -{0x0F12, 0xD13B,}, // 70003F44 -{0x0F12, 0x4D64,}, // 70003F46 -{0x0F12, 0x89E8,}, // 70003F48 -{0x0F12, 0x1FC1,}, // 70003F4A -{0x0F12, 0x39FF,}, // 70003F4C -{0x0F12, 0xD136,}, // 70003F4E -{0x0F12, 0x4C5F,}, // 70003F50 -{0x0F12, 0x8AE0,}, // 70003F52 -{0x0F12, 0xF000,}, // 70003F54 -{0x0F12, 0xFADE,}, // 70003F56 -{0x0F12, 0x0006,}, // 70003F58 -{0x0F12, 0x8B20,}, // 70003F5A -{0x0F12, 0xF000,}, // 70003F5C -{0x0F12, 0xFAE2,}, // 70003F5E -{0x0F12, 0x9000,}, // 70003F60 -{0x0F12, 0x6AA1,}, // 70003F62 -{0x0F12, 0x6878,}, // 70003F64 -{0x0F12, 0x1809,}, // 70003F66 -{0x0F12, 0x0200,}, // 70003F68 -{0x0F12, 0xF000,}, // 70003F6A -{0x0F12, 0xFAB5,}, // 70003F6C -{0x0F12, 0x0400,}, // 70003F6E -{0x0F12, 0x0C00,}, // 70003F70 -{0x0F12, 0x0022,}, // 70003F72 -{0x0F12, 0x3246,}, // 70003F74 -{0x0F12, 0x0011,}, // 70003F76 -{0x0F12, 0x310A,}, // 70003F78 -{0x0F12, 0x2305,}, // 70003F7A -{0x0F12, 0xF000,}, // 70003F7C -{0x0F12, 0xFAB2,}, // 70003F7E -{0x0F12, 0x66E8,}, // 70003F80 -{0x0F12, 0x6B23,}, // 70003F82 -{0x0F12, 0x0002,}, // 70003F84 -{0x0F12, 0x0031,}, // 70003F86 -{0x0F12, 0x0018,}, // 70003F88 -{0x0F12, 0xF000,}, // 70003F8A -{0x0F12, 0xFAD3,}, // 70003F8C -{0x0F12, 0x466B,}, // 70003F8E -{0x0F12, 0x8518,}, // 70003F90 -{0x0F12, 0x6EEA,}, // 70003F92 -{0x0F12, 0x6B60,}, // 70003F94 -{0x0F12, 0x9900,}, // 70003F96 -{0x0F12, 0xF000,}, // 70003F98 -{0x0F12, 0xFACC,}, // 70003F9A -{0x0F12, 0x466B,}, // 70003F9C -{0x0F12, 0x8558,}, // 70003F9E -{0x0F12, 0x0029,}, // 70003FA0 -{0x0F12, 0x980A,}, // 70003FA2 -{0x0F12, 0x3170,}, // 70003FA4 -{0x0F12, 0xF000,}, // 70003FA6 -{0x0F12, 0xFACD,}, // 70003FA8 -{0x0F12, 0x0028,}, // 70003FAA -{0x0F12, 0x3060,}, // 70003FAC -{0x0F12, 0x8A02,}, // 70003FAE -{0x0F12, 0x4946,}, // 70003FB0 -{0x0F12, 0x3128,}, // 70003FB2 -{0x0F12, 0x808A,}, // 70003FB4 -{0x0F12, 0x8A42,}, // 70003FB6 -{0x0F12, 0x80CA,}, // 70003FB8 -{0x0F12, 0x8A80,}, // 70003FBA -{0x0F12, 0x8108,}, // 70003FBC -{0x0F12, 0xB00B,}, // 70003FBE -{0x0F12, 0xBCF0,}, // 70003FC0 -{0x0F12, 0xBC08,}, // 70003FC2 -{0x0F12, 0x4718,}, // 70003FC4 -{0x0F12, 0xB570,}, // 70003FC6 -{0x0F12, 0x2400,}, // 70003FC8 -{0x0F12, 0x4D46,}, // 70003FCA -{0x0F12, 0x4846,}, // 70003FCC -{0x0F12, 0x8881,}, // 70003FCE -{0x0F12, 0x4846,}, // 70003FD0 -{0x0F12, 0x8041,}, // 70003FD2 -{0x0F12, 0x2101,}, // 70003FD4 -{0x0F12, 0x8001,}, // 70003FD6 -{0x0F12, 0xF000,}, // 70003FD8 -{0x0F12, 0xFABC,}, // 70003FDA -{0x0F12, 0x4842,}, // 70003FDC -{0x0F12, 0x3820,}, // 70003FDE -{0x0F12, 0x8BC0,}, // 70003FE0 -{0x0F12, 0xF000,}, // 70003FE2 -{0x0F12, 0xFABF,}, // 70003FE4 -{0x0F12, 0x4B42,}, // 70003FE6 -{0x0F12, 0x220D,}, // 70003FE8 -{0x0F12, 0x0712,}, // 70003FEA -{0x0F12, 0x18A8,}, // 70003FEC -{0x0F12, 0x8806,}, // 70003FEE -{0x0F12, 0x00E1,}, // 70003FF0 -{0x0F12, 0x18C9,}, // 70003FF2 -{0x0F12, 0x81CE,}, // 70003FF4 -{0x0F12, 0x8846,}, // 70003FF6 -{0x0F12, 0x818E,}, // 70003FF8 -{0x0F12, 0x8886,}, // 70003FFA -{0x0F12, 0x824E,}, // 70003FFC -{0x0F12, 0x88C0,}, // 70003FFE -{0x0F12, 0x8208,}, // 70004000 -{0x0F12, 0x3508,}, // 70004002 -{0x0F12, 0x042D,}, // 70004004 -{0x0F12, 0x0C2D,}, // 70004006 -{0x0F12, 0x1C64,}, // 70004008 -{0x0F12, 0x0424,}, // 7000400A -{0x0F12, 0x0C24,}, // 7000400C -{0x0F12, 0x2C07,}, // 7000400E -{0x0F12, 0xD3EC,}, // 70004010 -{0x0F12, 0xE658,}, // 70004012 -{0x0F12, 0xB510,}, // 70004014 -{0x0F12, 0x4834,}, // 70004016 -{0x0F12, 0x4C34,}, // 70004018 -{0x0F12, 0x88C0,}, // 7000401A -{0x0F12, 0x8060,}, // 7000401C -{0x0F12, 0x2001,}, // 7000401E -{0x0F12, 0x8020,}, // 70004020 -{0x0F12, 0x4831,}, // 70004022 -{0x0F12, 0x3820,}, // 70004024 -{0x0F12, 0x8BC0,}, // 70004026 -{0x0F12, 0xF000,}, // 70004028 -{0x0F12, 0xFA9C,}, // 7000402A -{0x0F12, 0x88E0,}, // 7000402C -{0x0F12, 0x4A31,}, // 7000402E -{0x0F12, 0x2800,}, // 70004030 -{0x0F12, 0xD003,}, // 70004032 -{0x0F12, 0x4930,}, // 70004034 -{0x0F12, 0x8849,}, // 70004036 -{0x0F12, 0x2900,}, // 70004038 -{0x0F12, 0xD009,}, // 7000403A -{0x0F12, 0x2001,}, // 7000403C -{0x0F12, 0x03C0,}, // 7000403E -{0x0F12, 0x8050,}, // 70004040 -{0x0F12, 0x80D0,}, // 70004042 -{0x0F12, 0x2000,}, // 70004044 -{0x0F12, 0x8090,}, // 70004046 -{0x0F12, 0x8110,}, // 70004048 -{0x0F12, 0xBC10,}, // 7000404A -{0x0F12, 0xBC08,}, // 7000404C -{0x0F12, 0x4718,}, // 7000404E -{0x0F12, 0x8050,}, // 70004050 -{0x0F12, 0x8920,}, // 70004052 -{0x0F12, 0x80D0,}, // 70004054 -{0x0F12, 0x8960,}, // 70004056 -{0x0F12, 0x0400,}, // 70004058 -{0x0F12, 0x1400,}, // 7000405A -{0x0F12, 0x8090,}, // 7000405C -{0x0F12, 0x89A1,}, // 7000405E -{0x0F12, 0x0409,}, // 70004060 -{0x0F12, 0x1409,}, // 70004062 -{0x0F12, 0x8111,}, // 70004064 -{0x0F12, 0x89E3,}, // 70004066 -{0x0F12, 0x8A24,}, // 70004068 -{0x0F12, 0x2B00,}, // 7000406A -{0x0F12, 0xD104,}, // 7000406C -{0x0F12, 0x17C3,}, // 7000406E -{0x0F12, 0x0F5B,}, // 70004070 -{0x0F12, 0x1818,}, // 70004072 -{0x0F12, 0x10C0,}, // 70004074 -{0x0F12, 0x8090,}, // 70004076 -{0x0F12, 0x2C00,}, // 70004078 -{0x0F12, 0xD1E6,}, // 7000407A -{0x0F12, 0x17C8,}, // 7000407C -{0x0F12, 0x0F40,}, // 7000407E -{0x0F12, 0x1840,}, // 70004080 -{0x0F12, 0x10C0,}, // 70004082 -{0x0F12, 0x8110,}, // 70004084 -{0x0F12, 0xE7E0,}, // 70004086 -{0x0F12, 0xB510,}, // 70004088 -{0x0F12, 0x000C,}, // 7000408A -{0x0F12, 0x4919,}, // 7000408C -{0x0F12, 0x2204,}, // 7000408E -{0x0F12, 0x6820,}, // 70004090 -{0x0F12, 0x5E8A,}, // 70004092 -{0x0F12, 0x0140,}, // 70004094 -{0x0F12, 0x1A80,}, // 70004096 -{0x0F12, 0x0280,}, // 70004098 -{0x0F12, 0x8849,}, // 7000409A -{0x0F12, 0xF000,}, // 7000409C -{0x0F12, 0xFA6A,}, // 7000409E -{0x0F12, 0x6020,}, // 700040A0 -{0x0F12, 0xE7D2,}, // 700040A2 -{0x0F12, 0x38D4,}, // 700040A4 -{0x0F12, 0x7000,}, // 700040A6 -{0x0F12, 0x17D0,}, // 700040A8 -{0x0F12, 0x7000,}, // 700040AA -{0x0F12, 0x5000,}, // 700040AC -{0x0F12, 0xD000,}, // 700040AE -{0x0F12, 0x1100,}, // 700040B0 -{0x0F12, 0xD000,}, // 700040B2 -{0x0F12, 0x171A,}, // 700040B4 -{0x0F12, 0x7000,}, // 700040B6 -{0x0F12, 0x4780,}, // 700040B8 -{0x0F12, 0x7000,}, // 700040BA -{0x0F12, 0x2FCA,}, // 700040BC -{0x0F12, 0x7000,}, // 700040BE -{0x0F12, 0x2FC5,}, // 700040C0 -{0x0F12, 0x7000,}, // 700040C2 -{0x0F12, 0x2FC6,}, // 700040C4 -{0x0F12, 0x7000,}, // 700040C6 -{0x0F12, 0x2ED8,}, // 700040C8 -{0x0F12, 0x7000,}, // 700040CA -{0x0F12, 0x2BD0,}, // 700040CC -{0x0F12, 0x7000,}, // 700040CE -{0x0F12, 0x17E0,}, // 700040D0 -{0x0F12, 0x7000,}, // 700040D2 -{0x0F12, 0x2DE8,}, // 700040D4 -{0x0F12, 0x7000,}, // 700040D6 -{0x0F12, 0x37E0,}, // 700040D8 -{0x0F12, 0x7000,}, // 700040DA -{0x0F12, 0x210C,}, // 700040DC -{0x0F12, 0x7000,}, // 700040DE -{0x0F12, 0x1484,}, // 700040E0 -{0x0F12, 0x7000,}, // 700040E2 -{0x0F12, 0xA006,}, // 700040E4 -{0x0F12, 0x0000,}, // 700040E6 -{0x0F12, 0x0724,}, // 700040E8 -{0x0F12, 0x7000,}, // 700040EA -{0x0F12, 0xA000,}, // 700040EC -{0x0F12, 0xD000,}, // 700040EE -{0x0F12, 0x2270,}, // 700040F0 -{0x0F12, 0x7000,}, // 700040F2 -{0x0F12, 0x2558,}, // 700040F4 -{0x0F12, 0x7000,}, // 700040F6 -{0x0F12, 0x146C,}, // 700040F8 -{0x0F12, 0x7000,}, // 700040FA -{0x0F12, 0xB510,}, // 700040FC -{0x0F12, 0x000C,}, // 700040FE -{0x0F12, 0x49C7,}, // 70004100 -{0x0F12, 0x2208,}, // 70004102 -{0x0F12, 0x6820,}, // 70004104 -{0x0F12, 0x5E8A,}, // 70004106 -{0x0F12, 0x0140,}, // 70004108 -{0x0F12, 0x1A80,}, // 7000410A -{0x0F12, 0x0280,}, // 7000410C -{0x0F12, 0x88C9,}, // 7000410E -{0x0F12, 0xF000,}, // 70004110 -{0x0F12, 0xFA30,}, // 70004112 -{0x0F12, 0x6020,}, // 70004114 -{0x0F12, 0xE798,}, // 70004116 -{0x0F12, 0xB5FE,}, // 70004118 -{0x0F12, 0x000C,}, // 7000411A -{0x0F12, 0x6825,}, // 7000411C -{0x0F12, 0x6866,}, // 7000411E -{0x0F12, 0x68A0,}, // 70004120 -{0x0F12, 0x9001,}, // 70004122 -{0x0F12, 0x68E7,}, // 70004124 -{0x0F12, 0x1BA8,}, // 70004126 -{0x0F12, 0x42B5,}, // 70004128 -{0x0F12, 0xDA00,}, // 7000412A -{0x0F12, 0x1B70,}, // 7000412C -{0x0F12, 0x9000,}, // 7000412E -{0x0F12, 0x49BB,}, // 70004130 -{0x0F12, 0x48BC,}, // 70004132 -{0x0F12, 0x884A,}, // 70004134 -{0x0F12, 0x8843,}, // 70004136 -{0x0F12, 0x435A,}, // 70004138 -{0x0F12, 0x2304,}, // 7000413A -{0x0F12, 0x5ECB,}, // 7000413C -{0x0F12, 0x0A92,}, // 7000413E -{0x0F12, 0x18D2,}, // 70004140 -{0x0F12, 0x02D2,}, // 70004142 -{0x0F12, 0x0C12,}, // 70004144 -{0x0F12, 0x88CB,}, // 70004146 -{0x0F12, 0x8880,}, // 70004148 -{0x0F12, 0x4343,}, // 7000414A -{0x0F12, 0x0A98,}, // 7000414C -{0x0F12, 0x2308,}, // 7000414E -{0x0F12, 0x5ECB,}, // 70004150 -{0x0F12, 0x18C0,}, // 70004152 -{0x0F12, 0x02C0,}, // 70004154 -{0x0F12, 0x0C00,}, // 70004156 -{0x0F12, 0x0411,}, // 70004158 -{0x0F12, 0x0400,}, // 7000415A -{0x0F12, 0x1409,}, // 7000415C -{0x0F12, 0x1400,}, // 7000415E -{0x0F12, 0x1A08,}, // 70004160 -{0x0F12, 0x49B0,}, // 70004162 -{0x0F12, 0x39E0,}, // 70004164 -{0x0F12, 0x6148,}, // 70004166 -{0x0F12, 0x9801,}, // 70004168 -{0x0F12, 0x3040,}, // 7000416A -{0x0F12, 0x7880,}, // 7000416C -{0x0F12, 0x2800,}, // 7000416E -{0x0F12, 0xD103,}, // 70004170 -{0x0F12, 0x9801,}, // 70004172 -{0x0F12, 0x0029,}, // 70004174 -{0x0F12, 0xF000,}, // 70004176 -{0x0F12, 0xFA03,}, // 70004178 -{0x0F12, 0x8839,}, // 7000417A -{0x0F12, 0x9800,}, // 7000417C -{0x0F12, 0x4281,}, // 7000417E -{0x0F12, 0xD814,}, // 70004180 -{0x0F12, 0x8879,}, // 70004182 -{0x0F12, 0x9800,}, // 70004184 -{0x0F12, 0x4281,}, // 70004186 -{0x0F12, 0xD20C,}, // 70004188 -{0x0F12, 0x9801,}, // 7000418A -{0x0F12, 0x0029,}, // 7000418C -{0x0F12, 0xF000,}, // 7000418E -{0x0F12, 0xF9FF,}, // 70004190 -{0x0F12, 0x9801,}, // 70004192 -{0x0F12, 0x0029,}, // 70004194 -{0x0F12, 0xF000,}, // 70004196 -{0x0F12, 0xF9FB,}, // 70004198 -{0x0F12, 0x9801,}, // 7000419A -{0x0F12, 0x0029,}, // 7000419C -{0x0F12, 0xF000,}, // 7000419E -{0x0F12, 0xF9F7,}, // 700041A0 -{0x0F12, 0xE003,}, // 700041A2 -{0x0F12, 0x9801,}, // 700041A4 -{0x0F12, 0x0029,}, // 700041A6 -{0x0F12, 0xF000,}, // 700041A8 -{0x0F12, 0xF9F2,}, // 700041AA -{0x0F12, 0x9801,}, // 700041AC -{0x0F12, 0x0032,}, // 700041AE -{0x0F12, 0x0039,}, // 700041B0 -{0x0F12, 0xF000,}, // 700041B2 -{0x0F12, 0xF9F5,}, // 700041B4 -{0x0F12, 0x6020,}, // 700041B6 -{0x0F12, 0xE5D0,}, // 700041B8 -{0x0F12, 0xB57C,}, // 700041BA -{0x0F12, 0x489A,}, // 700041BC -{0x0F12, 0xA901,}, // 700041BE -{0x0F12, 0x0004,}, // 700041C0 -{0x0F12, 0xF000,}, // 700041C2 -{0x0F12, 0xF979,}, // 700041C4 -{0x0F12, 0x466B,}, // 700041C6 -{0x0F12, 0x88D9,}, // 700041C8 -{0x0F12, 0x8898,}, // 700041CA -{0x0F12, 0x4B95,}, // 700041CC -{0x0F12, 0x3346,}, // 700041CE -{0x0F12, 0x1E9A,}, // 700041D0 -{0x0F12, 0xF000,}, // 700041D2 -{0x0F12, 0xF9ED,}, // 700041D4 -{0x0F12, 0x4894,}, // 700041D6 -{0x0F12, 0x4992,}, // 700041D8 -{0x0F12, 0x3812,}, // 700041DA -{0x0F12, 0x3140,}, // 700041DC -{0x0F12, 0x8A42,}, // 700041DE -{0x0F12, 0x888B,}, // 700041E0 -{0x0F12, 0x18D2,}, // 700041E2 -{0x0F12, 0x8242,}, // 700041E4 -{0x0F12, 0x8AC2,}, // 700041E6 -{0x0F12, 0x88C9,}, // 700041E8 -{0x0F12, 0x1851,}, // 700041EA -{0x0F12, 0x82C1,}, // 700041EC -{0x0F12, 0x0020,}, // 700041EE -{0x0F12, 0x4669,}, // 700041F0 -{0x0F12, 0xF000,}, // 700041F2 -{0x0F12, 0xF961,}, // 700041F4 -{0x0F12, 0x488D,}, // 700041F6 -{0x0F12, 0x214D,}, // 700041F8 -{0x0F12, 0x8301,}, // 700041FA -{0x0F12, 0x2196,}, // 700041FC -{0x0F12, 0x8381,}, // 700041FE -{0x0F12, 0x211D,}, // 70004200 -{0x0F12, 0x3020,}, // 70004202 -{0x0F12, 0x8001,}, // 70004204 -{0x0F12, 0xF000,}, // 70004206 -{0x0F12, 0xF9DB,}, // 70004208 -{0x0F12, 0xF000,}, // 7000420A -{0x0F12, 0xF9E1,}, // 7000420C -{0x0F12, 0x4888,}, // 7000420E -{0x0F12, 0x4C88,}, // 70004210 -{0x0F12, 0x6E00,}, // 70004212 -{0x0F12, 0x60E0,}, // 70004214 -{0x0F12, 0x466B,}, // 70004216 -{0x0F12, 0x8818,}, // 70004218 -{0x0F12, 0x8859,}, // 7000421A -{0x0F12, 0x0025,}, // 7000421C -{0x0F12, 0x1A40,}, // 7000421E -{0x0F12, 0x3540,}, // 70004220 -{0x0F12, 0x61A8,}, // 70004222 -{0x0F12, 0x487F,}, // 70004224 -{0x0F12, 0x9900,}, // 70004226 -{0x0F12, 0x3060,}, // 70004228 -{0x0F12, 0xF000,}, // 7000422A -{0x0F12, 0xF9D9,}, // 7000422C -{0x0F12, 0x466B,}, // 7000422E -{0x0F12, 0x8819,}, // 70004230 -{0x0F12, 0x1DE0,}, // 70004232 -{0x0F12, 0x30F9,}, // 70004234 -{0x0F12, 0x8741,}, // 70004236 -{0x0F12, 0x8859,}, // 70004238 -{0x0F12, 0x8781,}, // 7000423A -{0x0F12, 0x2000,}, // 7000423C -{0x0F12, 0x71A0,}, // 7000423E -{0x0F12, 0x74A8,}, // 70004240 -{0x0F12, 0xBC7C,}, // 70004242 -{0x0F12, 0xBC08,}, // 70004244 -{0x0F12, 0x4718,}, // 70004246 -{0x0F12, 0xB5F8,}, // 70004248 -{0x0F12, 0x0005,}, // 7000424A -{0x0F12, 0x6808,}, // 7000424C -{0x0F12, 0x0400,}, // 7000424E -{0x0F12, 0x0C00,}, // 70004250 -{0x0F12, 0x684A,}, // 70004252 -{0x0F12, 0x0412,}, // 70004254 -{0x0F12, 0x0C12,}, // 70004256 -{0x0F12, 0x688E,}, // 70004258 -{0x0F12, 0x68CC,}, // 7000425A -{0x0F12, 0x4970,}, // 7000425C -{0x0F12, 0x884B,}, // 7000425E -{0x0F12, 0x4343,}, // 70004260 -{0x0F12, 0x0A98,}, // 70004262 -{0x0F12, 0x2304,}, // 70004264 -{0x0F12, 0x5ECB,}, // 70004266 -{0x0F12, 0x18C0,}, // 70004268 -{0x0F12, 0x02C0,}, // 7000426A -{0x0F12, 0x0C00,}, // 7000426C -{0x0F12, 0x88CB,}, // 7000426E -{0x0F12, 0x4353,}, // 70004270 -{0x0F12, 0x0A9A,}, // 70004272 -{0x0F12, 0x2308,}, // 70004274 -{0x0F12, 0x5ECB,}, // 70004276 -{0x0F12, 0x18D1,}, // 70004278 -{0x0F12, 0x02C9,}, // 7000427A -{0x0F12, 0x0C09,}, // 7000427C -{0x0F12, 0x2701,}, // 7000427E -{0x0F12, 0x003A,}, // 70004280 -{0x0F12, 0x40AA,}, // 70004282 -{0x0F12, 0x9200,}, // 70004284 -{0x0F12, 0x002A,}, // 70004286 -{0x0F12, 0x3A10,}, // 70004288 -{0x0F12, 0x4097,}, // 7000428A -{0x0F12, 0x2D10,}, // 7000428C -{0x0F12, 0xDA06,}, // 7000428E -{0x0F12, 0x4A69,}, // 70004290 -{0x0F12, 0x9B00,}, // 70004292 -{0x0F12, 0x8812,}, // 70004294 -{0x0F12, 0x439A,}, // 70004296 -{0x0F12, 0x4B67,}, // 70004298 -{0x0F12, 0x801A,}, // 7000429A -{0x0F12, 0xE003,}, // 7000429C -{0x0F12, 0x4B66,}, // 7000429E -{0x0F12, 0x885A,}, // 700042A0 -{0x0F12, 0x43BA,}, // 700042A2 -{0x0F12, 0x805A,}, // 700042A4 -{0x0F12, 0x0023,}, // 700042A6 -{0x0F12, 0x0032,}, // 700042A8 -{0x0F12, 0xF000,}, // 700042AA -{0x0F12, 0xF981,}, // 700042AC -{0x0F12, 0x2D10,}, // 700042AE -{0x0F12, 0xDA05,}, // 700042B0 -{0x0F12, 0x4961,}, // 700042B2 -{0x0F12, 0x9A00,}, // 700042B4 -{0x0F12, 0x8808,}, // 700042B6 -{0x0F12, 0x4310,}, // 700042B8 -{0x0F12, 0x8008,}, // 700042BA -{0x0F12, 0xE003,}, // 700042BC -{0x0F12, 0x485E,}, // 700042BE -{0x0F12, 0x8841,}, // 700042C0 -{0x0F12, 0x4339,}, // 700042C2 -{0x0F12, 0x8041,}, // 700042C4 -{0x0F12, 0x4D5B,}, // 700042C6 -{0x0F12, 0x2000,}, // 700042C8 -{0x0F12, 0x3580,}, // 700042CA -{0x0F12, 0x88AA,}, // 700042CC -{0x0F12, 0x5E30,}, // 700042CE -{0x0F12, 0x2100,}, // 700042D0 -{0x0F12, 0xF000,}, // 700042D2 -{0x0F12, 0xF98D,}, // 700042D4 -{0x0F12, 0x8030,}, // 700042D6 -{0x0F12, 0x2000,}, // 700042D8 -{0x0F12, 0x88AA,}, // 700042DA -{0x0F12, 0x5E20,}, // 700042DC -{0x0F12, 0x2100,}, // 700042DE -{0x0F12, 0xF000,}, // 700042E0 -{0x0F12, 0xF986,}, // 700042E2 -{0x0F12, 0x8020,}, // 700042E4 -{0x0F12, 0xE587,}, // 700042E6 -{0x0F12, 0xB510,}, // 700042E8 -{0x0F12, 0xF000,}, // 700042EA -{0x0F12, 0xF989,}, // 700042EC -{0x0F12, 0x4A53,}, // 700042EE -{0x0F12, 0x8D50,}, // 700042F0 -{0x0F12, 0x2800,}, // 700042F2 -{0x0F12, 0xD007,}, // 700042F4 -{0x0F12, 0x494E,}, // 700042F6 -{0x0F12, 0x31C0,}, // 700042F8 -{0x0F12, 0x684B,}, // 700042FA -{0x0F12, 0x4950,}, // 700042FC -{0x0F12, 0x4283,}, // 700042FE -{0x0F12, 0xD202,}, // 70004300 -{0x0F12, 0x8D90,}, // 70004302 -{0x0F12, 0x81C8,}, // 70004304 -{0x0F12, 0xE6A0,}, // 70004306 -{0x0F12, 0x8DD0,}, // 70004308 -{0x0F12, 0x81C8,}, // 7000430A -{0x0F12, 0xE69D,}, // 7000430C -{0x0F12, 0xB5F8,}, // 7000430E -{0x0F12, 0xF000,}, // 70004310 -{0x0F12, 0xF97E,}, // 70004312 -{0x0F12, 0x4D49,}, // 70004314 -{0x0F12, 0x8E28,}, // 70004316 -{0x0F12, 0x2800,}, // 70004318 -{0x0F12, 0xD01F,}, // 7000431A -{0x0F12, 0x4E49,}, // 7000431C -{0x0F12, 0x4844,}, // 7000431E -{0x0F12, 0x68B4,}, // 70004320 -{0x0F12, 0x6800,}, // 70004322 -{0x0F12, 0x4284,}, // 70004324 -{0x0F12, 0xD903,}, // 70004326 -{0x0F12, 0x1A21,}, // 70004328 -{0x0F12, 0x0849,}, // 7000432A -{0x0F12, 0x1847,}, // 7000432C -{0x0F12, 0xE006,}, // 7000432E -{0x0F12, 0x4284,}, // 70004330 -{0x0F12, 0xD203,}, // 70004332 -{0x0F12, 0x1B01,}, // 70004334 -{0x0F12, 0x0849,}, // 70004336 -{0x0F12, 0x1A47,}, // 70004338 -{0x0F12, 0xE000,}, // 7000433A -{0x0F12, 0x0027,}, // 7000433C -{0x0F12, 0x0020,}, // 7000433E -{0x0F12, 0x493B,}, // 70004340 -{0x0F12, 0x3120,}, // 70004342 -{0x0F12, 0x7A0C,}, // 70004344 -{0x0F12, 0x2C00,}, // 70004346 -{0x0F12, 0xD004,}, // 70004348 -{0x0F12, 0x0200,}, // 7000434A -{0x0F12, 0x0039,}, // 7000434C -{0x0F12, 0xF000,}, // 7000434E -{0x0F12, 0xF8C3,}, // 70004350 -{0x0F12, 0x8668,}, // 70004352 -{0x0F12, 0x2C00,}, // 70004354 -{0x0F12, 0xD000,}, // 70004356 -{0x0F12, 0x60B7,}, // 70004358 -{0x0F12, 0xE54D,}, // 7000435A -{0x0F12, 0x20FF,}, // 7000435C -{0x0F12, 0x1C40,}, // 7000435E -{0x0F12, 0x8668,}, // 70004360 -{0x0F12, 0xE549,}, // 70004362 -{0x0F12, 0xB510,}, // 70004364 -{0x0F12, 0x000C,}, // 70004366 -{0x0F12, 0x6820,}, // 70004368 -{0x0F12, 0x0400,}, // 7000436A -{0x0F12, 0x0C00,}, // 7000436C -{0x0F12, 0x4933,}, // 7000436E -{0x0F12, 0x8E0A,}, // 70004370 -{0x0F12, 0x2A00,}, // 70004372 -{0x0F12, 0xD003,}, // 70004374 -{0x0F12, 0x8E49,}, // 70004376 -{0x0F12, 0x0200,}, // 70004378 -{0x0F12, 0xF000,}, // 7000437A -{0x0F12, 0xF8AD,}, // 7000437C -{0x0F12, 0x6020,}, // 7000437E -{0x0F12, 0x0400,}, // 70004380 -{0x0F12, 0x0C00,}, // 70004382 -{0x0F12, 0xE661,}, // 70004384 -{0x0F12, 0xB570,}, // 70004386 -{0x0F12, 0x680C,}, // 70004388 -{0x0F12, 0x4D2F,}, // 7000438A -{0x0F12, 0x0020,}, // 7000438C -{0x0F12, 0x6F29,}, // 7000438E -{0x0F12, 0xF000,}, // 70004390 -{0x0F12, 0xF946,}, // 70004392 -{0x0F12, 0x6F69,}, // 70004394 -{0x0F12, 0x1D20,}, // 70004396 -{0x0F12, 0xF000,}, // 70004398 -{0x0F12, 0xF942,}, // 7000439A -{0x0F12, 0x4827,}, // 7000439C -{0x0F12, 0x8E00,}, // 7000439E -{0x0F12, 0x2800,}, // 700043A0 -{0x0F12, 0xD006,}, // 700043A2 -{0x0F12, 0x4922,}, // 700043A4 -{0x0F12, 0x2214,}, // 700043A6 -{0x0F12, 0x3168,}, // 700043A8 -{0x0F12, 0x0008,}, // 700043AA -{0x0F12, 0x383C,}, // 700043AC -{0x0F12, 0xF000,}, // 700043AE -{0x0F12, 0xF93F,}, // 700043B0 -{0x0F12, 0xE488,}, // 700043B2 -{0x0F12, 0xB5F8,}, // 700043B4 -{0x0F12, 0x0004,}, // 700043B6 -{0x0F12, 0x4D24,}, // 700043B8 -{0x0F12, 0x8B68,}, // 700043BA -{0x0F12, 0x2800,}, // 700043BC -{0x0F12, 0xD012,}, // 700043BE -{0x0F12, 0x4823,}, // 700043C0 -{0x0F12, 0x8A00,}, // 700043C2 -{0x0F12, 0x06C0,}, // 700043C4 -{0x0F12, 0xD50E,}, // 700043C6 -{0x0F12, 0x4822,}, // 700043C8 -{0x0F12, 0x7800,}, // 700043CA -{0x0F12, 0x2800,}, // 700043CC -{0x0F12, 0xD00A,}, // 700043CE -{0x0F12, 0x481D,}, // 700043D0 -{0x0F12, 0x6FC1,}, // 700043D2 -{0x0F12, 0x2000,}, // 700043D4 -{0x0F12, 0xF000,}, // 700043D6 -{0x0F12, 0xF923,}, // 700043D8 -{0x0F12, 0x8B28,}, // 700043DA -{0x0F12, 0x2201,}, // 700043DC -{0x0F12, 0x2180,}, // 700043DE -{0x0F12, 0xF000,}, // 700043E0 -{0x0F12, 0xF92C,}, // 700043E2 -{0x0F12, 0x8328,}, // 700043E4 -{0x0F12, 0x2101,}, // 700043E6 -{0x0F12, 0x000D,}, // 700043E8 -{0x0F12, 0x0020,}, // 700043EA -{0x0F12, 0x3810,}, // 700043EC -{0x0F12, 0x4081,}, // 700043EE -{0x0F12, 0x40A5,}, // 700043F0 -{0x0F12, 0x4F11,}, // 700043F2 -{0x0F12, 0x000E,}, // 700043F4 -{0x0F12, 0x2C10,}, // 700043F6 -{0x0F12, 0xDA03,}, // 700043F8 -{0x0F12, 0x8838,}, // 700043FA -{0x0F12, 0x43A8,}, // 700043FC -{0x0F12, 0x8038,}, // 700043FE -{0x0F12, 0xE002,}, // 70004400 -{0x0F12, 0x8878,}, // 70004402 -{0x0F12, 0x43B0,}, // 70004404 -{0x0F12, 0x8078,}, // 70004406 -{0x0F12, 0xF000,}, // 70004408 -{0x0F12, 0xF920,}, // 7000440A -{0x0F12, 0x2C10,}, // 7000440C -{0x0F12, 0xDA03,}, // 7000440E -{0x0F12, 0x8838,}, // 70004410 -{0x0F12, 0x4328,}, // 70004412 -{0x0F12, 0x8038,}, // 70004414 -{0x0F12, 0xE4EF,}, // 70004416 -{0x0F12, 0x8878,}, // 70004418 -{0x0F12, 0x4330,}, // 7000441A -{0x0F12, 0x8078,}, // 7000441C -{0x0F12, 0xE4EB,}, // 7000441E -{0x0F12, 0x2558,}, // 70004420 -{0x0F12, 0x7000,}, // 70004422 -{0x0F12, 0x2AB8,}, // 70004424 -{0x0F12, 0x7000,}, // 70004426 -{0x0F12, 0x145E,}, // 70004428 -{0x0F12, 0x7000,}, // 7000442A -{0x0F12, 0x2698,}, // 7000442C -{0x0F12, 0x7000,}, // 7000442E -{0x0F12, 0x2BB8,}, // 70004430 -{0x0F12, 0x7000,}, // 70004432 -{0x0F12, 0x2998,}, // 70004434 -{0x0F12, 0x7000,}, // 70004436 -{0x0F12, 0x1100,}, // 70004438 -{0x0F12, 0xD000,}, // 7000443A -{0x0F12, 0x4780,}, // 7000443C -{0x0F12, 0x7000,}, // 7000443E -{0x0F12, 0xE200,}, // 70004440 -{0x0F12, 0xD000,}, // 70004442 -{0x0F12, 0x210C,}, // 70004444 -{0x0F12, 0x7000,}, // 70004446 -{0x0F12, 0x0000,}, // 70004448 -{0x0F12, 0x7000,}, // 7000444A -{0x0F12, 0x308C,}, // 7000444C -{0x0F12, 0x7000,}, // 7000444E -{0x0F12, 0xB040,}, // 70004450 -{0x0F12, 0xD000,}, // 70004452 -{0x0F12, 0x3858,}, // 70004454 -{0x0F12, 0x7000,}, // 70004456 -{0x0F12, 0x4778,}, // 70004458 -{0x0F12, 0x46C0,}, // 7000445A -{0x0F12, 0xC000,}, // 7000445C -{0x0F12, 0xE59F,}, // 7000445E -{0x0F12, 0xFF1C,}, // 70004460 -{0x0F12, 0xE12F,}, // 70004462 -{0x0F12, 0x1789,}, // 70004464 -{0x0F12, 0x0001,}, // 70004466 -{0x0F12, 0x4778,}, // 70004468 -{0x0F12, 0x46C0,}, // 7000446A -{0x0F12, 0xC000,}, // 7000446C -{0x0F12, 0xE59F,}, // 7000446E -{0x0F12, 0xFF1C,}, // 70004470 -{0x0F12, 0xE12F,}, // 70004472 -{0x0F12, 0x16F1,}, // 70004474 -{0x0F12, 0x0001,}, // 70004476 -{0x0F12, 0x4778,}, // 70004478 -{0x0F12, 0x46C0,}, // 7000447A -{0x0F12, 0xC000,}, // 7000447C -{0x0F12, 0xE59F,}, // 7000447E -{0x0F12, 0xFF1C,}, // 70004480 -{0x0F12, 0xE12F,}, // 70004482 -{0x0F12, 0xC3B1,}, // 70004484 -{0x0F12, 0x0000,}, // 70004486 -{0x0F12, 0x4778,}, // 70004488 -{0x0F12, 0x46C0,}, // 7000448A -{0x0F12, 0xC000,}, // 7000448C -{0x0F12, 0xE59F,}, // 7000448E -{0x0F12, 0xFF1C,}, // 70004490 -{0x0F12, 0xE12F,}, // 70004492 -{0x0F12, 0xC36D,}, // 70004494 -{0x0F12, 0x0000,}, // 70004496 -{0x0F12, 0x4778,}, // 70004498 -{0x0F12, 0x46C0,}, // 7000449A -{0x0F12, 0xC000,}, // 7000449C -{0x0F12, 0xE59F,}, // 7000449E -{0x0F12, 0xFF1C,}, // 700044A0 -{0x0F12, 0xE12F,}, // 700044A2 -{0x0F12, 0xF6D7,}, // 700044A4 -{0x0F12, 0x0000,}, // 700044A6 -{0x0F12, 0x4778,}, // 700044A8 -{0x0F12, 0x46C0,}, // 700044AA -{0x0F12, 0xC000,}, // 700044AC -{0x0F12, 0xE59F,}, // 700044AE -{0x0F12, 0xFF1C,}, // 700044B0 -{0x0F12, 0xE12F,}, // 700044B2 -{0x0F12, 0xB49D,}, // 700044B4 -{0x0F12, 0x0000,}, // 700044B6 -{0x0F12, 0x4778,}, // 700044B8 -{0x0F12, 0x46C0,}, // 700044BA -{0x0F12, 0xC000,}, // 700044BC -{0x0F12, 0xE59F,}, // 700044BE -{0x0F12, 0xFF1C,}, // 700044C0 -{0x0F12, 0xE12F,}, // 700044C2 -{0x0F12, 0x7EDF,}, // 700044C4 -{0x0F12, 0x0000,}, // 700044C6 -{0x0F12, 0x4778,}, // 700044C8 -{0x0F12, 0x46C0,}, // 700044CA -{0x0F12, 0xC000,}, // 700044CC -{0x0F12, 0xE59F,}, // 700044CE -{0x0F12, 0xFF1C,}, // 700044D0 -{0x0F12, 0xE12F,}, // 700044D2 -{0x0F12, 0x448D,}, // 700044D4 -{0x0F12, 0x0000,}, // 700044D6 -{0x0F12, 0x4778,}, // 700044D8 -{0x0F12, 0x46C0,}, // 700044DA -{0x0F12, 0xF004,}, // 700044DC -{0x0F12, 0xE51F,}, // 700044DE -{0x0F12, 0x29EC,}, // 700044E0 -{0x0F12, 0x0001,}, // 700044E2 -{0x0F12, 0x4778,}, // 700044E4 -{0x0F12, 0x46C0,}, // 700044E6 -{0x0F12, 0xC000,}, // 700044E8 -{0x0F12, 0xE59F,}, // 700044EA -{0x0F12, 0xFF1C,}, // 700044EC -{0x0F12, 0xE12F,}, // 700044EE -{0x0F12, 0x2EF1,}, // 700044F0 -{0x0F12, 0x0000,}, // 700044F2 -{0x0F12, 0x4778,}, // 700044F4 -{0x0F12, 0x46C0,}, // 700044F6 -{0x0F12, 0xC000,}, // 700044F8 -{0x0F12, 0xE59F,}, // 700044FA -{0x0F12, 0xFF1C,}, // 700044FC -{0x0F12, 0xE12F,}, // 700044FE -{0x0F12, 0xEE03,}, // 70004500 -{0x0F12, 0x0000,}, // 70004502 -{0x0F12, 0x4778,}, // 70004504 -{0x0F12, 0x46C0,}, // 70004506 -{0x0F12, 0xC000,}, // 70004508 -{0x0F12, 0xE59F,}, // 7000450A -{0x0F12, 0xFF1C,}, // 7000450C -{0x0F12, 0xE12F,}, // 7000450E -{0x0F12, 0xA58B,}, // 70004510 -{0x0F12, 0x0000,}, // 70004512 -{0x0F12, 0x4778,}, // 70004514 -{0x0F12, 0x46C0,}, // 70004516 -{0x0F12, 0xC000,}, // 70004518 -{0x0F12, 0xE59F,}, // 7000451A -{0x0F12, 0xFF1C,}, // 7000451C -{0x0F12, 0xE12F,}, // 7000451E -{0x0F12, 0x7C49,}, // 70004520 -{0x0F12, 0x0000,}, // 70004522 -{0x0F12, 0x4778,}, // 70004524 -{0x0F12, 0x46C0,}, // 70004526 -{0x0F12, 0xC000,}, // 70004528 -{0x0F12, 0xE59F,}, // 7000452A -{0x0F12, 0xFF1C,}, // 7000452C -{0x0F12, 0xE12F,}, // 7000452E -{0x0F12, 0x7C63,}, // 70004530 -{0x0F12, 0x0000,}, // 70004532 -{0x0F12, 0x4778,}, // 70004534 -{0x0F12, 0x46C0,}, // 70004536 -{0x0F12, 0xC000,}, // 70004538 -{0x0F12, 0xE59F,}, // 7000453A -{0x0F12, 0xFF1C,}, // 7000453C -{0x0F12, 0xE12F,}, // 7000453E -{0x0F12, 0x2DB7,}, // 70004540 -{0x0F12, 0x0000,}, // 70004542 -{0x0F12, 0x4778,}, // 70004544 -{0x0F12, 0x46C0,}, // 70004546 -{0x0F12, 0xC000,}, // 70004548 -{0x0F12, 0xE59F,}, // 7000454A -{0x0F12, 0xFF1C,}, // 7000454C -{0x0F12, 0xE12F,}, // 7000454E -{0x0F12, 0xEB3D,}, // 70004550 -{0x0F12, 0x0000,}, // 70004552 -{0x0F12, 0x4778,}, // 70004554 -{0x0F12, 0x46C0,}, // 70004556 -{0x0F12, 0xC000,}, // 70004558 -{0x0F12, 0xE59F,}, // 7000455A -{0x0F12, 0xFF1C,}, // 7000455C -{0x0F12, 0xE12F,}, // 7000455E -{0x0F12, 0xF061,}, // 70004560 -{0x0F12, 0x0000,}, // 70004562 -{0x0F12, 0x4778,}, // 70004564 -{0x0F12, 0x46C0,}, // 70004566 -{0x0F12, 0xC000,}, // 70004568 -{0x0F12, 0xE59F,}, // 7000456A -{0x0F12, 0xFF1C,}, // 7000456C -{0x0F12, 0xE12F,}, // 7000456E -{0x0F12, 0xF0EF,}, // 70004570 -{0x0F12, 0x0000,}, // 70004572 -{0x0F12, 0x4778,}, // 70004574 -{0x0F12, 0x46C0,}, // 70004576 -{0x0F12, 0xF004,}, // 70004578 -{0x0F12, 0xE51F,}, // 7000457A -{0x0F12, 0x2824,}, // 7000457C -{0x0F12, 0x0001,}, // 7000457E -{0x0F12, 0x4778,}, // 70004580 -{0x0F12, 0x46C0,}, // 70004582 -{0x0F12, 0xC000,}, // 70004584 -{0x0F12, 0xE59F,}, // 70004586 -{0x0F12, 0xFF1C,}, // 70004588 -{0x0F12, 0xE12F,}, // 7000458A -{0x0F12, 0x8EDD,}, // 7000458C -{0x0F12, 0x0000,}, // 7000458E -{0x0F12, 0x4778,}, // 70004590 -{0x0F12, 0x46C0,}, // 70004592 -{0x0F12, 0xC000,}, // 70004594 -{0x0F12, 0xE59F,}, // 70004596 -{0x0F12, 0xFF1C,}, // 70004598 -{0x0F12, 0xE12F,}, // 7000459A -{0x0F12, 0x8DCB,}, // 7000459C -{0x0F12, 0x0000,}, // 7000459E -{0x0F12, 0x4778,}, // 700045A0 -{0x0F12, 0x46C0,}, // 700045A2 -{0x0F12, 0xC000,}, // 700045A4 -{0x0F12, 0xE59F,}, // 700045A6 -{0x0F12, 0xFF1C,}, // 700045A8 -{0x0F12, 0xE12F,}, // 700045AA -{0x0F12, 0x8E17,}, // 700045AC -{0x0F12, 0x0000,}, // 700045AE -{0x0F12, 0x4778,}, // 700045B0 -{0x0F12, 0x46C0,}, // 700045B2 -{0x0F12, 0xC000,}, // 700045B4 -{0x0F12, 0xE59F,}, // 700045B6 -{0x0F12, 0xFF1C,}, // 700045B8 -{0x0F12, 0xE12F,}, // 700045BA -{0x0F12, 0x98C5,}, // 700045BC -{0x0F12, 0x0000,}, // 700045BE -{0x0F12, 0x4778,}, // 700045C0 -{0x0F12, 0x46C0,}, // 700045C2 -{0x0F12, 0xC000,}, // 700045C4 -{0x0F12, 0xE59F,}, // 700045C6 -{0x0F12, 0xFF1C,}, // 700045C8 -{0x0F12, 0xE12F,}, // 700045CA -{0x0F12, 0x7C7D,}, // 700045CC -{0x0F12, 0x0000,}, // 700045CE -{0x0F12, 0x4778,}, // 700045D0 -{0x0F12, 0x46C0,}, // 700045D2 -{0x0F12, 0xC000,}, // 700045D4 -{0x0F12, 0xE59F,}, // 700045D6 -{0x0F12, 0xFF1C,}, // 700045D8 -{0x0F12, 0xE12F,}, // 700045DA -{0x0F12, 0x7E31,}, // 700045DC -{0x0F12, 0x0000,}, // 700045DE -{0x0F12, 0x4778,}, // 700045E0 -{0x0F12, 0x46C0,}, // 700045E2 -{0x0F12, 0xC000,}, // 700045E4 -{0x0F12, 0xE59F,}, // 700045E6 -{0x0F12, 0xFF1C,}, // 700045E8 -{0x0F12, 0xE12F,}, // 700045EA -{0x0F12, 0x7EAB,}, // 700045EC -{0x0F12, 0x0000,}, // 700045EE -{0x0F12, 0x4778,}, // 700045F0 -{0x0F12, 0x46C0,}, // 700045F2 -{0x0F12, 0xC000,}, // 700045F4 -{0x0F12, 0xE59F,}, // 700045F6 -{0x0F12, 0xFF1C,}, // 700045F8 -{0x0F12, 0xE12F,}, // 700045FA -{0x0F12, 0x7501,}, // 700045FC -{0x0F12, 0x0000,}, // 700045FE -{0x0F12, 0x4778,}, // 70004600 -{0x0F12, 0x46C0,}, // 70004602 -{0x0F12, 0xC000,}, // 70004604 -{0x0F12, 0xE59F,}, // 70004606 -{0x0F12, 0xFF1C,}, // 70004608 -{0x0F12, 0xE12F,}, // 7000460A -{0x0F12, 0xF63F,}, // 7000460C -{0x0F12, 0x0000,}, // 7000460E -{0x0F12, 0x4778,}, // 70004610 -{0x0F12, 0x46C0,}, // 70004612 -{0x0F12, 0xC000,}, // 70004614 -{0x0F12, 0xE59F,}, // 70004616 -{0x0F12, 0xFF1C,}, // 70004618 -{0x0F12, 0xE12F,}, // 7000461A -{0x0F12, 0x3D0B,}, // 7000461C -{0x0F12, 0x0000,}, // 7000461E -{0x0F12, 0x4778,}, // 70004620 -{0x0F12, 0x46C0,}, // 70004622 -{0x0F12, 0xC000,}, // 70004624 -{0x0F12, 0xE59F,}, // 70004626 -{0x0F12, 0xFF1C,}, // 70004628 -{0x0F12, 0xE12F,}, // 7000462A -{0x0F12, 0x29BF,}, // 7000462C -{0x0F12, 0x0001,}, // 7000462E -{0x0F12, 0x4778,}, // 70004630 -{0x0F12, 0x46C0,}, // 70004632 -{0x0F12, 0xF004,}, // 70004634 -{0x0F12, 0xE51F,}, // 70004636 -{0x0F12, 0x26D8,}, // 70004638 -{0x0F12, 0x0001,}, // 7000463A -{0x0F12, 0x4778,}, // 7000463C -{0x0F12, 0x46C0,}, // 7000463E -{0x0F12, 0xC000,}, // 70004640 -{0x0F12, 0xE59F,}, // 70004642 -{0x0F12, 0xFF1C,}, // 70004644 -{0x0F12, 0xE12F,}, // 70004646 -{0x0F12, 0x306B,}, // 70004648 -{0x0F12, 0x0000,}, // 7000464A -{0x0F12, 0x4778,}, // 7000464C -{0x0F12, 0x46C0,}, // 7000464E -{0x0F12, 0xC000,}, // 70004650 -{0x0F12, 0xE59F,}, // 70004652 -{0x0F12, 0xFF1C,}, // 70004654 -{0x0F12, 0xE12F,}, // 70004656 -{0x0F12, 0x6099,}, // 70004658 -{0x0F12, 0x0000,}, // 7000465A -// End of Patch Data(Last : 7000465Ah) -// Total Size 2916 (0x0B64) -// Addr : 3AF8 , Size : 2914(B62h) - -// TNP_USER_MBCV_CONTROL -// TNP_4EC_MBR_TUNE -// TNP_4EC_FORBIDDEN_TUNE -// TNP_AF_FINESEARCH_DRIVEBACK -// TNP_FLASH_ALG -// TNP_GAS_ALPHA_OTP -// TNP_AWB_MODUL_COMP -// TNP_AWB_INIT_QUEUE -// TNP_AWB_GRID_LOWBR -// TNP_AWB_GRID_MODULECOMP -// TNP_ADLC_TUNE -// TNP_1FRAME_AE -// TNP_TG_OFF_CFG_CHG_IN_SPOOF_MODE - -//================================================================================== -// 05.OTP Control -//================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x0722,}, -{0x0F12, 0x0100,}, //skl_OTP_usWaitTime This register should be positioned in fornt of D0001000 -{0x002A, 0x0726,}, -{0x0F12, 0x0001,}, //skl_bUseOTPfunc This is OTP on/off function -{0x002A, 0x08D6,}, -{0x0F12, 0x0001,}, //ash_bUseOTPData -{0x002A, 0x146E,}, -{0x0F12, 0x0000,}, //awbb_otp_disable -{0x002A, 0x08DC,}, -{0x0F12, 0x0000,}, //ash_bUseGasAlphaOTP - -{0x0028, 0xD000,}, -{0x002A, 0x1000,}, -{0x0F12, 0x0001,}, - -//================================================================================== -// 06.Gas_Anti Shading -//================================================================================== -//=================================================================== -// GAS Alpha setting -//=================================================================== -// Refer Mon_AWB_RotGain -{0x0028, 0x7000,}, -{0x002A, 0x08B4,}, -{0x0F12, 0x0001,}, //wbt_bUseOutdoorASH -{0x002A, 0x08BC,}, -{0x0F12, 0x00C0,}, //TVAR_ash_AwbAshCord_0_ 2300K -{0x0F12, 0x00DF,}, //TVAR_ash_AwbAshCord_1_ 2750K -{0x0F12, 0x0100,}, //TVAR_ash_AwbAshCord_2_ 3300K -{0x0F12, 0x0125,}, //TVAR_ash_AwbAshCord_3_ 4150K -{0x0F12, 0x015F,}, //TVAR_ash_AwbAshCord_4_ 5250K -{0x0F12, 0x017C,}, //TVAR_ash_AwbAshCord_5_ 6400K -{0x0F12, 0x0194,}, //TVAR_ash_AwbAshCord_6_ 7500K - -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B - -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B - -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B - -{0x0F12, 0x3B00,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B - -{0x0F12, 0x3E00,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B - -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B - -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -//Outdoor GAS Alpha -{0x0F12, 0x4600,}, -{0x0F12, 0x4000,}, -{0x0F12, 0x4000,}, -{0x0F12, 0x4000,}, - -{0x002A, 0x08F4,}, -{0x0F12, 0x0001,}, //ash_bUseGasAlpha - -//================================================================================== -// 07. Analog Setting 2 -//================================================================================== -//This register is for FACTORY ONLY. -//If you change it without prior notification -//YOU are RESPONSIBLE for the FAILURE that will happen in the future -//For subsampling Size - -{0x0028, 0x7000,}, -{0x002A, 0x18BC,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x05B6,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x05BA,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0007,}, -{0x0F12, 0x05BA,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x05B6,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x05BA,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x024F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0075,}, -{0x0F12, 0x00CF,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0075,}, -{0x0F12, 0x00D6,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0004,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x00F0,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x029E,}, -{0x0F12, 0x05B2,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x0228,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0208,}, -{0x0F12, 0x0238,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0218,}, -{0x0F12, 0x0238,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0009,}, -{0x0F12, 0x00DE,}, -{0x0F12, 0x05C0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x00DF,}, -{0x0F12, 0x00E4,}, -{0x0F12, 0x01F8,}, -{0x0F12, 0x01FD,}, -{0x0F12, 0x05B6,}, -{0x0F12, 0x05BB,}, -{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, 0x01F8,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0077,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x024F,}, -{0x0F12, 0x025E,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - - // For Capture - -{0x0F12, 0x0004,}, -{0x0F12, 0x09D1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x09D5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x09D5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x0326,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x09D1,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x09D5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x0327,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x008D,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x02AA,}, -{0x0F12, 0x03AD,}, -{0x0F12, 0x09CD,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02AE,}, -{0x0F12, 0x02DE,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02BE,}, -{0x0F12, 0x02EE,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x02CE,}, -{0x0F12, 0x02EE,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0009,}, -{0x0F12, 0x0095,}, -{0x0F12, 0x09DB,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009B,}, -{0x0F12, 0x02AE,}, -{0x0F12, 0x02B3,}, -{0x0F12, 0x09D1,}, -{0x0F12, 0x09D6,}, -{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, 0x02AE,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0009,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0327,}, -{0x0F12, 0x0336,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x1AF8,}, -{0x0F12, 0x5A3C,}, //senHal_TuneStr_AngTuneData1_2_D000F400 register at subsampling -{0x002A, 0x1896,}, -{0x0F12, 0x0002,}, //senHal_SamplingType 0002 03EE: PLA setting -{0x0F12, 0x0000,}, //senHal_SamplingMode 0 : 2 PLA / 1 : 4PLA -{0x0F12, 0x0003,}, //senHal_PLAOption [0] VPLA enable [1] HPLA enable - -{0x002A, 0x1B00,}, //Green Noise -{0x0F12, 0xF428,}, -{0x0F12, 0xFFFF,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x189E,}, -{0x0F12, 0x0FB0,}, //senHal_ExpMinPixels -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x0A20,}, //senHal_uMinColsBin -{0x0F12, 0x0AB0,}, //senHal_uMinColsNoBin -{0x002A, 0x1AEA,}, -{0x0F12, 0x8080,}, //senHal_SubF404Tune -{0x0F12, 0x0080,}, //senHal_FullF404Tune -{0x002A, 0x1AE0,}, -{0x0F12, 0x0000,}, //senHal_bSenAAC -{0x002A, 0x1A72,}, -{0x0F12, 0x0000,}, //senHal_bSRX SRX off -{0x002A, 0x18A2,}, -{0x0F12, 0x0004,}, //senHal_NExpLinesCheckFine extend Forbidden area line -{0x002A, 0x1A6A,}, -{0x0F12, 0x009A,}, //senHal_usForbiddenRightOfs extend right Forbidden area line -{0x002A, 0x385E,}, -{0x0F12, 0x024C,}, //Mon_Sen_uExpPixelsOfs -{0x002A, 0x0EE6,}, -{0x0F12, 0x0000,}, //setot_bUseDigitalHbin -{0x002A, 0x1B2A,}, -{0x0F12, 0x0300,}, //70001B2A //senHal_TuneStr2_usAngTuneGainTh -{0x0F12, 0x00D6,}, //70001B2C //senHal_TuneStr2_AngTuneF4CA_0_ -{0x0F12, 0x008D,}, //70001B2E //senHal_TuneStr2_AngTuneF4CA_1_ -{0x0F12, 0x00CF,}, //70001B30 //senHal_TuneStr2_AngTuneF4C2_0_ -{0x0F12, 0x0084,}, //70001B32 //senHal_TuneStr2_AngTuneF4C2_1_ - -{0x002A, 0x0EEC,}, -{0x0F12, 0x000A,}, //setot_usSubSXBayerOffset// -{0x0F12, 0x0012,}, //setot_usFullXBayerOffset// - -//================================================================================== -// 08.AF Setting -//================================================================================== - -//AF interface setting -{0x0028, 0x7000,}, -{0x002A, 0x01FC,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_LedGpio, for Flash control -{0x002A, 0x01FE,}, -{0x0F12, 0x0003,}, //REG_TC_IPRM_CM_Init_AfModeType, VCM IIC -{0x0F12, 0x0000,}, //REG_TC_IPRM_CM_Init_PwmConfig1 -{0x002A, 0x0204,}, -{0x0F12, 0x0061,}, //REG_TC_IPRM_CM_Init_GpioConfig1, AF Enable GPIO 6 -{0x002A, 0x020C,}, -{0x0F12, 0x2F0C,}, //REG_TC_IPRM_CM_Init_Mi2cBit -{0x0F12, 0x0190,}, //REG_TC_IPRM_CM_Init_Mi2cRateKhz, IIC Speed - - -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated - - -//2nd search setting -{0x002A, 0x070E,}, -{0x0F12, 0x00C0,}, //skl_af_StatOvlpExpFactor -{0x002A, 0x071E,}, -{0x0F12, 0x0000,}, //skl_af_bAfStatOff -{0x002A, 0x163C,}, -{0x0F12, 0x0000,}, //af_search_usAeStable -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, //af_search_usSingleAfFlags -{0x002A, 0x1652,}, -{0x0F12, 0x0002,}, //af_search_usFinePeakCount -{0x0F12, 0x0000,}, //af_search_usFineMaxScale -{0x002A, 0x15E0,}, -{0x0F12, 0x0802,}, //af_pos_usFineStepNumSize - - - -//Peak Threshold -{0x002A, 0x164C,}, -{0x0F12, 0x0003,}, //af_search_usMinPeakSamples -{0x002A, 0x163E,}, -{0x0F12, 0x00C2,}, //af_search_usPeakThr //C0 -> A0 af_search_usPeakThr Full search (E5 90%) -{0x0F12, 0x0098,}, //af_search_usPeakThrLow //80->98 //98(60%) -> CC(80%) SEHF_CHECK_IT - - - -//Home Pos -{0x002A, 0x15D4,}, -{0x0F12, 0x0000,}, //af_pos_usHomePos -{0x0F12, 0xD000,}, //af_pos_usLowConfPos - - -//AF statistics -{0x002A, 0x169A,}, -{0x0F12, 0xFF95,}, //af_search_usConfCheckOrder_1_ -{0x002A, 0x166A,}, -{0x0F12, 0x0280,}, //af_search_usConfThr_4_ -{0x002A, 0x1676,}, -{0x0F12, 0x03A0,}, //af_search_usConfThr_10_ -{0x0F12, 0x0320,}, //af_search_usConfThr_11_ -{0x002A, 0x16BC,}, -{0x0F12, 0x0030,}, //af_stat_usMinStatVal -{0x002A, 0x16E0,}, -{0x0F12, 0x0060,}, //af_scene_usSceneLowNormBrThr -{0x002A, 0x16D4,}, -{0x0F12, 0x0010,}, //af_stat_usBpfThresh -{0x002A, 0x1656,}, -{0x0F12, 0x0000,}, //af_search_usCapturePolicy -{0x002A, 0x15E6,}, -{0x0F12, 0x003C,}, //af_pos_usCaptureFixedPos - - -//AF Lens Position Table Settings -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, ////af_pos_usTableLastInd SEHF_CHECK_IT -{0x0F12, 0x0032,}, ////2A////32////32 -{0x0F12, 0x0038,}, ////30////38////38 -{0x0F12, 0x003E,}, ////36////3C////3E -{0x0F12, 0x0044,}, ////3C////40////44 -{0x0F12, 0x004A,}, ////42////44////4A -{0x0F12, 0x0050,}, ////48////48////50 -{0x0F12, 0x0056,}, ////4E////4C////56 -{0x0F12, 0x005C,}, ////54////51////5C -{0x0F12, 0x0062,}, ////5A////56////62 -{0x0F12, 0x0068,}, ////60////5C////68 -{0x0F12, 0x006E,}, ////66////62////6E -{0x0F12, 0x0074,}, ////6C////68////74 -{0x0F12, 0x007A,}, ////72////6E////7A -{0x0F12, 0x0080,}, ////78////74////80 -{0x0F12, 0x0086,}, ////7E////7A////86 -{0x0F12, 0x008C,}, ////84////81////8C -{0x0F12, 0x0092,}, ////8A////88////92 -{0x0F12, 0x0098,}, ////90////90////98 -{0x0F12, 0x009E,}, ////96////98////9E -{0x0F12, 0x00A4,}, ////9C////A0////A4 -{0x0F12, 0x00AA,}, ////A2////A8////AA -{0x0F12, 0x00B0,}, ////A8////B0////B0 - -{0x0F12, 0x0018,}, -{0x0F12, 0x0024,}, -{0x0F12, 0x0028,}, -{0x0F12, 0x002C,}, -{0x0F12, 0x002E,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0088,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00B8,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00C8,}, - -//VCM AF driver with PWM/I2C -{0x002A, 0x1722,}, -{0x0F12, 0x8000,}, //afd_usParam[0] I2C power down command -{0x0F12, 0x0006,}, //afd_usParam[1] Position Right Shift -{0x0F12, 0x3FF0,}, //afd_usParam[2] I2C Data Mask -{0x0F12, 0x03E8,}, //afd_usParam[3] PWM Period -{0x0F12, 0x0000,}, //afd_usParam[4] PWM Divider -{0x0F12, 0x0008,}, //afd_usParam[5] SlowMotion Delay 4. reduce lens collision noise.delay2 when threshold upper lens moving when moving distance 9 delay 80h 25.6ms delay SEHF_SHIN -{0x0F12, 0x0001,}, //afd_usParam[6] SlowMotion Threshold 10->1 SEHF_CHECK_IT -{0x0F12, 0x0004,}, //afd_usParam[7] Signal Shaping -{0x0F12, 0x0080,}, //afd_usParam[8] Signal Shaping level -{0x0F12, 0x00C0,}, //afd_usParam[9] Signal Shaping level -{0x0F12, 0x00E0,}, //afd_usParam[10] Signal Shaping level -{0x0F12, 0x0000,}, //afd_usParam[11] Signal Shaping level - -{0x002A, 0x028C,}, -{0x0F12, 0x0003,}, //REG_TC_AF_AfCmd - -//================================================================================== -// 09.AWB-BASIC setting -//================================================================================== - -/*AWB init Start point*/ -{0x002A, 0x145E,}, -{0x0F12, 0x0580,}, -{0x0F12, 0x0428,}, -{0x0F12, 0x07B0,}, - -/*AWB Init */ -/*White Locus*/ -{0x002A, 0x11F0,}, -{0x0F12, 0x0120,}, /*awbb_IntcR */ -{0x0F12, 0x0121,}, /*awbb_IntcB */ - -/*Indoor Zone*/ -{0x002A, 0x101C,}, -{0x0F12, 0x036E,}, -{0x0F12, 0x03AC,}, -{0x0F12, 0x0324,}, -{0x0F12, 0x03A2,}, -{0x0F12, 0x02EA,}, -{0x0F12, 0x0386,}, -{0x0F12, 0x02B0,}, -{0x0F12, 0x0358,}, -{0x0F12, 0x0284,}, -{0x0F12, 0x0326,}, -{0x0F12, 0x0266,}, -{0x0F12, 0x02F4,}, -{0x0F12, 0x024E,}, -{0x0F12, 0x02D0,}, -{0x0F12, 0x0236,}, -{0x0F12, 0x02B2,}, -{0x0F12, 0x0220,}, -{0x0F12, 0x0298,}, -{0x0F12, 0x020A,}, -{0x0F12, 0x0282,}, -{0x0F12, 0x01F4,}, -{0x0F12, 0x026E,}, -{0x0F12, 0x01DE,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x01BA,}, -{0x0F12, 0x0242,}, -{0x0F12, 0x01A4,}, -{0x0F12, 0x0226,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x01F0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, /*awbb_IndoorGrZones_m_GridStep */ -{0x0F12, 0x0005,}, -{0x002A, 0x1070,}, /*awbb_IndoorGrZones_ZInfo_m_GridSz */ -{0x0F12, 0x000F,}, -{0x002A, 0x1074,}, /*awbb_IndoorGrZones_m_Boffs */ -{0x0F12, 0x011A,}, - -/* Outdoor Zone*/ -{0x002A, 0x1078,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x0284,}, -{0x0F12, 0x023C,}, -{0x0F12, 0x0290,}, -{0x0F12, 0x0222,}, -{0x0F12, 0x0290,}, -{0x0F12, 0x021A,}, -{0x0F12, 0x0286,}, -{0x0F12, 0x021A,}, -{0x0F12, 0x0278,}, -{0x0F12, 0x021C,}, -{0x0F12, 0x0264,}, -{0x0F12, 0x0230,}, -{0x0F12, 0x0244,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0004,}, /*awbb_OutdoorGrZones_m_GridStep */ -{0x002A, 0x10AC,}, -{0x0F12, 0x0007,}, /*awbb_OutdoorGrZones_ZInfo_m_GridSz */ -{0x002A, 0x10B0,}, -{0x0F12, 0x0216,}, /*awbb_OutdoorGrZones_m_Boffs */ - -/*LowBR Zone */ -{0x002A, 0x10B4,}, -{0x0F12, 0x0394,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x03EA,}, -{0x0F12, 0x0270,}, -{0x0F12, 0x03F0,}, -{0x0F12, 0x0204,}, -{0x0F12, 0x03C2,}, -{0x0F12, 0x01C2,}, -{0x0F12, 0x0366,}, -{0x0F12, 0x0194,}, -{0x0F12, 0x0312,}, -{0x0F12, 0x0166,}, -{0x0F12, 0x02D4,}, -{0x0F12, 0x0142,}, -{0x0F12, 0x0294,}, -{0x0F12, 0x011C,}, -{0x0F12, 0x0258,}, -{0x0F12, 0x015A,}, -{0x0F12, 0x0214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0006,}, /*awbb_LowBrGrZones_m_GridStep */ -{0x002A, 0x10E8,}, -{0x0F12, 0x000A,}, /*awbb_LowBrGrZones_ZInfo_m_GridSz */ -{0x002A, 0x10EC,}, -{0x0F12, 0x0120,}, /*awbb_LowBrGrZones_m_Boffs */ - -/*LowTemp Zone */ -{0x002A, 0x10F0,}, -{0x0F12, 0x0380,}, -{0x0F12, 0x0000,}, /*awbb_CrclLowT_R_c */ -{0x0F12, 0x0168,}, -{0x0F12, 0x0000,}, /*awbb_CrclLowT_B_c */ -{0x0F12, 0x2D90,}, -{0x0F12, 0x0000,}, /*awbb_CrclLowT_Rad_c */ - -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, - -{0x002A, 0x1228,}, -{0x0F12, 0x00C0,}, -{0x002A, 0x122C,}, -{0x0F12, 0x0010,}, -{0x002A, 0x122A,}, -{0x0F12, 0x0010,}, - -{0x002A, 0x120A,}, -{0x0F12, 0x05D5,}, /*awbb_MvEq_RBthresh */ -{0x002A, 0x120E,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0771,}, -{0x0F12, 0x03A4,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x002A,}, - -{0x002A, 0x1278,}, -{0x0F12, 0xFEF7,}, -{0x0F12, 0x0021,}, -{0x0F12, 0x0DAC,}, //Outdoor TH : about 2500lux -{0x0F12, 0x0DAC,}, //Outdoor TH : about 2500lux -{0x0F12, 0x018F,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x000E,}, -{0x002A, 0x1224,}, -{0x0F12, 0x0032,}, -{0x0F12, 0x001E,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0010,}, -{0x0F12, 0x0002,}, /*awbb_YThreshLow_Low */ -{0x002A, 0x2BA4,}, -{0x0F12, 0x0004,}, /*Mon_AWB_ByPassMode */ - -{0x002A, 0x146C,}, -{0x0F12, 0x0002,}, /*awbb_GridEnable */ - -/*Grid */ -{0x002A, 0x1434,}, -{0x0F12, 0x02CE,}, /* awbb_GridConst_1 */ -{0x0F12, 0x0347,}, /* awbb_GridConst_1_1_ */ -{0x0F12, 0x03C2,}, /* awbb_GridConst_1_2_ */ -{0x0F12, 0x1060,}, /* awbb_GridConst_2 */ -{0x0F12, 0x1000,}, /* awbb_GridConst_2_1_ */ -{0x0F12, 0x1150,}, /* awbb_GridConst_2_2_ */ -{0x0F12, 0x11E5,}, /* awbb_GridConst_2_3_ */ -{0x0F12, 0x120A,}, /* awbb_GridConst_2_4_ */ -{0x0F12, 0x1296,}, /* awbb_GridConst_2_5_ */ -{0x0F12, 0x00AB,}, /* awbb_GridCoeff_R_1 */ -{0x0F12, 0x00BF,}, /* awbb_GridCoeff_B_1 */ -{0x0F12, 0x00D2,}, /* awbb_GridCoeff_R_2 */ -{0x0F12, 0x0093,}, /* awbb_GridCoeff_B_2 */ - -/*Indoor Grid Offset */ -{0x002A, 0x13A4,}, -{0x0F12, 0xFFD8,}, /*0000 */ -{0x0F12, 0xFFF0,}, /*FFD8 */ -{0x0F12, 0xFFF5,}, /*FFD8 */ -{0x0F12, 0xFFC9,}, /*FFD8 */ -{0x0F12, 0x0014,}, /*FFD8 */ -{0x0F12, 0x0028,}, /*FFF6 B */ - -{0x0F12, 0xFFD8,}, /*0000 */ -{0x0F12, 0xFFF0,}, /*FFD8 */ -{0x0F12, 0xFFF5,}, /*FFD8 */ -{0x0F12, 0xFFC9,}, /*FFD8 */ -{0x0F12, 0x0014,}, /*FFD8 */ -{0x0F12, 0x0028,}, /*FFF6 */ - -{0x0F12, 0xFFD8,}, /*0000 */ -{0x0F12, 0xFFF0,}, /*FFD8 */ -{0x0F12, 0xFFF5,}, /*FFD8 */ -{0x0F12, 0xFFC9,}, /*FFD8 */ -{0x0F12, 0x0014,}, /*FFD8 */ -{0x0F12, 0x0028,}, /*FFF6 */ - -{0x0F12, 0xFFE2,}, /*FFEC*/ -{0x0F12, 0xFFDD,}, /*000A */ -{0x0F12, 0xFFB5,}, /*000A */ -{0x0F12, 0xFF51,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FF56 7 */ - -{0x0F12, 0xFFE2,}, /*FFEC*/ -{0x0F12, 0xFFDD,}, /*000A */ -{0x0F12, 0xFFB5,}, /*000A */ -{0x0F12, 0xFF51,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FF56 */ - -{0x0F12, 0xFFE2,}, /*FFEC*/ -{0x0F12, 0xFFDD,}, /*000A */ -{0x0F12, 0xFFB5,}, /*000A */ -{0x0F12, 0xFF51,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FFC4 */ -{0x0F12, 0xFE70,}, /*FF56 */ - -/*Outdoor Grid Offset*/ -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFE0,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0xFFE0,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0xFFD5,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0002,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x1208,}, -{0x0F12, 0x0020,}, - -{0x002A, 0x144E,}, -{0x0F12, 0x0000,}, /*awbb_RGainOff */ -{0x0F12, 0xFFE0,}, /*awbb_BGainOff */ -{0x0F12, 0x0000,}, /*awbb_GGainOff */ - -//================================================================================== -// 10.Clock Setting -//================================================================================== - -//Input Clock (Mclk) -{0x002A, 0x01F8,}, -{0x0F12, 0x65A6,}, //REG_TC_IPRM_InClockLSBs -{0x0F12, 0x0000,}, //REG_TC_IPRM_InClockMSBs -{0x002A, 0x0212,}, -{0x0F12, 0x0000,}, //REG_TC_IPRM_UseNPviClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_UseNMipiClocks -{0x0F12, 0x0002,}, //REG_TC_IPRM_NumberOfMipiLanes - -//System Clock & Output clock (Pclk) - -{0x002A, 0x021A,}, -{0x0F12, 0x3A98,}, //4F1A//3A98//REG_TC_IPRM_OpClk4KHz_0 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_0 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_0 -{0x0F12, 0x4F1A,}, //REG_TC_IPRM_OpClk4KHz_1 -{0x0F12, 0x280A,}, //REG_TC_IPRM_MinOutRate4KHz_1 -{0x0F12, 0x36B0,}, //REG_TC_IPRM_MaxOutRate4KHz_1 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//================================================================================== -// 11.Auto Flicker Detection -//================================================================================== - -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, //AFC_D_ConvAccelerPower - -// Auto Flicker (60Mhz start) -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, //AFC_Default BIT[0] 1:60Hz 0:50Hz -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, //REG_TC_DBG 7F: 60Hz 5F:50Hz -{0x002A, 0x0F20,}, -{0x0F12, 0x0002,}, ///AFC_SmallP_MaxFrames default :0x0003 20131104/ -{0x002A, 0x0F08,}, -{0x0F12, 0x0260,}, ///AFC_NewS_XSumDiff default :0x05DC 20131104/ -{0x002A, 0x0F2E,}, -{0x0F12, 0x0004,}, ///AFC_D_MaxHitsCnt default :0x0004 20131104/ -{0x002A, 0x0F0A,}, -{0x0F12, 0x0110,}, ///AFC_NewS_XBatchVarLimit default :0x01C2 20131104/ -{0x002A, 0x0F12,}, -{0x0F12, 0x0030,}, ///AFC_D_AbsEnergyThresh default :0x000C 20131104/ -{0x002A, 0x0F1C,}, -{0x0F12, 0x0700,}, ///AFC_D_B_Coef default :0x0600 20131104/ -{0x002A, 0x0F14,}, -{0x0F12, 0x0010,}, ///AFC_D_RelEnergyThresh default :0x0008 20131104/ - -//================================================================================== -// 12.AE Setting -//================================================================================== - -//AE Target -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, //TVAR_ae_BrAve - -//ae_StatMode bit[3] BLC has to be bypassed to prevent AE weight change especially backlight scene -{0x002A, 0x148A,}, -{0x0F12, 0x000F,}, //ae_StatMode - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,}, //lt_uInitPostToleranceCnt// - -{0x002A, 0x058C,}, -{0x0F12, 0x3520,}, - -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3520,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x002A, 0x059C,}, -{0x0F12, 0x0470,}, -{0x0F12, 0x0C00,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x1000,}, - -//AE_state -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, //lt_uLimitHigh -{0x0F12, 0x00EF,}, //lt_uLimitLow - - -//AE Concept -{0x002A, 0x0608,}, -{0x0F12, 0x0001,}, //lt_ExpGain_uSubsamplingmode -{0x0F12, 0x0001,}, //lt_ExpGain_uNonSubsampling -{0x0F12, 0x0800,}, //lt_ExpGain_ExpCurveGainMaxStr -{0x0F12, 0x0100,}, //0100 lt_ExpGain_ExpCurveGainMaxStr_0__uMaxDigGain - -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x4008,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x7000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x9E00,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xAD00,}, -{0x0F12, 0x0001,}, -{0x0F12, 0xF1D4,}, -{0x0F12, 0x0002,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, -{0x0F12, 0xDC00,}, -{0x0F12, 0x0005,}, - -//Exposure -{0x002A, 0x0638,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x0660,}, -{0x0F12, 0x0650,}, -{0x0F12, 0x0100,}, - - -// Lei Control -{0x002A, 0x06B8,}, -{0x0F12, 0x802C,}, //0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei - -{0x002A, 0x05D0,}, -{0x0F12, 0x0000,}, - -//================================================================================== -// 13.AE Weight (Normal) -//================================================================================== - -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -//================================================================================== -// 14.Flash Setting -//================================================================================== -{0x0028, 0x7000,}, -{0x002A, 0x0484,}, -{0x0F12, 0x0002,}, //capture flash on -{0x002A, 0x183A,}, -{0x0F12, 0x0001,}, //one frame AE -{0x002A, 0x17F6,}, -{0x0F12, 0x0260,}, //0266, //023C, //AWB R point -{0x0F12, 0x0210,}, //021A, //0248, //AWB B point -{0x002A, 0x1840,}, -{0x0F12, 0x0001,}, // Fls AE tune start -{0x0F12, 0x0100,}, // fls_afl_FlsAFIn Rin -{0x0F12, 0x0120,}, -{0x0F12, 0x0180,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0400,}, -{0x0F12, 0x0800,}, -{0x0F12, 0x0A00,}, -{0x0F12, 0x1000,}, -{0x0F12, 0x0100,}, // fls_afl_FlsAFOut Rout -{0x0F12, 0x00A0,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0070,}, -{0x0F12, 0x0045,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0010,}, -{0x002A, 0x1884,}, -{0x0F12, 0x0100,}, // fls_afl_FlsNBOut flash NB default -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x002A, 0x1826,}, -{0x0F12, 0x0100,}, // fls_afl_FlashWP_Weight flash NB default -{0x0F12, 0x00C0,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x000A,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0030,}, // fls_afl_FlashWP_Weight flash NB default -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0060,}, -{0x002A, 0x4784,}, -{0x0F12, 0x00A0,}, // TNP_Regs_FlsWeightRIn weight tune start in -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, -{0x0F12, 0x0088,}, // TNP_Regs_FlsWeightROut weight tune start out -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x0300,}, -{0x002A, 0x479C,}, -{0x0F12, 0x0120,}, //Fls BRIn -{0x0F12, 0x0150,}, -{0x0F12, 0x0200,}, -{0x0F12, 0x003C,}, // Fls BROut -{0x0F12, 0x003B,}, -{0x0F12, 0x0026,}, //brightness - -//================================================================================== -// 15.CCM Setting -//================================================================================== - -{0x002A, 0x08A6,}, -{0x0F12, 0x00C0,}, //SARR_AwbCcmCord[0] -{0x0F12, 0x0100,}, //SARR_AwbCcmCord[1] -{0x0F12, 0x0125,}, //SARR_AwbCcmCord[2] -{0x0F12, 0x015F,}, //SARR_AwbCcmCord[3] -{0x0F12, 0x017C,}, //SARR_AwbCcmCord[4] -{0x0F12, 0x0194,}, //SARR_AwbCcmCord[5] -{0x0F12, 0x0001,}, //wbt_bUseOutdoorCCM -{0x002A, 0x0898,}, -{0x0F12, 0x4800,}, //TVAR_wbt_pBaseCcms -{0x0F12, 0x7000,}, -{0x002A, 0x08A0,}, -{0x0F12, 0x48D8,}, //TVAR_wbt_pOutdoorCcm -{0x0F12, 0x7000,}, - -//Horizon -{0x002A, 0x4800,}, -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[0] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[1] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[2] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[3] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[4] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[5] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[6] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[7] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[8] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[9] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[10] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[11] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[12] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[13] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[14] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[15] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[16] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[17] - -// INCA A -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[18] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[19] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[20] -{0x0F12, 0xFF82,}, //TVAR_wbt_pBaseCcms[21] -{0x0F12, 0x0115,}, //TVAR_wbt_pBaseCcms[22] -{0x0F12, 0xFF9A,}, //TVAR_wbt_pBaseCcms[23] -{0x0F12, 0xFFFB,}, //TVAR_wbt_pBaseCcms[24] -{0x0F12, 0xFFB4,}, //TVAR_wbt_pBaseCcms[25] -{0x0F12, 0x021E,}, //TVAR_wbt_pBaseCcms[26] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[27] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[28] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[29] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[30] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[31] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[32] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[33] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[34] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[35] - -//Warm White -{0x0F12, 0x0208,}, //TVAR_wbt_pBaseCcms[36] -{0x0F12, 0xFFB5,}, //TVAR_wbt_pBaseCcms[37] -{0x0F12, 0xFFE8,}, //TVAR_wbt_pBaseCcms[38] -{0x0F12, 0xFF99,}, //TVAR_wbt_pBaseCcms[39] -{0x0F12, 0x00EB,}, //TVAR_wbt_pBaseCcms[40] -{0x0F12, 0xFFAD,}, //TVAR_wbt_pBaseCcms[41] -{0x0F12, 0x0022,}, //TVAR_wbt_pBaseCcms[42] -{0x0F12, 0xFFEA,}, //TVAR_wbt_pBaseCcms[43] -{0x0F12, 0x01C2,}, //TVAR_wbt_pBaseCcms[44] -{0x0F12, 0x00C6,}, //TVAR_wbt_pBaseCcms[45] -{0x0F12, 0x0095,}, //TVAR_wbt_pBaseCcms[46] -{0x0F12, 0xFEFD,}, //TVAR_wbt_pBaseCcms[47] -{0x0F12, 0x0206,}, //TVAR_wbt_pBaseCcms[48] -{0x0F12, 0xFF7F,}, //TVAR_wbt_pBaseCcms[49] -{0x0F12, 0x0191,}, //TVAR_wbt_pBaseCcms[50] -{0x0F12, 0xFF06,}, //TVAR_wbt_pBaseCcms[51] -{0x0F12, 0x01BA,}, //TVAR_wbt_pBaseCcms[52] -{0x0F12, 0x0108,}, //TVAR_wbt_pBaseCcms[53] - -//Cool White -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[54] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[55] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[56] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[57] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[58] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[59] -{0x0F12, 0xFFE6,}, //TVAR_wbt_pBaseCcms[60] -{0x0F12, 0xFFDD,}, //TVAR_wbt_pBaseCcms[61] -{0x0F12, 0x01B2,}, //TVAR_wbt_pBaseCcms[62] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[63] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[64] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[65] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[66] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[67] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[68] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[69] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[70] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[71] - -//D50 -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[72] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[73] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[74] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[75] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[76] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[77] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[78] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[79] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[80] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[81] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[82] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[83] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[84] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[85] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[86] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[87] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[88] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[89] - -//D65 -{0x0F12, 0x0204,}, //TVAR_wbt_pBaseCcms[90] -{0x0F12, 0xFFB2,}, //TVAR_wbt_pBaseCcms[91] -{0x0F12, 0xFFF5,}, //TVAR_wbt_pBaseCcms[92] -{0x0F12, 0xFEF1,}, //TVAR_wbt_pBaseCcms[93] -{0x0F12, 0x014E,}, //TVAR_wbt_pBaseCcms[94] -{0x0F12, 0xFF18,}, //TVAR_wbt_pBaseCcms[95] -{0x0F12, 0xFFD9,}, //TVAR_wbt_pBaseCcms[96] -{0x0F12, 0xFFBA,}, //TVAR_wbt_pBaseCcms[97] -{0x0F12, 0x01D4,}, //TVAR_wbt_pBaseCcms[98] -{0x0F12, 0x00F2,}, //TVAR_wbt_pBaseCcms[99] -{0x0F12, 0x00CA,}, //TVAR_wbt_pBaseCcms[100] -{0x0F12, 0xFF48,}, //TVAR_wbt_pBaseCcms[101] -{0x0F12, 0x0151,}, //TVAR_wbt_pBaseCcms[102] -{0x0F12, 0xFF50,}, //TVAR_wbt_pBaseCcms[103] -{0x0F12, 0x0147,}, //TVAR_wbt_pBaseCcms[104] -{0x0F12, 0xFF75,}, //TVAR_wbt_pBaseCcms[105] -{0x0F12, 0x0187,}, //TVAR_wbt_pBaseCcms[106] -{0x0F12, 0x01BF,}, //TVAR_wbt_pBaseCcms[107] - -{0x0F12, 0x01E9,}, //TVAR_wbt_pOutdoorCcm[0] -{0x0F12, 0xFFA8,}, //TVAR_wbt_pOutdoorCcm[1] -{0x0F12, 0xFFC9,}, //TVAR_wbt_pOutdoorCcm[2] -{0x0F12, 0xFE6E,}, //TVAR_wbt_pOutdoorCcm[3] -{0x0F12, 0x012A,}, //TVAR_wbt_pOutdoorCcm[4] -{0x0F12, 0xFF56,}, //TVAR_wbt_pOutdoorCcm[5] -{0x0F12, 0x0002,}, //TVAR_wbt_pOutdoorCcm[6] -{0x0F12, 0x0042,}, //TVAR_wbt_pOutdoorCcm[7] -{0x0F12, 0x01E6,}, //TVAR_wbt_pOutdoorCcm[8] -{0x0F12, 0x00B6,}, //TVAR_wbt_pOutdoorCcm[9] -{0x0F12, 0x0115,}, //TVAR_wbt_pOutdoorCcm[10] -{0x0F12, 0xFF40,}, //TVAR_wbt_pOutdoorCcm[11] -{0x0F12, 0x01EC,}, //TVAR_wbt_pOutdoorCcm[12] -{0x0F12, 0xFF6E,}, //TVAR_wbt_pOutdoorCcm[13] -{0x0F12, 0x0181,}, //TVAR_wbt_pOutdoorCcm[14] -{0x0F12, 0xFEC1,}, //TVAR_wbt_pOutdoorCcm[15] -{0x0F12, 0x0140,}, //TVAR_wbt_pOutdoorCcm[16] -{0x0F12, 0x0176,}, //TVAR_wbt_pOutdoorCcm[17] - - -//================================================================================== -// 16.GAMMA -//================================================================================== - -{0x002A, 0x0734,}, -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[0][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[0][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[0][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[0][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[0][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[0][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[0][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[0][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[0][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[0][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[0][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[0][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[0][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[0][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[0][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[0][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[0][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[0][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[0][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[0][19] - -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[1][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[1][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[1][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[1][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[1][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[1][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[1][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[1][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[1][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[1][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[1][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[1][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[1][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[1][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[1][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[1][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[1][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[1][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[1][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[1][19] - -{0x0F12, 0x0001,}, //saRR_usDualGammaLutRGBIndoor[2][0] -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBIndoor[2][1] -{0x0F12, 0x000F,}, //saRR_usDualGammaLutRGBIndoor[2][2] -{0x0F12, 0x0028,}, //saRR_usDualGammaLutRGBIndoor[2][3] -{0x0F12, 0x0066,}, //saRR_usDualGammaLutRGBIndoor[2][4] -{0x0F12, 0x00D9,}, //saRR_usDualGammaLutRGBIndoor[2][5] -{0x0F12, 0x0138,}, //saRR_usDualGammaLutRGBIndoor[2][6] -{0x0F12, 0x0163,}, //saRR_usDualGammaLutRGBIndoor[2][7] -{0x0F12, 0x0189,}, //saRR_usDualGammaLutRGBIndoor[2][8] -{0x0F12, 0x01C6,}, //saRR_usDualGammaLutRGBIndoor[2][9] -{0x0F12, 0x01F8,}, //saRR_usDualGammaLutRGBIndoor[2][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBIndoor[2][11] -{0x0F12, 0x0247,}, //saRR_usDualGammaLutRGBIndoor[2][12] -{0x0F12, 0x0282,}, //saRR_usDualGammaLutRGBIndoor[2][13] -{0x0F12, 0x02B5,}, //saRR_usDualGammaLutRGBIndoor[2][14] -{0x0F12, 0x030F,}, //saRR_usDualGammaLutRGBIndoor[2][15] -{0x0F12, 0x035F,}, //saRR_usDualGammaLutRGBIndoor[2][16] -{0x0F12, 0x03A2,}, //saRR_usDualGammaLutRGBIndoor[2][17] -{0x0F12, 0x03D8,}, //saRR_usDualGammaLutRGBIndoor[2][18] -{0x0F12, 0x03FF,}, //saRR_usDualGammaLutRGBIndoor[2][19] - //RGB Outdoor Gamma -{0x0F12, 0x0007,}, //saRR_usDualGammaLutRGBOutdoor[0][0] -{0x0F12, 0x0012,}, //saRR_usDualGammaLutRGBOutdoor[0][1] -{0x0F12, 0x0020,}, //saRR_usDualGammaLutRGBOutdoor[0][2] -{0x0F12, 0x0038,}, //saRR_usDualGammaLutRGBOutdoor[0][3] -{0x0F12, 0x0071,}, //saRR_usDualGammaLutRGBOutdoor[0][4] -{0x0F12, 0x00DA,}, //saRR_usDualGammaLutRGBOutdoor[0][5] -{0x0F12, 0x0137,}, //saRR_usDualGammaLutRGBOutdoor[0][6] -{0x0F12, 0x0161,}, //saRR_usDualGammaLutRGBOutdoor[0][7] -{0x0F12, 0x0187,}, //saRR_usDualGammaLutRGBOutdoor[0][8] -{0x0F12, 0x01C3,}, //saRR_usDualGammaLutRGBOutdoor[0][9] -{0x0F12, 0x01FE,}, //saRR_usDualGammaLutRGBOutdoor[0][10] -{0x0F12, 0x021B,}, //saRR_usDualGammaLutRGBOutdoor[0][11] -{0x0F12, 0x0245,}, //saRR_usDualGammaLutRGBOutdoor[0][12] -{0x0F12, 0x028C,}, //saRR_usDualGammaLutRGBOutdoor[0][13] -{0x0F12, 0x02CB,}, //saRR_usDualGammaLutRGBOutdoor[0][14] -{0x0F12, 0x0325,}, //saRR_usDualGammaLutRGBOutdoor[0][15] -{0x0F12, 0x0365,}, //saRR_usDualGammaLutRGBOutdoor[0][16] -{0x0F12, 0x039A,}, //saRR_usDualGammaLutRGBOutdoor[0][17] -{0x0F12, 0x03C7,}, //saRR_usDualGammaLutRGBOutdoor[0][18] -{0x0F12, 0x03F4,}, //saRR_usDualGammaLutRGBOutdoor[0][19] - -{0x0F12, 0x0005,}, //saRR_usDualGammaLutRGBOutdoor[1][0] -{0x0F12, 0x0010,}, //saRR_usDualGammaLutRGBOutdoor[1][1] -{0x0F12, 0x001E,}, //saRR_usDualGammaLutRGBOutdoor[1][2] -{0x0F12, 0x0036,}, //saRR_usDualGammaLutRGBOutdoor[1][3] -{0x0F12, 0x006F,}, //saRR_usDualGammaLutRGBOutdoor[1][4] -{0x0F12, 0x00D8,}, //saRR_usDualGammaLutRGBOutdoor[1][5] -{0x0F12, 0x0135,}, //saRR_usDualGammaLutRGBOutdoor[1][6] -{0x0F12, 0x015F,}, //saRR_usDualGammaLutRGBOutdoor[1][7] -{0x0F12, 0x0185,}, //saRR_usDualGammaLutRGBOutdoor[1][8] -{0x0F12, 0x01C1,}, //saRR_usDualGammaLutRGBOutdoor[1][9] -{0x0F12, 0x01F3,}, //saRR_usDualGammaLutRGBOutdoor[1][10] -{0x0F12, 0x0220,}, //saRR_usDualGammaLutRGBOutdoor[1][11] -{0x0F12, 0x024A,}, //saRR_usDualGammaLutRGBOutdoor[1][12] -{0x0F12, 0x0291,}, //saRR_usDualGammaLutRGBOutdoor[1][13] -{0x0F12, 0x02D0,}, //saRR_usDualGammaLutRGBOutdoor[1][14] -{0x0F12, 0x032A,}, //saRR_usDualGammaLutRGBOutdoor[1][15] -{0x0F12, 0x036A,}, //saRR_usDualGammaLutRGBOutdoor[1][16] -{0x0F12, 0x039F,}, //saRR_usDualGammaLutRGBOutdoor[1][17] -{0x0F12, 0x03CC,}, //saRR_usDualGammaLutRGBOutdoor[1][18] -{0x0F12, 0x03F9,}, //saRR_usDualGammaLutRGBOutdoor[1][19] - -{0x0F12, 0x0003,}, //saRR_usDualGammaLutRGBOutdoor[2][0] -{0x0F12, 0x000E,}, //saRR_usDualGammaLutRGBOutdoor[2][1] -{0x0F12, 0x001C,}, //saRR_usDualGammaLutRGBOutdoor[2][2] -{0x0F12, 0x0034,}, //saRR_usDualGammaLutRGBOutdoor[2][3] -{0x0F12, 0x006D,}, //saRR_usDualGammaLutRGBOutdoor[2][4] -{0x0F12, 0x00D6,}, //saRR_usDualGammaLutRGBOutdoor[2][5] -{0x0F12, 0x0133,}, //saRR_usDualGammaLutRGBOutdoor[2][6] -{0x0F12, 0x015D,}, //saRR_usDualGammaLutRGBOutdoor[2][7] -{0x0F12, 0x0183,}, //saRR_usDualGammaLutRGBOutdoor[2][8] -{0x0F12, 0x01BF,}, //saRR_usDualGammaLutRGBOutdoor[2][9] -{0x0F12, 0x01F5,}, //saRR_usDualGammaLutRGBOutdoor[2][10] -{0x0F12, 0x0222,}, //saRR_usDualGammaLutRGBOutdoor[2][11] -{0x0F12, 0x024C,}, //saRR_usDualGammaLutRGBOutdoor[2][12] -{0x0F12, 0x0293,}, //saRR_usDualGammaLutRGBOutdoor[2][13] -{0x0F12, 0x02D2,}, //saRR_usDualGammaLutRGBOutdoor[2][14] -{0x0F12, 0x032C,}, //saRR_usDualGammaLutRGBOutdoor[2][15] -{0x0F12, 0x036C,}, //saRR_usDualGammaLutRGBOutdoor[2][16] -{0x0F12, 0x03A1,}, //saRR_usDualGammaLutRGBOutdoor[2][17] -{0x0F12, 0x03CE,}, //saRR_usDualGammaLutRGBOutdoor[2][18] -{0x0F12, 0x03FB,}, //saRR_usDualGammaLutRGBOutdoor[2][19] - - -//================================================================================== -// 17.AFIT -//================================================================================== -{0x002A, 0x0944,}, -{0x0F12, 0x0050,}, //afit_uNoiseIndInDoor -{0x0F12, 0x00B0,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0196,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0245,}, //afit_uNoiseIndInDoor -{0x0F12, 0x0300,}, //afit_uNoiseIndInDoor - -{0x002A, 0x0976,}, -{0x0F12, 0x0070,}, //afit_usGamutTh -{0x0F12, 0x0005,}, //afit_usNeargrayOffset -{0x0F12, 0x0000,}, //afit_bUseSenBpr -{0x0F12, 0x01CC,}, //afit_usBprThr_0_ -{0x0F12, 0x01CC,}, //afit_usBprThr_1_ -{0x0F12, 0x01CC,}, //afit_usBprThr_2_ -{0x0F12, 0x01CC,}, //afit_usBprThr_3_ -{0x0F12, 0x01CC,}, //afit_usBprThr_4_ -{0x0F12, 0x0180,}, //afit_NIContrastAFITValue -{0x0F12, 0x0196,}, //afit_NIContrastTh - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, // on/off AFIT by NB option -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor -{0x0F12, 0x0384,}, //SARR_uNormBrInDoor -{0x0F12, 0x07D0,}, //SARR_uNormBrInDoor -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor - - //AFIT 0 -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C//AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E//AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990//AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992//AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994//AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996//AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998//AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A//AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C//AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E//AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0//AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2//AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4//AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6//AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8//AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA//AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC//AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE//AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0//AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2//AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4//AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6//AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8//AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA//AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC//AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE//AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0//AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2//AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4//AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6//AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8//AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA//AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC//AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE//AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0//AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2//AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4//AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6//AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8//AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA//AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC//AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE//AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0//AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2//AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4//AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6//AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8//AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA//AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC//AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE//AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0//AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2//AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4//AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6//AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8//AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA//AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC//AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE//AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00//AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02//AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04//AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06//AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08//AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A//AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C//AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E//AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10//AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12//AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14//AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16//AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18//AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2818,}, //70000A1A//AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C//AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E//AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20//AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22//AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24//AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //1820, //70000A26//AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28//AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //151B, //70000A2A//AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C//AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E//AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30//AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32//AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34//AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36//AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38//AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A//AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C//AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E//AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40//AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42//AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44//AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000A46//AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48//AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A//AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C//AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E//AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50//AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52//AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54//AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56//AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58//AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A//AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C//AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E//AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60//AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62//AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64//AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66//AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68//AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A//AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C//AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E//AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70//AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72//AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74//AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76//AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78//AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A//AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C//AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E//AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80//AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82//AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84//AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86//AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88//AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A//AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C//AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E//AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90//AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92//AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94//AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96//AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98//AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A//AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C//AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E//AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0//AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2//AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4//AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6//AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8//AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA//AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC//AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE//AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0//AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2//AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4//AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6//AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8//AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA//AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC//AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE//AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0//AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2//AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4//AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6//AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8//AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA//AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC//AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE//AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0//AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2//AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4//AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6//AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8//AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA//AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //131C, //70000ADC//AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE//AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //0F11, //70000AE0//AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2//AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4//AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6//AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8//AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA//AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC//AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE//AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0//AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2//AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4//AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6//AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8//AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA//AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC//AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE//AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00//AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02//AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04//AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06//AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08//AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A//AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C//AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E//AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10//AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12//AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14//AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16//AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18//AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A//AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C//AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E//AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20//AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22//AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24//AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26//AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28//AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A//AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C//AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E//AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30//AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32//AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34//AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36//AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38//AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A//AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C//AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E//AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40//AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42//AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44//AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46//AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48//AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A//AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C//AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E//AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50//AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52//AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54//AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56//AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58//AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A//AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C//AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E//AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60//AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62//AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64//AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66//AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68//AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A//AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C//AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E//AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70//AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72//AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74//AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76//AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78//AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A//AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C//AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E//AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80//AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82//AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84//AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86//AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88//AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A//AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C//AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E//AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90//AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //0C15, //70000B92//AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94//AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //0606, //70000B96//AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98//AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A//AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C//AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E//AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0//AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2//AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4//AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6//AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8//AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA//AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC//AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE//AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0//AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2//AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4//AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6//AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8//AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA//AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC//AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE//AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0//AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2//AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4//AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6//AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8//AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA//AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC//AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE//AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0//AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2//AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4//AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6//AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8//AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA//AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC//AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE//AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0//AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2//AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4//AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6//AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8//AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA//AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC//AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE//AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0//AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2//AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4//AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6//AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8//AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA//AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC//AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE//AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00//AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02//AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04//AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06//AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08//AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A//AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C//AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E//AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10//AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12//AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14//AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16//AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18//AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A//AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C//AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E//AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20//AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22//AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24//AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26//AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28//AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A//AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C//AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E//AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30//AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32//AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34//AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36//AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38//AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A//AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C//AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E//AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40//AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42//AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44//AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46//AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //090F, //70000C48//AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A//AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //0505, //70000C4C//AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E//AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50//AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52//AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54//AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56//AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58//AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A//AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C//AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E//AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60//AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62//AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64//AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66//AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68//AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A//AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C//AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E//AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70//AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72//AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74//AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76//AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78//AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A//AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C//AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E//AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80//AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82//AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84//AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86//AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88//AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A//AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C//AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E//AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90//AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92//AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94//AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96//AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98//AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A//AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C//AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E//AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0//AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2//AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4//AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6//AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8//AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA//AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC//AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE//AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0//AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2//AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4//AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6//AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8//AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA//AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC//AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE//AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0//AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2//AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4//AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6//AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8//AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA//AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC//AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE//AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0//AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2//AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4//AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6//AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8//AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA//AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC//AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE//AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0//AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2//AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4//AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6//AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8//AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA//AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC//AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE//AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0//AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2//AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4//AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6//AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8//AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA//AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC//AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //0407, //70000CFE//AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00//AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //0404, //70000D02//AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04//AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06//AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08//AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A//AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C//AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E//AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10//AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12//AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14//AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16//AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18//AFITB_bnr_nClustLevel_C [0] - -{0x0F12, 0x23CE,}, //70000D19//ConstAfitBaseVals -{0x0F12, 0xFDC8,}, //70000D1A//ConstAfitBaseVals -{0x0F12, 0x112E,}, //70000D1B//ConstAfitBaseVals -{0x0F12, 0x93A5,}, //70000D1C//ConstAfitBaseVals -{0x0F12, 0xFE67,}, //70000D1D//ConstAfitBaseVals -{0x0F12, 0x0000,}, //70000D1E//ConstAfitBaseVals - -//================================================================================== -// 18.JPEG Thumnail Setting -//================================================================================== - -{0x002A, 0x0478,}, -{0x0F12, 0x005F,}, //REG_TC_BRC_usPrevQuality -{0x0F12, 0x005F,}, //REG_TC_BRC_usCaptureQuality -{0x0F12, 0x0001,}, //0000//REG_TC_THUMB_Thumb_bActive -{0x0F12, 0x0280,}, //REG_TC_THUMB_Thumb_uWidth -{0x0F12, 0x01E0,}, //REG_TC_THUMB_Thumb_uHeight -{0x0F12, 0x0005,}, //REG_TC_THUMB_Thumb_Format - -{0x002A, 0x17DC,}, -{0x0F12, 0x0054,}, //jpeg_ManualMBCV -{0x002A, 0x1AE4,}, -{0x0F12, 0x001C,}, //senHal_bExtraAddLine -{0x002A, 0x0284,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bBypassScalerJpg -{0x002A, 0x028A,}, -{0x0F12, 0x0000,}, //REG_TC_GP_bUse1FrameCaptureMode - -{0x002A, 0x1CC2,}, //DRx_uDRxWeight for AutoCont function -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0100,}, - -{0x002A, 0x147C,}, // Brightness min/Max -{0x0F12, 0x0170,}, ///*bp_uMaxBrightnessFactor*/ -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, ///*bp_uMinBrightnessFactor */ - -//================================================================================== -// 19.Input Size Setting -//================================================================================== -//Input Size -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_PrevReqInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_PrevReqInputHeight -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_PrevInputWidthOfs -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_PrevInputHeightOfs -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_CapReqInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_CapReqInputHeight -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_CapInputWidthOfs -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_CapInputHeightOfs - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_PZOOM_ZoomInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_PZOOM_ZoomInputHeight -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_PZOOM_ZoomInputWidthOfs -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_PZOOM_ZoomInputHeightOfs -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_CZOOM_ZoomInputWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_CZOOM_ZoomInputHeight -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_CZOOM_ZoomInputWidthOfs -{0x0F12, 0x0000,}, //0x0000,}, //REG_TC_CZOOM_ZoomInputHeightOfs - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInCap - -//================================================================================== -// 20.Preview & Capture Configration Setting -//================================================================================== -//Preview config[0] 640x480 7.5~15fps -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //REG_0TC_PCFG_usWidth //Hsize : 640 1280 1024 -{0x0F12, 0x03C0,}, //REG_0TC_PCFG_usHeight//Vsize : 480 960 768 -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format 05 : yuv 07: raw 09 : jpeg -{0x0F12, 0x36B0,}, //REG_0TC_PCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_PCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_PCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_PCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_PCFG_PVIMask soc raw : c2 raw 52 -{0x0F12, 0x0000,}, //REG_0TC_PCFG_OIFMask -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usJpegPacketSize -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usJpegTotalPackets -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_PCFG_usFrTimeType -{0x0F12, 0x0001,}, //REG_0TC_PCFG_FrRateQualityType -{0x0F12, 0x03E8,}, //REG_0TC_PCFG_usMaxFrTimeMsecMult10 -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 -{0x002A, 0x02D0,}, -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uPrevMirror -{0x0F12, 0x0000,}, //REG_0TC_PCFG_uCaptureMirror - -//Capture Config[0] 2560x1920 7.5~15fps -{0x002A, 0x0396,}, -{0x0F12, 0x0000,}, //REG_0TC_CCFG_uCaptureMode -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_0TC_CCFG_usWidth -{0x0F12, 0x078C,}, //0x0780,}, //REG_0TC_CCFG_usHeight -{0x0F12, 0x0005,}, //REG_0TC_CCFG_Format -{0x0F12, 0x36B0,}, //REG_0TC_CCFG_usMaxOut4KHzRate -{0x0F12, 0x280A,}, //REG_0TC_CCFG_usMinOut4KHzRate -{0x0F12, 0x0100,}, //REG_0TC_CCFG_OutClkPerPix88 -{0x0F12, 0x0300,}, //REG_0TC_CCFG_uBpp88 -{0x0F12, 0x0012,}, //REG_0TC_CCFG_PVIMask -{0x0F12, 0x0070,}, //REG_0TC_CCFG_OIFMask -{0x0F12, 0x0810,}, //REG_0TC_CCFG_usJpegPacketSize -{0x0F12, 0x0900,}, //REG_0TC_CCFG_usJpegTotalPackets -{0x0F12, 0x0001,}, //REG_0TC_CCFG_uClockInd -{0x0F12, 0x0000,}, //REG_0TC_CCFG_usFrTimeType -{0x0F12, 0x0002,}, //REG_0TC_CCFG_FrRateQualityType -{0x0F12, 0x0535,}, //REG_0TC_CCFG_usMaxFrTimeMsecMult10 -{0x0F12, 0x029A,}, //REG_0TC_CCFG_usMinFrTimeMsecMult10 - -{0x002A, 0x022C,}, -{0x0F12, 0x0001,}, //REG_TC_IPRM_InitParamsUpdated - -//================================================================================== -// 21.Select Cofigration Display -//================================================================================== -//PREVIEW - -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapOpenAfterChange -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged - -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged - -//=================================================================================== -// 22. ESD Check -//=================================================================================== - -{0x0028, 0x7000,}, -{0x002A, 0x01A8,}, //ESD Check -{0x0F12, 0xAAAA,}, - -//=================================================================================== -// 23. Brightness min/Max -//=================================================================================== -{0x002A, 0x147C,}, -{0x0F12, 0x0170,}, //bp_uMaxBrightnessFactor -{0x002A, 0x1482,}, -{0x0F12, 0x01E0,}, //bp_uMinBrightnessFactor - -//=================================================================================== -// 24.ISSUE -//=================================================================================== -//20110728 : Sequence Changed by image dev. (by J.M.Ahn) -//20110728 : ESD Check Register Address Change -//20110829 : TnP Changed ( by S.Y.Lee) -//20120104 : init Parm Update sequence changed by J.M.Ahn) -//20120201 : Flash ? Green Noise setting (by J.M.Ahn) -//20120229 : Brightness Block ? (by J.W.Yoo) -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Normal[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Negative[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0003,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Sepia[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0004,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Effect_Mono[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x023C,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, // S/W Program */ -{0x0F12, 0x077F,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0100,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x00C0,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0080,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x000A,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Sunny[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, -{0x002A, 0x04BA,}, -{0x0F12, 0x05A0,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0570,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Cloudy[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, -{0x002A, 0x04BA,}, -{0x0F12, 0x0670,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x04C0,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Tungsten[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, -{0x002A, 0x04BA,}, -{0x0F12, 0x0420,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0430,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0990,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_WB_Fluorescent[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, -{0x002A, 0x04BA,}, -{0x0F12, 0x05C0,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x07F0,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, - -{0x002A, 0x1826,}, -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_0_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_1_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_2_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_3_ -{0x0F12, 0x0000,}, //fls_afl_FlashWP_Weight2_4_ - -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_Auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0014,}, -{0x0F12, 0x00D2,}, -{0x0F12, 0x0384,}, -{0x0F12, 0x07D0,}, -{0x0F12, 0x1388,}, - -{0x002A, 0x2C64,}, -{0x0F12, 0x0001,}, /*Auto Flicker Enable*/ - -{0x002A, 0x0230,}, -{0x0F12, 0x0000,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,},//REG_SF_USER_IsoType -{0x0F12, 0x0000,},//REG_SF_USER_IsoVal -{0x0F12, 0x0001,},//REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,},//lt_bUseSecISODgain -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_50[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0100,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_100[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0014,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x00D2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0384,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x07D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x01BA,}, //01A0 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_200[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0114,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x04A2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0584,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x08D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0374,}, //0340 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ISO_400[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,},/*afit_bUseNB_Afit */ -{0x0F12, 0x0214,},/*SARR_uNormBrInDoor_0_ */ -{0x0F12, 0x0BD2,},/*SARR_uNormBrInDoor_1_ */ -{0x0F12, 0x0C84,},/*SARR_uNormBrInDoor_2_ */ -{0x0F12, 0x10D0,},/*SARR_uNormBrInDoor_3_ */ -{0x0F12, 0x1388,},/*SARR_uNormBrInDoor_4_ */ - -{0x002A, 0x04D6,}, -{0x0F12, 0x0000,}, //REG_SF_USER_FlickerQuant -{0x0F12, 0x0001,}, //REG_SF_USER_FlickerQuantChanged -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x06F4,}, //0710 //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0100,}, //lt_bUseSecISODgain -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Matrix[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Center[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Metering_Spot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x002A, 0x0268,}, //REG_TC_GP_PrevConfigChanged -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0018,}, /*TVAR_ae_BrAve */ - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001E,}, /*TVAR_ae_BrAve */ - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0025,}, /*TVAR_ae_BrAve */ - -{0x002A, 0x0544,}, -{0x0F12, 0x011F,}, -{0x0F12, 0x00E1,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0030,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, /*TVAR_ae_BrAve */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004E,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x005C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0070,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0080,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0012,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x001A,}, /*TVAR_ae_BrAve */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0022,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Minus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x002A,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Default[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0032,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_1[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003F,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_2[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x004C,}, /*TVAR_ae_BrAve 1101 0060->005C */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_3[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0059,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_EV_Plus_4[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0066,}, /*TVAR_ae_BrAve */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Default[] = { -/*scene Backlight landscape*/ -//scene Backlight landscape -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0100,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0302,}, -{0x0F12, 0x0203,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0201,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0102,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0202,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -// Sharpness 0 -{0x002A, 0x0A28,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0ADE,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0B94,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0C4A,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower -{0x002A, 0x0D00,}, -{0x0F12, 0x6024,}, //_ee_iLowSharpPower - -// Saturation 0 -{0x002A, 0x0234,}, -{0x0F12, 0x0000,}, //REG_TC_UserSaturation -{0x002A, 0x06B8,}, -{0x0F12, 0x802C,}, //0x452C,}, -{0x0F12, 0x0005,}, //lt_uMaxLei - -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS - -{0x002A, 0x0A1E,}, -{0x0F12, 0x0350,},//_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x002A, 0x0AD4,}, -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset - -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x3F80,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4080,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4100,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4150,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -//AE Concept -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0xC350,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 //029Ah:15fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x03B4,}, -{0x0F12, 0x0535,},//REG_0TC_CCFG_usMaxFrTimeMsecMult10 //0535h:7.5fps -{0x0F12, 0x029A,},//REG_0TC_CCFG_usMinFrTimeMsecMult10 //029Ah:15fps - -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, //afit_bUseNB_Afit - -{0x002A, 0x04E6,}, -{0x0F12, 0x077F,}, //REG_TC_DBG_AutoAlgEnBits - -{0x002A, 0x1484,}, -{0x0F12, 0x003C,}, - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, -{0x0F12, 0x00EF,}, - -{0x002A, 0x04D0,}, -{0x0F12, 0x0000,}, //REG_SF_USER_IsoType -{0x0F12, 0x0000,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged - -{0x002A, 0x06C2,}, -{0x0F12, 0x0200,}, //lt_bUseSecISODgain - -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, //af_search_usSingleAfFlags - -{0x002A, 0x15E8,}, -{0x0F12, 0x0018,}, //af_pos_usTableLastInd -{0x0F12, 0x002A,}, -{0x0F12, 0x0030,}, -{0x0F12, 0x0036,}, -{0x0F12, 0x003C,}, -{0x0F12, 0x0042,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x004E,}, -{0x0F12, 0x0054,}, -{0x0F12, 0x005A,}, -{0x0F12, 0x0060,}, -{0x0F12, 0x0066,}, -{0x0F12, 0x006C,}, -{0x0F12, 0x0072,}, -{0x0F12, 0x0078,}, -{0x0F12, 0x007E,}, -{0x0F12, 0x0084,}, -{0x0F12, 0x008A,}, -{0x0F12, 0x0090,}, -{0x0F12, 0x0096,}, -{0x0F12, 0x009C,}, -{0x0F12, 0x00A2,}, -{0x0F12, 0x00A8,}, -{0x0F12, 0x00AE,}, -{0x0F12, 0x00B4,}, -{0x0F12, 0x00BA,}, - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Portrait[] = { -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0ADE,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0B94,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0C4A,}, -{0x0F12, 0x4020,}, -{0x002A, 0x0D00,}, -{0x0F12, 0x4020,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Nightshot[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x06B8,}, -{0x0F12, 0xFFFF,}, //lt_uMaxLei -{0x0F12, 0x00FF,}, //lt_usMinExp -{0x002A, 0x098C,}, -{0x0F12, 0xFFF0,}, //7000098C AFIT16_BRIGHTNESS -{0x002A, 0x0A1E,}, -{0x0F12, 0x0A78,},//_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -// GAS Alpha Table -{0x002A, 0x08F6,}, -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__0_ R // 2300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_0__3_ B -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__0_ R // 2750K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_1__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_2__0_ R // 3300K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_2__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_3__0_ R // 4150K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_3__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_4__0_ R // 5250K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_4__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_5__0_ R // 6400K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_5__3_ B -{0x0F12, 0x4500,}, //TVAR_ash_GASAlpha_6__0_ R // 7500K -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__1_ GR -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__2_ GB -{0x0F12, 0x4000,}, //TVAR_ash_GASAlpha_6__3_ B - -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x6810,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x8214,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7 -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x07D0,},//REG_0TC_PCFG_usMaxFrTimeMsecMult10 //09C4h:4fps -{0x0F12, 0x014A,},//REG_0TC_PCFG_usMinFrTimeMsecMult10 //014Ah:30fps -{0x002A, 0x03B4,}, -{0x0F12, 0x1388,},//REG_0TC_CCFG_usMaxFrTimeMsecMult10 //1388h:2fps -{0x0F12, 0x1388,},//REG_0TC_CCFG_usMinFrTimeMsecMult10 //1388h:2fps -{0x002A, 0x1648,}, //af_search_usSingleAfFlags -{0x0F12, 0x9000,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0006,}, //af_pos_usTableLastInd -{0x0F12, 0x0036,}, -{0x0F12, 0x003A,}, -{0x0F12, 0x0040,}, -{0x0F12, 0x0048,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0058,}, -{0x0F12, 0x0060,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Backlight[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0000,}, //ae_WeightTbl_16 -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0F01,}, -{0x0F12, 0x010F,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Landscape[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1492,}, -{0x0F12, 0x0101,}, //ae_WeightTbl_16 -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xE082,},//_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0ADE,}, -{0x0F12, 0xE082,},//_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0B94,}, -{0x0F12, 0xE082,},//_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0C4A,}, -{0x0F12, 0xE082,},//_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0D00,}, -{0x0F12, 0xE082,},//_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sports[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x0130,}, //lt_uLimitHigh -{0x0F12, 0x00D0,}, //lt_uLimitLow -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,},//lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0003,}, //REG_SF_USER_IsoType -{0x0F12, 0x0200,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Party_Indoor[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0377,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, //lt_bUseSecISODgain -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Beach_Snow[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1484,}, -{0x0F12, 0x0045,}, //TVAR_ae_BrAve -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x00D0,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0150,}, //lt_bUseSecISODgain -{0x002A, 0x0234,}, -{0x0F12, 0x0030,}, //REG_TC_UserSaturation -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Sunset[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Duskdawn[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x0558,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0955,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fall_Color[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0234,}, -{0x0F12, 0x0060,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Fireworks[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0544,}, -{0x0F12, 0x012C,}, //lt_uLimitHigh -{0x0F12, 0x00D4,}, //lt_uLimitLow -{0x002A, 0x0638,}, -{0x0F12, 0x0001,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_0_ -{0x0F12, 0x0A3C,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_1_ -{0x0F12, 0x0D05,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_2_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_3_ -{0x0F12, 0x3408,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_4_ -{0x0F12, 0xD020,}, -{0x0F12, 0x0000,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_5_ -{0x0F12, 0x0428,}, -{0x0F12, 0x0001,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_6_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_7_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_8_ -{0x0F12, 0x1A80,}, -{0x0F12, 0x0006,}, //lt_ExpGain_ExpCurveGainMaxStr_0__ulExpOut_9_ - -{0x002A, 0x02C2,}, -{0x0F12, 0x03E8,}, //0423_0682,//REG_0TC_PCFG_usMaxFrTimeMsecMult10 09C4h:4fps -{0x0F12, 0x014A,}, //REG_0TC_PCFG_usMinFrTimeMsecMult10 014Ah:30fps - -{0x002A, 0x03B4,}, -{0x0F12, 0x2710,},//REG_0TC_CCFG_usMaxFrTimeMsecMult10 //2710h:1fps -{0x0F12, 0x2710,},//REG_0TC_CCFG_usMinFrTimeMsecMult10 //2710h:1fps -{0x002A, 0x04D0,}, -{0x0F12, 0x0001,}, //REG_SF_USER_IsoType -{0x0F12, 0x0100,}, //REG_SF_USER_IsoVal -{0x0F12, 0x0001,}, //REG_SF_USER_IsoChanged -{0x002A, 0x06C2,}, -{0x0F12, 0x0180,}, //lt_bUseSecISODgain -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Text[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0A28,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0ADE,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0B94,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0C4A,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -{0x002A, 0x0D00,}, -{0x0F12, 0xA060,},/*_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower*/ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Scene_Candle_Light[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x04E6,}, -{0x0F12, 0x0777,}, //REG_TC_DBG_AutoAlgEnBits AWB Off -{0x002A, 0x04BA,}, -{0x0F12, 0x04DA,}, -{0x002A, 0x04BE,}, -{0x0F12, 0x0400,}, -{0x002A, 0x04C2,}, -{0x0F12, 0x0550,}, -{0x002A, 0x04C6,}, -{0x0F12, 0x0001,}, //REG_SF_USER_RGBGainChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_regs[] ={ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreview -{0x0F12, 0x0001,}, //REG_TC_GP_EnablePreviewChanged -//{0xffff, 0x0096,}, // Wait150ms// -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_snapshot_regs[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x026E,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActiveCapConfig -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, //REG_TC_GP_CapConfigChanged -{0x002A, 0x0242,}, -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCapture -{0x0F12, 0x0001,}, //REG_TC_GP_EnableCaptureChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, - -// METERING -{0x002A, 0x1492,}, // Matrix -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, -{0x0F12, 0x0101,}, - -// SHARPNESS n NOISE -{0x002A, 0x0938,}, -{0x0F12, 0x0001,}, //afit_bUseNB_Afit on 1 off 0 -{0x0F12, 0x0014,}, //SARR_uNormBrInDoor_0_ -{0x0F12, 0x00D2,}, //SARR_uNormBrInDoor_1_ -{0x0F12, 0x0784,}, //SARR_uNormBrInDoor_2_ -{0x0F12, 0x10D0,}, //SARR_uNormBrInDoor_3_ -{0x0F12, 0x1388,}, //SARR_uNormBrInDoor_4_ - -{0x002A, 0x098C,}, //AFIT 0 -{0x0F12, 0x0024,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0010,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3040,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3428,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041C,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x3218,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00B0,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0332,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1D22,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000A46 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x00A0,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0250,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1B24,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1540,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0428,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1804,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x141D,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0C0C,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C88,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3C28,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x042C,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1117,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0A0A,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x4C0F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A88,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] bWideWide[1] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0404,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0000,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x0C0F,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x0808,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInCap */ - -{0x002A, 0x02AB,}, -{0x0F12, 0x0006,}, //5 //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /* #REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /* #REG_TC_GP_EnablePreviewChanged */ - -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_camcorder_disable[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3804,}, /*[15:8]fadlc_filter_co_b, [7:0]fadlc_filter_co_a*/ -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, /*senHal_uMinColsNoBin */ - -/* SLOW AE*/ -{0x002A, 0x1568,}, -{0x0F12, 0x0010,}, /*ae_GainIn_0_ */ -{0x0F12, 0x0020,}, /*ae_GainIn_1_ */ -{0x0F12, 0x0040,}, /*ae_GainIn_2_ */ -{0x0F12, 0x0080,}, /*ae_GainIn_3_ */ -{0x0F12, 0x0100,}, /*ae_GainIn_4_ FIX */ -{0x0F12, 0x0200,}, /*ae_GainIn_5_ */ -{0x0F12, 0x0400,}, /*ae_GainIn_6_ */ -{0x0F12, 0x0800,}, /*ae_GainIn_7_ */ -{0x0F12, 0x2000,}, /*ae_GainIn_8_ */ -{0x0F12, 0x0010,}, /*ae_GainOut_0_ */ -{0x0F12, 0x0020,}, /*ae_GainOut_1_ */ -{0x0F12, 0x0040,}, /*ae_GainOut_2_ */ -{0x0F12, 0x0080,}, /*ae_GainOut_3_ */ -{0x0F12, 0x0100,}, /*ae_GainOut_4_ FIX */ -{0x0F12, 0x0200,}, /*ae_GainOut_5_ */ -{0x0F12, 0x0400,}, /*ae_GainOut_6_ */ -{0x0F12, 0x0800,}, /*ae_GainOut_7_ */ -{0x0F12, 0x2000,}, /*ae_GainOut_8_ */ - -{0x002A, 0x0544,}, -{0x0F12, 0x0111,}, /*lt_uLimitHigh */ -{0x0F12, 0x00EF,}, /*lt_uLimitLow */ - -{0x002A, 0x0588,}, -{0x0F12, 0x0002,}, /*lt_uInitPostToleranceCnt*/ -{0x002A, 0x0582,}, -{0x0F12, 0x0000,}, /*lt_uSlowFilterCoef */ -{0x002A, 0x47B0,}, -{0x0F12, 0x0000,}, /*TNP_Regs_BUse1FrameAE (0: off, 1: on) */ -/* SLOW AWB */ -{0x002A, 0x139A,}, -{0x0F12, 0x0258,}, /*0258 awbb_GainsMaxMove*/ -/*AWB Convergence Speed */ -{0x002A, 0x1464,}, -{0x0F12, 0x0008,}, -{0x0F12, 0x0190,}, -{0x0F12, 0x00A0,}, -{0x0F12, 0x0004,}, -/* SHARPNESS n NOISE */ -{0x002A, 0x0938,}, -{0x0F12, 0x0000,}, /* on/off AFIT by NB option */ -{0x0F12, 0x0014,}, /*SARR_uNormBrInDoor */ -{0x0F12, 0x00D2,}, /*SARR_uNormBrInDoor */ -{0x0F12, 0x0384,}, /*SARR_uNormBrInDoor */ -{0x0F12, 0x07D0,}, /*SARR_uNormBrInDoor */ -{0x0F12, 0x1388,}, /*SARR_uNormBrInDoor */ -{0x002A, 0x098C,}, -{0x0F12, 0xFFFB,}, //7000098C AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //7000098E AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000990 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000992 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000994 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000996 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000998 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //7000099A AFIT16_postdmsc_iHighBright -{0x0F12, 0x005F,}, //7000099C AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //7000099E AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //700009A0 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //700009A2 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //700009A4 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //700009A6 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //700009A8 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0040,}, //700009AA AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x00A0,}, //700009AC AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //700009AE AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //700009B0 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //700009B2 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x3604,}, //700009B4 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x032A,}, //700009B6 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //700009B8 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1205,}, //700009BA AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x400D,}, //700009BC AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0080,}, //700009BE AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x2080,}, //700009C0 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3840,}, //700009C2 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0638,}, //700009C4 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //700009C6 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //700009C8 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //700009CA AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //700009CC AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0400,}, //700009CE AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //700009D0 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x102A,}, //700009D2 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //700009D4 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0600,}, //700009D6 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //700009D8 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //700009DA AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //700009DC AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //700009DE AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //700009E0 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2828,}, //700009E2 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x040F,}, //700009E4 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //700009E6 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //700009E8 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1804,}, //700009EA AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //700009EC AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //700009EE AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //700009F0 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //700009F2 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //700009F4 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //700009F6 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0004,}, //700009F8 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //700009FA AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //700009FC AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //700009FE AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000A00 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000A02 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000A04 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000A06 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000A08 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000A0A AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000A0C AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000A0E AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1C04,}, //70000A10 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0214,}, //70000A12 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1002,}, //70000A14 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0610,}, //70000A16 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000A18 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x2818,}, //70000A1A AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000A1C AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0350,}, //70000A1E AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000A20 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000A22 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000A24 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x3141,}, //70000A26 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000A28 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x3140,}, //70000A2A AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000A2C AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000A2E AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000A30 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000A32 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x3601,}, //70000A34 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x242A,}, //70000A36 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x3660,}, //70000A38 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF2A,}, //70000A3A AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000A3C AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000A3E AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000A40 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000A42 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000A44 AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000A46 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000A48 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000A4A AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000A4C AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000A4E AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000A50 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0051,}, //70000A52 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000A54 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000A56 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000A58 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000A5A AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000A5C AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000A5E AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000A60 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000A62 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000A64 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000A66 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000A68 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x2404,}, //70000A6A AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x031B,}, //70000A6C AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0103,}, //70000A6E AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x1004,}, //70000A70 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x3A0C,}, //70000A72 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0070,}, //70000A74 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1C80,}, //70000A76 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x3030,}, //70000A78 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0630,}, //70000A7A AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000A7C AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000A7E AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000A80 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000A82 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000A84 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x245A,}, //70000A86 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1018,}, //70000A88 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000A8A AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0B00,}, //70000A8C AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000A8E AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0505,}, //70000A90 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000A92 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000A94 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000A96 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2928,}, //70000A98 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0415,}, //70000A9A AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000A9C AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x0800,}, //70000A9E AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x1004,}, //70000AA0 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000AA2 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000AA4 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000AA6 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000AA8 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000AAA AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000AAC AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0003,}, //70000AAE AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000AB0 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000AB2 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000AB4 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000AB6 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000AB8 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000ABA AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000ABC AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000ABE AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000AC0 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000AC2 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000AC4 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x1F04,}, //70000AC6 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0218,}, //70000AC8 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1102,}, //70000ACA AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0611,}, //70000ACC AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000ACE AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6418,}, //70000AD0 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000AD2 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0380,}, //70000AD4 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000AD6 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000AD8 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000ADA AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2832,}, //70000ADC AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000ADE AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x272C,}, //70000AE0 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000AE2 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000AE4 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000AE6 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000AE8 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x2401,}, //70000AEA AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x241B,}, //70000AEC AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x1E60,}, //70000AEE AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF18,}, //70000AF0 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000AF2 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000AF4 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000AF6 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000AF8 AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000AFA AFIT16_CONTRAST -{0x0F12, 0xFFFB,}, //70000AFC AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000AFE AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000B00 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000B02 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000B04 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000B06 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0043,}, //70000B08 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000B0A AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000B0C AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000B0E AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000B10 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000B12 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000B14 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000B16 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000B18 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000B1A AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000B1C AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000B1E AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1B04,}, //70000B20 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x0312,}, //70000B22 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000B24 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0C03,}, //70000B26 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2806,}, //70000B28 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0060,}, //70000B2A AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1580,}, //70000B2C AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2020,}, //70000B2E AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000B30 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000B32 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000B34 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000B36 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000B38 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000B3A AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000B3C AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000B3E AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000B40 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x0E00,}, //70000B42 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000B44 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0504,}, //70000B46 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000B48 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000B4A AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000B4C AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x2B28,}, //70000B4E AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0417,}, //70000B50 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000B52 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0x8000,}, //70000B54 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0A04,}, //70000B56 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000B58 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000B5A AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000B5C AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000B5E AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000B60 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000B62 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000B64 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000B66 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000B68 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000B6A AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000B6C AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000B6E AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000B70 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0207,}, //70000B72 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000B74 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000B76 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000B78 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000B7A AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2404,}, //70000B7C AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0221,}, //70000B7E AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1202,}, //70000B80 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0613,}, //70000B82 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000B84 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000B86 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000B88 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000B8A AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000B8C AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000B8E AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000B90 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x2630,}, //70000B92 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000B94 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1616,}, //70000B96 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000B98 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000B9A AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000B9C AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000B9E AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1B01,}, //70000BA0 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x2412,}, //70000BA2 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0C60,}, //70000BA4 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0C,}, //70000BA6 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000BA8 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000BAA AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000BAC AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000BAE AFIT16_BRIGHTNESS -{0x0F12, 0x0000,}, //70000BB0 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000BB2 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000BB4 AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000BB6 AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000BB8 AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000BBA AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000BBC AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000BBE AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000BC0 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000BC2 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000BC4 AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000BC6 AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000BC8 AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000BCA AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000BCC AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000BCE AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000BD0 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000BD2 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000BD4 AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x1504,}, //70000BD6 AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030F,}, //70000BD8 AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000BDA AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0902,}, //70000BDC AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x2004,}, //70000BDE AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0050,}, //70000BE0 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x1140,}, //70000BE2 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x201C,}, //70000BE4 AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000BE6 AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000BE8 AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000BEA AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000BEC AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000BEE AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0300,}, //70000BF0 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000BF2 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000BF4 AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000BF6 AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1000,}, //70000BF8 AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000BFA AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0503,}, //70000BFC AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000BFE AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000C00 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000C02 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x3028,}, //70000C04 AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x041A,}, //70000C06 AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000C08 AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000C0A AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0904,}, //70000C0C AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000C0E AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000C10 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000C12 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000C14 AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000C16 AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000C18 AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000C1A AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000C1C AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000C1E AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000C20 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000C22 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000C24 AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000C26 AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0206,}, //70000C28 AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000C2A AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000C2C AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0305,}, //70000C2E AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0406,}, //70000C30 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2804,}, //70000C32 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x0228,}, //70000C34 AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000C36 AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000C38 AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000C3A AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000C3C AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000C3E AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000C40 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000C42 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000C44 AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000C46 AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x232B,}, //70000C48 AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000C4A AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1414,}, //70000C4C AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000C4E AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000C50 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000C52 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000C54 AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x1501,}, //70000C56 AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240F,}, //70000C58 AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0A60,}, //70000C5A AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF0A,}, //70000C5C AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000C5E AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000C60 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000C62 AFITB_bnr_nClustLevel_C [0] -{0x0F12, 0x0000,}, //70000C64 AFIT16_BRIGHTNESS //AFIT 4 -{0x0F12, 0x0000,}, //70000C66 AFIT16_CONTRAST -{0x0F12, 0x0000,}, //70000C68 AFIT16_SATURATION -{0x0F12, 0x0000,}, //70000C6A AFIT16_SHARP_BLUR -{0x0F12, 0x0000,}, //70000C6C AFIT16_GLAMOUR -{0x0F12, 0x00C0,}, //70000C6E AFIT16_bnr_edge_high -{0x0F12, 0x0064,}, //70000C70 AFIT16_postdmsc_iLowBright -{0x0F12, 0x0384,}, //70000C72 AFIT16_postdmsc_iHighBright -{0x0F12, 0x0032,}, //70000C74 AFIT16_postdmsc_iLowSat -{0x0F12, 0x01F4,}, //70000C76 AFIT16_postdmsc_iHighSat -{0x0F12, 0x0070,}, //70000C78 AFIT16_postdmsc_iTune -{0x0F12, 0x0040,}, //70000C7A AFIT16_yuvemix_mNegRanges_0 -{0x0F12, 0x00A0,}, //70000C7C AFIT16_yuvemix_mNegRanges_1 -{0x0F12, 0x0100,}, //70000C7E AFIT16_yuvemix_mNegRanges_2 -{0x0F12, 0x0010,}, //70000C80 AFIT16_yuvemix_mPosRanges_0 -{0x0F12, 0x0060,}, //70000C82 AFIT16_yuvemix_mPosRanges_1 -{0x0F12, 0x0100,}, //70000C84 AFIT16_yuvemix_mPosRanges_2 -{0x0F12, 0x1430,}, //70000C86 AFIT8_bnr_edge_low [7:0] AFIT8_bnr_repl_thresh -{0x0F12, 0x0201,}, //70000C88 AFIT8_bnr_repl_force [7:0] AFIT8_bnr_iHotThreshHigh -{0x0F12, 0x0204,}, //70000C8A AFIT8_bnr_iHotThreshLow [7:0] AFIT8_bnr_iColdThreshHigh -{0x0F12, 0x0F04,}, //70000C8C AFIT8_bnr_iColdThreshLow [7:0] AFIT8_bnr_DispTH_Low -{0x0F12, 0x030C,}, //70000C8E AFIT8_bnr_DispTH_High [7:0] AFIT8_bnr_DISP_Limit_Low -{0x0F12, 0x0003,}, //70000C90 AFIT8_bnr_DISP_Limit_High [7:0] AFIT8_bnr_iDistSigmaMin -{0x0F12, 0x0602,}, //70000C92 AFIT8_bnr_iDistSigmaMax [7:0] AFIT8_bnr_iDiffSigmaLow -{0x0F12, 0x1803,}, //70000C94 AFIT8_bnr_iDiffSigmaHigh [7:0] AFIT8_bnr_iNormalizedSTD_TH -{0x0F12, 0x0040,}, //70000C96 AFIT8_bnr_iNormalizedSTD_Limit [7:0] AFIT8_bnr_iDirNRTune -{0x0F12, 0x0E20,}, //70000C98 AFIT8_bnr_iDirMinThres [7:0] AFIT8_bnr_iDirFltDiffThresHigh -{0x0F12, 0x2018,}, //70000C9A AFIT8_bnr_iDirFltDiffThresLow [7:0] AFIT8_bnr_iDirSmoothPowerHigh -{0x0F12, 0x0620,}, //70000C9C AFIT8_bnr_iDirSmoothPowerLow [7:0] AFIT8_bnr_iLowMaxSlopeAllowed -{0x0F12, 0x0306,}, //70000C9E AFIT8_bnr_iHighMaxSlopeAllowed [7:0] AFIT8_bnr_iLowSlopeThresh -{0x0F12, 0x2003,}, //70000CA0 AFIT8_bnr_iHighSlopeThresh [7:0] AFIT8_bnr_iSlopenessTH -{0x0F12, 0xFF01,}, //70000CA2 AFIT8_bnr_iSlopeBlurStrength [7:0] AFIT8_bnr_iSlopenessLimit -{0x0F12, 0x0000,}, //70000CA4 AFIT8_bnr_AddNoisePower1 [7:0] AFIT8_bnr_AddNoisePower2 -{0x0F12, 0x0200,}, //70000CA6 AFIT8_bnr_iRadialTune [7:0] AFIT8_bnr_iRadialPower -{0x0F12, 0x145A,}, //70000CA8 AFIT8_bnr_iRadialLimit [7:0] AFIT8_ee_iFSMagThLow -{0x0F12, 0x1010,}, //70000CAA AFIT8_ee_iFSMagThHigh [7:0] AFIT8_ee_iFSVarThLow -{0x0F12, 0x000B,}, //70000CAC AFIT8_ee_iFSVarThHigh [7:0] AFIT8_ee_iFSThLow -{0x0F12, 0x1200,}, //70000CAE AFIT8_ee_iFSThHigh [7:0] AFIT8_ee_iFSmagPower -{0x0F12, 0x5A0F,}, //70000CB0 AFIT8_ee_iFSVarCountTh [7:0] AFIT8_ee_iRadialLimit -{0x0F12, 0x0502,}, //70000CB2 AFIT8_ee_iRadialPower [7:0] AFIT8_ee_iSmoothEdgeSlope -{0x0F12, 0x1802,}, //70000CB4 AFIT8_ee_iROADThres [7:0] AFIT8_ee_iROADMaxNR -{0x0F12, 0x0000,}, //70000CB6 AFIT8_ee_iROADSubMaxNR [7:0] AFIT8_ee_iROADSubThres -{0x0F12, 0x2006,}, //70000CB8 AFIT8_ee_iROADNeiThres [7:0] AFIT8_ee_iROADNeiMaxNR -{0x0F12, 0x4028,}, //70000CBA AFIT8_ee_iSmoothEdgeThres [7:0] AFIT8_ee_iMSharpen -{0x0F12, 0x0430,}, //70000CBC AFIT8_ee_iWSharpen [7:0] AFIT8_ee_iMShThresh -{0x0F12, 0x0101,}, //70000CBE AFIT8_ee_iWShThresh [7:0] AFIT8_ee_iReduceNegative -{0x0F12, 0xFF00,}, //70000CC0 AFIT8_ee_iEmbossCentAdd [7:0] AFIT8_ee_iShDespeckle -{0x0F12, 0x0804,}, //70000CC2 AFIT8_ee_iReduceEdgeThresh [7:0] AFIT8_dmsc_iEnhThresh -{0x0F12, 0x4008,}, //70000CC4 AFIT8_dmsc_iDesatThresh [7:0] AFIT8_dmsc_iDemBlurHigh -{0x0F12, 0x0540,}, //70000CC6 AFIT8_dmsc_iDemBlurLow [7:0] AFIT8_dmsc_iDemBlurRange -{0x0F12, 0x8006,}, //70000CC8 AFIT8_dmsc_iDecisionThresh [7:0] AFIT8_dmsc_iCentGrad -{0x0F12, 0x0020,}, //70000CCA AFIT8_dmsc_iMonochrom [7:0] AFIT8_dmsc_iGBDenoiseVal -{0x0F12, 0x0000,}, //70000CCC AFIT8_dmsc_iGRDenoiseVal [7:0] AFIT8_dmsc_iEdgeDesatThrHigh -{0x0F12, 0x1800,}, //70000CCE AFIT8_dmsc_iEdgeDesatThrLow [7:0] AFIT8_dmsc_iEdgeDesat -{0x0F12, 0x0002,}, //70000CD0 AFIT8_dmsc_iNearGrayDesat [7:0] AFIT8_dmsc_iEdgeDesatLimit -{0x0F12, 0x1E10,}, //70000CD2 AFIT8_postdmsc_iBCoeff [7:0] AFIT8_postdmsc_iGCoeff -{0x0F12, 0x000B,}, //70000CD4 AFIT8_postdmsc_iWideMult [7:0] AFIT8_yuvemix_mNegSlopes_0 -{0x0F12, 0x0607,}, //70000CD6 AFIT8_yuvemix_mNegSlopes_1 [7:0] AFIT8_yuvemix_mNegSlopes_2 -{0x0F12, 0x0005,}, //70000CD8 AFIT8_yuvemix_mNegSlopes_3 [7:0] AFIT8_yuvemix_mPosSlopes_0 -{0x0F12, 0x0607,}, //70000CDA AFIT8_yuvemix_mPosSlopes_1 [7:0] AFIT8_yuvemix_mPosSlopes_2 -{0x0F12, 0x0405,}, //70000CDC AFIT8_yuvemix_mPosSlopes_3 [7:0] AFIT8_yuviirnr_iXSupportY -{0x0F12, 0x0205,}, //70000CDE AFIT8_yuviirnr_iXSupportUV [7:0] AFIT8_yuviirnr_iLowYNorm -{0x0F12, 0x0304,}, //70000CE0 AFIT8_yuviirnr_iHighYNorm [7:0] AFIT8_yuviirnr_iLowUVNorm -{0x0F12, 0x0409,}, //70000CE2 AFIT8_yuviirnr_iHighUVNorm [7:0] AFIT8_yuviirnr_iYNormShift -{0x0F12, 0x0306,}, //70000CE4 AFIT8_yuviirnr_iUVNormShift [7:0] AFIT8_yuviirnr_iVertLength_Y -{0x0F12, 0x0407,}, //70000CE6 AFIT8_yuviirnr_iVertLength_UV [7:0] AFIT8_yuviirnr_iDiffThreshL_Y -{0x0F12, 0x2C04,}, //70000CE8 AFIT8_yuviirnr_iDiffThreshH_Y [7:0] AFIT8_yuviirnr_iDiffThreshL_UV -{0x0F12, 0x022C,}, //70000CEA AFIT8_yuviirnr_iDiffThreshH_UV [7:0] AFIT8_yuviirnr_iMaxThreshL_Y -{0x0F12, 0x1402,}, //70000CEC AFIT8_yuviirnr_iMaxThreshH_Y [7:0] AFIT8_yuviirnr_iMaxThreshL_UV -{0x0F12, 0x0618,}, //70000CEE AFIT8_yuviirnr_iMaxThreshH_UV [7:0] AFIT8_yuviirnr_iYNRStrengthL -{0x0F12, 0x1A02,}, //70000CF0 AFIT8_yuviirnr_iYNRStrengthH [7:0] AFIT8_yuviirnr_iUVNRStrengthL -{0x0F12, 0x6E18,}, //70000CF2 AFIT8_yuviirnr_iUVNRStrengthH [7:0] AFIT8_byr_gras_iShadingPower -{0x0F12, 0x0080,}, //70000CF4 AFIT8_RGBGamma2_iLinearity [7:0] AFIT8_RGBGamma2_iDarkReduce -{0x0F12, 0x0080,}, //70000CF6 AFIT8_ccm_oscar_iSaturation [7:0] AFIT8_RGB2YUV_iYOffset -{0x0F12, 0x0180,}, //70000CF8 AFIT8_RGB2YUV_iRGBGain [7:0] AFIT8_bnr_nClustLevel_H -{0x0F12, 0x0A0A,}, //70000CFA AFIT8_bnr_iClustMulT_H [7:0] AFIT8_bnr_iClustMulT_C -{0x0F12, 0x0101,}, //70000CFC AFIT8_bnr_iClustThresh_H [7:0] AFIT8_bnr_iClustThresh_C -{0x0F12, 0x1114,}, //70000CFE AFIT8_bnr_iDenThreshLow [7:0] AFIT8_bnr_iDenThreshHigh -{0x0F12, 0x6024,}, //70000D00 AFIT8_ee_iLowSharpPower [7:0] AFIT8_ee_iHighSharpPower -{0x0F12, 0x1212,}, //70000D02 AFIT8_ee_iLowShDenoise [7:0] AFIT8_ee_iHighShDenoise -{0x0F12, 0xFFFF,}, //70000D04 AFIT8_ee_iLowSharpClamp [7:0] AFIT8_ee_iHighSharpClamp -{0x0F12, 0x0808,}, //70000D06 AFIT8_ee_iReduceEdgeMinMult [7:0] AFIT8_ee_iReduceEdgeSlope -{0x0F12, 0x0A01,}, //70000D08 AFIT8_bnr_nClustLevel_H_Bin [7:0] AFIT8_bnr_iClustMulT_H_Bin -{0x0F12, 0x010A,}, //70000D0A AFIT8_bnr_iClustMulT_C_Bin [7:0] AFIT8_bnr_iClustThresh_H_Bin -{0x0F12, 0x0F01,}, //70000D0C AFIT8_bnr_iClustThresh_C_Bin [7:0] AFIT8_bnr_iDenThreshLow_Bin -{0x0F12, 0x240C,}, //70000D0E AFIT8_bnr_iDenThreshHigh_Bin [7:0] AFIT8_ee_iLowSharpPower_Bin -{0x0F12, 0x0860,}, //70000D10 AFIT8_ee_iHighSharpPower_Bin [7:0] AFIT8_ee_iLowShDenoise_Bin -{0x0F12, 0xFF08,}, //70000D12 AFIT8_ee_iHighShDenoise_Bin [7:0] AFIT8_ee_iLowSharpClamp_Bin -{0x0F12, 0x08FF,}, //70000D14 AFIT8_ee_iHighSharpClamp_Bin [7:0] AFIT8_ee_iReduceEdgeMinMult_Bin -{0x0F12, 0x0008,}, //70000D16 AFIT8_ee_iReduceEdgeSlope_Bin [7:0] -{0x0F12, 0x0001,}, //70000D18 AFITB_bnr_nClustLevel_C [0] bWideWide[1] - -{0x002A, 0x060C,}, -{0x0F12, 0x0800,}, /*lt_ExpGain_ExpCurveGainMaxStr*/ -/* FOR HD CAMCORDER */ -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInCap */ -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, //0280 /*REG_0TC_PCFG_usWidth */ -{0x0F12, 0x03C0,}, //01E0 /*REG_0TC_PCFG_usHeight */ -{0x002A, 0x02AB,}, -{0x0F12, 0x0005,}, //REG_0TC_PCFG_Format 05 : yuv (0~255) 06:yuv (16~234) 07: raw 09 : jpeg -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /* #REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_PrevConfigChanged */ -{0x002A, 0x0270,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_CapConfigChanged */ -{0x002A, 0x023E,}, -{0x0F12, 0x0001,}, /* #REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /* #REG_TC_GP_EnablePreviewChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_ae_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C5E,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_lock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_awb_unlock[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x2C66,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_normal_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, - -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, - -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9002,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0015,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_macro_af[] = { -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x00D0,}, - -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, - -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x9042,}, -{0x002A, 0x15E8,}, -{0x0F12, 0x0017,}, //af_pos_usTableLastInd -{0x0F12, 0x0032,}, -{0x0F12, 0x0038,}, -{0x0F12, 0x003E,}, -{0x0F12, 0x0044,}, -{0x0F12, 0x004A,}, -{0x0F12, 0x0050,}, -{0x0F12, 0x0056,}, -{0x0F12, 0x005C,}, -{0x0F12, 0x0062,}, -{0x0F12, 0x0068,}, -{0x0F12, 0x006E,}, -{0x0F12, 0x0074,}, -{0x0F12, 0x007A,}, -{0x0F12, 0x0080,}, -{0x0F12, 0x0086,}, -{0x0F12, 0x008C,}, -{0x0F12, 0x0092,}, -{0x0F12, 0x0098,}, -{0x0F12, 0x009E,}, -{0x0F12, 0x00A4,}, -{0x0F12, 0x00AA,}, -{0x0F12, 0x00B0,}, -{0x0F12, 0x00C0,}, -{0x0F12, 0x00D0,}, -{0x002A, 0x15DA,}, -{0x0F12, 0x1700,}, // 16 start number of table 00 End number of table -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_af[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0005,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_focus_mode_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028E,}, -{0x0F12, 0x0000,}, -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 1 table - -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x028C,}, -{0x0F12, 0x0004,}, //REG_TC_AF_AfCmd -{0xFFFF, 0x0064,}, //SLEEP for 50 msec // ---------------------put normal mode 2 table -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1648,}, -{0x0F12, 0x1002,}, //2nd search on when 2nd search lens oppsite direction moving -{0xFFFF, 0x0032,}, //SLEEP for 50 msec -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17FC,}, /* fls_FlashWP_0_Pre_Flash_Start*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Pre_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x1800,}, /*fls_afl_FlashWP_Weight_0_Pre_Flash_end*/ -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,},/*fls_afl_FlashMode:Flash alg start*/ -{0x0F12, 0x0001,}, -{0x002A, 0x180C,},/*fls_afl_FlashWP_Weight_4:flash br avg*/ -{0x0F12, 0x0027,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_Main_Flash_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x17E8,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_On[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_FAST_AE_Off[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x0588,}, /*fls_afl_FlashMode Flash alg end*/ -{0x0F12, 0x0002,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_auto[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x03E8,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 03E8h:10fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_fps_30[] = { -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xF132,}, -{0x0F12, 0x0006,}, -{0x002A, 0xF142,}, -{0x0F12, 0x0000,}, //110404 AE haunting -{0x0028, 0x7000,}, -{0x002A, 0x02BE,}, -{0x0F12, 0x0000,}, /*usFrTimeType*/ -{0x0F12, 0x0001,}, /*REG_0TC_PCFG_FrRateQualityType */ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMaxFrTimeMsecMult10 */ /* 014Ah:30fps*/ -{0x0F12, 0x014A,}, /*REG_0TC_PCFG_usMinFrTimeMsecMult10 */ /*014Ah:30fps*/ -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_ActivePrevConfig */ -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevOpenAfterChange */ -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_NewConfigSync */ -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_PrevConfigChanged */ -}; - - -static struct msm_camera_i2c_reg_conf s5k4ecgx_reset_touchaf[] = { -//AF Window Settings -{0x002A, 0x0294,}, -{0x0F12, 0x0100,}, //REG_TC_AF_FstWinStartX -{0x0F12, 0x00E3,}, //REG_TC_AF_FstWinStartY -{0x0F12, 0x0200,}, //REG_TC_AF_FstWinSizeX -{0x0F12, 0x0238,}, //REG_TC_AF_FstWinSizeY -{0x0F12, 0x01C6,}, //REG_TC_AF_ScndWinStartX -{0x0F12, 0x0166,}, //REG_TC_AF_ScndWinStartY -{0x0F12, 0x0074,}, //REG_TC_AF_ScndWinSizeX -{0x0F12, 0x0132,}, //REG_TC_AF_ScndWinSizeY -{0x0F12, 0x0001,}, //REG_TC_AF_WinSizesUpdated -}; - - -#if !defined(FLICKER_DEFAULT) -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_60hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0001,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_anti_banding_50hz_auto[]= -{ -{0x002A, 0x0F30,}, -{0x0F12, 0x0001,}, ///*AFC_D_ConvAccelerPower */ -{0x002A, 0x0F2A,}, -{0x0F12, 0x0000,}, ///*AFC_Default BIT[0] 1:60Hz 0:50Hz */ -}; -#endif - -static struct msm_camera_i2c_reg_conf s5k4ecgx_vendor_id_read_prep[] = { -// OTP read mode -{0x0028, 0xD000,}, -{0x002A, 0x0012,}, -{0x0F12, 0x0001,}, -{0x002A, 0x007A,}, -{0x0F12, 0x0000,}, -{0x002A, 0xA000,}, -{0x0F12, 0x0004,}, -{0x002A, 0xA002,}, -{0x0F12, 0x0006,}, // 6page_select -{0x002A, 0xA000,}, -{0x0F12, 0x0001,}, // set read mode -{0xFFFF, 0x0064,}, /*Delay 100ms*/ -{0x002C, 0xD000,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_640_480[]= -{ -{0xFCFC, 0xD000,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, //senHal_uAddColsBin -{0x0F12, 0x0060,}, //senHal_uAddColsNoBin -{0x0F12, 0x06C8,}, //senHal_uMinColsBin -{0x0F12, 0x06C8,}, //senHal_uMinColsNoBin - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2576)/2 -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1932)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, //REG_TC_GP_bUseReqInputInPre - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0280,}, //REG_0TC_PCFG_usWidth //640 -{0x0F12, 0x01E0,}, //REG_0TC_PCFG_usHeight //480 - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, //REG_TC_GP_ActivePrevConfig -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevOpenAfterChange -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, //REG_TC_GP_NewConfigSync -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, //REG_TC_GP_PrevConfigChanged -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_720[]={ -{0xFCFC, 0xD000,}, -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, - -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, //0x07DC,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, //0x05C0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //0x0A00,}, /*REG_TC_GP_PrevReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_GP_PrevReqInputHeight //1536 */ -{0x0F12, 0x0008,}, //0x0010,}, /*REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2*/ -{0x0F12, 0x00FC,}, /*REG_TC_GP_PrevInputHeightOfs/(1944-1536)/2*/ -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //0x0A00,}, /*REG_TC_PZOOM_PrevZoomReqInputWidth //2560 */ -{0x0F12, 0x05A0,}, /*REG_TC_PZOOM_PrevZoomReqInputHeight //1536 */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputWidthOfs */ -{0x0F12, 0x0000,}, /*REG_TC_PZOOM_PrevZoomReqInputHeightOfs */ -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x02D0,}, /*REG_0TC_PCFG_usHeight //720 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_preview_1280_960[]={ -{0xFCFC, 0xD000,}, - -{0x0028, 0xD000,}, -{0x002A, 0xE410,}, -{0x0F12, 0x3E01,}, - -{0x0028, 0x7000,}, -{0x002A, 0x18AC,}, -{0x0F12, 0x0060,}, /*senHal_uAddColsBin */ - -{0x0F12, 0x0060,}, /*senHal_uAddColsNoBin */ -{0x0F12, 0x0A20,}, /*senHal_uMinColsBin */ -{0x0F12, 0x0AB0,}, /*senHal_uMinColsNoBin */ - -{0x002A, 0x0250,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_GP_PrevReqInputWidth //2560 -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_GP_PrevReqInputHeight //1920 -{0x0F12, 0x0008,}, //0x0010,}, //REG_TC_GP_PrevInputWidthOfs //(2592-2560)/2 -{0x0F12, 0x0006,}, //0x000C,}, //REG_TC_GP_PrevInputHeightOfs //(1944-1920)/2 - -{0x002A, 0x0262,}, -{0x0F12, 0x0001,}, /*REG_TC_GP_bUseReqInputInPre */ - -{0x002A, 0x0494,}, -{0x0F12, 0x0A10,}, //0x0A00,}, //REG_TC_PZOOM_PrevZoomReqInputWidth //2560 -{0x0F12, 0x078C,}, //0x0780,}, //REG_TC_PZOOM_PrevZoomReqInputHeight //1920 -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputWidthOfs -{0x0F12, 0x0000,}, //REG_TC_PZOOM_PrevZoomReqInputHeightOfs - -{0x002A, 0x02A6,}, -{0x0F12, 0x0500,}, /*REG_0TC_PCFG_usWidth //1280 */ -{0x0F12, 0x03C0,}, /*REG_0TC_PCFG_usHeight //960 */ - -{0x002A, 0x0266,}, -{0x0F12, 0x0000,}, -{0x002A, 0x026A,}, -{0x0F12, 0x0001,}, -{0x002A, 0x024E,}, -{0x0F12, 0x0001,}, -{0x002A, 0x0268,}, -{0x0F12, 0x0001,}, -}; - -static struct msm_camera_i2c_reg_conf s5k4ecgx_stop_stream[]={ -{0x0028, 0x7000,}, -{0x002A, 0x023E,}, -{0x0F12, 0x0000,}, /*REG_TC_GP_EnablePreview */ -{0x0F12, 0x0001,}, /*REG_TC_GP_EnablePreviewChanged */ -{0xFFFF, 0x000A,}, /*Delay 10ms*/ -}; - -#endif - diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_yuv.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_yuv.c deleted file mode 100755 index c26198e2ef3f..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/s5k4ecgx_yuv.c +++ /dev/null @@ -1,1569 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - */ - -//#define NO_BURST // Enable no burst mode for Tunning - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#define NO_BURST // Enable no burst mode for Tunning -#endif - -#include "s5k4ecgx.h" - -#if defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "s5k4ecgx_regs_gte.h" -#elif defined(CONFIG_SEC_J1X_PROJECT) -#include "s5k4ecgx_regs_j1x.h" -#else -#include "s5k4ecgx_regs.h" -#endif - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifdef CONFIG_LOAD_FILE -#define S5K4ECGX_WRITE_LIST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_regs_from_sd_tunning(A,s_ctrl,#A); - -#elif defined(NO_BURST) - -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) S5K4ECGX_WRITE_LIST(A) -#else -#define S5K4ECGX_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_WORD_DATA); CDBG("REGSEQ *** %s", #A) -#define S5K4ECGX_WRITE_LIST_BURST(A) \ - s5k4ecgx_sensor_burst_write(s_ctrl, A, ARRAY_SIZE(A)); \ -CDBG("REGSEQ *** BURST %s", #A) -#endif - -#define S5K4ECGX_WRITE_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) - -#define S5K4ECGX_READ_ADDR(A,B) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( \ - s_ctrl->sensor_i2c_client,A, B, MSM_CAMERA_I2C_WORD_DATA) - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *s5k4ecgx_regs_table; -static int s5k4ecgx_regs_table_size; -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void s5k4ecgx_regs_table_init(char *filename); -void s5k4ecgx_regs_table_exit(void); -#endif - -static struct s5k4ecgx_ctrl s5k4ecgx_ctrl; - -#if 1 -extern uint16_t rear_vendor_id; -#endif - -#if !defined(CONFIG_SEC_J1X_PROJECT) -#define set_led_flash(x) do{}while(0) -#endif - -int s5k4ecgx_sensor_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int rc = 0; - uint16_t chipid = 0; - const char *sensor_name = NULL; - struct msm_camera_slave_info *slave_info = NULL; - struct msm_camera_i2c_client *sensor_i2c_client = NULL; - enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA; - - sensor_i2c_client = s_ctrl->sensor_i2c_client; - slave_info = s_ctrl->sensordata->slave_info; - sensor_name = s_ctrl->sensordata->sensor_name; - - if (!sensor_i2c_client || !slave_info || !sensor_name) { - pr_err("%s:%d failed: %p %p %p\n", - __func__, __LINE__, sensor_i2c_client, slave_info, - sensor_name); - return -EINVAL; - } - - - printk("%s:%d sensor[%s] sid = 0x%X sensorid = 0x%X DATA TYPE = %d\n E", - __func__, __LINE__, sensor_name, sensor_i2c_client->cci_client->sid, - slave_info->sensor_id, data_type); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_vendor_id_read_prep); - - rear_vendor_id = 0; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, 0xA006 /*slave_info->sensor_id_reg_addr*/, - &chipid, data_type); - - if (chipid) - rear_vendor_id = (chipid & 0xFF00); - else - goto out; - - chipid = 0; - rc = sensor_i2c_client->i2c_func_tbl->i2c_read( - sensor_i2c_client, 0xA007 /*slave_info->sensor_id_reg_addr*/, - &chipid, data_type); - - if (chipid) - rear_vendor_id |= ((chipid & 0xFF00) >> 8); - - if (rear_vendor_id != slave_info->sensor_id) { - pr_err("%s:%d sensor_id doesnot match Read[0x%4x] Expected[0x%4x]\n", - __func__, __LINE__, rear_vendor_id, slave_info->sensor_id); - } - - return 0; -out: - pr_err("%s:%d sensor_id read error.\n", __func__, __LINE__); - rear_vendor_id = 0xFFFF; - return 0; -} - -#if 1 -int32_t s5k4ecgx_sensor_burst_write(struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size) -{ - int i; - int idx = 0; - int burst_flag = 0; - int err = -EINVAL; - uint16_t subaddr; - uint16_t value; - static uint8_t burst_data[BURST_MODE_BUFFER_MAX_SIZE * 2] = {0}; - - // burst write related variables - struct msm_camera_i2c_burst_reg_array burst_reg_setting = { 0 ,}; - struct msm_camera_i2c_reg_setting conf_array = { - .reg_setting = (void * ) &burst_reg_setting, - .size = 1, - .addr_type = MSM_CAMERA_I2C_WORD_ADDR, - .data_type = MSM_CAMERA_I2C_BURST_DATA, - }; - - CDBG("E"); - - // read the register settings array - for (i = 0; i < size; ++i) { - if (idx >= BURST_MODE_BUFFER_MAX_SIZE) { - burst_flag = 0; - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx * 2; - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", __func__, __LINE__); - goto on_error; - } - } - - // the register address - subaddr = reg_settings[i].reg_addr; - - // the register value - value = reg_settings[i].reg_data; - - if (burst_flag == 0) { - if ( (subaddr == BURST_REG) && \ - (reg_settings[i+1].reg_addr == BURST_REG)) { - //burst mode start - burst_flag = 1; - burst_reg_setting.reg_addr = subaddr; - /* MSB has to go 1st for I2C write */ - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - continue; - } - - // write the register setting - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write( \ - s_ctrl->sensor_i2c_client, subaddr, \ - value, MSM_CAMERA_I2C_WORD_DATA); - - } else if (burst_flag == 1) { - burst_data[idx * 2] = (value & 0xFF00) >> 8; /* MSB */ - burst_data[idx * 2 + 1] = value & 0x00FF; /* LSB */ - idx++; - - if ((subaddr == BURST_REG) && (i + 1 >= size || \ - (reg_settings[i+1].reg_addr != BURST_REG))) { - // burst mode end. - burst_flag = 0; - - - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx * 2; - - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", \ - __func__, __LINE__); - goto on_error; - } - } - } - } - -on_error: - if (unlikely(err < 0)) { - pr_err("[%s:%d] register set failed\n", __func__, __LINE__); - } - CDBG("X"); - return err; -} -#endif - -int32_t s5k4ecgx_set_ae_awb(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - if (mode) { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 0) { - CDBG("AWB_AE_LOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_lock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_lock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 1; - } - } else { - if (s5k4ecgx_ctrl.settings.ae_awb_lock == 1) { - CDBG("AWB_AE_UNLOCK"); - if (s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_AUTO \ - || s5k4ecgx_ctrl.settings.wb == CAMERA_WHITE_BALANCE_OFF) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - S5K4ECGX_WRITE_LIST(s5k4ecgx_awb_unlock); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_ae_unlock); - } - s5k4ecgx_ctrl.settings.ae_awb_lock = 0; - } - } - - return 0; -} - - -int32_t s5k4ecgx_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - - -void s5k4ecgx_set_exposure_camcorder(struct msm_sensor_ctrl_t *s_ctrl,unsigned int mode) -{ - - CDBG("CAMSET CAMCORDER -- EV is %d", mode); - - switch (mode) { - case CAMERA_EV_M4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_4); - break; - - case CAMERA_EV_M3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_3); - break; - - case CAMERA_EV_M2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_2); - break; - - case CAMERA_EV_M1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Minus_1); - break; - - case CAMERA_EV_DEFAULT: - CDBG("CAMERA_EV_DEFAULT --> no operation\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Default); - break; - - case CAMERA_EV_P1: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_1); - break; - - case CAMERA_EV_P2: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_2); - break; - - case CAMERA_EV_P3: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_3); - break; - - case CAMERA_EV_P4: - S5K4ECGX_WRITE_LIST(s5k4ecgx_camcorder_EV_Plus_4); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - break; - } - -} - -int32_t s5k4ecgx_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- effect is %d", mode); - - switch (mode) { - case CAMERA_EFFECT_OFF: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Normal); - break; - - case CAMERA_EFFECT_MONO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Mono); - break; - - case CAMERA_EFFECT_NEGATIVE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Negative); - break; - - case CAMERA_EFFECT_SEPIA: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Effect_Sepia); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- scene is %d", mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Default); - - switch (mode) { - case CAMERA_SCENE_AUTO: - break; - - case CAMERA_SCENE_LANDSCAPE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Landscape); - break; - - case CAMERA_SCENE_DAWN: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Duskdawn); - break; - - case CAMERA_SCENE_BEACH: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Beach_Snow); - break; - - case CAMERA_SCENE_SUNSET: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sunset); - break; - - case CAMERA_SCENE_NIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Nightshot); - break; - - case CAMERA_SCENE_PORTRAIT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Portrait); - break; - - case CAMERA_SCENE_AGAINST_LIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Backlight); - break; - - case CAMERA_SCENE_SPORT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Sports); - break; - - case CAMERA_SCENE_FALL: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fall_Color); - break; - - case CAMERA_SCENE_TEXT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Text); - /*S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_1); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_2); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_AF_Macro_mode_3); - msleep(100);*/ - break; - - case CAMERA_SCENE_CANDLE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Candle_Light); - break; - - case CAMERA_SCENE_FIRE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Fireworks); - break; - - case CAMERA_SCENE_PARTY: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Scene_Party_Indoor); - break; - - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - uint16_t value = 0; - CDBG("CAMSET -- WB is %d", mode); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x04E6); - S5K4ECGX_READ_ADDR(0x0F12, &value); - - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, 0x04E6); - - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - - value |= (0x1 << 3); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Auto); - break; - - case CAMERA_WHITE_BALANCE_INCANDESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Tungsten); - break; - - case CAMERA_WHITE_BALANCE_FLUORESCENT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Fluorescent); - break; - - case CAMERA_WHITE_BALANCE_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Sunny); - break; - - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - value &= (~(0x1 << 3)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- metering is %d", mode); - - switch (mode) { - case CAMERA_CENTER_WEIGHT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Center); - break; - - case CAMERA_AVERAGE: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Matrix); - break; - - case CAMERA_SPOT: - S5K4ECGX_WRITE_LIST(s5k4ecgx_Metering_Spot); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_set_iso(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - uint16_t value = 0; - CDBG("CAMSET -- iso is %d", mode); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x04E6); - S5K4ECGX_READ_ADDR(0x0F12, &value); - - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, 0x04E6); - - switch (mode) { - case CAMERA_ISO_MODE_AUTO: - value |= (0x1 << 5); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_Auto); - break; - case CAMERA_ISO_MODE_50: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_50); - break; - case CAMERA_ISO_MODE_100: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_100); - break; - case CAMERA_ISO_MODE_200: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_200); - break; - case CAMERA_ISO_MODE_400: - value &= (~(0x1 << 5)); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - S5K4ECGX_WRITE_LIST(s5k4ecgx_ISO_400); - break; - default: - CDBG("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - - return rc; -} - -int32_t s5k4ecgx_get_light_level(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short cur_lux = 0; - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C18); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR( 0x0F12,&msb); - cur_lux = (msb << 16) | lsb; - return cur_lux; -} - -int32_t s5k4ecgx_get_flash_status(void) -{ - int flash_status = 0; - if ( ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) && (s5k4ecgx_ctrl.settings.lowLight) ) - || (s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_ON)){ - flash_status = 1; - } - CDBG("flash_status = %d", flash_status); - return flash_status; -} - -void s5k4ecgx_check_ae_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - unsigned short ae_stable = 0; - int ae_count = 0; - - while (ae_count++ < 7) { - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2C74); - S5K4ECGX_READ_ADDR(0x0F12, &ae_stable); - if (ae_stable == 0x01) { - CDBG("ae_stabel count[%d]\n", ae_count); - break; - } - msleep(30); - } - if (ae_count > 7) { - CDBG("AE NOT STABLE"); - } -} - -int32_t s5k4ecgx_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAMSET -- focus mode is %d", mode); - - switch (mode) { - case CAMERA_AF_OCR: - case CAMERA_AF_MACRO: - S5K4ECGX_WRITE_LIST(s5k4ecgx_macro_af); - break; - case CAMERA_AF_AUTO: - default: - CDBG("default mode is auto\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_normal_af); - } - return rc; -} - -int32_t s5k4ecgx_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos) -{ - int32_t rc = SENSOR_AF_CANCEL; - CDBG("CAMSET -- set_af_status %d, init_pos =%d", status, initial_pos); - if (status == SENSOR_AF_START) { - unsigned int cur_lux = 0; - CDBG("S5K4ECGX_AF_START"); - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("AF light level = %d", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 1; - } else { - CDBG("NORMAL LUX AF "); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - s5k4ecgx_ctrl.settings.is_preflash = 1; - CDBG("Turn on the pre-flash\n"); - set_led_flash(MSM_CAMERA_LED_LOW); - rc = SENSOR_AF_PRE_FLASH_ON; - } else { - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - } - - } else if ( (status == SENSOR_AF_PRE_FLASH_OFF) ) { - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - else { - if (s5k4ecgx_ctrl.settings.is_touchaf == 1) { - CDBG("unlock AE/AWB in Autofocus Finish\n"); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - } - rc = SENSOR_AF_PRE_FLASH_OFF; - } else if (status == SENSOR_AF_PRE_FLASH_AE_STABLE && - s5k4ecgx_ctrl.settings.is_preflash == 1) { - - s5k4ecgx_check_ae_stable(s_ctrl); - s5k4ecgx_set_ae_awb(s_ctrl, 1); - S5K4ECGX_WRITE_LIST(s5k4ecgx_af); - rc = SENSOR_AF_START; - - } else { - - CDBG("S5K4ECGX_AF_ABORT\n"); - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if( s5k4ecgx_ctrl.settings.is_preflash == 1 ) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - rc = SENSOR_AF_CANCEL; - } - - return rc; -} - -int32_t s5k4ecgx_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, int is_search_status) -{ - unsigned short af_status = 0; - CDBG("is_search_status %d", is_search_status); - switch (is_search_status) { - case 0: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2EEE); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("1st AF status : %x\n", af_status); - break; - case 1: - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2207); - S5K4ECGX_READ_ADDR(0x0F12, &af_status); - CDBG("2nd AF status : %d", af_status); - break; - default: - CDBG("unexpected mode is coming from HAL"); - break; - } - CDBG("return_af_status = %d", af_status); - return af_status; -} - -int32_t s5k4ecgx_touchaf_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, - unsigned int addr, unsigned int value) -{ - S5K4ECGX_WRITE_ADDR(0xFCFC, 0xD000); - S5K4ECGX_WRITE_ADDR(0x0028, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002A, addr); - S5K4ECGX_WRITE_ADDR(0x0F12, value); - - return 0; -} - -int32_t s5k4ecgx_set_touchaf_pos(struct msm_sensor_ctrl_t *s_ctrl, - struct ioctl_native_cmd *info) -{ - static unsigned short inWindowWidth = 288; - static unsigned short inWindowHeight = 216; - static unsigned short outWindowWidth = 640; - static unsigned short outWindowHeight = 400; - int x = info->value_1; - int y = info->value_2; - - unsigned short previewWidth = info->address; - unsigned short previewHeight = info->value_3; - - CDBG("s5k4ecgx_set_touchaf_pos (%d, %d) previewRes(%ux%u)",x, y, previewWidth, previewHeight); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x02A0); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &inWindowHeight); - CDBG("[i2c read] inWindowWidth = %d, inWindowHeight = %d\n", inWindowWidth, inWindowHeight); - - inWindowWidth = inWindowWidth * previewWidth / 1024; - inWindowHeight = inWindowHeight * previewHeight / 1024; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x0298); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowWidth); - S5K4ECGX_READ_ADDR(0x0F12, &outWindowHeight); - CDBG("[i2c read] outWindowWidth = %d, outWindowHeight = %d\n", outWindowWidth, outWindowHeight); - - - outWindowWidth = outWindowWidth * previewWidth / 1024; - outWindowHeight = outWindowHeight * previewHeight / 1024; - - if (x < inWindowWidth/2) - x = inWindowWidth/2+1; - else if (x > previewWidth - inWindowWidth/2) - x = previewWidth - inWindowWidth/2 -1; - if (y < inWindowHeight/2) - y = inWindowHeight/2+1; - else if (y > previewHeight - inWindowHeight/2) - y = previewHeight - inWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029C, (x - inWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x029E, (y - inWindowHeight/2) * 1024 / previewHeight); - - if (x < outWindowWidth/2) - x = outWindowWidth/2+1; - else if (x > previewWidth - outWindowWidth/2) - x = previewWidth - outWindowWidth/2 -1; - if (y < outWindowHeight/2) - y = outWindowHeight/2+1; - else if (y > previewHeight - outWindowHeight/2) - y = previewHeight - outWindowHeight/2 -1; - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0294, (x - outWindowWidth/2) * 1024 / previewWidth); - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x0296, (y - outWindowHeight/2) * 1024 / previewHeight); - - s5k4ecgx_touchaf_set_resolution(s_ctrl, 0x02A4, 0x0001); - - return 0; -} - -int32_t s5k4ecgx_wait_preview_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured == 0x0100 && try <= 50); - - - if (is_captured == 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - - CDBG("try[%d] is_captured(0x%x)\n", try, is_captured); - - return 0; -} - -int32_t s5k4ecgx_wait_capture_stable(struct msm_sensor_ctrl_t *s_ctrl) -{ - int try = 0; - unsigned short is_captured = 0; - - do { - if (try) - mdelay(10); - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - //S5K4ECGX_WRITE_ADDR(0x002E, 0x215F); - S5K4ECGX_WRITE_ADDR(0x002E, 0x215E); - S5K4ECGX_READ_ADDR(0x0F12, &is_captured); - try++; - } while(is_captured != 0x0100 && try <= 50); - - - if (is_captured != 0x0100) - pr_err("%s:%d maximum tried!\n", __func__, __LINE__); - CDBG("try[%d]\n", try); - - return 0; -} - -int32_t s5k4ecgx_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - unsigned short msb = 0; - unsigned short lsb = 0; - unsigned short analog_gain; - unsigned short digital_gain; - unsigned int iso_value; - unsigned int temp; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC0); - S5K4ECGX_READ_ADDR(0x0F12, &lsb); - S5K4ECGX_READ_ADDR(0x0F12, &msb); - - temp = ((msb << 16) + lsb); - if ( temp != 0) - s5k4ecgx_ctrl.exif_shutterspeed = 400000 / temp; - else - s5k4ecgx_ctrl.exif_shutterspeed = 0; - - S5K4ECGX_WRITE_ADDR(0x002C, 0x7000); - S5K4ECGX_WRITE_ADDR(0x002E, 0x2BC4); - S5K4ECGX_READ_ADDR(0x0F12, &analog_gain); - S5K4ECGX_READ_ADDR(0x0F12, &digital_gain); - - iso_value =(unsigned int) ( analog_gain * digital_gain ) / 256 / 2; - if (iso_value < 0xD0) - s5k4ecgx_ctrl.exif_iso = 50; - else if(iso_value < 0x1A0) - s5k4ecgx_ctrl.exif_iso = 100; - else if(iso_value < 0x374) - s5k4ecgx_ctrl.exif_iso = 200; - else - s5k4ecgx_ctrl.exif_iso = 400; - - CDBG("shutter_speed = %d, ISO = %d, iso_value = 0x%x", - s5k4ecgx_ctrl.exif_shutterspeed, s5k4ecgx_ctrl.exif_iso, iso_value); - return 0; -} - - -int32_t s5k4ecgx_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = s5k4ecgx_ctrl.exif_iso; - exif_info->value_3 = s5k4ecgx_ctrl.exif_shutterspeed; - return 0; -} - -int32_t s5k4ecgx_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO \n"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING\n"); -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_init("/data/s5k4ecgx_regs.h"); - pr_err("/data/s5k4ecgx_yuv.h inside CFG_SET_INIT_SETTING\n"); -#endif - rc = S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_init_regs); - break; - case CFG_SET_RESOLUTION: - s5k4ecgx_ctrl.settings.resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d\n " , s5k4ecgx_ctrl.settings.resolution); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - if (s5k4ecgx_get_flash_status()) { - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else if ((s5k4ecgx_ctrl.settings.flash_mode == CAMERA_FLASH_AUTO) - && (!s5k4ecgx_ctrl.settings.lowLight)) { - unsigned short cur_lux; - cur_lux = s5k4ecgx_get_light_level(s_ctrl); - CDBG("light level = %d\n", cur_lux); - if (cur_lux <= LOW_LIGHT_LEVEL) { - CDBG("LOW LUX\n"); - s5k4ecgx_ctrl.settings.lowLight = 1; - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_snapshot_regs); - s5k4ecgx_wait_capture_stable(s_ctrl); - s5k4ecgx_set_exif(s_ctrl); - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_CAPTURE){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - } - s5k4ecgx_wait_preview_stable(s_ctrl); - } - - break; - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM\n"); - if(s5k4ecgx_get_flash_status() ){ - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_CAPTURE ){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.lowLight = 0; - } - } - - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - if (s5k4ecgx_ctrl.settings.is_preflash == 1) { - CDBG("Turn off the pre-flash\n"); - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_Off); - if(s5k4ecgx_ctrl.settings.scenemode == CAMERA_SCENE_AUTO){ - s5k4ecgx_set_ae_awb(s_ctrl, 0); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - s5k4ecgx_ctrl.settings.is_preflash = 0; - } - } - - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_1280_960); - msleep(50); - S5K4ECGX_WRITE_LIST(s5k4ecgx_stop_stream); - } - - break; - case CFG_SET_START_STREAM: - CDBG("CFG_SET_START_STREAM"); - if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_RECORDING) { - if (s5k4ecgx_get_flash_status()) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_FAST_AE_On); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Pre_Flash_On); - set_led_flash(MSM_CAMERA_LED_LOW); - msleep(380); - s5k4ecgx_check_ae_stable(s_ctrl); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_30); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder); - s5k4ecgx_set_exposure_camcorder(s_ctrl,s5k4ecgx_ctrl.settings.exposure); - - if (s5k4ecgx_ctrl.settings.resolution == MSM_SENSOR_RES_5) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_640_480); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_1280_720); - } - - } else if (s5k4ecgx_ctrl.op_mode == CAMERA_MODE_PREVIEW) { - CDBG("prev_mode = %d\n", s5k4ecgx_ctrl.prev_mode); - s5k4ecgx_set_ae_awb(s_ctrl, 0); - if ((s5k4ecgx_ctrl.prev_mode == CAMERA_MODE_RECORDING)) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_fps_auto); - S5K4ECGX_WRITE_LIST_BURST(s5k4ecgx_camcorder_disable); - s5k4ecgx_set_exposure_compensation(s_ctrl, - s5k4ecgx_ctrl.settings.exposure); - } - - if (s5k4ecgx_ctrl.streamon == 0) { - s5k4ecgx_set_exposure_compensation(s_ctrl, - s5k4ecgx_ctrl.settings.exposure); - - s5k4ecgx_set_white_balance(s_ctrl, - s5k4ecgx_ctrl.settings.wb); - - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); -#if !defined(FLICKER_DEFAULT) - - if(cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_anti_banding_50hz_auto); - } else if(cdata->flicker_type == MSM_CAM_FLICKER_60HZ) { - S5K4ECGX_WRITE_LIST(s5k4ecgx_anti_banding_60hz_auto); - } -#endif - - } - - s5k4ecgx_ctrl.streamon = 1; - } - - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - CDBG("CFG_SET_SLAVE_INFO \n"); - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - CDBG("CFG_SET_SLAVE_INFO EXIT \n"); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY \n"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP \n"); - s5k4ecgx_ctrl.streamon = 0; - s5k4ecgx_ctrl.op_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.prev_mode = CAMERA_MODE_INIT; - s5k4ecgx_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - s5k4ecgx_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - s5k4ecgx_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - s5k4ecgx_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - s5k4ecgx_ctrl.settings.effect = CAMERA_EFFECT_OFF; - s5k4ecgx_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - s5k4ecgx_ctrl.settings.flash_mode = CAMERA_FLASH_OFF; - s5k4ecgx_ctrl.settings.lowLight = 0; - s5k4ecgx_ctrl.settings.is_touchaf = 0; - s5k4ecgx_ctrl.settings.is_preflash = 0; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN \n"); - - /* Actuator softlanding */ - if(s5k4ecgx_ctrl.settings.focus_mode == CAMERA_AF_MACRO){ - S5K4ECGX_WRITE_LIST(s5k4ecgx_normal_af); - } - S5K4ECGX_WRITE_LIST(s5k4ecgx_preview_regs); - msleep(100); - S5K4ECGX_WRITE_LIST(s5k4ecgx_focus_mode_auto); - msleep(100); - /* Required for 3rd Party Tourch Light Mode */ - set_led_flash(MSM_CAMERA_LED_OFF); - - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; - -#ifdef CONFIG_LOAD_FILE - s5k4ecgx_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING \n"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - - - - -int32_t s5k4ecgx_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - /*pr_err("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3);*/ - switch (cam_info->mode) { - case EXT_CAM_EV: - s5k4ecgx_ctrl.settings.exposure = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_exposure_compensation(s_ctrl, s5k4ecgx_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - s5k4ecgx_ctrl.settings.wb = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_white_balance(s_ctrl, s5k4ecgx_ctrl.settings.wb); - break; - case EXT_CAM_METERING: - s5k4ecgx_ctrl.settings.metering = (cam_info->value_1); - s5k4ecgx_set_metering(s_ctrl, s5k4ecgx_ctrl.settings.metering); - break; - case EXT_CAM_ISO: - s5k4ecgx_ctrl.settings.iso = (cam_info->value_1); - if (s5k4ecgx_ctrl.streamon == 1) - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - break; - case EXT_CAM_EFFECT: - s5k4ecgx_ctrl.settings.effect = (cam_info->value_1); - s5k4ecgx_set_effect(s_ctrl, s5k4ecgx_ctrl.settings.effect); - break; - case EXT_CAM_SCENE_MODE: - s5k4ecgx_ctrl.settings.scenemode = (cam_info->value_1); - s5k4ecgx_set_scene_mode(s_ctrl, s5k4ecgx_ctrl.settings.scenemode); -#if !defined(CONFIG_SEC_J1X_PROJECT) - // During Camera Init time two times below setting are Executting - /* setting scene mode is resetting EV,ISO & WB - so re-applying it again */ - s5k4ecgx_set_exposure_compensation(s_ctrl, s5k4ecgx_ctrl.settings.exposure); - s5k4ecgx_set_iso(s_ctrl, s5k4ecgx_ctrl.settings.iso); - s5k4ecgx_set_white_balance(s_ctrl, s5k4ecgx_ctrl.settings.wb); -#endif - - break; - case EXT_CAM_SENSOR_MODE: - s5k4ecgx_ctrl.prev_mode = s5k4ecgx_ctrl.op_mode; - s5k4ecgx_ctrl.op_mode = (cam_info->value_1); - CDBG("EXT_CAM_SENSOR_MODE = %d", s5k4ecgx_ctrl.op_mode); - break; - case EXT_CAM_FOCUS: - s5k4ecgx_ctrl.settings.focus_mode = (cam_info->value_1); - /*CDBG("EXT_CAM_FOCUS focus mode = %d\n ", s5k4ecgx_ctrl.settings.focus_mode);*/ - s5k4ecgx_set_af_mode(s_ctrl, s5k4ecgx_ctrl.settings.focus_mode); - break; - case EXT_CAM_SET_AF_STATUS: - /*CDBG("EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2);*/ - cam_info->value_1 = s5k4ecgx_set_af_status(s_ctrl, cam_info->value_1, - cam_info->value_2); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_SET_TOUCHAF_POS: - /*CDBG("EXT_CAM_SET_TOUCHAF_POS: %d : %d", cam_info->value_1, cam_info->value_2);*/ - if(cam_info->value_1 !=0 && cam_info->value_2 != 0) { - s5k4ecgx_set_touchaf_pos(s_ctrl, cam_info); - s5k4ecgx_ctrl.settings.is_touchaf = 1; - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_reset_touchaf); - s5k4ecgx_ctrl.settings.is_touchaf = 0; - } - break; - case EXT_CAM_GET_AF_STATUS: - /*CDBG("EXT_CAM_GET_AF_STATUS: %d\n", cam_info->value_1);*/ - cam_info->value_1 = s5k4ecgx_get_af_status(s_ctrl, cam_info->value_1); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_FLASH_MODE: - /*CDBG("EXT_CAM_FLASH_MODE = %d\n", (cam_info->value_1));*/ - s5k4ecgx_ctrl.settings.flash_mode = (cam_info->value_1); - if((cam_info->value_1) == CAMERA_FLASH_TORCH) { - set_led_flash(MSM_CAMERA_LED_LOW); - } else { - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_SET_FLASH: - CDBG("EXT_CAM_SET_FLASH = %d\n", (cam_info->value_1)); - if( cam_info->value_1 && s5k4ecgx_get_flash_status() ){ - set_led_flash(MSM_CAMERA_LED_HIGH); - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_On); - } else { - S5K4ECGX_WRITE_LIST(s5k4ecgx_Main_Flash_Off); - set_led_flash(MSM_CAMERA_LED_OFF); - } - break; - case EXT_CAM_EXIF: - s5k4ecgx_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB = %d\n", (cam_info->value_1)); - s5k4ecgx_set_ae_awb(s_ctrl, cam_info->value_1); - break; - - case EXT_CAM_CONTRAST: - CDBG("EXT_CAM_CONTRAST isn't supported \n"); - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -#ifdef CONFIG_LOAD_FILE -int s5k4ecgx_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[7], data_buf1[7]; - *(reg_buf + 6) = '\0'; - *(data_buf1 + 6) = '\0'; - printk("PHANI.....Inside Modified Tuning s5k4ecgx_regs_from_sd_tunning\n"); - if (settings != NULL){ - pr_err("s5k4ecgx_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(s5k4ecgx_regs_table == NULL) { - pr_err("s5k4ecgx_regs_table is null "); - return -1; - } - pr_err("@@@ %s \n",name); - start = strstr(s5k4ecgx_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 6); - memcpy(data_buf1, (reg + 9), 6); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error in reg_buf .Please Align contents of the Header file!!") ; - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error in data_buf1 .Please Align contents of the Header file!!"); - if (reg) - start = (reg + 18); - if (addr == 0xff){ - msleep(value); - pr_err("delay = %d\n", (int)value); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_WORD_DATA); - } - } - } - pr_err("s5k4ecgx_regs_from_sd_tunning end!"); - return rc; -} -void s5k4ecgx_regs_table_exit(void) -{ - printk("%s %d", __func__, __LINE__); - if (s5k4ecgx_regs_table) { - vfree(s5k4ecgx_regs_table); - s5k4ecgx_regs_table = NULL; - } -} -void s5k4ecgx_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - filp_close(filp, current->files); - set_fs(fs); - pr_err("coming to if part of string compare s5k4ecgx_regs_table"); - s5k4ecgx_regs_table = dp; - s5k4ecgx_regs_table_size = lsize; - *((s5k4ecgx_regs_table + s5k4ecgx_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sp1628.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sp1628.c deleted file mode 100644 index 6cd06582fb36..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sp1628.c +++ /dev/null @@ -1,992 +0,0 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -#define CONFIG_MSMB_CAMERA_DEBUG - -#undef CDBG -#ifdef CONFIG_MSMB_CAMERA_DEBUG -#define CDBG(fmt, args...) pr_err(fmt, ##args) -#else -#define CDBG(fmt, args...) do { } while (0) -#endif - -#define SP1628_SENSOR_NAME "sp1628" -DEFINE_MSM_MUTEX(sp1628_mut); - -static struct msm_sensor_ctrl_t sp1628_s_ctrl; - -static struct msm_sensor_power_setting sp1628_power_setting[] = { - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VDIG, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VIO, - .config_val = 0, - .delay = 0, - }, - { - .seq_type = SENSOR_VREG, - .seq_val = CAM_VANA, - .config_val = 0, - .delay = 5, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_RESET, - .config_val = GPIO_OUT_HIGH, - .delay = 50, - }, - { - .seq_type = SENSOR_GPIO, - .seq_val = SENSOR_GPIO_STANDBY, - .config_val = GPIO_OUT_LOW, - .delay = 50, - }, - { - .seq_type = SENSOR_CLK, - .seq_val = SENSOR_CAM_MCLK, - .config_val = 0, - .delay = 1, - }, - - { - .seq_type = SENSOR_I2C_MUX, - .seq_val = 0, - .config_val = 0, - .delay = 5, - }, -}; - -static struct msm_camera_i2c_reg_conf sp1628_start_settings[] = { - {0x92, 0x81}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_stop_settings[] = { - {0x92, 0x01}, -}; - -static struct msm_camera_i2c_reg_conf sp1628_recommend_settings[] = { - {0xfd, 0x00,}, - {0x91, 0x00,}, - {0x92, 0x81,}, - {0x98, 0x2a,}, - {0x96, 0xd0,}, /* c0*/ - {0x97, 0x02,}, /* 03*/ - {0x2f, 0x20,}, /* 24M*3=72M*/ - {0x0b, 0x48,}, /* analog*/ - {0x30, 0x80,}, /* 00*/ - {0x0c, 0x66,}, /* analog*/ - {0x0d, 0x12,}, - {0x13, 0x0f,}, /* 10*/ - {0x14, 0x00,}, - {0x12, 0x00,}, - {0x6b, 0x10,}, /* 11*/ - {0x6c, 0x00,}, - {0x6d, 0x00,}, - {0x6e, 0x00,}, - {0x6f, 0x10,}, /* 11*/ - {0x73, 0x11,}, /* 12*/ - {0x7a, 0x10,}, /* 11*/ - {0x15, 0x17,}, /* 18*/ - {0x71, 0x18,}, /* 19*/ - {0x76, 0x18,}, /* 19*/ - {0x29, 0x08,}, - {0x18, 0x01,}, - {0x19, 0x10,}, - {0x1a, 0xc3,}, /* c1*/ - {0x1b, 0x6f,}, - {0x1d, 0x11,}, /* 01*/ - {0x1e, 0x00,}, /* 1e*/ - {0x1f, 0x80,}, - {0x20, 0x7f,}, - {0x22, 0x3c,}, /* 1b*/ - {0x25, 0xff,}, - {0x2b, 0x88,}, - {0x2c, 0x85,}, - {0x2d, 0x00,}, - {0x2e, 0x80,}, - {0x27, 0x38,}, - {0x28, 0x03,}, - {0x70, 0x1a,}, - {0x72, 0x18,}, /* 1a*/ - {0x74, 0x18,}, - {0x75, 0x18,}, - {0x77, 0x16,}, /* 18*/ - {0x7f, 0x19,}, - {0x31, 0x11,}, /* 720P, no mirror/flip */ - {0xfd, 0x01,}, - {0x5d, 0x11,}, /* position*/ - {0x5f, 0x00,}, - {0x36, 0x08,}, - {0x2f, 0xff,}, - {0xfb, 0x25,}, /* blacklevl*/ - {0x48, 0x00,}, /* dp*/ - {0x49, 0x99,}, - {0xf2, 0x0A,}, - {0xfd, 0x02,}, /* AE*/ - {0x52, 0x34,}, - {0x53, 0x02,}, - {0x54, 0x0c,}, - {0x55, 0x08,}, - {0x86, 0x0c,}, - {0x87, 0x10,}, - {0x8b, 0x10,}, - - /* 12-30 50Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x05,}, - {0x04, 0x64,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x02,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xe6,}, - {0xf8, 0xc1,}, - {0x02, 0x08,}, - {0x03, 0x01,}, - {0x06, 0xe6,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x30,}, - {0xbf, 0x07,}, - {0xd0, 0x30,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x30,}, - {0xfd, 0x00,}, - - /* 12-30 60Hz*/ - {0xfd, 0x00,}, /* ae setting*/ - {0x03, 0x04,}, - {0x04, 0x80,}, - {0x05, 0x00,}, - {0x06, 0x00,}, - {0x09, 0x00,}, - {0x0a, 0x01,}, - {0xfd, 0x01,}, - {0xf0, 0x00,}, - {0xf7, 0xc0,}, - {0xf8, 0xc1,}, - {0x02, 0x0a,}, - {0x03, 0x01,}, - {0x06, 0xc0,}, - {0x07, 0x00,}, - {0x08, 0x01,}, - {0x09, 0x00,}, - {0xfd, 0x02,}, - {0x40, 0x0a,}, - {0x41, 0xc1,}, - {0x42, 0x00,}, - {0x88, 0x37,}, - {0x89, 0xa7,}, - {0x8a, 0x22,}, - {0xfd, 0x02,}, /* Status*/ - {0xbe, 0x80,}, - {0xbf, 0x07,}, - {0xd0, 0x80,}, - {0xd1, 0x07,}, - {0xfd, 0x01,}, - {0x5b, 0x07,}, - {0x5c, 0x80,}, - {0xfd, 0x00,}, - - {0xfd, 0x01,}, /* fix status*/ - {0x5a, 0x38,}, /* DP_gain*/ - {0xfd, 0x02,}, - {0xba, 0x30,}, /* mean_dummy_low*/ - {0xbb, 0x50,}, /* mean_low_dummy*/ - {0xbc, 0xc0,}, /* rpc_heq_low*/ - {0xbd, 0xa0,}, /* rpc_heq_dummy*/ - {0xb8, 0x80,}, /* mean_nr_dummy*/ - {0xb9, 0x90,}, /* mean_dummy_nr*/ - {0xfd, 0x01,}, /* rpc*/ - {0xe0, 0x54,}, - {0xe1, 0x40,}, - {0xe2, 0x38,}, - {0xe3, 0x34,}, - {0xe4, 0x34,}, - {0xe5, 0x30,}, - {0xe6, 0x30,}, - {0xe7, 0x2e,}, - {0xe8, 0x2e,}, - {0xe9, 0x2e,}, - {0xea, 0x2c,}, - {0xf3, 0x2c,}, - {0xf4, 0x2c,}, - {0xfd, 0x01,}, /* min gain*/ - {0x04, 0xc0,}, /* rpc_max_indr*/ - {0x05, 0x2c,}, /* rpc_min_indr*/ - {0x0a, 0xc0,}, /* rpc_max_outdr*/ - {0x0b, 0x2c,}, /* rpc_min_outdr*/ - {0xfd, 0x01,}, /* ae target*/ - {0xeb, 0x78,}, - {0xec, 0x78,}, - {0xed, 0x05,}, - {0xee, 0x0a,}, - {0xfd, 0x01,}, /* lsc*/ - {0x26, 0x30,}, - {0x27, 0xdc,}, - {0x28, 0x05,}, - {0x29, 0x08,}, - {0x2a, 0x00,}, - {0x2b, 0x03,}, - {0x2c, 0x00,}, - {0x2d, 0x2f,}, - {0xfd, 0x01,}, /* RGainf*/ - {0xa1, 0x37,}, /* left*/ - {0xa2, 0x26,}, /* right*/ - {0xa3, 0x32,}, /* up*/ - {0xa4, 0x2b,}, /* down*/ - {0xad, 0x0f,}, /* lu*/ - {0xae, 0x0a,}, /* ru*/ - {0xaf, 0x0a,}, /* ld*/ - {0xb0, 0x0a,}, /* rd*/ - {0x18, 0x2f,}, /* left*/ - {0x19, 0x30,}, /* right*/ - {0x1a, 0x32,}, /* up*/ - {0x1b, 0x30,}, /* down*/ - {0xbf, 0xa5,}, /* lu*/ - {0xc0, 0x12,}, /* ru*/ - {0xc1, 0x08,}, /* ld*/ - {0xfa, 0x00,}, /* rd*/ - {0xa5, 0x35,}, /* GGain*/ - {0xa6, 0x24,}, - {0xa7, 0x2e,}, - {0xa8, 0x25,}, - {0xb1, 0x00,}, - {0xb2, 0x04,}, - {0xb3, 0x00,}, - {0xb4, 0x00,}, - {0x1c, 0x24,}, - {0x1d, 0x23,}, - {0x1e, 0x2c,}, - {0xb9, 0x25,}, - {0x21, 0xa0,}, - {0x22, 0x13,}, - {0x23, 0x1c,}, - {0x24, 0x0d,}, - {0xa9, 0x2f,}, /* BGain*/ - {0xaa, 0x24,}, - {0xab, 0x2d,}, - {0xac, 0x24,}, - {0xb5, 0x00,}, - {0xb6, 0x00,}, - {0xb7, 0x00,}, - {0xb8, 0x00,}, - {0xba, 0x22,}, - {0xbc, 0x24,}, - {0xbd, 0x31,}, - {0xbe, 0x24,}, - {0x25, 0xa0,}, - {0x45, 0x08,}, - {0x46, 0x12,}, - {0x47, 0x09,}, - {0xfd, 0x01,}, /* awb*/ - {0x32, 0x15,}, - {0xfd, 0x02,}, - {0x26, 0xc9,}, - {0x27, 0x8b,}, - {0x1b, 0x80,}, - {0x1a, 0x80,}, - {0x18, 0x27,}, - {0x19, 0x26,}, - {0x2a, 0x01,}, - {0x2b, 0x10,}, - {0x28, 0xf8,}, - {0x29, 0x08,}, - - /* d65*/ - {0x66, 0x35,}, - {0x67, 0x60,}, - {0x68, 0xb0,}, - {0x69, 0xe0,}, - {0x6a, 0xa5,}, - - /* indoor*/ - {0x7c, 0x38,}, - {0x7d, 0x58,}, - {0x7e, 0xdb,}, - {0x7f, 0x13,}, - {0x80, 0xa6,}, - - /* cwftl84*/ - {0x70, 0x18,}, /* 2f*/ - {0x71, 0x4a,}, - {0x72, 0x08,}, - {0x73, 0x32,}, /* 24*/ - {0x74, 0xaa,}, - - /* tl84--F*/ - {0x6b, 0x02,}, /* 18*/ - {0x6c, 0x2a,}, /* 34*/ - {0x6d, 0x1e,}, /* 17*/ - {0x6e, 0x49,}, /* 32*/ - {0x6f, 0xaa,}, - - /* f--H*/ - {0x61, 0xea,}, /* 02*/ - {0x62, 0xf8,}, /* 2a*/ - {0x63, 0x4f,}, /* 1e*/ - {0x64, 0x5f,}, /* 49*/ - {0x65, 0x5a,}, /* aa*/ - - {0x75, 0x80,}, - {0x76, 0x09,}, - {0x77, 0x02,}, - {0x24, 0x25,}, - {0x0e, 0x16,}, - {0x3b, 0x09,}, - {0xfd, 0x02,}, /* sharp*/ - {0xde, 0x0f,}, - {0xd2, 0x0c,}, /* control black-white edge; 0 - bolder, f - thinner*/ - {0xd3, 0x0a,}, - {0xd4, 0x08,}, - {0xd5, 0x08,}, - {0xd7, 0x10,}, /* outline judgement*/ - {0xd8, 0x1d,}, - {0xd9, 0x32,}, - {0xda, 0x48,}, - {0xdb, 0x08,}, - {0xe8, 0x38,}, /* outline strength*/ - {0xe9, 0x38,}, - {0xea, 0x38,}, /* 30*/ - {0xeb, 0x38,}, /* 2*/ - {0xec, 0x60,}, - {0xed, 0x40,}, - {0xee, 0x38,}, /* 30*/ - {0xef, 0x38,}, /* 20*/ - {0xf3, 0x00,}, /* sharpness level of flat area*/ - {0xf4, 0x00,}, - {0xf5, 0x00,}, - {0xf6, 0x00,}, - {0xfd, 0x02,}, /* skin sharpen*/ - {0xdc, 0x04,}, /* skin de-sharpen*/ - {0x05, 0x6f,}, - {0x09, 0x10,}, - {0xfd, 0x01,}, /* dns*/ - {0x64, 0x22,}, /* 0 - max, 8 - min*/ - {0x65, 0x22,}, - {0x86, 0x20,}, /* threshold, 0 - min*/ - {0x87, 0x20,}, - {0x88, 0x20,}, - {0x89, 0x20,}, - {0x6d, 0x0f,}, - {0x6e, 0x0f,}, - {0x6f, 0x10,}, - {0x70, 0x10,}, - {0x71, 0x0d,}, - {0x72, 0x23,}, - {0x73, 0x23,}, /* 28*/ - {0x74, 0x23,}, /* 2a*/ - {0x75, 0x46,}, /* [7:4] strength of flat area, - [3:0]strength of un-flat area; - 0-max, 8-min*/ - {0x76, 0x36,}, - {0x77, 0x36,}, /* 25*/ - {0x78, 0x36,}, /* 12*/ - {0x81, 0x1d,}, /* 2x*/ - {0x82, 0x2b,}, /* 4x*/ - {0x83, 0x2b,}, /* 50; 8x*/ - {0x84, 0x2b,}, /* 80; 16x*/ - {0x85, 0x0a,}, /* 12/8reg0x81*/ - {0xfd, 0x01,}, /* gamma*/ - {0x8b, 0x00,}, /* 00; 00; 00;*/ - {0x8c, 0x0d,}, /* 02; 0b; 0b;*/ - {0x8d, 0x1f,}, /* 0a; 19; 17;*/ - {0x8e, 0x2d,}, /* 13; 2a; 27;*/ - {0x8f, 0x3a,}, /* 1d; 37; 35;*/ - {0x90, 0x4b,}, /* 30; 4b; 51;*/ - {0x91, 0x59,}, /* 40; 5e; 64;*/ - {0x92, 0x64,}, /* 4e; 6c; 74;*/ - {0x93, 0x70,}, /* 5a; 78; 80;*/ - {0x94, 0x83,}, /* 71; 92; 92;*/ - {0x95, 0x92,}, /* 85; a6; a2;*/ - {0x96, 0xa1,}, /* 96; b5; af;*/ - {0x97, 0xae,}, /* a6; bf; bb;*/ - {0x98, 0xba,}, /* b3; ca; c6;*/ - {0x99, 0xc4,}, /* c0; d2; d0;*/ - {0x9a, 0xcf,}, /* cb; d9; d9;*/ - {0x9b, 0xdb,}, /* d5; e1; e0;*/ - {0x9c, 0xe5,}, /* df; e8; e8;*/ - {0x9d, 0xec,}, /* e9; ee; ee;*/ - {0x9e, 0xf3,}, /* f2; f4; f4;*/ - {0x9f, 0xfa,}, /* fa; fa; fa;*/ - {0xa0, 0xff,}, /* ff; ff; ff;*/ - {0xfd, 0x02,}, /* CCM*/ - {0x15, 0xc8,}, /* b>th ab*/ - {0x16, 0x95,}, /* rdev); - rc = msm_sensor_platform_probe(pdev, match->data); - return rc; -} - -static int __init sp1628_init_module(void) -{ - int32_t rc; - pr_info("%s:%d\n", __func__, __LINE__); - rc = platform_driver_probe(&sp1628_platform_driver, - sp1628_platform_probe); - if (!rc) - return rc; - pr_err("%s:%d rc %d\n", __func__, __LINE__, rc); - return i2c_add_driver(&sp1628_i2c_driver); -} - -static void __exit sp1628_exit_module(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sp1628_s_ctrl.pdev) { - msm_sensor_free_sensor_data(&sp1628_s_ctrl); - platform_driver_unregister(&sp1628_platform_driver); - } else - i2c_del_driver(&sp1628_i2c_driver); - return; -} - -int32_t sp1628_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - CDBG("%s:%d %s cfgtype = %d\n", __func__, __LINE__, - s_ctrl->sensordata->sensor_name, cdata->cfgtype); - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d sensor name %s\n", __func__, __LINE__, - cdata->cfg.sensor_info.sensor_name); - CDBG("%s:%d session id %d\n", __func__, __LINE__, - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d\n", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - CDBG("%s:%d mount angle valid %d value %d\n", __func__, - __LINE__, cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - /* Write Recommend settings */ - pr_err("%s, sensor write init setting!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_recommend_settings, - ARRAY_SIZE(sp1628_recommend_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_RESOLUTION: - break; - case CFG_SET_STOP_STREAM: - pr_err("%s, sensor stop stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_stop_settings, - ARRAY_SIZE(sp1628_stop_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_SET_START_STREAM: - pr_err("%s, sensor start stream!!", __func__); - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_conf_tbl(s_ctrl->sensor_i2c_client, - sp1628_start_settings, - ARRAY_SIZE(sp1628_start_settings), - MSM_CAMERA_I2C_BYTE_DATA); - break; - case CFG_GET_SENSOR_INIT_PARAMS: - cdata->cfg.sensor_init_params.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - cdata->cfg.sensor_init_params.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_init_params.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - CDBG("%s:%d init params mode %d pos %d mount %d\n", __func__, - __LINE__, - cdata->cfg.sensor_init_params.modes_supported, - cdata->cfg.sensor_init_params.position, - cdata->cfg.sensor_init_params.sensor_mount_angle); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_sensor_power_setting_array *power_setting_array; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - s_ctrl->power_setting_array = - sensor_slave_info.power_setting_array; - power_setting_array = &s_ctrl->power_setting_array; - power_setting_array->power_setting = kzalloc( - power_setting_array->size * - sizeof(struct msm_sensor_power_setting), GFP_KERNEL); - if (!power_setting_array->power_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(power_setting_array->power_setting, - (void *)sensor_slave_info.power_setting_array.power_setting, - power_setting_array->size * - sizeof(struct msm_sensor_power_setting))) { - kfree(power_setting_array->power_setting); - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.slave_addr); - CDBG("%s sensor addr type %d\n", __func__, - sensor_slave_info.addr_type); - CDBG("%s sensor reg %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("%s sensor id %x\n", __func__, - sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - power_setting_array->size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d\n", __func__, - slave_index, - power_setting_array->power_setting[slave_index]. - seq_type, - power_setting_array->power_setting[slave_index]. - seq_val, - power_setting_array->power_setting[slave_index]. - config_val, - power_setting_array->power_setting[slave_index]. - delay); - } - kfree(power_setting_array->power_setting); - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - if (s_ctrl->func_tbl->sensor_power_up) - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) - rc = s_ctrl->func_tbl->sensor_power_down( - s_ctrl); - else - rc = -EFAULT; - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - case CFG_SET_SATURATION: { - - break; - } - case CFG_SET_CONTRAST: { - - break; - } - case CFG_SET_SHARPNESS: { - - break; - } - case CFG_SET_ISO: { - - break; - } - case CFG_SET_EXPOSURE_COMPENSATION: { - - break; - } - case CFG_SET_EFFECT: { - - break; - } - case CFG_SET_ANTIBANDING: { - - break; - } - case CFG_SET_BESTSHOT_MODE: { - - break; - } - case CFG_SET_WHITE_BALANCE: { - - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -int32_t sp1628_match_id(struct msm_sensor_ctrl_t *s_ctrl) -{ - int32_t rc = 0; - uint16_t chipid = 0; - - CDBG("%s, E. calling i2c_read:, i2c_addr:%d, id_reg_addr:%d", - __func__, - s_ctrl->sensordata->slave_info->sensor_slave_addr, - s_ctrl->sensordata->slave_info->sensor_id_reg_addr); - - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0x02, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x16:\n", __func__, chipid); - if (chipid != 0x16) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - chipid = 0; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, - 0xa0, - &chipid, MSM_CAMERA_I2C_BYTE_DATA); - if (rc < 0) { - pr_err("%s: %s: read id failed\n", __func__, - s_ctrl->sensordata->sensor_name); - return rc; - } - - CDBG("%s: read id: 0x%x expected id 0x28:\n", __func__, chipid); - if (chipid != 0x28) { - pr_err("msm_sensor_match_id chip id doesnot match\n"); - return -ENODEV; - } - - return rc; -} - - -static struct msm_sensor_fn_t sp1628_sensor_func_tbl = { - .sensor_config = sp1628_sensor_config, - .sensor_power_up = msm_sensor_power_up, - .sensor_power_down = msm_sensor_power_down, - .sensor_match_id = sp1628_match_id, -}; - -static struct msm_sensor_ctrl_t sp1628_s_ctrl = { - .sensor_i2c_client = &sp1628_sensor_i2c_client, - .power_setting_array.power_setting = sp1628_power_setting, - .power_setting_array.size = ARRAY_SIZE(sp1628_power_setting), - .msm_sensor_mutex = &sp1628_mut, - .sensor_v4l2_subdev_info = sp1628_subdev_info, - .sensor_v4l2_subdev_info_size = ARRAY_SIZE(sp1628_subdev_info), - .func_tbl = &sp1628_sensor_func_tbl, -}; - -module_init(sp1628_init_module); -module_exit(sp1628_exit_module); -MODULE_DESCRIPTION("Aptina 1.26MP YUV sensor driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20.h deleted file mode 100644 index 4085ab82d220..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - #ifndef __SR130PC20_H__ -#define __SR130PC20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef SR130PC20_DEBUG -#undef CDBG - -#define SR130PC20_DEBUG -#ifdef SR130PC20_DEBUG -#define CDBG(fmt, args...) printk("[SR130PC20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -void sr130pc20_set_default_settings(void); -int sr130pc20_sensor_match_id(struct msm_camera_i2c_client *sensor_i2c_client, - struct msm_camera_slave_info *slave_info, - const char *sensor_name); -#endif //__SR130PC20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv.c deleted file mode 100644 index 9951d35249da..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv.c +++ /dev/null @@ -1,706 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#endif - -#include "sr130pc20.h" - -#ifdef CONFIG_MACH_MILLETVEWIFI_EUR_OPEN -#define REG_SET_FILE "sr130pc20_yuv.h" -#else -#define REG_SET_FILE "sr130pc20_yuv_matisse.h" -#endif - -#include REG_SET_FILE - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifdef CONFIG_LOAD_FILE -#define SR130PC20_WRITE_LIST(A) \ - sr130pc20_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR130PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ ****** %s", #A) -#endif - -static struct yuv_ctrl sr130pc20_ctrl; -//static int32_t streamon = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr130pc20_regs_table; -static int sr130pc20_regs_table_size; -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr130pc20_regs_table_init(char *filename); -void sr130pc20_regs_table_exit(void); -#endif - -int32_t sr130pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M4); - break; - case CAMERA_EV_M3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M3); - break; - case CAMERA_EV_M2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M2); - break; - case CAMERA_EV_M1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_default); - break; - case CAMERA_EV_P1: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P1); - break; - case CAMERA_EV_P2: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P2); - break; - case CAMERA_EV_P3: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P3); - break; - case CAMERA_EV_P4: - rc = SR130PC20_WRITE_LIST(sr130pc20_brightness_P4); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_tungsten); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_sunny); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR130PC20_WRITE_LIST(sr130pc20_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl) -{ - if (sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr130pc20_ctrl.vtcall_mode == 1) { - SR130PC20_WRITE_LIST(sr130pc20_VT_Init_Reg); - CDBG("VT Init Settings"); - }else { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - CDBG("Init settings"); - } - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - CDBG("Stop Stream Settings"); - } - return 0; -} - -int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - rc = SR130PC20_WRITE_LIST(sr130pc20_Snapshot); - break; - default: - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview \n", __func__, __LINE__); - rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_50hz); - } - else { - pr_err("%s : %d 60Hz Preview \n", __func__, __LINE__); - rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_60hz); - } - } - return rc; -} - -int32_t sr130pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_none); - break; - case CAMERA_EFFECT_MONO: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - rc = SR130PC20_WRITE_LIST(sr130pc20_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr130pc20_get_exif(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr130pc20_ctrl.exif_iso; - exif_info->value_3 = sr130pc20_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr130pc20_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - uint16_t gain_value = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x80, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x81, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x82, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr130pc20_ctrl.exif_shutterspeed = 26000000 / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xb0, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - gain_value =((read_value4 * 1000) / 32) + 500; - if (gain_value < 1250) - sr130pc20_ctrl.exif_iso= 50; - else if (gain_value < 1750) - sr130pc20_ctrl.exif_iso = 100; - else if (gain_value < 2500) - sr130pc20_ctrl.exif_iso = 200; - else if (gain_value < 3750) - sr130pc20_ctrl.exif_iso = 400; - else if (gain_value < 5500) - sr130pc20_ctrl.exif_iso = 800; - else - sr130pc20_ctrl.exif_iso = 1600; - - CDBG("sr130pc20_set_exif: ISO = %d shutter speed = %d",sr130pc20_ctrl.exif_iso,sr130pc20_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - CDBG("sensor name %s", - cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", - cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING"); - sr130pc20_ctrl.vtcall_mode = 0; -#ifdef CONFIG_LOAD_FILE /* this call should be always called first */ - sr130pc20_regs_table_init("/data/sr130pc20_yuv.h"); - pr_err("/data/sr352_yuv.h inside CFG_SET_INIT_SETTING"); -#endif - break; - case CFG_SET_RESOLUTION: - sr130pc20_set_Init_reg(s_ctrl); - resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , resolution); - break; - case CFG_SET_STOP_STREAM: - CDBG(" CFG_SET_STOP_STREAM"); - if(sr130pc20_ctrl.streamon == 1){ - rc = SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - sr130pc20_ctrl.streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); - switch(sr130pc20_ctrl.op_mode) { - case CAMERA_MODE_CAPTURE: - CDBG("CAMERA_MODE_CAPTURE"); - sr130pc20_set_resolution(s_ctrl , resolution, cdata->flicker_type); - sr130pc20_set_exif(s_ctrl); - break; - case CAMERA_MODE_RECORDING: - CDBG("CAMERA_MODE_RECORDING"); - SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode); - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - break; - case CAMERA_MODE_PREVIEW: - default: - CDBG("CAMERA_MODE_PREVIEW"); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_RECORDING) { - SR130PC20_WRITE_LIST(sr130pc20_Init_Reg); - SR130PC20_WRITE_LIST(sr130pc20_stop_stream); - } - if(sr130pc20_ctrl.prev_mode != CAMERA_MODE_CAPTURE) { - sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect); - sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb); - sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure ); - } - sr130pc20_set_resolution(s_ctrl , resolution, cdata->flicker_type); - if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - msleep(200); - } - break; - } - sr130pc20_ctrl.streamon = 1; - CDBG("CFG_SET_START_STREAM : sr130pc20_start_stream rc = %d", rc); - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("i %d power setting %d %d %ld %d", - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAYn"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - CDBG(" CFG_POWER_UP"); - sr130pc20_ctrl.streamon = 0; - sr130pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr130pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - if (s_ctrl->func_tbl->sensor_power_up) { - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - CDBG("CFG_POWER_DOWN"); - if (s_ctrl->func_tbl->sensor_power_down) { - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_LOAD_FILE - sr130pc20_regs_table_exit(); -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - - -int32_t sr130pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3); - switch (cam_info->mode) { - case EXT_CAM_EV: - sr130pc20_ctrl.settings.exposure = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_exposure_compensation(s_ctrl, sr130pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr130pc20_ctrl.settings.wb = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_white_balance(s_ctrl, sr130pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr130pc20_ctrl.settings.effect = cam_info->value_1; - if(sr130pc20_ctrl.streamon == 1) - sr130pc20_set_effect(s_ctrl, sr130pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr130pc20_ctrl.prev_mode = sr130pc20_ctrl.op_mode; - sr130pc20_ctrl.op_mode = cam_info->value_1; - pr_err("EXT_CAM_SENSOR_MODE = %d", sr130pc20_ctrl.op_mode); - break; - case EXT_CAM_EXIF: - sr130pc20_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - break; - case EXT_CAM_VT_MODE: - CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1); - sr130pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -void sr130pc20_set_default_settings(void) -{ - sr130pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr130pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr130pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr130pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr130pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr130pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; -} - -#ifdef CONFIG_LOAD_FILE -void sr130pc20_regs_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sr130pc20_regs_table) { - vfree(sr130pc20_regs_table); - sr130pc20_regs_table = NULL; - } -} - -int sr130pc20_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - - if (settings != NULL){ - pr_err("sr130pc20_regs_from_sd_tunning start address %x start data %x",settings->reg_addr,settings->reg_data); - } - if(sr130pc20_regs_table == NULL) { - pr_err("sr130pc20_regs_table is null "); - return -1; - } - start = strstr(sr130pc20_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error"); - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error"); - if (reg) - start = (reg + 14); - if (addr == 0xff){ - msleep(value * 10); - pr_err("delay = %d\n", (int)value*10); - } - else{ - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr130pc20_regs_from_sd_tunning end!"); - return rc; -} - -void sr130pc20_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - filp = filp_open(filename, O_RDONLY, 0); - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - /*close the file*/ - filp_close(filp, current->files); - /*restore the previous address space*/ - set_fs(fs); - pr_err("coming to else part of string compare sr130pc20_regs_table"); - sr130pc20_regs_table = dp; - sr130pc20_regs_table_size = lsize; - *((sr130pc20_regs_table + sr130pc20_regs_table_size) - 1) = '\0'; - return; -} -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv_matisse.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv_matisse.h deleted file mode 100644 index 51c29c61307b..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr130pc20_yuv_matisse.h +++ /dev/null @@ -1,3070 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - -static struct msm_camera_i2c_reg_conf sr130pc20_Snapshot[] = { -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll off*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x00,}, -{0x03, 0x02,}, -{0x2f, 0xaa,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, -{0x03, 0x13,}, -{0x10, 0xc5,}, -{0x80, 0xc1,},/*Sharpness 2D On[0xc1] Off[0xc0]*/ -{0x03, 0x18,}, -{0x14, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,},/*pll on*/ -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0d,}, /* 0c:90ns , 0b:110ns */ -{0x1e, 0x0f,}, -{0x1f, 0x0a,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x0a,}, -{0x31, 0x00,}, -{0x32, 0x0d,}, -{0x33, 0x0b,}, -{0x34, 0x02,}, -{0x35, 0x04,}, -{0x36, 0x01,}, -{0x37, 0x09,}, -{0x03, 0x00,}, -{0x01, 0x00,},/*sleep off*/ -{0xff, 0x03,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Init_Reg[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,}, /*Don't touch*/ -{0x09, 0x37,}, /*Don't touch*/ -{0x0a, 0x33,}, /*Don't touch*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x90,}, /*xy flip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 150*/ -{0x43, 0x96,}, -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x0c,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0c,}, /*BLC_TIME_TH_OFF*/ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,}, /*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,}, /*Don't touch*/ -{0x1F, 0x10,}, /*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, -{0xd4, 0x0c,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0c,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x48, 0x80,}, -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x4f,}, /*out color sat en[7] | auto color decrement en[1] / | manual color sat en[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0xff,}, /*auto decresment on AG th*/ -{0x64, 0xc0,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x13,}, /*Outdoor saturation B/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, /*dark2[7] | ratio[6:4] | dark3[3] | dark3 maxfilter ratio[2:0] */ -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1 L lum 0x08->20*/ -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, /*indoor L lum 0x18 3e*/ -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123 :: must be 0x07*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -{0x72, 0x10,}, -{0x73, 0x0a,}, -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 0x40->23 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M*/ -{0x18, 0x30,}, /*added option 1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, -{0x60, 0x12,}, -{0x5e, 0x0a,}, -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x60,}, /*R min's set 4e*/ -{0x41, 0x44,}, /*Gr*/ -{0x42, 0x3e,}, /*B*/ -{0x43, 0x44,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x37,}, -{0x34, 0x5c,}, -{0x35, 0x7d,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x03,}, -{0x71, 0x11,}, -{0x72, 0x1f,}, -{0x73, 0x37,}, -{0x74, 0x52,}, -{0x75, 0x6c,}, -{0x76, 0x85,}, -{0x77, 0x9a,}, -{0x78, 0xad,}, -{0x79, 0xbd,}, -{0x7a, 0xcb,}, -{0x7b, 0xd6,}, -{0x7c, 0xe0,}, -{0x7d, 0xe8,}, -{0x7e, 0xef,}, -{0x7f, 0xf4,}, -{0x80, 0xf8,}, -{0x81, 0xfb,}, -{0x82, 0xfe,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,},/*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xff,}, /*fe*/ -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x19,}, -{0x57, 0x81,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x23,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, /*EXPMin 8125.00 fps*/ -{0x87, 0x90,}, -{0x88, 0x06,}, /*EXP Max(120Hz) 8.00 fps */ -{0x89, 0x2e,}, -{0x8a, 0x08,}, -{0xa5, 0x05,}, /*EXP Max(100Hz) 8.33 fps */ -{0xa6, 0xee,}, -{0xa7, 0xc0,}, -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0x90,}, -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, -{0x9c, 0x09,}, /*EXP Limit 1354.17 fps */ -{0x9d, 0x60,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x52,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x45,}, -{0x88, 0x3a,}, -{0x89, 0x32,}, -{0x8a, 0x2c,}, -{0x8b, 0x42,}, -{0x8c, 0x3d,}, -{0x8d, 0x30,}, -{0x8e, 0x2c,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xb1,}, /* a2: b-2, R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x05,}, - -}; - -#if 1 - -static struct msm_camera_i2c_reg_conf sr130pc20_VT_Init_Reg[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,}, /*Don't touch*/ -{0x09, 0x37,}, /*Don't touch*/ -{0x0a, 0x33,}, /*Don't touch*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x94,}, /*xyflip*/ -{0x12, 0x00,}, /*Sync type default:0x00*/ -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank 280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x0a,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0a,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,}, /*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,}, /*Don't touch*/ -{0x1F, 0x10,}, /*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, /*DCDC*/ -{0xd4, 0x0a,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0a,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x41, 0x38,}, -{0x48, 0x80,}, /*Contrast (Y = constrast * (Y - 128) + 128)*//*86 */ -{0x50, 0xf0,}, -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x03,}, /*outcolorsaten[7]|autocolordecrementen[1]/|manualcolorsaten[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0xff,}, /*auto decresment on AG th*/ -{0x64, 0xff,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x00,}, /*OutdoorsaturationB/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, /*dark2[7] | dark2 maxfilter ratio[6:4] | dark3[3] | dark3 maxfilter ratio[2:0] */ -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, /*Outdoor1 L lum 0x08->20*/ -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, /*indoor L lum 0x18 3e*/ -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123:: must be 0x07 fix setting use!*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0e,}, -{0x21, 0x0e,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -{0x72, 0x10,}, -{0x73, 0x0a,}, -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 0x40->23 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,}, /*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,}, /*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,}, /*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M*/ -{0x18, 0x30,}, /*added option 1.3M*/ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, /* mid nega ,11*/ -{0x60, 0x12,}, /* mid pos ,0*/ -{0x5e, 0x0a,}, /* low nega */ -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x56,}, /*Rmin'sset4e*/ -{0x41, 0x3a,}, /*Gr*/ -{0x42, 0x37,}, /*B*/ -{0x43, 0x3a,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x35,}, -{0x34, 0x5a,}, -{0x35, 0x7c,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x00,}, -{0x71, 0x07,}, -{0x72, 0x1a,}, -{0x73, 0x35,}, -{0x74, 0x5a,}, -{0x75, 0x7c,}, -{0x76, 0x96,}, -{0x77, 0xa9,}, -{0x78, 0xb7,}, -{0x79, 0xc6,}, -{0x7a, 0xd2,}, -{0x7b, 0xdc,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, /* 0x6435, edge th1 H*/ -{0x65, 0x00,}, /*edge th1 L*/ -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,}, /*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x1a,}, -{0x57, 0x80,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x40,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x91,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x2b,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, //EXPMin 8125.00 fps -{0x87, 0x90,}, -{0x88, 0x02,}, //EXP Max(120Hz) 17.14 fps -{0x89, 0xf7,}, -{0x8a, 0x60,}, -{0xa5, 0x02,}, //EXP Max(100Hz) 16.67 fps -{0xa6, 0xf7,}, -{0xa7, 0x60,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0x90,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, -{0x91, 0x03,}, //EXP Fix 15.00 fps -{0x92, 0x4e,}, -{0x93, 0x18,}, -{0x9c, 0x0a,}, /*EXP Limit 1160.71 fps */ -{0x9d, 0xf0,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe8,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x54,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x46,}, -{0x88, 0x36,}, -{0x89, 0x3a,}, -{0x8a, 0x2f,}, -{0x8b, 0x3d,}, -{0x8c, 0x37,}, -{0x8d, 0x35,}, -{0x8e, 0x32,}, -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4e,}, -{0x93, 0x44,}, -{0x94, 0x3a,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xa1,}, /* a2: b-2,R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -{0x03, 0x00,}, -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x28,}, /*400ms Delay*/ - -}; - -#endif - - -static struct msm_camera_i2c_reg_conf sr130pc20_camcorder_mode[] = { -/*0 Page*/ -{0x03, 0x00,}, -{0x01, 0x01,}, /*sleep*/ -{0x01, 0x03,}, /*s/w reset*/ -{0x01, 0x01,}, /*sleep*/ -{0x08, 0x00,},/*Don't touch*/ -{0x09, 0x37,},/*Don't touch*/ -{0x0a, 0x33,},/*Don't touch*/ -/*PLL Setting*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x01,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x10, 0x11,}, -{0x11, 0x94,}, /*xy flip*/ -{0x12, 0x00,}, -{0x14, 0x88,}, -{0x03, 0x00,}, -{0x20, 0x00,}, -{0x21, 0x04,}, -{0x22, 0x00,}, -{0x23, 0x04,}, -{0x24, 0x03,}, -{0x25, 0xC0,}, -{0x26, 0x05,}, -{0x27, 0x00,}, -{0x40, 0x01,}, /*Hblank_280*/ -{0x41, 0x18,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x03, 0x00,}, /*ESD */ -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, -/*--------------- BLC*/ -{0x80, 0x08,}, /*Don't touch */ -{0x81, 0x97,}, /*Don't touch */ -{0x82, 0x90,}, /*Don't touch */ -{0x83, 0x30,}, /*Don't touch */ -{0x84, 0xcc,}, /*Don't touch*/ -{0x85, 0x00,}, /*Don't touch*/ -{0x86, 0xd4,}, /*Don' t touch*/ -{0x87, 0x0f,}, /*Don't touch*/ -{0x88, 0x34,}, /*Don't touch*/ -{0x90, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xf0,}, /*BLC_AG_TH_ON*/ -{0x93, 0xe8,}, /*BLC_AG_TH_OFF*/ -{0x94, 0x95,}, /*091202*/ -{0x95, 0x90,}, /*091202 */ -{0x98, 0x38,}, /*Don't touch*/ -/*Dark BLC*/ -{0xa0, 0x01,}, /* 20100309*/ -{0xa2, 0x01,}, /* 20100309*/ -{0xa4, 0x01,}, /* 20100309*/ -{0xa6, 0x01,}, /* 20100309*/ -/*Normal BLC*/ -{0xa8, 0x00,}, -{0xaa, 0x00,}, -{0xac, 0x00,}, -{0xae, 0x00,}, -/*Out BLC*/ -{0x99, 0x00,}, -{0x9a, 0x00,}, -{0x9b, 0x00,}, -{0x9c, 0x00,}, -/*2 Page*/ -{0x03, 0x02,}, -{0x12, 0x00,}, /*Don't touch*/ -{0x14, 0x00,}, /*Don't touch*/ -{0x15, 0x00,}, /*Don't touch*/ -{0x18, 0x4C,}, /*Don't touch*/ -{0x19, 0x00,}, /*Don't touch*/ -{0x1A, 0x39,}, /*Don't touch*/ -{0x1B, 0x00,},/*Don't touch*/ -{0x1C, 0x1a,}, /*Don't touch*/ -{0x1D, 0x14,}, /*Don't touch*/ -{0x1E, 0x30,},/*Don't touch*/ -{0x1F, 0x10,},/*Don't touch*/ -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, -{0x24, 0x77,}, -{0x25, 0x10,}, -{0x26, 0x10,}, -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2c, 0x02,}, -{0x2d, 0xa0,}, -{0x2e, 0x00,}, -{0x2f, 0xa7,}, -{0x30, 0x00,}, -{0x31, 0x99,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x22,}, -{0x36, 0x01,}, -{0x37, 0x01,}, -{0x38, 0x88,}, -{0x39, 0x88,}, -{0x3d, 0x03,}, -{0x3e, 0x0d,}, -{0x3f, 0x02,}, -{0x49, 0xd1,}, -{0x4a, 0x14,}, -{0x50, 0x21,}, -{0x52, 0x01,}, -{0x53, 0x81,}, -{0x54, 0x10,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x18,}, -{0x59, 0x16,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, -{0x60, 0x93,}, /* 20120517 modify*/ -{0x61, 0xa4,}, /* 20120517 modify*/ -{0x62, 0x94,}, /* 20120517 modify*/ -{0x63, 0xa3,}, /* 20120517 modify*/ -{0x64, 0x94,}, /* 20120517 modify*/ -{0x65, 0xa3,}, /* 20120517 modify*/ -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, -{0x6a, 0xb4,}, -{0x6b, 0xc4,}, -{0x6c, 0xb5,}, -{0x6d, 0xc2,}, -{0x6e, 0xb5,}, -{0x6f, 0xc0,}, -{0x70, 0xb6,}, -{0x71, 0xb8,}, -{0x72, 0x95,}, /* 20120517 modify*/ -{0x73, 0xa2,}, /* 20120517 modify*/ -{0x74, 0x95,}, /* 20120517 modify*/ -{0x75, 0xa2,}, /* 20120517 modify*/ -{0x76, 0x95,}, /* 20120517 modify*/ -{0x77, 0xa2,}, /* 20120517 modify*/ -{0x7C, 0x92,}, /* 20120517 modify*/ -{0x7D, 0xff,}, /* 20120517 modify*/ -{0x80, 0x01,}, /* 20120517 modify*/ -{0x81, 0x8a,}, /* 20120517 modify*/ -{0x82, 0x1e,}, /* 20120517 modify*/ -{0x83, 0x36,}, /* 20120517 modify*/ -{0x84, 0x89,}, /* 20120517 modify*/ -{0x85, 0x8b,}, /* 20120517 modify*/ -{0x86, 0x89,}, /* 20120517 modify*/ -{0x87, 0x8b,}, /* 20120517 modify*/ -{0x88, 0xab,}, -{0x89, 0xbc,}, -{0x8a, 0xac,}, -{0x8b, 0xba,}, -{0x8c, 0xad,}, -{0x8d, 0xb8,}, -{0x8e, 0xae,}, -{0x8f, 0xb2,}, -{0x90, 0xb3,}, -{0x91, 0xb7,}, -{0x92, 0x52,}, /* 20120517 modify*/ -{0x93, 0x6a,}, /* 20120517 modify*/ -{0x94, 0x89,}, /* 20120517 modify*/ -{0x95, 0x8b,}, /* 20120517 modify*/ -{0x96, 0x89,}, /* 20120517 modify*/ -{0x97, 0x8b,}, /* 20120517 modify*/ -{0xA0, 0x02,}, -{0xA1, 0x86,}, /* 20120517 modify*/ -{0xA2, 0x02,}, -{0xA3, 0x86,}, /* 20120517 modify*/ -{0xA4, 0x86,}, /* 20120517 modify*/ -{0xA5, 0x02,}, -{0xA6, 0x86,}, /* 20120517 modify*/ -{0xA7, 0x02,}, -{0xA8, 0x92,}, /* 20120517 modify*/ -{0xA9, 0x94,}, /* 20120517 modify*/ -{0xAA, 0x92,}, /* 20120517 modify*/ -{0xAB, 0x94,}, /* 20120517 modify*/ -{0xAC, 0x1c,}, -{0xAD, 0x22,}, -{0xAE, 0x1c,}, -{0xAF, 0x22,}, -{0xB0, 0xa4,}, /* 20120517 modify*/ -{0xB1, 0xae,}, /* 20120517 modify*/ -{0xB2, 0xa4,}, /* 20120517 modify*/ -{0xB3, 0xae,}, /* 20120517 modify*/ -{0xB4, 0xa6,}, /* 20120517 modify*/ -{0xB5, 0xac,}, /* 20120517 modify*/ -{0xB6, 0xa6,}, /* 20120517 modify*/ -{0xB7, 0xac,}, /* 20120517 modify*/ -{0xB8, 0xa6,}, /* 20120517 modify*/ -{0xB9, 0xab,}, /* 20120517 modify*/ -{0xBA, 0xa6,}, /* 20120517 modify*/ -{0xBB, 0xab,}, /* 20120517 modify*/ -{0xBC, 0xa6,}, /* 20120517 modify*/ -{0xBD, 0xab,}, /* 20120517 modify*/ -{0xBE, 0xa6,}, /* 20120517 modify*/ -{0xBF, 0xab,}, /* 20120517 modify*/ -{0xc4, 0x37,}, -{0xc5, 0x52,}, -{0xc6, 0x6b,}, -{0xc7, 0x86,}, -{0xc8, 0x38,}, /* 20120517 modify*/ -{0xc9, 0x50,}, /* 20120517 modify*/ -{0xca, 0x38,}, /* 20120517 modify*/ -{0xcb, 0x50,}, /* 20120517 modify*/ -{0xcc, 0x6c,}, /* 20120517 modify*/ -{0xcd, 0x84,}, /* 20120517 modify*/ -{0xce, 0x6c,}, /* 20120517 modify*/ -{0xcf, 0x84,}, /* 20120517 modify*/ -{0xdc, 0x00,}, /* Added*/ -{0xdd, 0xaf,}, /* Added*/ -{0xde, 0x00,}, /* Added*/ -{0xdf, 0x90,}, /* Added*/ -{0xd0, 0x10,}, -{0xd1, 0x14,}, -{0xd2, 0x20,}, -{0xd3, 0x00,}, -/*DCDC */ -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /*DCDC_AG_TH_ON*/ -{0xd7, 0xe8,}, /*DCDC_AG_TH_OFF*/ -{0xea, 0x8a,}, -{0xF0, 0x01,}, /* clock inversion*/ -{0xF1, 0x01,}, -{0xF2, 0x01,}, -{0xF3, 0x01,}, -{0xF4, 0x01,}, -{0xF5, 0x00,}, -{0x03, 0x10,}, /*page 10*/ -{0x10, 0x01,}, /*Ycbcr422_bit Order: YUYV*/ -{0x11, 0x03,}, -{0x12, 0x30,}, /*y offset[4], dif_offset[5]*/ -{0x13, 0x02,}, /*contrast effet enable : 0x02*/ -{0x34, 0x00,}, /*hidden 10->00 100209*/ -{0x37, 0x01,}, /*yc2d power save */ -{0x3f, 0x04,}, /*100825*/ -{0x40, 0x80,}, /*Y offset */ -{0x41, 0x0a,}, -{0x48, 0x80,}, /*Contrast (Y = constrast * (Y - 128) + 128)/86 */ -{0x53, 0x00,}, /*dif_offset option */ -{0x55, 0x30,}, /*dif_offset option diff_offset max */ -{0x60, 0x07,}, /*out color sat en[7] | auto color decrement en[1] | manual color sat en[0]*/ -{0x61, 0x83,}, /*blue saturation_C0*/ -{0x62, 0x80,}, /*red saturation_B0*/ -{0x63, 0x80,}, /*auto decresment on AG th*/ -{0x64, 0xff,}, /*auto decresment on DG th*/ -{0x66, 0xe4,}, /*Outdoor saturation step 137fps apply out th */ -{0x67, 0x13,}, /*Outdoor saturation B/R*/ -{0x76, 0x01,}, /* ADD 20121031 */ -{0x79, 0x04,}, /* ADD 20121031 */ -/* Hi 163 */ -/* PAGE 10 START*/ -{0x03, 0x10,}, -{0x80, 0x00,}, /* dsshin --> color enhance*/ -{0xf5, 0x00,}, /* dsshin --> h blank option*/ -{0x03, 0x11,}, /*page 11 D_LPF */ -{0x10, 0x3f,}, /*B[6]:Blue En Dlpf on[4:0] Sky over off : 0x7f->3f*/ -{0x11, 0x20,}, /* Uniform Full GbGr/OV-Nr*/ -{0x12, 0x80,}, /*Blue MaxOpt blue sky max filter optoin rate : 0 0xc0->80*/ -{0x13, 0xb8,}, -{0x30, 0xba,}, /*Outdoor2 H th*/ -{0x31, 0x10,}, /*Outdoor2 L th*/ -{0x32, 0x50,}, /*Outdoor2 gain ratio*/ -{0x33, 0x1d,}, /*Outdoor2 H lum*/ -{0x34, 0x20,}, /*Outdoor2 M lum*/ -{0x35, 0x1f,}, /*Outdoor2 L lum*/ -{0x36, 0xb0,}, /*Outdoor1 H th*/ -{0x37, 0x18,}, /*Outdoor1 L th*/ -{0x38, 0x50,}, /*Outdoor1 gain ratio 0x80->40*/ -{0x39, 0x1d,}, /*Outdoor1 H lum 0x28->1e*/ -{0x3a, 0x20,}, /*Outdoor1 M lum 0x10->15*/ -{0x3b, 0x1f,}, -{0x3c, 0x3f,}, /*indoor H th*/ -{0x3d, 0x16,}, /*indoor L th*/ -{0x3e, 0x30,}, /*indoor gain ratio 0x44 6a */ -{0x3f, 0x1a,}, /*indoor H lum 0x12 18 */ -{0x40, 0x60,}, /*indoor M lum 0x18 1c*/ -{0x41, 0x1a,}, -{0x42, 0x98,}, /*dark1 H th*/ -{0x43, 0x28,}, /*dark1 L th*/ -{0x44, 0x65,}, /*dark1 gain ratio*/ -{0x45, 0x16,}, /*dark1 H lum 0x38->0x28 */ -{0x46, 0x30,}, /*dark1 M lum 0x27->0x17*/ -{0x47, 0x34,}, /*dark1 L lum 0x20->0x1a */ -{0x48, 0x90,}, /*dark2 H th*/ -{0x49, 0x2a,}, /*dark2 L th*/ -{0x4a, 0x65,}, /*dark2 gain ratio*/ -{0x4b, 0x18,}, /*dark2 H lum */ -{0x4c, 0x31,}, /*dark2 M lum*/ -{0x4d, 0x36,}, /*dark2 L lum */ -{0x4e, 0x80,}, /*dark3 H th*/ -{0x4f, 0x30,}, /*dark3 L th*/ -{0x50, 0x65,}, /*dark3 gain ratio*/ -{0x51, 0x19,}, /*dark3 H lum */ -{0x52, 0x31,}, /*dark3 M lum */ -{0x53, 0x36,}, /*dark3 L lum */ -{0x5a, 0x3f,}, /*blue sky mode out1/2 enable 0x27->3f */ -{0x5b, 0x00,}, /*Impulse pixel enable dark123,in,out123*/ -{0x5c, 0x9f,}, /*Indoor maxfilter rate[7:5] | Uncertain onoff[4:0] 0x1f ->0x9f*/ -{0x60, 0x3f,}, /*GbGr all enable*/ -{0x62, 0x0f,}, /*GbGr offset*/ -{0x65, 0x0c,}, /*Outdoor GbGr rate H 100% M 25% L 100%*/ -{0x66, 0x0c,}, /*Indoor GbGr rate H 100% M 25% L 100%*/ -{0x67, 0x00,}, /*dark GbGr rate H/M/L 100%*/ -{0x70, 0x0c,}, /* Abberation On/Off B[1]: Outdoor B[0]: Indoor 07>>c*/ -{0x75, 0xa0,}, /* Outdoor2 Abberation Luminance lvl */ -{0x7d, 0xb4,}, /* Indoor Abberation Luminance lvl*/ -{0x96, 0x08,}, /*indoor/Dark1 edgeoffset1*/ -{0x97, 0x14,}, /*indoor/Dark1 center G value*/ -{0x98, 0xf5,}, /*slope indoor :: left/right graph polarity, slope*/ -{0x99, 0x2a,}, /*indoor uncertain ratio control*/ -{0x9a, 0x20,}, /*Edgeoffset_dark*/ -/*DPC_CTRL*/ -{0x03, 0x12,}, /*Preview DPC off[0x5c] on[0x5d]*/ -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x25, 0x00,}, /* 0x30*/ -{0x2a, 0x01,}, -{0x2e, 0x00,}, /*2010.8.25*/ -{0x30, 0x35,}, /*Texture region(most detail)*/ -{0x31, 0xa0,}, /*STD uniform1 most blur region*/ -{0x32, 0xb0,}, /*STD uniform2 2nd blur*/ -{0x33, 0xc0,}, /*STD uniform3 3rd blur*/ -{0x34, 0xd0,}, /*STD normal noise1 4th blur */ -{0x35, 0xe0,}, /*STD normal noise2 5th blur*/ -{0x36, 0xff,}, /*STD normal noise3 6th blur*/ -{0x40, 0x83,}, /*Outdoor2 H th*/ -{0x41, 0x20,}, /*Outdoor2 L th */ -{0x42, 0x08,}, /*Outdoor2 H luminance */ -{0x43, 0x10,}, /*Outdoor2 M luminance */ -{0x44, 0x10,}, /*Outdoor2 l luminance */ -{0x45, 0x50,}, /*Outdoor2 ratio*/ -{0x46, 0x83,}, /*Outdoor1 H th*/ -{0x47, 0x20,}, /*Outdoor1 L th */ -{0x48, 0x08,}, /*Outdoor1 H luminance*/ -{0x49, 0x10,}, /*Outdoor1 M luminance*/ -{0x4a, 0x10,}, /*Outdoor1 L luminance*/ -{0x4b, 0x50,}, /*Outdoor1 ratio*/ -{0x4c, 0x80,}, /*Indoor H th*/ -{0x4d, 0x48,}, /*Indoor L th*/ -{0x4e, 0x30,}, /*indoor H lum*/ -{0x4f, 0x30,}, /*indoor M lum*/ -{0x50, 0x12,}, /*indoor L lum */ -{0x51, 0x70,}, /*indoor ratio 0x10 -> 0x45*/ -{0x52, 0xa8,}, /*dark1 H th*/ -{0x53, 0x30,}, /*dark1 L th */ -{0x54, 0x28,}, /*dark1 H lum */ -{0x55, 0x3e,}, /*dark1 M lum*/ -{0x56, 0x67,}, /*dark1 L lum*/ -{0x57, 0x6a,}, /*dark1 ratio*/ -{0x58, 0xa0,}, /*dark2 H th*/ -{0x59, 0x40,}, /*dark2 L th*/ -{0x5a, 0x28,}, /*dark2 H lum*/ -{0x5b, 0x3f,}, /*dark2 M lum*/ -{0x5c, 0x68,}, /*dark2 L lum*/ -{0x5d, 0x70,}, /*dark2 ratio*/ -{0x5e, 0xa0,}, /*dark3 H th*/ -{0x5f, 0x40,}, /*dark3 L th*/ -{0x60, 0x29,}, /*dark3 H lum*/ -{0x61, 0x3f,}, /*dark3 M lum*/ -{0x62, 0x69,}, /*dark3 L lum*/ -{0x63, 0x6a,}, /*dark3 ratio*/ -/*C-filter(Out2&Out1)*/ -{0x70, 0x10,}, -{0x71, 0x0a,}, -/*C-filter(Indoor&Dark3)*/ -{0x72, 0x10,}, -{0x73, 0x0a,}, -/*C-filter(Dark2&Dark1)*/ -{0x74, 0x18,}, -{0x75, 0x12,}, -{0x80, 0x20,}, -{0x81, 0x40,}, -{0x82, 0x65,}, -{0x85, 0x1a,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x90, 0x5d,}, /*Preview DPC off[0x5c] on[0x5d]*/ -/*DPC-Dark1,2,3*/ -{0xad, 0x07,}, /*10825*/ -{0xae, 0x07,}, /*10825*/ -{0xaf, 0x07,}, /*10825*/ -/*Blue Det..*/ -{0xc5, 0x58,}, /*BlueRange 2010.8.25 {0x40, 0x->2}3 */ -{0xc6, 0x20,}, /*GreenRange 2010.8.25 0x3b->20 */ -{0xd0, 0x88,}, /*2010.8.25*/ -{0xd1, 0x80,}, -{0xd2, 0x17,},/*preview 17, full 67*/ -{0xd3, 0x00,}, -{0xd4, 0x00,}, -{0xd5, 0x0f,},/*preview 0f, full 02*/ -{0xd6, 0xff,}, -{0xd7, 0xff,},/*preview ff, full 18*/ -{0xd8, 0x00,}, -{0xd9, 0x04,}, -/*interpolated with average*/ -{0xdb, 0x38,}, /*resolution issue 0x00->0x18->0x38 */ -{0xd9, 0x04,}, /*strong_edge detect ratio*/ -{0xe0, 0x01,}, /*strong_edge detect ratio*/ -{0x03, 0x13,}, /*page 13 sharpness 1D*/ -{0x10, 0xc5,}, -{0x11, 0x7b,}, -{0x12, 0x0e,}, -{0x14, 0x00,}, -{0x15, 0x11,}, /*added option 1.3M */ -{0x18, 0x30,}, /*added option 1.3M */ -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x08,}, /*hi_clip th1*/ -{0x24, 0x1a,}, /*hi_clip th2*/ -{0x25, 0x06,}, /*low clip th*/ -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x10,}, /*time th*/ -{0x2a, 0x30,}, /*pga th*/ -{0x2b, 0x03,}, /*lpf out2*/ -{0x2c, 0x03,}, /*lpf out1*/ -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, -/*1D Edge*/ -{0x50, 0x0a,}, /*out2 hi nega*/ -{0x53, 0x07,}, /* hi pos*/ -{0x51, 0x0c,}, /* mi nega*/ -{0x54, 0x07,}, /* mi pos*/ -{0x52, 0x0b,}, /* lo nega*/ -{0x55, 0x08,}, /* lo pos*/ -{0x56, 0x0a,}, /*out1 hi nega*/ -{0x59, 0x07,}, /* hi pos */ -{0x57, 0x0c,}, /* mi nega*/ -{0x5a, 0x07,}, /* mi pos */ -{0x58, 0x0b,}, /* lo nega*/ -{0x5b, 0x08,}, /* lo pos */ -/*Indoor Edge*/ -{0x5c, 0x08,}, /*indoor hi nega*/ -{0x5f, 0x07,}, /* hi pos*/ -{0x5d, 0x14,}, /* mid nega */ -{0x60, 0x12,}, /* mid pos */ -{0x5e, 0x0a,}, /* low nega */ -{0x61, 0x08,}, /* low pos*/ -{0x62, 0x08,}, /*dark1 hi nega*/ -{0x65, 0x06,}, /* hi pos */ -{0x63, 0x08,}, /* mid nega */ -{0x66, 0x06,}, /* mid pos */ -{0x64, 0x08,}, /* low nega */ -{0x67, 0x06,}, /* low pos */ -{0x68, 0x07,}, /*dark2 hi nega*/ -{0x6b, 0x05,}, /* hi pos */ -{0x69, 0x07,}, /* mid nega */ -{0x6c, 0x05,}, /* mid pos */ -{0x6a, 0x07,}, /* low nega */ -{0x6d, 0x05,}, /* low pos */ -{0x6e, 0x0a,}, /*dark3 hi nega*/ -{0x71, 0x09,}, /* hi pos */ -{0x6f, 0x0a,}, /* mid nega */ -{0x72, 0x09,}, /* mid pos */ -{0x70, 0x0a,}, /* low nega */ -{0x73, 0x09,}, /* low pos */ - /* 2DY*/ -{0x80, 0xc1,}, -{0x81, 0x1f,}, -{0x82, 0xe1,}, -{0x83, 0x33,}, -{0x90, 0x05,}, -{0x91, 0x05,}, -{0x92, 0x33,}, -{0x93, 0x30,}, -{0x94, 0x03,}, -{0x95, 0x14,}, -{0x97, 0x30,}, -{0x99, 0x30,}, -{0xa0, 0x02,}, /*2d lclp out2 nega*/ -{0xa1, 0x03,}, /*2d lclp out2 pos*/ -{0xa2, 0x02,}, /*2d lclp out1 nega*/ -{0xa3, 0x03,}, /*2d lclp out1 pos*/ -{0xa4, 0x03,}, /*2d lclp in nega*/ -{0xa5, 0x04,}, /*2d lclp in pos*/ -{0xa6, 0x07,}, /*2d lclp dark1 nega*/ -{0xa7, 0x08,}, /*2d lclp dark1 pos*/ -{0xa8, 0x07,}, /*2d lclp dark2 nega*/ -{0xa9, 0x08,}, /*2d lclp dark2 pos*/ -{0xaa, 0x07,}, /*2d lclp dark3 nega*/ -{0xab, 0x08,}, /*2d lclp dark3 pos*/ -{0xb0, 0x10,}, /*out2 H Ne*/ -{0xb3, 0x10,}, /* H Po*/ -{0xb1, 0x1e,}, /* M Ne*/ -{0xb4, 0x1e,}, /* M Po*/ -{0xb2, 0x1f,}, /* L Ne*/ -{0xb5, 0x1e,}, /* L Po*/ -{0xb6, 0x10,}, /*out1 H Ne */ -{0xb9, 0x10,}, /* H Po */ -{0xb7, 0x1e,}, /* M Ne */ -{0xba, 0x1e,}, /* M Po */ -{0xb8, 0x1f,}, /* L Ne */ -{0xbb, 0x1e,}, /* L Po */ -{0xbc, 0x20,}, /*indoor H Ne*/ -{0xbf, 0x1e,}, /* H Po*/ -{0xbd, 0x25,}, /* M Ne*/ -{0xc0, 0x23,}, /* M Po*/ -{0xbe, 0x24,}, /* L Ne*/ -{0xc1, 0x22,}, /* L Po*/ -{0xc2, 0x23,}, /*dark1 H Ne*/ -{0xc5, 0x23,}, /* H Po*/ -{0xc3, 0x29,}, /* M Ne*/ -{0xc6, 0x29,}, /* M Po*/ -{0xc4, 0x25,}, /* L Ne*/ -{0xc7, 0x25,}, /* L Po*/ -{0xc8, 0x1c,}, /*dark2 H Ne*/ -{0xcb, 0x1c,}, /* H Po*/ -{0xc9, 0x25,}, /* M Ne*/ -{0xcc, 0x25,}, /* M Po*/ -{0xca, 0x23,}, /* L Ne*/ -{0xcd, 0x23,}, /* L Po*/ -{0xce, 0x1c,}, /*dark3 H Ne*/ -{0xd1, 0x1c,}, /* H Po*/ -{0xcf, 0x25,}, /* M Ne*/ -{0xd2, 0x25,}, /* M Po*/ -{0xd0, 0x23,}, /* L Ne*/ -{0xd3, 0x23,}, /* L Po*/ -/* PAGE 14 START*/ -{0x03, 0x14,}, -{0x10, 0x31,}, -{0x14, 0x80,}, /* GX*/ -{0x15, 0x80,}, /* GY*/ -{0x16, 0x80,}, /* RX*/ -{0x17, 0x80,}, /* RY*/ -{0x18, 0x80,}, /* BX*/ -{0x19, 0x80,}, /* BY*/ -{0x20, 0x60,}, /* X Center*/ -{0x21, 0x80,}, /* Y Center*/ -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, -{0x40, 0x60,}, /*R min's set 4e*/ -{0x41, 0x44,}, /*Gr*/ -{0x42, 0x3e,}, /*B*/ -{0x43, 0x44,}, /*Gb*/ -{0x03, 0x15,}, -{0x10, 0x21,}, -{0x14, 0x44,}, /*49*/ -{0x15, 0x34,}, /*38*/ -{0x16, 0x26,}, /*2b*/ -{0x17, 0x2f,}, -/*CMC*/ -{0x30, 0xdd,}, -{0x31, 0x62,}, -{0x32, 0x05,}, -{0x33, 0x26,}, -{0x34, 0xbd,}, -{0x35, 0x17,}, -{0x36, 0x18,}, -{0x37, 0x38,}, -{0x38, 0xd0,}, -{0x40, 0xb0,}, -{0x41, 0x30,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x00,}, -{0x45, 0x00,}, -{0x46, 0x99,}, -{0x47, 0x19,}, -{0x48, 0x00,}, -{0x50, 0x16,}, -{0x51, 0xb2,}, -{0x52, 0x1c,}, -{0x53, 0x06,}, -{0x54, 0x20,}, -{0x55, 0xa6,}, -{0x56, 0x0e,}, -{0x57, 0xb2,}, -{0x58, 0x24,}, -{0x03, 0x16,}, -{0x10, 0x31,}, /*GMA_CTL*/ -{0x18, 0x7e,}, /*AG_ON*/ -{0x19, 0x7d,}, /*AG_OFF*/ -{0x1a, 0x0e,}, /*TIME_ON*/ -{0x1b, 0x01,}, /*TIME_OFF*/ -{0x1C, 0xdc,}, /*OUT_ON*/ -{0x1D, 0xfe,}, /*OUT_OFF*/ -{0x30, 0x00,}, -{0x31, 0x07,}, -{0x32, 0x1a,}, -{0x33, 0x37,}, -{0x34, 0x5c,}, -{0x35, 0x7d,}, -{0x36, 0x96,}, -{0x37, 0xa9,}, -{0x38, 0xb7,}, -{0x39, 0xc6,}, -{0x3a, 0xd2,}, -{0x3b, 0xdc,}, -{0x3c, 0xe4,}, -{0x3d, 0xeb,}, -{0x3e, 0xf1,}, -{0x3f, 0xf5,}, -{0x40, 0xf9,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, -{0x50, 0x00,}, -{0x51, 0x03,}, -{0x52, 0x13,}, -{0x53, 0x2e,}, -{0x54, 0x59,}, -{0x55, 0x79,}, -{0x56, 0x90,}, -{0x57, 0xa3,}, -{0x58, 0xb4,}, -{0x59, 0xc2,}, -{0x5a, 0xcd,}, -{0x5b, 0xd7,}, -{0x5c, 0xe0,}, -{0x5d, 0xe5,}, -{0x5e, 0xe9,}, -{0x5f, 0xee,}, -{0x60, 0xf1,}, -{0x61, 0xf3,}, -{0x62, 0xf6,}, -{0x70, 0x07,}, -{0x71, 0x1a,}, -{0x72, 0x2d,}, -{0x73, 0x46,}, -{0x74, 0x6a,}, -{0x75, 0x86,}, -{0x76, 0x9c,}, -{0x77, 0xad,}, -{0x78, 0xbc,}, -{0x79, 0xc9,}, -{0x7a, 0xd4,}, -{0x7b, 0xde,}, -{0x7c, 0xe4,}, -{0x7d, 0xeb,}, -{0x7e, 0xf1,}, -{0x7f, 0xf5,}, -{0x80, 0xf9,}, -{0x81, 0xfd,}, -{0x82, 0xff,}, -{0x03, 0x24,}, /*Resol control */ -{0x60, 0xc5,}, /*edge even frame | 16bit resol | white edge cnt | scene resol enable*/ -{0x61, 0x04,}, /*even frame update */ -{0x64, 0x08,}, -{0x65, 0x00,}, -{0x66, 0x26,}, /*edge th2 H */ -{0x67, 0x00,}, /*edge th2 L */ -{0x03, 0x13,}, -{0x18, 0x31,}, /*flat center Gb/Gr*/ -{0x74, 0x02,}, /*det slope en | gausian filter*/ -{0x75, 0x0d,}, /*1D negative gain det 09 */ -{0x76, 0x0d,}, /*1D postive gain det 08*/ -{0x77, 0x10,}, /*1D hclp2 det*/ -{0x78, 0x08,}, /*outdoor flat threshold*/ -{0x79, 0x10,}, /*indoor flat threshold*/ -{0x81, 0xdf,}, /*det gain controler*/ -{0x86, 0x90,}, /*2D negative gain det */ -{0x87, 0x90,}, /*2D postive gain det */ -{0x96, 0x2a,}, /*2D hclp2 det*/ -{0x03, 0x12,}, /*0x12 page*/ -{0xd0, 0x88,}, -{0xd9, 0xe4,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -/* PAGE 20 START*/ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x45,},/*weight*/ -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, -{0x28, 0xe7,}, /* add 20120223*/ -{0x29, 0x0d,}, /* 20100305 ad -> 0d*/ -{0x2a, 0xfd,}, -{0x2b, 0xf8,}, -{0x2c, 0x43,}, /* 20140618 c3 -> 43*/ -{0x2d, 0x5f,}, /* add 20120223*/ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, -{0x3d, 0xe1,}, -{0x50, 0x45,}, -{0x51, 0x88,}, -{0x56, 0x19,}, -{0x57, 0x81,}, -{0x58, 0x0e,}, -{0x59, 0x6a,}, -{0x5a, 0x04,}, -{0x5e, 0x9d,}, /*AE_AWB_start*/ -{0x5f, 0x76,}, /*AE_AWB_start*/ -{0x70, 0x33,}, /* 6c*/ -{0x71, 0x82,}, /* 82(+8)*/ -{0x76, 0x21,}, -{0x77, 0x71,}, -{0x78, 0x22,}, /* 24*/ -{0x79, 0x23,}, /* Y Target 70 => 25, 72 => 26*/ -{0x7a, 0x23,}, /* 23*/ -{0x7b, 0x22,}, /* 22*/ -{0x7d, 0x23,}, -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7b,}, -{0x85, 0xb0,}, -{0x86, 0x01,}, /*EXPMin 8125.00 fps*/ -{0x87, 0x90,}, -{0x88, 0x01,}, /*EXP Max(120Hz) 30.00 fps */ -{0x89, 0xfa,}, -{0x8a, 0x40,}, -{0xa5, 0x01,}, /*EXP Max(100Hz) 25.00 fps */ -{0xa6, 0xfa,}, -{0xa7, 0x40,}, -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0x90,}, -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, -{0x91, 0x01,}, /*EXP Fix 25.00 fps*/ -{0x92, 0xfb,}, -{0x93, 0xd0,}, -{0x9c, 0x09,}, /*EXP Limit 1354.17 fps */ -{0x9d, 0x60,}, -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0x90,}, -{0x98, 0x9d,}, -{0xb0, 0x16,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, -{0xb3, 0x14,}, -{0xb4, 0x1b,}, -{0xb5, 0x46,}, -{0xb6, 0x31,}, -{0xb7, 0x29,}, -{0xb8, 0x26,}, -{0xb9, 0x24,}, -{0xba, 0x22,}, -{0xbb, 0x42,}, -{0xbc, 0x41,}, -{0xbd, 0x40,}, -{0xc0, 0x10,}, -{0xc1, 0x38,}, -{0xc2, 0x38,}, -{0xc3, 0x38,}, -{0xc4, 0x07,}, -{0xc8, 0x80,}, -{0xc9, 0x80,}, -{0x10, 0x9c,}, /* ae enable*/ -/* PAGE 20 END*/ -/*AE_Weight*/ -{0x03, 0x21,}, -{0x20, 0x11,}, -{0x21, 0x11,}, -{0x22, 0x11,}, -{0x23, 0x11,}, -{0x24, 0x12,}, -{0x25, 0x22,}, -{0x26, 0x22,}, -{0x27, 0x21,}, -{0x28, 0x12,}, -{0x29, 0x22,}, -{0x2a, 0x22,}, -{0x2b, 0x21,}, -{0x2c, 0x12,}, -{0x2d, 0x23,}, -{0x2e, 0x32,}, -{0x2f, 0x21,}, -{0x30, 0x12,}, -{0x31, 0x23,}, -{0x32, 0x32,}, -{0x33, 0x21,}, -{0x34, 0x12,}, -{0x35, 0x22,}, -{0x36, 0x22,}, -{0x37, 0x21,}, -{0x38, 0x12,}, -{0x39, 0x22,}, -{0x3a, 0x22,}, -{0x3b, 0x21,}, -{0x3c, 0x11,}, -{0x3d, 0x11,}, -{0x3e, 0x11,}, -{0x3f, 0x11,}, -/* PAGE 22 START*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On*/ -{0x20, 0x30,}, /* for wb speed*/ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ -{0x30, 0x80,}, /* 20120224 test*/ -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe3,}, -{0x41, 0x43,}, /* 33*/ -{0x42, 0x22,}, /* 22*/ -{0x43, 0xf3,}, /* f6*/ -{0x44, 0x54,}, /* 44*/ -{0x45, 0x22,}, /* 33*/ -{0x46, 0x00,}, -{0x48, 0x0a,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, /* 3a*/ -{0x83, 0x56,}, /* R Max*/ -{0x84, 0x20,}, /* R Min*/ -{0x85, 0x53,}, /* B Max*/ -{0x86, 0x20,}, /* B Min*/ -{0x87, 0x46,}, -{0x88, 0x36,}, -{0x89, 0x3a,}, -{0x8a, 0x2f,}, -{0x8b, 0x3d,}, -{0x8c, 0x37,}, -{0x8d, 0x35,}, -{0x8e, 0x32,}, -{0x8f, 0x5d,}, -{0x90, 0x5a,}, -{0x91, 0x56,}, -{0x92, 0x50,}, -{0x93, 0x48,}, -{0x94, 0x3f,}, -{0x95, 0x34,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, -{0xa0, 0x40,}, -{0xa1, 0x21,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, -{0xa4, 0x14,}, /* 1500fps*/ -{0xa5, 0x44,}, /* 700fps*/ -{0xa6, 0xcf,}, -{0xad, 0x40,}, -{0xae, 0x4a,}, -{0xaf, 0x2a,}, /* low temp Rgain*/ -{0xb0, 0x28,}, /* low temp Rgain*/ -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify*/ -{0xb4, 0xbf,}, /* for tracking 20120314*/ -{0xb8, 0xb1,}, /* a2: b-2, R+2 b4 B-3, R+4 lowtemp b0 a1 Spec AWB A modify*/ -{0xb9, 0x00,}, -/* PAGE 22 END*/ -/* PAGE 48 (MiPi 1600x1200)*/ -{0x03, 0x00,}, -/* PLL Setting */ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, /*400ms Delay*/ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_Preview_50hz[] = { - -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll Off*/ -{0x03, 0x20,}, -{0x10, 0x1c,},/*AE off (0x0c:60Hz 0x1c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x11,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x17,}, -{0xd5, 0x0f,}, -{0xd7, 0xff,}, -{0x03, 0x13,}, -{0x10, 0xc4,}, -{0x80, 0xc0,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x10, 0x9c,}, /*AE ON (0x8c:60Hz 0x9c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, /*AWB ON*/ -{0x03, 0x00,}, /*Page 0 PLL on*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, - -}; - - -static struct msm_camera_i2c_reg_conf sr130pc20_Preview_60hz[] = { - -{0x03, 0x00,}, -{0x01, 0x01,},/*sleep*/ -{0xd0, 0x05,},/*Pll Off*/ -{0x03, 0x20,}, -{0x10, 0x0c,},/*AE off (0x0c:60Hz 0x1c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0x7d,},/*AWB off*/ -{0x03, 0x00,}, -{0x10, 0x11,}, -{0x03, 0x11,}, -{0x5b, 0x00,},/*don't touch*/ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0xd2, 0x17,}, -{0xd5, 0x0f,}, -{0xd7, 0xff,}, -{0x03, 0x13,}, -{0x10, 0xc4,}, -{0x80, 0xc0,}, -{0x03, 0x18,}, -{0x14, 0x43,}, /*83*/ -{0x03, 0x20,}, -{0x10, 0x8c,}, /*AE ON (0x8c:60Hz 0x9c:50Hz)*/ -{0x03, 0x22,}, -{0x10, 0xfd,}, /*AWB ON*/ -{0x03, 0x00,}, /*Page 0 PLL on*/ -{0xd0, 0x05,}, -{0xd1, 0x30,}, -{0xd2, 0x05,}, -{0xd3, 0x20,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x85,}, -{0xd0, 0x95,}, -{0x03, 0x48,}, -{0x10, 0x1c,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x14, 0x00,}, -{0x16, 0x04,}, -{0x17, 0x00,}, -{0x18, 0x80,}, -{0x19, 0x00,}, -{0x1a, 0xa0,}, -{0x1c, 0x02,}, -{0x1d, 0x0e,}, -{0x1e, 0x07,}, -{0x1f, 0x08,}, -{0x22, 0x00,}, -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x08,}, -{0x28, 0x00,}, -{0x30, 0x05,}, -{0x31, 0x00,}, -{0x32, 0x07,}, -{0x33, 0x09,}, -{0x34, 0x01,}, -{0x35, 0x01,}, -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x28,}, - -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x02,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_none[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x13, 0x02,}, -{0x40, 0x80,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_gray[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_sepia[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*Effect control 0x03 default */ -{0x12, 0x33,}, /*0x30 default ->0x33 UV Constant */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x70,}, /*Cb constant */ -{0x45, 0x98,}, /*Cr constant */ -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_effect_negative[] = { -{0x03, 0x10,}, /*Page 10 */ -{0x11, 0x03,}, /*0x03 default */ -{0x12, 0x38,}, /*0x30 default */ -{0x13, 0x02,}, /*0x02 default */ -{0x40, 0x80,}, /*0x80 Y_offset X 1 */ -{0x44, 0x80,}, /*Cb constant */ -{0x45, 0x80,}, /*Cr constant */ -}; - -/* WhiteBalance Mode */ -static struct msm_camera_i2c_reg_conf sr130pc20_wb_auto[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x38,}, -{0x83, 0x56,}, -{0x84, 0x20,}, -{0x85, 0x52,}, -{0x86, 0x20,}, -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_sunny[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x38,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x35,}, /*b gain */ -{0x83, 0x3b,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x38,}, /*b gain max */ -{0x86, 0x31,}, /*b gain min */ -{0x10, 0xeb,}, - -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_cloudy[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x50,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x28,}, /*b gain */ -{0x83, 0x52,}, /*r gain max */ -{0x84, 0x4c,}, /*r gain min */ -{0x85, 0x2c,}, /*b gain max */ -{0x86, 0x22,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_fluorescent[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x37,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x48,}, /*b gain */ -{0x83, 0x39,}, /*r gain max */ -{0x84, 0x34,}, /*r gain min */ -{0x85, 0x4a,}, /*b gain max */ -{0x86, 0x45,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_wb_tungsten[] = { -{0x03, 0x22,}, -{0x10, 0x6b,}, -{0x11, 0x2c,}, /*awbctrl2 */ -{0x80, 0x21,}, /*r gain */ -{0x81, 0x20,}, /*g gain */ -{0x82, 0x4f,}, /*b gain */ -{0x83, 0x27,}, /*r gain max */ -{0x84, 0x1b,}, /*r gain min */ -{0x85, 0x59,}, /*b gain max */ -{0x86, 0x50,}, /*b gain min */ -{0x10, 0xeb,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xB0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xA0,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0x90,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x10,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -static struct msm_camera_i2c_reg_conf sr130pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20.h deleted file mode 100755 index 7a22c0b1b4ec..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#ifndef __sr200pc20_H__ -#define __sr200pc20_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef sr200pc20_DEBUG -#undef CDBG -#define sr200pc20_DEBUG -#ifdef sr200pc20_DEBUG -#define CDBG(fmt, args...) printk("[sr200pc20] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -#endif //__sr200pc20_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.c deleted file mode 100755 index 217585af7a10..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.c +++ /dev/null @@ -1,774 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#include "sr200pc20.h" -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#include "sr200pc20_yuv_coreprime.h" -#elif defined (CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#include "sr200pc20_yuv_gte.h" -#elif defined(CONFIG_SEC_J1X_PROJECT) -#include "sr200pc20_yuv_j1x.h" -#else -#include "sr200pc20_yuv.h" -#endif -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#if defined CONFIG_SEC_CAMERA_TUNING -#define SR200PC20_WRITE_LIST(A) \ - if (front_tune) \ - register_read_from_sdcard(A,s_ctrl,MSM_CAMERA_I2C_BYTE_DATA,#A); \ - else \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#else -#define SR200PC20_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ *** %s", #A) -#endif - -static struct yuv_ctrl sr200pc20_ctrl; -static exif_data_t sr200pc20_exif; -#if defined(CONFIG_SEC_ROSSA_PROJECT) -bool init_setting_write = FALSE; -#endif - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -static int prev_mode = 0; -#endif - -#if defined CONFIG_SEC_CAMERA_TUNING -#if defined(CONFIG_SEC_ROSSA_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_coreprime.h" -#elif defined(CONFIG_SEC_GTEL_PROJECT) || defined(CONFIG_SEC_GTES_PROJECT) -#define FILENAME "/data/sr200pc20_yuv_gte.h" -#else -#define FILENAME "/data/sr200pc20_yuv.h" -#endif -extern int register_read_from_sdcard (struct msm_camera_i2c_reg_conf *settings, - struct msm_sensor_ctrl_t *s_ctrl, - enum msm_camera_i2c_data_type data_type, - char *name); -extern int register_table_init(char *filename); -extern void register_table_exit(void); -extern int front_tune; -#endif -static int32_t streamon = 0; -static int32_t recording = 0; -static int32_t resolution = MSM_SENSOR_RES_FULL; - -static int sr200pc20_exif_shutter_speed(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value1 = 0; - u16 read_value2 = 0; - u16 read_value3 = 0; - int OPCLK = 26000000; - int rc = 0; - - /* Exposure Time */ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x80,&read_value1,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x81,&read_value2,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0x82,&read_value3,MSM_CAMERA_I2C_BYTE_DATA); - if(read_value1 == 0 && read_value2 == 0 && read_value3 == 0) - { - pr_err("%s::%d read_value1=%d read_value2=%d read_value3=%d " - ,__func__,__LINE__,read_value1,read_value2,read_value3); - rc = -EFAULT; - } - else - { - sr200pc20_exif.shutterspeed = OPCLK / ((read_value1 << 19) - + (read_value2 << 11) + (read_value3 << 3)); - CDBG("Exposure time = %d", sr200pc20_exif.shutterspeed); - } - return rc; -} - -static int sr200pc20_exif_iso(struct msm_sensor_ctrl_t *s_ctrl) -{ - u16 read_value4 = 0; - unsigned short gain_value; - - /* ISO*/ - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, 0x03,0x20,MSM_CAMERA_I2C_BYTE_DATA); - s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_read(s_ctrl->sensor_i2c_client, 0xb0,&read_value4,MSM_CAMERA_I2C_BYTE_DATA); - - gain_value = (read_value4 / 32) * 1000 +500; - if (gain_value < 1140) - sr200pc20_exif.iso = 50; - else if (gain_value < 2140) - sr200pc20_exif.iso = 100; - else if (gain_value < 2640) - sr200pc20_exif.iso = 200; - else if (gain_value < 7520) - sr200pc20_exif.iso = 400; - else - sr200pc20_exif.iso = 800; - - CDBG("ISO = %d", sr200pc20_exif.iso); - - return 0; -} - -void sr200pc20_get_exif(struct msm_sensor_ctrl_t *s_ctrl) -{ - CDBG("E"); - - /*Exif data*/ - sr200pc20_exif_shutter_speed(s_ctrl); - sr200pc20_exif_iso(s_ctrl); - CDBG("exp_time : %d -- iso_value : %d",sr200pc20_exif.shutterspeed, sr200pc20_exif.iso); - return; -} - -int32_t sr200pc20_get_exif_info(struct ioctl_native_cmd * exif_info) -{ - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. - exif_info->value_2 = sr200pc20_exif.iso; - exif_info->value_3 = sr200pc20_exif.shutterspeed; - return 0; -} - -int32_t sr200pc20_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- EV is %d", mode); - switch (mode) { - case CAMERA_EV_M4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M4); - break; - case CAMERA_EV_M3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M3); - break; - case CAMERA_EV_M2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M2); - break; - case CAMERA_EV_M1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - SR200PC20_WRITE_LIST(sr200pc20_brightness_default); - break; - case CAMERA_EV_P1: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P1); - break; - case CAMERA_EV_P2: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P2); - break; - case CAMERA_EV_P3: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P3); - break; - case CAMERA_EV_P4: - SR200PC20_WRITE_LIST(sr200pc20_brightness_P4); - break; - default: - CDBG("Setting %d is invalid", mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING -- WB is %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - SR200PC20_WRITE_LIST(sr200pc20_WB_Auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Daylight); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - SR200PC20_WRITE_LIST(sr200pc20_WB_Cloudy); - break; - default: - CDBG("%s: Setting %d is invalid", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr200pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- resolution is %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - SR200PC20_WRITE_LIST(sr200pc20_Capture); - sr200pc20_get_exif(s_ctrl); - break; - default: -#if defined(CONFIG_SEC_ROSSA_PROJECT) - if (init_setting_write) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_initial_60hz); - } - init_setting_write = FALSE; - }else { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#elif defined(CONFIG_SEC_J1X_PROJECT) - if (mode == MSM_SENSOR_RES_QTR) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#else - if (mode == MSM_SENSOR_RES_QTR) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_800x600_Preview_for_Return_60hz); - } - } -#endif -#if 0 - else if (mode == MSM_SENSOR_RES_2) { - if (flicker_type == MSM_CAM_FLICKER_50HZ) { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_50hz); - } else { - SR200PC20_WRITE_LIST(sr200pc20_640x480_Preview_for_Return_60hz); - } - } -#endif - //rc = msm_sensor_driver_WRT_LIST(s_ctrl,sr200pc20_800x600_Preview); - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc=0; - } - return rc; -} - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -int32_t sr200pc20_set_vt_resolution(struct msm_sensor_ctrl_t *s_ctrl, int resolution, int flicker_type, int vtmode) -{ - int32_t rc = 0; - if(resolution==MSM_SENSOR_RES_FULL) { - SR200PC20_WRITE_LIST(sr200pc20_Capture); // capture in factory VT Camera - sr200pc20_get_exif(s_ctrl); - return rc; - } - - if (vtmode==1) { - pr_err("%s : %d sr200pc20_VT_Init_Reg : 3G(Fixed 7fps)\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - else if (vtmode==2) - { - pr_err("%s : %d sr200pc20_15fps_60Hz : 4G(Fixed 15fps)\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_15fps_60Hz); - } - else - { - pr_err("%s : %d sr200pc20_Init_Reg\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - return rc; -} -#endif - -int32_t sr200pc20_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("CAM-SETTING-- effect is %d", mode); -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - if(prev_mode == CAMERA_EFFECT_BEAUTY && mode==CAMERA_EFFECT_OFF) { - SR200PC20_WRITE_LIST(sr200pc20_beauty_off); - prev_mode = CAMERA_EFFECT_OFF; - return rc; - } - prev_mode = mode; -#endif - switch (mode) { - case CAMERA_EFFECT_OFF: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Normal); - break; - case CAMERA_EFFECT_MONO: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Gray); - break; - case CAMERA_EFFECT_NEGATIVE: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Negative); - break; - case CAMERA_EFFECT_SEPIA: - SR200PC20_WRITE_LIST(sr200pc20_Effect_Sepia); - break; -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - case CAMERA_EFFECT_BEAUTY: - SR200PC20_WRITE_LIST(sr200pc20_beauty_on); - break; -#endif - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -int32_t sr200pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - CDBG("ENTER %d", cdata->cfgtype); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - - cdata->cfg.sensor_info.is_mount_angle_valid = - s_ctrl->sensordata->sensor_info->is_mount_angle_valid; - cdata->cfg.sensor_info.sensor_mount_angle = - s_ctrl->sensordata->sensor_info->sensor_mount_angle; - cdata->cfg.sensor_info.position = - s_ctrl->sensordata->sensor_info->position; - cdata->cfg.sensor_info.modes_supported = - s_ctrl->sensordata->sensor_info->modes_supported; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("%s:%d subdev_id[%d] %d", __func__, __LINE__, i, - cdata->cfg.sensor_info.subdev_id[i]); - - CDBG("mount angle valid %d value %d", cdata->cfg.sensor_info.is_mount_angle_valid, - cdata->cfg.sensor_info.sensor_mount_angle); - - break; - case CFG_SET_INIT_SETTING: - sr200pc20_ctrl.vtcall_mode = 0; - CDBG("CFG_SET_INIT_SETTING writing INIT registers: sr200pc20_Init_Reg \n"); -#if defined(CONFIG_SEC_ROSSA_PROJECT) - init_setting_write = TRUE; -#endif - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } - -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_init(FILENAME); - pr_err("/data/sr200pc20_yuv.h inside CFG_SET_INIT_SETTING"); - } -#endif - break; - case CFG_SET_RESOLUTION: - resolution = *((int32_t *)cdata->cfg.setting); -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) - if(sr200pc20_ctrl.vtcall_mode) { - sr200pc20_set_vt_resolution(s_ctrl , resolution , cdata->flicker_type, sr200pc20_ctrl.vtcall_mode); - break; - } -#else - if (sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT) { - if (sr200pc20_ctrl.vtcall_mode) { - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_50Hz); - } else { - pr_err("%s : %d 60Hz VT init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_VT_Init_Reg_60Hz); - } - }else { -#if 0 - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_50hz); - } else { - pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Init_Reg_60hz); - } -#endif - CDBG("Init settings"); - } - } -#endif - CDBG("CFG_SET_RESOLUTION *** res = %d" , resolution); - if( sr200pc20_ctrl.op_mode == CAMERA_MODE_RECORDING ) { - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_50hz); - } else { - pr_err("%s : %d 60Hz 24fps camcorder\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_24fps_Camcoder_60hz); - } -#if 0 - CDBG("CFG_SET_RESOLUTION recording START recording =1 *** res = %d" , resolution); - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - -#endif - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - recording = 1; - }else{ - if(recording == 1){ - CDBG("CFG_SET_RESOLUTION recording STOP recording =1 *** res = %d" , resolution); - //sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - - if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) { - pr_err("%s : %d 50Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_50hz); - } else { - pr_err("%s : %d 60Hz Auto fps\n", __func__, __LINE__); - SR200PC20_WRITE_LIST(sr200pc20_Auto_fps_60hz); - } - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - recording = 0; - }else if( sr200pc20_ctrl.prev_mode == CAMERA_MODE_INIT ){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } else{ - sr200pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type); - CDBG("CFG_SET_RESOLUTION END *** res = %d" , resolution); - } - } - break; - - case CFG_SET_STOP_STREAM: - CDBG("CFG_SET_STOP_STREAM"); - if(streamon == 1){ - SR200PC20_WRITE_LIST(sr200pc20_stop_stream); - rc=0; - streamon = 0; - } - break; - case CFG_SET_START_STREAM: - CDBG(" CFG_SET_START_STREAM"); -#if 0 - if( sr200pc20_ctrl.op_mode != CAMERA_MODE_CAPTURE){ - sr200pc20_set_effect( s_ctrl , sr200pc20_ctrl.settings.effect); - sr200pc20_set_white_balance( s_ctrl, sr200pc20_ctrl.settings.wb); - sr200pc20_set_exposure_compensation( s_ctrl , sr200pc20_ctrl.settings.exposure); - } -#endif - streamon = 1; - break; - case CFG_SET_SLAVE_INFO: { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("sensor id %x", sensor_slave_info.slave_addr); - CDBG("sensor addr type %d", sensor_slave_info.addr_type); - CDBG("sensor reg %x", sensor_slave_info.sensor_id_info.sensor_id_reg_addr); - CDBG("sensor id %x", sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("%s i %d power setting %d %d %ld %d", __func__, - slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - break; - } - case CFG_WRITE_I2C_ARRAY: { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - break; - } - case CFG_WRITE_I2C_SEQ_ARRAY: { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, - &conf_array); - kfree(reg_setting); - break; - } - - case CFG_POWER_UP: - streamon = 0; - sr200pc20_ctrl.op_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.prev_mode = CAMERA_MODE_INIT; - sr200pc20_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr200pc20_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr200pc20_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr200pc20_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr200pc20_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr200pc20_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - break; - - case CFG_POWER_DOWN: - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_SEC_CAMERA_TUNING - if (front_tune){ - register_table_exit(); - } -#endif - break; - - case CFG_SET_STOP_STREAM_SETTING: { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - break; - } - default: - rc = 0; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - CDBG("EXIT"); - - return rc; -} - -int32_t sr200pc20_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - mutex_lock(s_ctrl->msm_sensor_mutex); - /* CDBG("cam_info values = %d : %d : %d : %d : %d", cam_info->mode, cam_info->address,\ - cam_info->value_1, cam_info->value_2 , cam_info->value_3); */ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr200pc20_ctrl.settings.exposure = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_exposure_compensation(s_ctrl, sr200pc20_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr200pc20_ctrl.settings.wb = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_white_balance(s_ctrl, sr200pc20_ctrl.settings.wb); - break; - case EXT_CAM_EFFECT: - sr200pc20_ctrl.settings.effect = cam_info->value_1; - if(streamon == 1) - sr200pc20_set_effect(s_ctrl, sr200pc20_ctrl.settings.effect); - break; - case EXT_CAM_SENSOR_MODE: - sr200pc20_ctrl.prev_mode = sr200pc20_ctrl.op_mode; - sr200pc20_ctrl.op_mode = cam_info->value_1; - /*CDBG("EXT_CAM_SENSOR_MODE = %d", sr200pc20_ctrl.op_mode);*/ - break; - case EXT_CAM_EXIF: - sr200pc20_get_exif_info(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - CDBG("copy failed"); - break; - case EXT_CAM_VT_MODE: - /*CDBG("EXT_CAM_VT_MODE = %d",cam_info->value_1);*/ - sr200pc20_ctrl.vtcall_mode = cam_info->value_1; - break; - default: - rc = 0; - break; - } - mutex_unlock(s_ctrl->msm_sensor_mutex); - CDBG("EXIT"); - return 0; -} diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.h deleted file mode 100755 index 46c1ddd1f05d..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv.h +++ /dev/null @@ -1,10930 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[] = { -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 68 */ -{0x43, 0x44,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x08,}, /* BLC_TIME_TH_ON */ -{0x91, 0x08,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x08,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xEa,}, -{0x68, 0xab,}, -{0x69, 0xEa,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x7a,}, -{0x71, 0x80,}, - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, -{0x79, 0x49,}, -{0x7a, 0x23,}, -{0x7b, 0x22,}, -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 30.00 fps */ -{0x84, 0x86,}, -{0x85, 0xa0,}, - -{0x86, 0x01,}, /* EXPMin 5950.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x02,}, /* EXP Max 17.14 fps */ -{0x89, 0xab,}, -{0x8a, 0x98,}, - -{0x8B, 0x75,}, /* EXP100 */ -{0x8C, 0x30,}, - -{0x8D, 0x61,}, /* EXP120 */ -{0x8E, 0xa8,}, - -{0x91, 0x03,}, /* EXP Fix 15.00 fps */ -{0x92, 0x0d,}, -{0x93, 0x40,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x19,}, /* EXP Limit 457.69 fps */ -{0x9d, 0x64,}, - -{0x9e, 0x01,}, /* EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c-> 3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler 0ff */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x68,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0x39,}, /* Threshold Dyoffset f0 - > e0 */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 7.14 fps -{0x89, 0xf1,}, -{0x8a, 0x58,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800 x 600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, /* BLC_TIME_TH_ON */ -{0x91, 0x11,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xe8,}, /* BLC_AG_TH_ON */ -{0x93, 0xe0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x11,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xe8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0x39,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x07,}, //EXP Max 7.06 fps -{0x89, 0x00,}, -{0x8a, 0xf8,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x10,}, -{0x1e, 0x08,}, -{0x1f, 0x05,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial tart */ -/* PAGE 0 SART */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 2011092904 -> {0x02, 0x */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 2011092914 -> {0x0a, 0x */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, 0x c}ontinuous -> {0x00, 0x n}ot Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 ->39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change {0x05, 0x */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 {0xbb, 0x -}> {0xb9, 0x */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{0x25, 0x00,}, /* {0x30, 0x */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,},/* 55->48 */ -{0xc6, 0x2a,},/* 48->40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 5e->37 */ -{0x19, 0x5d,}, /* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /*EXPMin 8463.54 fps*/ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x05,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x90,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x59,}, /* 3e */ -{0x50, 0x43,}, /* 28 */ -{0x60, 0x33,}, /* 24 */ -{0x70, 0x43,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x14, 0x43,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x27,}, -{0x85, 0x58,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x2f,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc3,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, - -{0x03, 0x11,}, -/* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_coreprime.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_coreprime.h deleted file mode 100755 index bfc3f06bd8cf..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_coreprime.h +++ /dev/null @@ -1,13371 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: SM-G3608W(Rossa_CMCC_OPEN) */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 640x480 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ - -}; - - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_60hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -/* END of sr200pc20m_preview */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_initial_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { - - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, /* Vblank 50hz */ -{0x43, 0x94,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xea,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { - -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 20*/ -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xf0,}, /* BLC_AG_TH_ON */ -{0x93, 0xe8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0e,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xf0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xe8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* Sat B */ -{0x62, 0x72,}, /* Sat R */ -{0x63, 0xff,}, /* Th decolor_saturation */ -{0x64, 0xff,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* Cb_Pos_Sat */ -{0x6b, 0x74,}, /* Cb_Neg_Sat */ -{0x6c, 0x71,}, /* Cr_Pos_Sat */ -{0x6d, 0x8e,}, /* Cr_Neg_Sat */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/* 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 13 END */ - -/* 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 Center */ -{0x21, 0x80,}, /* Y Center */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS(6500K) */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,}, /* Double_AG 37 */ -{0x19, 0x5d,}, /* Double_AG 36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad -> 0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x72,}, /* 6c */ -{0x71, 0x82,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0x02,}, -{0x78, 0x24,}, /* 24 */ -{0x79, 0x49,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x05,}, /*EXP Max 8.57 fps */ -{0x89, 0xc9,}, -{0x8a, 0x1a,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x91, 0x06,}, /*EXP Fix 8.00 fps*/ -{0x92, 0x32,}, -{0x93, 0xe5,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xf8,}, /* AG Max */ -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0xa0,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x56,}, /* R Max */ -{0x84, 0x1e,}, /* R Min */ -{0x85, 0x56,}, /* B Max */ -{0x86, 0x20,}, /* B Min */ - -{0x87, 0x4b,}, /* R Max */ -{0x88, 0x31,}, /* R Min */ -{0x89, 0x37,}, /* B Max */ -{0x8a, 0x29,}, /* B Min */ - -{0x8b, 0x3f,}, /* R Max */ -{0x8c, 0x37,}, /* R Min */ -{0x8d, 0x30,}, /* B Max */ -{0x8e, 0x2a,}, /* B Min */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x28,}, /* low temp Rgain */ -{0xb0, 0x26,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 */ -{0xb4, 0xbf,}, /* for tracking 20120314 */ -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x03,}, -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -/* {0x30, 0x40,}, */ /* 800x600 MiPi OutPut */ -/* {0x31, 0x06,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ -{0x03, 0x22,}, -{0x11, 0x2e,}, -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, -{0x83, 0x3c,}, -{0x84, 0x3a,}, -{0x85, 0x36,}, -{0x86, 0x34,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x49,}, -{0x81, 0x20,}, -{0x82, 0x2a,}, -{0x83, 0x4a,}, -{0x84, 0x48,}, -{0x85, 0x2b,}, -{0x86, 0x29,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, -{0x83, 0x3e,}, -{0x84, 0x38,}, -{0x85, 0x4d,}, -{0x86, 0x44,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ -{0x03, 0x22,}, -{0x11, 0x2c,}, -{0x80, 0x20,}, -{0x81, 0x20,}, -{0x82, 0x58,}, -{0x83, 0x23,}, -{0x84, 0x1f,}, -{0x85, 0x58,}, -{0x86, 0x52,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{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, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { - - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /*Hblank 404*/ -{0x41, 0x94,}, -{0x42, 0x00,}, /*Vblank 110*/ -{0x43, 0x6e,}, - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7e,}, -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x0f,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xc8,}, /* BLC_AG_TH_ON */ -{0x93, 0xc0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, /* B */ -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x0f,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xc8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xc0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* 3e */ -{0x50, 0x24,}, /* 28 */ -{0x60, 0x20,}, /* 24 */ -{0x70, 0x24,}, /* 28 */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x00,}, -{0x51, 0x00,}, -{0x52, 0x00,}, -{0x53, 0x84,}, -{0x54, 0x20,}, -{0x55, 0x9c,}, -{0x56, 0x00,}, -{0x57, 0x00,}, -{0x58, 0x00,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc5,}, -{0x3b, 0xd2,}, -{0x3c, 0xdb,}, -{0x3d, 0xe5,}, -{0x3e, 0xeb,}, -{0x3f, 0xf3,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0xf4,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 30.00 fps */ -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, /*EXPMin 6360.08 fps*/ -{0x87, 0xff,}, - -{0x88, 0x06,}, /*EXP Max 8.00 fps */ -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xc0,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0xcb,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 530.01 fps */ -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, // R Max D65 -{0x84, 0x22,}, // R Min H -{0x85, 0x4F,}, // B Max H -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, -{0x8a, 0x29,}, - -{0x8b, 0x3c,}, -{0x8c, 0x38,}, -{0x8d, 0x32,}, -{0x8e, 0x2c,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xb0,}, -{0xa1, 0x44,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 0x1470 */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /* 10160x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x04,}, /*BLC_TIME_TH_ON*/ -{0x91, 0x04,}, /*BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /*DCDC_TIME_TH_ON*/ -{0xd5, 0x04,}, /*DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, /*EXP Normal 30.00 fps */ -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 30.00 fps */ -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if 0 -static const u16 sr200pc20_15fps[] = { - -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 360 */ -{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, 0x06,}, /* BLC_TIME_TH_ON */ -{0x91, 0x06,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x06,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x06,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, -/* PAGE 18 END */ - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 5950.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x02,}, /*EXP Max 16.67 fps */ -{0x89, 0xf9,}, -{0x8a, 0xb8,} - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x03,}, /*EXP Fix 15.01 fps*/ -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c-> 3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 {0x10, continuous -> 0x00, not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x0f,}, /* 20121004 */ -{0x1e, 0x06,}, -{0x1f, 0x02,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ - -}; - -static const u16 sr200pc20_20fps[] = { - -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{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, 0x05,}, /* BLC_TIME_TH_ON */ -{0x91, 0x05,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xb0,}, /* BLC_AG_TH_ON */ -{0x93, 0xa8,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x43,}, -{0xaa, 0x43,}, -{0xac, 0x43,}, -{0xae, 0x43,}, - -/* Outdoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x05,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x05,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xb0,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa8,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x67,}, /* Setting For Camcorder 24 */ -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0x50,}, /* Double_AG 50->30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x74,}, /* 74 */ -{0x6c, 0x71,}, /* 7e */ -{0x6d, 0x8e,}, /* 8e */ - -{0x76, 0x01,}, -{0x79, 0x04,}, - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0c,}, -{0x46, 0x09,}, -{0x47, 0x06,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x0c,}, -{0x4c, 0x09,}, -{0x4d, 0x06,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x0c,}, -{0x52, 0x09,}, -{0x53, 0x06,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0xa0,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th */ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th */ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* 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 */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x34,}, /* LSC Red */ -{0x50, 0x24,}, /* LSC Gr */ -{0x60, 0x20,}, /* LSC Blue */ -{0x70, 0x24,}, /* LSC Gb */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x36,}, /* CMCOFSGM */ -{0x16, 0x26,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x8f,}, -{0x31, 0x59,}, -{0x32, 0x0a,}, -{0x33, 0x15,}, -{0x34, 0x5b,}, -{0x35, 0x06,}, -{0x36, 0x07,}, -{0x37, 0x40,}, -{0x38, 0x87,}, - -/* CMC OFS */ -{0x40, 0x94,}, -{0x41, 0x20,}, -{0x42, 0x89,}, -{0x43, 0x84,}, -{0x44, 0x03,}, -{0x45, 0x01,}, -{0x46, 0x88,}, -{0x47, 0x9c,}, -{0x48, 0x28,}, - -/* CMC POFS */ -{0x50, 0x02,}, -{0x51, 0x82,}, -{0x52, 0x00,}, -{0x53, 0x07,}, -{0x54, 0x11,}, -{0x55, 0x98,}, -{0x56, 0x00,}, -{0x57, 0x0b,}, -{0x58, 0x8b,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x1c,}, -{0x33, 0x32,}, -{0x34, 0x54,}, -{0x35, 0x70,}, -{0x36, 0x87,}, -{0x37, 0x9a,}, -{0x38, 0xaa,}, -{0x39, 0xb9,}, -{0x3a, 0xc4,}, -{0x3b, 0xcf,}, -{0x3c, 0xd8,}, -{0x3d, 0xe0,}, -{0x3e, 0xe9,}, -{0x3f, 0xf0,}, -{0x40, 0xf7,}, -{0x41, 0xfc,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x70,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xE2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x43,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /*EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,} - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x03,}, /*EXP Fix 20.01 fps*/ -{0x92, 0x19,}, -{0x93, 0x20,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb8,}, -{0xb3, 0x18,}, -{0xb4, 0x1a,}, -{0xb5, 0x44,}, -{0xb6, 0x2f,}, -{0xb7, 0x28,}, -{0xb8, 0x25,}, -{0xb9, 0x22,}, -{0xba, 0x21,}, -{0xbb, 0x20,}, -{0xbc, 0x32,}, -{0xbd, 0x32,}, - -{0xc0, 0x10,}, -{0xc1, 0x2b,}, -{0xc2, 0x2b,}, -{0xc3, 0x2b,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x80,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* 5e */ -{0x84, 0x22,}, /* 24 21 22 Spec AWB H modify */ -{0x85, 0x55,}, /* 54 51 4f Spec AWB H modify */ -{0x86, 0x20,}, /* 24 */ - -{0x87, 0x41,}, -{0x88, 0x31,}, -{0x89, 0x39,}, /* 38 */ -{0x8a, 0x29,}, /* 2a */ - -{0x8b, 0x3c,}, /* R Max 3c->3e */ -{0x8c, 0x38,}, /* R Min */ -{0x8d, 0x32,}, /* B Max 32->33 */ -{0x8e, 0x2c,}, /* 2c */ - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x39,}, -{0x95, 0x30,}, -{0x96, 0x2c,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x77,}, -{0x9c, 0x66,}, -{0x9d, 0x48,}, -{0x9e, 0x38,}, -{0x9f, 0x30,}, - -{0xa0, 0xc0,}, -{0xa1, 0x54,}, -{0xa2, 0x6f,}, -{0xa3, 0xff,}, - -{0xa4, 0x14,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xcf,}, - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0x09,}, /* lowtemp b0: b-3, r 0 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* {0x14, 0x70,}, */ /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x0f,}, /* 20121101 0x0e -> 0x0f */ -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,},/*+10*/ -{0x62, 0x86,},/*+10*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness +1*/ -{0x03, 0x13,}, -{0x12, 0x02,}, -{0x25, 0x02,}, -{0x20, 0x1a,}, -{0x21, 0x1a,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/* AE Matrix(Average)*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - -static const u16 sr200pc20m_scene_party[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +1, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x8a,}, -{0x62, 0x86,}, -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xe4,}, /* adaptive off*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - - /*ISO_200*/ -{0xb0, 0x37,}, -{0xb1, 0x37,}, -{0xb2, 0x40,}, -{0xb3, 0x37,}, -{0xb4, 0x37,}, -{0xb5, 0x40,}, -{0xb6, 0x3e,}, -{0xb7, 0x3c,}, -{0xb8, 0x3a,}, -{0xb9, 0x39,}, -{0xba, 0x38,}, -{0xbb, 0x37,}, -{0xbc, 0x37,}, -{0xbd, 0x37,}, - -{0xc0, 0x10,}, -{0xc1, 0x37,}, -{0xc2, 0x37,}, -{0xc3, 0x37,}, -{0xc4, 0x0b,}, - -{0xff, 0x05,}, -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_dawn[] = { -/*WB FLUORESCENT*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3c,}, -{0x81, 0x20,}, -{0x82, 0x49,}, /* 3a */ - -{0x83, 0x3e,}, /* */ -{0x84, 0x38,}, /* */ -{0x85, 0x4d,}, /* */ -{0x86, 0x44,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation +2, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x9a,},/*+20*/ -{0x62, 0x96,},/*+20*/ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /* Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /*EXP Max 8.33 fps*/ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon1*/ -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 //*/ -{0x62, 0x76,}, /* 77 //*/ -{0x63, 0xf0,}, -{0x64, 0xf0,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x01,}, -{0xa2, 0x01,}, -{0xa4, 0x01,}, -{0xa6, 0x01,}, - -{0x03, 0x20,}, /*Page 20, Dark condition*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*DARK Conditon2*/ -{0x83, 0x10,}, /*EXP 3.03 fps*/ -{0x84, 0x5d,}, -{0x85, 0x74,}, - -{0x88, 0x10,}, /*EXP Max 3.03 fps*/ -{0x89, 0x5d,}, -{0x8a, 0x74,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xff,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -/*WB Auto*/ -{0x03, 0x22,}, -{0x11, 0x2e,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x56,}, /* */ -{0x84, 0x22,}, /* */ -{0x85, 0x55,}, /* */ -{0x86, 0x20,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x76,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Flash OFF _Spot*/ -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -/* WB Daylight*/ -{0x03, 0x22,}, -{0x11, 0x2c,}, - -{0x80, 0x3b,}, -{0x81, 0x20,}, -{0x82, 0x35,}, /* 3a */ - -{0x83, 0x3c,}, /* */ -{0x84, 0x3a,}, /* */ -{0x85, 0x36,}, /* */ -{0x86, 0x34,}, /* */ - -/*Saturation 0, EV 0*/ -{0x03, 0x10,}, -{0x41, 0x00,}, -{0x60, 0x61,}, -{0x61, 0x7a,}, /* 77 */ -{0x62, 0x72,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50->30 //*/ -{0x64, 0x80,}, - -/*Sharpness 0*/ -{0x03, 0x13,}, -{0x12, 0x07,}, -{0x25, 0x0a,}, -{0x20, 0x15,}, -{0x21, 0x13,}, - -/*Dark BLC*/ -{0x03, 0x00,}, -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -{0x03, 0x20,}, /*Page 20*/ -{0x10, 0x1c,}, /* AE Off*/ - -{0x2b, 0xf4,}, /* adaptive on*/ - -/*Metering Center*/ -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -/*Normal condition*/ -{0x88, 0x05,}, /* EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -/*ISO AUTO*/ -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xd0,}, -{0xb3, 0x18,}, -{0xb4, 0x1c,}, -{0xb5, 0x48,}, -{0xb6, 0x32,}, -{0xb7, 0x2b,}, -{0xb8, 0x27,}, -{0xb9, 0x25,}, -{0xba, 0x23,}, -{0xbb, 0x22,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0x10, 0x9c,}, /* AE On*/ - -{0xff, 0x1e,}, /* 300ms DELAY*/ -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x55,}, -{0x63, 0x55,}, -{0x64, 0x55,}, -{0x65, 0x55,}, -{0x66, 0x55,}, -{0x67, 0x55,}, -{0x68, 0x55,}, -{0x69, 0x55,}, -{0x6a, 0x55,}, -{0x6b, 0x55,}, -{0x6c, 0x55,}, -{0x6d, 0x55,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -static const u16 sr200pc20m_metering_spot[] = { -{0x03, 0x20,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x64, 0x00,}, -{0x65, 0x00,}, -{0x66, 0x03,}, -{0x67, 0xc0,}, -{0x68, 0x03,}, -{0x69, 0xc0,}, -{0x6a, 0x00,}, -{0x6b, 0x00,}, -{0x6c, 0x00,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -}; - -static const u16 sr200pc20m_metering_center[] = { -{0x03, 0x20,}, -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_gte.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_gte.h deleted file mode 100755 index da020a2764e2..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_gte.h +++ /dev/null @@ -1,10902 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.: GTA_S/L */ -/* SENSOR : SILICONFILE SR200PC20M */ -/* DSP : MSM 8916 */ -/* MCLK : 26.00 Mhz */ -/* PCLK : 52.00 Mhz */ -/* Preview : 800x600 */ -/* DATE : 2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[] = { -/* Recording 15fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{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, 0x08,}, //BLC_TIME_TH_ON -{0x91, 0x08,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, //DCDC_TIME_TH_ON -{0xd5, 0x08,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, -{0x88, 0x02,}, //EXP Max 17.14 fps -{0x89, 0xe2,}, -{0x8a, 0x48,}, -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x91, 0x03,}, //EXP Fix 15.01 fps -{0x92, 0x4d,}, -{0x93, 0xb4,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2x */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC */ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th */ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th */ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th */ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clip th */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 541.67 fps -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, // B Min D65 - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*1016 0x04 -> 0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -/* {0x30, 0x00,}, */ /* 640 x 480 MiPi OutPut */ -/* {0x31, 0x05,}, */ - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.33 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x7a,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -/* SKT-VT - continuous */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 404 -{0x41, 0x94,}, -{0x42, 0x00,}, //Vblank 20 -{0x43, 0x14,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x11,}, //BLC_TIME_TH_ON -{0x91, 0x11,}, //BLC_TIME_TH_OFF -{0x92, 0xa8,}, //BLC_AG_TH_ON -{0x93, 0xa0,}, //BLC_AG_TH_OFF -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x11,}, //DCDC_TIME_TH_ON -{0xd5, 0x11,}, //DCDC_TIME_TH_OFF -{0xd6, 0xa8,}, //DCDC_AG_TH_ON -{0xd7, 0xa0,}, //DCDC_AG_TH_OFF -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, /* 20120307 0xbb -> 0xb9 */ - -{0x26, 0x68,}, /* Double_AG */ -{0x27, 0x62,}, /* Double_AG */ -{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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xa8,}, -{0x55, 0xa8,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xb8,}, -{0x5b, 0xb8,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc0,}, -{0x61, 0xc0,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0xaa,}, -{0x61, 0xaa,}, -{0x62, 0xaa,}, -{0x63, 0xaa,}, -{0x64, 0xaa,}, -{0x65, 0xaa,}, -{0x66, 0xab,}, -{0x67, 0xea,}, -{0x68, 0xab,}, -{0x69, 0xea,}, -{0x6a, 0xaa,}, -{0x6b, 0xaa,}, -{0x6c, 0xaa,}, -{0x6d, 0xaa,}, -{0x6e, 0xaa,}, -{0x6f, 0xaa,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa7,}, -{0x85, 0x2c,}, - -{0x86, 0x01,}, //EXPMin 6360.08 fps -{0x87, 0xff,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x32,}, -{0x8a, 0xe5,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xc0,}, -{0x8D, 0x69,}, //EXP120 -{0x8E, 0xcb,}, - -{0x91, 0x07,}, //EXP Fix 7.00 fps -{0x92, 0x15,}, -{0x93, 0x73,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 530.01 fps -{0x9d, 0xf4,}, - -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xff,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, /* for wb speed 20120314 */ -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* for tracking 20120314 */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, /* for tracking 20120314 */ - -{0x41, 0x43,}, /* stable c_diff */ -{0x42, 0x22,}, /* stable c_sum */ -{0x43, 0xf1,}, -{0x44, 0x54,}, /* unstable c_diff */ -{0x45, 0x22,}, /* unstable c_sum */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* for A light */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modifed */ -/* {0xb9, 0x00,}, */ -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131024 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHz:0x02, 48MHz:0x03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[] = { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[] = { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[] = { - -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 */ /* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ /* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ -{0x14, 0x00,}, - - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x04,}, /* 0x03->0x04 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x94,}, /* 148 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0x7c,}, -{0x85, 0xdc,}, - -{0x86, 0x01,}, /* EXPMin 6500.00 fps */ -{0x87, 0xf4,}, - -{0x88, 0x05,}, /*EXP Max 8.33 fps */ -{0x89, 0xf3,}, -{0x8a, 0x70,}, - -{0x8B, 0x7e,}, /*EXP100 */ -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, /*EXP120 */ -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank_360 */ -{0x41, 0x68,}, -{0x42, 0x00,}, -{0x43, 0x7e,}, /* 126 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ - -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xa5,}, -{0x85, 0xe0,}, - -{0x86, 0x01,}, //EXPMin 6500.00 fps -{0x87, 0xf4,}, - -{0x88, 0x06,}, //EXP Max 8.00 fps -{0x89, 0x2e,}, -{0x8a, 0x08,}, - -{0x8B, 0x7e,}, //EXP100 -{0x8C, 0xf4,}, - -{0x8D, 0x69,}, //EXP120 -{0x8E, 0x78,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, /*EXP Limit 541.67 fps */ -{0x9d, 0x70,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -/* {0x17, 0xcc,}, */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /*0x1470 */ /* 201110130x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, /*10160x04 ->0x05*/ - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -/* {0x17, 0xc4,}, */ /* MHSHIM */ -/* {0x17, 0xc0,}, */ /* MHSHIM */ -/* {0x17, 0x00,}, */ /* MHSHIM */ -{0x50, 0x00,}, -/* PAGE 48 ND */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x03,}, /* BLC_TIME_TH_ON */ -{0x91, 0x03,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x03,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x03,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xdb,}, -{0x85, 0x50,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x79,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, /*EXP100 */ -{0x8C, 0x70,}, - -{0x8D, 0x84,}, /*EXP120 */ -{0x8E, 0x30,}, - -{0x91, 0x02,}, /*EXP Fix 24.01 fps*/ -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 20 */ -{0x43, 0x14,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x69,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0xb0,}, /* GX */ -{0x15, 0x90,}, /* GY */ -{0x16, 0xa0,}, /* RX */ -{0x17, 0x80,}, /* RY */ -{0x18, 0xa0,}, /* BX */ -{0x19, 0x80,}, /* BY */ - -{0x20, 0xa0,}, /* X */ -{0x21, 0x80,}, /* Y */ - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x50,}, // 3e // -{0x50, 0x38,}, // 28 // -{0x60, 0x34,}, // 24 // -{0x70, 0x38,}, // 28 // -/* PAGE 14 END */ - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x0b,}, -{0x51, 0x8a,}, -{0x52, 0x00,}, -{0x53, 0x0e,}, -{0x54, 0x03,}, -{0x55, 0x92,}, -{0x56, 0x05,}, -{0x57, 0x92,}, -{0x58, 0x0c,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x5d,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* scaler off */ -{0x03, 0x18,}, -{0x10, 0x00,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x02,}, //EXP Normal 30.00 fps -{0x84, 0x10,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, //EXPMin 8463.54 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 30.00 fps -{0x89, 0x10,}, -{0x8a, 0xc0,}, - -{0x8B, 0x9e,}, //EXP100 -{0x8C, 0x70,}, - -{0x8D, 0x84,}, //EXP120 -{0x8E, 0x30,}, - -{0x91, 0x02,}, //EXP Fix 24.01 fps -{0x92, 0x94,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, /* 33 */ -{0x42, 0x22,}, /* 22 */ -{0x43, 0xf1,}, /* f6 */ -{0x44, 0x54,}, /* 44 */ -{0x45, 0x22,}, /* 33 */ -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x2a,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x42,}, //43 -{0x88, 0x35,}, //31 -{0x89, 0x3d,}, -{0x8a, 0x2a,}, //29 - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5c,}, -{0x90, 0x5b,}, -{0x91, 0x57,}, -{0x92, 0x4f,}, -{0x93, 0x41,}, -{0x94, 0x3a,}, -{0x95, 0x32,}, -{0x96, 0x2b,}, -{0x97, 0x23,}, -{0x98, 0x20,}, -{0x99, 0x1f,}, -{0x9a, 0x1f,}, - -{0x9b, 0x78,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x09,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xc1,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x04,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, -{0x03, 0x11,}, -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x09,}, -{0x34, 0x06,}, -{0x35, 0x03,}, -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, -{0x03, 0x13,}, -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[] = { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_j1x.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_j1x.h deleted file mode 100644 index 45a6546d0273..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr200pc20_yuv_j1x.h +++ /dev/null @@ -1,11301 +0,0 @@ -#ifndef __SR200PC20_REGS_H__ -#define __SR200PC20_REGS_H__ - -/*//////////////////////////////////////////////////////////*/ -/*==========================================================*/ -/* MODEL NO.:GTA_S/L*/ -/* SENSOR :SILICONFILE SR200PC20M */ -/* DSP:MSM 8916 */ -/* MCLK :24.00 Mhz*/ -/* PCLK :48.00 Mhz*/ -/* Preview:640x480*/ -/* DATE :2014.08.29 */ -/*==========================================================*/ -/* Frequency 50hz & 60hz */ - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 88 -{0x43, 0x58,}, /* 88 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x5f,}, -{0x85, 0x90,}, -{0x86, 0x01,}, //EXPMin 6000.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,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -{0xff, 0x0a,}, /* 100ms */ - -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_15fps_60Hz[]= { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x08,}, /* BLC_TIME_TH_ON */ -{0x91, 0x08,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x08,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x08,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3e R 150306 58->56 // -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a // -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, - {0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0x86,}, -{0x85, 0x00,}, - -{0x86, 0x01,}, //EXPMin 6250.00 fps -{0x87, 0xe0,}, - -{0x88, 0x02,}, //EXP Max 17.14 fps -{0x89, 0xaa,}, -{0x8a, 0x80,}, - -{0x8B, 0x75,}, //EXP100 -{0x8C, 0x30,}, -{0x8D, 0x61,}, //EXP120 -{0x8E, 0x80,}, - -{0x91, 0x03,}, //EXP Fix 15.01 fps -{0x92, 0x0c,}, -{0x93, 0xf0,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, //EXP Limit 520.83 fps -{0x9d, 0x80,}, - -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,}, /* low temp Rgain */ -{0xb0, 0x2d,}, /* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2 b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x03,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x01,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -// END of sr200pc20m_recording_60Hz_common - -}; -#endif - -struct msm_camera_i2c_reg_conf sr200pc20_Init_Reg_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 68 -{0x43, 0x44,}, /* 88 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0x86,}, -{0x85, 0xa0,}, -{0x86, 0x01,}, //EXPMin 6000.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.00 fps -{0x89, 0xb8,}, -{0x8a, 0xd8,}, -{0x8B, 0x75,}, //EXP100 -{0x8C, 0x30,}, -{0x8D, 0x61,}, //EXP120 -{0x8E, 0xa8,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, -//{0xff, 0x0a,}, /* 100ms */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_800x600_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x00,}, -{0x14, 0x43,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x40,}, /* 800x600 MiPi OutPut */ -{0x31, 0x06,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_50hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - - -{0x03, 0x48,}, - - -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - - -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -//{0xff, 0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_640x480_Preview_for_Return_60hz[] = { -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only forPreview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - - -{0x03, 0x48,}, - - -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - - -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x28,}, /* 400ms */ -/*{0xff, 0xff,}, */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_60Hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 68 -{0x43, 0x44,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0e,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0e,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0e,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0e,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x98,}, -{0x4f, 0xa0,}, -{0x50, 0x98,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x04,}, -{0x2c, 0x04,}, -{0x25, 0x0a,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x0e,}, //10 -{0x51, 0x10,}, //14 -{0x52, 0x0f,}, //12 -{0x53, 0x0b,}, //0c -{0x54, 0x0d,}, //0f -{0x55, 0x0b,}, //0c - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0x86,}, -{0x85, 0xa0,}, -{0x86, 0x01,}, //EXPMin 6000.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.57 fps -{0x89, 0x57,}, -{0x8a, 0x30,}, -{0x8B, 0x75,}, //EXP100 -{0x8C, 0x30,}, -{0x8D, 0x61,}, //EXP120 -{0x8E, 0xa8,}, - -{0x91, 0x05,}, /*EXP Fix 8.00 fps*/ -{0x92, 0xb8,}, -{0x93, 0xd8,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_VT_Init_Reg_50Hz[] = { -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x94,}, /* Enable Fixed Frame */ -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 14 ->0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 88 -{0x43, 0x58,}, -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, -{0x59, 0x20,}, -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* For Preview */ - -{0x40, 0x80,}, -{0x41, 0x20,}, /* Dyoffset 20 - > 10 */ -{0x50, 0xf0,}, /* Threshold Dyoffset */ - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x98,}, -{0x4f, 0xa0,}, -{0x50, 0x98,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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 Preview */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, - -/* only for Preview DPC */ -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x04,}, -{0x2c, 0x04,}, -{0x25, 0x0a,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x0e,}, //10 -{0x51, 0x10,}, //14 -{0x52, 0x0f,}, //12 -{0x53, 0x0b,}, //0c -{0x54, 0x0d,}, //0f -{0x55, 0x0b,}, //0c - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xef,}, /* add 20120223 enable Dgain for Dark */ -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0xf5,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, /* add 20120223 */ -{0x2e, 0x33,}, -{0x30, 0xf8,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x5f,}, -{0x85, 0x90,}, -{0x86, 0x01,}, //EXPMin 6000.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,}, - -{0x91, 0x05,}, /*EXP Fix 8.00 fps*/ -{0x92, 0xb8,}, -{0x93, 0xd8,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, -{0x88, 0x35,}, -{0x89, 0x3b,}, -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x03,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_vt_common */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_stop_stream[]= { -{0x03, 0x00,}, -{0x01, 0x01,}, -{0xff, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_i2c_check[]= { -{0x03, 0x00,}, -{0x01, 0x00,}, - -{0xff, 0x0a,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture[]= { -{0x03, 0x00,}, -{0x01, 0x31,}, /* b[0] set power sleep by preserving all register values, 0=OFF 1=ON */ - -{0x03, 0x22,}, /* Page 22 */ -{0x10, 0x69,}, /* AWB Off */ - -{0x03, 0x00,}, -{0x10, 0x00,}, /* Imge size, windowing, Hsync, Vsync */ - -{0x20, 0x00,}, /* windowing */ -{0x21, 0x0a,}, /* modify 20110929 0x0c -> 0x0a */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -/* Page10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, /* not defined in data sheet */ -{0x60, 0x63,}, /* color saturation */ - -/* Page12 *//* Noise reduction */ -{0x03, 0x12,}, -{0x20, 0x0f,}, -{0x21, 0x0f,}, -{0x90, 0x5d,}, - -/* only for Preview DPC Off */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 *//* Edge enhancement */ -{0x03, 0x13,}, -{0x10, 0xcb,}, /* Edge On */ -{0x80, 0xfd,}, - -/* PAGE 18 */ /* Image scaling */ -{0x03, 0x18,}, -{0x10, 0x00,}, /* Scaling Off */ -{0x14, 0x00,}, - - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x81,}, -{0x70, 0x85,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x32,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, -{0x1d, 0x0e,}, -{0x1e, 0x08,}, -{0x1f, 0x05,}, /* 0x03->0x04 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x80,}, /* 1600 x 1200 MiPi OutPut */ -{0x31, 0x0c,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x03,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* Page0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{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, 0x30,}, /* Sleep Off */ - -{0xff, 0x03,}, /* Increase from 30ms */ -/* END of sr200pc20m_capture. */ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_X_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x91,}, /* B[0]_horizontal flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Capture_Y_Flip[] = { -{0x03, 0x00,}, -{0x11, 0x92,}, /* B[1]_vertical flip funtion(0:off,1:on) */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M4[] = { -{0x03, 0x10,}, -{0x40, 0xd0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M3[] = { -{0x03, 0x10,}, -{0x40, 0xc0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M2[] = { -{0x03, 0x10,}, -{0x40, 0xb0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_M1[] = { -{0x03, 0x10,}, -{0x40, 0xa0,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_default[] = { -{0x03, 0x10,}, -{0x40, 0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P1[] = { -{0x03, 0x10,}, -{0x40, 0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P2[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P3[] = { -{0x03, 0x10,}, -{0x40, 0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_brightness_P4[] = { -{0x03, 0x10,}, -{0x40, 0x50,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x00,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x20,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_M1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_default[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x40,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P1[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x60,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P2[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0x80,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P3[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xa0,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_contrast_P4[] = { -{0x03,0x10,}, -{0x13,0x02,}, -{0x48,0xff,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Normal[] = { -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x30,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x38,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x80,}, -{0x45, 0x80,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0x70,}, -{0x45, 0x98,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Aqua[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x33,}, -{0x44, 0xb0,}, -{0x45, 0x40,}, - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Cold[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Vintage_Warm[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Posterize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Solarize[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Washed[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color1[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color2[] = -{ - -}; -struct msm_camera_i2c_reg_conf sr200pc20_Effect_Color3[] = -{ - -}; - -/* WhiteBalance */ -struct msm_camera_i2c_reg_conf sr200pc20_WB_Auto[] = -{ - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Daylight[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Cloudy[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Fluorescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_WB_Incandescent[] = -{ - - -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_50hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 88 -{0x43, 0x58,}, /* 88 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0c,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0c,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0c,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0c,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 33.33 fps -{0x84, 0x5f,}, -{0x85, 0x90,}, -{0x86, 0x01,}, //EXPMin 6000.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,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x1c,}, /* AE off 50hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, - -{0xff, 0x0a,}, /* delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_Auto_fps_60hz[] = { -/* 01. Start Setting */ -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1mode */ -{0x11, 0x90,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, /* ESD Check Register */ -{0x0c, 0xaa,}, /* ESD Check Register */ -{0x0d, 0xaa,}, /* ESD Check Register */ - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929, 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929, 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, //Hblank 360 -{0x41, 0x68,}, -{0x42, 0x00,}, //Vblank 68 -{0x43, 0x44,}, /* 88 */ - -{0x44, 0x09,}, /* VSCLIP */ - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x0f,}, /* BLC_TIME_TH_ON */ -{0x91, 0x0f,}, /* BLC_TIME_TH_OFF */ -{0x92, 0x88,}, /* BLC_AG_TH_ON */ -{0x93, 0x80,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x0f,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x0f,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0x88,}, /* DCDC_AG_TH_ON */ -{0xd7, 0x80,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* 00: CrYCbY, 01: CbYCrY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x0c,}, -{0x34, 0x09,}, -{0x35, 0x0b,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x0c,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x06,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0d,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0d,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{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, 0x94,}, -{0x45, 0x84,}, - -/* Out1 th */ -{0x46, 0xb0,}, -{0x47, 0x55,}, -{0x48, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x94,}, -{0x4b, 0x84,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x50,}, -{0x54, 0xb0,}, -{0x55, 0xb0,}, -{0x56, 0xb0,}, -{0x57, 0x7b,}, - -/* Dark2 th*/ -{0x58, 0xa0,}, -{0x59, 0x40,}, -{0x5a, 0xc0,}, -{0x5b, 0xc0,}, -{0x5c, 0xc8,}, -{0x5d, 0x7b,}, - -/* Dark3 th*/ -{0x5e, 0x9c,}, -{0x5f, 0x40,}, -{0x60, 0xc8,}, -{0x61, 0xc8,}, -{0x62, 0xc8,}, -{0x63, 0x7b,}, - -{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,}, /* add 20120430 */ - -/* Dont Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x17,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xd5, 0x0f,}, -{0xD6, 0xff,}, -{0xd7, 0xff,}, -/* End */ - -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, - -/* 2DY */ -{0x80, 0x00,}, /* For Preview */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0x5e,},/* Double_AG 5e->37 */ -{0x19, 0x58,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x08,}, -{0x32, 0x19,}, -{0x33, 0x2b,}, -{0x34, 0x4e,}, -{0x35, 0x6a,}, -{0x36, 0x82,}, -{0x37, 0x98,}, -{0x38, 0xa8,}, -{0x39, 0xb7,}, -{0x3a, 0xc1,}, -{0x3b, 0xc9,}, -{0x3c, 0xd3,}, -{0x3d, 0xdb,}, -{0x3e, 0xe2,}, -{0x3f, 0xea,}, -{0x40, 0xf1,}, -{0x41, 0xf9,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x0e,}, -{0x72, 0x1f,}, -{0x73, 0x3f,}, -{0x74, 0x5d,}, -{0x75, 0x75,}, -{0x76, 0x8a,}, -{0x77, 0x9c,}, -{0x78, 0xad,}, -{0x79, 0xbb,}, -{0x7a, 0xc6,}, -{0x7b, 0xd1,}, -{0x7c, 0xda,}, -{0x7d, 0xe3,}, -{0x7e, 0xea,}, -{0x7f, 0xf1,}, -{0x80, 0xf6,}, -{0x81, 0xfb,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x14, 0x43,}, - -{0x11, 0x00,}, -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0xff,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, -{0x57, 0xa0,}, -{0x58, 0x20,}, -{0x59, 0x74,}, -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0x86,}, -{0x85, 0xa0,}, -{0x86, 0x01,}, //EXPMin 6000.00 fps -{0x87, 0xf4,}, -{0x88, 0x05,}, //EXP Max 8.00 fps -{0x89, 0xb8,}, -{0x8a, 0xd8,}, -{0x8B, 0x75,}, //EXP100 -{0x8C, 0x30,}, -{0x8D, 0x61,}, //EXP120 -{0x8E, 0xa8,}, - -{0x98, 0x9d,}, -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x17,}, //EXP Limit 500.00 fps -{0x9d, 0x70,}, -{0x9e, 0x01,}, //EXP Unit -{0x9f, 0xf4,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0x90,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x46,}, -{0xbd, 0x44,}, - -{0xc0, 0x10,}, -{0xc1, 0x3c,}, -{0xc2, 0x3c,}, -{0xc3, 0x3c,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, /* Low On */ -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, /* Add 20120514 light stable */ - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, // 3a // - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, -{0x8d, 0x3a,}, -{0x8e, 0x33,}, - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x42,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x02->0x03 20150105 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x03,}, -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,}, /* drivability 24MHZ: 0x02, 48MHz:0x03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, - -{0x01, 0x30,}, - -{0xff, 0x0a,}, - -{0x03, 0x00,}, /* Sleep On */ -{0x01, 0x31,}, - -{0x03, 0x20,}, /* page 20 */ -{0x18, 0x30,}, /* for Preview */ -{0x10, 0x0c,}, /* AE off 60hz */ - -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* awb off */ - -{0x03, 0x00,}, /* page 0 */ -{0x10, 0x11,}, - -{0x20, 0x00,}, /* windowing, row start, high byte */ -{0x21, 0x02,}, /* windowing, row start, low byte */ /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, /* windowing, column start, high byte */ -{0x23, 0x0a,}, /* windowing, column start, low byte */ /* modify 20110929 0x14 -> 0x0a */ - -/* Page 10 */ -{0x03, 0x10,}, -{0x3f, 0x00,}, -{0x60, 0x63,}, - -/* Page12 */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* 0f */ -{0x21, 0x0f,}, /* 0f */ -{0x90, 0x5d,}, /* 5f */ - -//Bayer DPC level test// - -{0x98, 0x30,}, // dpc_level_thm -{0xa0, 0x18,}, // dpc_level_thl - -{0xbb, 0x0c,}, // dpc_midh_th -{0xbc, 0x06,}, // dpc_midh_th, -{0xbd, 0x04,}, // dpc_midh_th, - -/* Y DPC */ -{0x10, 0x01,}, -{0x11, 0x14,}, - -/* only for Preview DPC */ -{0xd2, 0x67,}, -{0xd5, 0x02,}, -{0xd7, 0x18,}, - -/* Page13 */ -{0x03, 0x13,}, -{0x10, 0x4a,}, /* Edge Off */ -{0x80, 0x00,}, - -/* Page18 */ -{0x03, 0x18,}, -{0x10, 0x07,}, - -/* PAGE 48 TART */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x30,}, /* MiPi Pllx2, orig 0x30 => 16.5, 0x60 => 32fps */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 : continuous -> 0x00 : not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,}, /* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0c,}, -{0x1d, 0x10,}, -{0x1e, 0x06,}, -{0x1f, 0x04,}, /* 0x05->0x03 20131101 */ /* 0x03->0x02 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640 x 480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* CLK LP -> HS Prepare time 24MHz:0x02, 48MHz:0x03 */ -{0x35, 0x01,}, -{0x36, 0x03,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x02,},/* drivability 24MHZ:02, 48MHz:03 */ - -{0x50, 0x00,}, -/* PAGE 48 END */ - -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -{0x03, 0x22,}, -{0x10, 0xe9,}, /* AWB ON */ - -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, /* Sleep Off */ -{0x01, 0x30,}, -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -{0xff, 0x0a,}, /* NEED Delay 100ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_50hz[] = { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x1c,}, /* AE off 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x04,}, /* BLC_TIME_TH_ON */ -{0x91, 0x04,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x04,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x04,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, /* EXP Normal 33.33 fps */ -{0x84, 0xb6,}, -{0x85, 0xc0,}, - -{0x86, 0x01,}, /* EXPMin 8463.54 fps */ -{0x87, 0xe0,}, - -{0x88, 0x02,}, /*EXP Max 25.00 fps */ -{0x89, 0x49,}, -{0x8a, 0x00,}, - -{0x8B, 0x92,}, /*EXP100 */ -{0x8C, 0x40,}, - -{0x8D, 0x79,}, /*EXP120 */ -{0x8E, 0xe0,}, - -{0x91, 0x02,}, /*EXP Fix 24.00 fps*/ -{0x92, 0x62,}, -{0x93, 0x50,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,},/* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x05,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x9c,}, /* AE on 50hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -struct msm_camera_i2c_reg_conf sr200pc20_24fps_Camcoder_60hz[]= { -/* Recording 24fps Anti-Flicker 50Hz END of Initial */ -/* CAMERA INITIAL for Self Recording 24 Fixed Frame */ - -{0x01, 0x31,}, /* sleep on */ -{0x01, 0x33,}, /* sleep on */ -{0x01, 0x31,}, /* sleep on */ -{0x08, 0x2f,}, /* sleep on */ -{0x0a, 0x00,}, /* sleep on */ - -/* PAGE 20 */ -{0x03, 0x20,}, /* page 20 */ -{0x10, 0x0c,}, /* AE off 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, /* page 22 */ -{0x10, 0x69,}, /* AWB off */ - -{0x03, 0x12,}, -{0x20, 0x00,}, -{0x21, 0x00,}, - -{0x03, 0x13,}, -{0x10, 0xcb,}, - -/* Initial Start */ -/* PAGE 0 START */ -{0x03, 0x00,}, -{0x10, 0x11,}, /* Vsync Active High B:[3], Sub1/2 + Preview 1 */ -{0x11, 0x94,}, -{0x12, 0x04,}, /* Pclk Falling Edge B:[2] */ - -{0x0b, 0xaa,}, -{0x0c, 0xaa,}, -{0x0d, 0xaa,}, - -{0x20, 0x00,}, -{0x21, 0x02,}, /* modify 20110929 0x04 -> 0x02 */ -{0x22, 0x00,}, -{0x23, 0x0a,}, /* modify 20110929 0x14 -> 0x0a */ - -{0x24, 0x04,}, -{0x25, 0xb0,}, -{0x26, 0x06,}, -{0x27, 0x40,}, - -{0x28, 0x0c,}, -{0x29, 0x04,}, -{0x2a, 0x02,}, -{0x2b, 0x04,}, -{0x2c, 0x06,}, -{0x2d, 0x02,}, - -{0x40, 0x01,}, /* Hblank 280 */ -{0x41, 0x18,}, -{0x42, 0x00,}, /* Vblank 18 */ -{0x43, 0x12,}, - -{0x45, 0x04,}, -{0x46, 0x18,}, -{0x47, 0xd8,}, - -/* BLC */ -{0x80, 0x2e,}, -{0x81, 0x7c,}, /* 2frame -> 8 frame */ -{0x82, 0x90,}, -{0x83, 0x00,}, -{0x84, 0x0c,}, -{0x85, 0x00,}, -{0x90, 0x05,}, /* BLC_TIME_TH_ON */ -{0x91, 0x05,}, /* BLC_TIME_TH_OFF */ -{0x92, 0xa8,}, /* BLC_AG_TH_ON */ -{0x93, 0xa0,}, /* BLC_AG_TH_OFF */ -{0x94, 0xff,}, -{0x95, 0xff,}, -{0x96, 0xdc,}, -{0x97, 0xfe,}, -{0x98, 0x38,}, - -/* Dark BLC*/ -{0xa0, 0x00,}, -{0xa2, 0x00,}, -{0xa4, 0x00,}, -{0xa6, 0x00,}, - -/* Normal BLC */ -{0xa8, 0x41,}, /* B */ -{0xaa, 0x41,}, -{0xac, 0x41,}, -{0xae, 0x41,}, - -/* OutDoor BLC */ -{0x99, 0x43,}, -{0x9a, 0x43,}, -{0x9b, 0x43,}, -{0x9c, 0x43,}, -/* PAGE 0 END */ - -/* PAGE 2 START */ -{0x03, 0x02,}, -{0x12, 0x03,}, -{0x13, 0x03,}, -{0x16, 0x00,}, -{0x17, 0x8C,}, -{0x18, 0x4c,}, /* Double_AG */ -{0x19, 0x00,}, -{0x1a, 0x39,}, /* Double_AG 38 -> 39 */ -{0x1c, 0x09,}, -{0x1d, 0x40,}, -{0x1e, 0x30,}, -{0x1f, 0x10,}, - -{0x20, 0x77,}, -{0x21, 0xde,}, -{0x22, 0xa7,}, -{0x23, 0x30,}, /* CLAMP */ -{0x27, 0x3c,}, -{0x2b, 0x80,}, -{0x2e, 0x00,}, -{0x2f, 0x00,}, -{0x30, 0x05,}, /* For Hi-253 never no change 0x05 */ - -{0x50, 0x20,}, -{0x51, 0x1c,}, /* add 20110826 */ -{0x52, 0x01,}, /* 0x03 -> 0x01 */ -{0x53, 0xc1,}, /* add 20110818 */ -{0x54, 0xc0,}, -{0x55, 0x1c,}, -{0x56, 0x11,}, -{0x58, 0x22,}, /*add 20120430 */ -{0x59, 0x20,}, /*add 20120430 */ -{0x5d, 0xa2,}, -{0x5e, 0x5a,}, - -{0x60, 0x87,}, -{0x61, 0x99,}, -{0x62, 0x88,}, -{0x63, 0x97,}, -{0x64, 0x88,}, -{0x65, 0x97,}, - -{0x67, 0x0c,}, -{0x68, 0x0c,}, -{0x69, 0x0c,}, - -{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,}, - -{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,}, -{0xd4, 0x05,}, /* DCDC_TIME_TH_ON */ -{0xd5, 0x05,}, /* DCDC_TIME_TH_OFF */ -{0xd6, 0xa8,}, /* DCDC_AG_TH_ON */ -{0xd7, 0xa0,}, /* DCDC_AG_TH_OFF */ -{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 2 END */ - -/* PAGE 3 */ -{0x03, 0x03,}, -{0x10, 0x10,}, -/* PAGE 3 END */ - -/* PAGE 10 START */ -{0x03, 0x10,}, -{0x10, 0x01,}, /* CrYCbY */ -{0x12, 0x30,}, -{0x20, 0x00,}, -{0x30, 0x00,}, -{0x31, 0x00,}, -{0x32, 0x00,}, -{0x33, 0x00,}, - -{0x34, 0x30,}, -{0x35, 0x00,}, -{0x36, 0x00,}, -{0x38, 0x00,}, -{0x3e, 0x58,}, -{0x3f, 0x00,}, /* Setting For Camcorder 24 */ - -{0x40, 0x80,}, -{0x41, 0x00,}, - -{0x60, 0x6b,}, -{0x61, 0x7b,}, /* 77 */ -{0x62, 0x7b,}, /* 77 */ -{0x63, 0xa0,}, /* Double_AG 50 -> 30 */ -{0x64, 0x80,}, - -{0x66, 0x42,}, -{0x67, 0x00,}, - -{0x6a, 0x8a,}, /* 8a */ -{0x6b, 0x72,}, /* 74 20150320_71*/ -{0x6c, 0x78,}, /* 7e 20150320_6c*/ -{0x6d, 0x8e,}, /* 8e */ -{0x76, 0x01,}, /* ADD 20120522 */ -{0x79, 0x04,}, /* ADD 20120522 */ - -/* PAGE 11 START */ -{0x03, 0x11,}, -{0x10, 0x7f,}, -{0x11, 0x40,}, -{0x12, 0x0a,}, /* Blue Max-Filter Delete */ -{0x13, 0xb9,}, - -{0x26, 0x68,}, /* Double_AG 31 -> 20 */ -{0x27, 0x62,}, /* Double_AG 34 -> 22 */ -{0x28, 0x0f,}, -{0x29, 0x10,}, -{0x2b, 0x30,}, -{0x2c, 0x32,}, - -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x19,}, -{0x34, 0x16,}, -{0x35, 0x13,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x30,}, -{0x3a, 0x2f,}, -{0x3b, 0x13,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x1c,}, -{0x40, 0x19,}, -{0x41, 0x16,}, - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x1c,}, -{0x46, 0x19,}, -{0x47, 0x16,}, - -/* Dark2 D-LPF th */ -{0x48, 0x80,}, -{0x49, 0x18,}, -{0x4a, 0x80,}, -{0x4b, 0x1c,}, -{0x4c, 0x19,}, -{0x4d, 0x16,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x18,}, -{0x50, 0x80,}, -{0x51, 0x1c,}, -{0x52, 0x19,}, -{0x53, 0x16,}, - -{0x54, 0x11,}, -{0x55, 0x17,}, -{0x56, 0x20,}, -{0x57, 0x01,}, -{0x58, 0x00,}, -{0x59, 0x00,}, - -{0x5a, 0x18,}, -{0x5b, 0x00,}, -{0x5c, 0x00,}, - -{0x60, 0x3f,}, -{0x62, 0x60,}, -{0x70, 0x06,}, -/* PAGE 11 END */ - -/* PAGE 12 START */ -{0x03, 0x12,}, -{0x20, 0x0f,}, /* Setting For Camcorder 24 */ -{0x21, 0x0f,}, /* Setting For Camcorder 24 */ - -{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, 0xb0,}, -{0x49, 0xb0,}, -{0x4a, 0x90,}, -{0x4b, 0x80,}, - -/* Indoor th */ -{0x4c, 0xb0,}, -{0x4d, 0x40,}, -{0x4e, 0x90,}, -{0x4f, 0x90,}, -{0x50, 0x90,}, -{0x51, 0x80,}, - -/* Dark1 th*/ -{0x52, 0xb0,}, -{0x53, 0x40,}, -{0x54, 0x90,}, -{0x55, 0x90,}, -{0x56, 0xa0,}, -{0x57, 0x78,}, - -/* Dark2 th*/ -{0x58, 0xb0,}, -{0x59, 0x40,}, -{0x5a, 0x90,}, -{0x5b, 0x90,}, -{0x5c, 0xa0,}, -{0x5d, 0x78,}, - -/* Dark3 th*/ -{0x5e, 0xb0,}, -{0x5f, 0x40,}, -{0x60, 0x90,}, -{0x61, 0x90,}, -{0x62, 0xa0,}, -{0x63, 0x78,}, - -{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,}, /* Setting For Camcorder 24 */ - -/* Don't Touch register */ -{0xD0, 0x0c,}, -{0xD1, 0x80,}, -{0xD2, 0x67,}, -{0xD3, 0x00,}, -{0xD4, 0x00,}, -{0xD5, 0x02,}, -{0xD6, 0xff,}, -{0xD7, 0x18,}, -/* End */ -{0x3b, 0x06,}, -{0x3c, 0x06,}, - -/* Don't Touch register */ -{0xc5, 0x30,}, /* 55 -> 48 */ -{0xc6, 0x2a,}, /* 48 -> 40 */ -/* PAGE 12 END */ - -/* PAGE 13 START */ -{0x03, 0x13,}, -{0x10, 0xcb,}, -{0x11, 0x7b,}, -{0x12, 0x07,}, -{0x14, 0x00,}, - -{0x20, 0x15,}, -{0x21, 0x13,}, -{0x22, 0x33,}, -{0x23, 0x05,}, -{0x24, 0x09,}, - -{0x25, 0x0a,}, - -{0x26, 0x18,}, -{0x27, 0x30,}, -{0x29, 0x12,}, -{0x2a, 0x50,}, - -/* Low clipth */ -{0x2b, 0x02,}, -{0x2c, 0x02,}, -{0x25, 0x06,}, -{0x2d, 0x0c,}, -{0x2e, 0x12,}, -{0x2f, 0x12,}, - -// Out2 Edge // -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x0a,}, -{0x63, 0x0b,}, -{0x64, 0x0a,}, -{0x65, 0x08,}, -{0x66, 0x09,}, -{0x67, 0x08,}, - -/* Dark2 Edge */ -{0x68, 0x0a,}, -{0x69, 0x0b,}, -{0x6a, 0x0a,}, -{0x6b, 0x08,}, -{0x6c, 0x09,}, -{0x6d, 0x08,}, - -/* Dark3 Edge */ -{0x6e, 0x0a,}, -{0x6f, 0x0b,}, -{0x70, 0x0a,}, -{0x71, 0x08,}, -{0x72, 0x09,}, -{0x73, 0x08,}, - -/* 2DY */ -{0x80, 0xfd,}, /* Setting For Camcorder 24 */ -{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,}, - -/* 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, 0x25,}, -{0xbd, 0x2a,}, -{0xbe, 0x27,}, -{0xbf, 0x25,}, -{0xc0, 0x2a,}, -{0xc1, 0x27,}, - -/* Dark1 */ -{0xc2, 0x1e,}, -{0xc3, 0x24,}, -{0xc4, 0x20,}, -{0xc5, 0x1e,}, -{0xc6, 0x24,}, -{0xc7, 0x20,}, - -/*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 13 END */ - -/* PAGE 14 START */ -{0x03, 0x14,}, -{0x10, 0x01,}, - -{0x14, 0x50,}, // BX 150316 90->c6 // -{0x15, 0x70,}, // BY // -{0x16, 0x60,}, // GRX 150316 80->c6 // -{0x17, 0x80,}, // GRY // -{0x18, 0x60,}, // GBX 150316 80->c6 // -{0x19, 0x80,}, // GBY // - -{0x20, 0x60,}, // R 150316 88->be // -{0x21, 0x80,}, // R // - -{0x22, 0x80,}, -{0x23, 0x80,}, -{0x24, 0x80,}, - -{0x30, 0xc8,}, -{0x31, 0x2b,}, -{0x32, 0x00,}, -{0x33, 0x00,}, -{0x34, 0x90,}, - -{0x40, 0x80,}, // 3eR 150306 58->56// -{0x50, 0x5c,}, // 28 GR // -{0x60, 0x4d,}, // 24 B 150306 38->3a// -{0x70, 0x5c,}, // 28 GB // - -/* PAGE 14 END */ - -/* PAGE 15 START */ -{0x03, 0x15,}, -{0x10, 0x0f,}, - -/* Rstep H 16 */ -/* Rstep L 14 */ -{0x14, 0x46,}, /* CMCOFSGH */ -{0x15, 0x38,}, /* CMCOFSGM */ -{0x16, 0x28,}, /* CMCOFSGL */ -{0x17, 0x2f,}, /* CMC SIGN */ - -/* CMC */ -{0x30, 0x7e,}, -{0x31, 0x43,}, -{0x32, 0x05,}, -{0x33, 0x20,}, -{0x34, 0x65,}, -{0x35, 0x05,}, -{0x36, 0x0c,}, -{0x37, 0x3e,}, -{0x38, 0x8a,}, - -/* CMC OFS */ -{0x40, 0x84,}, -{0x41, 0x0b,}, -{0x42, 0x84,}, -{0x43, 0x08,}, -{0x44, 0x87,}, -{0x45, 0x00,}, -{0x46, 0x82,}, -{0x47, 0x9e,}, -{0x48, 0x24,}, - -/* CMC POFS*/ -{0x50, 0x08,}, -{0x51, 0x88,}, -{0x52, 0x00,}, -{0x53, 0x12,}, -{0x54, 0x08,}, -{0x55, 0x9a,}, -{0x56, 0x05,}, -{0x57, 0x90,}, -{0x58, 0x0a,}, - -{0x80, 0x00,}, -{0x85, 0x80,}, -{0x87, 0x02,}, -{0x88, 0x00,}, -{0x89, 0x00,}, -{0x8a, 0x00,}, -/* PAGE 15 END */ - -/* PAGE 16 START */ -{0x03, 0x16,}, -{0x10, 0x31,}, -{0x18, 0xa0,},/* Double_AG 5e->37 */ -{0x19, 0x90,},/* Double_AG 5e->36 */ -{0x1a, 0x0e,}, -{0x1b, 0x01,}, -{0x1c, 0xdc,}, -{0x1d, 0xfe,}, - -/* GMA Default */ -{0x30, 0x00,}, -{0x31, 0x0e,}, -{0x32, 0x1e,}, -{0x33, 0x34,}, -{0x34, 0x56,}, -{0x35, 0x74,}, -{0x36, 0x8b,}, -{0x37, 0x9c,}, -{0x38, 0xaa,}, -{0x39, 0xbc,}, -{0x3a, 0xc9,}, -{0x3b, 0xd5,}, -{0x3c, 0xdf,}, -{0x3d, 0xe7,}, -{0x3e, 0xef,}, -{0x3f, 0xf4,}, -{0x40, 0xf8,}, -{0x41, 0xfd,}, -{0x42, 0xff,}, - -{0x50, 0x00,}, -{0x51, 0x08,}, -{0x52, 0x1e,}, -{0x53, 0x36,}, -{0x54, 0x5a,}, -{0x55, 0x75,}, -{0x56, 0x8d,}, -{0x57, 0xa1,}, -{0x58, 0xb2,}, -{0x59, 0xbe,}, -{0x5a, 0xc9,}, -{0x5b, 0xd2,}, -{0x5c, 0xdb,}, -{0x5d, 0xe3,}, -{0x5e, 0xeb,}, -{0x5f, 0xf0,}, -{0x60, 0xf5,}, -{0x61, 0xf7,}, -{0x62, 0xf8,}, - -{0x70, 0x00,}, -{0x71, 0x08,}, -{0x72, 0x1c,}, -{0x73, 0x32,}, -{0x74, 0x54,}, -{0x75, 0x70,}, -{0x76, 0x87,}, -{0x77, 0x9a,}, -{0x78, 0xaa,}, -{0x79, 0xb9,}, -{0x7a, 0xc4,}, -{0x7b, 0xcf,}, -{0x7c, 0xd8,}, -{0x7d, 0xe0,}, -{0x7e, 0xe9,}, -{0x7f, 0xf0,}, -{0x80, 0xf7,}, -{0x81, 0xfc,}, -{0x82, 0xff,}, -/* PAGE 16 END */ - -/* PAGE 17 START */ -{0x03, 0x17,}, -{0x10, 0xf7,}, -/* PAGE 17 END */ - -/* 640x480 size */ -{0x03, 0x18,}, -{0x10, 0x07,}, -{0x11, 0x00,}, -{0x14, 0x43,}, - -{0x12, 0x58,}, -{0x20, 0x05,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0xe0,}, -{0x24, 0x00,}, /* X start position */ -{0x25, 0x08,}, -{0x26, 0x00,}, /* Y start position */ -{0x27, 0x02,}, -{0x28, 0x05,}, /* X End position */ -{0x29, 0x08,}, -{0x2a, 0x01,}, /* Y End position */ -{0x2b, 0xe2,}, -{0x2c, 0x0a,}, -{0x2d, 0x00,}, -{0x2e, 0x0a,}, -{0x2f, 0x00,}, -{0x30, 0x46,}, -{0x15, 0x01,}, - -/* PAGE 20 START */ -{0x03, 0x20,}, -{0x11, 0x1c,}, -{0x18, 0x30,}, -{0x1a, 0x08,}, -{0x20, 0x05,}, -{0x21, 0x30,}, -{0x22, 0x10,}, -{0x23, 0x00,}, -{0x24, 0x00,}, - -{0x28, 0xe7,}, -{0x29, 0x0d,}, /* 20100305 ad->0d */ -{0x2a, 0x03,}, -{0x2b, 0x34,}, - -{0x2c, 0xc2,}, -{0x2d, 0x5f,}, -{0x2e, 0x33,}, -{0x30, 0x78,}, -{0x32, 0x03,}, -{0x33, 0x2e,}, -{0x34, 0x30,}, -{0x35, 0xd4,}, -{0x36, 0xfe,}, -{0x37, 0x32,}, -{0x38, 0x04,}, -{0x39, 0x22,}, -{0x3a, 0xde,}, -{0x3b, 0x22,}, -{0x3c, 0xde,}, - -{0x50, 0x45,}, -{0x51, 0x88,}, - -{0x56, 0x27,}, /* for tracking 20120314 */ -{0x57, 0xa0,}, /* for tracking 20120314 */ -{0x58, 0x20,}, /* for tracking 20120314 */ -{0x59, 0x74,}, /* for tracking 20120314 */ -{0x5a, 0x04,}, - -{0x60, 0x55,}, -{0x61, 0x55,}, -{0x62, 0x6A,}, -{0x63, 0xA9,}, -{0x64, 0x6A,}, -{0x65, 0xA9,}, -{0x66, 0x6B,}, -{0x67, 0xE9,}, -{0x68, 0x6B,}, -{0x69, 0xE9,}, -{0x6a, 0x6A,}, -{0x6b, 0xA9,}, -{0x6c, 0x6A,}, -{0x6d, 0xA9,}, -{0x6e, 0x55,}, -{0x6f, 0x55,}, - -{0x70, 0x73,}, /* 6c */ -{0x71, 0x80,}, /* 82(+8) */ - -{0x76, 0x43,}, -{0x77, 0xf2,}, -{0x78, 0x23,}, /* 24 */ -{0x79, 0x45,}, /* Y Target 70 => 25, 72 => 26 */ -{0x7a, 0x23,}, /* 23 */ -{0x7b, 0x22,}, /* 22 */ -{0x7d, 0x23,}, - -{0x83, 0x01,}, //EXP Normal 30.00 fps -{0x84, 0xe7,}, -{0x85, 0x80,}, - -{0x86, 0x01,}, //EXPMin 7812.50 fps -{0x87, 0xe0,}, - -{0x88, 0x01,}, //EXP Max 30.00 fps -{0x89, 0xe7,}, -{0x8a, 0x80,}, - -{0x8B, 0x92,}, /*EXP100 */ -{0x8C, 0x40,}, - -{0x8D, 0x79,}, /*EXP120 */ -{0x8E, 0xe0,}, - -{0x91, 0x02,}, /*EXP Fix 24.00 fps*/ -{0x92, 0x62,}, -{0x93, 0x50,}, - -{0x98, 0x9d,}, /* 9d */ -{0x99, 0x45,}, -{0x9a, 0x0d,}, -{0x9b, 0xde,}, - -{0x9c, 0x16,}, /*EXP Limit 705.30 fps */ -{0x9d, 0x80,}, - -{0x9e, 0x01,}, /*EXP Unit */ -{0x9f, 0xe0,}, - -{0xb0, 0x18,}, -{0xb1, 0x14,}, -{0xb2, 0xb0,}, -{0xb3, 0x14,}, -{0xb4, 0x14,}, -{0xb5, 0x38,}, -{0xb6, 0x26,}, -{0xb7, 0x20,}, -{0xb8, 0x1d,}, -{0xb9, 0x1b,}, -{0xba, 0x1a,}, -{0xbb, 0x19,}, -{0xbc, 0x14,}, -{0xbd, 0x14,}, - -{0xc0, 0x10,}, -{0xc1, 0x10,}, -{0xc2, 0x10,}, -{0xc3, 0x10,}, -{0xc4, 0x08,}, - -{0xc8, 0x80,}, -{0xc9, 0x80,}, -/* PAGE 20 END */ - -/* PAGE 22 START */ -{0x03, 0x22,}, -{0x10, 0xfd,}, -{0x11, 0x2e,}, -{0x19, 0x01,}, -{0x20, 0x30,}, -{0x21, 0x40,}, -{0x24, 0x01,}, -{0x25, 0x7e,}, - -{0x30, 0x80,}, -{0x31, 0x81,}, -{0x38, 0x11,}, -{0x39, 0x34,}, -{0x40, 0xe4,}, - -{0x41, 0x43,}, // 33 // -{0x42, 0x22,}, // 22 // -{0x43, 0xf1,}, // f6 // -{0x44, 0x54,}, // 44 // -{0x45, 0x22,}, // 33 // -{0x46, 0x02,}, -{0x50, 0xb2,}, -{0x51, 0x81,}, -{0x52, 0x98,}, - -{0x80, 0x38,}, -{0x81, 0x20,}, -{0x82, 0x3a,}, /* 3a */ - -{0x83, 0x5b,}, -{0x84, 0x26,}, -{0x85, 0x53,}, -{0x86, 0x20,}, - -{0x87, 0x44,}, //42 -{0x88, 0x35,}, //31 -{0x89, 0x3b,}, //3c -{0x8a, 0x2a,}, - -{0x8b, 0x3f,}, //40 -{0x8c, 0x36,}, //37 -{0x8d, 0x3a,}, //3a -{0x8e, 0x33,}, //2f - -{0x8f, 0x5a,}, -{0x90, 0x59,}, -{0x91, 0x55,}, -{0x92, 0x4d,}, -{0x93, 0x47,}, -{0x94, 0x40,}, -{0x95, 0x39,}, -{0x96, 0x31,}, -{0x97, 0x2c,}, -{0x98, 0x29,}, -{0x99, 0x27,}, -{0x9a, 0x23,}, - -{0x9b, 0x77,}, -{0x9c, 0x77,}, -{0x9d, 0x48,}, -{0x9e, 0x37,}, -{0x9f, 0x30,}, - -{0xa0, 0xf0,}, -{0xa1, 0x44,}, -{0xa2, 0xff,}, -{0xa3, 0xff,}, - -{0xa4, 0x03,}, /* 1500fps */ -{0xa5, 0x2c,}, /* 700fps */ -{0xa6, 0xbd,}, /*20150119 cf -> bd*/ - -{0xad, 0x40,}, -{0xae, 0x4a,}, - -{0xaf, 0x2f,},/* low temp Rgain */ -{0xb0, 0x2d,},/* low temp Rgain */ - -{0xb1, 0x00,}, /* 0x20 -> 0x00 0405 modify */ -{0xb4, 0xbf,}, -{0xb8, 0xb2,}, /* a2:b-2,R+2b4:B-3,R+4 lowtemp b0 a1 Spec AWB A modify */ -{0xb9, 0x00,}, -/* PAGE 22 END */ - -/* PAGE 48 START */ -{0x03, 0x48,}, - -/* PLL Setting */ -{0x70, 0x05,}, -{0x71, 0x3c,}, /* MiPi Pllx 2.5 */ -{0x72, 0x85,}, -{0x70, 0xa5,}, /* PLL Enable */ -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x03, 0x48,}, -{0x70, 0x95,}, /* CLK_GEN_ENABLE */ - -/* MIPI TX Setting */ -{0x11, 0x00,}, /* 20111013 0x10 continuous -> 0x00 not Continuous */ -{0x10, 0x1c,}, -{0x12, 0x00,}, -{0x14, 0x30,},/* 20111013 0x00 -> 0x30 Clock Delay */ -{0x16, 0x04,}, - - -{0x19, 0x00,}, -{0x1a, 0x30,}, -{0x1b, 0x17,}, -{0x1c, 0x0b,}, /* 20121019 */ -{0x1d, 0x10,}, -{0x1e, 0x08,}, /* 20121009 */ -{0x1f, 0x05,}, /* 20121101 0x05 -> 0x004 */ /* 0x04->0x03 20140509 */ -{0x20, 0x00,}, - -{0x23, 0x01,}, -{0x24, 0x1e,}, -{0x25, 0x00,}, -{0x26, 0x00,}, -{0x27, 0x01,}, -{0x28, 0x00,}, -{0x2a, 0x06,}, -{0x2b, 0x40,}, -{0x2c, 0x04,}, -{0x2d, 0xb0,}, - -{0x30, 0x00,}, /* 640x480 MiPi OutPut */ -{0x31, 0x05,}, - -{0x32, 0x0c,}, -{0x33, 0x0a,}, -{0x34, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x35, 0x02,}, /* 20121101 0x03 -> 0x02 */ -{0x36, 0x01,}, -{0x37, 0x07,}, -{0x38, 0x02,}, -{0x39, 0x03,}, /* drivability 24MHZ:02, 48MHz:03 */ -{0x50, 0x00,}, -/* PAGE 48 END */ - -/* PAGE 20 */ -{0x03, 0x20,}, -{0x10, 0x8c,}, /* AE on 60hz */ - -/* PAGE 22 */ -{0x03, 0x22,}, -{0x10, 0xe9,}, - -/* PAGE 0 */ -{0x03, 0x00,}, -{0x11, 0x94,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, -{0x03, 0x00,}, - -{0x03, 0x00,}, -{0x01, 0x30,}, -{0xff, 0x28,}, /* NEED Delay 400ms */ -/* END of sr200pc20m_recording_50Hz_common*/ -}; - -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -struct msm_camera_i2c_reg_conf sr200pc20_beauty_off[] = { -{0x03, 0x10,}, -{0x40, 0x80,}, - -{0x03, 0x11,}, -/* 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, 0x20,}, -{0x3a, 0x1f,}, -{0x3b, 0x03,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x0c,}, -{0x40, 0x09,}, -{0x41, 0x03,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x0f,}, -{0x46, 0x0c,}, -{0x47, 0x0b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x0f,}, -{0x4c, 0x0c,}, -{0x4d, 0x0b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x0f,}, -{0x52, 0x0c,}, -{0x53, 0x0c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x0c,}, -{0x54, 0x0f,}, -{0x55, 0x0c,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x09,}, -{0x5a, 0x0c,}, -{0x5b, 0x0c,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x08,}, -{0x60, 0x09,}, -{0x61, 0x08,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x07,}, -{0x66, 0x07,}, -{0x67, 0x07,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x06,}, -{0x6c, 0x06,}, -{0x6d, 0x06,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x06,}, -{0x72, 0x06,}, -{0x73, 0x06,}, -}; - -struct msm_camera_i2c_reg_conf sr200pc20_beauty_on[] = { -{0x03, 0x10,}, -{0x40, 0x30,}, - -{0x03, 0x11,}, -/* Out2 D-LPF th */ -{0x30, 0x70,}, -{0x31, 0x10,}, -{0x32, 0x58,}, -{0x33, 0x39,}, -{0x34, 0x36,}, -{0x35, 0x33,}, - -/* Out1 D-LPF th */ -{0x36, 0x70,}, -{0x37, 0x18,}, -{0x38, 0x58,}, -{0x39, 0x50,}, -{0x3a, 0x4f,}, -{0x3b, 0x33,}, - -/* Indoor D-LPF th */ -{0x3c, 0x80,}, -{0x3d, 0x18,}, -{0x3e, 0x80,}, -{0x3f, 0x3c,}, -{0x40, 0x39,}, -{0x41, 0x33,}, /* 20120224 0x06 -> 0x04 */ - -/* Dark1 D-LPF th */ -{0x42, 0x80,}, -{0x43, 0x18,}, -{0x44, 0x80,}, -{0x45, 0x3f,}, -{0x46, 0x3c,}, -{0x47, 0x3b,}, - -/* Dark2 D-LPF th */ -{0x48, 0x88,}, -{0x49, 0x2c,}, -{0x4a, 0x80,}, -{0x4b, 0x3f,}, -{0x4c, 0x3c,}, -{0x4d, 0x3b,}, - -/* Dark3 D-LPF th */ -{0x4e, 0x80,}, -{0x4f, 0x23,}, -{0x50, 0x80,}, -{0x51, 0x3f,}, -{0x52, 0x3c,}, -{0x53, 0x3c,}, - -{0x03, 0x13,}, -/* Out2 Edge */ -{0x50, 0x10,}, -{0x51, 0x14,}, -{0x52, 0x12,}, -{0x53, 0x02,}, -{0x54, 0x03,}, -{0x55, 0x02,}, - -/* Out1 Edge */ -{0x56, 0x0f,}, -{0x57, 0x12,}, -{0x58, 0x12,}, -{0x59, 0x02,}, -{0x5a, 0x03,}, -{0x5b, 0x02,}, - -/* Indoor Edge */ -{0x5c, 0x0a,}, -{0x5d, 0x0b,}, -{0x5e, 0x0a,}, -{0x5f, 0x02,}, -{0x60, 0x03,}, -{0x61, 0x02,}, - -/* Dark1 Edge */ -{0x62, 0x09,}, -{0x63, 0x09,}, -{0x64, 0x09,}, -{0x65, 0x02,}, -{0x66, 0x02,}, -{0x67, 0x02,}, - -/* Dark2 Edge */ -{0x68, 0x08,}, -{0x69, 0x08,}, -{0x6a, 0x08,}, -{0x6b, 0x02,}, -{0x6c, 0x02,}, -{0x6d, 0x02,}, - -/* Dark3 Edge */ -{0x6e, 0x08,}, -{0x6f, 0x08,}, -{0x70, 0x08,}, -{0x71, 0x01,}, -{0x72, 0x01,}, -{0x73, 0x01,}, -}; -#endif - -#if 0 -static const u16 sr200pc20_15fps[] = { - -}; - -static const u16 sr200pc20_20fps[]= { - -}; - - -/******************************************************* -* CAMERA_SCENE -*******************************************************/ -static const u16 sr200pc20m_scene_off[] = { - -}; - - -static const u16 sr200pc20m_scene_landscape[] = { - -}; - - -static const u16 sr200pc20m_scene_party[] = { - - -}; - - -static const u16 sr200pc20m_scene_sunset[] = { - -}; - -static const u16 sr200pc20m_scene_dawn[] = { - -}; - -static const u16 sr200pc20m_scene_fall[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Normal[] = { - -}; - -static const u16 sr200pc20m_scene_nightshot_Dark[] = { - -}; - -static const u16 sr200pc20m_scene_backlight[] = { - -}; - - -static const u16 sr200pc20m_scene_candle[] = { - -}; - - - -/******************************************************* -* CAMERA_METERING -*******************************************************/ -static const u16 sr200pc20m_metering_matrix[] = { - -}; - -static const u16 sr200pc20m_metering_spot[] = { - -}; - -static const u16 sr200pc20m_metering_center[] = { - -}; - -#endif - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352.h deleted file mode 100644 index 87c6fff88cd7..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - #ifndef __SR352_H__ -#define __SR352_H__ - -#include "msm_sensor.h" -#include "msm_sensor_driver.h" - -#undef SR352_DEBUG -#undef CDBG - -#define SR352_DEBUG -#ifdef SR352_DEBUG -#define CDBG(fmt, args...) printk("[SR352] %s : %d : "fmt "\n", __FUNCTION__, __LINE__, ##args) -#endif - -int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp); -void sr352_set_default_settings(void); -int sr352_sensor_match_id(struct msm_camera_i2c_client *sensor_i2c_client, - struct msm_camera_slave_info *slave_info, - const char *sensor_name); -#endif //__sr352_H__ \ No newline at end of file diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv.c b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv.c deleted file mode 100644 index 2ba99c600c24..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv.c +++ /dev/null @@ -1,2300 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - -#if 0 -#define CONFIG_LOAD_FILE // Enable it for Tunning Binary -#define NO_BURST // Enable no burst mode for Tunning -#endif - -//#define NO_BURST // Enable no burst mode for Tunning - -//#define FLASH_DEBUG -#ifdef FLASH_DEBUG -#define CDBG_FL(_fmt, args...) printk(_fmt, ##args) -#else -#define CDBG_FL(_fmt, args...) -#endif - -#include "sr352.h" -/* *********************** Settings file selection *********************** */ -#ifdef CONFIG_MACH_MILLETVEWIFI_EUR_OPEN -#define REG_SET_FILE "sr352_yuv.h" -#else -#define REG_SET_FILE "sr352_yuv_matisse.h" -#endif - -#include REG_SET_FILE -/* *********************** End Selection *********************** */ - -#if 0 -#define ANTIBANDING_60HZ 1 -//dummy declaration for 50HZ -//for successful compilation -#define sr352_50hz_setting sr352_60hz_setting -#define sr352_HD_50hz_setting sr352_HD_60hz_setting -#define sr352_AEAWB_Lock_50Hz sr352_AEAWB_Lock_60Hz -#define sr352_AEAWB_Unlock_50Hz sr352_AEAWB_Unlock_60Hz -#elif defined(CONFIG_MACH_MILLETWIFI_OPEN) -extern int back_camera_antibanding_get(void); /*add anti-banding code */ -#define ANTIBANDING_60HZ (back_camera_antibanding_get() == 60) -#else -#define ANTIBANDING_60HZ 0 -//dummy declaration for 60HZ -//for successful compilation -#define sr352_60hz_setting sr352_50hz_setting -#define sr352_HD_60hz_setting sr352_HD_50hz_setting -#define sr352_AEAWB_Lock_60Hz sr352_AEAWB_Lock_50Hz -#define sr352_AEAWB_Unlock_60Hz sr352_AEAWB_Unlock_50Hz -#endif - - -#include "msm_sd.h" -#include "camera.h" -#include "msm_cci.h" -#include "msm_camera_dt_util.h" - -#ifndef NO_BURST -#define BURST_MODE_BUFFER_MAX_SIZE 255 -#define BURST_REG 0x0e -#define DELAY_REG 0xff -uint8_t burst_reg_data[BURST_MODE_BUFFER_MAX_SIZE]; -static int32_t sr352_sensor_burst_write (struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size); -#endif - -#ifdef CONFIG_LOAD_FILE -#define SR352_WRITE_LIST(A) \ - sr352_regs_from_sd_tunning(A,s_ctrl,#A); -#define SR352_WRITE_LIST_BURST(A) \ - sr352_regs_from_sd_tunning(A,s_ctrl,#A); -#else -#define SR352_WRITE_LIST(A) \ - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_conf_tbl( \ - s_ctrl->sensor_i2c_client, A, \ - ARRAY_SIZE(A), \ - MSM_CAMERA_I2C_BYTE_DATA); CDBG("REGSEQ ****** %s", #A) -#define SR352_WRITE_LIST_BURST(A) \ - sr352_sensor_burst_write(s_ctrl,A,ARRAY_SIZE(A)); CDBG("REGSEQ ****** BURST %s", #A) -#endif - -#ifdef CONFIG_LOAD_FILE -#include -#include -#include -#include -#include - -static char *sr352_regs_table; -static int sr352_regs_table_size; -int sr352_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name); -void sr352_regs_table_init(char *filename); -void sr352_regs_table_exit(void); -#endif - -static struct yuv_ctrl sr352_ctrl; -extern uint16_t rear_vendor_id; - -static int32_t cur_scene_mode_chg = 0; -extern unsigned int system_rev; -unsigned int settings_type = 0; - -#if defined (AF_FLASH_SUPPORT) -int flash_mode; -int flash_status; -int is_preflash; -int is_touchaf; -int focus_mode; -int need_main_flash; -int is_af_run; -FLASH_t Flash; -static int8_t cur_scene_mode = 0; - -int set_led_flash(int); -void sr352_get_sensor_ev_data(struct msm_sensor_ctrl_t *s_ctrl, uint16_t PreFlashEnable); -void sr352_get_ev_data_flash_Off_func1(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_get_ev_data_preflash_func2(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_set_ev_data_mainFlash_func3(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_return_ev_data_func4(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_actuator_softlanding(struct msm_sensor_ctrl_t *s_ctrl); -void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl); -static int sr352_is_required_flash(struct msm_sensor_ctrl_t *s_ctrl, int flash_mode); -void sr352_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode); -void sr352_recording_landing(struct msm_sensor_ctrl_t *s_ctrl); -#endif - - -void sr352_check_hw_revision(void); - -void sr352_check_hw_revision() -{ - settings_type = 1; -} - -int32_t sr352_set_exposure_compensation(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EV_M4: - rc = SR352_WRITE_LIST(sr352_brightness_M4); - break; - case CAMERA_EV_M3: - rc = SR352_WRITE_LIST(sr352_brightness_M3); - break; - case CAMERA_EV_M2: - rc = SR352_WRITE_LIST(sr352_brightness_M2); - break; - case CAMERA_EV_M1: - rc = SR352_WRITE_LIST(sr352_brightness_M1); - break; - case CAMERA_EV_DEFAULT: - rc = SR352_WRITE_LIST(sr352_brightness_default); - break; - case CAMERA_EV_P1: - rc = SR352_WRITE_LIST(sr352_brightness_P1); - break; - case CAMERA_EV_P2: - rc = SR352_WRITE_LIST(sr352_brightness_P2); - break; - case CAMERA_EV_P3: - rc = SR352_WRITE_LIST(sr352_brightness_P3); - break; - case CAMERA_EV_P4: - rc = SR352_WRITE_LIST(sr352_brightness_P4); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_effect(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_EFFECT_OFF: - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_effect_none_01); - } - else { - rc = SR352_WRITE_LIST(sr352_effect_none); - } - break; - case CAMERA_EFFECT_MONO: - rc = SR352_WRITE_LIST(sr352_effect_gray); - break; - case CAMERA_EFFECT_NEGATIVE: - rc = SR352_WRITE_LIST(sr352_effect_negative); - break; - case CAMERA_EFFECT_SEPIA: - rc = SR352_WRITE_LIST(sr352_effect_sepia); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("Scene mode E = %d", mode); - if(cur_scene_mode_chg == 0) { - CDBG("Scene mode Not Set = %d", mode); - return rc; - } - - if(sr352_ctrl.prev_mode == CAMERA_MODE_INIT - && mode == CAMERA_SCENE_AUTO) { - CDBG("Scene mode X Not Set = %d", mode); - cur_scene_mode_chg = 0; - return rc; - } - -#if defined (AF_FLASH_SUPPORT) - cur_scene_mode = mode; -#endif - - switch (mode) { - case CAMERA_SCENE_AUTO: - rc = SR352_WRITE_LIST(sr352_Scene_Off); - break; - case CAMERA_SCENE_LANDSCAPE: - rc = SR352_WRITE_LIST(sr352_scene_Landscape); - break; - case CAMERA_SCENE_SPORT: - rc = SR352_WRITE_LIST(sr352_scene_Sports); - break; - case CAMERA_SCENE_PARTY: - rc = SR352_WRITE_LIST(sr352_scene_Party); - break; - case CAMERA_SCENE_BEACH: - rc = SR352_WRITE_LIST(sr352_scene_Beach); - break; - case CAMERA_SCENE_SUNSET: - rc = SR352_WRITE_LIST(sr352_scene_Sunset); - break; - case CAMERA_SCENE_DAWN: - rc = SR352_WRITE_LIST(sr352_scene_Dawn); - break; - case CAMERA_SCENE_FALL: - rc = SR352_WRITE_LIST(sr352_scene_Fall); - break; - case CAMERA_SCENE_CANDLE: - rc = SR352_WRITE_LIST(sr352_scene_Candle); - break; - case CAMERA_SCENE_FIRE: - rc = SR352_WRITE_LIST(sr352_scene_Firework); - break; - case CAMERA_SCENE_AGAINST_LIGHT: - rc = SR352_WRITE_LIST(sr352_scene_Backlight); - break; - case CAMERA_SCENE_NIGHT: - rc = SR352_WRITE_LIST(sr352_scene_Nightshot); - break; - - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - cur_scene_mode_chg = 0; - CDBG("Scene mode X = %d", mode); - return rc; -} - - -int32_t sr352_set_ae_awb_lock(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - - if(ANTIBANDING_60HZ) { - if(mode) { - rc = SR352_WRITE_LIST(sr352_AEAWB_Lock_60Hz); - } else { - rc = SR352_WRITE_LIST(sr352_AEAWB_Unlock_60Hz); - } - } else { - if(mode) { - rc = SR352_WRITE_LIST(sr352_AEAWB_Lock_50Hz); - } else { - rc = SR352_WRITE_LIST(sr352_AEAWB_Unlock_50Hz); - } - } - return rc; -} - -int32_t sr352_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_WHITE_BALANCE_OFF: - case CAMERA_WHITE_BALANCE_AUTO: - rc = SR352_WRITE_LIST(sr352_wb_auto); - break; - case CAMERA_WHITE_BALANCE_INCANDESCENT: - rc = SR352_WRITE_LIST(sr352_wb_incandescent); - break; - case CAMERA_WHITE_BALANCE_FLUORESCENT: - rc = SR352_WRITE_LIST(sr352_wb_fluorescent); - break; - case CAMERA_WHITE_BALANCE_DAYLIGHT: - rc = SR352_WRITE_LIST(sr352_wb_sunny); - break; - case CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT: - rc = SR352_WRITE_LIST(sr352_wb_cloudy); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case CAMERA_AVERAGE: - rc = SR352_WRITE_LIST(sr352_metering_matrix); - break; - case CAMERA_CENTER_WEIGHT: - rc = SR352_WRITE_LIST(sr352_metering_center); - break; - case CAMERA_SPOT: - rc = SR352_WRITE_LIST(sr352_metering_spot); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - rc = 0; - } - return rc; -} - -int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type) -{ - int32_t rc = 0; - CDBG("mode = %d", mode); - switch (mode) { - case MSM_SENSOR_RES_FULL: - if(settings_type == 1) { -#if defined (AF_FLASH_SUPPORT) - if (cur_scene_mode == CAMERA_SCENE_NIGHT) { - SR352_WRITE_LIST(sr352_Night_Capture_2048_1536_01); - } else { - SR352_WRITE_LIST(sr352_Capture_2048_1536_01); - } -#else - SR352_WRITE_LIST(sr352_Capture_2048_1536_01); -#endif - } - else { - SR352_WRITE_LIST(sr352_Capture_2048_1536); - } - break; - case MSM_SENSOR_RES_QTR: - case MSM_SENSOR_RES_7: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_1024x768_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_1024x768); - } - break; - case MSM_SENSOR_RES_2: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_1024x576_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_1024x576); - } - break; - case MSM_SENSOR_RES_3: - if(settings_type == 1) { - rc = SR352_WRITE_LIST_BURST(sr352_recording_50Hz_HD_01); - } - else { - rc = SR352_WRITE_LIST_BURST(sr352_recording_50Hz_HD); - } - if(flicker_type == MSM_CAM_FLICKER_50HZ) { - rc = SR352_WRITE_LIST(sr352_HD_50hz_setting); - } else { - rc = SR352_WRITE_LIST(sr352_HD_60hz_setting); - } -#if defined (AF_FLASH_SUPPORT) - SR352_WRITE_LIST(sr352_HD_AF_Init_Reg); -#endif - break; - case MSM_SENSOR_RES_4: - rc = SR352_WRITE_LIST(sr352_preview_800_480); - break; - case MSM_SENSOR_RES_5: - if(settings_type == 1) { - SR352_WRITE_LIST(sr352_Enterpreview_640x480_01); - } - else { - SR352_WRITE_LIST(sr352_Enterpreview_640x480); - } - break; - case MSM_SENSOR_RES_6: - rc = SR352_WRITE_LIST(sr352_preview_320_240); - break; - default: - pr_err("%s: Setting %d is invalid\n", __func__, mode); - } - return rc; -} - -void sr352_init_camera(struct msm_sensor_ctrl_t *s_ctrl, int flicker_type) -{ - int32_t rc = 0; - if(settings_type == 1) { - rc = SR352_WRITE_LIST_BURST(sr352_Init_Reg_01); - } else { - rc = SR352_WRITE_LIST_BURST(sr352_Init_Reg); - } - if(rc < 0) { - pr_err("%s:%d error writing initsettings failed\n", __func__, __LINE__); - } -#if defined (AF_FLASH_SUPPORT) - SR352_WRITE_LIST(sr352_AF_Init_Reg); -#endif - if(flicker_type == MSM_CAM_FLICKER_50HZ) { - rc = SR352_WRITE_LIST(sr352_50hz_setting); - } else { - rc = SR352_WRITE_LIST(sr352_60hz_setting); - } - if(rc <0) { - pr_err("%s:%d error writing 50hz failed\n", __func__, __LINE__); - } -} - -int32_t sr352_get_exif(struct ioctl_native_cmd * exif_info) -{ -#if defined (AF_FLASH_SUPPORT) - exif_info->value_1 = flash_status; -#else - exif_info->value_1 = 1; // equals 1 to update the exif value in the user level. -#endif - exif_info->value_2 = sr352_ctrl.exif_iso; - exif_info->value_3 = sr352_ctrl.exif_shutterspeed; - return 0; -} - -int32_t sr352_set_exif(struct msm_sensor_ctrl_t *s_ctrl ) -{ - int32_t rc = 0; - uint16_t read_value0 = 0; - uint16_t read_value1 = 0; - uint16_t read_value2 = 0; - uint16_t read_value3 = 0; - uint16_t read_value4 = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa0, - &read_value0, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa1, - &read_value1, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa2, - &read_value2, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0xa3, - &read_value3, - MSM_CAMERA_I2C_BYTE_DATA); - - sr352_ctrl.exif_shutterspeed = 27323100 / ((read_value0 << 24) - + (read_value1 << 16) + (read_value2 << 8) + read_value3); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, - 0x03, - 0x20, - MSM_CAMERA_I2C_BYTE_DATA); - - s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_read( - s_ctrl->sensor_i2c_client, 0x50, - &read_value4, - MSM_CAMERA_I2C_BYTE_DATA); - - if (read_value4 < 0x26) - sr352_ctrl.exif_iso= 50; - else if (read_value4 < 0x5C) - sr352_ctrl.exif_iso = 100; - else if (read_value4 < 0x83) - sr352_ctrl.exif_iso = 200; - else - sr352_ctrl.exif_iso = 400; - - pr_debug("sr352_set_exif: ISO = %d shutter speed = %d", - sr352_ctrl.exif_iso,sr352_ctrl.exif_shutterspeed); - return rc; -} - -int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - struct sensorb_cfg_data *cdata = (struct sensorb_cfg_data *)argp; - int32_t rc = 0; - int32_t i = 0; - mutex_lock(s_ctrl->msm_sensor_mutex); - - switch (cdata->cfgtype) { - case CFG_GET_SENSOR_INFO: - CDBG(" CFG_GET_SENSOR_INFO"); - memcpy(cdata->cfg.sensor_info.sensor_name, - s_ctrl->sensordata->sensor_name, - sizeof(cdata->cfg.sensor_info.sensor_name)); - - cdata->cfg.sensor_info.session_id = - s_ctrl->sensordata->sensor_info->session_id; - - for (i = 0; i < SUB_MODULE_MAX; i++) - cdata->cfg.sensor_info.subdev_id[i] = - s_ctrl->sensordata->sensor_info->subdev_id[i]; - - CDBG("sensor name %s", cdata->cfg.sensor_info.sensor_name); - CDBG("session id %d", cdata->cfg.sensor_info.session_id); - - for (i = 0; i < SUB_MODULE_MAX; i++) - CDBG("subdev_id[%d] %d", i, - cdata->cfg.sensor_info.subdev_id[i]); - - break; - case CFG_SET_INIT_SETTING: - CDBG("CFG_SET_INIT_SETTING"); -#ifdef CONFIG_LOAD_FILE /* this call should be always called first */ - sr352_regs_table_init("/data/"REG_SET_FILE); - pr_err("/data/"REG_SET_FILE" inside CFG_SET_INIT_SETTING"); -#endif - sr352_init_camera(s_ctrl, cdata->flicker_type); - -#if !defined (AF_FLASH_SUPPORT) - //Stop stream and start in START_STREAM - CDBG("Stop stream after Init"); - SR352_WRITE_LIST(sr352_stop_stream); -#endif - break; - case CFG_SET_RESOLUTION: - if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3) { - - sr352_init_camera(s_ctrl, cdata->flicker_type); - //Stop stream and start in START_STREAM - SR352_WRITE_LIST(sr352_stop_stream); - CDBG("CFG CFG_SET_RESOLUTION - HD Recording mode off"); - cur_scene_mode_chg = 1; - } - else if(sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.resolution != MSM_SENSOR_RES_3) { -#if defined (AF_FLASH_SUPPORT) - sr352_recording_landing(s_ctrl); -#endif - - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_modeOff_01); - } - else { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_modeOff); - } - - rc = SR352_WRITE_LIST(sr352_stop_stream); - CDBG("CFG CFG_SET_RESOLUTION - Non - HD Recording mode off"); - } - sr352_ctrl.settings.prev_resolution = sr352_ctrl.settings.resolution; - sr352_ctrl.settings.resolution = *((int32_t *)cdata->cfg.setting); - CDBG("CFG_SET_RESOLUTION res = %d" , sr352_ctrl.settings.resolution); - if (sr352_ctrl.streamon == 0) { - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_PREVIEW: - { - sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); -#if !defined(AF_FLASH_SUPPORT) - if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING && - sr352_ctrl.settings.prev_resolution == MSM_SENSOR_RES_3) { - - sr352_set_ae_awb_lock(s_ctrl, 0); - msleep(100); - } - - if (sr352_ctrl.prev_mode == CAMERA_MODE_INIT) { - msleep(100); - } -#endif - } - break; - case CAMERA_MODE_CAPTURE: - { -#if defined (AF_FLASH_SUPPORT) - if (!is_af_run) - sr352_ae_stable_without_af(s_ctrl); - if (need_main_flash) { - SR352_WRITE_LIST(sr352_stop_stream); - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable4_1); - sr352_set_ev_data_mainFlash_func3(s_ctrl); - set_led_flash(MSM_CAMERA_LED_HIGH); - SR352_WRITE_LIST(sr352_StartMainFlash_FlashRegTable5); - flash_status = MSM_CAMERA_LED_HIGH; - } -#endif - sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); - } - break; - case CAMERA_MODE_RECORDING: - { -#if defined (AF_FLASH_SUPPORT) - if(sr352_ctrl.prev_mode != CAMERA_MODE_RECORDING || - sr352_ctrl.settings.resolution != MSM_SENSOR_RES_3) { - sr352_recording_landing(s_ctrl); - } -#endif - if ( sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3 ) { - CDBG("CFG writing *** sr352_recording_50Hz_HD"); - sr352_set_resolution( s_ctrl , sr352_ctrl.settings.resolution, cdata->flicker_type); - } else { - CDBG("CFG writing *** sr352_recording_50Hz_30fps"); - sr352_set_resolution( s_ctrl , MSM_SENSOR_RES_5, cdata->flicker_type); - if(settings_type == 1) { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_30fps_01); - } - else { - rc = SR352_WRITE_LIST(sr352_recording_50Hz_30fps); - } - //msleep(100); - } - } - break; - } - } - break; - case CFG_SET_STOP_STREAM: - if(sr352_ctrl.streamon == 1) { - CDBG(" CFG_SET_STOP_STREAM writing stop stream registers: sr352_stop_stream"); - sr352_ctrl.streamon = 0; - } -#if defined (AF_FLASH_SUPPORT) - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_CAPTURE: - if (need_main_flash) { - if (flash_status == MSM_CAMERA_LED_HIGH) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6); - sr352_return_ev_data_func4(s_ctrl); - SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7); - need_main_flash = 0; - } - } - is_af_run = 0; - break; - case CAMERA_MODE_RECORDING: - if (flash_status == MSM_CAMERA_LED_LOW) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - } - break; - } -#endif - break; - case CFG_SET_START_STREAM: - { - CDBG(" CFG_SET_START_STREAM writing start stream registers: sr352_start_stream start"); - switch(sr352_ctrl.op_mode) { - case CAMERA_MODE_PREVIEW: - { - CDBG(" CFG_SET_START_STREAM: Preview"); - if(sr352_ctrl.prev_mode != CAMERA_MODE_CAPTURE) { - sr352_set_scene_mode(s_ctrl, sr352_ctrl.settings.scenemode); - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - sr352_set_effect(s_ctrl , sr352_ctrl.settings.effect); - sr352_set_white_balance(s_ctrl , sr352_ctrl.settings.wb); - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering ); -#if defined (AF_FLASH_SUPPORT) - sr352_set_af_mode(s_ctrl, focus_mode); -#endif - } - } - break; - case CAMERA_MODE_CAPTURE: - { - CDBG("CFG_SET_START_STREAM: Capture"); - sr352_set_exif(s_ctrl); - } - break; - case CAMERA_MODE_RECORDING: - { - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - sr352_set_effect(s_ctrl , sr352_ctrl.settings.effect); - sr352_set_white_balance(s_ctrl , sr352_ctrl.settings.wb); - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering ); -#if defined (AF_FLASH_SUPPORT) - sr352_set_af_mode(s_ctrl, focus_mode); -#endif - } - break; - } - sr352_ctrl.streamon = 1; - } - break; - case CFG_SET_SLAVE_INFO: - { - struct msm_camera_sensor_slave_info sensor_slave_info; - struct msm_camera_power_ctrl_t *p_ctrl; - uint16_t size; - int slave_index = 0; - CDBG("CFG_SET_SLAVE_INFO"); - if (copy_from_user(&sensor_slave_info, - (void *)cdata->cfg.setting, - sizeof(sensor_slave_info))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - /* Update sensor slave address */ - if (sensor_slave_info.slave_addr) { - s_ctrl->sensor_i2c_client->cci_client->sid = - sensor_slave_info.slave_addr >> 1; - } - - /* Update sensor address type */ - s_ctrl->sensor_i2c_client->addr_type = - sensor_slave_info.addr_type; - - /* Update power up / down sequence */ - p_ctrl = &s_ctrl->sensordata->power_info; - size = sensor_slave_info.power_setting_array.size; - if (p_ctrl->power_setting_size < size) { - struct msm_sensor_power_setting *tmp; - tmp = kmalloc(sizeof(*tmp) * size, GFP_KERNEL); - if (!tmp) { - pr_err("%s: failed to alloc mem\n", __func__); - rc = -ENOMEM; - break; - } - kfree(p_ctrl->power_setting); - p_ctrl->power_setting = tmp; - } - p_ctrl->power_setting_size = size; - rc = copy_from_user(p_ctrl->power_setting, (void *) - sensor_slave_info.power_setting_array.power_setting, - size * sizeof(struct msm_sensor_power_setting)); - if (rc) { - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(sensor_slave_info.power_setting_array. - power_setting); - rc = -EFAULT; - break; - } - CDBG("slave_addr = 0x%x, addr_type = %d, sensor_id_reg_addr = 0x%x, sensor_id %x", \ - sensor_slave_info.slave_addr, sensor_slave_info.addr_type, \ - sensor_slave_info.sensor_id_info.sensor_id_reg_addr, sensor_slave_info.sensor_id_info.sensor_id); - for (slave_index = 0; slave_index < - p_ctrl->power_setting_size; slave_index++) { - CDBG("i %d power setting %d %d %ld %d", slave_index, - p_ctrl->power_setting[slave_index].seq_type, - p_ctrl->power_setting[slave_index].seq_val, - p_ctrl->power_setting[slave_index].config_val, - p_ctrl->power_setting[slave_index].delay); - } - CDBG("CFG_SET_SLAVE_INFO EXIT"); - break; - } - case CFG_WRITE_I2C_ARRAY: - { - struct msm_camera_i2c_reg_setting conf_array; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG(" CFG_WRITE_I2C_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write_table( - s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - case CFG_WRITE_I2C_SEQ_ARRAY: - { - struct msm_camera_i2c_seq_reg_setting conf_array; - struct msm_camera_i2c_seq_reg_array *reg_setting = NULL; - - CDBG("CFG_WRITE_I2C_SEQ_ARRAY"); - - if (copy_from_user(&conf_array, - (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_seq_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = kzalloc(conf_array.size * - (sizeof(struct msm_camera_i2c_seq_reg_array)), - GFP_KERNEL); - if (!reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(reg_setting, (void *)conf_array.reg_setting, - conf_array.size * - sizeof(struct msm_camera_i2c_seq_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(reg_setting); - rc = -EFAULT; - break; - } - - conf_array.reg_setting = reg_setting; - rc = s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write_seq_table(s_ctrl->sensor_i2c_client, &conf_array); - kfree(reg_setting); - } - break; - case CFG_POWER_UP: - { - CDBG(" CFG_POWER_UP"); - sr352_ctrl.streamon = 0; - sr352_ctrl.op_mode = CAMERA_MODE_INIT; - sr352_ctrl.prev_mode = CAMERA_MODE_INIT; - sr352_ctrl.settings.prev_resolution = MSM_SENSOR_RES_FULL; - sr352_ctrl.settings.resolution = MSM_SENSOR_RES_FULL; -#if defined (AF_FLASH_SUPPORT) - flash_mode = 0; - flash_status = 0; - is_preflash = 0; - is_touchaf = 0; - focus_mode = 0; - need_main_flash = 0; - is_af_run = 0; - cur_scene_mode = 0; -#endif - sr352_check_hw_revision(); - if (s_ctrl->func_tbl->sensor_power_up) { - CDBG("CFG_POWER_UP"); - rc = s_ctrl->func_tbl->sensor_power_up(s_ctrl); - } else - rc = -EFAULT; - } - break; - case CFG_POWER_DOWN: - { - CDBG("CFG_POWER_DOWN"); - if (s_ctrl->func_tbl->sensor_power_down) { - CDBG("CFG_POWER_DOWN"); -#if defined (AF_FLASH_SUPPORT) - if (flash_status) - set_led_flash(MSM_CAMERA_LED_OFF); - sr352_actuator_softlanding(s_ctrl); -#endif - rc = s_ctrl->func_tbl->sensor_power_down(s_ctrl); - } else - rc = -EFAULT; -#ifdef CONFIG_LOAD_FILE - sr352_regs_table_exit(); -#endif - } - break; - case CFG_SET_STOP_STREAM_SETTING: - { - struct msm_camera_i2c_reg_setting *stop_setting = - &s_ctrl->stop_setting; - struct msm_camera_i2c_reg_array *reg_setting = NULL; - - CDBG("CFG_SET_STOP_STREAM_SETTING"); - if (copy_from_user(stop_setting, (void *)cdata->cfg.setting, - sizeof(struct msm_camera_i2c_reg_setting))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -EFAULT; - break; - } - - reg_setting = stop_setting->reg_setting; - stop_setting->reg_setting = kzalloc(stop_setting->size * - (sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL); - if (!stop_setting->reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - rc = -ENOMEM; - break; - } - if (copy_from_user(stop_setting->reg_setting, - (void *)reg_setting, stop_setting->size * - sizeof(struct msm_camera_i2c_reg_array))) { - - pr_err("%s:%d failed\n", __func__, __LINE__); - kfree(stop_setting->reg_setting); - stop_setting->reg_setting = NULL; - stop_setting->size = 0; - rc = -EFAULT; - break; - } - } - break; - default: - rc = -EFAULT; - break; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - - -#if defined (AF_FLASH_SUPPORT) -void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - is_preflash = sr352_is_required_flash(s_ctrl, flash_mode); - if (is_preflash) { - memset(&Flash, 0, sizeof(Flash)); - SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1); - sr352_get_ev_data_flash_Off_func1(s_ctrl); - SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2); - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - need_main_flash = 1; - msleep(600); /* AE become stable here */ - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3); - sr352_get_ev_data_preflash_func2(s_ctrl); - SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4); - msleep(50); - set_led_flash(MSM_CAMERA_LED_OFF); - msleep(300); - } -} - -void sr352_start_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - focus_reg &= 0xF7; - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_READ_ADDR(0x11, &focus_reg); - focus_reg |= 0x01; - SR352_WRITE_ADDR(0x11, focus_reg); - CDBG("SR352 %s focus_reg[0x%2x]\n", __func__, focus_reg); - -} - -void sr352_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - uint16_t focus_reg = 0; - uint16_t manual_af = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - SR352_READ_ADDR(0x14, &manual_af); - - switch(mode) - { - case CAMERA_AF_OCR: - case CAMERA_AF_MACRO: - focus_reg |= 0x40; /* set Macro Scan Mode */ - - SR352_READ_ADDR(0x11, &focus_reg); - - manual_af |= 0x10; /* set Macro Lens Position start */ - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_WRITE_ADDR(0x14, manual_af); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7C, 0x02); - SR352_WRITE_ADDR(0x7D, 0xB0); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &manual_af); - manual_af &= 0xEF; - SR352_WRITE_ADDR(0x14, manual_af); /* set Macro Lens Position End */ - break; - case CAMERA_AF_AUTO: - default: - focus_reg &= 0xBF; /* set Normal Scan Mode */ - - SR352_READ_ADDR(0x11, &focus_reg); - - manual_af |= 0x10; /* set Normal Lens Position start */ - SR352_WRITE_ADDR(0x11, focus_reg); - SR352_WRITE_ADDR(0x14, manual_af); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7C, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &manual_af); - manual_af &= 0xEF; - SR352_WRITE_ADDR(0x14, manual_af); /* set Normal Lens Position End */ - break; - } - - CDBG("SR352 %s focus_reg[0x%2x]\n", __func__, focus_reg); -} - -void sr352_set_touch_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - - switch(mode) - { - case 0: - /* Center focus */ - focus_reg &= ~(0x02); /* clear 1st bit */ - break; - case 1: - /* Touch Focus */ - focus_reg |= 0x02; /* set 1st bit */ - break; - default: - /* Center focus */ - focus_reg &= ~(0x02); /* clear 1st bit */ - break; - } - - CDBG("DAFF %s focus_reg[0x%2x]\n", __func__, focus_reg); - SR352_WRITE_ADDR(0x11, focus_reg); -} - -void sr352_set_touchaf_pos(struct msm_sensor_ctrl_t *s_ctrl, int x, int y) -{ - uint16_t touch_x = x - XAXIS_START; - uint16_t touch_y = y - YAXIS_START; - uint16_t lcd_x = LCD_X; - uint16_t lcd_y = LCD_Y; - - if (x - XAXIS_START < 0 || y - YAXIS_START < 0) { - pr_err("%s Error position x_axis[%d] y_axis[%d]\n", - __func__, x - XAXIS_START, y - YAXIS_START); - return; - } - if(sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3) - { - uint32_t posX, posY; - - posX = ((x * 100) * 92)/10000; - posY = y; - if(posX < 200) - posX = 200; - else if(posX > 1112) - posX = 1112; - if(posY < 200) - posY = 200; - else if(posY > 538) - posY = 538; - - SR352_WRITE_ADDR(0x03, 0xD0); - - SR352_WRITE_ADDR(0xFA, (posY >> 8)); - SR352_WRITE_ADDR(0xFB, (posY & 0xFF)); - SR352_WRITE_ADDR(0xFC, (posX >> 8)); - SR352_WRITE_ADDR(0xFD, (posX & 0xFF)); - } - else - { - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_WRITE_ADDR(0x15, 0xCA); - SR352_WRITE_ADDR(0x03, 0xD1); - - SR352_WRITE_ADDR(0x10, (lcd_y >> 8)); - SR352_WRITE_ADDR(0x11, (lcd_y & 0xFF)); - SR352_WRITE_ADDR(0x12, (lcd_x >> 8)); - SR352_WRITE_ADDR(0x13, (lcd_x & 0xFF)); - - SR352_WRITE_ADDR(0x03, 0xD0); - - SR352_WRITE_ADDR(0xFA, (touch_y >> 8)); - SR352_WRITE_ADDR(0xFB, (touch_y & 0xFF)); - SR352_WRITE_ADDR(0xFC, (touch_x >> 8)); - SR352_WRITE_ADDR(0xFD, (touch_x & 0xFF)); - } - return; -} - - -int sr352_is_required_flash(struct msm_sensor_ctrl_t *s_ctrl, int flash_mode) -{ - int rc = 0; - uint16_t bpga = 0, bpgath = 0, flashctl = 0; - - if (sr352_ctrl.op_mode == CAMERA_MODE_RECORDING) - return 0; - - switch(flash_mode) { - //case CAMERA_FLASH_TORCH: - case CAMERA_FLASH_ON: - rc = 1; - break; - case CAMERA_FLASH_AUTO: - SR352_WRITE_ADDR(0x03, ((FLASH_PGARO>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_PGARO & 0xFF), &bpga); - - SR352_WRITE_ADDR(0x03, ((FLASH_PGATH>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_PGATH & 0xFF), &bpgath); - - if (bpga >= bpgath) - rc = 1; - else - rc = 0; - break; - default: - rc = 0; - } - - SR352_WRITE_ADDR(0x03, ((FLASH_CTL1>>8) & 0xFF)); - SR352_READ_ADDR((FLASH_CTL1 & 0xFF), &flashctl); - if (flashctl & 0x80) - rc = 0; - - CDBG("FLASHDBG mode[%2x] bpga[%2x] bpgath[%2x] flashctl[%2x] isFlash[%2x]\n", - flash_mode, bpga, bpgath, flashctl, rc); - - return rc; -} - -void sr352_get_sensor_ev_data(struct msm_sensor_ctrl_t *s_ctrl, uint16_t PreFlashEnable) -{ - - //PreFlashEnable = 0: Pre flash off timing - //PreFlashEnable = 1: Pre flash on timing - - uint16_t temp; - uint16_t wRgain, wGgain, wBgain; - uint16_t Pga, Dg, Yavg, Ytgt, Step; - uint16_t wTmp1, wTmp2, wTmp3, wTmp4, wTmp5, wTmp6; - uint32_t dwTmp1, dwTmp2, dwTmp3, dwTmp4, dwExptime, dwEv; - - SR352_WRITE_ADDR(0x03, 0x20); - SR352_READ_ADDR(0xA4, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA5, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA6, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA7, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xAB, &Pga); - SR352_READ_ADDR(0xAE, &Dg); - - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0x7B, &Yavg);//Y Mean - SR352_READ_ADDR(0x7C, &Ytgt);//Y Target - SR352_READ_ADDR(0x99, &Step);//BandStep - - dwExptime = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //Org Exptime - dwEv = (uint32_t)((dwExptime * (((uint32_t)Pga*100)/32)*1)/100); - CDBG_FL("%d FLDBG func0 dwEv[%u]\n", __LINE__, dwEv); - - SR352_WRITE_ADDR(0x03, 0x16); - SR352_READ_ADDR(0xC0, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC1, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC2, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC3, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC4, &temp); - wTmp5 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0xC5, &temp); - wTmp6 = (uint16_t)temp; - temp=0; - wRgain = (wTmp1<<8) + wTmp2; - wBgain = (wTmp3<<8) + wTmp4; - wGgain = (wTmp5<<8) + wTmp6; - - if(PreFlashEnable) { - Flash.dwPreFlashEv = dwEv; //Org Ev - Flash.dwPreExptime = dwExptime; //Org Exptime - Flash.bPrePga = Pga; - Flash.bPreDg = Dg; - Flash.bPreFlashY = Yavg; //Y Mean - Flash.bPreFlashTgt = Ytgt; //Y Target - Flash.wPreFlashRgain= wRgain; - Flash.wPreFlashGgain= wGgain; - Flash.wPreFlashBgain= wBgain; - } else { - Flash.dwOrgEv = dwEv; //Org Ev - Flash.dwOrgExptime = dwExptime; //Org Exptime - Flash.bOrgPga = Pga; - Flash.bOrgDg = Dg; - Flash.bOrgY = Yavg; //Y Mean - Flash.bOrgTgt = Ytgt; //Y Target - Flash.wOrgRgain = wRgain; - Flash.wOrgGgain = wGgain; - Flash.wOrgBgain = wBgain; - } -} - -void sr352_get_ev_data_flash_Off_func1(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t temp; - uint16_t wTmp1, wTmp2, wTmp3, wTmp4, wTmp5, wTmp6; - uint32_t dwTmp1, dwTmp2, dwTmp3, dwTmp4; - - SR352_WRITE_ADDR(0x03, ((FLASH_PRE_FLASHRATE>>8)&0xFF)); - SR352_READ_ADDR(FLASH_PRE_FLASHRATE &0xFF, &(Flash.bPFlashRate ));//PreFlash:20% - SR352_READ_ADDR(FLASH_MAIN_FLASHRATE&0xFF, &(Flash.bMFlashRate));//MainFlash:80% - - /////////////////////////////////////////////////////////////////////////////////////// - //For AE - /////////////////////////////////////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x20); - SR352_READ_ADDR(0x51, &(Flash.bAgMax)); - SR352_READ_ADDR(0x52, &(Flash.bAgMin)); - SR352_READ_ADDR(0x71, &(Flash.bDgMax)); - SR352_READ_ADDR(0x72, &(Flash.bDgMin)); - SR352_READ_ADDR(0x24, &temp); - dwTmp1 = temp; - temp = 0; - - SR352_READ_ADDR(0x25, &temp); - dwTmp2 = temp; - temp = 0; - - SR352_READ_ADDR(0x26, &temp); - dwTmp3 = temp; - temp = 0; - - SR352_READ_ADDR(0x27, &temp); - dwTmp4 = temp; - temp = 0; - - Flash.dwExpMax = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; - - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0x38, &(Flash.bDgRatio)); - SR352_READ_ADDR(0x72, &(Flash.bDgCtl)); - SR352_READ_ADDR(0x73, &(Flash.bAntiFlag)); - SR352_READ_ADDR(0x76, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x77, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x78, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x79, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0x39, &temp); - wTmp1 = temp; - temp = 0; - SR352_READ_ADDR(0x3A, &temp); - wTmp2 = temp; - temp = 0; - Flash.dwExpBand = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //ExpBand - Flash.wOneLine = (wTmp1<<8) + wTmp2; //OneLine - - if (Flash.bDgRatio == 0) { - pr_err("%s:%d ERROR: bDgRatio is Zero Here\n", __func__, __LINE__); - return; - } - - Flash.fAgMin = ((uint32_t)Flash.bAgMin * 100)/32; - Flash.fDgMin = ((uint32_t)Flash.bDgMin * 100)/Flash.bDgRatio; - Flash.fAgMax = ((uint32_t)Flash.bAgMax * 100)/32; - Flash.fDgMax = ((uint32_t)Flash.bDgMax * 100)/Flash.bDgRatio; - - Flash.dwExpMin = (uint32_t)Flash.wOneLine*4; - Flash.dwEvMin = (uint32_t)((Flash.dwExpMin * (Flash.fAgMin * 1)/100)); - - //Get Ev data before Pre Flash time - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_READ_ADDR(0xA7, &temp); - dwTmp1 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA8, &temp); - dwTmp2 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xA9, &temp); - dwTmp3 = (uint32_t)temp; - temp=0; - SR352_READ_ADDR(0xAA, &temp); - dwTmp4 = (uint32_t)temp; - temp=0; - Flash.dwOrgEvRO = (dwTmp1<<24) + (dwTmp2<<16) + (dwTmp3<<8) + dwTmp4; //Sensor EV - /////////////////////////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////////////////////////// - //For AWB - /////////////////////////////////////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_READ_ADDR(0x66, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x67, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x68, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x69, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x6E, &temp); - dwTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x6F, &temp); - dwTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x70, &temp); - dwTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x71, &temp); - dwTmp4 = (uint16_t)temp; - temp=0; - Flash.wRgainMin = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wRgainMax = (uint16_t)((wTmp3 <<8) + wTmp4); - Flash.wBgainMin = (uint16_t)((dwTmp1<<8) + dwTmp2); - Flash.wBgainMax = (uint16_t)((dwTmp3<<8) + dwTmp4); - - SR352_WRITE_ADDR(0x03, ((FLASH_AWB_YDIFF>>8)&0xFF)); - SR352_READ_ADDR(FLASH_AWB_YDIFF&0xFF, &(Flash.bYdiffTh ));//YDiffTh - SR352_READ_ADDR((FLASH_AWB_TGTRGAIN&0xFF) , &temp ); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTRGAIN&0xFF)+1, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTGGAIN&0xFF) , &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTGGAIN&0xFF)+1, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTBGAIN&0xFF) , &temp); - wTmp5 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR((FLASH_AWB_TGTBGAIN&0xFF)+1, &temp); - wTmp6 = (uint16_t)temp; - temp=0; - Flash.wTgtRgain = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wTgtGgain = (uint16_t)((wTmp3 <<8) + wTmp4); - Flash.wTgtBgain = (uint16_t)((wTmp5 <<8) + wTmp6); - - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_READ_ADDR(0x5C, &temp); - wTmp1 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5D, &temp); - wTmp2 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5E, &temp); - wTmp3 = (uint16_t)temp; - temp=0; - SR352_READ_ADDR(0x5F, &temp); - wTmp4 = (uint16_t)temp; - temp=0; - Flash.wOrgRgTgt = (uint16_t)((wTmp1 <<8) + wTmp2); - Flash.wOrgBgTgt = (uint16_t)((wTmp3 <<8) + wTmp4); - ///////////////////////////////////////////////////////////////////////////////////////// - //For test code - //Flash.bYdiffTh = 10; - //Flash.wTgtRgain = 0x5C0; - //Flash.wTgtGgain = 0x400; - //Flash.wTgtBgain = 0x680; - - sr352_get_sensor_ev_data(s_ctrl,0); - CDBG_FL("FLDBG1[func:%s] dwOrgEv[0x%x] dwOrgExptime[0x%x] bOrgPga[0x%x] bOrgDg[0x%x] bOrgY[0x%x] bOrgTgt[0x%x] dwOrgEvRO[0x%x]\n", - __func__, Flash.dwOrgEv, Flash.dwOrgExptime, Flash.bOrgPga, Flash.bOrgDg, Flash.bOrgY, Flash.bOrgTgt, Flash.dwOrgEvRO); -} - -void sr352_get_ev_data_preflash_func2(struct msm_sensor_ctrl_t *s_ctrl) -{ - SR352_WRITE_ADDR(0x03,((FLASH_CTL1>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CTL1&0xFF, &(Flash.bFlashCtl1)); - - //--------------------------------------------// - //Get Ev data after end of Pre Flash time - sr352_get_sensor_ev_data(s_ctrl, 1); - //--------------------------------------------// - //Checking Ev data variation - if ((Flash.dwOrgEv >= Flash.dwPreFlashEv) && !(Flash.bFlashCtl1 & 0x80)) { - - if (!Flash.bOrgY || !Flash.dwPreFlashEv || !Flash.bPFlashRate) { - pr_err("%s:%d ERROR: bOrgY[%d] dwPreFlashEv[%d] bPFlashRate[%d] Divide By ZERO\n", - __func__, __LINE__, Flash.bOrgY, Flash.dwPreFlashEv, Flash.bPFlashRate); - return; - } - Flash.fPreFlash_Ymean = (uint32_t)(((uint32_t)((Flash.dwOrgEv*100) / Flash.dwPreFlashEv) *\ - ((uint32_t)((uint32_t)Flash.bPreFlashY*1000) / (uint32_t)Flash.bOrgY) * Flash.bOrgY)/10000); - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_Ymen[%u] = ([%u]/[%u])*([%u]/[%u])*[%u]\n", __LINE__, - Flash.fPreFlash_Ymean, Flash.dwOrgEv, Flash.dwPreFlashEv, Flash.bPreFlashY, Flash.bOrgY, Flash.bOrgY); - - Flash.fPreFlash_Yinc = (uint32_t)((Flash.fPreFlash_Ymean * 100)/ Flash.bOrgY); - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_Yinc[%u] = [%u]/[%u]\n", __LINE__, - Flash.fPreFlash_Yinc, Flash.fPreFlash_Ymean, Flash.bOrgY); - Flash.fMainFlash_Rate = (((uint32_t)Flash.bMFlashRate * 1000)/(uint32_t)Flash.bPFlashRate)/1000; - if (Flash.fPreFlash_Ymean >= ((uint32_t)Flash.bOrgY*10)) { - Flash.fPreFlash_YDiff = (Flash.fPreFlash_Ymean - ((uint32_t)Flash.bOrgY*10)); - Flash.fMainFlash_Ymean = ((Flash.fPreFlash_YDiff * Flash.fMainFlash_Rate) + Flash.fPreFlash_Ymean)/10; - } else { - Flash.fPreFlash_YDiff = (((uint32_t)Flash.bOrgY*10) - Flash.fPreFlash_Ymean); - Flash.fMainFlash_Ymean = (Flash.fPreFlash_Ymean - (Flash.fPreFlash_YDiff * Flash.fMainFlash_Rate))/10; - } - - CDBG_FL("%d func2 FLDBG2 Flash.fPreFlash_YDiff[%u] = [%u] - [%u]\n", __LINE__, - Flash.fPreFlash_YDiff, Flash.fPreFlash_Ymean, Flash.bOrgY); - - if (Flash.bFlashCtl1 & 0x10) { - CDBG_FL("%d func2 FLDBG2 NEVER HERE\n", __LINE__); - - SR352_WRITE_ADDR(0x03,((FLASH_CALCRATIOTH>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CALCRATIOTH&0xFF, &(Flash.bFlashCalcRatioTh)); - SR352_READ_ADDR(FLASH_CALCRATIOMAX&0xFF, &(Flash.bFlashCalcRatioMax)); - - if (!Flash.bFlashCalcRatioTh) { - pr_err("%s:%d ERROR bFlashCalcRatioTh[%d] Divide By Zero!\n", - __func__, __LINE__, Flash.bFlashCalcRatioTh); - return; - } - - if( Flash.fPreFlash_Yinc < 1000) { - //Flash.fFlashCalcRatio = ((((Flash.fPreFlash_Yinc-1)*100) / Flash.bFlashCalcRatioTh)/1000); - - Flash.fFlashCalcRatio = ((((1000-Flash.fPreFlash_Yinc)*100) / Flash.bFlashCalcRatioTh)/1000); - } else { - Flash.fFlashCalcRatio = (((((int)Flash.fPreFlash_Yinc-1000)*100) / Flash.bFlashCalcRatioTh)/1000); - } - - if(Flash.bFlashCalcRatioMax < Flash.fFlashCalcRatio) - Flash.fFlashCalcRatio = Flash.bFlashCalcRatioMax; - - if( Flash.fPreFlash_Yinc < 1000) { - //Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * (((100-Flash.fFlashCalcRatio) * 1000)/100))/1000; - Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * ((100000+Flash.fFlashCalcRatio)/100000)); - } else { - Flash.fMainFlash_Ymean = (Flash.fMainFlash_Ymean * ((100000-Flash.fFlashCalcRatio)/100000)); - } - } - - CDBG_FL("%d func2 FLDBG2 Flash.bPreFlashTgt[%u] >= Flash.fMainFlash_Ymean[%u]\n", __LINE__, - Flash.bPreFlashTgt, Flash.fMainFlash_Ymean); - if (Flash.bPreFlashTgt >= Flash.fMainFlash_Ymean) { - Flash.fYcalRate = 100; - CDBG_FL("%d func2 FLDBG2 Flash.fYcalRate[%u]\n", __LINE__, 1); - } else { - if (!Flash.bPreFlashTgt) { - pr_err("%s:%d ERROR: bPreFlashTgt[%d] Divide By Zero\n", - __func__, __LINE__, Flash.bPreFlashTgt); - return; - } - Flash.fYcalRate = ((Flash.fMainFlash_Ymean * 100)/ Flash.bPreFlashTgt); - CDBG_FL("%d func2 FLDBG2 Flash.fYcalRate[%u] = [%u]/[%u]\n", __LINE__, - Flash.fYcalRate, Flash.fMainFlash_Ymean, Flash.bPreFlashTgt); - } - - if (!Flash.fYcalRate) { - pr_err("%s:%d ERROR: fYcalRate[%d] Divide By Zero\n", - __func__, __LINE__, Flash.fYcalRate); - return; - } - - Flash.dwMainFlashEv = ((Flash.dwOrgEv*100) / Flash.fYcalRate); - CDBG_FL("%d func2 FLDBG2 Flash.dwMainFlashEv[%u] = [%u]/[%u]\n", __LINE__, - Flash.dwMainFlashEv, Flash.dwOrgEv, Flash.fYcalRate); - - CDBG_FL("%d func2 FLDBG2 dwMainFlashEv[%u] < dwEvMin[%u]\n", __LINE__, - Flash.dwMainFlashEv, Flash.dwEvMin); - if (Flash.dwMainFlashEv < Flash.dwEvMin) { - Flash.dwMainFlashEv = Flash.dwEvMin; - } - - CDBG_FL("%d func2 FLDBG2 case1[0x%0x], case2[0x%0x]\n", __LINE__, - ((uint32_t)(Flash.dwMainFlashEv/(Flash.wOneLine * Flash.fAgMin * Flash.fDgMin))) * Flash.wOneLine, - ((uint32_t)(Flash.dwMainFlashEv/(Flash.dwExpBand * Flash.fAgMin * Flash.fDgMin))) * Flash.dwExpBand); - - //Checking whether Indoor or outdoor condition. --> //Exptime step calc - if (((Flash.bAntiFlag & ~0x02)&&(Flash.dwMainFlashEv < (Flash.dwExpBand)))\ - || ((Flash.bAntiFlag & 0x02)&&(Flash.dwMainFlashEv < (Flash.dwExpBand*2)))) { - - //Outdoor condition - if (!Flash.wOneLine || !Flash.fAgMin) { - pr_err("%s:%d ERROR: wOneLine[%d], fAgMin[%d] Divide By Zero\n", - __func__, __LINE__, Flash.wOneLine, Flash.fAgMin); - return; - } - - Flash.dwMainFlashBandStep = (uint32_t)(((Flash.dwMainFlashEv*10)/((Flash.wOneLine * Flash.fAgMin * 1)/100))/10); - Flash.dwMainFlashExp = Flash.dwMainFlashBandStep * Flash.wOneLine; - CDBG_FL("%d func2 FLDBG2 Outdoor [%u]\n", __LINE__, Flash.dwMainFlashExp); - } else { - - //Indoor condition - if (!Flash.dwExpBand|| !Flash.fAgMin) { - pr_err("%s:%d ERROR: dwExpBand[%d], fAgMin[%d] Divide By Zero\n", - __func__, __LINE__, Flash.dwExpBand, Flash.fAgMin); - return; - } - Flash.dwMainFlashBandStep = (uint32_t)(((Flash.dwMainFlashEv*10)/(Flash.dwExpBand * (Flash.fAgMin * 1/100)))/10); - Flash.dwMainFlashExp = (Flash.dwMainFlashBandStep * Flash.dwExpBand); - CDBG_FL("%d func2 FLDBG2 Indoor[%u]\n", __LINE__, Flash.dwMainFlashExp); - } - - //Check EV limit - if(Flash.dwMainFlashExp < Flash.dwExpMin) { Flash.dwMainFlashExp = Flash.dwExpMin; } - else if(Flash.dwMainFlashExp > Flash.dwExpMax) { Flash.dwMainFlashExp = Flash.dwExpMax; } - - //Calc PGA - if (!Flash.dwMainFlashExp) { - pr_err("%s:%d ERROR: dwMainFlashExp[%d] Divide By Zero\n", - __func__, __LINE__, Flash.dwMainFlashExp); - return; - } - Flash.fMainFlashAg = ((Flash.dwMainFlashEv*10)/(Flash.dwMainFlashExp *1))*100/10; - if(Flash.fMainFlashAg < Flash.fAgMin){ Flash.fMainFlashAg = Flash.fAgMin; } - else if(Flash.fMainFlashAg > Flash.fAgMax){ Flash.fMainFlashAg = Flash.fAgMax; } - - Flash.bMainFlashAg = (uint8_t)((Flash.fMainFlashAg * 32)/100); - - //Calc DG - if(Flash.bDgCtl & 0x01) { - //DGain On - Flash.fMainFlashDg = ((Flash.dwMainFlashEv*10) / (Flash.dwMainFlashExp * Flash.fMainFlashAg/100))/10*100; - if(Flash.fMainFlashDg < Flash.fDgMin){ Flash.fMainFlashDg = Flash.fDgMin; } - else if(Flash.fMainFlashDg > Flash.fDgMax){ Flash.fMainFlashDg = Flash.fDgMax; } - Flash.bMainFlashDg = (uint8_t)((Flash.fMainFlashDg * Flash.bDgRatio)/100); - } else { - Flash.bMainFlashDg = Flash.bDgRatio; - } - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // AWB cal - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(Flash.fPreFlash_Yinc < 1000) { - Flash.fPreFlash_Yinc = 1000; - } - - Flash.fYdiffRatio = ((((int)Flash.fPreFlash_Yinc-1000)/((uint32_t)Flash.bYdiffTh))*100)/1000; - - if(Flash.fYdiffRatio > 100){ Flash.fYdiffRatio = 100; } - else if(Flash.fYdiffRatio < 0){ Flash.fYdiffRatio = 0; } - - Flash.wMainFlashRgain = (uint16_t)(((((((int)Flash.wTgtRgain-Flash.wPreFlashRgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashRgain )); - Flash.wMainFlashGgain = (uint16_t)(((((((int)Flash.wTgtGgain-Flash.wPreFlashGgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashGgain )); - Flash.wMainFlashBgain = (uint16_t)(((((((int)Flash.wTgtBgain-Flash.wPreFlashBgain)*10)/100) *\ - (int)Flash.fYdiffRatio )/10 + Flash.wPreFlashBgain )); - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - Flash.bState = 0x01; - } else { - Flash.bState = 0x00; - } - - CDBG_FL("FLDBG1[func:%s] dwPreFlashEv[0x%x] dwPreExptime[0x%x] bPrePga[0x%x] bPreDg[0x%x] bPreFlashY[0x%x] bPreFlashTgt[0x%x]" - " dwMainFlashEv[0x%x] dwMainFlashExp[0x%x] bMainFlashAg[0x%x] bMainFlashDg[0x%x]\n", - __func__, Flash.dwPreFlashEv, Flash.dwPreExptime, Flash.bPrePga, Flash.bPreDg, Flash.bPreFlashY, Flash.bPreFlashTgt, - Flash.dwMainFlashEv, Flash.dwMainFlashExp, Flash.bMainFlashAg, Flash.bMainFlashDg); -} - -void sr352_set_ev_data_mainFlash_func3(struct msm_sensor_ctrl_t *s_ctrl) -{ - //WriteEvDataForMainFlash - if(Flash.bState) { - - SR352_WRITE_ADDR(0x03,((FLASH_CTL1>>8)&0xFF)); - SR352_READ_ADDR(FLASH_CTL1&0xFF, &(Flash.bFlashCtl1)); - - if(!(Flash.bFlashCtl1 & 0x40)) { - - ////////////////////////////////////////////////////// - //AE Register Update[ ExpTime, Gain ] - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0x44, (Flash.dwMainFlashExp>>24)&0xFF);//ExpTime - SR352_WRITE_ADDR(0x45, (Flash.dwMainFlashExp>>16)&0xFF); - SR352_WRITE_ADDR(0x46, (Flash.dwMainFlashExp>> 8)&0xFF); - SR352_WRITE_ADDR(0x47, (Flash.dwMainFlashExp )&0xFF); - SR352_WRITE_ADDR(0x40, Flash.bMainFlashAg);//Gain - SR352_WRITE_ADDR(0x41, Flash.bMainFlashDg); - //Update New ExpTime & Gain - SR352_WRITE_ADDR(0x03, 0x20); - SR352_WRITE_ADDR(0x20, (Flash.dwMainFlashExp>>24)&0xFF); - SR352_WRITE_ADDR(0x21, (Flash.dwMainFlashExp>>16)&0xFF); - SR352_WRITE_ADDR(0x22, (Flash.dwMainFlashExp>> 8)&0xFF); - SR352_WRITE_ADDR(0x23, (Flash.dwMainFlashExp )&0xFF); - SR352_WRITE_ADDR(0x50, Flash.bMainFlashAg); - SR352_WRITE_ADDR(0x70, Flash.bMainFlashDg); - //Update flag - SR352_WRITE_ADDR(0x03, 0xc7); - SR352_WRITE_ADDR(0x76, 0x00); - SR352_WRITE_ADDR(0x77, 0x00); - SR352_WRITE_ADDR(0x78, 0x00); - SR352_WRITE_ADDR(0x79, 0x00); - } - - if(!(Flash.bFlashCtl1 & 0x20)) { - ////////////////////////////////////////////////////// - //AWB Register Update - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x16); - SR352_WRITE_ADDR(0xA2, (Flash.wMainFlashRgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA3, (Flash.wMainFlashRgain )&0xFF); - SR352_WRITE_ADDR(0xA4, (Flash.wMainFlashBgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA5, (Flash.wMainFlashBgain )&0xFF); - SR352_WRITE_ADDR(0xA6, (Flash.wMainFlashGgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA7, (Flash.wMainFlashGgain )&0xFF); - } - - if(Flash.bFlashCtl1 & 0x08) { - - SR352_WRITE_ADDR(0x03, 0x00); - SR352_WRITE_ADDR(0x60, (Flash.bFlashCtl1&0x07)); - } - } -} - -void sr352_return_ev_data_func4(struct msm_sensor_ctrl_t *s_ctrl) -{ - - uint16_t i, bTmp1, bTmp2; - - if(Flash.bState) { - ////////////////////////////////////////////////////// - //AE Register Update[ ExpTime, Gain ] - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x20); - SR352_WRITE_ADDR(0x20, (Flash.dwOrgExptime>>24)&0xFF); //HW ExpTime - SR352_WRITE_ADDR(0x21, (Flash.dwOrgExptime>>16)&0xFF); - SR352_WRITE_ADDR(0x22, (Flash.dwOrgExptime>> 8)&0xFF); - SR352_WRITE_ADDR(0x23, (Flash.dwOrgExptime )&0xFF); - SR352_WRITE_ADDR(0x50, Flash.bOrgPga); //HW pga - SR352_WRITE_ADDR(0x70, Flash.bOrgDg); - //Update EV - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0xA7, (Flash.dwOrgEvRO>>24)&0xFF); //EV - SR352_WRITE_ADDR(0xA8, (Flash.dwOrgEvRO>>16)&0xFF); - SR352_WRITE_ADDR(0xA9, (Flash.dwOrgEvRO>> 8)&0xFF); - SR352_WRITE_ADDR(0xAA, (Flash.dwOrgEvRO )&0xFF); - //Update Exp - SR352_WRITE_ADDR(0x03, 0xC7); - SR352_WRITE_ADDR(0x44, (Flash.dwOrgExptime>>24)&0xFF); //SW ExpTime - SR352_WRITE_ADDR(0x45, (Flash.dwOrgExptime>>16)&0xFF); - SR352_WRITE_ADDR(0x46, (Flash.dwOrgExptime>> 8)&0xFF); - SR352_WRITE_ADDR(0x47, (Flash.dwOrgExptime )&0xFF); - SR352_WRITE_ADDR(0x40, Flash.bOrgPga); //SW pga - SR352_WRITE_ADDR(0x41, Flash.bOrgDg); - SR352_WRITE_ADDR(0x7b, Flash.bOrgY); - ////////////////////////////////////////////////////// - //AWB Register Update - ////////////////////////////////////////////////////// - SR352_WRITE_ADDR(0x03, 0x16); - SR352_WRITE_ADDR(0xA2, (Flash.wOrgRgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA3, (Flash.wOrgRgain )&0xFF); - SR352_WRITE_ADDR(0xA4, (Flash.wOrgBgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA5, (Flash.wOrgBgain )&0xFF); - SR352_WRITE_ADDR(0xA6, (Flash.wOrgGgain>>8)&0xFF); - SR352_WRITE_ADDR(0xA7, (Flash.wOrgGgain )&0xFF); - //AWB state reset - SR352_WRITE_ADDR(0x03, 0xCA); - SR352_WRITE_ADDR(0xA1, 0x00); - SR352_WRITE_ADDR(0xA3, 0x00); - SR352_WRITE_ADDR(0x03, 0xCC); - SR352_WRITE_ADDR(0x74, 0x00); - //AWB Tgt initial - SR352_WRITE_ADDR(0x03, 0x26); - SR352_READ_ADDR(0xAA, &bTmp1); - SR352_READ_ADDR(0xAB, &bTmp2); - SR352_WRITE_ADDR(0xAA, 0x0B); - SR352_WRITE_ADDR(0xAB, 0xE7); -#if 0 - Flash.wOrgRgTgt = 0x800; - Flash.wOrgBgTgt = 0x800; -#endif - SR352_WRITE_ADDR(0x03, 0xCD); - for(i=0; i<15; i++) { - SR352_WRITE_ADDR((0x10+(i*2) ), ((Flash.wOrgRgTgt>>8)&0xFF)); - SR352_WRITE_ADDR((0x10+(i*2)+1), ((Flash.wOrgRgTgt )&0xFF)); - SR352_WRITE_ADDR(((0x2E)+(i*2) ), ((Flash.wOrgBgTgt>>8)&0xFF)); - SR352_WRITE_ADDR(((0x2E)+(i*2)+1), ((Flash.wOrgBgTgt )&0xFF)); - } - - SR352_WRITE_ADDR(0x03, 0x26); - SR352_WRITE_ADDR(0xAA, bTmp1); - SR352_WRITE_ADDR(0xAB, bTmp2); - - Flash.bState = 0x00; - } -} - -void sr352_recording_landing(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t Recording_Pos = 0; - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &Recording_Pos); - Recording_Pos |= 0x10; - SR352_WRITE_ADDR(0x14, Recording_Pos); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7c, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, & Recording_Pos); - Recording_Pos &= ~(0x10); -} -void sr352_actuator_softlanding(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t landing_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &landing_reg); - landing_reg |= 0x10; - SR352_WRITE_ADDR(0x14, landing_reg); - SR352_WRITE_ADDR(0x03, 0xD0); - SR352_WRITE_ADDR(0x7c, 0x00); - msleep(130); - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x14, &landing_reg); - landing_reg &= ~(0x10); - SR352_WRITE_ADDR(0x14, landing_reg); -} - -void sr352_cancel_af(struct msm_sensor_ctrl_t *s_ctrl) -{ - uint16_t focus_reg = 0; - - SR352_WRITE_ADDR(0x03, 0xCF); - SR352_READ_ADDR(0x11, &focus_reg); - - focus_reg |= 0x08; /* set 3rd bit */ - - CDBG("DAFF %s focus_reg[0x%2x]\n", __func__, focus_reg); - SR352_WRITE_ADDR(0x11, focus_reg); -} - -int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos) -{ - int rc = -EINVAL; - - switch(status) { - case SENSOR_AF_START: - CDBG("SENSOR_AF_START\n"); - is_af_run = 1; - is_preflash = sr352_is_required_flash(s_ctrl, flash_mode); - - if (is_preflash) { - memset(&Flash, 0, sizeof(Flash)); - SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1); - sr352_get_ev_data_flash_Off_func1(s_ctrl); - SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2); - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - rc = SENSOR_AF_PRE_FLASH_ON; - need_main_flash = 1; - } else { - sr352_start_af(s_ctrl); - need_main_flash = 0; - rc = SENSOR_AF_START; - } - break; - case SENSOR_AF_PRE_FLASH_OFF: - CDBG("SENSOR_AF_PRE_FLASH_OFF\n"); - if (is_preflash) { - SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3); - sr352_get_ev_data_preflash_func2(s_ctrl); - SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4); - if (!is_touchaf) - msleep(100); - - set_led_flash(MSM_CAMERA_LED_OFF); - if (is_touchaf) { - is_touchaf = 0; - } - flash_status = MSM_CAMERA_LED_OFF; - is_preflash = 0; - } - rc = SENSOR_AF_PRE_FLASH_OFF; - break; - case SENSOR_AF_PRE_FLASH_AE_STABLE: - CDBG("SENSOR_AF_PRE_FLASH_AE_STABLE\n"); - if (is_preflash) { - - sr352_start_af(s_ctrl); - } - rc = SENSOR_AF_START; - break; - case SENSOR_AF_CANCEL: - CDBG("SENSOR_AF_CANCEL\n"); - sr352_cancel_af(s_ctrl); - is_af_run = 0; - break; - default: - pr_err("%s:%d Invalid argument\n", __func__, __LINE__); - } - - return rc; -} -int32_t sr352_get_af_status(struct msm_sensor_ctrl_t *s_ctrl, int is_search_status) -{ - unsigned short af_status = 0; - CDBG("is_search_status %d\n", is_search_status); - switch (is_search_status) { - case 0: - SR352_WRITE_ADDR(0x03, 0xD2); - SR352_READ_ADDR(0x11, &af_status); - CDBG("1st AF status before : %x\n", af_status); - if (af_status & 0x04) - af_status = 2; // AF completed. - else - af_status = 1; //still 1st search running. - CDBG("1st AF status after: %x\n", af_status); - break; - case 1: - SR352_WRITE_ADDR(0x03, 0xD2); - SR352_READ_ADDR(0x11, &af_status); - if (af_status & 0x02) - af_status = 0; //success - else if (af_status & 0x01) - af_status = 1; //failure - else - af_status = -1; // AF status unknown. - CDBG("2nd AF status : %d\n", af_status); - break; - default: - pr_err("%s:%d unexpected mode is coming from HAL\n", __func__, __LINE__); - } - CDBG("return_af_status = %d\n", af_status); - return af_status; -} -#endif - -int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl, - void __user *argp) -{ - int32_t rc = 0; - struct ioctl_native_cmd *cam_info = (struct ioctl_native_cmd *)argp; - - mutex_lock(s_ctrl->msm_sensor_mutex); - - /*CDBG("cam_info values = %d : %d : %d : %d : %d\n", cam_info->mode, cam_info->address, cam_info->value_1, cam_info->value_2 , cam_info->value_3);*/ - switch (cam_info->mode) { - case EXT_CAM_EV: - sr352_ctrl.settings.exposure = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_exposure_compensation(s_ctrl, sr352_ctrl.settings.exposure); - break; - case EXT_CAM_WB: - sr352_ctrl.settings.wb = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_white_balance(s_ctrl, sr352_ctrl.settings.wb); - break; - case EXT_CAM_METERING: - sr352_ctrl.settings.metering = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_metering(s_ctrl, sr352_ctrl.settings.metering); - break; - case EXT_CAM_EFFECT: - sr352_ctrl.settings.effect = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_effect(s_ctrl, sr352_ctrl.settings.effect); - break; - case EXT_CAM_SCENE_MODE: - sr352_ctrl.settings.scenemode = (cam_info->value_1); - cur_scene_mode_chg = 1; - if(sr352_ctrl.streamon == 1) - sr352_set_scene_mode(s_ctrl, sr352_ctrl.settings.scenemode); - break; - case EXT_CAM_SENSOR_MODE: - sr352_ctrl.prev_mode = sr352_ctrl.op_mode; - sr352_ctrl.op_mode = (cam_info->value_1); - pr_info("EXT_CAM_SENSOR_MODE = %d", sr352_ctrl.op_mode); - break; - case EXT_CAM_EXIF: - sr352_get_exif(cam_info); - if (!copy_to_user((void *)argp, - (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_AE_AWB: - CDBG("EXT_CAM_SET_AE_AWB lock[%d]\n", cam_info->value_1); - sr352_ctrl.settings.aeawblock = cam_info->value_1; -#if defined (AF_FLASH_SUPPORT) - if(!flash_mode){ - CDBG("EXT_CAM_SET_AE_AWB, !flash_mode"); - sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock); - } -#else - sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock); -#endif - break; -#if defined (AF_FLASH_SUPPORT) - case EXT_CAM_FOCUS: - CDBG("DAFF EXT_CAM_FOCUS focus mode[%d]\n", cam_info->value_1); - focus_mode = (cam_info->value_1); - if(sr352_ctrl.streamon == 1) - sr352_set_af_mode(s_ctrl, focus_mode); - break; - case EXT_CAM_SET_AF_STATUS: - CDBG("DAFF EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2); - - cam_info->value_1 = sr352_set_af_status(s_ctrl, cam_info->value_1, - cam_info->value_2); - - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_SET_TOUCHAF_POS: - CDBG("DAFF EXT_CAM_SET_TOUCHAF_POS: %d : %d", cam_info->value_1, cam_info->value_2); - - if(cam_info->value_1 !=0 && cam_info->value_2 != 0) { - sr352_set_touchaf_pos(s_ctrl, cam_info->value_1, cam_info->value_2); - is_touchaf = 1; - } else { - is_touchaf = 0; - } - - sr352_set_touch_mode(s_ctrl, is_touchaf); - - break; - case EXT_CAM_GET_AF_STATUS: - CDBG("DAFF EXT_CAM_GET_AF_STATUS: %d\n", cam_info->value_1); - - cam_info->value_1 = sr352_get_af_status(s_ctrl, cam_info->value_1); - if (!copy_to_user((void *)argp, (const void *)&cam_info, - sizeof(cam_info))) - pr_err("copy failed"); - - break; - case EXT_CAM_FLASH_MODE: - CDBG("DAFF EXT_CAM_FLASH_MODE = %d\n", (cam_info->value_1)); - flash_mode = cam_info->value_1; - if((flash_mode) == CAMERA_FLASH_TORCH) { - set_led_flash(MSM_CAMERA_LED_LOW); - flash_status = MSM_CAMERA_LED_LOW; - } else { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - } - break; - case EXT_CAM_SET_FLASH: - CDBG("DAFF EXT_CAM_SET_FLASH = %d\n", (cam_info->value_1)); - if (flash_mode != CAMERA_FLASH_TORCH) { - if (need_main_flash) { - if (flash_status == MSM_CAMERA_LED_HIGH) { - set_led_flash(MSM_CAMERA_LED_OFF); - flash_status = MSM_CAMERA_LED_OFF; - SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6); - sr352_return_ev_data_func4(s_ctrl); - SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7); - need_main_flash = 0; - } else { - flash_status = cam_info->value_1; - set_led_flash(flash_status); - } - } - } - break; -#endif - default: - rc = 0; - } - - mutex_unlock(s_ctrl->msm_sensor_mutex); - - return rc; -} - -void sr352_set_default_settings(void) -{ - sr352_ctrl.settings.metering = CAMERA_CENTER_WEIGHT; - sr352_ctrl.settings.exposure = CAMERA_EV_DEFAULT; - sr352_ctrl.settings.wb = CAMERA_WHITE_BALANCE_AUTO; - sr352_ctrl.settings.iso = CAMERA_ISO_MODE_AUTO; - sr352_ctrl.settings.effect = CAMERA_EFFECT_OFF; - sr352_ctrl.settings.scenemode = CAMERA_SCENE_AUTO; - sr352_ctrl.settings.aeawblock = 0; -} - -#ifndef NO_BURST -int32_t sr352_sensor_burst_write(struct msm_sensor_ctrl_t *s_ctrl, struct msm_camera_i2c_reg_conf *reg_settings , int size) -{ - int i; - int err; - int idx = 0; - int seq_idx = 0; - int burst_flag = 0; - int seq_flag = 0; - unsigned char subaddr; - unsigned char value; - static uint8_t burst_data[BURST_MODE_BUFFER_MAX_SIZE] = {0}; - - struct msm_camera_i2c_burst_reg_array burst_reg_setting = { 0 ,}; - struct msm_camera_i2c_reg_setting conf_array = { - .reg_setting = (void * ) &burst_reg_setting, - .size = 1, - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .data_type = MSM_CAMERA_I2C_BURST_DATA, - }; - - struct msm_camera_i2c_seq_reg_array *seq_reg_setting = NULL; - struct msm_camera_i2c_seq_reg_setting seq_conf_array = { - .reg_setting = NULL, - .size = 0, - .addr_type = MSM_CAMERA_I2C_BYTE_ADDR, - .delay = 0, - }; -#if 0 - seq_reg_setting = kzalloc((size/I2C_SEQ_REG_DATA_MAX + 1) *\ - (sizeof(struct msm_camera_i2c_seq_reg_array)), GFP_KERNEL); // allocate maximum possible -#endif - - seq_reg_setting = kzalloc(4 * (sizeof(struct msm_camera_i2c_seq_reg_array)), GFP_KERNEL); // enough to fit sr352 seq. data - if (!seq_reg_setting) { - pr_err("%s:%d failed\n", __func__, __LINE__); - err = -ENOMEM; - goto on_error; - } - seq_conf_array.reg_setting = seq_reg_setting; - - for (i = 0; i < size; i++) { - - subaddr = reg_settings[i].reg_addr; - value = reg_settings[i].reg_data; - - if (burst_flag == 0 && seq_flag == 0) { - if (subaddr == BURST_REG && value != 0x00) { - - - idx = 0; - seq_idx = 0; - if (reg_settings[i+1].reg_addr == reg_settings[i+2].reg_addr) { - burst_flag = 1; - } else { - seq_flag = 1; - } - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - } else if (burst_flag == 1) { - - if (subaddr == BURST_REG && value == 0x00) { - - burst_flag = 0; - burst_reg_setting.reg_burst_data = burst_data; - burst_reg_setting.reg_data_size = idx; - idx = 0; - - err = s_ctrl->sensor_i2c_client-> \ - i2c_func_tbl->i2c_write_burst_table( \ - s_ctrl->sensor_i2c_client, &conf_array); - if (err < 0) { - pr_err("[%s:%d]Burst write fail!\n", \ - __func__, __LINE__); - goto on_error; - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - - - - } else { - if (idx == 0) - burst_reg_setting.reg_addr = subaddr; - - burst_data[idx] = value; - idx++; - } - - } else if (seq_flag == 1) { - if (subaddr == BURST_REG && value == 0x00) { - seq_flag = 0; - idx = 0; - seq_conf_array.size = seq_idx; - seq_idx = 0; - - s_ctrl->sensor_i2c_client->i2c_func_tbl->\ - i2c_write_seq_table(s_ctrl->sensor_i2c_client, &seq_conf_array); - if (err < 0) { - pr_err("[%s:%d]Sequential write fail!\n", __func__, __LINE__); - goto on_error; - } - - err = s_ctrl->sensor_i2c_client->i2c_func_tbl->i2c_write( - s_ctrl->sensor_i2c_client, subaddr, value, MSM_CAMERA_I2C_BYTE_DATA); - - - } else { - if (idx % I2C_SEQ_REG_DATA_MAX == 0) { - seq_reg_setting[seq_idx].reg_addr = subaddr; - seq_reg_setting[seq_idx].reg_data_size = 0; - seq_idx ++; - if (seq_idx >=4) { - pr_err("[%s:%d]error: More memory needed!!\n", __func__, __LINE__); - goto on_error; - } - } - - seq_reg_setting[seq_idx - 1].\ - reg_data[seq_reg_setting[seq_idx - 1].reg_data_size++] = value; - - idx++; - } - } - } // End of for loop - -on_error: - if (seq_reg_setting) - kfree(seq_reg_setting); - - return 0; -} -#endif - -#ifdef CONFIG_LOAD_FILE -int sr352_regs_from_sd_tunning(struct msm_camera_i2c_reg_conf *settings, struct msm_sensor_ctrl_t *s_ctrl,char * name) { - char *start, *end, *reg; - int addr,rc = 0; - unsigned int value; - char reg_buf[5], data_buf1[5]; - - *(reg_buf + 4) = '\0'; - *(data_buf1 + 4) = '\0'; - - if (settings != NULL) { - pr_err("sr352_regs_from_sd_tunning start address %x start data %x\n", - settings->reg_addr,settings->reg_data); - } - - if (sr352_regs_table == NULL) { - pr_err("sr352_regs_table is null\n"); - return -1; - } - pr_err("@@@ %s\n",name); - start = strstr(sr352_regs_table, name); - if (start == NULL){ - return -1; - } - end = strstr(start, "};"); - while (1) { - /* Find Address */ - reg = strstr(start, "{0x"); - if ((reg == NULL) || (reg > end)) - break; - /* Write Value to Address */ - if (reg != NULL) { - memcpy(reg_buf, (reg + 1), 4); - memcpy(data_buf1, (reg + 7), 4); - - if(kstrtoint(reg_buf, 16, &addr)) - pr_err("kstrtoint error .Please Align contents of the Header file!!\n") ; - - if(kstrtoint(data_buf1, 16, &value)) - pr_err("kstrtoint error .Please Align contents of the Header file!!\n"); - - if (reg) - start = (reg + 14); - - if (addr == 0xff){ - pr_err("delay = %dms STARTn", (int)value*10); - msleep(value * 10); - pr_err("delay END\n"); - - } - else { - rc=s_ctrl->sensor_i2c_client->i2c_func_tbl-> - i2c_write(s_ctrl->sensor_i2c_client, addr, - value,MSM_CAMERA_I2C_BYTE_DATA); - } - } - } - pr_err("sr352_regs_from_sd_tunning end!\n"); - return rc; -} - -void sr352_regs_table_exit(void) -{ - pr_info("%s:%d\n", __func__, __LINE__); - if (sr352_regs_table) { - vfree(sr352_regs_table); - sr352_regs_table = NULL; - } - -} - - -void sr352_regs_table_init(char *filename) -{ - struct file *filp; - char *dp; - long lsize; - loff_t pos; - int ret; - - /*Get the current address space */ - mm_segment_t fs = get_fs(); - pr_err("%s %d", __func__, __LINE__); - /*Set the current segment to kernel data segment */ - set_fs(get_ds()); - - filp = filp_open(filename, O_RDONLY, 0); - - if (IS_ERR_OR_NULL(filp)) { - pr_err("file open error %ld",(long) filp); - return; - } - lsize = filp->f_path.dentry->d_inode->i_size; - pr_err("size : %ld", lsize); - dp = vmalloc(lsize); - if (dp == NULL) { - pr_err("Out of Memory"); - filp_close(filp, current->files); - } - - pos = 0; - memset(dp, 0, lsize); - ret = vfs_read(filp, (char __user *)dp, lsize, &pos); - if (ret != lsize) { - pr_err("Failed to read file ret = %d\n", ret); - vfree(dp); - filp_close(filp, current->files); - } - /*close the file*/ - filp_close(filp, current->files); - - /*restore the previous address space*/ - set_fs(fs); - - pr_err("coming to if part of string compare sr352_regs_table"); - sr352_regs_table = dp; - sr352_regs_table_size = lsize; - *((sr352_regs_table + sr352_regs_table_size) - 1) = '\0'; - - return; -} - -#endif diff --git a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv_matisse.h b/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv_matisse.h deleted file mode 100644 index 5455f524c8e1..000000000000 --- a/drivers/media/platform/msm/camera_v2_j7lte/sensor/sr352_yuv_matisse.h +++ /dev/null @@ -1,36748 +0,0 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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. - * - */ - - //Vendor File -#include "msm_sensor.h" -#include "msm_cci.h" -#include "msm_camera_io_util.h" - /* Sysctl registers */ -#define SR352_COMMAND_REGISTER 0x0080 -#define SR352_COMMAND_REGISTER_APPLY_PATCH (1 << 0) -#define SR352_COMMAND_REGISTER_SET_STATE (1 << 1) -#define SR352_COMMAND_REGISTER_REFRESH (1 << 2) -#define SR352_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) -#define SR352_COMMAND_REGISTER_OK (1 << 15) - -static struct msm_camera_i2c_reg_conf sr352_Init_Reg[] = { - -/////////////////////////////////////////////////////////////////////////////// -// Sensor Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x24,}, //mode_pll1 26mhz / (4+1) = 5.2mhz -{0x08, 0x54,}, //mode_pll2 isp clk = 109.2Mhz; -{0x09, 0x85,}, //mode_pll3 // MIPI 4x div 1/2 // isp clk div = 1/4 //Preview -{0x07, 0xA4,}, -{0x07, 0xA4,}, -{0x07, 0xA4,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, // mode_pll4 for mipi mode -{0x0A, 0xe0,}, // mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, // SSD sram clock inv on -{0x33, 0x45,}, // bit[6]:C-NR DC - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 108mhz -{0x40, 0x3B,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x3B,}, // otp cfg 3 -{0x43, 0x3B,}, // otp cfg 4 -{0x44, 0x3B,}, // otp cfg 5 -{0x45, 0x2B,}, // otp cfg 6 -{0x46, 0x71,}, // otp cfg 7 -{0x47, 0x0B,}, // otp cfg 8 -{0x48, 0x03,}, // otp cfg 9 -{0x49, 0x6A,}, // otp cfg 10 -{0x4A, 0x3B,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, // delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// TAP for capture function -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, - -{0x16, 0x00,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) -{0x18, 0x01,}, // use tap memory - -{0x40, 0x02,}, // set auto increment mode -{0x44, 0x00,}, // select rom -{0x45, 0x00,}, // set high address -{0x46, 0x00,}, // set low address - -// tap code download - start -// (caution : data length must be even) -{0x42, 0x90,}, -{0x42, 0x81,}, -{0x42, 0xf0,}, -{0x42, 0xe0,}, -{0x42, 0x54,}, -{0x42, 0x07,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x40,}, -{0x42, 0x1e,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xb4,}, -{0x42, 0x01,}, -{0x42, 0x07,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x10,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0x13,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x0c,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xe4,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x21,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x55,}, -{0x42, 0x90,}, -{0x42, 0x90,}, -{0x42, 0xb4,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe5,}, -{0x42, 0x4e,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x4a,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x88,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8b,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8e,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8f,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x04,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x66,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x67,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x68,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x69,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6b,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x0a,}, -// tap code download - end - -{0x44, 0x01,}, // select ram - -{0x16, 0xf8,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x41,}, //binning + prev1 -{0x11, 0x83,}, //Fixed mode off //XY Flip -{0x12, 0x00,}, -{0x13, 0x28,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1d, 0x05,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set -{0x24, 0x06,}, // height = 1536 -{0x25, 0x00,}, -{0x26, 0x08,}, // width = 2048 -{0x27, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x08,}, // 1Line = 2200 : 054(HBLANK) + 2146(Active Pixel) -{0x4d, 0x98,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, //Vsync H -{0x53, 0x14,}, //Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x00,}, // bayer y start -{0x81, 0x00,}, -{0x82, 0x06,}, // bayer height -{0x83, 0x24,}, -{0x84, 0x00,}, //pixel_col_start -{0x85, 0x00,}, -{0x86, 0x08,}, //pixel_width -{0x87, 0x24,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ?? for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, // 20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, -{0xa0, 0x02,}, -{0xa1, 0xa8,}, -{0xa2, 0x04,}, -{0xa3, 0x79,}, -{0xa4, 0x04,}, -{0xa5, 0xdc,}, -{0xa6, 0x08,}, -{0xa7, 0x66,}, -{0xa8, 0x02,}, -{0xa9, 0x7b,}, -{0xaa, 0x03,}, -{0xab, 0x4f,}, -{0xac, 0x03,}, -{0xad, 0xa0,}, -{0xae, 0x05,}, -{0xaf, 0x43,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1c, 0x02,}, -{0x1d, 0x88,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, -{0x42, 0x00,}, -{0x43, 0xb0,}, -{0x46, 0x01,}, -{0x47, 0x00,}, -{0x4a, 0x00,}, -{0x4b, 0xae,}, -{0x4e, 0x00,}, -{0x4f, 0xae,}, -{0x52, 0x00,}, -{0x53, 0xaa,}, -{0x56, 0x00,}, -{0x57, 0xaa,}, -{0x5A, 0x00,}, -{0x5b, 0xaa,}, -{0x6A, 0x00,}, -{0x6B, 0xf8,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x90,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x8b,}, -{0x7A, 0x06,}, -{0x7B, 0x95,}, -{0x7C, 0x06,}, -{0x7D, 0x8b,}, -{0x7E, 0x06,}, -{0x7F, 0x95,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x8b,}, -{0x86, 0x06,}, -{0x87, 0x95,}, -{0x88, 0x06,}, -{0x89, 0x8b,}, -{0x8A, 0x06,}, -{0x8B, 0x95,}, -{0x92, 0x06,}, // sx -{0x93, 0x81,}, -{0x96, 0x06,}, -{0x97, 0x81,}, -{0x98, 0x06,}, // sxb -{0x99, 0x81,}, -{0x9c, 0x06,}, -{0x9d, 0x81,}, - -{0xb6, 0x01,}, // --------------> s_hb_cnt_hold = 500 -{0xb7, 0xf4,}, -{0xc0, 0x00,}, // i_addr_mux_prev -{0xc1, 0xb4,}, -{0xc2, 0x00,}, -{0xc3, 0xf4,}, -{0xc4, 0x00,}, -{0xc5, 0xb4,}, -{0xc6, 0x00,}, -{0xc7, 0xf4,}, -{0xc8, 0x00,}, // i_addr_cut_prev -{0xc9, 0xb8,}, -{0xca, 0x00,}, -{0xcb, 0xf0,}, -{0xcc, 0x00,}, -{0xcd, 0xb8,}, -{0xce, 0x00,}, -{0xcf, 0xf0,}, -{0xd0, 0x00,}, // Rx_exp_prev -{0xd1, 0xba,}, -{0xd2, 0x00,}, -{0xd3, 0xee,}, -{0xd4, 0x00,}, -{0xd5, 0xba,}, -{0xd6, 0x00,}, -{0xd7, 0xee,}, -{0xd8, 0x00,}, // Tx_exp_prev -{0xd9, 0xbc,}, -{0xdA, 0x00,}, -{0xdB, 0xec,}, -{0xdC, 0x00,}, -{0xdD, 0xbc,}, -{0xdE, 0x00,}, -{0xdF, 0xec,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ??? MCU? reset ??. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x00,}, //gap y off, gap x off - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x10,}, //YOFS ENB -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x00,}, //16_235 range scale down off -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,},//D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0x7a,}, //pga_dark1_hi //Enter Dark1 -{0xf3, 0x72,}, //pga_dark_lo //Escape Dark1 -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0x90,},//C-mask near STD TH -{0x88, 0x70,},//C-mask middle STD TH -{0x89, 0x50,},//C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,},//Yc2d_ee_color_gain1 -{0x78, 0x20,},//Yc2d_ee_color_gain2 -{0x79, 0x20,},//Yc2d_ee_color_gain3 -{0x7a, 0x20,},//Yc2d_ee_color_gain4 -{0x7b, 0x20,},//Yc2d_ee_color_gain5 -{0x7c, 0x20,},//Yc2d_ee_color_gain6 -{0x7d, 0x20,},//Yc2d_ee_color_gain7 -{0x7e, 0x20,},//Yc2d_ee_color_gain8 - -{0xc0, 0x00,},//Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,},//Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,},//Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,},//Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,},//Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xd0, 0x01,},//Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8d, 0x20,},//RGB-Color_Gain1 -{0x8e, 0x20,},//RGB-Color_Gain2 -{0x8f, 0x20,},//RGB-Color_Gain3 -{0x90, 0x20,},//RGB-Color_Gain4 -{0x91, 0x20,},//RGB-Color_Gain5 -{0xcb, 0x34,},//20130604 Cyan th - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0x20,}, - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x08,}, -{0x38, 0x98,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x80, 0x3a,}, //Y Target -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x7C,}, //Flicker Line 100 -{0x15, 0x67,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x16, 0x50,}, //SSD B gain int gain 1.5 - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -////54.646200mhz = 0x0341D5B8 -{0x03, 0xC0,}, -{0x14, 0x03,}, -{0x15, 0x41,}, -{0x16, 0xD5,}, -{0x17, 0xB8,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9e, 0x00,},//1 Line -{0x9f, 0x00,}, -{0xa0, 0x00,}, -{0xa1, 0x00,}, -{0xa2, 0x00,}, -{0xa3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x7c, 0xe0,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x34,}, -{0x18, 0x55,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x04,}, -{0x22, 0x30,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,},//Low In Th -{0x56, 0x52,},//Low Out Th -{0x57, 0x60,},//High Out Th -{0x58, 0x70,},//High In Th - -{0x62, 0xd8,},//Out weight //ca->d8 -{0x63, 0xa6,},//Indoor weight -{0x64, 0x88,},//Dark weight -{0x65, 0xe8,},//Low weight -{0x66, 0xa6,},//High weight - -{0x31, 0x01,},//Color ratio reset -{0x30, 0x98,},//Color ratio on -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x23,}, // DYOFS_Ratio -{0x1c, 0x04,}, // DYOFS_Limit - -{0x1d, 0x00,},//EV Th OutEnd -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,},//EV Th OutStr def : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x0b,}, -{0x27, 0x71,}, -{0x28, 0xb0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x0d,}, -{0x2b, 0xbb,}, -{0x2c, 0xa0,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x12,}, -{0x2f, 0x76,}, -{0x30, 0x90,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x1e,}, -{0x33, 0x84,}, -{0x34, 0x80,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,}, // LSC_EvTh_OutEnd_4 -{0x3a, 0x00,}, // LSC_EvTh_OutEnd_3 -{0x3b, 0x13,}, // LSC_EvTh_OutEnd_2 -{0x3c, 0x88,}, // LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,}, // LSC_EvTh_OutStr_4 -{0x3e, 0x00,}, // LSC_EvTh_OutStr_3 -{0x3f, 0x30,}, // LSC_EvTh_OutStr_2 -{0x40, 0xd4,}, // LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,}, // LSC_EvTh_Dark1Str_4 -{0x42, 0x05,}, // LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,}, // LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,}, // LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,}, // LSC_EvTh_Dark1End_4 -{0x46, 0x0b,}, // LSC_EvTh_Dark1End_3 -{0x47, 0x71,}, // LSC_EvTh_Dark1End_2 -{0x48, 0xb0,}, // LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,}, // LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,}, // LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,}, // LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,}, // LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,}, // LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,}, // LSC_EvTh_Dark2End_3 -{0x4f, 0x84,}, // LSC_EvTh_Dark2End_2 -{0x50, 0x80,}, // LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},// LSC Ctmp LTEnd Out -{0x52, 0x64,},// LSC Ctmp LTStr Out -{0x53, 0x78,},// LSC Ctmp HTStr Out -{0x54, 0x86,},// LSC Ctmp HTEnd Out - -{0x55, 0x4a,},// LSC Ctmp LTEnd In h46->h4a 13.5.29 multi gain modify -{0x56, 0x56,},// LSC Ctmp LTStr In h56->h56 -{0x57, 0x6e,},// LSC Ctmp HTStr In h6e->h6e -{0x58, 0x78,},// LSC Ctmp HTEnd In h76->h78 - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,},// UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,},// UniScn_BPstdMinTh -{0x6c, 0x3a,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x34,},// Y_target_Outdoor -{0x7e, 0x34,},// Y_target_Indoor -{0x7f, 0x34,},// Y_target_Dark1 -{0x80, 0x34,},// Y_target_Dark2 -{0x81, 0x39,},// Y_target_LowTemp -{0x82, 0x2f,},// Y_target_HighTemp - -{0x83, 0x98,}, // Cb_Outdoor -{0x84, 0x95,},// Cb _Sat_Indoor -{0x85, 0xa0,},// Cb _Sat_Dark1 -{0x86, 0x8a,},// Cb _Sat_Dark2 -{0x87, 0x88,},// Cb _Sat_LowTemp -{0x88, 0x92,},// Cb _Sat_HighTemp - -{0x89, 0x88,},// Cr _Sat_Outdoor -{0x8a, 0x90,},// Cr _Sat_Indoor -{0x8b, 0xa0,},// Cr _Sat_Dark1 -{0x8c, 0x84,},// Cr _Sat_Dark2 -{0x8d, 0x75,},// Cr _Sat_LowTemp -{0x8e, 0x92,},// Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x82,}, // BLC_ofs_r_Dark1 -{0x98, 0x82,}, // BLC_ofs_b_Dark1 -{0x99, 0x82,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x82,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x82,}, // BLC_ofs_r_Dark2 -{0x9c, 0x82,}, // BLC_ofs_b_Dark2 -{0x9d, 0x82,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x82,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x50,}, //CMC_Out_00 -{0xdd, 0x1d,}, //CMC_Out_01 -{0xde, 0x0d,}, //CMC_Out_02 -{0xdf, 0x0e,}, //CMC_Out_03 -{0xe0, 0x50,}, //CMC_Out_04 -{0xe1, 0x02,}, //CMC_Out_05 -{0xe2, 0x05,}, //CMC_Out_06 -{0xe3, 0x15,}, //CMC_Out_07 -{0xe4, 0x5a,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,},//CMCSIGN_In_Mid -{0x17, 0x53,},//CMC_In_Mid_00 -{0x18, 0x16,},//CMC_In_Mid_01 -{0x19, 0x03,},//CMC_In_Mid_02 -{0x1a, 0x10,},//CMC_In_Mid_03 -{0x1b, 0x53,},//CMC_In_Mid_04 -{0x1c, 0x03,},//CMC_In_Mid_05 -{0x1d, 0x04,},//CMC_In_Mid_06 -{0x1e, 0x1d,},//CMC_In_Mid_07 -{0x1f, 0x61,},//CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,},//CMCSIGN_Dark1 -{0x40, 0x53,},//CMC_Dark1_00 -{0x41, 0x1c,},//CMC_Dark1_01 -{0x42, 0x09,},//CMC_Dark1_02 -{0x43, 0x0e,},//CMC_Dark1_03 -{0x44, 0x53,},//CMC_Dark1_04 -{0x45, 0x05,},//CMC_Dark1_05 -{0x46, 0x03,},//CMC_Dark1_06 -{0x47, 0x23,},//CMC_Dark1_07 -{0x48, 0x66,},//CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,},//CMCSIGN_Dark2 -{0x69, 0x53,},//CMC_Dark2_00 -{0x6a, 0x1c,},//CMC_Dark2_01 -{0x6b, 0x09,},//CMC_Dark2_02 -{0x6c, 0x0e,},//CMC_Dark2_03 -{0x6d, 0x53,},//CMC_Dark2_04 -{0x6e, 0x05,},//CMC_Dark2_05 -{0x6f, 0x03,},//CMC_Dark2_06 -{0x70, 0x23,},//CMC_Dark2_07 -{0x71, 0x66,},//CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x15,},// CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x18,},// CMC_Dark2_LumGain2_R -{0x7b, 0x1e,},// CMC_Dark2_LumGain3_R -{0x7c, 0x1f,},// CMC_Dark2_LumGain4_R -{0x7d, 0x20,},// CMC_Dark2_LumGain5_R -{0x7e, 0x20,},// CMC_Dark2_LumGain6_R -{0x7f, 0x20,},// CMC_Dark2_LumGain7_R -{0x80, 0x20,},// CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x15,},// CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x18,},// CMC_Dark2_LumGain2_G -{0x83, 0x1e,},// CMC_Dark2_LumGain3_G -{0x84, 0x1f,},// CMC_Dark2_LumGain4_G -{0x85, 0x20,},// CMC_Dark2_LumGain5_G -{0x86, 0x20,},// CMC_Dark2_LumGain6_G -{0x87, 0x20,},// CMC_Dark2_LumGain7_G -{0x88, 0x20,},// CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x15,},// CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x18,},// CMC_Dark2_LumGain2_B -{0x8b, 0x1e,},// CMC_Dark2_LumGain3_B -{0x8c, 0x1f,},// CMC_Dark2_LumGain4_B -{0x8d, 0x20,},// CMC_Dark2_LumGain5_B -{0x8e, 0x20,},// CMC_Dark2_LumGain6_B -{0x8f, 0x20,},// CMC_Dark2_LumGain7_B -{0x90, 0x20,},// CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, // GMA_OUT -{0xe4, 0x03,}, -{0xe5, 0x08,}, -{0xe6, 0x0f,}, -{0xe7, 0x15,}, -{0xe8, 0x20,}, -{0xe9, 0x2d,}, -{0xea, 0x3b,}, -{0xeb, 0x47,}, -{0xec, 0x53,}, -{0xed, 0x5c,}, -{0xee, 0x65,}, -{0xef, 0x6d,}, -{0xf0, 0x75,}, -{0xf1, 0x7c,}, -{0xf2, 0x82,}, -{0xf3, 0x88,}, -{0xf4, 0x8d,}, -{0xf5, 0x91,}, -{0xf6, 0x96,}, -{0xf7, 0x9a,}, -{0xf8, 0xa1,}, -{0xf9, 0xa9,}, -{0xfa, 0xb0,}, -{0xfb, 0xbe,}, -{0xfc, 0xc8,}, -{0xfd, 0xd2,}, - -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, // Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xdb,}, -{0x11, 0xe3,}, -{0x12, 0xea,}, -{0x13, 0xf0,}, -{0x14, 0xf5,}, -{0x15, 0xfb,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x03,}, -{0x19, 0x08,}, -{0x1a, 0x0f,}, -{0x1b, 0x15,}, -{0x1c, 0x20,}, -{0x1d, 0x2d,}, -{0x1e, 0x3b,}, -{0x1f, 0x47,}, -{0x20, 0x53,}, -{0x21, 0x5c,}, -{0x22, 0x65,}, -{0x23, 0x6d,}, -{0x24, 0x75,}, -{0x25, 0x7c,}, -{0x26, 0x82,}, -{0x27, 0x88,}, -{0x28, 0x8d,}, -{0x29, 0x91,}, -{0x2a, 0x96,}, -{0x2b, 0x9a,}, -{0x2c, 0xa1,}, -{0x2d, 0xa9,}, -{0x2e, 0xb0,}, -{0x2f, 0xbe,}, -{0x30, 0xc8,}, -{0x31, 0xd2,}, -{0x32, 0xdb,}, -{0x33, 0xe3,}, -{0x34, 0xea,}, -{0x35, 0xf0,}, -{0x36, 0xf5,}, -{0x37, 0xfb,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, // GMA_D1 -{0x3a, 0x06,}, -{0x3b, 0x0e,}, -{0x3c, 0x17,}, -{0x3d, 0x1f,}, -{0x3e, 0x2c,}, -{0x3f, 0x3c,}, -{0x40, 0x4c,}, -{0x41, 0x57,}, -{0x42, 0x61,}, -{0x43, 0x6b,}, -{0x44, 0x76,}, -{0x45, 0x7e,}, -{0x46, 0x85,}, -{0x47, 0x8c,}, -{0x48, 0x92,}, -{0x49, 0x98,}, -{0x4a, 0x9c,}, -{0x4b, 0xa2,}, -{0x4c, 0xa6,}, -{0x4d, 0xab,}, -{0x4e, 0xb4,}, -{0x4f, 0xbc,}, -{0x50, 0xc2,}, -{0x51, 0xcb,}, -{0x52, 0xd3,}, -{0x53, 0xdb,}, -{0x54, 0xe1,}, -{0x55, 0xe7,}, -{0x56, 0xed,}, -{0x57, 0xf3,}, -{0x58, 0xf8,}, -{0x59, 0xfc,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x08,}, -{0x5d, 0x12,}, -{0x5e, 0x1b,}, -{0x5f, 0x24,}, -{0x60, 0x32,}, -{0x61, 0x3f,}, -{0x62, 0x4c,}, -{0x63, 0x57,}, -{0x64, 0x61,}, -{0x65, 0x6c,}, -{0x66, 0x79,}, -{0x67, 0x82,}, -{0x68, 0x8c,}, -{0x69, 0x94,}, -{0x6a, 0x99,}, -{0x6b, 0x9f,}, -{0x6c, 0xa4,}, -{0x6d, 0xaa,}, -{0x6e, 0xaf,}, -{0x6f, 0xb4,}, -{0x70, 0xba,}, -{0x71, 0xc0,}, -{0x72, 0xc5,}, -{0x73, 0xcd,}, -{0x74, 0xd5,}, -{0x75, 0xdc,}, -{0x76, 0xe1,}, -{0x77, 0xe7,}, -{0x78, 0xed,}, -{0x79, 0xf3,}, -{0x7a, 0xf8,}, -{0x7b, 0xfc,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x18,}, //Outdoor_delta3 -{0x82, 0xb3,}, //Outdoor_center3 -{0x83, 0x1b,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x8c,}, //Outdoor_hue_angle2 -{0x91, 0x0e,}, //Outdoor_hue_angle3 -{0x92, 0x05,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,},// MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 Skin -{0xb7, 0x3f,},// MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,},// MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,},// MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,},// MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,},// MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,},// MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,},// MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,},// MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 bright green1 -{0xbf, 0x3f,},// MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,},// MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,},// MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 dark Green2 -{0xc7, 0x3f,},// MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,},// MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,},// MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,},// MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,},// MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,},// MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,},// MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x16,}, //Outdoor_allgain_y0 -{0xe7, 0x16,}, //Outdoor_allgain_y1 -{0xe8, 0x16,}, //Outdoor_allgain_y2 -{0xe9, 0x16,}, //Outdoor_allgain_y3 -{0xea, 0x16,}, //Outdoor_allgain_y4 -{0xeb, 0x15,}, //Outdoor_allgain_y5 -{0xec, 0x19,}, //Outdoor_allgain_y6 -{0xed, 0x19,}, //Outdoor_allgain_y7 -{0xee, 0x18,}, //Outdoor_allgain_y8 -{0xef, 0x17,}, //Outdoor_allgain_y9 -{0xf0, 0x14,}, //Outdoor_allgain_y10 -{0xf1, 0x14,}, //Outdoor_allgain_y11 - -// Indoor MCMC -{0xf2, 0x10,},//Indoor_delta1 -{0xf3, 0x1e,},//Indoor_center1 -{0xf4, 0x0b,},//Indoor_delta2 -{0xf5, 0x6f,},//Indoor_center2 -{0xf6, 0x1b,},//Indoor_delta3 light green -{0xf7, 0xc2,},//Indoor_center3 light green -{0xf8, 0x17,},//Indoor_delta4 -{0xf9, 0xfb,},//Indoor_center4 -{0xfa, 0x91,},//Indoor_delta5 -{0xfb, 0x2b,},//Indoor_center5 -{0xfc, 0x92,},//Indoor_delta6 -{0xfd, 0x4f,},//Indoor_center6 -{0x0e, 0x00,},// burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x00,}, //Indoor_hue_angle2 -{0x18, 0x1e,}, //Indoor_hue_angle3 -{0x19, 0x0a,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,},// MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,},// MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,},// MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,},// MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,},// MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,},// MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,},// MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x12,},// MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x12,},// MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,},// MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,},// MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,},//Dark1_allgain_y1 -{0xe3, 0x10,},//Dark1_allgain_y2 -{0xe4, 0x10,},//Dark1_allgain_y3 -{0xe5, 0x11,},//Dark1_allgain_y4 -{0xe6, 0x10,},//Dark1_allgain_y5 -{0xe7, 0x13,},//Dark1_allgain_y6 -{0xe8, 0x12,},//Dark1_allgain_y7 -{0xe9, 0x12,},//Dark1_allgain_y8 -{0xea, 0x12,},//Dark1_allgain_y9 -{0xeb, 0x11,},//Dark1_allgain_y10 -{0xec, 0x10,},//Dark1_allgain_y11 -{0xed, 0x0f,},//Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,},// MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,},// MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,},// MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,},// MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,},// MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,},// MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,},// MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x05,},// MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,},// MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,},// MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,},// MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,},// MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,},// MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,},// MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,},// MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,},// MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,},// MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,},// MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,},// MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,},// MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,},//Hi-Temp_allgain_y0 -{0x66, 0x0d,},//Hi-Temp_allgain_y1 -{0x67, 0x0e,},//Hi-Temp_allgain_y2 -{0x68, 0x0e,},//Hi-Temp_allgain_y3 -{0x69, 0x0f,},//Hi-Temp_allgain_y4 -{0x6a, 0x10,},//Hi-Temp_allgain_y5 -{0x6b, 0x12,},//Hi-Temp_allgain_y6 -{0x6c, 0x14,},//Hi-Temp_allgain_y7 -{0x6d, 0x13,},//Hi-Temp_allgain_y8 -{0x6e, 0x12,},//Hi-Temp_allgain_y9 -{0x6f, 0x0e,},//Hi-Temp_allgain_y10 -{0x70, 0x11,},//Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // function block on -{0x10, 0x8F,}, // Adaptive on - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x36,},//Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x38,},//Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3c,},//Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x18,},//Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x32,},//Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x31,},//Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x23,},//Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1b,},//Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,},//Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,},//Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,},//Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,},//Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x26,},//Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x25,},//Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x21,},//Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,},//Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,}, //Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,}, //Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,}, //Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,}, //Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,}, //Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,}, //Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,}, //Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,}, //Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,},//Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x33,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x38,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x33,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,}, //Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,},//Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x33,},//Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x3a,},//Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,},//Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x3a,},//Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x22,},//Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x30,},//Outdoor 1212 -{0x24, 0x33,}, -{0x25, 0x30,},//Outdoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x21,},//Outdoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Outdoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Outdoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Outdoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Outdoor 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Outdoor 1278 -{0x34, 0x79,}, -{0x35, 0x09,},//Outdoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Outdoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Outdoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x50,},//Outdoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x10,},//Outdoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Outdoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Outdoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Outdoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Outdoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Outdoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Outdoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Outdoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Outdoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Outdoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Outdoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Outdoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Outdoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Outdoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Outdoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Outdoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Outdoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Outdoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Outdoor 12ae -{0x62, 0xaf,}, -{0x63, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Outdoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Outdoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Outdoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Outdoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x91,},//Outdoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0xa4,},//Outdoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3c,},//Outdoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Outdoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Outdoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Outdoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Outdoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Outdoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Outdoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Outdoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Outdoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Outdoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Outdoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Outdoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Outdoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Outdoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Outdoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Outdoor 12de -{0x90, 0xe0,}, -{0x91, 0x49,},//Outdoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Outdoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Outdoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x20,},//Outdoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x20,},//Outdoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x20,},//Outdoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x20,},//Outdoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x20,},//Outdoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x20,},//Outdoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x20,},//Outdoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x20,},//Outdoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Outdoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1e,},//Outdoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1d,},//Outdoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x20,},//Outdoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Outdoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Outdoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Outdoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Outdoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x3f,},//Outdoor 1330 -{0xba, 0x31,}, -{0xbb, 0x3f,},//Outdoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x3f,},//Outdoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x3f,},//Outdoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x3f,},//Outdoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x33,},//Outdoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x2f,},//Outdoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x2e,},//Outdoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Outdoor 1338 -{0xca, 0x40,}, -{0xcb, 0x1e,},//Outdoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x22,},//Outdoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Outdoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Outdoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Outdoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Outdoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x36,},//Outdoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Outdoor 1347 -{0xda, 0x48,}, -{0xdb, 0x20,},//Outdoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Outdoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Outdoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Outdoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x20,},//Outdoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Outdoor 1383 -{0xe6, 0x84,}, -{0xe7, 0x08,},//Outdoor 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfd,},//Outdoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0xa7,},//Outdoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Outdoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Outdoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Outdoor 1410 -{0xfc, 0x11,}, -{0xfd, 0xd8,},//Outdoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Outdoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Outdoor 1413 -{0x14, 0x14,}, -{0x15, 0x0f,},//Outdoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Outdoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x1c,},//Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Outdoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Outdoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Outdoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Outdoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1d,},//Outdoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x2c,},//Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x2a,},//Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x28,},//Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x1e,},//Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x16,},//Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x16,},//Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x28,},//Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x26,},//Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x23,},//Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x19,},//Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x16,},//Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x15,},//Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x17,},//Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x19,},//Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x24,},//Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x24,},//Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1a,},//Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x10,},//Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x18,},//Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x18,},//Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x1a,},//Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x18,},//Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x15,},//Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x18,},//Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x22,},//Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x23,},//Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x24,},//Outdoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x24,},//Outdoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x28,},//Outdoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2f,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x27,},//Outdoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x28,},//Outdoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2d,},//Outdoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2f,},//Outdoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x34,},//Outdoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x2d,},//Outdoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x26,},//Outdoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x24,},//Outdoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Outdoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Outdoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Outdoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Outdoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Outdoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Outdoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Outdoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Outdoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Outdoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Outdoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Outdoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x3f,},//Outdoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Outdoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Outdoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Outdoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x3f,},//Outdoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x3f,},//Outdoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x3f,},//Outdoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x3c,},//Outdoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x38,},//Outdoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x35,},//Outdoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Outdoor 1A20 add -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Outdoor 1A2f add -{0xb4, 0x32,}, -{0xb5, 0x87,},//Outdoor 1A32 add -{0xb6, 0x34,}, -{0xb7, 0xd2,},//Outdoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x1c,},//Outdoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x06,},//Outdoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Outdoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Outdoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x2e,},//Outdoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Outdoor 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x01,},//Outdoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x0c,},//Outdoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x01,},//Outdoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x07,},//Outdoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x01,},//Outdoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x0c,},//Outdoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x01,},//Outdoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x07,},//Outdoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2b,},//Outdoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x0b,},//Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0c,},//Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x0c,},//Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x11,},//Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x17,},//Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x17,},//Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x17,},//Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x17,},//Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x16,},//Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x13,},//Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x11,},//Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x0f,},//Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x0f,},//Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x10,},//Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x17,},//Outdoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xd0, 0x27,}, -{0xd1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x19,},//Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x17,},//Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x16,},//Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x16,},//Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x10,},//Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x16,},//Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x15,},//Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x13,},//Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x29,},//Outdoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x29,},//Outdoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x29,},//Outdoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x28,},//Outdoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x28,},//Outdoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x3f,},//Outdoor 1Aa7 add -{0x4c, 0xa8,}, -{0x4d, 0x3f,},//Outdoor 1Aa8 add -{0x4e, 0xa9,}, -{0x4f, 0x3f,},//Outdoor 1Aa9 add -{0x50, 0xaa,}, -{0x51, 0x3f,},//Outdoor 1Aaa add -{0x52, 0xab,}, -{0x53, 0x3f,},//Outdoor 1Aab add -{0x54, 0xaf,}, -{0x55, 0x3f,},//Outdoor 1Aaf add -{0x56, 0xb0,}, -{0x57, 0x3f,},//Outdoor 1Ab0 add -{0x58, 0xb1,}, -{0x59, 0x3f,},//Outdoor 1Ab1 add -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Outdoor 1Ab2 add -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Outdoor 1Ab3 add -{0x5e, 0xca,}, -{0x5f, 0x00,},//Outdoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Outdoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Outdoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0f,},//Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x00,},//Outdoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x00,},//Outdoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x00,},//Outdoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Outdoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Outdoor 1075 -{0x72, 0x76,}, -{0x73, 0x40,},//Outdoor 1076 -{0x74, 0x77,}, -{0x75, 0x40,},//Outdoor 1077 -{0x76, 0x78,}, -{0x77, 0x00,},//Outdoor 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Outdoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Outdoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Outdoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Outdoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Outdoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Outdoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Outdoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x30,},//Outdoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Outdoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Outdoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Outdoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Outdoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x02,},//Outdoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x00,},//Outdoor 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x07,}, //Indoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 //Pre flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 //Pre flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Indoor 113c //Pre flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x56,},//Indoor 113d //Pre flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,},//Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,},//Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Indoor 1140 //Pre flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x1c,},//Indoor 1141 //Pre flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,},//Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,},//Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x10,},//Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,},//Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x15,},//Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x13,},//Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x10,},//Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x10,},//Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x12,},//Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,},//Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,},//Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x17,},//Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x16,},//Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x13,},//Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x13,},//Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x15,},//Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,},//Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,},//Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,},//Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x14,},//Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x12,},//Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x11,},//Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,},//Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,},//Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,},//Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,},//Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,},//Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,},//Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x18,},//Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x13,},//Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x16,},//Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,},//Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,},//Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x26,},//Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x28,},//Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,},//Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,},//Indoor 11d1 //Bayer Flat R1 Lum H -{0xde, 0xd2,}, -{0xdf, 0x40,},//Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,},//Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,},//Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x20,},//Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x18,},//Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,},//Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x08,},//Indoor 11e0 //Bayer Flat R3 LumL -{0xf6, 0xe1,}, -{0xf7, 0x15,},//Indoor 11e1 //Bayer Flat R3 LumH -{0xf8, 0xe2,}, -{0xf9, 0x3c,},//Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,},//Indoor 11e3 //Bayer Flat R4 LumH -{0xfc, 0xe4,}, -{0xfd, 0x01,},//Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,},// burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x11,},//Indoor 11e5 //Bayer Flat R3 StdH -{0x12, 0xe6,}, -{0x13, 0x01,},//Indoor 11e6 //Bayer Flat R4 StdL -{0x14, 0xe7,}, -{0x15, 0x40,},//Indoor 11e7 //Bayer Flat R4 StdH -{0x16, 0xe8,}, -{0x17, 0x01,},//Indoor 11e8 //Bayer Flat R3 DyL -{0x18, 0xe9,}, -{0x19, 0x0a,},//Indoor 11e9 //Bayer Flat R3 DyH -{0x1a, 0xea,}, -{0x1b, 0x01,},//Indoor 11ea //Bayer Flat R4 DyL -{0x1c, 0xeb,}, -{0x1d, 0x25,},//Indoor 11eb //Bayer Flat R4 DyH -{0x1e, 0xef,}, -{0x1f, 0x6a,},//Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x08,},//Indoor 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Indoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Indoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Indoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Indoor 1270 // Bayer Sharpness ENB add -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Indoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Indoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x26,},//Indoor 1277 //20130412 -{0x32, 0x78,}, -{0x33, 0x2f,},//Indoor 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Indoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Indoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Indoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x60,},//Indoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Indoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Indoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Indoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Indoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Indoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Indoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Indoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Indoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Indoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Indoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Indoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Indoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Indoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Indoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Indoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Indoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Indoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Indoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Indoor 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Indoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Indoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Indoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Indoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Indoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Indoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Indoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Indoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Indoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Indoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Indoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Indoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Indoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Indoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Indoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Indoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Indoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Indoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Indoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Indoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Indoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Indoor 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Indoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Indoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Indoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Indoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Indoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Indoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Indoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Indoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Indoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Indoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Indoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Indoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Indoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Indoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Indoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Indoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Indoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Indoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Indoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Indoor 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Indoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Indoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Indoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Indoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Indoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Indoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Indoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Indoor 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Indoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Indoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Indoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Indoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Indoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Indoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Indoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Indoor 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Indoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Indoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Indoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Indoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Indoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Indoor 1383 //add 20121210 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Indoor 1384 //add 20121210 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Indoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Indoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Indoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Indoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Indoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Indoor 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Indoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Indoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Indoor 1413 -{0x14, 0x14,}, -{0x15, 0x10,},//Indoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Indoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Indoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Indoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Indoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Indoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Indoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1c,},//Indoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x20,},//Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x1f,},//Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x1c,},//Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x11,},//Indoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x10,},//Indoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x10,},//Indoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x11,},//Indoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x10,},//Indoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x1a,},//Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x15,},//Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x14,},//Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x13,},//Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x14,},//Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x15,},//Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x22,},//Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x22,},//Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1f,},//Indoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x1a,},//Indoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x18,},//Indoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x1a,},//Indoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x1d,},//Indoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x19,},//Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x16,},//Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x15,},//Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x14,},//Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x14,},//Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x13,},//Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x2b,},//Indoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x2c,},//Indoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x2e,},//Indoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2f,},//Indoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Indoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2e,},//Indoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Indoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x30,},//Indoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x17,},//Indoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x1d,},//Indoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x24,},//Indoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x26,},//Indoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x24,},//Indoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x23,},//Indoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1d,},//Indoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x17,},//Indoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Indoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Indoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Indoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Indoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Indoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Indoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Indoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Indoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Indoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Indoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Indoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x50,},//Indoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Indoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Indoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Indoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Indoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Indoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Indoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Indoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Indoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Indoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Indoor 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Indoor 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Indoor 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Indoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Indoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Indoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Indoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Indoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x1d,},//Indoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Indoor 1A3a //RGB Flat R2_Lum H -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Indoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Indoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Indoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Indoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Indoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Indoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Indoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Indoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Indoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x12,},//Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x12,},//Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x11,},//Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x10,},//Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x10,},//Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x10,},//Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x10,},//Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x10,},//Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x15,},//Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x10,},//Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x10,},//Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x10,},//Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x10,},//Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x10,},//Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x10,},//Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x13,},//Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x14,},//Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Indoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x13,},//Indoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x14,},//Indoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x15,},//Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x15,},//Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x11,},//Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x11,},//Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x11,},//Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x22,},//Indoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x23,},//Indoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x24,},//Indoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x25,},//Indoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x26,},//Indoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x28,},//Indoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x2b,},//Indoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x2d,},//Indoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x22,},//Indoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x23,},//Indoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x26,},//Indoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x26,},//Indoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x26,},//Indoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x26,},//Indoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x26,},//Indoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x26,},//Indoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x34,},//Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Indoor 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Indoor 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Indoor 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Indoor 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Indoor 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Indoor 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Indoor 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Indoor 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Indoor 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Indoor 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Indoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Indoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Indoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Indoor 1070 Trans Func. 130618 Indoor transFuc Low 1.0->0.84 -{0x68, 0x71,}, -{0x69, 0x06,},//Indoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x85,},//Indoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x0a,},//Indoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Indoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Indoor 1075 -{0x72, 0x76,}, -{0x73, 0x36,},//Indoor 1076 -{0x74, 0x77,}, -{0x75, 0x47,},//Indoor 1077 -{0x76, 0x78,}, -{0x77, 0xae,},//Indoor 1078 -{0x78, 0x79,}, -{0x79, 0x50,},//Indoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Indoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x50,},//Indoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Indoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Indoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Indoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Indoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x2a,},//Indoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Indoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Indoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Indoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Indoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x03,},//Indoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Indoor 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Dark1 113c //Pre Flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x53,},//Dark1 113d //Pre Flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark1 1140 //Pre Flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark1 1141 //Pre Flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark1 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark1 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark1 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark1 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark1 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark1 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark1 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark1 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark1 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark1 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark1 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark1 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark1 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark1 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark1 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark1 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark1 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark1 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark1 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark1 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark1 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark1 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark1 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark1 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark1 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark1 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark1 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark1 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark1 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark1 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark1 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark1 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark1 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark1 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark1 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark1 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark1 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark1 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark1 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark1 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark1 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark1 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark1 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark1 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark1 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark1 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark1 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark1 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark1 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark1 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark1 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark1 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark1 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark1 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark1 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark1 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark1 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark1 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark1 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark1 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark1 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark1 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark1 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark1 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark1 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark1 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark1 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark1 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark1 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark1 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark1 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark1 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark1 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark1 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark1 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark1 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark1 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark1 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark1 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark1 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark1 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark1 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark1 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark1 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark1 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark1 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark1 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark1 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark1 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark1 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark1 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark1 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark1 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark1 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark1 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark1 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark1 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark1 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark1 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark1 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark1 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark1 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark1 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark1 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark1 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark1 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark1 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark1 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark1 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark1 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark1 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark1 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark1 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark1 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark1 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark1 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark1 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark1 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark1 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark1 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark1 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark1 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark1 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark1 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark1 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark1 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark1 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark1 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark1 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark1 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark1 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark1 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark1 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark1 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark1 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark1 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark1 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark1 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark1 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark1 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark1 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark1 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark1 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark1 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark1 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark1 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark1 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark1 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark1 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark1 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark1 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark1 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark1 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark1 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark1 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark1 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark1 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark1 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark1 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark1 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark1 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark1 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark1 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark1 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark1 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark1 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark1 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark1 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark1 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark1 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark1 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark1 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark1 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark1 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark1 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark1 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark1 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark1 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark1 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark1 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark1 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark1 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark1 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark1 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark1 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark1 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark1 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark1 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark1 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark1 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark1 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark1 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark1 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark1 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark1 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark1 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark1 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark1 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark1 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark1 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark1 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark1 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark1 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark1 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark1 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark1 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark1 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark1 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark1 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark1 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark1 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark1 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x0a,},//Dark1 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark1 1072 -{0x6c, 0x73,}, -{0x6d, 0xcc,},//Dark1 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark1 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark1 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark1 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark1 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark1 1078 -{0x78, 0x79,}, -{0x79, 0x49,},//Dark1 1079 -{0x7a, 0x7a,}, -{0x7b, 0x99,},//Dark1 107a -{0x7c, 0x7b,}, -{0x7d, 0x49,},//Dark1 107b -{0x7e, 0x7c,}, -{0x7f, 0x99,},//Dark1 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark1 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark1 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark1 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark1 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark1 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark1 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark1 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark1 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x04,},//Dark1 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark1 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark2 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark2 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x53,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,},//Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark2 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark2 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark2 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark2 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark2 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark2 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark2 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,},//Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark2 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark2 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark2 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark2 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark2 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark2 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark2 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark2 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark2 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark2 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark2 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark2 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark2 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark2 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark2 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark2 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark2 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark2 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark2 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark2 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark2 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark2 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark2 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark2 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark2 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark2 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark2 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark2 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark2 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark2 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark2 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark2 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark2 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark2 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark2 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark2 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark2 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark2 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark2 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark2 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark2 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark2 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark2 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark2 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark2 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark2 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark2 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark2 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark2 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark2 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark2 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark2 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark2 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark2 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark2 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark2 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark2 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark2 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark2 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark2 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark2 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark2 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark2 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark2 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark2 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark2 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark2 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark2 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark2 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark2 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark2 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark2 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark2 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark2 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark2 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark2 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark2 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark2 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark2 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark2 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark2 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark2 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark2 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark2 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark2 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark2 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark2 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark2 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark2 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark2 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark2 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark2 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark2 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark2 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark2 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark2 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark2 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark2 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark2 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark2 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark2 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark2 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark2 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark2 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark2 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark2 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark2 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark2 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark2 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark2 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark2 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark2 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark2 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark2 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark2 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark2 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark2 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark2 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark2 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark2 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark2 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark2 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark2 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark2 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark2 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark2 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark2 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark2 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark2 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark2 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark2 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark2 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark2 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark2 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark2 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark2 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark2 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark2 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark2 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark2 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark2 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark2 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark2 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark2 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark2 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark2 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark2 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark2 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark2 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark2 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark2 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark2 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark2 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark2 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark2 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark2 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark2 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark2 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark2 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark2 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark2 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark2 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark2 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark2 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark2 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark2 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark2 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark2 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark2 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark2 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark2 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark2 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark2 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark2 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark2 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark2 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark2 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark2 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark2 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark2 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark2 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark2 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark2 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark2 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark2 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark2 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark2 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark2 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark2 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark2 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark2 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark2 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark2 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark2 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark2 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark2 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark2 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark2 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark2 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark2 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark2 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark2 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark2 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark2 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark2 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark2 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark2 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark2 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark2 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark2 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark2 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark2 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x06,},//Dark2 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark2 1072 -{0x6c, 0x73,}, -{0x6d, 0x99,},//Dark2 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark2 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark2 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark2 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark2 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark2 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Dark2 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Dark2 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Dark2 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Dark2 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark2 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark2 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark2 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark2 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark2 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark2 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark2 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark2 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x05,},//Dark2 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark2 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 54MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0f,}, // tlpx_time_l_dn -{0x1e, 0x08,}, // hs_zero_time -{0x1f, 0x0a,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x0f,}, // clk_zero_time -{0x33, 0x0b,}, // clk_post_time -{0x34, 0x03,}, // clk_prepare_time -{0x35, 0x04,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x06,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 -}; - -static struct msm_camera_i2c_reg_conf sr352_Init_Reg_01[] = { - -/////////////////////////////////////////////////////////////////////////////// -// Sensor Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x24,}, //mode_pll1 26mhz / (4+1) = 5.2mhz -{0x08, 0x54,}, //mode_pll2 isp clk = 109.2Mhz; -{0x09, 0x85,}, //mode_pll3 // MIPI 4x div 1/2 // isp clk div = 1/4 //Preview -{0x07, 0xA4,}, -{0x07, 0xA4,}, -{0x07, 0xA4,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, // mode_pll4 for mipi mode -{0x0A, 0xe0,}, // mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, // SSD sram clock inv on -{0x33, 0x45,}, // bit[6]:C-NR DC ?? ?? - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 108mhz -{0x40, 0x3B,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x3B,}, // otp cfg 3 -{0x43, 0x3B,}, // otp cfg 4 -{0x44, 0x3B,}, // otp cfg 5 -{0x45, 0x2B,}, // otp cfg 6 -{0x46, 0x71,}, // otp cfg 7 -{0x47, 0x0B,}, // otp cfg 8 -{0x48, 0x03,}, // otp cfg 9 -{0x49, 0x6A,}, // otp cfg 10 -{0x4A, 0x3B,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, // delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// TAP for capture function -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, - -{0x16, 0x00,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) -{0x18, 0x01,}, // use tap memory - -{0x40, 0x02,}, // set auto increment mode -{0x44, 0x00,}, // select rom -{0x45, 0x00,}, // set high address -{0x46, 0x00,}, // set low address - -// tap code download - start -// (caution : data length must be even) -{0x42, 0x90,}, -{0x42, 0x81,}, -{0x42, 0xf0,}, -{0x42, 0xe0,}, -{0x42, 0x54,}, -{0x42, 0x07,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x40,}, -{0x42, 0x1e,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xb4,}, -{0x42, 0x01,}, -{0x42, 0x07,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x10,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0xaf,}, -{0x42, 0xe0,}, -{0x42, 0xd3,}, -{0x42, 0x94,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0x13,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x0c,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xe4,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0xa3,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x21,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x55,}, -{0x42, 0x90,}, -{0x42, 0x90,}, - -{0x42, 0xb4,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe5,}, -{0x42, 0x4e,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe1,}, -{0x42, 0x4a,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x88,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8b,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, - -{0x42, 0x00,}, -{0x42, 0x8c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8e,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x00,}, -{0x42, 0x8f,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x90,}, -{0x42, 0x1f,}, -{0x42, 0x2d,}, -{0x42, 0x74,}, -{0x42, 0x04,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x89,}, -{0x42, 0xe0,}, -{0x42, 0x30,}, -{0x42, 0xe4,}, -{0x42, 0x1d,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x66,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x67,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x68,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x69,}, -{0x42, 0x80,}, -{0x42, 0x1b,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6a,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8c,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6b,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8d,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6c,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8e,}, -{0x42, 0xf0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x6d,}, -{0x42, 0xe0,}, -{0x42, 0x90,}, -{0x42, 0x06,}, -{0x42, 0x8f,}, -{0x42, 0xf0,}, -{0x42, 0x22,}, -{0x42, 0x0a,}, -// tap code download - end - -{0x44, 0x01,}, // select ram - -{0x16, 0xf8,}, // set tap address (high) -{0x17, 0x00,}, // set tap address (low) - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x41,}, //binning + prev1 -{0x11, 0x80,}, //Fixed mode off -{0x12, 0x00,}, -{0x13, 0x28,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1d, 0x05,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set -{0x24, 0x06,}, // height = 1536 -{0x25, 0x00,}, -{0x26, 0x08,}, // width = 2048 -{0x27, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x08,}, // 1Line = 2200 : 054(HBLANK) + 2146(Active Pixel) -{0x4d, 0x98,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, //Vsync H -{0x53, 0x14,}, //Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x00,}, // bayer y start -{0x81, 0x00,}, -{0x82, 0x06,}, // bayer height -{0x83, 0x24,}, -{0x84, 0x00,}, //pixel_col_start -{0x85, 0x00,}, -{0x86, 0x08,}, //pixel_width -{0x87, 0x24,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ?? for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, // 20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, -{0xa0, 0x02,}, -{0xa1, 0xa8,}, -{0xa2, 0x04,}, -{0xa3, 0x79,}, -{0xa4, 0x04,}, -{0xa5, 0xdc,}, -{0xa6, 0x08,}, -{0xa7, 0x66,}, -{0xa8, 0x02,}, -{0xa9, 0x7b,}, -{0xaa, 0x03,}, -{0xab, 0x4f,}, -{0xac, 0x03,}, -{0xad, 0xa0,}, -{0xae, 0x05,}, -{0xaf, 0x43,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1c, 0x02,}, -{0x1d, 0x88,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, -{0x42, 0x00,}, -{0x43, 0xb0,}, -{0x46, 0x01,}, -{0x47, 0x00,}, -{0x4a, 0x00,}, -{0x4b, 0xae,}, -{0x4e, 0x00,}, -{0x4f, 0xae,}, -{0x52, 0x00,}, -{0x53, 0xaa,}, -{0x56, 0x00,}, -{0x57, 0xaa,}, -{0x5A, 0x00,}, -{0x5b, 0xaa,}, -{0x6A, 0x00,}, -{0x6B, 0xf8,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x90,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x8b,}, -{0x7A, 0x06,}, -{0x7B, 0x95,}, -{0x7C, 0x06,}, -{0x7D, 0x8b,}, -{0x7E, 0x06,}, -{0x7F, 0x95,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x8b,}, -{0x86, 0x06,}, -{0x87, 0x95,}, -{0x88, 0x06,}, -{0x89, 0x8b,}, -{0x8A, 0x06,}, -{0x8B, 0x95,}, -{0x92, 0x06,}, // sx -{0x93, 0x81,}, -{0x96, 0x06,}, -{0x97, 0x81,}, -{0x98, 0x06,}, // sxb -{0x99, 0x81,}, -{0x9c, 0x06,}, -{0x9d, 0x81,}, - -{0xb6, 0x01,}, // --------------> s_hb_cnt_hold = 500 -{0xb7, 0xf4,}, -{0xc0, 0x00,}, // i_addr_mux_prev -{0xc1, 0xb4,}, -{0xc2, 0x00,}, -{0xc3, 0xf4,}, -{0xc4, 0x00,}, -{0xc5, 0xb4,}, -{0xc6, 0x00,}, -{0xc7, 0xf4,}, -{0xc8, 0x00,}, // i_addr_cut_prev -{0xc9, 0xb8,}, -{0xca, 0x00,}, -{0xcb, 0xf0,}, -{0xcc, 0x00,}, -{0xcd, 0xb8,}, -{0xce, 0x00,}, -{0xcf, 0xf0,}, -{0xd0, 0x00,}, // Rx_exp_prev -{0xd1, 0xba,}, -{0xd2, 0x00,}, -{0xd3, 0xee,}, -{0xd4, 0x00,}, -{0xd5, 0xba,}, -{0xd6, 0x00,}, -{0xd7, 0xee,}, -{0xd8, 0x00,}, // Tx_exp_prev -{0xd9, 0xbc,}, -{0xdA, 0x00,}, -{0xdB, 0xec,}, -{0xdC, 0x00,}, -{0xdD, 0xbc,}, -{0xdE, 0x00,}, -{0xdF, 0xec,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ??? MCU? reset ??. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x11,}, //Preview1 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x00,}, //gap y off, gap x off - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x10,}, //YOFS ENB -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x00,}, //16_235 range scale down off -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,},//D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0x7a,}, //pga_dark1_hi //Enter Dark1 -{0xf3, 0x72,}, //pga_dark_lo //Escape Dark1 -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0x90,},//C-mask near STD TH -{0x88, 0x70,},//C-mask middle STD TH -{0x89, 0x50,},//C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,},//Yc2d_ee_color_gain1 -{0x78, 0x20,},//Yc2d_ee_color_gain2 -{0x79, 0x20,},//Yc2d_ee_color_gain3 -{0x7a, 0x20,},//Yc2d_ee_color_gain4 -{0x7b, 0x20,},//Yc2d_ee_color_gain5 -{0x7c, 0x20,},//Yc2d_ee_color_gain6 -{0x7d, 0x20,},//Yc2d_ee_color_gain7 -{0x7e, 0x20,},//Yc2d_ee_color_gain8 - -{0xc0, 0x00,},//Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,},//Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,},//Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,},//Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,},//Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xd0, 0x01,},//Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8d, 0x20,},//RGB-Color_Gain1 -{0x8e, 0x20,},//RGB-Color_Gain2 -{0x8f, 0x20,},//RGB-Color_Gain3 -{0x90, 0x20,},//RGB-Color_Gain4 -{0x91, 0x20,},//RGB-Color_Gain5 -{0xcb, 0x34,},//20130604 Cyan th - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0x20,}, - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x08,}, -{0x38, 0x98,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x80, 0x3a,}, //Y Target -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x7C,}, //Flicker Line 100 -{0x15, 0x67,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x16, 0x50,}, //SSD B gain int gain 1.5 - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -////54.646200mhz = 0x0341D5B8 -{0x03, 0xC0,}, -{0x14, 0x03,}, -{0x15, 0x41,}, -{0x16, 0xD5,}, -{0x17, 0xB8,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9e, 0x00,},//1 Line -{0x9f, 0x00,}, -{0xa0, 0x00,}, -{0xa1, 0x00,}, -{0xa2, 0x00,}, -{0xa3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x7c, 0xe0,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x34,}, -{0x18, 0x55,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x04,}, -{0x22, 0x30,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 - -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,},//Low In Th -{0x56, 0x52,},//Low Out Th -{0x57, 0x60,},//High Out Th -{0x58, 0x70,},//High In Th - -{0x62, 0xd8,},//Out weight //ca->d8 -{0x63, 0xa6,},//Indoor weight -{0x64, 0x88,},//Dark weight -{0x65, 0xe8,},//Low weight -{0x66, 0xa6,},//High weight - -{0x31, 0x01,},//Color ratio reset -{0x30, 0x98,},//Color ratio on -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x23,}, // DYOFS_Ratio -{0x1c, 0x04,}, // DYOFS_Limit - -{0x1d, 0x00,},//EV Th OutEnd -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,},//EV Th OutStr def : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x0b,}, -{0x27, 0x71,}, -{0x28, 0xb0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x0d,}, -{0x2b, 0xbb,}, -{0x2c, 0xa0,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x12,}, -{0x2f, 0x76,}, -{0x30, 0x90,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x1e,}, -{0x33, 0x84,}, -{0x34, 0x80,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,}, // LSC_EvTh_OutEnd_4 -{0x3a, 0x00,}, // LSC_EvTh_OutEnd_3 -{0x3b, 0x13,}, // LSC_EvTh_OutEnd_2 -{0x3c, 0x88,}, // LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,}, // LSC_EvTh_OutStr_4 -{0x3e, 0x00,}, // LSC_EvTh_OutStr_3 -{0x3f, 0x30,}, // LSC_EvTh_OutStr_2 -{0x40, 0xd4,}, // LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,}, // LSC_EvTh_Dark1Str_4 -{0x42, 0x05,}, // LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,}, // LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,}, // LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,}, // LSC_EvTh_Dark1End_4 -{0x46, 0x0b,}, // LSC_EvTh_Dark1End_3 -{0x47, 0x71,}, // LSC_EvTh_Dark1End_2 -{0x48, 0xb0,}, // LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,}, // LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,}, // LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,}, // LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,}, // LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,}, // LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,}, // LSC_EvTh_Dark2End_3 -{0x4f, 0x84,}, // LSC_EvTh_Dark2End_2 -{0x50, 0x80,}, // LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},// LSC Ctmp LTEnd Out -{0x52, 0x64,},// LSC Ctmp LTStr Out -{0x53, 0x78,},// LSC Ctmp HTStr Out -{0x54, 0x86,},// LSC Ctmp HTEnd Out - -{0x55, 0x4a,},// LSC Ctmp LTEnd In h46->h4a 13.5.29 multi gain modify -{0x56, 0x56,},// LSC Ctmp LTStr In h56->h56 -{0x57, 0x6e,},// LSC Ctmp HTStr In h6e->h6e -{0x58, 0x78,},// LSC Ctmp HTEnd In h76->h78 - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,},// UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,},// UniScn_BPstdMinTh -{0x6c, 0x3a,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x34,},// Y_target_Outdoor -{0x7e, 0x34,},// Y_target_Indoor -{0x7f, 0x34,},// Y_target_Dark1 -{0x80, 0x34,},// Y_target_Dark2 -{0x81, 0x39,},// Y_target_LowTemp -{0x82, 0x2f,},// Y_target_HighTemp - -{0x83, 0x98,}, // Cb_Outdoor -{0x84, 0x95,},// Cb _Sat_Indoor -{0x85, 0xa0,},// Cb _Sat_Dark1 -{0x86, 0x8a,},// Cb _Sat_Dark2 -{0x87, 0x88,},// Cb _Sat_LowTemp -{0x88, 0x92,},// Cb _Sat_HighTemp - -{0x89, 0x88,},// Cr _Sat_Outdoor -{0x8a, 0x90,},// Cr _Sat_Indoor -{0x8b, 0xa0,},// Cr _Sat_Dark1 -{0x8c, 0x84,},// Cr _Sat_Dark2 -{0x8d, 0x75,},// Cr _Sat_LowTemp -{0x8e, 0x92,},// Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x82,}, // BLC_ofs_r_Dark1 -{0x98, 0x82,}, // BLC_ofs_b_Dark1 -{0x99, 0x82,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x82,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x82,}, // BLC_ofs_r_Dark2 -{0x9c, 0x82,}, // BLC_ofs_b_Dark2 -{0x9d, 0x82,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x82,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x50,}, //CMC_Out_00 -{0xdd, 0x1d,}, //CMC_Out_01 -{0xde, 0x0d,}, //CMC_Out_02 -{0xdf, 0x0e,}, //CMC_Out_03 -{0xe0, 0x50,}, //CMC_Out_04 -{0xe1, 0x02,}, //CMC_Out_05 -{0xe2, 0x05,}, //CMC_Out_06 -{0xe3, 0x15,}, //CMC_Out_07 -{0xe4, 0x5a,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,},//CMCSIGN_In_Mid -{0x17, 0x53,},//CMC_In_Mid_00 -{0x18, 0x16,},//CMC_In_Mid_01 -{0x19, 0x03,},//CMC_In_Mid_02 -{0x1a, 0x10,},//CMC_In_Mid_03 -{0x1b, 0x53,},//CMC_In_Mid_04 -{0x1c, 0x03,},//CMC_In_Mid_05 -{0x1d, 0x04,},//CMC_In_Mid_06 -{0x1e, 0x1d,},//CMC_In_Mid_07 -{0x1f, 0x61,},//CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,},//CMCSIGN_Dark1 -{0x40, 0x53,},//CMC_Dark1_00 -{0x41, 0x1c,},//CMC_Dark1_01 -{0x42, 0x09,},//CMC_Dark1_02 -{0x43, 0x0e,},//CMC_Dark1_03 -{0x44, 0x53,},//CMC_Dark1_04 -{0x45, 0x05,},//CMC_Dark1_05 -{0x46, 0x03,},//CMC_Dark1_06 -{0x47, 0x23,},//CMC_Dark1_07 -{0x48, 0x66,},//CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,},//CMCSIGN_Dark2 -{0x69, 0x53,},//CMC_Dark2_00 -{0x6a, 0x1c,},//CMC_Dark2_01 -{0x6b, 0x09,},//CMC_Dark2_02 -{0x6c, 0x0e,},//CMC_Dark2_03 -{0x6d, 0x53,},//CMC_Dark2_04 -{0x6e, 0x05,},//CMC_Dark2_05 -{0x6f, 0x03,},//CMC_Dark2_06 -{0x70, 0x23,},//CMC_Dark2_07 -{0x71, 0x66,},//CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x15,},// CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x18,},// CMC_Dark2_LumGain2_R -{0x7b, 0x1e,},// CMC_Dark2_LumGain3_R -{0x7c, 0x1f,},// CMC_Dark2_LumGain4_R -{0x7d, 0x20,},// CMC_Dark2_LumGain5_R -{0x7e, 0x20,},// CMC_Dark2_LumGain6_R -{0x7f, 0x20,},// CMC_Dark2_LumGain7_R -{0x80, 0x20,},// CMC_Dark2_LumGain8_R 20 = x1 - -{0x81, 0x15,},// CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x18,},// CMC_Dark2_LumGain2_G -{0x83, 0x1e,},// CMC_Dark2_LumGain3_G -{0x84, 0x1f,},// CMC_Dark2_LumGain4_G -{0x85, 0x20,},// CMC_Dark2_LumGain5_G -{0x86, 0x20,},// CMC_Dark2_LumGain6_G -{0x87, 0x20,},// CMC_Dark2_LumGain7_G -{0x88, 0x20,},// CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x15,},// CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x18,},// CMC_Dark2_LumGain2_B -{0x8b, 0x1e,},// CMC_Dark2_LumGain3_B -{0x8c, 0x1f,},// CMC_Dark2_LumGain4_B -{0x8d, 0x20,},// CMC_Dark2_LumGain5_B -{0x8e, 0x20,},// CMC_Dark2_LumGain6_B -{0x8f, 0x20,},// CMC_Dark2_LumGain7_B -{0x90, 0x20,},// CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, // GMA_OUT -{0xe4, 0x03,}, -{0xe5, 0x08,}, -{0xe6, 0x0f,}, -{0xe7, 0x15,}, -{0xe8, 0x20,}, -{0xe9, 0x2d,}, -{0xea, 0x3b,}, -{0xeb, 0x47,}, -{0xec, 0x53,}, -{0xed, 0x5c,}, -{0xee, 0x65,}, -{0xef, 0x6d,}, -{0xf0, 0x75,}, -{0xf1, 0x7c,}, -{0xf2, 0x82,}, -{0xf3, 0x88,}, -{0xf4, 0x8d,}, -{0xf5, 0x91,}, -{0xf6, 0x96,}, -{0xf7, 0x9a,}, -{0xf8, 0xa1,}, -{0xf9, 0xa9,}, -{0xfa, 0xb0,}, -{0xfb, 0xbe,}, -{0xfc, 0xc8,}, -{0xfd, 0xd2,}, - -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, // Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xdb,}, -{0x11, 0xe3,}, -{0x12, 0xea,}, -{0x13, 0xf0,}, -{0x14, 0xf5,}, -{0x15, 0xfb,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x03,}, -{0x19, 0x08,}, -{0x1a, 0x0f,}, -{0x1b, 0x15,}, -{0x1c, 0x20,}, -{0x1d, 0x2d,}, -{0x1e, 0x3b,}, -{0x1f, 0x47,}, -{0x20, 0x53,}, -{0x21, 0x5c,}, -{0x22, 0x65,}, -{0x23, 0x6d,}, -{0x24, 0x75,}, -{0x25, 0x7c,}, -{0x26, 0x82,}, -{0x27, 0x88,}, -{0x28, 0x8d,}, -{0x29, 0x91,}, -{0x2a, 0x96,}, -{0x2b, 0x9a,}, -{0x2c, 0xa1,}, -{0x2d, 0xa9,}, -{0x2e, 0xb0,}, -{0x2f, 0xbe,}, -{0x30, 0xc8,}, -{0x31, 0xd2,}, -{0x32, 0xdb,}, -{0x33, 0xe3,}, -{0x34, 0xea,}, -{0x35, 0xf0,}, -{0x36, 0xf5,}, -{0x37, 0xfb,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, // GMA_D1 -{0x3a, 0x06,}, -{0x3b, 0x0e,}, -{0x3c, 0x17,}, -{0x3d, 0x1f,}, -{0x3e, 0x2c,}, -{0x3f, 0x3c,}, -{0x40, 0x4c,}, -{0x41, 0x57,}, -{0x42, 0x61,}, -{0x43, 0x6b,}, -{0x44, 0x76,}, -{0x45, 0x7e,}, -{0x46, 0x85,}, -{0x47, 0x8c,}, -{0x48, 0x92,}, -{0x49, 0x98,}, -{0x4a, 0x9c,}, -{0x4b, 0xa2,}, -{0x4c, 0xa6,}, -{0x4d, 0xab,}, -{0x4e, 0xb4,}, -{0x4f, 0xbc,}, -{0x50, 0xc2,}, -{0x51, 0xcb,}, -{0x52, 0xd3,}, -{0x53, 0xdb,}, -{0x54, 0xe1,}, -{0x55, 0xe7,}, -{0x56, 0xed,}, -{0x57, 0xf3,}, -{0x58, 0xf8,}, -{0x59, 0xfc,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x08,}, -{0x5d, 0x12,}, -{0x5e, 0x1b,}, -{0x5f, 0x24,}, -{0x60, 0x32,}, -{0x61, 0x3f,}, -{0x62, 0x4c,}, -{0x63, 0x57,}, -{0x64, 0x61,}, -{0x65, 0x6c,}, -{0x66, 0x79,}, -{0x67, 0x82,}, -{0x68, 0x8c,}, -{0x69, 0x94,}, -{0x6a, 0x99,}, -{0x6b, 0x9f,}, -{0x6c, 0xa4,}, -{0x6d, 0xaa,}, -{0x6e, 0xaf,}, -{0x6f, 0xb4,}, -{0x70, 0xba,}, -{0x71, 0xc0,}, -{0x72, 0xc5,}, -{0x73, 0xcd,}, -{0x74, 0xd5,}, -{0x75, 0xdc,}, -{0x76, 0xe1,}, -{0x77, 0xe7,}, -{0x78, 0xed,}, -{0x79, 0xf3,}, -{0x7a, 0xf8,}, -{0x7b, 0xfc,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x18,}, //Outdoor_delta3 -{0x82, 0xb3,}, //Outdoor_center3 -{0x83, 0x1b,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x8c,}, //Outdoor_hue_angle2 -{0x91, 0x0e,}, //Outdoor_hue_angle3 -{0x92, 0x05,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,},// MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 Skin -{0xb7, 0x3f,},// MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,},// MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,},// MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,},// MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,},// MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,},// MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,},// MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,},// MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 bright green1 -{0xbf, 0x3f,},// MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,},// MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,},// MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 dark Green2 -{0xc7, 0x3f,},// MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,},// MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,},// MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,},// MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,},// MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,},// MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,},// MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x16,}, //Outdoor_allgain_y0 -{0xe7, 0x16,}, //Outdoor_allgain_y1 -{0xe8, 0x16,}, //Outdoor_allgain_y2 -{0xe9, 0x16,}, //Outdoor_allgain_y3 -{0xea, 0x16,}, //Outdoor_allgain_y4 -{0xeb, 0x15,}, //Outdoor_allgain_y5 -{0xec, 0x19,}, //Outdoor_allgain_y6 -{0xed, 0x19,}, //Outdoor_allgain_y7 -{0xee, 0x18,}, //Outdoor_allgain_y8 -{0xef, 0x17,}, //Outdoor_allgain_y9 -{0xf0, 0x14,}, //Outdoor_allgain_y10 -{0xf1, 0x14,}, //Outdoor_allgain_y11 - -// Indoor MCMC -{0xf2, 0x10,},//Indoor_delta1 -{0xf3, 0x1e,},//Indoor_center1 -{0xf4, 0x0b,},//Indoor_delta2 -{0xf5, 0x6f,},//Indoor_center2 -{0xf6, 0x1b,},//Indoor_delta3 light green -{0xf7, 0xc2,},//Indoor_center3 light green -{0xf8, 0x17,},//Indoor_delta4 -{0xf9, 0xfb,},//Indoor_center4 -{0xfa, 0x91,},//Indoor_delta5 -{0xfb, 0x2b,},//Indoor_center5 -{0xfc, 0x92,},//Indoor_delta6 -{0xfd, 0x4f,},//Indoor_center6 -{0x0e, 0x00,},// burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x00,}, //Indoor_hue_angle2 -{0x18, 0x1e,}, //Indoor_hue_angle3 -{0x19, 0x0a,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,},// MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,},// MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,},// MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,},// MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,},// MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,},// MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,},// MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x12,},// MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x12,},// MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,},// MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,},// MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,},//Dark1_allgain_y1 -{0xe3, 0x10,},//Dark1_allgain_y2 -{0xe4, 0x10,},//Dark1_allgain_y3 -{0xe5, 0x11,},//Dark1_allgain_y4 -{0xe6, 0x10,},//Dark1_allgain_y5 -{0xe7, 0x13,},//Dark1_allgain_y6 -{0xe8, 0x12,},//Dark1_allgain_y7 -{0xe9, 0x12,},//Dark1_allgain_y8 -{0xea, 0x12,},//Dark1_allgain_y9 -{0xeb, 0x11,},//Dark1_allgain_y10 -{0xec, 0x10,},//Dark1_allgain_y11 -{0xed, 0x0f,},//Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,},// MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,},// MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,},// MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,},// MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,},// MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,},// MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,},// MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x05,},// MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,},// MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,},// MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,},// MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,},// MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,},// MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,},// MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,},// MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,},// MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,},// MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,},// MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,},// MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,},// MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,},//Hi-Temp_allgain_y0 -{0x66, 0x0d,},//Hi-Temp_allgain_y1 -{0x67, 0x0e,},//Hi-Temp_allgain_y2 -{0x68, 0x0e,},//Hi-Temp_allgain_y3 -{0x69, 0x0f,},//Hi-Temp_allgain_y4 -{0x6a, 0x10,},//Hi-Temp_allgain_y5 -{0x6b, 0x12,},//Hi-Temp_allgain_y6 -{0x6c, 0x14,},//Hi-Temp_allgain_y7 -{0x6d, 0x13,},//Hi-Temp_allgain_y8 -{0x6e, 0x12,},//Hi-Temp_allgain_y9 -{0x6f, 0x0e,},//Hi-Temp_allgain_y10 -{0x70, 0x11,},//Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // function block on -{0x10, 0x8F,}, // Adaptive on - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x36,},//Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x38,},//Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3c,},//Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x18,},//Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x32,},//Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x31,},//Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x23,},//Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1b,},//Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,},//Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,},//Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,},//Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,},//Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x26,},//Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x25,},//Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x21,},//Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,},//Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,}, //Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,}, //Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,}, //Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,}, //Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,}, //Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,}, //Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,}, //Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,}, //Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,},//Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x33,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x38,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x33,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,}, //Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,},//Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x33,},//Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x3a,},//Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,},//Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x3a,},//Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x22,},//Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x30,},//Outdoor 1212 -{0x24, 0x33,}, -{0x25, 0x30,},//Outdoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x21,},//Outdoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Outdoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Outdoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Outdoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Outdoor 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Outdoor 1278 -{0x34, 0x79,}, -{0x35, 0x09,},//Outdoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Outdoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Outdoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x50,},//Outdoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x10,},//Outdoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Outdoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Outdoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Outdoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Outdoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Outdoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Outdoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Outdoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Outdoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Outdoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Outdoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Outdoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Outdoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Outdoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Outdoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Outdoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Outdoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Outdoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Outdoor 12ae -{0x62, 0xaf,}, -{0x63, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Outdoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Outdoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Outdoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Outdoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x91,},//Outdoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0xa4,},//Outdoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3c,},//Outdoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Outdoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Outdoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Outdoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Outdoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Outdoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Outdoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Outdoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Outdoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Outdoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Outdoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Outdoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Outdoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Outdoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Outdoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Outdoor 12de -{0x90, 0xe0,}, -{0x91, 0x49,},//Outdoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Outdoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Outdoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x20,},//Outdoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x20,},//Outdoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x20,},//Outdoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x20,},//Outdoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x20,},//Outdoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x20,},//Outdoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x20,},//Outdoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x20,},//Outdoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Outdoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1e,},//Outdoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1d,},//Outdoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x20,},//Outdoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Outdoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Outdoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Outdoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Outdoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x3f,},//Outdoor 1330 -{0xba, 0x31,}, -{0xbb, 0x3f,},//Outdoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x3f,},//Outdoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x3f,},//Outdoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x3f,},//Outdoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x33,},//Outdoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x2f,},//Outdoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x2e,},//Outdoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Outdoor 1338 -{0xca, 0x40,}, -{0xcb, 0x1e,},//Outdoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x22,},//Outdoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Outdoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Outdoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Outdoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Outdoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x36,},//Outdoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Outdoor 1347 -{0xda, 0x48,}, -{0xdb, 0x20,},//Outdoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Outdoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Outdoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Outdoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x20,},//Outdoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Outdoor 1383 -{0xe6, 0x84,}, -{0xe7, 0x08,},//Outdoor 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfd,},//Outdoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0xa7,},//Outdoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Outdoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Outdoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Outdoor 1410 -{0xfc, 0x11,}, -{0xfd, 0xd8,},//Outdoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Outdoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Outdoor 1413 -{0x14, 0x14,}, -{0x15, 0x0f,},//Outdoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Outdoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x1c,},//Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Outdoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Outdoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Outdoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Outdoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1d,},//Outdoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x2c,},//Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x2a,},//Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x28,},//Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x1e,},//Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x16,},//Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x16,},//Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x28,},//Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x26,},//Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x23,},//Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x19,},//Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x16,},//Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x15,},//Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x17,},//Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x19,},//Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x24,},//Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x24,},//Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1a,},//Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x10,},//Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x18,},//Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x18,},//Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x1a,},//Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x18,},//Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x15,},//Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x18,},//Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x22,},//Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x23,},//Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x24,},//Outdoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x24,},//Outdoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x28,},//Outdoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2f,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x27,},//Outdoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x28,},//Outdoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2d,},//Outdoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2f,},//Outdoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x34,},//Outdoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x2d,},//Outdoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x26,},//Outdoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x24,},//Outdoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Outdoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Outdoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Outdoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Outdoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Outdoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Outdoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Outdoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Outdoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Outdoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Outdoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Outdoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x3f,},//Outdoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Outdoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Outdoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Outdoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x3f,},//Outdoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x3f,},//Outdoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x3f,},//Outdoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x3c,},//Outdoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x38,},//Outdoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x35,},//Outdoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Outdoor 1A20 add -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Outdoor 1A2f add -{0xb4, 0x32,}, -{0xb5, 0x87,},//Outdoor 1A32 add -{0xb6, 0x34,}, -{0xb7, 0xd2,},//Outdoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x1c,},//Outdoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x06,},//Outdoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Outdoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Outdoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x2e,},//Outdoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Outdoor 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x01,},//Outdoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x0c,},//Outdoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x01,},//Outdoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x07,},//Outdoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x01,},//Outdoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x0c,},//Outdoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x01,},//Outdoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x07,},//Outdoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2b,},//Outdoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x0b,},//Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0c,},//Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x0c,},//Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x11,},//Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x17,},//Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x17,},//Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x17,},//Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x17,},//Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x16,},//Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x13,},//Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x11,},//Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x0f,},//Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x0f,},//Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x10,},//Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x17,},//Outdoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xd0, 0x27,}, -{0xd1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x19,},//Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x17,},//Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x16,},//Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x16,},//Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x10,},//Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x16,},//Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x15,},//Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x13,},//Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x29,},//Outdoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x29,},//Outdoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x29,},//Outdoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x28,},//Outdoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x28,},//Outdoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x3f,},//Outdoor 1Aa7 add -{0x4c, 0xa8,}, -{0x4d, 0x3f,},//Outdoor 1Aa8 add -{0x4e, 0xa9,}, -{0x4f, 0x3f,},//Outdoor 1Aa9 add -{0x50, 0xaa,}, -{0x51, 0x3f,},//Outdoor 1Aaa add -{0x52, 0xab,}, -{0x53, 0x3f,},//Outdoor 1Aab add -{0x54, 0xaf,}, -{0x55, 0x3f,},//Outdoor 1Aaf add -{0x56, 0xb0,}, -{0x57, 0x3f,},//Outdoor 1Ab0 add -{0x58, 0xb1,}, -{0x59, 0x3f,},//Outdoor 1Ab1 add -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Outdoor 1Ab2 add -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Outdoor 1Ab3 add -{0x5e, 0xca,}, -{0x5f, 0x00,},//Outdoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Outdoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Outdoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0f,},//Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x00,},//Outdoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x00,},//Outdoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x00,},//Outdoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Outdoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Outdoor 1075 -{0x72, 0x76,}, -{0x73, 0x40,},//Outdoor 1076 -{0x74, 0x77,}, -{0x75, 0x40,},//Outdoor 1077 -{0x76, 0x78,}, -{0x77, 0x00,},//Outdoor 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Outdoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Outdoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Outdoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Outdoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Outdoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Outdoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Outdoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x30,},//Outdoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Outdoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Outdoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Outdoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Outdoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x02,},//Outdoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x00,},//Outdoor 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x07,}, //Indoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 //Pre flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 //Pre flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Indoor 113c //Pre flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x56,},//Indoor 113d //Pre flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,},//Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,},//Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Indoor 1140 //Pre flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x1c,},//Indoor 1141 //Pre flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,},//Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,},//Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,},//Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,},//Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x3f,},//Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x3f,},//Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x3f,},//Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x10,},//Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,},//Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x15,},//Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x13,},//Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x10,},//Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x10,},//Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x12,},//Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,},//Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,},//Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x17,},//Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x16,},//Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x13,},//Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x13,},//Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x15,},//Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,},//Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,},//Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,},//Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x14,},//Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x12,},//Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x11,},//Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,},//Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,},//Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,},//Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,},//Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,},//Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,},//Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x18,},//Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x13,},//Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x16,},//Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,},//Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,},//Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x26,},//Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x28,},//Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,},//Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,},//Indoor 11d1 //Bayer Flat R1 Lum H -{0xde, 0xd2,}, -{0xdf, 0x40,},//Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,},//Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,},//Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x20,},//Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x18,},//Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,},//Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x08,},//Indoor 11e0 //Bayer Flat R3 LumL -{0xf6, 0xe1,}, -{0xf7, 0x15,},//Indoor 11e1 //Bayer Flat R3 LumH -{0xf8, 0xe2,}, -{0xf9, 0x3c,},//Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,},//Indoor 11e3 //Bayer Flat R4 LumH -{0xfc, 0xe4,}, -{0xfd, 0x01,},//Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,},// burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x11,},//Indoor 11e5 //Bayer Flat R3 StdH -{0x12, 0xe6,}, -{0x13, 0x01,},//Indoor 11e6 //Bayer Flat R4 StdL -{0x14, 0xe7,}, -{0x15, 0x40,},//Indoor 11e7 //Bayer Flat R4 StdH -{0x16, 0xe8,}, -{0x17, 0x01,},//Indoor 11e8 //Bayer Flat R3 DyL -{0x18, 0xe9,}, -{0x19, 0x0a,},//Indoor 11e9 //Bayer Flat R3 DyH -{0x1a, 0xea,}, -{0x1b, 0x01,},//Indoor 11ea //Bayer Flat R4 DyL -{0x1c, 0xeb,}, -{0x1d, 0x25,},//Indoor 11eb //Bayer Flat R4 DyH -{0x1e, 0xef,}, -{0x1f, 0x6a,},//Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x08,},//Indoor 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Indoor 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Indoor 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Indoor 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Indoor 1270 // Bayer Sharpness ENB add -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Indoor 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Indoor 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x26,},//Indoor 1277 //20130412 -{0x32, 0x78,}, -{0x33, 0x2f,},//Indoor 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Indoor 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Indoor 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Indoor 127b -{0x3a, 0x7c,}, -{0x3b, 0x60,},//Indoor 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Indoor 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Indoor 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Indoor 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Indoor 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Indoor 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Indoor 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Indoor 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Indoor 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Indoor 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Indoor 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Indoor 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Indoor 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Indoor 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Indoor 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Indoor 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Indoor 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Indoor 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Indoor 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Indoor 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Indoor 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Indoor 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Indoor 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Indoor 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Indoor 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Indoor 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Indoor 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Indoor 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Indoor 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Indoor 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Indoor 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Indoor 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Indoor 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Indoor 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x3f,},//Indoor 12d7 -{0x82, 0xd8,}, -{0x83, 0x3f,},//Indoor 12d8 -{0x84, 0xd9,}, -{0x85, 0x3f,},//Indoor 12d9 -{0x86, 0xda,}, -{0x87, 0x3f,},//Indoor 12da -{0x88, 0xdb,}, -{0x89, 0x3f,},//Indoor 12db -{0x8a, 0xdc,}, -{0x8b, 0x3f,},//Indoor 12dc -{0x8c, 0xdd,}, -{0x8d, 0x3f,},//Indoor 12dd -{0x8e, 0xde,}, -{0x8f, 0x3f,},//Indoor 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Indoor 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Indoor 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Indoor 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Indoor 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Indoor 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Indoor 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Indoor 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Indoor 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Indoor 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Indoor 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Indoor 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Indoor 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Indoor 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Indoor 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Indoor 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Indoor 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Indoor 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Indoor 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Indoor 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Indoor 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Indoor 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Indoor 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Indoor 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Indoor 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Indoor 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Indoor 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Indoor 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Indoor 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Indoor 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Indoor 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Indoor 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Indoor 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Indoor 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Indoor 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Indoor 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Indoor 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Indoor 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Indoor 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Indoor 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Indoor 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Indoor 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Indoor 1383 //add 20121210 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Indoor 1384 //add 20121210 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Indoor 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Indoor 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Indoor 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Indoor 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Indoor 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Indoor 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Indoor 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Indoor 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Indoor 1413 -{0x14, 0x14,}, -{0x15, 0x10,},//Indoor 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Indoor 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Indoor 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Indoor 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Indoor 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Indoor 1419 -{0x20, 0x1a,}, -{0x21, 0x18,},//Indoor 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x1c,},//Indoor 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x20,},//Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x1f,},//Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x1c,},//Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x11,},//Indoor 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x10,},//Indoor 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x10,},//Indoor 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x11,},//Indoor 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x10,},//Indoor 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x1a,},//Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x15,},//Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x14,},//Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x13,},//Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x14,},//Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x15,},//Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x22,},//Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x22,},//Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x22,},//Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x1f,},//Indoor 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x1a,},//Indoor 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x18,},//Indoor 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x1a,},//Indoor 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x1d,},//Indoor 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x19,},//Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x18,},//Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x16,},//Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x15,},//Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x14,},//Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x14,},//Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x13,},//Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x2b,},//Indoor 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x2c,},//Indoor 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x2e,},//Indoor 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x2f,},//Indoor 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x2f,},//Indoor 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x2e,},//Indoor 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x2f,},//Indoor 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x30,},//Indoor 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x17,},//Indoor 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x1d,},//Indoor 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x24,},//Indoor 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x26,},//Indoor 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x24,},//Indoor 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x23,},//Indoor 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1d,},//Indoor 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x17,},//Indoor 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Indoor 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Indoor 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Indoor 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Indoor 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Indoor 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Indoor 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Indoor 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Indoor 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Indoor 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Indoor 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Indoor 14c9 -{0x9a, 0xca,}, -{0x9b, 0x50,},//Indoor 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Indoor 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Indoor 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Indoor 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Indoor 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Indoor 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Indoor 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Indoor 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Indoor 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Indoor 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Indoor 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Indoor 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Indoor 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Indoor 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Indoor 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Indoor 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Indoor 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Indoor 1A38 -{0xc0, 0x39,}, -{0xc1, 0x1d,},//Indoor 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Indoor 1A3a //RGB Flat R2_Lum H -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Indoor 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Indoor 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Indoor 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Indoor 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Indoor 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Indoor 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Indoor 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Indoor 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Indoor 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x12,},//Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x12,},//Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x11,},//Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x10,},//Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x10,},//Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x10,},//Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x10,},//Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x10,},//Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x15,},//Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x10,},//Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x10,},//Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x10,},//Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x10,},//Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x10,},//Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x10,},//Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x13,},//Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x14,},//Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Indoor 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x13,},//Indoor 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x14,},//Indoor 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x15,},//Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x15,},//Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x11,},//Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x11,},//Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x11,},//Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x13,},//Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x13,},//Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x13,},//Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x22,},//Indoor 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x23,},//Indoor 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x24,},//Indoor 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x25,},//Indoor 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x26,},//Indoor 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x28,},//Indoor 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x2b,},//Indoor 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x2d,},//Indoor 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x22,},//Indoor 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x23,},//Indoor 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x26,},//Indoor 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x26,},//Indoor 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x26,},//Indoor 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x26,},//Indoor 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x26,},//Indoor 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x26,},//Indoor 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x34,},//Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Indoor 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Indoor 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Indoor 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Indoor 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Indoor 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Indoor 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Indoor 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Indoor 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Indoor 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Indoor 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Indoor 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Indoor 1Ae3 add -{0x62, 0xe4,}, -{0x63, 0x13,},//Indoor 1Ae4 add -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Indoor 1070 Trans Func. 130618 Indoor transFuc Low 1.0->0.84 -{0x68, 0x71,}, -{0x69, 0x06,},//Indoor 1071 -{0x6a, 0x72,}, -{0x6b, 0x85,},//Indoor 1072 -{0x6c, 0x73,}, -{0x6d, 0x0a,},//Indoor 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Indoor 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Indoor 1075 -{0x72, 0x76,}, -{0x73, 0x36,},//Indoor 1076 -{0x74, 0x77,}, -{0x75, 0x47,},//Indoor 1077 -{0x76, 0x78,}, -{0x77, 0xae,},//Indoor 1078 -{0x78, 0x79,}, -{0x79, 0x50,},//Indoor 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Indoor 107a -{0x7c, 0x7b,}, -{0x7d, 0x50,},//Indoor 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Indoor 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Indoor 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Indoor 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Indoor 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x2a,},//Indoor 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x00,},//Indoor 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x8c,},//Indoor 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x02,},//Indoor 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x88,},//Indoor 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x03,},//Indoor 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Indoor 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,},//Dark1 113c //Pre Flat R1 DyL -{0x2c, 0x3d,}, -{0x2d, 0x53,},//Dark1 113d //Pre Flat R1 DyH -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark1 1140 //Pre Flat R1 STDL -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark1 1141 //Pre Flat R1 STDH -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark1 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark1 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark1 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark1 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark1 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark1 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark1 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark1 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark1 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark1 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark1 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark1 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark1 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark1 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark1 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark1 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark1 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark1 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark1 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark1 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark1 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark1 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark1 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark1 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark1 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark1 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark1 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark1 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark1 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark1 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark1 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark1 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark1 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark1 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark1 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark1 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark1 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark1 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark1 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark1 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark1 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark1 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark1 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark1 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark1 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark1 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark1 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark1 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark1 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark1 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark1 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark1 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark1 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark1 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark1 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark1 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark1 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark1 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark1 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark1 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark1 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark1 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark1 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark1 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark1 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark1 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark1 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark1 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark1 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark1 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark1 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark1 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark1 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark1 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark1 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark1 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark1 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark1 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark1 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark1 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark1 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark1 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark1 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark1 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark1 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark1 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark1 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark1 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark1 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark1 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark1 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark1 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark1 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark1 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark1 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark1 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark1 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark1 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark1 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark1 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark1 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark1 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark1 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark1 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark1 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark1 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark1 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark1 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark1 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark1 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark1 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark1 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark1 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark1 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark1 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark1 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark1 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark1 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark1 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark1 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark1 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark1 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark1 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark1 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark1 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark1 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark1 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark1 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark1 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark1 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark1 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark1 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark1 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark1 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark1 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark1 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark1 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark1 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark1 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark1 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark1 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark1 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark1 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark1 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark1 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark1 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark1 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark1 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark1 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark1 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark1 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark1 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark1 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark1 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark1 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark1 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark1 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark1 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark1 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark1 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark1 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark1 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark1 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark1 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark1 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark1 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark1 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark1 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark1 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark1 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark1 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark1 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark1 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark1 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark1 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark1 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark1 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark1 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark1 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark1 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark1 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark1 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark1 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark1 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark1 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark1 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark1 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark1 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark1 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark1 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark1 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark1 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark1 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark1 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark1 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark1 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark1 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark1 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark1 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark1 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark1 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark1 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark1 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark1 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark1 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark1 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark1 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark1 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark1 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark1 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark1 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark1 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x0a,},//Dark1 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark1 1072 -{0x6c, 0x73,}, -{0x6d, 0xcc,},//Dark1 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark1 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark1 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark1 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark1 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark1 1078 -{0x78, 0x79,}, -{0x79, 0x49,},//Dark1 1079 -{0x7a, 0x7a,}, -{0x7b, 0x99,},//Dark1 107a -{0x7c, 0x7b,}, -{0x7d, 0x49,},//Dark1 107b -{0x7e, 0x7c,}, -{0x7f, 0x99,},//Dark1 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark1 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark1 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark1 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark1 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark1 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark1 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark1 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark1 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x04,},//Dark1 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark1 1017 CSP option - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x04,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x44,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x44,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x1f,}, //Dark2 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0xff,}, //Dark2 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x00,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x53,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,},//Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x2c,},//Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,},//Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Dark2 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Dark2 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Dark2 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Dark2 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Dark2 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Dark2 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Dark2 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x10,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x10,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x10,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x10,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x10,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x10,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x10,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x10,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,},//Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x12,},//Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x0f,},//Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x0e,},//Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x0e,},//Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x0e,},//Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,},//Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x12,},//Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x12,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x12,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x0f,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x0f,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x12,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x12,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x12,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x12,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x12,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x0f,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x0f,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x12,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x12,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x12,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x12,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x12,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x0f,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x0f,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x12,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x12,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x12,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x12,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x12,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x1c,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x18,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x1d,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x20,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x20,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x20,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x12,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x12,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x13,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x18,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x18,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x18,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x18,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0xff,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x00,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x40,},//Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x2a,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x27,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x20,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0xff,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x21,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0xff,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,},//12 Page -{0x22, 0x12,}, -{0x23, 0x03,},//Dark2 1212 -{0x24, 0x33,}, -{0x25, 0x16,},//Dark2 1233 add 20130603 Skin_th -{0x26, 0x34,}, -{0x27, 0x90,},//Dark2 1234 add 20130603 Cyan_th -{0x28, 0x40,}, -{0x29, 0x37,},//Dark2 1240 add 720p -{0x2a, 0x70,}, -{0x2b, 0xbf,},//Dark2 1270 // Bayer Sharpness ENB add 720p -{0x2c, 0x71,}, -{0x2d, 0x1a,},//Dark2 1271 //Bayer HPF Gain -{0x2e, 0x72,}, -{0x2f, 0x16,},//Dark2 1272 //Bayer LPF Gain -{0x30, 0x77,}, -{0x31, 0x36,},//Dark2 1277 -{0x32, 0x78,}, -{0x33, 0x2f,},//Dark2 1278 -{0x34, 0x79,}, -{0x35, 0xff,},//Dark2 1279 -{0x36, 0x7a,}, -{0x37, 0x50,},//Dark2 127a -{0x38, 0x7b,}, -{0x39, 0x10,},//Dark2 127b -{0x3a, 0x7c,}, -{0x3b, 0x64,},//Dark2 127c //skin HPF gain -{0x3c, 0x7d,}, -{0x3d, 0x20,},//Dark2 127d -{0x3e, 0x7f,}, -{0x3f, 0x50,},//Dark2 127f -{0x40, 0x87,}, -{0x41, 0x3f,},//Dark2 1287 add 720p -{0x42, 0x88,}, -{0x43, 0x3f,},//Dark2 1288 add 720p -{0x44, 0x89,}, -{0x45, 0x3f,},//Dark2 1289 add 720p -{0x46, 0x8a,}, -{0x47, 0x3f,},//Dark2 128a add 720p -{0x48, 0x8b,}, -{0x49, 0x3f,},//Dark2 128b add 720p -{0x4a, 0x8c,}, -{0x4b, 0x3f,},//Dark2 128c add 720p -{0x4c, 0x8d,}, -{0x4d, 0x3f,},//Dark2 128d add 720p -{0x4e, 0x8e,}, -{0x4f, 0x3f,},//Dark2 128e add 720p -{0x50, 0x8f,}, -{0x51, 0x3f,},//Dark2 128f add 720p -{0x52, 0x90,}, -{0x53, 0x3f,},//Dark2 1290 add 720p -{0x54, 0x91,}, -{0x55, 0x3f,},//Dark2 1291 add 720p -{0x56, 0x92,}, -{0x57, 0x3f,},//Dark2 1292 add 720p -{0x58, 0x93,}, -{0x59, 0x3f,},//Dark2 1293 add 720p -{0x5a, 0x94,}, -{0x5b, 0x3f,},//Dark2 1294 add 720p -{0x5c, 0x95,}, -{0x5d, 0x3f,},//Dark2 1295 add 720p -{0x5e, 0x96,}, -{0x5f, 0x3f,},//Dark2 1296 add 720p -{0x60, 0xae,}, -{0x61, 0x7f,},//Dark2 12ae -{0x62, 0xaf,}, -{0x63, 0x00,},//Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x64, 0xc0,}, -{0x65, 0x23,},//Dark2 12c0 // CI-LPF ENB add 720p -{0x66, 0xc3,}, -{0x67, 0x3c,},//Dark2 12c3 add 720p -{0x68, 0xc4,}, -{0x69, 0x1a,},//Dark2 12c4 add 720p -{0x6a, 0xc5,}, -{0x6b, 0x0c,},//Dark2 12c5 add 720p -{0x6c, 0xc6,}, -{0x6d, 0x44,},//Dark2 12c6 -{0x6e, 0xc7,}, -{0x6f, 0x44,},//Dark2 12c7 -{0x70, 0xc8,}, -{0x71, 0x3e,},//Dark2 12c8 -{0x72, 0xd0,}, -{0x73, 0x08,},//Dark2 12d0 add 720p -{0x74, 0xd1,}, -{0x75, 0x10,},//Dark2 12d1 add 720p -{0x76, 0xd2,}, -{0x77, 0x18,},//Dark2 12d2 add 720p -{0x78, 0xd3,}, -{0x79, 0x20,},//Dark2 12d3 add 720p -{0x7a, 0xd4,}, -{0x7b, 0x30,},//Dark2 12d4 add 720p -{0x7c, 0xd5,}, -{0x7d, 0x60,},//Dark2 12d5 add 720p -{0x7e, 0xd6,}, -{0x7f, 0x80,},//Dark2 12d6 add 720p -{0x80, 0xd7,}, -{0x81, 0x38,},//Dark2 12d7 -{0x82, 0xd8,}, -{0x83, 0x30,},//Dark2 12d8 -{0x84, 0xd9,}, -{0x85, 0x2a,},//Dark2 12d9 -{0x86, 0xda,}, -{0x87, 0x2a,},//Dark2 12da -{0x88, 0xdb,}, -{0x89, 0x24,},//Dark2 12db -{0x8a, 0xdc,}, -{0x8b, 0x20,},//Dark2 12dc -{0x8c, 0xdd,}, -{0x8d, 0x1a,},//Dark2 12dd -{0x8e, 0xde,}, -{0x8f, 0x16,},//Dark2 12de -{0x90, 0xe0,}, -{0x91, 0x63,},//Dark2 12e0 // 20121120 ln dy -{0x92, 0xe1,}, -{0x93, 0xfc,},//Dark2 12e1 -{0x94, 0xe2,}, -{0x95, 0x02,},//Dark2 12e2 -{0x96, 0xe3,}, -{0x97, 0x10,},//Dark2 12e3 //PS LN graph Y1 -{0x98, 0xe4,}, -{0x99, 0x12,},//Dark2 12e4 //PS LN graph Y2 -{0x9a, 0xe5,}, -{0x9b, 0x1a,},//Dark2 12e5 //PS LN graph Y3 -{0x9c, 0xe6,}, -{0x9d, 0x1d,},//Dark2 12e6 //PS LN graph Y4 -{0x9e, 0xe7,}, -{0x9f, 0x1e,},//Dark2 12e7 //PS LN graph Y5 -{0xa0, 0xe8,}, -{0xa1, 0x1f,},//Dark2 12e8 //PS LN graph Y6 -{0xa2, 0xe9,}, -{0xa3, 0x10,},//Dark2 12e9 //PS DY graph Y1 -{0xa4, 0xea,}, -{0xa5, 0x12,},//Dark2 12ea //PS DY graph Y2 -{0xa6, 0xeb,}, -{0xa7, 0x18,},//Dark2 12eb //PS DY graph Y3 -{0xa8, 0xec,}, -{0xa9, 0x1c,},//Dark2 12ec //PS DY graph Y4 -{0xaa, 0xed,}, -{0xab, 0x1e,},//Dark2 12ed //PS DY graph Y5 -{0xac, 0xee,}, -{0xad, 0x1f,},//Dark2 12ee //PS DY graph Y6 -{0xae, 0xf0,}, -{0xaf, 0x00,},//Dark2 12f0 -{0xb0, 0xf1,}, -{0xb1, 0x2a,},//Dark2 12f1 -{0xb2, 0xf2,}, -{0xb3, 0x32,},//Dark2 12f2 -{0xb4, 0x03,}, -{0xb5, 0x13,},//13 Page -{0xb6, 0x10,}, -{0xb7, 0x81,},//Dark2 1310 //Y-NR ENB add 720p -{0xb8, 0x30,}, -{0xb9, 0x20,},//Dark2 1330 -{0xba, 0x31,}, -{0xbb, 0x20,},//Dark2 1331 -{0xbc, 0x32,}, -{0xbd, 0x20,},//Dark2 1332 -{0xbe, 0x33,}, -{0xbf, 0x20,},//Dark2 1333 -{0xc0, 0x34,}, -{0xc1, 0x20,},//Dark2 1334 -{0xc2, 0x35,}, -{0xc3, 0x20,},//Dark2 1335 -{0xc4, 0x36,}, -{0xc5, 0x20,},//Dark2 1336 -{0xc6, 0x37,}, -{0xc7, 0x20,},//Dark2 1337 -{0xc8, 0x38,}, -{0xc9, 0x02,},//Dark2 1338 -{0xca, 0x40,}, -{0xcb, 0x18,},//Dark2 1340 -{0xcc, 0x41,}, -{0xcd, 0x36,},//Dark2 1341 -{0xce, 0x42,}, -{0xcf, 0x62,},//Dark2 1342 -{0xd0, 0x43,}, -{0xd1, 0x63,},//Dark2 1343 -{0xd2, 0x44,}, -{0xd3, 0xff,},//Dark2 1344 -{0xd4, 0x45,}, -{0xd5, 0x04,},//Dark2 1345 -{0xd6, 0x46,}, -{0xd7, 0x45,},//Dark2 1346 -{0xd8, 0x47,}, -{0xd9, 0x05,},//Dark2 1347 -{0xda, 0x48,}, -{0xdb, 0x65,},//Dark2 1348 -{0xdc, 0x49,}, -{0xdd, 0x02,},//Dark2 1349 -{0xde, 0x4a,}, -{0xdf, 0x22,},//Dark2 134a -{0xe0, 0x4b,}, -{0xe1, 0x06,},//Dark2 134b -{0xe2, 0x4c,}, -{0xe3, 0x30,},//Dark2 134c -{0xe4, 0x83,}, -{0xe5, 0x08,},//Dark2 1383 -{0xe6, 0x84,}, -{0xe7, 0x0a,},//Dark2 1384 -{0xe8, 0xb7,}, -{0xe9, 0xfa,},//Dark2 13b7 -{0xea, 0xb8,}, -{0xeb, 0x77,},//Dark2 13b8 -{0xec, 0xb9,}, -{0xed, 0xfe,},//Dark2 13b9 //20121217 DC R1,2 CR -{0xee, 0xba,}, -{0xef, 0xca,},//Dark2 13ba //20121217 DC R3,4 CR -{0xf0, 0xbd,}, -{0xf1, 0x78,},//Dark2 13bd //20121121 c-filter LumHL DC rate -{0xf2, 0xc5,}, -{0xf3, 0x01,},//Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xf4, 0xc6,}, -{0xf5, 0x22,},//Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf6, 0xc7,}, -{0xf7, 0x33,},//Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf8, 0x03,}, -{0xf9, 0x14,},//14 page -{0xfa, 0x10,}, -{0xfb, 0xb3,},//Dark2 1410 -{0xfc, 0x11,}, -{0xfd, 0x98,},//Dark2 1411 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x12,}, -{0x11, 0x10,},//Dark2 1412 -{0x12, 0x13,}, -{0x13, 0x03,},//Dark2 1413 -{0x14, 0x14,}, -{0x15, 0x23,},//Dark2 1414 //YC2D Low Gain B[5:0] -{0x16, 0x15,}, -{0x17, 0x7b,},//Dark2 1415 // Y Hi filter mask 1/16 -{0x18, 0x16,}, -{0x19, 0x10,},//Dark2 1416 //YC2D Hi Gain B[5:0] -{0x1a, 0x17,}, -{0x1b, 0x40,},//Dark2 1417 -{0x1c, 0x18,}, -{0x1d, 0x0c,},//Dark2 1418 -{0x1e, 0x19,}, -{0x1f, 0x0c,},//Dark2 1419 -{0x20, 0x1a,}, -{0x21, 0x24,},//Dark2 141a //YC2D Post STD gain Pos -{0x22, 0x1b,}, -{0x23, 0x24,},//Dark2 141b //YC2D Post STD gain Neg -{0x24, 0x27,}, -{0x25, 0x14,},//Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x26, 0x28,}, -{0x27, 0x14,},//Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x28, 0x29,}, -{0x29, 0x14,},//Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x2a, 0x2a,}, -{0x2b, 0x14,},//Dark2 142a //YC2D SP Lum Gain Pos4 -{0x2c, 0x2b,}, -{0x2d, 0x14,},//Dark2 142b //YC2D SP Lum Gain Pos5 -{0x2e, 0x2c,}, -{0x2f, 0x14,},//Dark2 142c //YC2D SP Lum Gain Pos6 -{0x30, 0x2d,}, -{0x31, 0x14,},//Dark2 142d //YC2D SP Lum Gain Pos7 -{0x32, 0x2e,}, -{0x33, 0x14,},//Dark2 142e //YC2D SP Lum Gain Pos8 -{0x34, 0x30,}, -{0x35, 0x12,},//Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x36, 0x31,}, -{0x37, 0x12,},//Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x38, 0x32,}, -{0x39, 0x12,},//Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x3a, 0x33,}, -{0x3b, 0x12,},//Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x3c, 0x34,}, -{0x3d, 0x12,},//Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x3e, 0x35,}, -{0x3f, 0x12,},//Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x40, 0x36,}, -{0x41, 0x12,},//Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x42, 0x37,}, -{0x43, 0x12,},//Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x44, 0x47,}, -{0x45, 0x14,},//Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x46, 0x48,}, -{0x47, 0x14,},//Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x48, 0x49,}, -{0x49, 0x14,},//Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x4a, 0x4a,}, -{0x4b, 0x14,},//Dark2 144a //YC2D SP Dy Gain Pos4 -{0x4c, 0x4b,}, -{0x4d, 0x14,},//Dark2 144b //YC2D SP Dy Gain Pos5 -{0x4e, 0x4c,}, -{0x4f, 0x14,},//Dark2 144c //YC2D SP Dy Gain Pos6 -{0x50, 0x4d,}, -{0x51, 0x14,},//Dark2 144d //YC2D SP Dy Gain Pos7 -{0x52, 0x4e,}, -{0x53, 0x14,},//Dark2 144e //YC2D SP Dy Gain Pos8 -{0x54, 0x50,}, -{0x55, 0x12,},//Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x56, 0x51,}, -{0x57, 0x12,},//Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x58, 0x52,}, -{0x59, 0x12,},//Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x5a, 0x53,}, -{0x5b, 0x12,},//Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x5c, 0x54,}, -{0x5d, 0x12,},//Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x5e, 0x55,}, -{0x5f, 0x12,},//Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x60, 0x56,}, -{0x61, 0x12,},//Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x62, 0x57,}, -{0x63, 0x12,},//Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x64, 0x67,}, -{0x65, 0x20,},//Dark2 1467 //YC2D SP Edge Gain1 -{0x66, 0x68,}, -{0x67, 0x20,},//Dark2 1468 //YC2D SP Edge Gain2 -{0x68, 0x69,}, -{0x69, 0x20,},//Dark2 1469 //YC2D SP Edge Gain3 -{0x6a, 0x6a,}, -{0x6b, 0x20,},//Dark2 146a //YC2D SP Edge Gain4 -{0x6c, 0x6b,}, -{0x6d, 0x20,},//Dark2 146b //YC2D SP Edge Gain5 -{0x6e, 0x6c,}, -{0x6f, 0x20,},//Dark2 146c //YC2D SP Edge Gain6 -{0x70, 0x6d,}, -{0x71, 0x20,},//Dark2 146d //YC2D SP Edge Gain7 -{0x72, 0x6e,}, -{0x73, 0x20,},//Dark2 146e //YC2D SP Edge Gain8 -{0x74, 0x87,}, -{0x75, 0x2a,},//Dark2 1487 //YC2D SP STD Gain1 -{0x76, 0x88,}, -{0x77, 0x2a,},//Dark2 1488 //YC2D SP STD Gain2 -{0x78, 0x89,}, -{0x79, 0x2a,},//Dark2 1489 //YC2D SP STD Gain3 -{0x7a, 0x8a,}, -{0x7b, 0x2a,},//Dark2 148a //YC2D SP STD Gain4 -{0x7c, 0x8b,}, -{0x7d, 0x2a,},//Dark2 148b //YC2D SP STD Gain5 -{0x7e, 0x8c,}, -{0x7f, 0x1a,},//Dark2 148c //YC2D SP STD Gain6 -{0x80, 0x8d,}, -{0x81, 0x1a,},//Dark2 148d //YC2D SP STD Gain7 -{0x82, 0x8e,}, -{0x83, 0x1a,},//Dark2 148e //YC2D SP STD Gain8 -{0x84, 0x97,}, -{0x85, 0x3f,},//Dark2 1497 add 720p -{0x86, 0x98,}, -{0x87, 0x3f,},//Dark2 1498 add 720p -{0x88, 0x99,}, -{0x89, 0x3f,},//Dark2 1499 add 720p -{0x8a, 0x9a,}, -{0x8b, 0x3f,},//Dark2 149a add 720p -{0x8c, 0x9b,}, -{0x8d, 0x3f,},//Dark2 149b add 720p -{0x8e, 0xa0,}, -{0x8f, 0x3f,},//Dark2 14a0 add 720p -{0x90, 0xa1,}, -{0x91, 0x3f,},//Dark2 14a1 add 720p -{0x92, 0xa2,}, -{0x93, 0x3f,},//Dark2 14a2 add 720p -{0x94, 0xa3,}, -{0x95, 0x3f,},//Dark2 14a3 add 720p -{0x96, 0xa4,}, -{0x97, 0x3f,},//Dark2 14a4 add 720p -{0x98, 0xc9,}, -{0x99, 0x13,},//Dark2 14c9 -{0x9a, 0xca,}, -{0x9b, 0x27,},//Dark2 14ca -{0x9c, 0x03,}, -{0x9d, 0x1a,},//1A page -{0x9e, 0x10,}, -{0x9f, 0x15,},//Dark2 1A10 add 720p -{0xa0, 0x18,}, -{0xa1, 0x3f,},//Dark2 1A18 -{0xa2, 0x19,}, -{0xa3, 0x3f,},//Dark2 1A19 -{0xa4, 0x1a,}, -{0xa5, 0x2a,},//Dark2 1A1a -{0xa6, 0x1b,}, -{0xa7, 0x27,},//Dark2 1A1b -{0xa8, 0x1c,}, -{0xa9, 0x23,},//Dark2 1A1c -{0xaa, 0x1d,}, -{0xab, 0x23,},//Dark2 1A1d -{0xac, 0x1e,}, -{0xad, 0x23,},//Dark2 1A1e -{0xae, 0x1f,}, -{0xaf, 0x23,},//Dark2 1A1f -{0xb0, 0x20,}, -{0xb1, 0xe7,},//Dark2 1A20 add 720p -{0xb2, 0x2f,}, -{0xb3, 0xf1,},//Dark2 1A2f add 720p -{0xb4, 0x32,}, -{0xb5, 0x87,},//Dark2 1A32 add 720p -{0xb6, 0x34,}, -{0xb7, 0xd0,},//Dark2 1A34 //RGB High Gain B[5:0] -{0xb8, 0x35,}, -{0xb9, 0x11,},//Dark2 1A35 //RGB Low Gain B[5:0] -{0xba, 0x36,}, -{0xbb, 0x00,},//Dark2 1A36 -{0xbc, 0x37,}, -{0xbd, 0x40,},//Dark2 1A37 -{0xbe, 0x38,}, -{0xbf, 0xff,},//Dark2 1A38 -{0xc0, 0x39,}, -{0xc1, 0x11,},//Dark2 1A39 //RGB Flat R2_Lum L -{0xc2, 0x3a,}, -{0xc3, 0x3f,},//Dark2 1A3a -{0xc4, 0x3b,}, -{0xc5, 0x00,},//Dark2 1A3b -{0xc6, 0x3c,}, -{0xc7, 0x4c,},//Dark2 1A3c -{0xc8, 0x3d,}, -{0xc9, 0x00,},//Dark2 1A3d -{0xca, 0x3e,}, -{0xcb, 0x13,},//Dark2 1A3e -{0xcc, 0x3f,}, -{0xcd, 0x00,},//Dark2 1A3f -{0xce, 0x40,}, -{0xcf, 0x2a,},//Dark2 1A40 -{0xd0, 0x41,}, -{0xd1, 0x00,},//Dark2 1A41 -{0xd2, 0x42,}, -{0xd3, 0x17,},//Dark2 1A42 -{0xd4, 0x43,}, -{0xd5, 0x2c,},//Dark2 1A43 -{0xd6, 0x4d,}, -{0xd7, 0x08,},//Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd8, 0x4e,}, -{0xd9, 0x0a,},//Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xda, 0x4f,}, -{0xdb, 0x10,},//Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xdc, 0x50,}, -{0xdd, 0x12,},//Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xde, 0x51,}, -{0xdf, 0x12,},//Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xe0, 0x52,}, -{0xe1, 0x12,},//Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xe2, 0x53,}, -{0xe3, 0x12,},//Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xe4, 0x54,}, -{0xe5, 0x12,},//Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe6, 0x55,}, -{0xe7, 0x12,},//Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe8, 0x56,}, -{0xe9, 0x12,},//Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xea, 0x57,}, -{0xeb, 0x12,},//Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xec, 0x58,}, -{0xed, 0x12,},//Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xee, 0x59,}, -{0xef, 0x12,},//Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xf0, 0x5a,}, -{0xf1, 0x12,},//Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xf2, 0x5b,}, -{0xf3, 0x12,},//Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xf4, 0x5c,}, -{0xf5, 0x12,},//Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf6, 0x65,}, -{0xf7, 0x12,},//Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf8, 0x66,}, -{0xf9, 0x12,},//Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xfa, 0x67,}, -{0xfb, 0x12,},//Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xfc, 0x68,}, -{0xfd, 0x12,},//Dark2 1A68 //RGB SP Dy Gain Neg4 - -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x69,}, -{0x11, 0x12,},//Dark2 1A69 //RGB SP Dy Gain Neg5 -{0x12, 0x6a,}, -{0x13, 0x12,},//Dark2 1A6a //RGB SP Dy Gain Neg6 -{0x14, 0x6b,}, -{0x15, 0x12,},//Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x16, 0x6c,}, -{0x17, 0x12,},//Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x18, 0x6d,}, -{0x19, 0x12,},//Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x1a, 0x6e,}, -{0x1b, 0x12,},//Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x1c, 0x6f,}, -{0x1d, 0x12,},//Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x1e, 0x70,}, -{0x1f, 0x12,},//Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x20, 0x71,}, -{0x21, 0x12,},//Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x22, 0x72,}, -{0x23, 0x12,},//Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x24, 0x73,}, -{0x25, 0x12,},//Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x26, 0x74,}, -{0x27, 0x12,},//Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x28, 0x7d,}, -{0x29, 0x20,},//Dark2 1A7d //RGB SP Edge Gain1 -{0x2a, 0x7e,}, -{0x2b, 0x20,},//Dark2 1A7e //RGB SP Edge Gain2 -{0x2c, 0x7f,}, -{0x2d, 0x20,},//Dark2 1A7f //RGB SP Edge Gain3 -{0x2e, 0x80,}, -{0x2f, 0x20,},//Dark2 1A80 //RGB SP Edge Gain4 -{0x30, 0x81,}, -{0x31, 0x20,},//Dark2 1A81 //RGB SP Edge Gain5 -{0x32, 0x82,}, -{0x33, 0x20,},//Dark2 1A82 //RGB SP Edge Gain6 -{0x34, 0x83,}, -{0x35, 0x20,},//Dark2 1A83 //RGB SP Edge Gain7 -{0x36, 0x84,}, -{0x37, 0x20,},//Dark2 1A84 //RGB SP Edge Gain8 -{0x38, 0x9e,}, -{0x39, 0x1a,},//Dark2 1A9e //RGB SP STD Gain1 -{0x3a, 0x9f,}, -{0x3b, 0x1a,},//Dark2 1A9f //RGB SP STD Gain2 -{0x3c, 0xa0,}, -{0x3d, 0x1a,},//Dark2 1Aa0 //RGB SP STD Gain3 -{0x3e, 0xa1,}, -{0x3f, 0x1a,},//Dark2 1Aa1 //RGB SP STD Gain4 -{0x40, 0xa2,}, -{0x41, 0x1a,},//Dark2 1Aa2 //RGB SP STD Gain5 -{0x42, 0xa3,}, -{0x43, 0x1a,},//Dark2 1Aa3 //RGB SP STD Gain6 -{0x44, 0xa4,}, -{0x45, 0x1a,},//Dark2 1Aa4 //RGB SP STD Gain7 -{0x46, 0xa5,}, -{0x47, 0x1a,},//Dark2 1Aa5 //RGB SP STD Gain8 -{0x48, 0xa6,}, -{0x49, 0x36,},//Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x4a, 0xa7,}, -{0x4b, 0x08,},//Dark2 1Aa7 add 720p -{0x4c, 0xa8,}, -{0x4d, 0x08,},//Dark2 1Aa8 add 720p -{0x4e, 0xa9,}, -{0x4f, 0x08,},//Dark2 1Aa9 add 720p -{0x50, 0xaa,}, -{0x51, 0x08,},//Dark2 1Aaa add 720p -{0x52, 0xab,}, -{0x53, 0x08,},//Dark2 1Aab add 720p -{0x54, 0xaf,}, -{0x55, 0x3f,},//Dark2 1Aaf add 720p -{0x56, 0xb0,}, -{0x57, 0x3f,},//Dark2 1Ab0 add 720p -{0x58, 0xb1,}, -{0x59, 0x3f,},//Dark2 1Ab1 add 720p -{0x5a, 0xb2,}, -{0x5b, 0x3f,},//Dark2 1Ab2 add 720p -{0x5c, 0xb3,}, -{0x5d, 0x3f,},//Dark2 1Ab3 add 720p -{0x5e, 0xca,}, -{0x5f, 0x00,},//Dark2 1Aca -{0x60, 0xe3,}, -{0x61, 0x13,},//Dark2 1Ae3 add 720p -{0x62, 0xe4,}, -{0x63, 0x13,},//Dark2 1Ae4 add 720p -{0x64, 0x03,}, -{0x65, 0x10,},//10 page -{0x66, 0x70,}, -{0x67, 0x0c,},//Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x68, 0x71,}, -{0x69, 0x06,},//Dark2 1071 -{0x6a, 0x72,}, -{0x6b, 0xbe,},//Dark2 1072 -{0x6c, 0x73,}, -{0x6d, 0x99,},//Dark2 1073 -{0x6e, 0x74,}, -{0x6f, 0x00,},//Dark2 1074 -{0x70, 0x75,}, -{0x71, 0x00,},//Dark2 1075 -{0x72, 0x76,}, -{0x73, 0x20,},//Dark2 1076 -{0x74, 0x77,}, -{0x75, 0x33,},//Dark2 1077 -{0x76, 0x78,}, -{0x77, 0x33,},//Dark2 1078 -{0x78, 0x79,}, -{0x79, 0x40,},//Dark2 1079 -{0x7a, 0x7a,}, -{0x7b, 0x00,},//Dark2 107a -{0x7c, 0x7b,}, -{0x7d, 0x40,},//Dark2 107b -{0x7e, 0x7c,}, -{0x7f, 0x00,},//Dark2 107c -{0x80, 0x7d,}, -{0x81, 0x07,},//Dark2 107d -{0x82, 0x7e,}, -{0x83, 0x0f,},//Dark2 107e -{0x84, 0x7f,}, -{0x85, 0x1e,},//Dark2 107f -{0x86, 0x03,}, -{0x87, 0x02,},// 2 page -{0x88, 0x23,}, -{0x89, 0x10,},//Dark2 0223 (for sun-spot) // normal 3c -{0x8a, 0x03,}, -{0x8b, 0x03,},// 3 page -{0x8c, 0x1a,}, -{0x8d, 0x06,},//Dark2 031a (for sun-spot) -{0x8e, 0x1b,}, -{0x8f, 0x7c,},//Dark2 031b (for sun-spot) -{0x90, 0x1c,}, -{0x91, 0x00,},//Dark2 031c (for sun-spot) -{0x92, 0x1d,}, -{0x93, 0x50,},//Dark2 031d (for sun-spot) -{0x94, 0x03,}, -{0x95, 0x11,},// 11 page -{0x96, 0xf0,}, -{0x97, 0x05,},//Dark2 11f0 (for af bug) -{0x98, 0x03,}, -{0x99, 0x10,},// 10 page -{0x9a, 0x17,}, -{0x9b, 0x40,},//Dark2 1017 CSP option - - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 54MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0f,}, // tlpx_time_l_dn -{0x1e, 0x08,}, // hs_zero_time -{0x1f, 0x0a,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x0f,}, // clk_zero_time -{0x33, 0x0b,}, // clk_post_time -{0x34, 0x03,}, // clk_prepare_time -{0x35, 0x04,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x06,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x768[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set //XY flip - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x768 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x768_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x768 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x576[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x576 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x04,}, //width -{0xa3, 0x00,}, -{0xa4, 0x02,}, //height -{0xa5, 0x40,}, -{0xa6, 0x00,}, //fw scaler col start -{0xa7, 0x00,}, //fw scaler row start - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_1024x576_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 1024x576 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x04,}, //width -{0xa3, 0x00,}, -{0xa4, 0x02,}, //height -{0xa5, 0x40,}, -{0xa6, 0x00,}, //fw scaler col start -{0xa7, 0x00,}, //fw scaler row start - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x08,}, // l_pkt_wc_h // Pre = 1024 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_640x480[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x04,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 640_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x02,}, //width -{0xa3, 0x80,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x05,}, // l_pkt_wc_h // Pre = 640 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Enterpreview_640x480_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x41,}, // binning + prev1 -{0x17, 0x00,}, // ISP Divider2 1/1 -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x00,}, // preview col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Preview 0410 -{0x12, 0x02,}, //Preview1 0410 - -/////////////////////////////////////////// -// 19 Page Scalor off -/////////////////////////////////////////// -{0x03, 0x19,}, //Scaler Off -{0x10, 0x00,}, -{0x14, 0x00,}, //sawtooth off - -{0x03, 0xc0,}, //Scaler Off -{0xa0, 0x00,}, -{0xa6, 0x00,}, -{0xa7, 0x00,}, - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Low -{0x03, 0x12,}, -{0x70, 0xbE,}, //Bit[0]=Low - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 640_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x02,}, //width -{0xa3, 0x80,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x05,}, // l_pkt_wc_h // Pre = 640 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x28,}, // Preview // sleep off - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Capture_2048_1536[] ={ -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set -{0xff, 0x0c,}, // 120ms - -/////////////////////////////////////////// -// D9 Page(Capture function) -/////////////////////////////////////////// -{0x03, 0xd9,}, -{0x1c, 0x04,}, // Capture Pll Div (CAP_OPCLK_DIV / 2.0) -/////////////////////////////////////////// -// 00 Page - -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x00,}, // full -{0x17, 0x01,}, // ISP Divider2 1/2 -{0x20, 0x00,}, -{0x21, 0x0a,}, //XY Flip -{0x22, 0x00,}, -{0x23, 0x14,}, //XY Flip - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x93,}, //Full XY flip 1219 -{0x12, 0x82,}, //Full XY flip 1219 - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Hi -{0x03, 0x12,}, -{0x70, 0xbF,}, //Bit[0]=Hi - -//------------------------------------------------// -//TAP Capture Setting -//------------------------------------------------// -{0x03, 0xc0,}, -{0x98, 0x00,}, -{0x99, 0x10,}, -{0x9a, 0x72,}, -{0x9b, 0xf0,}, // exp_band_100 * 2 -{0x9c, 0x00,}, -{0x9d, 0x0d,}, -{0x9e, 0xb2,}, -{0x9f, 0x40,}, // exp_band_120 * 2 - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x00,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x29,}, // Capture On - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x92,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call -//------------------------------------------------// - -/////////////////////////////////////////// -// Scaler Off -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 -{0x30, 0x10,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, - -{0xff, 0x01,}, //delay 10ms -}; - -static struct msm_camera_i2c_reg_conf sr352_Capture_2048_1536_01[] ={ -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set -{0xff, 0x0c,}, // 120ms - -/////////////////////////////////////////// -// D9 Page(Capture function) -/////////////////////////////////////////// -{0x03, 0xd9,}, -{0x1c, 0x04,}, // Capture Pll Div (CAP_OPCLK_DIV / 2.0) -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x10, 0x00,}, // full -{0x17, 0x01,}, // ISP Divider2 1/2 -{0x20, 0x00,}, -{0x21, 0x08,}, // row start set -{0x22, 0x00,}, -{0x23, 0x01,}, // col start set - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x11, 0x11,}, //Full & HD(crop) 0410 -{0x12, 0x00,}, //Full & HD(crop) 0410 - -//--------------------------------------// -//PWR margin setting -//--------------------------------------// -{0x03, 0x11,}, -{0x10, 0x1F,}, //Bit[4]=Hi -{0x03, 0x12,}, -{0x70, 0xbF,}, //Bit[0]=Hi - -//------------------------------------------------// -//TAP Capture Setting -//------------------------------------------------// -{0x03, 0xc0,}, -{0x98, 0x00,}, -{0x99, 0x10,}, -{0x9a, 0x72,}, -{0x9b, 0xf0,}, // exp_band_100 * 2 -{0x9c, 0x00,}, -{0x9d, 0x0d,}, -{0x9e, 0xb2,}, -{0x9f, 0x40,}, // exp_band_120 * 2 - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x00,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call - -{0xff, 0x01,}, //delay 10ms - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x26,}, -{0x30, 0x29,}, // Capture On - -{0x03, 0x00,}, -{0x01, 0x00,}, // sleep off - -{0x03, 0x26,}, -{0x63, 0xf8,}, // set custom call address (high) -{0x64, 0x92,}, // set custom call address (low) - -{0x03, 0xc0,}, -{0x66, 0x01,}, // jump custom call -//------------------------------------------------// - -/////////////////////////////////////////// -// Scaler Off -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x00,}, //sawtooth off - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 -{0x30, 0x10,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, -}; - -#if 0 -static struct msm_camera_i2c_reg_conf sr352_preview_176_144[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 176_144 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x63,}, //sawtooth on 320_240 176_144 pre filter //Bit[5] on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x00,}, -{0xa3, 0xb0,}, -{0xa4, 0x00,}, -{0xa5, 0x90,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x01,}, // l_pkt_wc_h // Pre = 176 * 2 (YUV) -{0x31, 0x60,}, // l_pkt_wc_l -//------------------------------------// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; -#endif - -static struct msm_camera_i2c_reg_conf sr352_preview_320_240[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 320_240 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x43,}, //sawtooth on 320_240 176_144 pre filter - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x01,}, //width -{0xa3, 0x40,}, -{0xa4, 0x00,}, //height -{0xa5, 0xf0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x02,}, // l_pkt_wc_h // Pre = 320 * 2 (YUV) -{0x31, 0x80,}, // l_pkt_wc_l -//------------------------------------// - - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_preview_800_480[] ={ -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep On - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////// -// Scaler 800_480 -/////////////////////////////////////////// -{0x03, 0x19,}, -{0x10, 0x00,}, //hw scaler off -{0x14, 0x03,}, //sawtooth on - -//Scaler -{0x03, 0xc0,}, -{0xa0, 0x00,}, //fw scaler off -{0xa2, 0x03,}, //width -{0xa3, 0x20,}, -{0xa4, 0x01,}, //height -{0xa5, 0xe0,}, - -{0xa1, 0x00,}, //zoom step -{0xa0, 0xc0,}, //fw scaler on - -{0x03, 0x19,}, -{0x10, 0x07,}, //hw scaler on - -/////////////////////////////////////////// -// 05 Page MIPI Size -/////////////////////////////////////////// -{0x03, 0x05,}, // Page05 - -{0x30, 0x06,}, // l_pkt_wc_h // Pre = 800 * 2 (YUV) -{0x31, 0x40,}, // l_pkt_wc_l -//------------------------------------// - - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - -/*===========================================*/ -/*CAMERA_RECORDING WITH 30fps */ -/*============================================*/ - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_HD[] = { - -/////////////////////////////////////////////////////////////////////////////// -// HD Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x25,}, //mode_pll1 26mhz / (5+1) = 4.33mhz -{0x08, 0x50,}, //mode_pll2 isp clk = 86.6Mhz; -{0x09, 0x81,}, //mode_pll3 // MIPI 4x div 1/1 // isp clk div = 1/4 -{0x07, 0xA5,}, -{0x07, 0xA5,}, -{0x07, 0xA5,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, //mode_pll4 for mipi mode -{0x0A, 0xe0,}, //mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, //SSD sram clock inv on -{0x33, 0x45,}, //bit[6]:C-NR DC °ü·Ã ¼³Á¤ - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 86mhz -{0x40, 0x2f,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x2f,}, // otp cfg 3 -{0x43, 0x2f,}, // otp cfg 4 -{0x44, 0x2f,}, // otp cfg 5 -{0x45, 0x22,}, // otp cfg 6 -{0x46, 0x5a,}, // otp cfg 7 -{0x47, 0x09,}, // otp cfg 8 -{0x48, 0x02,}, // otp cfg 9 -{0x49, 0xb8,}, // otp cfg 10 -{0x4A, 0x2f,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x00,}, // Full size -{0x11, 0x83,}, // Fixed mode off -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1D, 0x0D,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x08,}, // preview col start set -{0x24, 0x02,}, -{0x25, 0xd0,}, // height 720 -{0x26, 0x05,}, -{0x27, 0x00,}, // width 1280 - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x07,}, // one_line = 1850 -{0x4d, 0x3a,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, // Vsync H -{0x53, 0x14,}, // Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x01,}, // pixel_row_start for 720p crop mode -{0x81, 0x9e,}, // pwin_row_start = 414 -{0x82, 0x02,}, // pwin_row_height = 738 -{0x83, 0xe2,}, -{0x84, 0x01,}, // pwin_col_start = 384 -{0x85, 0x80,}, -{0x86, 0x05,}, // pwin_col_width = 1312 -{0x87, 0x20,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ´©Àû for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, //20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, - -{0xa0, 0x01,}, -{0xa1, 0x7c,}, -{0xa2, 0x03,}, -{0xa3, 0x4d,}, -{0xa4, 0x03,}, -{0xa5, 0xb0,}, -{0xa6, 0x06,}, -{0xa7, 0xf2,}, -{0xa8, 0x01,}, -{0xa9, 0x4f,}, -{0xaa, 0x02,}, -{0xab, 0x23,}, -{0xac, 0x02,}, -{0xad, 0x74,}, -{0xae, 0x04,}, -{0xaf, 0x17,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, - -{0x42, 0x00,}, -{0x43, 0x46,}, -{0x46, 0x00,}, -{0x47, 0x74,}, -{0x4a, 0x00,}, -{0x4b, 0x44,}, -{0x4e, 0x00,}, -{0x4f, 0x44,}, - -{0x52, 0x00,}, -{0x53, 0x20,}, -{0x56, 0x00,}, -{0x57, 0x20,}, -{0x5A, 0x00,}, -{0x5b, 0x20,}, -{0x6A, 0x00,}, -{0x6B, 0x6f,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x40,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x3b,}, -{0x7A, 0x06,}, -{0x7B, 0x45,}, -{0x7C, 0x06,}, -{0x7D, 0x3b,}, -{0x7E, 0x06,}, -{0x7F, 0x45,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x3b,}, -{0x86, 0x06,}, -{0x87, 0x45,}, -{0x88, 0x06,}, -{0x89, 0x3b,}, -{0x8A, 0x06,}, -{0x8B, 0x45,}, -{0x92, 0x06,}, // sx -{0x93, 0x31,}, -{0x96, 0x06,}, -{0x97, 0x31,}, -{0x98, 0x06,}, // sxb -{0x99, 0x31,}, -{0x9c, 0x06,}, -{0x9d, 0x31,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x38,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ÀÌÈÄ¿¡ MCU¸¦ reset ½ÃÅ´. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x93,}, //Preview1 XY flip 1219 -{0x12, 0x82,}, //Preview1 XY flip 1219 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x06,}, //gap y enb, gap x enb for 720p - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -{0x30, 0x8a,}, //gap x for 720p -{0x31, 0x68,}, //gap y for 720p -{0x36, 0x6c,}, //lsc_win_x for 720p -{0x37, 0x64,}, //lsc_win_y for 720p - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x00,}, //Y OFS Disable -{0x17, 0x00,}, //20121127 CSP option -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x04,}, //16_235 range scale down on -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,}, //D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0xff,}, //pga_dark1_hi -{0xf3, 0xfc,}, //pga_dark_lo -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0xff,}, //C-mask near STD TH -{0x88, 0xff,}, //C-mask middle STD TH -{0x89, 0xff,}, //C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,}, //Yc2d_ee_color_gain1 -{0x78, 0x20,}, //Yc2d_ee_color_gain2 -{0x79, 0x20,}, //Yc2d_ee_color_gain3 -{0x7a, 0x1c,}, //Yc2d_ee_color_gain4 -{0x7b, 0x1b,}, //Yc2d_ee_color_gain5 -{0x7c, 0x1a,}, //Yc2d_ee_color_gain6 -{0x7d, 0x19,}, //Yc2d_ee_color_gain7 -{0x7e, 0x18,}, //Yc2d_ee_color_gain8 - -{0xc0, 0x00,}, //Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,}, //Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,}, //Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,}, //Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,}, //Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xD0, 0x01,}, //Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8D, 0x20,}, //RGB-Color_Gain1 -{0x8E, 0x20,}, //RGB-Color_Gain2 -{0x8F, 0x20,}, //RGB-Color_Gain3 -{0x90, 0x20,}, //RGB-Color_Gain4 -{0x91, 0x20,}, //RGB-Color_Gain5 - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0xe0,}, //Dgain off 20 //Dgain enb_2x e0 - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x07,}, -{0x38, 0x3a,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x71, 0x70,}, //DG MAX //D gain 1x = 80 = x 1 // D gain 2x = 40 = x 1 -{0x72, 0x40,}, //DG MIN - -{0x80, 0x3a,}, //Y Target - -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x75,}, //Flicker Line 100 -{0x15, 0x61,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x15, 0x02,}, //720p mode on -{0x16, 0x50,}, //SSD B gain int gain 1.5x -{0x73, 0x0C,}, //start x in 720p -{0x74, 0x08,}, //start y in 720p -{0x75, 0x64,}, //width in 720p -{0x76, 0x4A,}, //height in 720p - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -//43.3366Mhz = 0x02954398 -{0x03, 0xC0,}, -{0x14, 0x02,}, -{0x15, 0x95,}, -{0x16, 0x43,}, -{0x17, 0x98,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x11,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, - -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,}, //Low In Th -{0x56, 0x52,}, //Low Out Th -{0x57, 0x60,}, //High Out Th -{0x58, 0x70,}, //High In Th - -{0x62, 0xd8,}, //Out weight //ca->d8 -{0x63, 0xa6,}, //Indoor weight -{0x64, 0x88,}, //Dark weight -{0x65, 0xe8,}, //Low weight -{0x66, 0xa6,}, //High weight - -{0x31, 0x01,}, //Color ratio reset -{0x30, 0x98,}, //Color ratio on - -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x32,}, // DYOFS_Ratio -{0x1c, 0x00,}, // DYOFS_Limit //10 - -{0x1d, 0x00,}, //EV Th OutEnd : 120fps AG 1x DG 1x -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,}, //EV Th OutStr : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x03,}, -{0x27, 0x70,}, -{0x28, 0xf0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x05,}, -{0x2b, 0x57,}, -{0x2c, 0x30,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x06,}, -{0x2f, 0x1a,}, -{0x30, 0x80,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x08,}, -{0x33, 0x86,}, -{0x34, 0xb6,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,},// LSC_EvTh_OutEnd_4 -{0x3a, 0x00,},// LSC_EvTh_OutEnd_3 -{0x3b, 0x13,},// LSC_EvTh_OutEnd_2 -{0x3c, 0x88,},// LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,},// LSC_EvTh_OutStr_4 -{0x3e, 0x00,},// LSC_EvTh_OutStr_3 -{0x3f, 0x30,},// LSC_EvTh_OutStr_2 -{0x40, 0xd4,},// LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,},// LSC_EvTh_Dark1Str_4 -{0x42, 0x05,},// LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,},// LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,},// LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,},// LSC_EvTh_Dark1End_4 -{0x46, 0x0b,},// LSC_EvTh_Dark1End_3 -{0x47, 0x71,},// LSC_EvTh_Dark1End_2 -{0x48, 0xb0,},// LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,},// LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,},// LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,},// LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,},// LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,},// LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,},// LSC_EvTh_Dark2End_3 -{0x4f, 0x84,},// LSC_EvTh_Dark2End_2 -{0x50, 0x80,},// LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},//LSC Ctmp LTEnd Out -{0x52, 0x64,}, //LSC Ctmp LTStr Out -{0x53, 0x78,},//LSC Ctmp HTStr Out -{0x54, 0x86,},//LSC Ctmp HTEnd Out - -{0x55, 0x46,}, //LSC Ctmp LTEnd In -{0x56, 0x56,}, //LSC Ctmp LTStr In -{0x57, 0x6e,}, //LSC Ctmp HTStr In -{0x58, 0x76,}, //LSC Ctmp HTEnd In - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,}, // UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,}, // UniScn_BPstdMinTh -{0x6c, 0x34,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x36,}, // Y_target_Outdoor -{0x7e, 0x3c,}, // Y_target_Indoor -{0x7f, 0x3c,}, // Y_target_Dark1 -{0x80, 0x3c,}, // Y_target_Dark2 -{0x81, 0x3c,}, // Y_target_LowTemp -{0x82, 0x3c,}, // Y_target_HighTemp - -{0x83, 0x80,}, // Cb_Outdoor -{0x84, 0x95,}, // Cb _Sat_Indoor -{0x85, 0xa0,}, // Cb _Sat_Dark1 -{0x86, 0x84,}, // Cb _Sat_Dark2 -{0x87, 0x88,}, // Cb _Sat_LowTemp -{0x88, 0x92,}, // Cb _Sat_HighTemp - -{0x89, 0x80,}, // Cr _Sat_Outdoor -{0x8a, 0x90,}, // Cr _Sat_Indoor -{0x8b, 0xa0,}, // Cr _Sat_Dark1 -{0x8c, 0x80,}, // Cr _Sat_Dark2 -{0x8d, 0x75,}, // Cr _Sat_LowTemp -{0x8e, 0x92,}, // Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x84,}, // BLC_ofs_r_Dark1 -{0x98, 0x84,}, // BLC_ofs_b_Dark1 -{0x99, 0x85,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x85,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x84,}, // BLC_ofs_r_Dark2 -{0x9c, 0x84,}, // BLC_ofs_b_Dark2 -{0x9d, 0x85,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x85,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x55,}, //CMC_Out_00 -{0xdd, 0x1c,}, //CMC_Out_01 -{0xde, 0x07,}, //CMC_Out_02 -{0xdf, 0x0a,}, //CMC_Out_03 -{0xe0, 0x51,}, //CMC_Out_04 -{0xe1, 0x07,}, //CMC_Out_05 -{0xe2, 0x01,}, //CMC_Out_06 -{0xe3, 0x14,}, //CMC_Out_07 -{0xe4, 0x55,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,}, //CMCSIGN_In_Mid -{0x17, 0x53,}, //CMC_In_Mid_00 -{0x18, 0x16,}, //CMC_In_Mid_01 -{0x19, 0x03,}, //CMC_In_Mid_02 -{0x1a, 0x10,}, //CMC_In_Mid_03 -{0x1b, 0x53,}, //CMC_In_Mid_04 -{0x1c, 0x03,}, //CMC_In_Mid_05 -{0x1d, 0x04,}, //CMC_In_Mid_06 -{0x1e, 0x1d,}, //CMC_In_Mid_07 -{0x1f, 0x61,}, //CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,}, //CMCSIGN_Dark1 -{0x40, 0x53,}, //CMC_Dark1_00 -{0x41, 0x1c,}, //CMC_Dark1_01 -{0x42, 0x09,}, //CMC_Dark1_02 -{0x43, 0x0e,}, //CMC_Dark1_03 -{0x44, 0x53,}, //CMC_Dark1_04 -{0x45, 0x05,}, //CMC_Dark1_05 -{0x46, 0x03,}, //CMC_Dark1_06 -{0x47, 0x23,}, //CMC_Dark1_07 -{0x48, 0x66,}, //CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,}, //CMCSIGN_Dark2 -{0x69, 0x53,}, //CMC_Dark2_00 -{0x6a, 0x1c,}, //CMC_Dark2_01 -{0x6b, 0x09,}, //CMC_Dark2_02 -{0x6c, 0x0e,}, //CMC_Dark2_03 -{0x6d, 0x53,}, //CMC_Dark2_04 -{0x6e, 0x05,}, //CMC_Dark2_05 -{0x6f, 0x03,}, //CMC_Dark2_06 -{0x70, 0x23,}, //CMC_Dark2_07 -{0x71, 0x66,}, //CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x08,}, // CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x12,}, // CMC_Dark2_LumGain2_R -{0x7b, 0x18,}, // CMC_Dark2_LumGain3_R -{0x7c, 0x1c,}, // CMC_Dark2_LumGain4_R -{0x7d, 0x1e,}, // CMC_Dark2_LumGain5_R -{0x7e, 0x20,}, // CMC_Dark2_LumGain6_R -{0x7f, 0x20,}, // CMC_Dark2_LumGain7_R -{0x80, 0x20,}, // CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x08,}, // CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x12,}, // CMC_Dark2_LumGain2_G -{0x83, 0x18,}, // CMC_Dark2_LumGain3_G -{0x84, 0x1c,}, // CMC_Dark2_LumGain4_G -{0x85, 0x1e,}, // CMC_Dark2_LumGain5_G -{0x86, 0x20,}, // CMC_Dark2_LumGain6_G -{0x87, 0x20,}, // CMC_Dark2_LumGain7_G -{0x88, 0x20,}, // CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x08,}, // CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x12,}, // CMC_Dark2_LumGain2_B -{0x8b, 0x18,}, // CMC_Dark2_LumGain3_B -{0x8c, 0x1c,}, // CMC_Dark2_LumGain4_B -{0x8d, 0x1e,}, // CMC_Dark2_LumGain5_B -{0x8e, 0x20,}, // CMC_Dark2_LumGain6_B -{0x8f, 0x20,}, // CMC_Dark2_LumGain7_B -{0x90, 0x20,}, // CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, //GMA_OUT -{0xe4, 0x00,}, -{0xe5, 0x03,}, -{0xe6, 0x0b,}, -{0xe7, 0x15,}, -{0xe8, 0x21,}, -{0xe9, 0x2f,}, -{0xea, 0x3c,}, -{0xeb, 0x49,}, -{0xec, 0x54,}, -{0xed, 0x5e,}, -{0xee, 0x68,}, -{0xef, 0x72,}, -{0xf0, 0x79,}, -{0xf1, 0x7f,}, -{0xf2, 0x84,}, -{0xf3, 0x8a,}, -{0xf4, 0x8e,}, -{0xf5, 0x94,}, -{0xf6, 0x98,}, -{0xf7, 0x9d,}, -{0xf8, 0xa7,}, -{0xf9, 0xb2,}, -{0xfa, 0xbb,}, -{0xfb, 0xcb,}, -{0xfc, 0xda,}, -{0xfd, 0xe9,}, -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, //Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xf7,}, -{0x11, 0xff,}, -{0x12, 0xff,}, -{0x13, 0xff,}, -{0x14, 0xff,}, -{0x15, 0xff,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x05,}, -{0x19, 0x09,}, -{0x1a, 0x11,}, -{0x1b, 0x19,}, -{0x1c, 0x26,}, -{0x1d, 0x33,}, -{0x1e, 0x3f,}, -{0x1f, 0x4a,}, -{0x20, 0x55,}, -{0x21, 0x5e,}, -{0x22, 0x67,}, -{0x23, 0x6f,}, -{0x24, 0x77,}, -{0x25, 0x7e,}, -{0x26, 0x84,}, -{0x27, 0x8b,}, -{0x28, 0x91,}, -{0x29, 0x96,}, -{0x2a, 0x9b,}, -{0x2b, 0xa0,}, -{0x2c, 0xa8,}, -{0x2d, 0xb2,}, -{0x2e, 0xbc,}, -{0x2f, 0xcd,}, -{0x30, 0xdd,}, -{0x31, 0xec,}, -{0x32, 0xf9,}, -{0x33, 0xff,}, -{0x34, 0xff,}, -{0x35, 0xff,}, -{0x36, 0xff,}, -{0x37, 0xff,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, //GMA_D1 -{0x3a, 0x04,}, -{0x3b, 0x08,}, -{0x3c, 0x0f,}, -{0x3d, 0x1b,}, -{0x3e, 0x2e,}, -{0x3f, 0x3e,}, -{0x40, 0x4e,}, -{0x41, 0x5b,}, -{0x42, 0x65,}, -{0x43, 0x71,}, -{0x44, 0x7b,}, -{0x45, 0x85,}, -{0x46, 0x8d,}, -{0x47, 0x95,}, -{0x48, 0x9b,}, -{0x49, 0xa3,}, -{0x4a, 0xa9,}, -{0x4b, 0xb0,}, -{0x4c, 0xb6,}, -{0x4d, 0xbb,}, -{0x4e, 0xc5,}, -{0x4f, 0xcf,}, -{0x50, 0xd7,}, -{0x51, 0xe7,}, -{0x52, 0xf3,}, -{0x53, 0xfa,}, -{0x54, 0xff,}, -{0x55, 0xff,}, -{0x56, 0xff,}, -{0x57, 0xff,}, -{0x58, 0xff,}, -{0x59, 0xff,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x04,}, -{0x5d, 0x08,}, -{0x5e, 0x0f,}, -{0x5f, 0x1b,}, -{0x60, 0x2e,}, -{0x61, 0x3e,}, -{0x62, 0x4e,}, -{0x63, 0x5b,}, -{0x64, 0x65,}, -{0x65, 0x71,}, -{0x66, 0x7b,}, -{0x67, 0x85,}, -{0x68, 0x8d,}, -{0x69, 0x95,}, -{0x6a, 0x9b,}, -{0x6b, 0xa3,}, -{0x6c, 0xa9,}, -{0x6d, 0xb0,}, -{0x6e, 0xb6,}, -{0x6f, 0xbb,}, -{0x70, 0xc5,}, -{0x71, 0xcf,}, -{0x72, 0xd7,}, -{0x73, 0xe7,}, -{0x74, 0xf3,}, -{0x75, 0xfa,}, -{0x76, 0xff,}, -{0x77, 0xff,}, -{0x78, 0xff,}, -{0x79, 0xff,}, -{0x7a, 0xff,}, -{0x7b, 0xff,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x17,}, //Outdoor_delta3 -{0x82, 0xbd,}, //Outdoor_center3 -{0x83, 0x17,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 - -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x89,}, //Outdoor_hue_angle2 -{0x91, 0x10,}, //Outdoor_hue_angle3 -{0x92, 0x14,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,}, // MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 red -{0xb7, 0x3f,}, // MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,}, // MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,}, // MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,}, // MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,}, // MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,}, // MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,}, // MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,}, // MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 yellow -{0xbf, 0x3f,}, // MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,}, // MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,}, // MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 Green -{0xc7, 0x3f,}, // MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,}, // MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,}, // MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,}, // MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,}, // MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,}, // MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,}, // MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x14,}, //Outdoor_allgain_y1 -{0xe7, 0x14,}, //Outdoor_allgain_y2 -{0xe8, 0x13,}, //Outdoor_allgain_y3 -{0xe9, 0x12,}, //Outdoor_allgain_y4 -{0xea, 0x12,}, //Outdoor_allgain_y5 -{0xeb, 0x14,}, //Outdoor_allgain_y6 -{0xec, 0x16,}, //Outdoor_allgain_y7 -{0xed, 0x18,}, //Outdoor_allgain_y8 -{0xee, 0x1a,}, //Outdoor_allgain_y9 -{0xef, 0x17,}, //Outdoor_allgain_y10 -{0xf0, 0x14,}, //Outdoor_allgain_y11 -{0xf1, 0x13,}, //Outdoor_allgain_y12 - -// Indoor MCMC -{0xf2, 0x10,}, //Indoor_delta1 -{0xf3, 0x1e,}, //Indoor_center1 -{0xf4, 0x0b,}, //Indoor_delta2 -{0xf5, 0x6f,}, //Indoor_center2 -{0xf6, 0x10,}, //Indoor_delta3 -{0xf7, 0x9c,}, // Indoor_center3 -{0xf8, 0x07,}, // Indoor_delta4 -{0xf9, 0xb8,}, // Indoor_center4 -{0xfa, 0x90,}, //Indoor_delta5 -{0xfb, 0x2d,}, //Indoor_center5 -{0xfc, 0x92,}, //Indoor_delta6 -{0xfd, 0x4f,}, //Indoor_center6 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x8a,}, //Indoor_hue_angle2 -{0x18, 0x00,}, //Indoor_hue_angle3 -{0x19, 0x00,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,}, // MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,}, // MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,}, // MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,}, // MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,}, // MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,}, // MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,}, // MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x10,}, // MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x10,}, // MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,}, // MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,}, // MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,}, //Dark1_allgain_y1 -{0xe3, 0x10,}, //Dark1_allgain_y2 -{0xe4, 0x10,}, //Dark1_allgain_y3 -{0xe5, 0x11,}, //Dark1_allgain_y4 -{0xe6, 0x10,}, //Dark1_allgain_y5 -{0xe7, 0x13,}, //Dark1_allgain_y6 -{0xe8, 0x12,}, //Dark1_allgain_y7 -{0xe9, 0x12,}, //Dark1_allgain_y8 -{0xea, 0x12,}, //Dark1_allgain_y9 -{0xeb, 0x11,}, //Dark1_allgain_y10 -{0xec, 0x10,}, //Dark1_allgain_y11 -{0xed, 0x0f,}, //Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, // MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,}, // MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,}, // MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,}, // MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,}, // MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,}, // MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,}, // MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x86,}, // MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,}, // MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,}, // MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,}, // MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,}, // MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,}, // MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,}, // MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,}, // MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,}, // MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,}, // MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,}, // MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,}, // MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,}, // MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,}, //Hi-Temp_allgain_y0 -{0x66, 0x0d,}, //Hi-Temp_allgain_y1 -{0x67, 0x0e,}, //Hi-Temp_allgain_y2 -{0x68, 0x0e,}, //Hi-Temp_allgain_y3 -{0x69, 0x10,}, //Hi-Temp_allgain_y4 -{0x6a, 0x10,}, //Hi-Temp_allgain_y5 -{0x6b, 0x13,}, //Hi-Temp_allgain_y6 -{0x6c, 0x12,}, //Hi-Temp_allgain_y7 -{0x6d, 0x13,}, //Hi-Temp_allgain_y8 -{0x6e, 0x12,}, //Hi-Temp_allgain_y9 -{0x6f, 0x0e,}, //Hi-Temp_allgain_y10 -{0x70, 0x11,}, //Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // Adaptive LSC on -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off for HD - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x23,}, //Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x2c,}, //Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,}, //Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,}, //Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3e,}, //Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3c,}, //Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3a,}, //Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x1c,}, //Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x2b,}, //Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x2a,}, //Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1a,}, //Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,}, //Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,}, //Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,}, //Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,}, //Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1e,}, //Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1e,}, //Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1f,}, //Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,}, //Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,},//Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,},//Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,},//Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,},//Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,},//Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,},//Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,},//Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,},//Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x30,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x30,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x30,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,},//Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x55,}, //Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x36,}, //Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x35,}, //Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Outdoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x1a,}, //Outdoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Outdoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x36,}, //Outdoor 1277 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Outdoor 1278 -{0x2e, 0x79,}, -{0x2f, 0x09,}, //Outdoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Outdoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Outdoor 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Outdoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Outdoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Outdoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Outdoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Outdoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Outdoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Outdoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Outdoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Outdoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Outdoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Outdoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Outdoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Outdoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Outdoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Outdoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Outdoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Outdoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Outdoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Outdoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x7f,}, //Outdoor 12ae -{0x5c, 0xaf,}, -{0x5d, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Outdoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Outdoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Outdoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Outdoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Outdoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Outdoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Outdoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Outdoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Outdoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Outdoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Outdoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Outdoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Outdoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Outdoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x30,},//Outdoor 12d7 //CI LPF NR offset -{0x7c, 0xd8,}, -{0x7d, 0x33,},//Outdoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x35,},//Outdoor 12d9 -{0x80, 0xda,}, -{0x81, 0x35,},//Outdoor 12da -{0x82, 0xdb,}, -{0x83, 0x34,},//Outdoor 12db -{0x84, 0xdc,}, -{0x85, 0x30,},//Outdoor 12dc -{0x86, 0xdd,}, -{0x87, 0x2a,},//Outdoor 12dd -{0x88, 0xde,}, -{0x89, 0x26,},//Outdoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x49,}, //Outdoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Outdoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Outdoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x20,}, //Outdoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x20,}, //Outdoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x20,}, //Outdoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x20,}, //Outdoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x20,}, //Outdoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x20,}, //Outdoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x20,}, //Outdoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x20,}, //Outdoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Outdoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1e,}, //Outdoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1d,}, //Outdoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x20,}, //Outdoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Outdoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Outdoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Outdoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Outdoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x3f,}, //Outdoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x3f,}, //Outdoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x3f,}, //Outdoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x3f,}, //Outdoor 1333 -{0xba, 0x34,}, -{0xbb, 0x3f,}, //Outdoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x33,}, //Outdoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x2f,}, //Outdoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x2e,}, //Outdoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Outdoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x1e,}, //Outdoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x22,}, //Outdoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Outdoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Outdoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Outdoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Outdoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x36,}, //Outdoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Outdoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x20,}, //Outdoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Outdoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Outdoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Outdoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x20,}, //Outdoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Outdoor 1383 -{0xe0, 0x84,}, -{0xe1, 0x08,}, //Outdoor 1384 -{0xe2, 0xb7,}, -{0xe3, 0xfd,}, //Outdoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xa7,}, //Outdoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Outdoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Outdoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Outdoor 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Outdoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Outdoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Outdoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x0f,}, //Outdoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Outdoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x1c,}, //Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Outdoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Outdoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Outdoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Outdoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1d,}, //Outdoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x26,}, //Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x24,}, //Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x23,}, //Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x1a,}, //Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x14,}, //Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x16,}, //Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x16,}, //Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x22,}, //Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x21,}, //Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x20,}, //Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x1a,}, //Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x19,}, //Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x15,}, //Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x18,}, //Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x1b,}, //Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x24,}, //Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x24,}, //Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x1a,}, //Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x14,}, //Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x10,}, //Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x18,}, //Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x18,}, //Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x1b,}, //Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x19,}, //Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x19,}, //Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x1e,}, //Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x25,}, //Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x25,}, //Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x24,}, //Outdoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x24,}, //Outdoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x28,}, //Outdoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x30,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x31,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x30,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x27,}, //Outdoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x28,}, //Outdoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x2d,}, //Outdoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x2d,},//Outdoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x2e,},//Outdoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x2b,},//Outdoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x28,},//Outdoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x25,},//Outdoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Outdoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Outdoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Outdoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Outdoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Outdoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Outdoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Outdoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Outdoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Outdoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Outdoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Outdoor 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Outdoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Outdoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Outdoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Outdoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x3f,}, //Outdoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x3f,}, //Outdoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x3f,}, //Outdoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x3c,}, //Outdoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x38,}, //Outdoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x35,}, //Outdoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Outdoor 1A20 add -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Outdoor 1A2f add -{0xae, 0x32,}, -{0xaf, 0x87,}, //Outdoor 1A32 add -{0xb0, 0x34,}, -{0xb1, 0xd2,}, //Outdoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1c,}, //Outdoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x06,},//Outdoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Outdoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Outdoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Outdoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Outdoor 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Outdoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Outdoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Outdoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Outdoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Outdoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Outdoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Outdoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Outdoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Outdoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x0e,}, //Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x0e,}, //Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x0e,}, //Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x13,}, //Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x17,}, //Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x17,}, //Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x17,}, //Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x17,}, //Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x14,}, //Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x11,}, //Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x10,}, //Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x12,}, //Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x12,}, //Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x12,}, //Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x12,}, //Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x0f,}, //Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x0f,}, //Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x10,}, //Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x17,}, //Outdoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x19,}, //Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x17,}, //Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x16,}, //Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xD0, 0x27,}, -{0xD1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x16,}, //Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x10,}, //Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x16,}, //Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x15,}, //Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x12,}, //Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x13,}, //Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x13,}, //Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x13,}, //Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x29,}, //Outdoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x29,}, //Outdoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x29,}, //Outdoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x28,}, //Outdoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x28,}, //Outdoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Outdoor 1Aa7 add -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Outdoor 1Aa8 add -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Outdoor 1Aa9 add -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Outdoor 1Aaa add -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Outdoor 1Aab add -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Outdoor 1Aaf add -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Outdoor 1Ab0 add -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Outdoor 1Ab1 add -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Outdoor 1Ab2 add -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Outdoor 1Ab3 add -{0x58, 0xca,}, -{0x59, 0x00,}, //Outdoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Outdoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Outdoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0f,}, //Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x00,}, //Outdoor 1071 -{0x64, 0x72,}, -{0x65, 0x00,}, //Outdoor 1072 -{0x66, 0x73,}, -{0x67, 0x00,}, //Outdoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Outdoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Outdoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,},//Outdoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x40,},//Outdoor 1077 -{0x70, 0x78,}, -{0x71, 0x00,},//Outdoor 1078 -{0x72, 0x79,}, -{0x73, 0x40,},//Outdoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,},//Outdoor 107a -{0x76, 0x7b,}, -{0x77, 0x40,},//Outdoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,},//Outdoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Outdoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Outdoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Outdoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x30,}, //Outdoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Outdoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Outdoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Outdoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Outdoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x02,}, //Outdoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Outdoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x7f,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Indoor 1137 //Pre Flat rate -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Indoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x20,}, //Indoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Indoor 1140 -{0x34, 0x41,}, -{0x35, 0x1e,}, //Indoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x38,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x33,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x31,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x30,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x16,}, //Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x16,}, //Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x15,}, //Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x15,}, //Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x11,}, //Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,}, //Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,}, //Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x11,}, //Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x11,}, //Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x11,}, //Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x15,}, //Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x16,}, //Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,}, //Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,}, //Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,}, //Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x15,}, //Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x15,}, //Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x13,}, //Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x13,}, //Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,}, //Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,}, //Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,}, //Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x16,}, //Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x17,}, //Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x17,}, //Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,}, //Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,}, //Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x25,}, //Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x24,}, //Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,}, //Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x65,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x18,}, //Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Indoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x02,}, //Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x1c,}, //Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x0e,}, //Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,}, //Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Indoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Indoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Indoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,}, // burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x2a,}, //Indoor 11e5 //Bayer Flat R4 StdH -{0x12, 0xe6,}, -{0x13, 0x00,}, //Indoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Indoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Indoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Indoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Indoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Indoor 11eb -{0x1e, 0xef,}, -{0x1f, 0xac,}, //Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Indoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Indoor 1270 // Bayer Sharpness ENB add -{0x26, 0x71,}, -{0x27, 0x1a,}, //Indoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Indoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x26,}, //Indoor 1277 //20130412 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Indoor 1278 -{0x2e, 0x79,}, -{0x2f, 0xff,}, //Indoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Indoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Indoor 127b -{0x34, 0x7c,}, -{0x35, 0x64,}, //Indoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x20,}, //Indoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Indoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Indoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Indoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Indoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Indoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Indoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Indoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Indoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Indoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Indoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Indoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Indoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Indoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Indoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Indoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Indoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Indoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x5f,}, //Indoor 12ae //Bayer Flat off -{0x5c, 0xaf,}, -{0x5d, 0x80,}, //Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Indoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Indoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Indoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Indoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Indoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Indoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Indoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Indoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Indoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Indoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Indoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Indoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Indoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Indoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x38,}, //Indoor 12d7 -{0x7c, 0xd8,}, -{0x7d, 0x30,}, //Indoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2a,}, //Indoor 12d9 -{0x80, 0xda,}, -{0x81, 0x2a,}, //Indoor 12da -{0x82, 0xdb,}, -{0x83, 0x24,}, //Indoor 12db -{0x84, 0xdc,}, -{0x85, 0x20,}, //Indoor 12dc -{0x86, 0xdd,}, -{0x87, 0x1a,}, //Indoor 12dd -{0x88, 0xde,}, -{0x89, 0x16,}, //Indoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Indoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Indoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Indoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Indoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Indoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Indoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Indoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Indoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Indoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Indoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Indoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Indoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Indoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Indoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Indoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Indoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Indoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Indoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Indoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Indoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Indoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Indoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Indoor 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Indoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x20,}, //Indoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Indoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Indoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Indoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x18,}, //Indoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x36,}, //Indoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Indoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Indoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Indoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Indoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x45,}, //Indoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Indoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x65,}, //Indoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Indoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Indoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Indoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x30,}, //Indoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Indoor 1383 //add 20121210 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Indoor 1384 //add 20121210 -{0xe2, 0xb7,}, -{0xe3, 0xfa,}, //Indoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0x77,}, //Indoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Indoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Indoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Indoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Indoor 1410 -{0xf6, 0x11,}, -{0xf7, 0x98,}, //Indoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Indoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Indoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x17,}, //Indoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Indoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Indoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Indoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Indoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Indoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Indoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x20,}, //Indoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x22,}, //Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x21,}, //Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x1c,}, //Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x15,}, //Indoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x11,}, //Indoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x10,}, //Indoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x11,}, //Indoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Indoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x1a,}, //Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x15,}, //Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x14,}, //Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x13,}, //Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x12,}, //Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x12,}, //Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x14,}, //Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x15,}, //Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x22,}, //Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x21,}, //Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x20,}, //Indoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x1d,}, //Indoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x1d,}, //Indoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x1d,}, //Indoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x1d,}, //Indoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x19,}, //Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x16,}, //Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x15,}, //Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x14,}, //Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x13,}, //Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x12,}, //Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x2a,}, //Indoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x2b,}, //Indoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x2c,}, //Indoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2d,}, //Indoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x2d,}, //Indoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x2b,}, //Indoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x2d,}, //Indoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x2e,}, //Indoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x1c,}, //Indoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x20,}, //Indoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x26,}, //Indoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x26,}, //Indoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x22,}, //Indoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x22,}, //Indoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x1c,}, //Indoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x18,}, //Indoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Indoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Indoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Indoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Indoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Indoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Indoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Indoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Indoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Indoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Indoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Indoor 14c9 -{0x94, 0xca,}, -{0x95, 0x27,}, //Indoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Indoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Indoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Indoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x2a,}, //Indoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x27,}, //Indoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x23,}, //Indoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x23,}, //Indoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x23,}, //Indoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x23,}, //Indoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Indoor 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Indoor 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x87,}, //Indoor 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xd0,}, //Indoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x11,}, //Indoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x00,}, //Indoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Indoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Indoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x1d,}, //Indoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Indoor 1A3a //RGB Flat R2_Lum H -{0xbe, 0x3b,}, -{0xbf, 0x00,}, //Indoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x4c,}, //Indoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x00,}, //Indoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x13,}, //Indoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x00,}, //Indoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x2a,}, //Indoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x00,}, //Indoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x17,}, //Indoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2c,}, //Indoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x12,}, //Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x12,}, //Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x11,}, //Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x10,}, //Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x10,}, //Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x10,}, //Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x10,}, //Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x13,}, //Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x13,}, //Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x12,}, //Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x10,}, //Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x10,}, //Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x10,}, //Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x10,}, //Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x12,}, //Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x12,}, //Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x13,}, //Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x14,}, //Indoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x14,}, //Indoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x14,}, //Indoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x15,}, //Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x15,}, //Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x12,}, //Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x12,}, //Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x12,}, //Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x13,}, //Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x14,}, //Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x14,}, //Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x22,}, //Indoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x23,}, //Indoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x24,}, //Indoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x25,}, //Indoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x26,}, //Indoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x27,}, //Indoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x29,}, //Indoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x2b,}, //Indoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Indoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x23,}, //Indoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x26,}, //Indoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x26,}, //Indoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x26,}, //Indoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x26,}, //Indoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x26,}, //Indoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x26,}, //Indoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x34,}, //Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Indoor 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Indoor 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Indoor 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Indoor 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Indoor 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Indoor 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Indoor 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Indoor 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Indoor 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Indoor 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Indoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Indoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Indoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Indoor 1070 Trans Func. 130108 Indoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x01,}, //Indoor 1071 -{0x64, 0x72,}, -{0x65, 0x89,}, //Indoor 1072 -{0x66, 0x73,}, -{0x67, 0xd4,}, //Indoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Indoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Indoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,}, //Indoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x47,}, //Indoor 1077 -{0x70, 0x78,}, -{0x71, 0xae,}, //Indoor 1078 -{0x72, 0x79,}, -{0x73, 0x50,}, //Indoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Indoor 107a -{0x76, 0x7b,}, -{0x77, 0x50,}, //Indoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Indoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x05,}, //Indoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Indoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x2f,}, //Indoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x2a,}, //Indoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Indoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Indoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Indoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Indoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x03,}, //Indoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Indoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark1 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark1 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark1 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark1 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark1 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark1 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark1 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark1 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark1 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark1 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark1 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark1 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark1 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark1 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark1 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark1 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark1 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark1 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark1 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark1 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark1 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark1 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark1 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark1 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark1 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark1 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark1 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark1 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark1 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark1 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark1 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark1 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark1 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark1 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark1 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark1 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark1 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark1 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark1 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark1 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark1 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark1 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark1 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark1 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark1 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark1 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark1 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark1 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark1 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark1 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark1 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark1 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark1 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark1 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark1 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark1 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark1 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark1 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark1 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark1 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark1 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark1 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark1 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark1 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark1 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark1 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark1 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark1 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark1 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark1 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark1 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark1 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark1 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark1 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark1 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark1 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark1 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark1 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark1 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark1 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark1 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark1 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark1 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark1 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark1 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark1 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark1 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark1 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark1 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark1 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark1 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark1 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark1 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark1 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark1 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark1 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark1 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark1 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark1 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark1 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark1 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark1 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark1 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark1 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark1 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark1 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark1 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark1 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark1 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark1 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark1 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark1 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark1 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark1 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark1 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark1 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark1 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark1 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark1 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark1 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark1 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark1 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark1 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark1 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark1 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark1 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x13,}, //Dark1 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x13,}, //Dark1 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x14,}, //Dark1 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x16,}, //Dark1 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x16,}, //Dark1 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x15,}, //Dark1 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x13,}, //Dark1 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark1 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark1 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark1 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark1 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark1 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark1 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark1 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark1 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark1 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark1 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark1 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark1 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark1 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark1 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark1 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark1 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark1 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark1 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark1 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark1 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark1 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark1 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark1 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark1 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark1 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark1 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark1 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark1 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark1 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark1 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark1 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark1 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark1 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark1 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark1 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark1 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark1 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark1 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark1 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark1 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark1 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark1 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark1 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark1 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark1 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark1 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark1 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark1 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark1 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark1 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark1 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark1 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark1 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark1 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark1 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark1 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark1 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark1 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark1 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark1 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark1 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark1 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark1 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark1 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark1 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark1 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark1 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark1 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark1 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark1 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark1 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark1 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark1 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark1 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark1 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark1 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark1 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark1 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark1 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark1 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark1 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark1 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark1 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark1 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark1 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark1 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark1 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark1 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark1 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark1 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark1 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark1 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark1 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark1 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark1 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark1 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark1 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark1 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark1 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark1 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x04,}, //Dark1 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark1 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark2 1137 //Pre Flat rate B[4:1] //04 -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark2 1139 -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark2 1149 -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark2 114a -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark2 114b -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark2 114c -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark2 114d -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark2 114e -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark2 114f -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark2 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark2 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark2 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark2 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark2 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark2 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark2 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark2 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark2 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark2 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark2 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark2 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark2 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark2 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark2 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark2 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark2 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark2 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark2 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark2 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark2 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark2 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark2 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark2 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark2 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark2 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark2 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark2 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark2 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark2 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark2 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark2 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark2 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark2 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark2 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark2 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark2 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark2 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark2 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark2 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark2 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark2 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark2 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark2 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark2 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark2 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark2 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark2 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark2 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark2 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark2 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark2 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark2 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark2 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark2 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark2 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark2 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark2 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark2 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark2 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark2 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark2 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark2 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark2 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark2 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark2 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark2 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark2 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark2 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark2 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark2 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark2 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark2 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark2 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark2 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark2 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark2 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark2 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark2 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark2 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark2 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark2 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark2 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark2 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark2 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark2 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark2 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark2 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark2 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark2 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark2 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark2 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark2 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark2 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark2 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark2 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark2 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark2 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark2 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark2 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark2 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark2 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark2 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark2 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark2 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark2 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark2 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark2 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark2 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark2 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark2 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark2 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark2 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark2 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark2 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark2 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark2 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark2 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark2 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark2 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark2 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark2 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x23,}, //Dark2 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x26,}, //Dark2 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x24,}, //Dark2 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x13,}, //Dark2 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x1a,}, //Dark2 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x12,}, //Dark2 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x12,}, //Dark2 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark2 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark2 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark2 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark2 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark2 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark2 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark2 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark2 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark2 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark2 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark2 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark2 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark2 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark2 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark2 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark2 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark2 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark2 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark2 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark2 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark2 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark2 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark2 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark2 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark2 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark2 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark2 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark2 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark2 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark2 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark2 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark2 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark2 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark2 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark2 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark2 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark2 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark2 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark2 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark2 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark2 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark2 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark2 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark2 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark2 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark2 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark2 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark2 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark2 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark2 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark2 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark2 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark2 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark2 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark2 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark2 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark2 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark2 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark2 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark2 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark2 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark2 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark2 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark2 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark2 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark2 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark2 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark2 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark2 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark2 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark2 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark2 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark2 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark2 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark2 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark2 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark2 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark2 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark2 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark2 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark2 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark2 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark2 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark2 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark2 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark2 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark2 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark2 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark2 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark2 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark2 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark2 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark2 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark2 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark2 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark2 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark2 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark2 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark2 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark2 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x05,}, //Dark2 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark2 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 86MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0d,}, // tlpx_time_l_dn -{0x1e, 0x0c,}, // hs_zero_time -{0x1f, 0x0c,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x0a,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x1c,}, // clk_zero_time -{0x33, 0x0e,}, // clk_post_time -{0x34, 0x05,}, // clk_prepare_time -{0x35, 0x08,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x08,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 - -/////////////////////////////////////////////////////////////////////////////// -// sleep off -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0x03, 0xc0,}, -{0x7F, 0x80,}, // DMA on -{0x7E, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// end of HD set -/////////////////////////////////////////////////////////////////////////////// -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_HD_01[] = { - -/////////////////////////////////////////////////////////////////////////////// -// HD Initial Start -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// mcu clock enable for bus release -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x26,}, -{0x10, 0x89,}, -{0x10, 0x80,}, - -/////////////////////////////////////////////////////////////////////////////// -// reset -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x00,}, -{0x01, 0x01,}, -{0x01, 0x07,}, -{0x01, 0x01,}, - -{0x05, 0x26,}, // ver1.12_for 26MCLK -{0x0d, 0xaa,}, // ESD Check Register -{0x0f, 0xaa,}, // ESD Check Register - -/////////////////////////////////////////////////////////////////////////////// -// pad drive / pll setting -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x02, 0x07,}, // pclk_drive = 000b, i2c_drive = 111b -{0x0c, 0x07,}, // d_pad_drive = 000b, gpio_pad_drive = 111b -////////////////////////////////////////////////////////////////// -{0x07, 0x25,}, //mode_pll1 26mhz / (5+1) = 4.33mhz -{0x08, 0x50,}, //mode_pll2 isp clk = 86.6Mhz; -{0x09, 0x81,}, //mode_pll3 // MIPI 4x div 1/1 // isp clk div = 1/4 -{0x07, 0xA5,}, -{0x07, 0xA5,}, -{0x07, 0xA5,}, -//OUTPUT: MIPI interface ///////////////////////////////////////// -{0x0A, 0x60,}, //mode_pll4 for mipi mode -{0x0A, 0xe0,}, //mode_pll4 for mipi mode - -{0x03, 0x26,}, -{0x1B, 0x03,}, // bus clk div = 1/4 - -/////////////////////////////////////////////////////////////////////////////// -// 7 Page(memory configuration) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x07,}, -{0x21, 0x01,}, //SSD sram clock inv on -{0x33, 0x45,}, //bit[6]:C-NR DC °ü·Ã ¼³Á¤ - -/////////////////////////////////////////////////////////////////////////////// -// mcu reset -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x10, 0x80,}, // mcu reset -{0x10, 0x89,}, // mcu clk enable -{0x11, 0x08,}, // xdata clear -{0x11, 0x00,}, // xdata clear -{0xff, 0x01,}, // delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// opt download -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0A,}, -{0x12, 0x00,}, // otp clock enable - -// timing for 86mhz -{0x40, 0x2f,}, // otp cfg 1 -{0x41, 0x55,}, // otp cfg 2 -{0x42, 0x2f,}, // otp cfg 3 -{0x43, 0x2f,}, // otp cfg 4 -{0x44, 0x2f,}, // otp cfg 5 -{0x45, 0x22,}, // otp cfg 6 -{0x46, 0x5a,}, // otp cfg 7 -{0x47, 0x09,}, // otp cfg 8 -{0x48, 0x02,}, // otp cfg 9 -{0x49, 0xb8,}, // otp cfg 10 -{0x4A, 0x2f,}, // otp cfg 11 -{0x4B, 0x85,}, // otp cfg 12 -{0x4C, 0x55,}, // otp cfg 13 - -{0xff, 0x01,}, //delay 10ms - -// downlaod otp - system data -{0x20, 0x00,}, // otp addr = Otp:0000h -{0x21, 0x00,}, // otp addr = Otp:0000h -{0x20, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x21, 0x00,}, // otp addr = Otp:0000h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x13, 0x01,}, // start download system data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -// download otp - mcu data -{0x20, 0x00,}, // otp addr = Otp:0080h -{0x21, 0x80,}, // otp addr = Otp:0080h -{0x20, 0x00,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0080h (otp addr must be set twice) -{0x2e, 0x01,}, // otp download size = 0100 -{0x2f, 0x00,}, // otp download size = 0100 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x10,}, // otp mcu buffer addr = Xdata:105Dh -{0x31, 0x5D,}, // otp mcu buffer addr = Xdata:105Dh -{0x13, 0x02,}, // start download mcu data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -// download otp - dpc data -{0x20, 0x01,}, // otp addr = Otp:0180h -{0x21, 0x80,}, // otp addr = Otp:0180h -{0x20, 0x01,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x21, 0x80,}, // otp addr = Otp:0180h (otp addr must be set twice) -{0x2e, 0x00,}, // otp download size = 0080 -{0x2f, 0x80,}, // otp download size = 0080 -{0x18, 0x01,}, // link xdata to otp -{0x30, 0x33,}, // otp mcu buffer addr = Xdata:3384h -{0x31, 0x84,}, // otp mcu buffer addr = Xdata:3384h -{0x13, 0x04,}, // start download dpc data -{0x13, 0x00,}, // toggle start - -{0xff, 0x01,}, //delay 10ms - -{0x18, 0x00,}, // link xdata to mcu - -{0x03, 0x0A,}, -{0x12, 0x80,}, // otp clock disable - -/////////////////////////////////////////////////////////////////////////////// -// 0 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x10, 0x00,}, // Full size -{0x11, 0x80,}, // Fixed mode off -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x15, 0x01,}, -{0x17, 0x00,}, // Clock inversion off -{0x18, 0x00,}, -{0x1D, 0x0D,}, //Group_frame_update -{0x1E, 0x01,}, //Group_frame_update_reset -{0x20, 0x00,}, -{0x21, 0x00,}, // preview row start set -{0x22, 0x00,}, -{0x23, 0x08,}, // preview col start set -{0x24, 0x02,}, -{0x25, 0xd0,}, // height 720 -{0x26, 0x05,}, -{0x27, 0x00,}, // width 1280 - -/////////////////////////////////////////////////////////////////////////////// -//ONE LINE SETTING -{0x03, 0x00,}, -{0x4c, 0x07,}, // one_line = 1850 -{0x4d, 0x3a,}, - -/////////////////////////////////////////////////////////////////////////////// -{0x52, 0x00,}, // Vsync H -{0x53, 0x14,}, // Vsync L -/////////////////////////////////////////////////////////////////////////////// - -//Pixel windowing -{0x80, 0x01,}, // pixel_row_start for 720p crop mode -{0x81, 0x9e,}, // pwin_row_start = 414 -{0x82, 0x02,}, // pwin_row_height = 738 -{0x83, 0xe2,}, -{0x84, 0x01,}, // pwin_col_start = 384 -{0x85, 0x80,}, -{0x86, 0x05,}, // pwin_col_width = 1312 -{0x87, 0x20,}, - -/////////////////////////////////////////////////////////////////////////////// -// 1 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x01,}, -{0x10, 0x62,}, // BLC=ON, column BLC, col_OBP DPC -{0x11, 0x11,}, // BLC offset ENB + Adaptive BLC ENB B[4] -{0x12, 0x00,}, -{0x13, 0x39,}, // BLC(Frame BLC ofs - Column ALC ofs)+FrameALC skip -{0x14, 0x00,}, -{0x23, 0x8F,}, // Frame BLC avg ´©Àû for 8 frame -{0x50, 0x04,}, // blc height = 4 -{0x51, 0x44,}, -{0x60, 0x00,}, -{0x61, 0x00,}, -{0x62, 0x00,}, -{0x63, 0x00,}, -{0x78, 0x7f,}, // ramp_rst_offset = 128 -{0x79, 0x04,}, // ramp offset -{0x7b, 0x04,}, // ramp offset -{0x7e, 0x00,}, - -/////////////////////////////////////////////////////////////////////////////// -// 2 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x02,}, -{0x1b, 0x80,}, -{0x1d, 0x40,}, -{0x23, 0x10,}, -{0x40, 0x08,}, -{0x41, 0x8a,}, //20130213 Rev BC ver. ADC input range @ 800mv -{0x46, 0x0a,}, // + 3.3V, -0.9V -{0x47, 0x17,}, // 20121129 2.9V -{0x48, 0x1a,}, -{0x49, 0x13,}, -{0x54, 0xc0,}, -{0x55, 0x40,}, -{0x56, 0x33,}, - -{0xa0, 0x01,}, -{0xa1, 0x7c,}, -{0xa2, 0x03,}, -{0xa3, 0x4d,}, -{0xa4, 0x03,}, -{0xa5, 0xb0,}, -{0xa6, 0x06,}, -{0xa7, 0xf2,}, -{0xa8, 0x01,}, -{0xa9, 0x4f,}, -{0xaa, 0x02,}, -{0xab, 0x23,}, -{0xac, 0x02,}, -{0xad, 0x74,}, -{0xae, 0x04,}, -{0xaf, 0x17,}, - -/////////////////////////////////////////////////////////////////////////////// -// 3 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x03,}, -{0x1a, 0x06,}, // cds_s1 -{0x1b, 0x7c,}, -{0x1e, 0x06,}, -{0x1f, 0x7c,}, - -{0x42, 0x00,}, -{0x43, 0x46,}, -{0x46, 0x00,}, -{0x47, 0x74,}, -{0x4a, 0x00,}, -{0x4b, 0x44,}, -{0x4e, 0x00,}, -{0x4f, 0x44,}, - -{0x52, 0x00,}, -{0x53, 0x20,}, -{0x56, 0x00,}, -{0x57, 0x20,}, -{0x5A, 0x00,}, -{0x5b, 0x20,}, -{0x6A, 0x00,}, -{0x6B, 0x6f,}, -{0x72, 0x06,}, // s_addr_cut -{0x73, 0x40,}, -{0x78, 0x06,}, // rx half_rst -{0x79, 0x3b,}, -{0x7A, 0x06,}, -{0x7B, 0x45,}, -{0x7C, 0x06,}, -{0x7D, 0x3b,}, -{0x7E, 0x06,}, -{0x7F, 0x45,}, -{0x84, 0x06,}, // tx half_rst -{0x85, 0x3b,}, -{0x86, 0x06,}, -{0x87, 0x45,}, -{0x88, 0x06,}, -{0x89, 0x3b,}, -{0x8A, 0x06,}, -{0x8B, 0x45,}, -{0x92, 0x06,}, // sx -{0x93, 0x31,}, -{0x96, 0x06,}, -{0x97, 0x31,}, -{0x98, 0x06,}, // sxb -{0x99, 0x31,}, -{0x9c, 0x06,}, -{0x9d, 0x31,}, - -{0xe0, 0x00,}, -{0xe1, 0x20,}, -{0xfc, 0x06,}, // clamp_sig -{0xfd, 0x38,}, - -/////////////////////////////////////////////////////////////////////////////// -// 4 Page -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x04,}, -{0x10, 0x03,}, //Ramp multiple sampling - -{0x5a, 0x06,}, // cds_pxl_smpl -{0x5b, 0x78,}, -{0x5e, 0x06,}, -{0x5f, 0x78,}, -{0x62, 0x06,}, -{0x63, 0x78,}, - -/////////////////////////////////////////////////////////////////////////////// -// mcu start -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x26,}, -{0x62, 0x00,}, // normal mode start -{0x65, 0x00,}, // watchdog disable -{0x10, 0x09,}, // mcu reset release -//Analog setting ÀÌÈÄ¿¡ MCU¸¦ reset ½ÃÅ´. - -/////////////////////////////////////////////////////////////////////////////// -// b Page -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0x0b,}, -{0x10, 0x01,}, // otp_dpc_ctl -{0x11, 0x11,}, //HD 0415 -{0x12, 0x00,}, //HD 0415 - -/////////////////////////////////////////////////////////////////////////////// -// 15 Page (LSC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x15,}, -{0x10, 0x00,}, // LSC OFF -{0x11, 0x00,}, //gap y disable - -/////////////////////////////////////////////////////////////////////////////// -// set lsc parameter -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x0a,}, -{0x19, 0x01,}, - -{0x11, 0x80,}, // B[7] LSC burst mode ENB - -{0x03, 0x26,}, -{0x40, 0x02,}, // auto increment enable -{0x44, 0x01,}, -{0x45, 0xa3,}, // LSC bank0 start addr H -{0x46, 0x00,}, // LSC bank0 start addr L - -//LSC G channel reg________________________ 20130625 LSC Blending DNP 90_CWF 5_TL84 5 - -{0x0e, 0x01,}, //BURST_START - -//G Value -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x32,}, -{0x42, 0x22,}, -{0x42, 0xc7,}, -{0x42, 0x26,}, -{0x42, 0xd1,}, -{0x42, 0xe5,}, -{0x42, 0x15,}, -{0x42, 0x30,}, -{0x42, 0xcf,}, -{0x42, 0x06,}, -{0x42, 0x80,}, -{0x42, 0x22,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x20,}, -{0x42, 0x68,}, -{0x42, 0x0c,}, -{0x42, 0xf1,}, -{0x42, 0x53,}, -{0x42, 0x1e,}, -{0x42, 0x52,}, -{0x42, 0x6d,}, -{0x42, 0x2c,}, -{0x42, 0x73,}, -{0x42, 0x22,}, -{0x42, 0x32,}, -{0x42, 0x92,}, -{0x42, 0xd2,}, -{0x42, 0x27,}, -{0x42, 0xb1,}, -{0x42, 0xf6,}, -{0x42, 0x16,}, -{0x42, 0x60,}, -{0x42, 0xe4,}, -{0x42, 0x07,}, -{0x42, 0xd0,}, -{0x42, 0x37,}, -{0x42, 0x01,}, -{0x42, 0x30,}, -{0x42, 0x13,}, -{0x42, 0x03,}, -{0x42, 0x70,}, -{0x42, 0x7d,}, -{0x42, 0x0e,}, -{0x42, 0x41,}, -{0x42, 0x66,}, -{0x42, 0x1f,}, -{0x42, 0x62,}, -{0x42, 0x7b,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x29,}, -{0x42, 0x33,}, -{0x42, 0x62,}, -{0x42, 0xe4,}, -{0x42, 0x29,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x18,}, -{0x42, 0xd1,}, -{0x42, 0x0d,}, -{0x42, 0x0a,}, -{0x42, 0x60,}, -{0x42, 0x60,}, -{0x42, 0x03,}, -{0x42, 0xd0,}, -{0x42, 0x3d,}, -{0x42, 0x06,}, -{0x42, 0x00,}, -{0x42, 0xa6,}, -{0x42, 0x10,}, -{0x42, 0xd1,}, -{0x42, 0x8d,}, -{0x42, 0x21,}, -{0x42, 0x82,}, -{0x42, 0x93,}, -{0x42, 0x2e,}, -{0x42, 0x43,}, -{0x42, 0x36,}, -{0x42, 0x34,}, -{0x42, 0x93,}, -{0x42, 0x00,}, -{0x42, 0x2b,}, -{0x42, 0x62,}, -{0x42, 0x47,}, -{0x42, 0x1c,}, -{0x42, 0x51,}, -{0x42, 0x4a,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x9f,}, -{0x42, 0x07,}, -{0x42, 0xb0,}, -{0x42, 0x7b,}, -{0x42, 0x09,}, -{0x42, 0xf0,}, -{0x42, 0xe5,}, -{0x42, 0x14,}, -{0x42, 0xa1,}, -{0x42, 0xc5,}, -{0x42, 0x24,}, -{0x42, 0x72,}, -{0x42, 0xb6,}, -{0x42, 0x30,}, -{0x42, 0x03,}, -{0x42, 0x49,}, -{0x42, 0x36,}, -{0x42, 0x13,}, -{0x42, 0x21,}, -{0x42, 0x2e,}, -{0x42, 0x02,}, -{0x42, 0x7f,}, -{0x42, 0x20,}, -{0x42, 0xa1,}, -{0x42, 0x97,}, -{0x42, 0x13,}, -{0x42, 0x70,}, -{0x42, 0xf2,}, -{0x42, 0x0c,}, -{0x42, 0xf0,}, -{0x42, 0xcf,}, -{0x42, 0x0f,}, -{0x42, 0x21,}, -{0x42, 0x37,}, -{0x42, 0x19,}, -{0x42, 0x72,}, -{0x42, 0x0a,}, -{0x42, 0x27,}, -{0x42, 0xf2,}, -{0x42, 0xe0,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x44,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0xbd,}, -{0x42, 0x25,}, -{0x42, 0x91,}, -{0x42, 0xf3,}, -{0x42, 0x19,}, -{0x42, 0x91,}, -{0x42, 0x58,}, -{0x42, 0x13,}, -{0x42, 0x61,}, -{0x42, 0x36,}, -{0x42, 0x15,}, -{0x42, 0x81,}, -{0x42, 0x99,}, -{0x42, 0x1f,}, -{0x42, 0x32,}, -{0x42, 0x59,}, -{0x42, 0x2b,}, -{0x42, 0xd3,}, -{0x42, 0x0e,}, -{0x42, 0x34,}, -{0x42, 0x43,}, -{0x42, 0x7a,}, -{0x42, 0x37,}, -{0x42, 0x83,}, -{0x42, 0x57,}, -{0x42, 0x33,}, -{0x42, 0x52,}, -{0x42, 0xf2,}, -{0x42, 0x2a,}, -{0x42, 0x12,}, -{0x42, 0x4b,}, -{0x42, 0x1f,}, -{0x42, 0xe1,}, -{0x42, 0xc4,}, -{0x42, 0x1a,}, -{0x42, 0x51,}, -{0x42, 0xa5,}, -{0x42, 0x1c,}, -{0x42, 0x41,}, -{0x42, 0xfe,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0xa1,}, -{0x42, 0x2f,}, -{0x42, 0x23,}, -{0x42, 0x35,}, -{0x42, 0x35,}, -{0x42, 0x73,}, -{0x42, 0x78,}, -{0x42, 0x35,}, -{0x42, 0xb3,}, -{0x42, 0x62,}, -{0x42, 0x36,}, -{0x42, 0x83,}, -{0x42, 0x31,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0xa4,}, -{0x42, 0x26,}, -{0x42, 0x12,}, -{0x42, 0x2e,}, -{0x42, 0x21,}, -{0x42, 0x12,}, -{0x42, 0x11,}, -{0x42, 0x22,}, -{0x42, 0xe2,}, -{0x42, 0x61,}, -{0x42, 0x2a,}, -{0x42, 0x42,}, -{0x42, 0xed,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x68,}, -{0x42, 0x36,}, -{0x42, 0x23,}, -{0x42, 0x5b,}, -{0x42, 0x38,}, -{0x42, 0xe3,}, -{0x42, 0x6c,}, -{0x42, 0x39,}, -{0x42, 0xa3,}, -{0x42, 0x70,}, -{0x42, 0x33,}, -{0x42, 0x92,}, -{0x42, 0xfd,}, -{0x42, 0x2c,}, -{0x42, 0x52,}, -{0x42, 0x98,}, -{0x42, 0x27,}, -{0x42, 0xe2,}, -{0x42, 0x7e,}, -{0x42, 0x29,}, -{0x42, 0x82,}, -{0x42, 0xc5,}, -{0x42, 0x2f,}, -{0x42, 0xd3,}, -{0x42, 0x39,}, -{0x42, 0x37,}, -{0x42, 0x03,}, -{0x42, 0x9a,}, -{0x42, 0x36,}, -{0x42, 0xc3,}, -{0x42, 0x8e,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//R Value -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x4c,}, -{0x42, 0x94,}, -{0x42, 0x22,}, -{0x42, 0x39,}, -{0x42, 0x02,}, -{0x42, 0xba,}, -{0x42, 0x1d,}, -{0x42, 0xe1,}, -{0x42, 0x20,}, -{0x42, 0x08,}, -{0x42, 0xf0,}, -{0x42, 0x2e,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0xe0,}, -{0x42, 0x8f,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0xde,}, -{0x42, 0x2b,}, -{0x42, 0xa3,}, -{0x42, 0x90,}, -{0x42, 0x42,}, -{0x42, 0x24,}, -{0x42, 0xc9,}, -{0x42, 0x4d,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0x3a,}, -{0x42, 0x42,}, -{0x42, 0xd3,}, -{0x42, 0x1f,}, -{0x42, 0xa1,}, -{0x42, 0x3d,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0x4b,}, -{0x42, 0x01,}, -{0x42, 0xb0,}, -{0x42, 0x1b,}, -{0x42, 0x04,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0xd1,}, -{0x42, 0xfa,}, -{0x42, 0x2d,}, -{0x42, 0x33,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0x14,}, -{0x42, 0xd2,}, -{0x42, 0x4e,}, -{0x42, 0x24,}, -{0x42, 0x4c,}, -{0x42, 0x3c,}, -{0x42, 0xa3,}, -{0x42, 0x04,}, -{0x42, 0x23,}, -{0x42, 0x11,}, -{0x42, 0x76,}, -{0x42, 0x0e,}, -{0x42, 0x50,}, -{0x42, 0x84,}, -{0x42, 0x05,}, -{0x42, 0x40,}, -{0x42, 0x54,}, -{0x42, 0x08,}, -{0x42, 0x40,}, -{0x42, 0xe5,}, -{0x42, 0x17,}, -{0x42, 0x62,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x43,}, -{0x42, 0xca,}, -{0x42, 0x44,}, -{0x42, 0xc4,}, -{0x42, 0xe2,}, -{0x42, 0x4f,}, -{0x42, 0xd4,}, -{0x42, 0x74,}, -{0x42, 0x3f,}, -{0x42, 0xf3,}, -{0x42, 0x4c,}, -{0x42, 0x28,}, -{0x42, 0x41,}, -{0x42, 0xcd,}, -{0x42, 0x13,}, -{0x42, 0xd0,}, -{0x42, 0xdc,}, -{0x42, 0x0a,}, -{0x42, 0xb0,}, -{0x42, 0xab,}, -{0x42, 0x0d,}, -{0x42, 0xc1,}, -{0x42, 0x3d,}, -{0x42, 0x1c,}, -{0x42, 0xd2,}, -{0x42, 0x84,}, -{0x42, 0x34,}, -{0x42, 0xc3,}, -{0x42, 0xff,}, -{0x42, 0x47,}, -{0x42, 0x44,}, -{0x42, 0xfd,}, -{0x42, 0x51,}, -{0x42, 0xd4,}, -{0x42, 0xa4,}, -{0x42, 0x43,}, -{0x42, 0xf3,}, -{0x42, 0xa4,}, -{0x42, 0x2e,}, -{0x42, 0xd2,}, -{0x42, 0x3f,}, -{0x42, 0x1b,}, -{0x42, 0x21,}, -{0x42, 0x52,}, -{0x42, 0x12,}, -{0x42, 0x01,}, -{0x42, 0x20,}, -{0x42, 0x15,}, -{0x42, 0x21,}, -{0x42, 0xb2,}, -{0x42, 0x23,}, -{0x42, 0xf2,}, -{0x42, 0xed,}, -{0x42, 0x3a,}, -{0x42, 0x44,}, -{0x42, 0x3f,}, -{0x42, 0x4a,}, -{0x42, 0x45,}, -{0x42, 0x1d,}, -{0x42, 0x53,}, -{0x42, 0xd4,}, -{0x42, 0xd7,}, -{0x42, 0x48,}, -{0x42, 0x54,}, -{0x42, 0x02,}, -{0x42, 0x36,}, -{0x42, 0x52,}, -{0x42, 0xc8,}, -{0x42, 0x24,}, -{0x42, 0x31,}, -{0x42, 0xe6,}, -{0x42, 0x1b,}, -{0x42, 0x61,}, -{0x42, 0xb6,}, -{0x42, 0x1e,}, -{0x42, 0x62,}, -{0x42, 0x43,}, -{0x42, 0x2c,}, -{0x42, 0x83,}, -{0x42, 0x65,}, -{0x42, 0x40,}, -{0x42, 0x24,}, -{0x42, 0x85,}, -{0x42, 0x4d,}, -{0x42, 0x75,}, -{0x42, 0x3d,}, -{0x42, 0x53,}, -{0x42, 0xa4,}, -{0x42, 0xf5,}, -{0x42, 0x4c,}, -{0x42, 0x24,}, -{0x42, 0x5c,}, -{0x42, 0x3d,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x2e,}, -{0x42, 0x32,}, -{0x42, 0x8d,}, -{0x42, 0x26,}, -{0x42, 0x02,}, -{0x42, 0x60,}, -{0x42, 0x28,}, -{0x42, 0xd2,}, -{0x42, 0xe3,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0xdc,}, -{0x42, 0x45,}, -{0x42, 0xc4,}, -{0x42, 0xc2,}, -{0x42, 0x4f,}, -{0x42, 0x55,}, -{0x42, 0x3a,}, -{0x42, 0x50,}, -{0x42, 0xa5,}, -{0x42, 0x02,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0xbe,}, -{0x42, 0x45,}, -{0x42, 0x53,}, -{0x42, 0xe6,}, -{0x42, 0x37,}, -{0x42, 0xf3,}, -{0x42, 0x31,}, -{0x42, 0x30,}, -{0x42, 0x83,}, -{0x42, 0x08,}, -{0x42, 0x33,}, -{0x42, 0x13,}, -{0x42, 0x7f,}, -{0x42, 0x3e,}, -{0x42, 0x64,}, -{0x42, 0x55,}, -{0x42, 0x4b,}, -{0x42, 0xe5,}, -{0x42, 0x0d,}, -{0x42, 0x50,}, -{0x42, 0x25,}, -{0x42, 0x0a,}, -{0x42, 0x54,}, -{0x42, 0x85,}, -{0x42, 0x21,}, -{0x42, 0x56,}, -{0x42, 0x75,}, -{0x42, 0x2f,}, -{0x42, 0x4d,}, -{0x42, 0xc4,}, -{0x42, 0x81,}, -{0x42, 0x42,}, -{0x42, 0xb3,}, -{0x42, 0xe5,}, -{0x42, 0x3b,}, -{0x42, 0xe3,}, -{0x42, 0xbe,}, -{0x42, 0x3e,}, -{0x42, 0x54,}, -{0x42, 0x2b,}, -{0x42, 0x48,}, -{0x42, 0x14,}, -{0x42, 0xdc,}, -{0x42, 0x52,}, -{0x42, 0xf5,}, -{0x42, 0x67,}, -{0x42, 0x52,}, -{0x42, 0x15,}, -{0x42, 0x48,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -//B Value -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, - -{0x0e, 0x00,}, //BURST_END -{0x0e, 0x01,}, //BURST_START - -{0x42, 0x30,}, -{0x42, 0x22,}, -{0x42, 0x8e,}, -{0x42, 0x21,}, -{0x42, 0x91,}, -{0x42, 0xab,}, -{0x42, 0x13,}, -{0x42, 0x00,}, -{0x42, 0xbe,}, -{0x42, 0x06,}, -{0x42, 0x10,}, -{0x42, 0x20,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x00,}, -{0x42, 0x02,}, -{0x42, 0x00,}, -{0x42, 0x61,}, -{0x42, 0x0b,}, -{0x42, 0xe1,}, -{0x42, 0x30,}, -{0x42, 0x1a,}, -{0x42, 0xb2,}, -{0x42, 0x19,}, -{0x42, 0x28,}, -{0x42, 0xe3,}, -{0x42, 0x02,}, -{0x42, 0x30,}, -{0x42, 0xe2,}, -{0x42, 0x9b,}, -{0x42, 0x22,}, -{0x42, 0x91,}, -{0x42, 0xbe,}, -{0x42, 0x14,}, -{0x42, 0x50,}, -{0x42, 0xd4,}, -{0x42, 0x07,}, -{0x42, 0x70,}, -{0x42, 0x36,}, -{0x42, 0x01,}, -{0x42, 0x60,}, -{0x42, 0x16,}, -{0x42, 0x03,}, -{0x42, 0x60,}, -{0x42, 0x77,}, -{0x42, 0x0d,}, -{0x42, 0x41,}, -{0x42, 0x45,}, -{0x42, 0x1b,}, -{0x42, 0xe2,}, -{0x42, 0x29,}, -{0x42, 0x29,}, -{0x42, 0xb3,}, -{0x42, 0x0e,}, -{0x42, 0x31,}, -{0x42, 0xc2,}, -{0x42, 0xb1,}, -{0x42, 0x24,}, -{0x42, 0x41,}, -{0x42, 0xe0,}, -{0x42, 0x16,}, -{0x42, 0xc0,}, -{0x42, 0xfd,}, -{0x42, 0x0a,}, -{0x42, 0x20,}, -{0x42, 0x62,}, -{0x42, 0x04,}, -{0x42, 0x20,}, -{0x42, 0x42,}, -{0x42, 0x06,}, -{0x42, 0x20,}, -{0x42, 0xa2,}, -{0x42, 0x0f,}, -{0x42, 0xd1,}, -{0x42, 0x6c,}, -{0x42, 0x1e,}, -{0x42, 0x02,}, -{0x42, 0x44,}, -{0x42, 0x2b,}, -{0x42, 0x13,}, -{0x42, 0x1c,}, -{0x42, 0x33,}, -{0x42, 0xb2,}, -{0x42, 0xd2,}, -{0x42, 0x26,}, -{0x42, 0x82,}, -{0x42, 0x0f,}, -{0x42, 0x1a,}, -{0x42, 0x41,}, -{0x42, 0x3a,}, -{0x42, 0x0e,}, -{0x42, 0x00,}, -{0x42, 0xa1,}, -{0x42, 0x08,}, -{0x42, 0x20,}, -{0x42, 0x82,}, -{0x42, 0x0a,}, -{0x42, 0x10,}, -{0x42, 0xe0,}, -{0x42, 0x13,}, -{0x42, 0xa1,}, -{0x42, 0xa4,}, -{0x42, 0x20,}, -{0x42, 0xf2,}, -{0x42, 0x68,}, -{0x42, 0x2d,}, -{0x42, 0x23,}, -{0x42, 0x3b,}, -{0x42, 0x35,}, -{0x42, 0x82,}, -{0x42, 0xf7,}, -{0x42, 0x29,}, -{0x42, 0x62,}, -{0x42, 0x4b,}, -{0x42, 0x1e,}, -{0x42, 0x91,}, -{0x42, 0x87,}, -{0x42, 0x13,}, -{0x42, 0x20,}, -{0x42, 0xf6,}, -{0x42, 0x0d,}, -{0x42, 0x70,}, -{0x42, 0xd7,}, -{0x42, 0x0f,}, -{0x42, 0x61,}, -{0x42, 0x32,}, -{0x42, 0x18,}, -{0x42, 0x71,}, -{0x42, 0xe9,}, -{0x42, 0x24,}, -{0x42, 0xb2,}, -{0x42, 0x96,}, -{0x42, 0x2f,}, -{0x42, 0x73,}, -{0x42, 0x58,}, -{0x42, 0x37,}, -{0x42, 0xa3,}, -{0x42, 0x21,}, -{0x42, 0x2c,}, -{0x42, 0x82,}, -{0x42, 0x89,}, -{0x42, 0x23,}, -{0x42, 0x51,}, -{0x42, 0xde,}, -{0x42, 0x19,}, -{0x42, 0x11,}, -{0x42, 0x59,}, -{0x42, 0x13,}, -{0x42, 0xc1,}, -{0x42, 0x3c,}, -{0x42, 0x15,}, -{0x42, 0x91,}, -{0x42, 0x91,}, -{0x42, 0x1d,}, -{0x42, 0xe2,}, -{0x42, 0x35,}, -{0x42, 0x28,}, -{0x42, 0x92,}, -{0x42, 0xc8,}, -{0x42, 0x32,}, -{0x42, 0x13,}, -{0x42, 0x7a,}, -{0x42, 0x38,}, -{0x42, 0xa3,}, -{0x42, 0x3d,}, -{0x42, 0x2f,}, -{0x42, 0x12,}, -{0x42, 0xbe,}, -{0x42, 0x27,}, -{0x42, 0xd2,}, -{0x42, 0x35,}, -{0x42, 0x1f,}, -{0x42, 0x11,}, -{0x42, 0xc1,}, -{0x42, 0x1a,}, -{0x42, 0x81,}, -{0x42, 0xa8,}, -{0x42, 0x1c,}, -{0x42, 0x11,}, -{0x42, 0xf1,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x7d,}, -{0x42, 0x2b,}, -{0x42, 0xe2,}, -{0x42, 0xf1,}, -{0x42, 0x33,}, -{0x42, 0xd3,}, -{0x42, 0x8a,}, -{0x42, 0x38,}, -{0x42, 0x83,}, -{0x42, 0x6d,}, -{0x42, 0x35,}, -{0x42, 0x33,}, -{0x42, 0x26,}, -{0x42, 0x2e,}, -{0x42, 0xb2,}, -{0x42, 0xb0,}, -{0x42, 0x27,}, -{0x42, 0x62,}, -{0x42, 0x4c,}, -{0x42, 0x23,}, -{0x42, 0x52,}, -{0x42, 0x35,}, -{0x42, 0x24,}, -{0x42, 0xc2,}, -{0x42, 0x76,}, -{0x42, 0x2b,}, -{0x42, 0x02,}, -{0x42, 0xeb,}, -{0x42, 0x32,}, -{0x42, 0x63,}, -{0x42, 0x53,}, -{0x42, 0x36,}, -{0x42, 0xd3,}, -{0x42, 0x88,}, -{0x42, 0x3e,}, -{0x42, 0x93,}, -{0x42, 0x9d,}, -{0x42, 0x3b,}, -{0x42, 0x43,}, -{0x42, 0x8f,}, -{0x42, 0x35,}, -{0x42, 0x93,}, -{0x42, 0x2c,}, -{0x42, 0x2f,}, -{0x42, 0xb2,}, -{0x42, 0xd7,}, -{0x42, 0x2c,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x2d,}, -{0x42, 0x72,}, -{0x42, 0xfb,}, -{0x42, 0x32,}, -{0x42, 0xc3,}, -{0x42, 0x59,}, -{0x42, 0x38,}, -{0x42, 0xf3,}, -{0x42, 0xb4,}, -{0x42, 0x39,}, -{0x42, 0xd3,}, -{0x42, 0xe9,}, - -{0x0e, 0x00,}, //BURST_END - -{0x03, 0x0a,}, -{0x19, 0x02,}, // Bus Switch - -{0x03, 0x15,}, // Shading FPGA(Hi-352) -{0x10, 0x01,}, // LSC ON -{0x11, 0x06,}, //gap y enb, gap x enb for 720p - -{0x27, 0x80,}, // LSC G -{0x28, 0x80,}, // LSC B -{0x29, 0x80,}, // LSC R - -{0x30, 0x8a,}, //gap x for 720p -{0x31, 0x68,}, //gap y for 720p -{0x36, 0x6c,}, //lsc_win_x for 720p -{0x37, 0x64,}, //lsc_win_y for 720p - -/////////////////////////////////// -// 10 Page Saturation (H/W) -/////////////////////////////////// -{0x03, 0x10,}, -{0x10, 0x01,}, -{0x12, 0x00,}, //Y OFS Disable -{0x17, 0x00,}, //20121127 CSP option -{0x18, 0x00,}, //20121127 CSP option -{0x20, 0x04,}, //16_235 range scale down on -{0x60, 0x03,}, //Sat ENB Transfer Function //Transfunction on - -/////////////////////////////////// -// 11 Page D-LPF (H/W) -/////////////////////////////////// -{0x03, 0x11,}, //11 page -{0x10, 0x1f,}, //D-LPF ENB //DPC marker - -{0x12, 0x28,}, //20121120 character long line detection th -{0x13, 0x2c,}, //20121120 character short line detection th - -{0x1d, 0x12,}, // ORG_STD Ctrl -{0x1e, 0x00,},// 20130410_STD 03 -> 00 -{0x21, 0x78,}, // Color STD Gain -//Bayer Sharpness Gain Ctrl -{0xb7, 0x22,}, //SpColor_gain1 -{0xb8, 0x22,}, //SpColor_gain2 -{0xb9, 0x21,}, //SpColor_gain3 -{0xba, 0x1e,}, //SpColor_gain4 -{0xbb, 0x1c,}, //SpColor_gain5 -{0xbc, 0x1a,}, //SpColor_gain6 - -{0xf2, 0xff,}, //pga_dark1_hi -{0xf3, 0xfc,}, //pga_dark_lo -/////////////////////////////////// -// 12 Page DPC,GBGR (H/W)////////// -/////////////////////////////////// -{0x03, 0x12,}, //12 page -{0x10, 0x57,}, //DPC ON -{0x12, 0x30,}, -{0x2b, 0x08,}, //white_th -{0x2c, 0x08,}, //middle_h_th -{0x2d, 0x08,}, //middle_l_th -{0x2e, 0x06,}, //dark_th -{0x2f, 0x40,}, //20121127 _DPC TH -{0x30, 0x40,}, //20121127 _DPC TH -{0x31, 0x40,}, //20121127 _DPC TH -{0x32, 0x40,}, //20121127 _DPC TH -{0x41, 0x88,}, //GBGR Cut off //46 - -/////////////////////////////////// -// 12 Page CI-LPF (H/W)//////////// -/////////////////////////////////// - -{0xEF, 0x01,}, //Interpol Color filter On/Off - -/////////////////////////////////// -// 13 Page YC-2D_Y-NR (H/W)///////// -/////////////////////////////////// -{0x03, 0x13,}, - -{0x80, 0x2d,}, //YC-2D_C-NR ENB, C-Filter DC option on B[7] //DC on 8b //DC off 2d -{0x81, 0xff,}, // add 20121210 -{0x82, 0xfe,}, // add 20121210 - -{0x85, 0x32,}, -{0x86, 0x08,}, // add 20121210 - -//========================================================================== -// C-Filter PS Reducing (Mask-Size Adjustment) - -{0x87, 0xff,}, //C-mask near STD TH -{0x88, 0xff,}, //C-mask middle STD TH -{0x89, 0xff,}, //C-mask far STD TH - -{0x8a, 0x86,}, //color STD - -{0x97, 0x0f,}, // C-filter Lum gain 1 -{0x98, 0x0e,}, -{0x99, 0x0d,}, -{0x9a, 0x0c,}, -{0x9b, 0x0b,}, -{0x9c, 0x0a,}, -{0x9d, 0x09,}, -{0x9e, 0x08,}, - -{0xa7, 0x0f,}, // C-filter STD gain 1 -{0xa8, 0x0e,}, -{0xa9, 0x0d,}, -{0xaa, 0x0c,}, -{0xab, 0x0b,}, -{0xac, 0x0a,}, -{0xad, 0x09,}, -{0xae, 0x08,}, - -//========================================================================== - -/////////////////////////////////// -// 14 Page YC-2D_Sharpness(H/W) -/////////////////////////////////// -{0x03, 0x14,}, -{0x77, 0x20,}, //Yc2d_ee_color_gain1 -{0x78, 0x20,}, //Yc2d_ee_color_gain2 -{0x79, 0x20,}, //Yc2d_ee_color_gain3 -{0x7a, 0x1c,}, //Yc2d_ee_color_gain4 -{0x7b, 0x1b,}, //Yc2d_ee_color_gain5 -{0x7c, 0x1a,}, //Yc2d_ee_color_gain6 -{0x7d, 0x19,}, //Yc2d_ee_color_gain7 -{0x7e, 0x18,}, //Yc2d_ee_color_gain8 - -{0xc0, 0x00,}, //Yc2d_ee_lclip_gain_n1 -{0xc1, 0x00,}, //Yc2d_ee_lclip_gain_n2 -{0xc2, 0x00,}, //Yc2d_ee_lclip_gain_n3 -{0xc3, 0x00,}, //Yc2d_ee_lclip_gain_n4 -{0xc4, 0x01,}, //Yc2d_ee_lclip_gain_n5 - -/////////////////////////////////////////////////////////////////////////////// -// 16 Page CMC / AWB Gain -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x16,}, -{0x10, 0x7f,}, // CMC ENB 3f(spGrap off) 7f(spGrap on) -{0x20, 0x52,},// PS / LN - -{0xa0, 0x03,}, // WB gain on -{0xa2, 0x05,}, // R_h (12bit = 8bit * 16) -{0xa3, 0x80,}, // R_l -{0xa4, 0x07,}, // B_h (12bit = 8bit * 16) -{0xa5, 0x80,}, // B_l - -{0xD0, 0x01,}, //Bayer gain enable -/////////////////////////////////////////////////////////////////////////////// -// 17 Page Gamma -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x17,}, -{0x10, 0x07,}, // GMA ENB //PS On -{0x12, 0x52,},// old:43 new:65 - -/////////////////////////////////////////////////////////////////////////////// -// 18 Page MCMC -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x18,}, // Page 18 -{0x10, 0x01,}, // mcmc_ctl1 -{0x11, 0x7f,}, // mcmc_ctl2 -{0x53, 0x10,}, // mcmc_ctl3 - -{0x56, 0x1b,}, // mcmc_glb_sat_lvl_sp1 -{0x57, 0x39,}, // mcmc_glb_sat_lvl_sp2 -{0x58, 0x5a,}, // mcmc_glb_sat_lvl_sp3 -{0x59, 0x80,}, // mcmc_glb_sat_lvl_sp4 -{0x5a, 0xa6,}, // mcmc_glb_sat_lvl_sp5 -{0x5b, 0xc1,}, // mcmc_glb_sat_lvl_sp6 -{0x5c, 0xe8,}, // mcmc_glb_sat_lvl_sp7 -{0x5d, 0x38,}, // mcmc_glb_sat_gain_sp1 -{0x5e, 0x3a,}, // mcmc_glb_sat_gain_sp2 -{0x5f, 0x3c,}, // mcmc_glb_sat_gain_sp3 -{0x60, 0x3f,}, // mcmc_glb_sat_gain_sp4 -{0x61, 0x3f,}, // mcmc_glb_sat_gain_sp5 -{0x62, 0x3f,}, // mcmc_glb_sat_gain_sp6 -{0x63, 0x3f,}, // mcmc_glb_sat_gain_sp7 -{0x64, 0x3f,}, // mcmc_glb_sat_gain_sp8 -{0x65, 0x00,}, // mcmc_std_ctl1 -{0x66, 0x00,}, // mcmc_std_ctl2 -{0x67, 0x00,}, // mcmc_std_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 - -{0xa1, 0x00,}, -{0xa2, 0x01,}, //star gain enb - -/////////////////////////////////////////////////////////////////////////////// -// 1A Page_RGB Y-NR, Y-Sharpness -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x1a,}, -{0x30, 0x9f,}, // RGB-Sharpness ENB // Flat-region RGB ENB B[1] //Green dis [7] On - -{0x8D, 0x20,}, //RGB-Color_Gain1 -{0x8E, 0x20,}, //RGB-Color_Gain2 -{0x8F, 0x20,}, //RGB-Color_Gain3 -{0x90, 0x20,}, //RGB-Color_Gain4 -{0x91, 0x20,}, //RGB-Color_Gain5 - -/////////////////////////////////////////////////////////////////////////////// -// 20 Page (FZY) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x20,}, //Page 20 -{0x12, 0xe0,}, //Dgain off 20 //Dgain enb_2x e0 - -{0x18, 0x00,},//Check Flicker Lock Off - -{0x36, 0x00,}, //EXP Unit -{0x37, 0x07,}, -{0x38, 0x3a,}, - -{0x51, 0xff,}, //PGA Max -{0x52, 0x20,}, //PGA Min x0.9 - -{0x61, 0xFF,}, // max ramp gain -{0x62, 0x00,}, // min ramp gain -{0x60, 0xE0,}, // ramp gain - -{0x71, 0x70,}, //DG MAX //D gain 1x = 80 = x 1 // D gain 2x = 40 = x 1 -{0x72, 0x40,}, //DG MIN - -{0x80, 0x3a,}, //Y Target - -/////////////////////////////////////////////////////////////////////////////// -// 23 Page (AFC) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x23,}, //Page 23 -{0x14, 0x75,}, //Flicker Line 100 -{0x15, 0x61,}, //Flicker Line 120 -{0x10, 0x01,}, //Frame Interval - -/////////////////////////////////////////////////////////////////////////////// -// 2A Page (SSD) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x2A,}, -{0x10, 0x11,}, -{0x11, 0x01,}, -{0x15, 0x02,}, //720p mode on -{0x16, 0x50,}, //SSD B gain int gain 1.5x -{0x73, 0x0C,}, //start x in 720p -{0x74, 0x08,}, //start y in 720p -{0x75, 0x64,}, //width in 720p -{0x76, 0x4A,}, //height in 720p - -/////////////////////////////////////////////////////////////////////////////// -// -// F/W setting start -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// C0 Page (SYSTEM) -/////////////////////////////////////////////////////////////////////////////// -//OPCLK Setting -//43.3366Mhz = 0x02954398 -{0x03, 0xC0,}, -{0x14, 0x02,}, -{0x15, 0x95,}, -{0x16, 0x43,}, -{0x17, 0x98,}, - - -/////////////////////////////////////////////////////////////////////////////// -// C6 Page (SSD Y weight) -/////////////////////////////////////////////////////////////////////////////// -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -/////////////////////////////////////////////////////////////////////////////// -// D9 Page (Capture/Preview) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xd9,}, -{0x8c, 0x20,}, //en_ramp_gain_auto - -/////////////////////////////////////////////////////////////////////////////// -// C8 ~ CC Page (AWB) -/////////////////////////////////////////////////////////////////////////////// -{0x03, 0xC8,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0xD2,}, -{0x11, 0xc3,}, -{0x12, 0xe4,}, -{0x13, 0x1a,}, //bCtl4 -{0x14, 0x9f,}, -{0x15, 0xc4,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x11,}, -{0x19, 0x22,}, -{0x1a, 0x22,}, -{0x1b, 0x44,}, -{0x1c, 0x44,}, -{0x1d, 0x66,}, -{0x1e, 0x66,}, -{0x1f, 0x88,}, -{0x20, 0x88,}, -{0x21, 0x00,}, -{0x22, 0x01,}, -{0x23, 0x08,}, -{0x24, 0x00,}, -{0x25, 0x1e,}, -{0x26, 0x30,}, //init awb speed -{0x27, 0x6a,}, -{0x28, 0x80,}, -{0x29, 0x10,}, -{0x2a, 0x04,}, -{0x2b, 0x0a,}, -{0x2c, 0x04,}, -{0x2d, 0x0c,}, -{0x2e, 0x1e,}, -{0x2f, 0x00,},//dwOutdoorCondInTh -{0x30, 0x00,},//dwOutdoorCondInTh_n01 -{0x31, 0x21,},//dwOutdoorCondInTh_n02 -{0x32, 0x34,},//dwOutdoorCondInTh_n03 -{0x33, 0x00,},//dwOutdoorCondOutTh -{0x34, 0x00,},//dwOutdoorCondOutTh_n01 -{0x35, 0x27,},//dwOutdoorCondOutTh_n02 -{0x36, 0x10,},//dwOutdoorCondOutTh_n03 -{0x37, 0x00,},//dwEvTh -{0x38, 0x00,},//dwEvTh_n01 -{0x39, 0x04,},//dwEvTh_n02 //840fps -{0x3a, 0x11,},//dwEvTh_n03 -{0x3b, 0x00,},//dwEvTh_a01 -{0x3c, 0x00,},//dwEvTh_a01_n01 -{0x3d, 0x08,},//dwEvTh_a01_n02 -{0x3e, 0x23,},//dwEvTh_a01_n03 //480fps -{0x3f, 0x00,},//dwEvTh_a02 -{0x40, 0x00,},//dwEvTh_a02_n01 -{0x41, 0x20,},//dwEvTh_a02_n02 -{0x42, 0x8D,},//dwEvTh_a02_n03 //120fps -{0x43, 0x00,},//dwEvTh_a03 -{0x44, 0x00,},//dwEvTh_a03_n01 -{0x45, 0x61,},//dwEvTh_a03_n02 -{0x46, 0xa8,},//dwEvTh_a03_n03 //40fps -{0x47, 0x00,},//dwEvTh_a04 -{0x48, 0x04,},//dwEvTh_a04_n01 -{0x49, 0xc4,},//dwEvTh_a04_n02 -{0x4a, 0xb4,},//dwEvTh_a04_n03 -{0x4b, 0x00,},//dwEvTh_a05 -{0x4c, 0x0b,},//dwEvTh_a05_n01 -{0x4d, 0x71,},//dwEvTh_a05_n02 -{0x4e, 0xb0,},//dwEvTh_a05_n03 -{0x4f, 0x96,},//aAglMaxMinLmt -{0x50, 0x4a,},//aAglMaxMinLmt_a01 -{0x51, 0x9C,},//aAglMaxMinLmt_a02 -{0x52, 0x60,}, //aAglMaxMinLmt_a03 -{0x53, 0xa0,},//aAglMaxMinLmt_a04 -{0x54, 0x20,},//aAglMaxMinLmt_a05 -{0x55, 0xa0,},//aAglMaxMinLmt_a06 -{0x56, 0x32,},//aAglMaxMinLmt_a07 13.05.21 Night shot awb issue h38->h32 -{0x57, 0x78,},//aTgtWhtRgnBgMaxMinLmt -{0x58, 0x56,},//aTgtWhtRgnBgMaxMinLmt_a01 -{0x59, 0x81,},//aTgtWhtRgnBgMaxMinLmt_a02 -{0x5a, 0x51,},//aTgtWhtRgnBgMaxMinLmt_a03 -{0x5b, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a04 -{0x5c, 0x20,},//aTgtWhtRgnBgMaxMinLmt_a05 -{0x5d, 0x98,},//aTgtWhtRgnBgMaxMinLmt_a06 -{0x5e, 0x32,},//aTgtWhtRgnBgMaxMinLmt_a07 13.05.21 Night shot awb issue h42->h32 - -{0x5f, 0x10,},//bTgtWhtRgnBgStep -{0x60, 0x0a,},//BpOption distance weight def : 0a -> 04 -> 02 - -{0x61, 0x1e,}, -{0x62, 0x34,}, -{0x63, 0x80,}, -{0x64, 0x10,}, -{0x65, 0x01,}, -{0x66, 0x04,}, -{0x67, 0x0e,}, -{0x68, 0x00,}, -{0x69, 0x32,}, -{0x6a, 0x00,}, -{0x6b, 0xa2,}, -{0x6c, 0x02,}, -{0x6d, 0x00,}, -{0x6e, 0x00,}, -{0x6f, 0x00,}, -{0x70, 0x00,}, -{0x71, 0x00,}, -{0x72, 0x00,}, -{0x73, 0x00,}, -{0x74, 0x00,}, -{0x75, 0x00,}, -{0x76, 0x55,}, -{0x77, 0x55,}, -{0x78, 0x55,}, -{0x79, 0x55,}, -{0x7a, 0x55,}, -{0x7b, 0x55,}, -{0x7c, 0x55,}, -{0x7d, 0x55,}, -{0x7e, 0x55,}, -{0x7f, 0x55,}, -{0x80, 0x55,}, -{0x81, 0x55,}, -{0x82, 0x55,}, -{0x83, 0x55,}, -{0x84, 0x55,}, -{0x85, 0x55,}, -{0x86, 0x55,}, -{0x87, 0x55,}, -{0x88, 0x55,}, -{0x89, 0x55,}, -{0x8a, 0x55,}, -{0x8b, 0x55,}, -{0x8c, 0x55,}, -{0x8d, 0x55,}, -{0x8e, 0x55,}, -{0x8f, 0x55,}, -{0x90, 0x55,}, -{0x91, 0x00,}, -{0x92, 0x00,}, - -{0x93, 0x00,}, //Indoor_wRgIntOfs -{0x94, 0xc0,},//Indoor_wRgIntOfs_n01 -{0x95, 0x00,}, //Indoor_wBgIntOfs -{0x96, 0xc0,}, //Indoor_wBgIntOfs_n01 -{0x97, 0x10,}, //Indoor_bRgStep -{0x98, 0x10,}, //Indoor_bBgStep -{0x99, 0x26,}, //Indoor_aTgtWhtRgnBg -{0x9a, 0x29,}, //Indoor_aTgtWhtRgnBg_a01 -{0x9b, 0x2c,}, //Indoor_aTgtWhtRgnBg_a02 -{0x9c, 0x38,}, //Indoor_aTgtWhtRgnBg_a03 -{0x9d, 0x43,}, //Indoor_aTgtWhtRgnBg_a04 -{0x9e, 0x4d,}, //Indoor_aTgtWhtRgnBg_a05 -{0x9f, 0x59,}, //Indoor_aTgtWhtRgnBg_a06 -{0xa0, 0x64,}, //Indoor_aTgtWhtRgnBg_a07 -{0xa1, 0x6f,}, //Indoor_aTgtWhtRgnBg_a08 -{0xa2, 0x7b,}, //Indoor_aTgtWhtRgnBg_a09 -{0xa3, 0x8e,},//Indoor_aTgtWhtRgnBg_a10 -{0xa4, 0xa0,},//Indoor_aTgtWhtRgnRgLtLmt -{0xa5, 0x98,},//Indoor_aTgtWhtRgnRgLtLmt_a01 -{0xa6, 0x82,},//Indoor_aTgtWhtRgnRgLtLmt_a02 -{0xa7, 0x6d,},//Indoor_aTgtWhtRgnRgLtLmt_a03 -{0xa8, 0x60,},//Indoor_aTgtWhtRgnRgLtLmt_a04 -{0xa9, 0x56,},//Indoor_aTgtWhtRgnRgLtLmt_a05 -{0xaa, 0x4c,},//Indoor_aTgtWhtRgnRgLtLmt_a06 -{0xab, 0x45,},//Indoor_aTgtWhtRgnRgLtLmt_a07 -{0xac, 0x40,},//Indoor_aTgtWhtRgnRgLtLmt_a08 -{0xad, 0x3c,},//Indoor_aTgtWhtRgnRgLtLmt_a09 -{0xae, 0x39,},//Indoor_aTgtWhtRgnRgLtLmt_a10 -{0xaf, 0xaa,},//Indoor_aTgtWhtRgnRgRtLmt -{0xb0, 0xa9,},//Indoor_aTgtWhtRgnRgRtLmt_a01 -{0xb1, 0xa8,},//Indoor_aTgtWhtRgnRgRtLmt_a02 -{0xb2, 0xa2,},//Indoor_aTgtWhtRgnRgRtLmt_a03 -{0xb3, 0x95,},//Indoor_aTgtWhtRgnRgRtLmt_a04 -{0xb4, 0x88,},//Indoor_aTgtWhtRgnRgRtLmt_a05 -{0xb5, 0x78,},//Indoor_aTgtWhtRgnRgRtLmt_a06 -{0xb6, 0x65,},//Indoor_aTgtWhtRgnRgRtLmt_a07 -{0xb7, 0x5a,},//Indoor_aTgtWhtRgnRgRtLmt_a08 -{0xb8, 0x50,},//Indoor_aTgtWhtRgnRgRtLmt_a09 -{0xb9, 0x4a,},//Indoor_aTgtWhtRgnRgRtLmt_a10 -{0xba, 0x1b,}, //Indoor_aOptWhtRgnBg -{0xbb, 0x1d,}, //Indoor_aOptWhtRgnBg_a01 -{0xbc, 0x1f,}, //Indoor_aOptWhtRgnBg_a02 -{0xbd, 0x2a,}, //Indoor_aOptWhtRgnBg_a03 -{0xbe, 0x38,}, //Indoor_aOptWhtRgnBg_a04 -{0xbf, 0x47,}, //Indoor_aOptWhtRgnBg_a05 -{0xc0, 0x54,}, //Indoor_aOptWhtRgnBg_a06 -{0xc1, 0x61,}, //Indoor_aOptWhtRgnBg_a07 -{0xc2, 0x72,}, //Indoor_aOptWhtRgnBg_a08 -{0xc3, 0x82,}, //Indoor_aOptWhtRgnBg_a09 -{0xc4, 0x9a,},//Indoor_aOptWhtRgnBg_a10 -{0xc5, 0xad,}, //Indoor_aOptWhtRgnRgLtLmt -{0xc6, 0x98,},//Indoor_aOptWhtRgnRgLtLmt_a01 -{0xc7, 0x8a,},//Indoor_aOptWhtRgnRgLtLmt_a02 -{0xc8, 0x74,},//Indoor_aOptWhtRgnRgLtLmt_a03 -{0xc9, 0x5f,},//Indoor_aOptWhtRgnRgLtLmt_a04 -{0xca, 0x50,},//Indoor_aOptWhtRgnRgLtLmt_a05 -{0xcb, 0x46,},//Indoor_aOptWhtRgnRgLtLmt_a06 -{0xcc, 0x40,},//Indoor_aOptWhtRgnRgLtLmt_a07 -{0xcd, 0x39,},//Indoor_aOptWhtRgnRgLtLmt_a08 -{0xce, 0x35,},//Indoor_aOptWhtRgnRgLtLmt_a09 -{0xcf, 0x33,},//Indoor_aOptWhtRgnRgLtLmt_a10 -{0xd0, 0xba,},//Indoor_aOptWhtRgnRgRtLmt -{0xd1, 0xb9,},//Indoor_aOptWhtRgnRgRtLmt_a01 -{0xd2, 0xb8,},//Indoor_aOptWhtRgnRgRtLmt_a02 -{0xd3, 0xb5,}, //Indoor_aOptWhtRgnRgRtLmt_a03 -{0xd4, 0xae,}, //Indoor_aOptWhtRgnRgRtLmt_a04 -{0xd5, 0xa1,}, //Indoor_aOptWhtRgnRgRtLmt_a05 -{0xd6, 0x8c,}, //Indoor_aOptWhtRgnRgRtLmt_a06 -{0xd7, 0x78,},//Indoor_aOptWhtRgnRgRtLmt_a07 -{0xd8, 0x60,},//Indoor_aOptWhtRgnRgRtLmt_a08 -{0xd9, 0x54,},//Indoor_aOptWhtRgnRgRtLmt_a09 -{0xda, 0x4d,},//Indoor_aOptWhtRgnRgRtLmt_a10 - -{0xdb, 0x36,}, //Indoor_aCtmpWgtWdhTh -{0xdc, 0x40,}, //Indoor_aCtmpWgtWdhTh_a01 -{0xdd, 0x4c,}, //Indoor_aCtmpWgtWdhTh_a02 -{0xde, 0x5c,}, //Indoor_aCtmpWgtWdhTh_a03 -{0xdf, 0x6e,}, //Indoor_aCtmpWgtWdhTh_a04 -{0xe0, 0x7f,}, //Indoor_aCtmpWgtWdhTh_a05 -{0xe1, 0xa4,}, //Indoor_aCtmpWgtWdhTh_a06 -{0xe2, 0x27,}, //Indoor_aCtmpWgtHgtTh -{0xe3, 0x32,}, //Indoor_aCtmpWgtHgtTh_a01 -{0xe4, 0x3c,}, //Indoor_aCtmpWgtHgtTh_a02 -{0xe5, 0x48,}, //Indoor_aCtmpWgtHgtTh_a03 -{0xe6, 0x5c,}, //Indoor_aCtmpWgtHgtTh_a04 -{0xe7, 0x70,}, //Indoor_aCtmpWgtHgtTh_a05 -{0xe8, 0x7c,}, //Indoor_aCtmpWgtHgtTh_a06 -{0xe9, 0x86,}, //Indoor_aCtmpWgtHgtTh_a07 -{0xea, 0x90,}, //Indoor_aCtmpWgtHgtTh_a08 -{0xeb, 0x11,}, //Indoor_aCtmpWgt -{0xec, 0x11,}, //Indoor_aCtmpWgt_a01 -{0xed, 0x12,}, //Indoor_aCtmpWgt_a02 -{0xee, 0x11,}, //Indoor_aCtmpWgt_a03 -{0xef, 0x11,}, //Indoor_aCtmpWgt_a04 -{0xf0, 0x33,}, //Indoor_aCtmpWgt_a05 -{0xf1, 0x11,}, //Indoor_aCtmpWgt_a06 -{0xf2, 0x14,}, //Indoor_aCtmpWgt_a07 -{0xf3, 0x43,}, //Indoor_aCtmpWgt_a08 -{0xf4, 0x11,}, //Indoor_aCtmpWgt_a09 -{0xf5, 0x55,}, //Indoor_aCtmpWgt_a10 -{0xf6, 0x41,}, //Indoor_aCtmpWgt_a11 -{0xf7, 0x16,}, //Indoor_aCtmpWgt_a12 -{0xf8, 0x65,}, //Indoor_aCtmpWgt_a13 -{0xf9, 0x11,}, //Indoor_aCtmpWgt_a14 -{0xfa, 0x48,}, //Indoor_aCtmpWgt_a15 -{0xfb, 0x61,}, //Indoor_aCtmpWgt_a16 -{0xfc, 0x11,}, //Indoor_aCtmpWgt_a17 -{0xfd, 0x46,}, //Indoor_aCtmpWgt_a18 -{0x0e, 0x00,}, // burst end - -{0x03, 0xc9,}, //c9 page -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //Indoor_aCtmpWgt_a19 -{0x11, 0x11,}, //Indoor_aCtmpWgt_a20 -{0x12, 0x23,}, //Indoor_aCtmpWgt_a21 -{0x13, 0x11,}, //Indoor_aCtmpWgt_a22 -{0x14, 0x11,}, //Indoor_aCtmpWgt_a23 -{0x15, 0x10,}, //Indoor_aCtmpWgt_a24 - -{0x16, 0x11,},//Indoor_aYlvlWgt -{0x17, 0x11,},//Indoor_aYlvlWgt_a01 -{0x18, 0x11,},//Indoor_aYlvlWgt_a02 -{0x19, 0x11,},//Indoor_aYlvlWgt_a03 -{0x1a, 0x11,},//Indoor_aYlvlWgt_a04 -{0x1b, 0x11,},//Indoor_aYlvlWgt_a05 -{0x1c, 0x11,},//Indoor_aYlvlWgt_a06 -{0x1d, 0x11,},//Indoor_aYlvlWgt_a07 -{0x1e, 0x11,},//Indoor_aYlvlWgt_a08 -{0x1f, 0x11,},//Indoor_aYlvlWgt_a09 -{0x20, 0x11,},//Indoor_aYlvlWgt_a10 -{0x21, 0x22,},//Indoor_aYlvlWgt_a11 -{0x22, 0x22,},//Indoor_aYlvlWgt_a12 -{0x23, 0x34,},//Indoor_aYlvlWgt_a13 -{0x24, 0x32,},//Indoor_aYlvlWgt_a14 -{0x25, 0x21,},//Indoor_aYlvlWgt_a15 - -{0x26, 0x34,},//Indoor_aTgtAngle -{0x27, 0x3e,},//Indoor_aTgtAngle_a01 -{0x28, 0x41,},//Indoor_aTgtAngle_a02 -{0x29, 0x4e,},//Indoor_aTgtAngle_a03 -{0x2a, 0x72,},//Indoor_aTgtAngle_a04 - -{0x2b, 0x10,},//Indoor_aRgTgtOfs -{0x2c, 0x10,},//Indoor_aRgTgtOfs_a01 -{0x2d, 0x8e,},//Indoor_aRgTgtOfs_a02 -{0x2e, 0x84,},//Indoor_aRgTgtOfs_a03 -{0x2f, 0x86,},//Indoor_aRgTgtOfs_a04 - -{0x30, 0xc6,},//Indoor_aBgTgtOfs -{0x31, 0xc6,},//Indoor_aBgTgtOfs_a01 -{0x32, 0xb1,},//Indoor_aBgTgtOfs_a02 -{0x33, 0x8a,},//Indoor_aBgTgtOfs_a03 -{0x34, 0x84,},//Indoor_aBgTgtOfs_a04 h88->h00 13.5.29 choi - -{0x35, 0x24,},//bRgDefTgt //indoor -{0x36, 0x00,},//bBgDefTgt //indoor - -{0x37, 0x20,},//Indoor_aWhtPtTrcAglOfs -{0x38, 0x1e,},//Indoor_aWhtPtTrcAglOfs_a01 -{0x39, 0x1c,},//Indoor_aWhtPtTrcAglOfs_a02 -{0x3a, 0x1a,},//Indoor_aWhtPtTrcAglOfs_a03 -{0x3b, 0x18,},//Indoor_aWhtPtTrcAglOfs_a04 -{0x3c, 0x16,},//Indoor_aWhtPtTrcAglOfs_a05 -{0x3d, 0x14,},//Indoor_aWhtPtTrcAglOfs_a06 -{0x3e, 0x14,},//Indoor_aWhtPtTrcAglOfs_a07 -{0x3f, 0x13,},//Indoor_aWhtPtTrcAglOfs_a08 -{0x40, 0x12,},//Indoor_aWhtPtTrcAglOfs_a09 -{0x41, 0x04,},//Indoor_bWhtPtTrcCnt -{0x42, 0x14,},//Indoor_aRtoDiffThNrBp -{0x43, 0x3c,},//Indoor_aRtoDiffThNrBp_a01 -{0x44, 0x28,},//Indoor_aAglDiffThTrWhtPt -{0x45, 0x50,},//Indoor_aAglDiffThTrWhtPt_a01 -{0x46, 0xaa,},//Indoor_bWgtRatioTh1 -{0x47, 0xa0,},//Indoor_bWgtRatioTh2 -{0x48, 0x44,},//Indoor_bWgtOfsTh1 -{0x49, 0x40,},//Indoor_bWgtOfsTh2 -{0x4a, 0x5a,},//Indoor_bWhtPtCorAglMin -{0x4b, 0x70,},//Indoor_bWhtPtCorAglMax -{0x4c, 0x04,},//Indoor_bYlvlMin -{0x4d, 0xf8,},//Indoor_bYlvlMax -{0x4e, 0x28,},//Indoor_bPxlWgtLmtLoTh -{0x4f, 0x78,},//Indoor_bPxlWgtLmtHiTh -{0x50, 0x00,},//Indoor_SplBldWgt_1 -{0x51, 0x00,},//Indoor_SplBldWgt_2 -{0x52, 0x64,},//Indoor_SplBldWgt_3 -{0x53, 0x60,},//Indoor_TgtOff_StdHiTh -{0x54, 0x30,},//Indoor_TgtOff_StdLoTh -{0x55, 0x05,},//Indoor_wInitRg -{0x56, 0xd0,},//Indoor_wInitRg_n01 -{0x57, 0x06,},//Indoor_wInitBg -{0x58, 0x40,},//Indoor_wInitBg_n01 - -{0x59, 0x02,}, //Indoor_aRatioBox -{0x5a, 0xee,}, //Indoor_aRatioBox_a01 -{0x5b, 0x06,}, //Indoor_aRatioBox_a02 -{0x5c, 0x40,}, //Indoor_aRatioBox_a03 -{0x5d, 0x08,}, //Indoor_aRatioBox_a04 -{0x5e, 0x34,}, //Indoor_aRatioBox_a05 -{0x5f, 0x0b,},//Indoor_aRatioBox_a06 -{0x60, 0x54,},//Indoor_aRatioBox_a07 -{0x61, 0x03,}, //Indoor_aRatioBox_a08 -{0x62, 0x52,}, //Indoor_aRatioBox_a09 -{0x63, 0x07,}, //Indoor_aRatioBox_a10 -{0x64, 0xd0,}, //Indoor_aRatioBox_a11 -{0x65, 0x06,}, //Indoor_aRatioBox_a12 -{0x66, 0xa4,}, //Indoor_aRatioBox_a13 -{0x67, 0x08,}, //Indoor_aRatioBox_a14 -{0x68, 0xfc,}, //Indoor_aRatioBox_a15 -{0x69, 0x03,}, //Indoor_aRatioBox_a16 -{0x6a, 0xe8,}, //Indoor_aRatioBox_a17 -{0x6b, 0x0a,}, //Indoor_aRatioBox_a18 -{0x6c, 0x8c,}, //Indoor_aRatioBox_a19 -{0x6d, 0x04,}, //Indoor_aRatioBox_a20 -{0x6e, 0xb0,}, //Indoor_aRatioBox_a21 -{0x6f, 0x07,}, //Indoor_aRatioBox_a22 -{0x70, 0x6c,}, //Indoor_aRatioBox_a23 -{0x71, 0x04,}, //Indoor_aRatioBox_a24 -{0x72, 0xe2,}, //Indoor_aRatioBox_a25 -{0x73, 0x0c,}, //Indoor_aRatioBox_a26 -{0x74, 0x1c,}, //Indoor_aRatioBox_a27 -{0x75, 0x03,}, //Indoor_aRatioBox_a28 -{0x76, 0x84,}, //Indoor_aRatioBox_a29 -{0x77, 0x05,}, //Indoor_aRatioBox_a30 -{0x78, 0xdc,}, //Indoor_aRatioBox_a31 -{0x79, 0x05,}, //Indoor_aRatioBox_a32 -{0x7a, 0xdc,}, //Indoor_aRatioBox_a33 -{0x7b, 0x0c,}, //Indoor_aRatioBox_a34 -{0x7c, 0xe4,}, //Indoor_aRatioBox_a35 -{0x7d, 0x01,}, //Indoor_aRatioBox_a36 -{0x7e, 0xf4,}, //Indoor_aRatioBox_a37 -{0x7f, 0x05,}, //Indoor_aRatioBox_a38 -{0x80, 0x00,}, //Indoor_aRatioBox_a39 - -{0x81, 0x00,}, //Outdoor_wRgIntOfs -{0x82, 0x08,}, //Outdoor_wRgIntOfs_n01 h40->h20 13.5.27 LSC update shift -{0x83, 0x01,}, //Outdoor_wBgIntOfs -{0x84, 0x00,}, //Outdoor_wBgIntOfs_n01 -{0x85, 0x10,}, //Outdoor_bRgStep -{0x86, 0x10,}, //Outdoor_bBgStep -{0x87, 0x51,}, //Outdoor_aTgtWhtRgnBg -{0x88, 0x52,}, //Outdoor_aTgtWhtRgnBg_a01 -{0x89, 0x53,}, //Outdoor_aTgtWhtRgnBg_a02 -{0x8a, 0x57,}, //Outdoor_aTgtWhtRgnBg_a03 -{0x8b, 0x5e,}, //Outdoor_aTgtWhtRgnBg_a04 -{0x8c, 0x64,}, //Outdoor_aTgtWhtRgnBg_a05 -{0x8d, 0x6A,}, //Outdoor_aTgtWhtRgnBg_a06 -{0x8e, 0x6F,}, //Outdoor_aTgtWhtRgnBg_a07 -{0x8f, 0x75,}, //Outdoor_aTgtWhtRgnBg_a08 -{0x90, 0x7c,}, //Outdoor_aTgtWhtRgnBg_a09 -{0x91, 0x84,}, //Outdoor_aTgtWhtRgnBg_a10 -{0x92, 0x5D,}, //Outdoor_aTgtWhtRgnRgLtLmt -{0x93, 0x57,}, //Outdoor_aTgtWhtRgnRgLtLmt_a01 -{0x94, 0x51,}, //Outdoor_aTgtWhtRgnRgLtLmt_a02 -{0x95, 0x50,}, //Outdoor_aTgtWhtRgnRgLtLmt_a03 -{0x96, 0x4e,}, //Outdoor_aTgtWhtRgnRgLtLmt_a04 -{0x97, 0x4c,}, //Outdoor_aTgtWhtRgnRgLtLmt_a05 -{0x98, 0x4b,}, //Outdoor_aTgtWhtRgnRgLtLmt_a06 -{0x99, 0x49,}, //Outdoor_aTgtWhtRgnRgLtLmt_a07 -{0x9a, 0x47,}, //Outdoor_aTgtWhtRgnRgLtLmt_a08 -{0x9b, 0x46,}, //Outdoor_aTgtWhtRgnRgLtLmt_a09 -{0x9c, 0x45,}, //Outdoor_aTgtWhtRgnRgLtLmt_a10 -{0x9d, 0x64,}, //Outdoor_aTgtWhtRgnRgRtLmt -{0x9e, 0x63,}, //Outdoor_aTgtWhtRgnRgRtLmt_a01 -{0x9f, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a02 -{0xa0, 0x62,}, //Outdoor_aTgtWhtRgnRgRtLmt_a03 -{0xa1, 0x61,}, //Outdoor_aTgtWhtRgnRgRtLmt_a04 -{0xa2, 0x60,}, //Outdoor_aTgtWhtRgnRgRtLmt_a05 -{0xa3, 0x5e,}, //Outdoor_aTgtWhtRgnRgRtLmt_a06 -{0xa4, 0x5d,}, //Outdoor_aTgtWhtRgnRgRtLmt_a07 -{0xa5, 0x5c,}, //Outdoor_aTgtWhtRgnRgRtLmt_a08 -{0xa6, 0x5a,}, //Outdoor_aTgtWhtRgnRgRtLmt_a09 -{0xa7, 0x57,}, //Outdoor_aTgtWhtRgnRgRtLmt_a10 -{0xa8, 0x40,}, //Outdoor_aOptWhtRgnBg -{0xa9, 0x45,}, //Outdoor_aOptWhtRgnBg_a01 -{0xaa, 0x4b,}, //Outdoor_aOptWhtRgnBg_a02 -{0xab, 0x54,}, //Outdoor_aOptWhtRgnBg_a03 -{0xac, 0x60,}, //Outdoor_aOptWhtRgnBg_a04 -{0xad, 0x6c,}, //Outdoor_aOptWhtRgnBg_a05 -{0xae, 0x76,}, //Outdoor_aOptWhtRgnBg_a06 -{0xaf, 0x7f,}, //Outdoor_aOptWhtRgnBg_a07 -{0xb0, 0x8c,}, //Outdoor_aOptWhtRgnBg_a08 -{0xb1, 0x95,}, //Outdoor_aOptWhtRgnBg_a09 -{0xb2, 0xa0,}, //Outdoor_aOptWhtRgnBg_a10 -{0xb3, 0x6a,}, //Outdoor_aOptWhtRgnRgLtLmt -{0xb4, 0x5b,}, //Outdoor_aOptWhtRgnRgLtLmt_a01 -{0xb5, 0x53,}, //Outdoor_aOptWhtRgnRgLtLmt_a02 -{0xb6, 0x4c,}, //Outdoor_aOptWhtRgnRgLtLmt_a03 -{0xb7, 0x46,}, //Outdoor_aOptWhtRgnRgLtLmt_a04 -{0xb8, 0x42,}, //Outdoor_aOptWhtRgnRgLtLmt_a05 -{0xb9, 0x3e,}, //Outdoor_aOptWhtRgnRgLtLmt_a06 -{0xba, 0x3c,}, //Outdoor_aOptWhtRgnRgLtLmt_a07 -{0xbb, 0x3a,}, //Outdoor_aOptWhtRgnRgLtLmt_a08 -{0xbc, 0x39,}, //Outdoor_aOptWhtRgnRgLtLmt_a09 -{0xbd, 0x37,}, //Outdoor_aOptWhtRgnRgLtLmt_a10 -{0xbe, 0x7d,}, //Outdoor_aOptWhtRgnRgRtLmt -{0xbf, 0x7c,}, //Outdoor_aOptWhtRgnRgRtLmt_a01 -{0xc0, 0x79,}, //Outdoor_aOptWhtRgnRgRtLmt_a02 -{0xc1, 0x76,}, //Outdoor_aOptWhtRgnRgRtLmt_a03 -{0xc2, 0x6f,}, //Outdoor_aOptWhtRgnRgRtLmt_a04 -{0xc3, 0x6a,}, //Outdoor_aOptWhtRgnRgRtLmt_a05 -{0xc4, 0x66,}, //Outdoor_aOptWhtRgnRgRtLmt_a06 -{0xc5, 0x63,}, //Outdoor_aOptWhtRgnRgRtLmt_a07 -{0xc6, 0x5B,}, //Outdoor_aOptWhtRgnRgRtLmt_a08 -{0xc7, 0x54,}, //Outdoor_aOptWhtRgnRgRtLmt_a09 -{0xc8, 0x4a,}, //Outdoor_aOptWhtRgnRgRtLmt_a10 - -{0xc9, 0x42,}, //Outdoor_aCtmpWgtWdhTh -{0xca, 0x4c,}, //Outdoor_aCtmpWgtWdhTh_a01 -{0xcb, 0x54,}, //Outdoor_aCtmpWgtWdhTh_a02 -{0xcc, 0x5c,}, //Outdoor_aCtmpWgtWdhTh_a03 -{0xcd, 0x64,}, //Outdoor_aCtmpWgtWdhTh_a04 -{0xce, 0x6c,}, //Outdoor_aCtmpWgtWdhTh_a05 -{0xcf, 0x74,}, //Outdoor_aCtmpWgtWdhTh_a06 -{0xd0, 0x42,}, //Outdoor_aCtmpWgtHgtTh -{0xd1, 0x52,}, //Outdoor_aCtmpWgtHgtTh_a01 -{0xd2, 0x58,}, //Outdoor_aCtmpWgtHgtTh_a02 -{0xd3, 0x5e,}, //Outdoor_aCtmpWgtHgtTh_a03 -{0xd4, 0x64,}, //Outdoor_aCtmpWgtHgtTh_a04 -{0xd5, 0x6a,}, //Outdoor_aCtmpWgtHgtTh_a05 -{0xd6, 0x72,}, //Outdoor_aCtmpWgtHgtTh_a06 -{0xd7, 0x7a,}, //Outdoor_aCtmpWgtHgtTh_a07 -{0xd8, 0x88,}, //Outdoor_aCtmpWgtHgtTh_a08 -{0xd9, 0x11,}, //Outdoor_aCtmpWgt -{0xda, 0x23,}, //Outdoor_aCtmpWgt_a01 -{0xdb, 0x22,}, //Outdoor_aCtmpWgt_a02 -{0xdc, 0x11,}, //Outdoor_aCtmpWgt_a03 -{0xdd, 0x22,}, //Outdoor_aCtmpWgt_a04 -{0xde, 0x22,}, //Outdoor_aCtmpWgt_a05 -{0xdf, 0x11,}, //Outdoor_aCtmpWgt_a06 -{0xe0, 0x33,}, //Outdoor_aCtmpWgt_a07 -{0xe1, 0x31,}, //Outdoor_aCtmpWgt_a08 -{0xe2, 0x12,}, //Outdoor_aCtmpWgt_a09 -{0xe3, 0x66,}, //Outdoor_aCtmpWgt_a10 -{0xe4, 0x41,}, //Outdoor_aCtmpWgt_a11 -{0xe5, 0x13,}, //Outdoor_aCtmpWgt_a12 -{0xe6, 0x77,}, //Outdoor_aCtmpWgt_a13 -{0xe7, 0x41,}, //Outdoor_aCtmpWgt_a14 -{0xe8, 0x13,}, //Outdoor_aCtmpWgt_a15 -{0xe9, 0x74,}, //Outdoor_aCtmpWgt_a16 -{0xea, 0x11,}, //Outdoor_aCtmpWgt_a17 -{0xeb, 0x23,}, //Outdoor_aCtmpWgt_a18 -{0xec, 0x53,}, //Outdoor_aCtmpWgt_a19 -{0xed, 0x11,}, //Outdoor_aCtmpWgt_a20 -{0xee, 0x43,}, //Outdoor_aCtmpWgt_a21 -{0xef, 0x31,}, //Outdoor_aCtmpWgt_a22 -{0xf0, 0x11,}, //Outdoor_aCtmpWgt_a23 -{0xf1, 0x11,}, //Outdoor_aCtmpWgt_a24 - -{0xf2, 0x12,}, //aYlvlWgt -{0xf3, 0x34,}, //aYlvlWgt_a01 -{0xf4, 0x43,}, //aYlvlWgt_a02 -{0xf5, 0x32,}, //aYlvlWgt_a03 -{0xf6, 0x22,}, //aYlvlWgt_a04 -{0xf7, 0x11,}, //aYlvlWgt_a05 -{0xf8, 0x11,}, //aYlvlWgt_a06 -{0xf9, 0x11,}, //aYlvlWgt_a07 -{0xfa, 0x11,}, //aYlvlWgt_a08 -{0xfb, 0x11,}, //aYlvlWgt_a09 -{0xfc, 0x11,}, //aYlvlWgt_a10 -{0xfd, 0x11,}, //aYlvlWgt_a11 -{0x0e, 0x00,}, // burst end - -//Page ca -{0x03, 0xca,}, -{0x0e, 0x01,}, // burst start - -{0x10, 0x11,}, //aYlvlWgt_a12 -{0x11, 0x22,}, //aYlvlWgt_a13 -{0x12, 0x22,}, //aYlvlWgt_a14 -{0x13, 0x11,}, //aYlvlWgt_a15 - -{0x14, 0x64,},//Outdoor_aTgtAngle -{0x15, 0x6b,},//Outdoor_aTgtAngle_a01 -{0x16, 0x72,},//Outdoor_aTgtAngle_a02 -{0x17, 0x7a,},//Outdoor_aTgtAngle_a03 -{0x18, 0x84,},//Outdoor_aTgtAngle_a04 -{0x19, 0x16,},//Outdoor_aRgTgtOfs -{0x1a, 0x0e,},//Outdoor_aRgTgtOfs_a01 -{0x1b, 0x82,},//Outdoor_aRgTgtOfs_a02 -{0x1c, 0x88,},//Outdoor_aRgTgtOfs_a03 -{0x1d, 0x88,},//Outdoor_aRgTgtOfs_a04 - -{0x1e, 0x9e,},//Outdoor_aBgTgtOfs -{0x1f, 0x8b,},//Outdoor_aBgTgtOfs_a01 -{0x20, 0x89,},//Outdoor_aBgTgtOfs_a02 -{0x21, 0x87,},//Outdoor_aBgTgtOfs_a03 -{0x22, 0x84,},//Outdoor_aBgTgtOfs_a04 - -{0x23, 0x92,},//Outdoor_bRgDefTgt -{0x24, 0x8d,},//Outdoor_bBgDefTgt - -{0x25, 0x1c,}, //Outdoor_aWhtPtTrcAglOfs -{0x26, 0x1a,}, //Outdoor_aWhtPtTrcAglOfs_a01 -{0x27, 0x18,}, //Outdoor_aWhtPtTrcAglOfs_a02 -{0x28, 0x16,}, //Outdoor_aWhtPtTrcAglOfs_a03 -{0x29, 0x14,}, //Outdoor_aWhtPtTrcAglOfs_a04 -{0x2a, 0x12,}, //Outdoor_aWhtPtTrcAglOfs_a05 -{0x2b, 0x10,}, //Outdoor_aWhtPtTrcAglOfs_a06 -{0x2c, 0x0f,}, //Outdoor_aWhtPtTrcAglOfs_a07 -{0x2d, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a08 -{0x2e, 0x0e,}, //Outdoor_aWhtPtTrcAglOfs_a09 -{0x2f, 0x0a,}, //Outdoor_bWhtPtTrcCnt -{0x30, 0x28,}, //Outdoor_aRtoDiffThNrBp -{0x31, 0x48,}, //Outdoor_aRtoDiffThNrBp_a01 -{0x32, 0x28,}, //Outdoor_aAglDiffThTrWhtPt -{0x33, 0x50,}, //Outdoor_aAglDiffThTrWhtPt_a01 -{0x34, 0xaa,}, //Outdoor_bWgtRatioTh1 -{0x35, 0xa0,}, //Outdoor_bWgtRatioTh2 -{0x36, 0x0a,}, //Outdoor_bWgtOfsTh1 -{0x37, 0xa0,}, //Outdoor_bWgtOfsTh2 - -{0x38, 0x6d,},//Outdoor_bWhtPtCorAglMin -{0x39, 0x78,},//Outdoor_bWhtPtCorAglMax - -{0x3a, 0x04,}, //Outdoor_bYlvlMin -{0x3b, 0xf8,}, //Outdoor_bYlvlMax -{0x3c, 0x28,}, //Outdoor_bPxlWgtLmtLoTh -{0x3d, 0x78,}, //Outdoor_bPxlWgtLmtHiTh -{0x3e, 0x00,}, //Outdoor_SplBldWgt_1 -{0x3f, 0x00,}, //Outdoor_SplBldWgt_2 -{0x40, 0x64,}, //Outdoor_SplBldWgt_3 -{0x41, 0x60,}, //Outdoor_TgtOff_StdHiTh -{0x42, 0x30,}, //Outdoor_TgtOff_StdLoTh -{0x43, 0x04,}, -{0x44, 0xc0,}, -{0x45, 0x07,}, -{0x46, 0xc0,}, -{0x47, 0x02,},//Outdoor_aRatioBox -{0x48, 0xb2,},//Outdoor_aRatioBox_a01 -{0x49, 0x05,},//Outdoor_aRatioBox_a02 -{0x4a, 0xdc,},//Outdoor_aRatioBox_a03 -{0x4b, 0x0a,},//Outdoor_aRatioBox_a04 -{0x4c, 0x28,},//Outdoor_aRatioBox_a05 -{0x4d, 0x0c,},//Outdoor_aRatioBox_a06 -{0x4e, 0x1c,},//Outdoor_aRatioBox_a07 -{0x4f, 0x02,},//Outdoor_aRatioBox_a08 -{0x50, 0xee,},//Outdoor_aRatioBox_a09 -{0x51, 0x06,},//Outdoor_aRatioBox_a10 -{0x52, 0x72,},//Outdoor_aRatioBox_a11 -{0x53, 0x08,},//Outdoor_aRatioBox_a12 -{0x54, 0x98,},//Outdoor_aRatioBox_a13 -{0x55, 0x0a,},//Outdoor_aRatioBox_a14 -{0x56, 0xf0,},//Outdoor_aRatioBox_a15 -{0x57, 0x03,},//Outdoor_aRatioBox_a16 -{0x58, 0x20,},//Outdoor_aRatioBox_a17 -{0x59, 0x07,},//Outdoor_aRatioBox_a18 -{0x5a, 0x08,},//Outdoor_aRatioBox_a19 -{0x5b, 0x07,},//Outdoor_aRatioBox_a20 -{0x5c, 0x6c,},//Outdoor_aRatioBox_a21 -{0x5d, 0x09,},//Outdoor_aRatioBox_a22 -{0x5e, 0x60,},//Outdoor_aRatioBox_a23 -{0x5f, 0x03,},//Outdoor_aRatioBox_a24 -{0x60, 0x84,},//Outdoor_aRatioBox_a25 -{0x61, 0x07,},//Outdoor_aRatioBox_a26 -{0x62, 0xd0,},//Outdoor_aRatioBox_a27 -{0x63, 0x06,},//Outdoor_aRatioBox_a28 -{0x64, 0x40,},//Outdoor_aRatioBox_a29 -{0x65, 0x08,},//Outdoor_aRatioBox_a30 -{0x66, 0x34,},//Outdoor_aRatioBox_a31 -{0x67, 0x03,},//Outdoor_aRatioBox_a32 -{0x68, 0xe8,},//Outdoor_aRatioBox_a33 -{0x69, 0x08,},//Outdoor_aRatioBox_a34 -{0x6a, 0xd0,},//Outdoor_aRatioBox_a35 -{0x6b, 0x04,},//Outdoor_aRatioBox_a36 -{0x6c, 0x4c,},//Outdoor_aRatioBox_a37 -{0x6d, 0x07,},//Outdoor_aRatioBox_a38 -{0x6e, 0x08,},//Outdoor_aRatioBox_a39 - -{0x6f, 0x04,}, -{0x70, 0x00,}, - -{0x71, 0x05,},//Out2_Adt_RgainMin -{0x72, 0x00,},//Out2_Adt_RgainMin_n01 -{0x73, 0x05,}, //Out2_Adt_RgainMax -{0x74, 0xe0,},//Out2_Adt_RgainMax_n01 -{0x75, 0x04,},//Out2_Adt_GgainMin -{0x76, 0x00,},//Out2_Adt_GgainMin_n01 -{0x77, 0x04,},//Out2_Adt_GgainMax -{0x78, 0x00,},//Out2_Adt_GgainMax_n01 -{0x79, 0x05,}, //Out2_Adt_BgainMin -{0x7a, 0xe0,}, //Out2_Adt_BgainMin_n01 -{0x7b, 0x07,},//Out2_Adt_BgainMax -{0x7c, 0x00,},//Out2_Adt_BgainMax_n01 - -{0x7d, 0x05,},//Out1_Adt_RgainMin -{0x7e, 0x40,},//Out1_Adt_RgainMin_n01 -{0x7f, 0x06,},//Out1_Adt_RgainMax -{0x80, 0x80,}, //Out1_Adt_RgainMax_n01 -{0x81, 0x04,},//Out1_Adt_GgainMin -{0x82, 0x00,},//Out1_Adt_GgainMin_n01 -{0x83, 0x04,},//Out1_Adt_GgainMax -{0x84, 0x00,},//Out1_Adt_GgainMax_n01 -{0x85, 0x05,},//Out1_Adt_BgainMin -{0x86, 0x80,},//Out1_Adt_BgainMin_n01 -{0x87, 0x07,},//Out1_Adt_BgainMax -{0x88, 0xe0,}, //Out1_Adt_BgainMax_n01 - -{0x89, 0x04,},//In_Adt_RgainMin -{0x8a, 0x00,},//In_Adt_RgainMin_n01 -{0x8b, 0x0d,},//In_Adt_RgainMax -{0x8c, 0x00,},//In_Adt_RgainMax_n01 -{0x8d, 0x04,},//In_Adt_GgainMin -{0x8e, 0x00,},//In_Adt_GgainMin_n01 -{0x8f, 0x05,},//In_Adt_GgainMax -{0x90, 0x80,}, //In_Adt_GgainMax_n01 -{0x91, 0x04,},//In_Adt_BgainMin -{0x92, 0x00,},//In_Adt_BgainMin_n01 -{0x93, 0x0d,},//In_Adt_BgainMax -{0x94, 0x80,},//In_Adt_BgainMax_n01 - -{0x95, 0x04,},//Manual_Adt_RgainMin -{0x96, 0x00,},//Manual_Adt_RgainMin_n01 -{0x97, 0x0d,},//Manual_Adt_RgainMax -{0x98, 0x00,},//Manual_Adt_RgainMax_n01 -{0x99, 0x04,},//Manual_Adt_GgainMin -{0x9a, 0x00,},//Manual_Adt_GgainMin_n01 -{0x9b, 0x04,}, //Manual_Adt_GgainMax -{0x9c, 0x80,}, //Manual_Adt_GgainMax_n01 -{0x9d, 0x04,},//Manual_Adt_BgainMin -{0x9e, 0x00,},//Manual_Adt_BgainMin_n01 -{0x9f, 0x0b,},//Manual_Adt_BgainMax -{0xa0, 0x00,},//Manual_Adt_BgainMax_n01 - -{0x0e, 0x00,}, //burst end - -{0x03, 0xC8,}, -{0x11, 0xC3,}, //AWB reset - - -///////////////////////////////////////////////////////////////////////////////// -// CD page(OTP control) -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCD,}, -{0x10, 0x03,}, - -{0x22, 0x10,}, -//Manual Typical colo ratio write -{0x27, 0x1A,}, //Typical RG=0.685*1000 = 6850 = 1AC2 -{0x28, 0xC2,}, -{0x29, 0x10,}, //Typical BG=0.430*1000 = 4300 = 10CC -{0x2A, 0xCC,}, -{0x2b, 0x0a,},//+/-10 valid ratio check - -/////////////////////////////////////////////////////////////////////////////// -// Color ratio setting -///////////////////////////////////////////////////////////////////////////////// -{0x03, 0xCE,}, - -{0x33, 0x04,}, //R gain def -{0x34, 0x00,}, -{0x35, 0x04,}, //G gain def -{0x36, 0x00,}, -{0x37, 0x04,}, //B gain def -{0x38, 0x00,}, - -{0x45, 0x00,}, //Outdoor In EvTh -{0x46, 0x00,}, -{0x47, 0x27,}, -{0x48, 0x10,}, -{0x49, 0x00,}, //Outdoor Out EvTh -{0x4a, 0x00,}, -{0x4b, 0x4e,}, -{0x4c, 0x20,}, - -{0x55, 0x48,}, //Low In Th -{0x56, 0x52,}, //Low Out Th -{0x57, 0x60,}, //High Out Th -{0x58, 0x70,}, //High In Th - -{0x62, 0xd8,}, //Out weight //ca->d8 -{0x63, 0xa6,}, //Indoor weight -{0x64, 0x88,}, //Dark weight -{0x65, 0xe8,}, //Low weight -{0x66, 0xa6,}, //High weight - -{0x31, 0x01,}, //Color ratio reset -{0x30, 0x98,}, //Color ratio on - -/////////////////////////////////////////////////////////////////////////////// -// D3 ~ D8 Page (Adaptive) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xd3,}, // Adaptive start - -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, -{0x11, 0x00,}, -{0x12, 0x00,}, -{0x13, 0x00,}, -{0x14, 0x00,}, -{0x15, 0x00,}, -{0x16, 0x00,}, -{0x17, 0x00,}, -{0x18, 0x00,}, -{0x19, 0x00,}, - -{0x1a, 0x00,}, // Def_Yoffset -{0x1b, 0x32,}, // DYOFS_Ratio -{0x1c, 0x00,}, // DYOFS_Limit //10 - -{0x1d, 0x00,}, //EV Th OutEnd : 120fps AG 1x DG 1x -{0x1e, 0x00,}, -{0x1f, 0x20,}, -{0x20, 0x8d,}, - -{0x21, 0x00,}, //EV Th OutStr : 80fps Ag 1x Dg 1x -{0x22, 0x00,}, -{0x23, 0x30,}, -{0x24, 0xd4,}, - -{0x25, 0x00,}, //EV Th Dark1Str -{0x26, 0x03,}, -{0x27, 0x70,}, -{0x28, 0xf0,}, - -{0x29, 0x00,}, //EV Th Dark1End -{0x2a, 0x05,}, -{0x2b, 0x57,}, -{0x2c, 0x30,}, - -{0x2d, 0x00,}, //EV Th Dark2Str -{0x2e, 0x06,}, -{0x2f, 0x1a,}, -{0x30, 0x80,}, - -{0x31, 0x00,}, //EV Th Dark2End -{0x32, 0x08,}, -{0x33, 0x86,}, -{0x34, 0xb6,}, - -{0x35, 0x4b,}, //Ctmp LT End -{0x36, 0x52,}, //Ctmp LT Str -{0x37, 0x69,}, //Ctmp HT Str -{0x38, 0x73,}, //Ctmp HT End - -{0x39, 0x00,},// LSC_EvTh_OutEnd_4 -{0x3a, 0x00,},// LSC_EvTh_OutEnd_3 -{0x3b, 0x13,},// LSC_EvTh_OutEnd_2 -{0x3c, 0x88,},// LSC_EvTh_OutEnd_1 def : 200fps Ag 1x Dg 1x - -{0x3d, 0x00,},// LSC_EvTh_OutStr_4 -{0x3e, 0x00,},// LSC_EvTh_OutStr_3 -{0x3f, 0x30,},// LSC_EvTh_OutStr_2 -{0x40, 0xd4,},// LSC_EvTh_OutStr_1 def : 80fps Ag 1x Dg 1x - -{0x41, 0x00,},// LSC_EvTh_Dark1Str_4 -{0x42, 0x05,},// LSC_EvTh_Dark1Str_3 -{0x43, 0xb8,},// LSC_EvTh_Dark1Str_2 -{0x44, 0xd8,},// LSC_EvTh_Dark1Str_1 def : 8fps Ag 3x Dg 1x - -{0x45, 0x00,},// LSC_EvTh_Dark1End_4 -{0x46, 0x0b,},// LSC_EvTh_Dark1End_3 -{0x47, 0x71,},// LSC_EvTh_Dark1End_2 -{0x48, 0xb0,},// LSC_EvTh_Dark1End_1 def : 8fps Ag 6x Dg 1x - -{0x49, 0x00,},// LSC_EvTh_Dark2Str_4 -{0x4a, 0x0f,},// LSC_EvTh_Dark2Str_3 -{0x4b, 0x42,},// LSC_EvTh_Dark2Str_2 -{0x4c, 0x40,},// LSC_EvTh_Dark2Str_1 def : 8fps Ag 8x Dg 1x - -{0x4d, 0x00,},// LSC_EvTh_Dark2End_4 -{0x4e, 0x1e,},// LSC_EvTh_Dark2End_3 -{0x4f, 0x84,},// LSC_EvTh_Dark2End_2 -{0x50, 0x80,},// LSC_EvTh_Dark2End_1 def : 4fps Ag 8x Dg 1x - -{0x51, 0x55,},//LSC Ctmp LTEnd Out -{0x52, 0x64,}, //LSC Ctmp LTStr Out -{0x53, 0x78,},//LSC Ctmp HTStr Out -{0x54, 0x86,},//LSC Ctmp HTEnd Out - -{0x55, 0x46,}, //LSC Ctmp LTEnd In -{0x56, 0x56,}, //LSC Ctmp LTStr In -{0x57, 0x6e,}, //LSC Ctmp HTStr In -{0x58, 0x76,}, //LSC Ctmp HTEnd In - -{0x59, 0x50,}, // LSC_CTmpTh_LT_End_Dark -{0x5a, 0x78,}, // LSC_CTmpTh_LT_Str_Dark -{0x5b, 0xa0,}, // LSC_CTmpTh_HT_Str_Dark -{0x5c, 0xb4,}, // LSC_CTmpTh_HT_End_Dark - -{0x5d, 0x00,}, // UniScn_EvMinTh_4 -{0x5e, 0x00,}, // UniScn_EvMinTh_3 -{0x5f, 0x04,}, // UniScn_EvMinTh_2 -{0x60, 0xe2,}, // UniScn_EvMinTh_1 def : 600fps Ag 1x Dg 1x - -{0x61, 0x00,}, // UniScn_EvMaxTh_4 -{0x62, 0x05,}, // UniScn_EvMaxTh_3 -{0x63, 0xb8,}, // UniScn_EvMaxTh_2 -{0x64, 0xd8,}, // UniScn_EvMaxTh_1 def : 8fps Ag 3x Dg 1x - -{0x65, 0x4e,}, // UniScn_AglMinTh_1 -{0x66, 0x50,}, // UniScn_AglMinTh_2 -{0x67, 0x73,}, // UniScn_AglMaxTh_1 -{0x68, 0x7d,}, // UniScn_AglMaxTh_2 - -{0x69, 0x03,}, // UniScn_YstdMinTh -{0x6a, 0x0a,},// UniScn_YstdMaxTh -{0x6b, 0x1e,}, // UniScn_BPstdMinTh -{0x6c, 0x34,},// UniScn_BPstdMaxTh - -{0x6d, 0x64,}, // Ytgt_ColWgt_Out -{0x6e, 0x64,}, // Ytgt_ColWgt_Dark -{0x6f, 0x64,}, // ColSat_ColWgt_Out -{0x70, 0x64,}, // ColSat_ColWgt_Dark -{0x71, 0x64,}, // CMC_ColWgt_Out -{0x72, 0x64,}, // CMC_ColWgt_Dark -{0x73, 0x64,}, // MCMC_ColWgt_Out -{0x74, 0x64,}, // MCMC_ColWgt_Dark -{0x75, 0x64,}, // CustomReg_CorWgt_Out -{0x76, 0x64,}, // CustomReg_CorWgt_Dark - -{0x77, 0x64,}, // UniScn_Y_Ratio -{0x78, 0x50,}, // UniScn_Cb_Ratio -{0x79, 0x50,}, // UniScn_Cr_Ratio - -{0x7a, 0x00,}, // Ytgt_offset -{0x7b, 0x00,}, // CbSat_offset -{0x7c, 0x00,}, // CrSat_offset - -{0x7d, 0x36,}, // Y_target_Outdoor -{0x7e, 0x3c,}, // Y_target_Indoor -{0x7f, 0x3c,}, // Y_target_Dark1 -{0x80, 0x3c,}, // Y_target_Dark2 -{0x81, 0x3c,}, // Y_target_LowTemp -{0x82, 0x3c,}, // Y_target_HighTemp - -{0x83, 0x80,}, // Cb_Outdoor -{0x84, 0x95,}, // Cb _Sat_Indoor -{0x85, 0xa0,}, // Cb _Sat_Dark1 -{0x86, 0x84,}, // Cb _Sat_Dark2 -{0x87, 0x88,}, // Cb _Sat_LowTemp -{0x88, 0x92,}, // Cb _Sat_HighTemp - -{0x89, 0x80,}, // Cr _Sat_Outdoor -{0x8a, 0x90,}, // Cr _Sat_Indoor -{0x8b, 0xa0,}, // Cr _Sat_Dark1 -{0x8c, 0x80,}, // Cr _Sat_Dark2 -{0x8d, 0x75,}, // Cr _Sat_LowTemp -{0x8e, 0x92,}, // Cr _Sat_HighTemp - -{0x8f, 0x82,}, // BLC_ofs_r_Outdoor -{0x90, 0x81,}, // BLC_ofs_b_Outdoor -{0x91, 0x82,}, // BLC_ofs_gr_Outdoor -{0x92, 0x82,}, // BLC_ofs_gb_Outdoor - -{0x93, 0x81,}, // BLC_ofs_r_Indoor -{0x94, 0x80,}, // BLC_ofs_b_Indoor -{0x95, 0x81,}, // BLC_ofs_gr_Indoor -{0x96, 0x81,}, // BLC_ofs_gb_Indoor - -{0x97, 0x84,}, // BLC_ofs_r_Dark1 -{0x98, 0x84,}, // BLC_ofs_b_Dark1 -{0x99, 0x85,}, // BLC_ofs_gr_Dark1 -{0x9a, 0x85,}, // BLC_ofs_gb_Dark1 - -{0x9b, 0x84,}, // BLC_ofs_r_Dark2 -{0x9c, 0x84,}, // BLC_ofs_b_Dark2 -{0x9d, 0x85,}, // BLC_ofs_gr_Dark2 -{0x9e, 0x85,}, // BLC_ofs_gb_Dark2 - -{0x9f, 0x00,},//LSC Out_L ofs G -{0xa0, 0x00,},//LSC Out_L ofs B -{0xa1, 0x00,},//LSC Out_L ofs R -{0xa2, 0x80,},//LSC Out_L Gain G -{0xa3, 0x82,},//LSC Out_L Gain B -{0xa4, 0x88,},//LSC Out_L Gain R - -{0xa5, 0x00,},//LSC Out_M ofs G -{0xa6, 0x00,},//LSC Out_M ofs B -{0xa7, 0x00,},//LSC Out_M ofs R -{0xa8, 0x80,},//LSC Out_M Gain G -{0xa9, 0x84,},//LSC Out_M Gain B -{0xaa, 0x85,},//LSC Out_M Gain R - -{0xab, 0x00,},//LSC Out_H ofs G -{0xac, 0x00,},//LSC Out_H ofs B -{0xad, 0x00,},//LSC Out_H ofs R -{0xae, 0x80,},//LSC Out_H Gain G -{0xaf, 0x86,},//LSC Out_H Gain B -{0xb0, 0x7e,},//LSC Out_H Gain R - -{0xb1, 0x00,},// LSC0_Ind_LowTmp offset g -{0xb2, 0x00,},// LSC1_Ind_LowTmp offset b -{0xb3, 0x00,},// LSC2_Ind_LowTmp offset r -{0xb4, 0x80,},// LSC3_Ind_LowTmp gain g -{0xb5, 0x80,},// LSC4_Ind_LowTmp gain b -{0xb6, 0x84,},// LSC5_Ind_LowTmp gain r - -{0xb7, 0x00,},// LSC0_Ind_MiddleTmp offset g -{0xb8, 0x00,},// LSC1_Ind_MiddleTmp offset b -{0xb9, 0x00,},// LSC2_Ind_MiddleTmp offset r -{0xba, 0x80,},// LSC3_Ind_MiddleTmp gain g -{0xbb, 0x80,},// LSC4_Ind_MiddleTmp gain b -{0xbc, 0x78,},// LSC5_Ind_MiddleTmp gain r - -{0xbd, 0x00,},// LSC0_Ind_HighTmp offset g -{0xbe, 0x00,},// LSC1_Ind_HighTmp offset b -{0xbf, 0x00,},// LSC2_Ind_HighTmp offset r -{0xc0, 0x80,},// LSC3_Ind_HighTmp gain g -{0xc1, 0x80,},// LSC4_Ind_HighTmp gain b -{0xc2, 0x7a,},// LSC5_Ind_HighTmp gain r - -{0xc3, 0x00,}, // LSC0_Dark1_LowTmp offset g -{0xc4, 0x00,}, // LSC1_Dark1_LowTmp offset b -{0xc5, 0x00,}, // LSC2_Dark1_LowTmp offset r -{0xc6, 0x68,}, // LSC3_Dark1_LowTmp gain g -{0xc7, 0x65,},// LSC4_Dark1_LowTmp gain b -{0xc8, 0x62,},// LSC5_Dark1_LowTmp gain r - -{0xc9, 0x00,}, // LSC0_Dark1_MiddleTmp offset g -{0xca, 0x00,}, // LSC1_Dark1_MiddleTmp offset b -{0xcb, 0x00,}, // LSC2_Dark1_MiddleTmp offset r -{0xcc, 0x68,}, // LSC3_Dark1_MiddleTmp gain g -{0xcd, 0x65,},// LSC4_Dark1_MiddleTmp gain b -{0xce, 0x62,},// LSC5_Dark1_MiddleTmp gain r - -{0xcf, 0x00,}, // LSC0_Dark1_HighTmp offset g -{0xd0, 0x00,}, // LSC1_Dark1_HighTmp offset b -{0xd1, 0x00,}, // LSC2_Dark1_HighTmp offset r -{0xd2, 0x68,}, // LSC3_Dark1_HighTmp gain g -{0xd3, 0x65,},// LSC4_Dark1_HighTmp gain b -{0xd4, 0x62,},// LSC5_Dark1_HighTmp gain r - -{0xd5, 0x00,}, // LSC0_Dark2 offset g -{0xd6, 0x00,}, // LSC1_Dark2 offset b -{0xd7, 0x00,}, // LSC2_Dark2 offset r -{0xd8, 0x68,}, // LSC3_Dark2 gain g -{0xd9, 0x65,},// LSC4_Dark2 gain b -{0xda, 0x62,},// LSC5_Dark2 gain r - -{0xdb, 0x2f,}, //CMCSIGN_Out -{0xdc, 0x55,}, //CMC_Out_00 -{0xdd, 0x1c,}, //CMC_Out_01 -{0xde, 0x07,}, //CMC_Out_02 -{0xdf, 0x0a,}, //CMC_Out_03 -{0xe0, 0x51,}, //CMC_Out_04 -{0xe1, 0x07,}, //CMC_Out_05 -{0xe2, 0x01,}, //CMC_Out_06 -{0xe3, 0x14,}, //CMC_Out_07 -{0xe4, 0x55,}, //CMC_Out_08 - -{0xe5, 0x04,}, // CMC_Out_LumTh1 CMC SP gain axis X(luminance) -{0xe6, 0x0a,}, // CMC_Out_LumTh2 -{0xe7, 0x10,}, // CMC_Out_LumTh3 -{0xe8, 0x18,}, // CMC_Out_LumTh4 -{0xe9, 0x20,}, // CMC_Out_LumTh5 -{0xea, 0x28,}, // CMC_Out_LumTh6 -{0xeb, 0x40,}, // CMC_Out_LumTh7 - -{0xec, 0x20,}, // CMC_Out_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0xed, 0x20,}, // CMC_Out_LumGain2_R -{0xee, 0x20,}, // CMC_Out_LumGain3_R -{0xef, 0x20,}, // CMC_Out_LumGain4_R -{0xf0, 0x20,}, // CMC_Out_LumGain5_R -{0xf1, 0x20,}, // CMC_Out_LumGain6_R -{0xf2, 0x20,}, // CMC_Out_LumGain7_R -{0xf3, 0x20,}, // CMC_Out_LumGain8_R 20 = x1.0 - -{0xf4, 0x20,}, // CMC_Out_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0xf5, 0x20,}, // CMC_Out_LumGain2_G -{0xf6, 0x20,}, // CMC_Out_LumGain3_G -{0xf7, 0x20,}, // CMC_Out_LumGain4_G -{0xf8, 0x20,}, // CMC_Out_LumGain5_G -{0xf9, 0x20,}, // CMC_Out_LumGain6_G -{0xfa, 0x20,}, // CMC_Out_LumGain7_G -{0xfb, 0x20,}, // CMC_Out_LumGain8_G 20 = x1.0 - -{0xfc, 0x20,}, // CMC_Out_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0xfd, 0x20,}, // CMC_Out_LumGain2_B -{0x0e, 0x00,}, // burst end - -{0x03, 0xd4,}, // page D4 -{0x0e, 0x01,}, // burst start - -{0x10, 0x20,}, // CMC_Out_LumGain3_B -{0x11, 0x20,}, // CMC_Out_LumGain4_B -{0x12, 0x20,}, // CMC_Out_LumGain5_B -{0x13, 0x20,}, // CMC_Out_LumGain6_B -{0x14, 0x20,}, // CMC_Out_LumGain7_B -{0x15, 0x20,}, // CMC_Out_LumGain8_B 20 = x1.0 - -{0x16, 0x2f,}, //CMCSIGN_In_Mid -{0x17, 0x53,}, //CMC_In_Mid_00 -{0x18, 0x16,}, //CMC_In_Mid_01 -{0x19, 0x03,}, //CMC_In_Mid_02 -{0x1a, 0x10,}, //CMC_In_Mid_03 -{0x1b, 0x53,}, //CMC_In_Mid_04 -{0x1c, 0x03,}, //CMC_In_Mid_05 -{0x1d, 0x04,}, //CMC_In_Mid_06 -{0x1e, 0x1d,}, //CMC_In_Mid_07 -{0x1f, 0x61,}, //CMC_In_Mid_08 - -{0x20, 0x04,}, // CMC_Ind_LumTh1 CMC SP gain axis X(luminance) -{0x21, 0x0a,}, // CMC_Ind_LumTh2 -{0x22, 0x10,}, // CMC_Ind_LumTh3 -{0x23, 0x18,}, // CMC_Ind_LumTh4 -{0x24, 0x20,}, // CMC_Ind_LumTh5 -{0x25, 0x28,}, // CMC_Ind_LumTh6 -{0x26, 0x40,}, // CMC_Ind_LumTh7 - -{0x27, 0x08,}, // CMC_Ind_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x28, 0x12,}, // CMC_Ind_LumGain2_R -{0x29, 0x18,}, // CMC_Ind_LumGain3_R -{0x2a, 0x1c,}, // CMC_Ind_LumGain4_R -{0x2b, 0x1e,}, // CMC_Ind_LumGain5_R -{0x2c, 0x20,}, // CMC_Ind_LumGain6_R -{0x2d, 0x20,}, // CMC_Ind_LumGain7_R -{0x2e, 0x20,}, // CMC_Ind_LumGain8_R 20 = x1.0 - -{0x2f, 0x08,}, // CMC_Ind_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x30, 0x12,}, // CMC_Ind_LumGain2_G -{0x31, 0x18,}, // CMC_Ind_LumGain3_G -{0x32, 0x1c,}, // CMC_Ind_LumGain4_G -{0x33, 0x1e,}, // CMC_Ind_LumGain5_G -{0x34, 0x20,}, // CMC_Ind_LumGain6_G -{0x35, 0x20,}, // CMC_Ind_LumGain7_G -{0x36, 0x20,}, // CMC_Ind_LumGain8_G 20 = x1.0 - -{0x37, 0x08,}, // CMC_Ind_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x38, 0x12,}, // CMC_Ind_LumGain2_B -{0x39, 0x18,}, // CMC_Ind_LumGain3_B -{0x3a, 0x1c,}, // CMC_Ind_LumGain4_B -{0x3b, 0x1e,}, // CMC_Ind_LumGain5_B -{0x3c, 0x20,}, // CMC_Ind_LumGain6_B -{0x3d, 0x20,}, // CMC_Ind_LumGain7_B -{0x3e, 0x20,}, // CMC_Ind_LumGain8_B 20 = x1.0 - -{0x3f, 0x2f,}, //CMCSIGN_Dark1 -{0x40, 0x53,}, //CMC_Dark1_00 -{0x41, 0x1c,}, //CMC_Dark1_01 -{0x42, 0x09,}, //CMC_Dark1_02 -{0x43, 0x0e,}, //CMC_Dark1_03 -{0x44, 0x53,}, //CMC_Dark1_04 -{0x45, 0x05,}, //CMC_Dark1_05 -{0x46, 0x03,}, //CMC_Dark1_06 -{0x47, 0x23,}, //CMC_Dark1_07 -{0x48, 0x66,}, //CMC_Dark1_08 - -{0x49, 0x04,}, // CMC_Dark1_LumTh1 CMC SP gain axis X(luminance) -{0x4a, 0x0a,}, // CMC_Dark1_LumTh2 -{0x4b, 0x10,}, // CMC_Dark1_LumTh3 -{0x4c, 0x18,}, // CMC_Dark1_LumTh4 -{0x4d, 0x20,}, // CMC_Dark1_LumTh5 -{0x4e, 0x28,}, // CMC_Dark1_LumTh6 -{0x4f, 0x40,}, // CMC_Dark1_LumTh7 - -{0x50, 0x08,}, // CMC_Dark1_LumGain1_R CMC SP R gain axis Y (gain):: max32 -{0x51, 0x12,}, // CMC_Dark1_LumGain2_R -{0x52, 0x18,}, // CMC_Dark1_LumGain3_R -{0x53, 0x1c,}, // CMC_Dark1_LumGain4_R -{0x54, 0x1e,}, // CMC_Dark1_LumGain5_R -{0x55, 0x20,}, // CMC_Dark1_LumGain6_R -{0x56, 0x20,}, // CMC_Dark1_LumGain7_R -{0x57, 0x20,}, // CMC_Dark1_LumGain8_R 20 = x1.0 - -{0x58, 0x08,}, // CMC_Dark1_LumGain1_G CMC SP G gain axis Y (gain):: max32 -{0x59, 0x12,}, // CMC_Dark1_LumGain2_G -{0x5a, 0x18,}, // CMC_Dark1_LumGain3_G -{0x5b, 0x1c,}, // CMC_Dark1_LumGain4_G -{0x5c, 0x1e,}, // CMC_Dark1_LumGain5_G -{0x5d, 0x20,}, // CMC_Dark1_LumGain6_G -{0x5e, 0x20,}, // CMC_Dark1_LumGain7_G -{0x5f, 0x20,}, // CMC_Dark1_LumGain8_G 20 = x1.0 - -{0x60, 0x08,}, // CMC_Dark1_LumGain1_B CMC SP B gain axis Y (gain):: max32 -{0x61, 0x12,}, // CMC_Dark1_LumGain2_B -{0x62, 0x18,}, // CMC_Dark1_LumGain3_B -{0x63, 0x1c,}, // CMC_Dark1_LumGain4_B -{0x64, 0x1e,}, // CMC_Dark1_LumGain5_B -{0x65, 0x20,}, // CMC_Dark1_LumGain6_B -{0x66, 0x20,}, // CMC_Dark1_LumGain7_B -{0x67, 0x20,}, // CMC_Dark1_LumGain8_B 20 = x1.0 - -{0x68, 0x2f,}, //CMCSIGN_Dark2 -{0x69, 0x53,}, //CMC_Dark2_00 -{0x6a, 0x1c,}, //CMC_Dark2_01 -{0x6b, 0x09,}, //CMC_Dark2_02 -{0x6c, 0x0e,}, //CMC_Dark2_03 -{0x6d, 0x53,}, //CMC_Dark2_04 -{0x6e, 0x05,}, //CMC_Dark2_05 -{0x6f, 0x03,}, //CMC_Dark2_06 -{0x70, 0x23,}, //CMC_Dark2_07 -{0x71, 0x66,}, //CMC_Dark2_08 - -{0x72, 0x04,}, // CMC_Dark2_LumTh1 CMC SP gain axis X(luminance) -{0x73, 0x0a,}, // CMC_Dark2_LumTh2 -{0x74, 0x10,}, // CMC_Dark2_LumTh3 -{0x75, 0x18,}, // CMC_Dark2_LumTh4 -{0x76, 0x20,}, // CMC_Dark2_LumTh5 -{0x77, 0x28,}, // CMC_Dark2_LumTh6 -{0x78, 0x40,}, // CMC_Dark2_LumTh7 - -{0x79, 0x08,}, // CMC_Dark2_LumGain1_R CMC SP R gain -{0x7a, 0x12,}, // CMC_Dark2_LumGain2_R -{0x7b, 0x18,}, // CMC_Dark2_LumGain3_R -{0x7c, 0x1c,}, // CMC_Dark2_LumGain4_R -{0x7d, 0x1e,}, // CMC_Dark2_LumGain5_R -{0x7e, 0x20,}, // CMC_Dark2_LumGain6_R -{0x7f, 0x20,}, // CMC_Dark2_LumGain7_R -{0x80, 0x20,}, // CMC_Dark2_LumGain8_R 20 = x1. - -{0x81, 0x08,}, // CMC_Dark2_LumGain1_G CMC SP G gain -{0x82, 0x12,}, // CMC_Dark2_LumGain2_G -{0x83, 0x18,}, // CMC_Dark2_LumGain3_G -{0x84, 0x1c,}, // CMC_Dark2_LumGain4_G -{0x85, 0x1e,}, // CMC_Dark2_LumGain5_G -{0x86, 0x20,}, // CMC_Dark2_LumGain6_G -{0x87, 0x20,}, // CMC_Dark2_LumGain7_G -{0x88, 0x20,}, // CMC_Dark2_LumGain8_G 20 = x1. - -{0x89, 0x08,}, // CMC_Dark2_LumGain1_B CMC SP B gain -{0x8a, 0x12,}, // CMC_Dark2_LumGain2_B -{0x8b, 0x18,}, // CMC_Dark2_LumGain3_B -{0x8c, 0x1c,}, // CMC_Dark2_LumGain4_B -{0x8d, 0x1e,}, // CMC_Dark2_LumGain5_B -{0x8e, 0x20,}, // CMC_Dark2_LumGain6_B -{0x8f, 0x20,}, // CMC_Dark2_LumGain7_B -{0x90, 0x20,}, // CMC_Dark2_LumGain8_B 20 = x1.0 - -{0x91, 0x2f,}, // CMCSIGN_In_Low -{0x92, 0x53,}, // CMC_In_Low_00 -{0x93, 0x1e,}, //CMC_In_Low_01 -{0x94, 0x0b,}, //CMC_In_Low_02 -{0x95, 0x18,}, //CMC_In_Low_03 -{0x96, 0x61,}, // CMC_In_Low_04 -{0x97, 0x09,}, //CMC_In_Low_05 -{0x98, 0x04,}, //CMC_In_Low_06 -{0x99, 0x14,}, //CMC_In_Low_07 -{0x9a, 0x58,}, // CMC_In_Low_08 - -{0x9b, 0x04,}, // CMC_LowTemp_LumTh1 CMC SP gain axis X(luminance) -{0x9c, 0x0a,}, // CMC_LowTemp_LumTh2 -{0x9d, 0x10,}, // CMC_LowTemp_LumTh3 -{0x9e, 0x18,}, // CMC_LowTemp_LumTh4 -{0x9f, 0x20,}, // CMC_LowTemp_LumTh5 -{0xa0, 0x28,}, // CMC_LowTemp_LumTh6 -{0xa1, 0x40,}, // CMC_LowTemp_LumTh7 - -{0xa2, 0x20,}, // CMC_LowTemp_LumGain1_R CMC SP R gain -{0xa3, 0x20,}, // CMC_LowTemp_LumGain2_R -{0xa4, 0x20,}, // CMC_LowTemp_LumGain3_R -{0xa5, 0x20,}, // CMC_LowTemp_LumGain4_R -{0xa6, 0x20,}, // CMC_LowTemp_LumGain5_R -{0xa7, 0x20,}, // CMC_LowTemp_LumGain6_R -{0xa8, 0x20,}, // CMC_LowTemp_LumGain7_R -{0xa9, 0x20,}, // CMC_LowTemp_LumGain8_R 20 = x1.0 - -{0xaa, 0x20,}, // CMC_LowTemp_LumGain1_G CMC SP G gain -{0xab, 0x20,}, // CMC_LowTemp_LumGain2_G -{0xac, 0x20,}, // CMC_LowTemp_LumGain3_G -{0xad, 0x20,}, // CMC_LowTemp_LumGain4_G -{0xae, 0x20,}, // CMC_LowTemp_LumGain5_G -{0xaf, 0x20,}, // CMC_LowTemp_LumGain6_G -{0xb0, 0x20,}, // CMC_LowTemp_LumGain7_G -{0xb1, 0x20,}, // CMC_LowTemp_LumGain8_G 20 = x1.0 - -{0xb2, 0x20,}, // CMC_LowTemp_LumGain1_B CMC SP B gain -{0xb3, 0x20,}, // CMC_LowTemp_LumGain2_B -{0xb4, 0x20,}, // CMC_LowTemp_LumGain3_B -{0xb5, 0x20,}, // CMC_LowTemp_LumGain4_B -{0xb6, 0x20,}, // CMC_LowTemp_LumGain5_B -{0xb7, 0x20,}, // CMC_LowTemp_LumGain6_B -{0xb8, 0x20,}, // CMC_LowTemp_LumGain7_B -{0xb9, 0x20,}, // CMC_LowTemp_LumGain8_B 20 = x1.0 - -{0xba, 0x2d,}, //CMCSIGN_In_High -{0xbb, 0x55,}, //CMC_In_High_00 -{0xbc, 0x21,}, //CMC_In_High_01 -{0xbd, 0x0c,}, //CMC_In_High_02 -{0xbe, 0x08,}, //CMC_In_High_03 -{0xbf, 0x55,}, //CMC_In_High_04 -{0xc0, 0x0d,}, //CMC_In_High_05 -{0xc1, 0x03,}, //CMC_In_High_06 -{0xc2, 0x18,}, //CMC_In_High_07 -{0xc3, 0x55,}, //CMC_In_High_08 - -{0xc4, 0x04,}, // CMC_HighTemp_LumTh1 CMC SP gain axis X(luminance) -{0xc5, 0x0a,}, // CMC_HighTemp_LumTh2 -{0xc6, 0x10,}, // CMC_HighTemp_LumTh3 -{0xc7, 0x18,}, // CMC_HighTemp_LumTh4 -{0xc8, 0x20,}, // CMC_HighTemp_LumTh5 -{0xc9, 0x28,}, // CMC_HighTemp_LumTh6 -{0xca, 0x40,}, // CMC_HighTemp_LumTh7 - -{0xcb, 0x20,}, // CMC_HighTemp_LumGain1_R CMC SP R gain -{0xcc, 0x20,}, // CMC_HighTemp_LumGain2_R -{0xcd, 0x20,}, // CMC_HighTemp_LumGain3_R -{0xce, 0x20,}, // CMC_HighTemp_LumGain4_R -{0xcf, 0x20,}, // CMC_HighTemp_LumGain5_R -{0xd0, 0x20,}, // CMC_HighTemp_LumGain6_R -{0xd1, 0x20,}, // CMC_HighTemp_LumGain7_R -{0xd2, 0x20,}, // CMC_HighTemp_LumGain8_R 20 = x1.0 - -{0xd3, 0x20,}, // CMC_HighTemp_LumGain1_G CMC SP G gain -{0xd4, 0x20,}, // CMC_HighTemp_LumGain2_G -{0xd5, 0x20,}, // CMC_HighTemp_LumGain3_G -{0xd6, 0x20,}, // CMC_HighTemp_LumGain4_G -{0xd7, 0x20,}, // CMC_HighTemp_LumGain5_G -{0xd8, 0x20,}, // CMC_HighTemp_LumGain6_G -{0xd9, 0x20,}, // CMC_HighTemp_LumGain7_G -{0xda, 0x20,}, // CMC_HighTemp_LumGain8_G 20 = x1. - -{0xdb, 0x20,}, // CMC_HighTemp_LumGain1_B CMC SP B gain -{0xdc, 0x20,}, // CMC_HighTemp_LumGain2_B -{0xdd, 0x20,}, // CMC_HighTemp_LumGain3_B -{0xde, 0x20,}, // CMC_HighTemp_LumGain4_B -{0xdf, 0x20,}, // CMC_HighTemp_LumGain5_B -{0xe0, 0x20,}, // CMC_HighTemp_LumGain6_B -{0xe1, 0x20,}, // CMC_HighTemp_LumGain7_B -{0xe2, 0x20,}, // CMC_HighTemp_LumGain8_B 20 = x1.0 - -//////////////////// -// Adaptive Gamma // -//////////////////// - -{0xe3, 0x00,}, //GMA_OUT -{0xe4, 0x00,}, -{0xe5, 0x03,}, -{0xe6, 0x0b,}, -{0xe7, 0x15,}, -{0xe8, 0x21,}, -{0xe9, 0x2f,}, -{0xea, 0x3c,}, -{0xeb, 0x49,}, -{0xec, 0x54,}, -{0xed, 0x5e,}, -{0xee, 0x68,}, -{0xef, 0x72,}, -{0xf0, 0x79,}, -{0xf1, 0x7f,}, -{0xf2, 0x84,}, -{0xf3, 0x8a,}, -{0xf4, 0x8e,}, -{0xf5, 0x94,}, -{0xf6, 0x98,}, -{0xf7, 0x9d,}, -{0xf8, 0xa7,}, -{0xf9, 0xb2,}, -{0xfa, 0xbb,}, -{0xfb, 0xcb,}, -{0xfc, 0xda,}, -{0xfd, 0xe9,}, -{0x0e, 0x00,}, // burst end - -{0x03, 0xd5,}, //Page d5 - -{0x0e, 0x01,}, // burst start - -{0x10, 0xf7,}, -{0x11, 0xff,}, -{0x12, 0xff,}, -{0x13, 0xff,}, -{0x14, 0xff,}, -{0x15, 0xff,}, -{0x16, 0xff,}, - -{0x17, 0x00,}, //GMA_IN -{0x18, 0x05,}, -{0x19, 0x09,}, -{0x1a, 0x11,}, -{0x1b, 0x19,}, -{0x1c, 0x26,}, -{0x1d, 0x33,}, -{0x1e, 0x3f,}, -{0x1f, 0x4a,}, -{0x20, 0x55,}, -{0x21, 0x5e,}, -{0x22, 0x67,}, -{0x23, 0x6f,}, -{0x24, 0x77,}, -{0x25, 0x7e,}, -{0x26, 0x84,}, -{0x27, 0x8b,}, -{0x28, 0x91,}, -{0x29, 0x96,}, -{0x2a, 0x9b,}, -{0x2b, 0xa0,}, -{0x2c, 0xa8,}, -{0x2d, 0xb2,}, -{0x2e, 0xbc,}, -{0x2f, 0xcd,}, -{0x30, 0xdd,}, -{0x31, 0xec,}, -{0x32, 0xf9,}, -{0x33, 0xff,}, -{0x34, 0xff,}, -{0x35, 0xff,}, -{0x36, 0xff,}, -{0x37, 0xff,}, -{0x38, 0xff,}, - -{0x39, 0x00,}, //GMA_D1 -{0x3a, 0x04,}, -{0x3b, 0x08,}, -{0x3c, 0x0f,}, -{0x3d, 0x1b,}, -{0x3e, 0x2e,}, -{0x3f, 0x3e,}, -{0x40, 0x4e,}, -{0x41, 0x5b,}, -{0x42, 0x65,}, -{0x43, 0x71,}, -{0x44, 0x7b,}, -{0x45, 0x85,}, -{0x46, 0x8d,}, -{0x47, 0x95,}, -{0x48, 0x9b,}, -{0x49, 0xa3,}, -{0x4a, 0xa9,}, -{0x4b, 0xb0,}, -{0x4c, 0xb6,}, -{0x4d, 0xbb,}, -{0x4e, 0xc5,}, -{0x4f, 0xcf,}, -{0x50, 0xd7,}, -{0x51, 0xe7,}, -{0x52, 0xf3,}, -{0x53, 0xfa,}, -{0x54, 0xff,}, -{0x55, 0xff,}, -{0x56, 0xff,}, -{0x57, 0xff,}, -{0x58, 0xff,}, -{0x59, 0xff,}, -{0x5a, 0xff,}, - -{0x5b, 0x00,}, //GMA_D2 -{0x5c, 0x04,}, -{0x5d, 0x08,}, -{0x5e, 0x0f,}, -{0x5f, 0x1b,}, -{0x60, 0x2e,}, -{0x61, 0x3e,}, -{0x62, 0x4e,}, -{0x63, 0x5b,}, -{0x64, 0x65,}, -{0x65, 0x71,}, -{0x66, 0x7b,}, -{0x67, 0x85,}, -{0x68, 0x8d,}, -{0x69, 0x95,}, -{0x6a, 0x9b,}, -{0x6b, 0xa3,}, -{0x6c, 0xa9,}, -{0x6d, 0xb0,}, -{0x6e, 0xb6,}, -{0x6f, 0xbb,}, -{0x70, 0xc5,}, -{0x71, 0xcf,}, -{0x72, 0xd7,}, -{0x73, 0xe7,}, -{0x74, 0xf3,}, -{0x75, 0xfa,}, -{0x76, 0xff,}, -{0x77, 0xff,}, -{0x78, 0xff,}, -{0x79, 0xff,}, -{0x7a, 0xff,}, -{0x7b, 0xff,}, -{0x7c, 0xff,}, - -/////////////////// -// Adaptive MCMC // -/////////////////// - -// Outdoor MCMC -{0x7d, 0x15,}, //Outdoor_delta1 -{0x7e, 0x19,}, //Outdoor_center1 -{0x7f, 0x0f,}, //Outdoor_delta2 -{0x80, 0x86,}, //Outdoor_center2 -{0x81, 0x17,}, //Outdoor_delta3 -{0x82, 0xbd,}, //Outdoor_center3 -{0x83, 0x17,}, //Outdoor_delta4 -{0x84, 0xee,}, //Outdoor_center4 -{0x85, 0x93,}, //Outdoor_delta5 -{0x86, 0x25,}, //Outdoor_center5 -{0x87, 0x93,}, //Outdoor_delta6 -{0x88, 0x51,}, //Outdoor_center6 - -{0x89, 0x40,}, //Outdoor_sat_gain1 -{0x8a, 0x40,}, //Outdoor_sat_gain2 -{0x8b, 0x40,}, //Outdoor_sat_gain3 -{0x8c, 0x40,}, //Outdoor_sat_gain4 -{0x8d, 0x40,}, //Outdoor_sat_gain5 -{0x8e, 0x40,}, //Outdoor_sat_gain6 -{0x8f, 0x94,}, //Outdoor_hue_angle1 -{0x90, 0x89,}, //Outdoor_hue_angle2 -{0x91, 0x10,}, //Outdoor_hue_angle3 -{0x92, 0x14,}, //Outdoor_hue_angle4 -{0x93, 0x0b,}, //Outdoor_hue_angle5 -{0x94, 0x87,}, //Outdoor_hue_angle6 - -{0x95, 0x00,}, // MCMC24_Outdoor mcmc_rgb_ofs_sign_r -{0x96, 0x00,}, // MCMC25_Outdoor mcmc_rgb_ofs_sign_g -{0x97, 0x00,}, // MCMC26_Outdoor mcmc_rgb_ofs_sign_b - -{0x98, 0x00,}, // MCMC27_Outdoor mcmc_rgb_ofs_r1 R -{0x99, 0x00,}, // MCMC28_Outdoor mcmc_rgb_ofs_r1 G -{0x9a, 0x00,}, // MCMC29_Outdoor mcmc_rgb_ofs_r1 B - -{0x9b, 0x00,}, // MCMC30_Outdoor mcmc_rgb_ofs_r2 R -{0x9c, 0x00,}, // MCMC31_Outdoor mcmc_rgb_ofs_r2 G -{0x9d, 0x00,}, // MCMC32_Outdoor mcmc_rgb_ofs_r2 B - -{0x9e, 0x00,}, // MCMC33_Outdoor mcmc_rgb_ofs_r3 R -{0x9f, 0x00,}, // MCMC34_Outdoor mcmc_rgb_ofs_r3 G -{0xa0, 0x00,}, // MCMC35_Outdoor mcmc_rgb_ofs_r3 B - -{0xa1, 0x00,}, // MCMC36_Outdoor mcmc_rgb_ofs_r4 R -{0xa2, 0x00,}, // MCMC37_Outdoor mcmc_rgb_ofs_r4 G -{0xa3, 0x00,}, // MCMC38_Outdoor mcmc_rgb_ofs_r4 B - -{0xa4, 0x00,}, // MCMC39_Outdoor mcmc_rgb_ofs_r5 R -{0xa5, 0x00,}, // MCMC40_Outdoor mcmc_rgb_ofs_r5 G -{0xa6, 0x00,}, // MCMC41_Outdoor mcmc_rgb_ofs_r5 B - -{0xa7, 0x00,}, // MCMC42_Outdoor mcmc_rgb_ofs_r6 R -{0xa8, 0x00,}, // MCMC43_Outdoor mcmc_rgb_ofs_r6 G -{0xa9, 0x00,}, // MCMC44_Outdoor mcmc_rgb_ofs_r6 B - -{0xaa, 0x00,}, // MCMC45_Outdoor mcmc_std_offset1 -{0xab, 0x00,}, // MCMC46_Outdoor mcmc_std_offset2 -{0xac, 0xff,}, // MCMC47_Outdoor mcmc_std_th_max -{0xad, 0x00,}, // MCMC48_Outdoor mcmc_std_th_min - -{0xae, 0x3f,}, // MCMC49_Outdoor mcmc_lum_gain_wgt_th1 R1 magenta -{0xaf, 0x3f,}, // MCMC50_Outdoor mcmc_lum_gain_wgt_th2 R1 -{0xb0, 0x3f,}, // MCMC51_Outdoor mcmc_lum_gain_wgt_th3 R1 -{0xb1, 0x3f,}, // MCMC52_Outdoor mcmc_lum_gain_wgt_th4 R1 -{0xb2, 0x30,}, // MCMC53_Outdoor mcmc_rg1_lum_sp1 R1 -{0xb3, 0x50,}, // MCMC54_Outdoor mcmc_rg1_lum_sp2 R1 -{0xb4, 0x80,}, // MCMC55_Outdoor mcmc_rg1_lum_sp3 R1 -{0xb5, 0xb0,}, // MCMC56_Outdoor mcmc_rg1_lum_sp4 R1 - -{0xb6, 0x3f,}, // MCMC57_Outdoor mcmc_lum_gain_wgt_th1 R2 red -{0xb7, 0x3f,}, // MCMC58_Outdoor mcmc_lum_gain_wgt_th2 R2 -{0xb8, 0x3f,}, // MCMC59_Outdoor mcmc_lum_gain_wgt_th3 R2 -{0xb9, 0x3f,}, // MCMC60_Outdoor mcmc_lum_gain_wgt_th4 R2 -{0xba, 0x28,}, // MCMC61_Outdoor mcmc_rg2_lum_sp1 R2 -{0xbb, 0x50,}, // MCMC62_Outdoor mcmc_rg2_lum_sp2 R2 -{0xbc, 0x80,}, // MCMC63_Outdoor mcmc_rg2_lum_sp3 R2 -{0xbd, 0xb0,}, // MCMC64_Outdoor mcmc_rg2_lum_sp4 R2 - -{0xbe, 0x3f,}, // MCMC65_Outdoor mcmc_lum_gain_wgt_th1 R3 yellow -{0xbf, 0x3f,}, // MCMC66_Outdoor mcmc_lum_gain_wgt_th2 R3 -{0xc0, 0x30,},// MCMC67_Outdoor mcmc_lum_gain_wgt_th3 R3 -{0xc1, 0x2a,},// MCMC68_Outdoor mcmc_lum_gain_wgt_th4 R3 -{0xc2, 0x20,},// MCMC69_Outdoor mcmc_rg3_lum_sp1 R3 -{0xc3, 0x40,},// MCMC70_Outdoor mcmc_rg3_lum_sp2 R3 -{0xc4, 0x70,},// MCMC71_Outdoor mcmc_rg3_lum_sp3 R3 -{0xc5, 0xb0,}, // MCMC72_Outdoor mcmc_rg3_lum_sp4 R3 - -{0xc6, 0x3f,}, // MCMC73_Outdoor mcmc_lum_gain_wgt_th1 R4 Green -{0xc7, 0x3f,}, // MCMC74_Outdoor mcmc_lum_gain_wgt_th2 R4 -{0xc8, 0x3f,}, // MCMC75_Outdoor mcmc_lum_gain_wgt_th3 R4 -{0xc9, 0x3f,}, // MCMC76_Outdoor mcmc_lum_gain_wgt_th4 R4 -{0xca, 0x10,}, // MCMC77_Outdoor mcmc_rg4_lum_sp1 R4 -{0xcb, 0x30,}, // MCMC78_Outdoor mcmc_rg4_lum_sp2 R4 -{0xcc, 0x60,}, // MCMC79_Outdoor mcmc_rg4_lum_sp3 R4 -{0xcd, 0x90,}, // MCMC80_Outdoor mcmc_rg4_lum_sp4 R4 - -{0xce, 0x3f,}, // MCMC81_Outdoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0xcf, 0x3f,}, // MCMC82_Outdoor mcmc_rg5_gain_wgt_th2 R5 -{0xd0, 0x3f,}, // MCMC83_Outdoor mcmc_rg5_gain_wgt_th3 R5 -{0xd1, 0x3f,}, // MCMC84_Outdoor mcmc_rg5_gain_wgt_th4 R5 -{0xd2, 0x28,}, // MCMC85_Outdoor mcmc_rg5_lum_sp1 R5 -{0xd3, 0x50,}, // MCMC86_Outdoor mcmc_rg5_lum_sp2 R5 -{0xd4, 0x80,}, // MCMC87_Outdoor mcmc_rg5_lum_sp3 R5 -{0xd5, 0xb0,}, // MCMC88_Outdoor mcmc_rg5_lum_sp4 R5 - -{0xd6, 0x3f,}, // MCMC89_Outdoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0xd7, 0x3f,}, // MCMC90_Outdoor mcmc_rg6_gain_wgt_th2 R6 -{0xd8, 0x3f,}, // MCMC91_Outdoor mcmc_rg6_gain_wgt_th3 R6 -{0xd9, 0x3f,}, // MCMC92_Outdoor mcmc_rg6_gain_wgt_th4 R6 -{0xda, 0x28,}, // MCMC93_Outdoor mcmc_rg6_lum_sp1 R6 -{0xdb, 0x50,}, // MCMC94_Outdoor mcmc_rg6_lum_sp2 R6 -{0xdc, 0x80,}, // MCMC95_Outdoor mcmc_rg6_lum_sp3 R6 -{0xdd, 0xb0,}, // MCMC96_Outdoor mcmc_rg6_lum_sp4 R6 - -{0xde, 0x1e,}, // MCMC97_Outdoor mcmc2_allgain_x1 -{0xdf, 0x3c,}, // MCMC98_Outdoor mcmc2_allgain_x2 -{0xe0, 0x3c,}, // MCMC99_Outdoor mcmc2_allgain_x4 -{0xe1, 0x1e,}, // MCMC100_Outdoor mcmc2_allgain_x5 -{0xe2, 0x1e,}, // MCMC101_Outdoor mcmc2_allgain_x7 -{0xe3, 0x3c,}, // MCMC102_Outdoor mcmc2_allgain_x8 -{0xe4, 0x3c,}, // MCMC103_Outdoor mcmc2_allgain_x10 -{0xe5, 0x1e,}, // MCMC104_Outdoor mcmc2_allgain_x11 - -{0xe6, 0x14,}, //Outdoor_allgain_y1 -{0xe7, 0x14,}, //Outdoor_allgain_y2 -{0xe8, 0x13,}, //Outdoor_allgain_y3 -{0xe9, 0x12,}, //Outdoor_allgain_y4 -{0xea, 0x12,}, //Outdoor_allgain_y5 -{0xeb, 0x14,}, //Outdoor_allgain_y6 -{0xec, 0x16,}, //Outdoor_allgain_y7 -{0xed, 0x18,}, //Outdoor_allgain_y8 -{0xee, 0x1a,}, //Outdoor_allgain_y9 -{0xef, 0x17,}, //Outdoor_allgain_y10 -{0xf0, 0x14,}, //Outdoor_allgain_y11 -{0xf1, 0x13,}, //Outdoor_allgain_y12 - -// Indoor MCMC -{0xf2, 0x10,}, //Indoor_delta1 -{0xf3, 0x1e,}, //Indoor_center1 -{0xf4, 0x0b,}, //Indoor_delta2 -{0xf5, 0x6f,}, //Indoor_center2 -{0xf6, 0x10,}, //Indoor_delta3 -{0xf7, 0x9c,}, // Indoor_center3 -{0xf8, 0x07,}, // Indoor_delta4 -{0xf9, 0xb8,}, // Indoor_center4 -{0xfa, 0x90,}, //Indoor_delta5 -{0xfb, 0x2d,}, //Indoor_center5 -{0xfc, 0x92,}, //Indoor_delta6 -{0xfd, 0x4f,}, //Indoor_center6 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd6,}, // Page D6 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, //Indoor_sat_gain1 -{0x11, 0x40,}, //Indoor_sat_gain2 -{0x12, 0x40,}, //Indoor_sat_gain3 -{0x13, 0x40,}, //Indoor_sat_gain4 -{0x14, 0x40,}, //Indoor_sat_gain5 -{0x15, 0x40,}, //Indoor_sat_gain6 - -{0x16, 0x00,}, //Indoor_hue_angle1 -{0x17, 0x8a,}, //Indoor_hue_angle2 -{0x18, 0x00,}, //Indoor_hue_angle3 -{0x19, 0x00,}, //Indoor_hue_angle4 -{0x1a, 0x00,}, //Indoor_hue_angle5 -{0x1b, 0x02,}, //Indoor_hue_angle6 - -{0x1c, 0x00,}, // MCMC24_Indoor mcmc_rgb_ofs_sign_r -{0x1d, 0x00,}, // MCMC25_Indoor mcmc_rgb_ofs_sign_g -{0x1e, 0x00,}, // MCMC26_Indoor mcmc_rgb_ofs_sign_b - -{0x1f, 0x00,}, // MCMC27_Indoor mcmc_rgb_ofs_r1 R -{0x20, 0x00,}, // MCMC28_Indoor mcmc_rgb_ofs_r1 G -{0x21, 0x00,}, // MCMC29_Indoor mcmc_rgb_ofs_r1 B - -{0x22, 0x00,}, // MCMC30_Indoor mcmc_rgb_ofs_r2 R -{0x23, 0x00,}, // MCMC31_Indoor mcmc_rgb_ofs_r2 G -{0x24, 0x00,}, // MCMC32_Indoor mcmc_rgb_ofs_r2 B - -{0x25, 0x00,}, // MCMC33_Indoor mcmc_rgb_ofs_r3 R -{0x26, 0x00,}, // MCMC34_Indoor mcmc_rgb_ofs_r3 G -{0x27, 0x00,}, // MCMC35_Indoor mcmc_rgb_ofs_r3 B - -{0x28, 0x00,}, // MCMC36_Indoor mcmc_rgb_ofs_r4 R -{0x29, 0x00,}, // MCMC37_Indoor mcmc_rgb_ofs_r4 G -{0x2a, 0x00,}, // MCMC38_Indoor mcmc_rgb_ofs_r4 B - -{0x2b, 0x00,}, // MCMC39_Indoor mcmc_rgb_ofs_r5 R -{0x2c, 0x00,}, // MCMC40_Indoor mcmc_rgb_ofs_r5 G -{0x2d, 0x00,}, // MCMC41_Indoor mcmc_rgb_ofs_r5 B - -{0x2e, 0x00,}, // MCMC42_Indoor mcmc_rgb_ofs_r6 R -{0x2f, 0x00,}, // MCMC43_Indoor mcmc_rgb_ofs_r6 G -{0x30, 0x00,}, // MCMC44_Indoor mcmc_rgb_ofs_r6 B - -{0x31, 0x00,}, // MCMC45_Indoor mcmc_std_offset1 -{0x32, 0x00,}, // MCMC46_Indoor mcmc_std_offset2 -{0x33, 0xff,}, // MCMC47_Indoor mcmc_std_th_max -{0x34, 0x00,}, // MCMC48_Indoor mcmc_std_th_min - -{0x35, 0x10,}, // MCMC49_Indoor mcmc_lum_gain_wgt_th1 R1 magenta -{0x36, 0x21,}, // MCMC50_Indoor mcmc_lum_gain_wgt_th2 R1 -{0x37, 0x34,}, // MCMC51_Indoor mcmc_lum_gain_wgt_th3 R1 -{0x38, 0x3f,}, // MCMC52_Indoor mcmc_lum_gain_wgt_th4 R1 -{0x39, 0x08,}, // MCMC53_Indoor mcmc_rg1_lum_sp1 R1 -{0x3a, 0x15,}, // MCMC54_Indoor mcmc_rg1_lum_sp2 R1 -{0x3b, 0x2f,}, // MCMC55_Indoor mcmc_rg1_lum_sp3 R1 -{0x3c, 0x51,}, // MCMC56_Indoor mcmc_rg1_lum_sp4 R1 - -{0x3d, 0x3f,}, // MCMC57_Indoor mcmc_lum_gain_wgt_th1 R2 red -{0x3e, 0x3f,}, // MCMC58_Indoor mcmc_lum_gain_wgt_th2 R2 -{0x3f, 0x3f,}, // MCMC59_Indoor mcmc_lum_gain_wgt_th3 R2 -{0x40, 0x3f,}, // MCMC60_Indoor mcmc_lum_gain_wgt_th4 R2 -{0x41, 0x28,}, // MCMC61_Indoor mcmc_rg2_lum_sp1 R2 -{0x42, 0x50,}, // MCMC62_Indoor mcmc_rg2_lum_sp2 R2 -{0x43, 0x80,}, // MCMC63_Indoor mcmc_rg2_lum_sp3 R2 -{0x44, 0xb0,}, // MCMC64_Indoor mcmc_rg2_lum_sp4 R2 - -{0x45, 0x3f,}, // MCMC65_Indoor mcmc_lum_gain_wgt_th1 R3 yellow -{0x46, 0x3f,}, // MCMC66_Indoor mcmc_lum_gain_wgt_th2 R3 -{0x47, 0x3f,}, // MCMC67_Indoor mcmc_lum_gain_wgt_th3 R3 -{0x48, 0x3f,}, // MCMC68_Indoor mcmc_lum_gain_wgt_th4 R3 -{0x49, 0x28,}, // MCMC69_Indoor mcmc_rg3_lum_sp1 R3 -{0x4a, 0x50,}, // MCMC70_Indoor mcmc_rg3_lum_sp2 R3 -{0x4b, 0x80,}, // MCMC71_Indoor mcmc_rg3_lum_sp3 R3 -{0x4c, 0xb0,}, // MCMC72_Indoor mcmc_rg3_lum_sp4 R3 - -{0x4d, 0x3f,}, // MCMC73_Indoor mcmc_lum_gain_wgt_th1 R4 Green -{0x4e, 0x3f,}, // MCMC74_Indoor mcmc_lum_gain_wgt_th2 R4 -{0x4f, 0x3f,}, // MCMC75_Indoor mcmc_lum_gain_wgt_th3 R4 -{0x50, 0x3f,}, // MCMC76_Indoor mcmc_lum_gain_wgt_th4 R4 -{0x51, 0x10,}, // MCMC77_Indoor mcmc_rg4_lum_sp1 R4 -{0x52, 0x30,}, // MCMC78_Indoor mcmc_rg4_lum_sp2 R4 -{0x53, 0x60,}, // MCMC79_Indoor mcmc_rg4_lum_sp3 R4 -{0x54, 0x90,}, // MCMC80_Indoor mcmc_rg4_lum_sp4 R4 - -{0x55, 0x3f,}, // MCMC81_Indoor mcmc_rg5_gain_wgt_th1 R5 Cyan -{0x56, 0x3f,}, // MCMC82_Indoor mcmc_rg5_gain_wgt_th2 R5 -{0x57, 0x3f,}, // MCMC83_Indoor mcmc_rg5_gain_wgt_th3 R5 -{0x58, 0x3f,}, // MCMC84_Indoor mcmc_rg5_gain_wgt_th4 R5 -{0x59, 0x28,}, // MCMC85_Indoor mcmc_rg5_lum_sp1 R5 -{0x5a, 0x50,}, // MCMC86_Indoor mcmc_rg5_lum_sp2 R5 -{0x5b, 0x80,}, // MCMC87_Indoor mcmc_rg5_lum_sp3 R5 -{0x5c, 0xb0,}, // MCMC88_Indoor mcmc_rg5_lum_sp4 R5 - -{0x5d, 0x3f,}, // MCMC89_Indoor mcmc_rg6_gain_wgt_th1 R6 Blue -{0x5e, 0x3f,}, // MCMC90_Indoor mcmc_rg6_gain_wgt_th2 R6 -{0x5f, 0x3f,}, // MCMC91_Indoor mcmc_rg6_gain_wgt_th3 R6 -{0x60, 0x3f,}, // MCMC92_Indoor mcmc_rg6_gain_wgt_th4 R6 -{0x61, 0x28,}, // MCMC93_Indoor mcmc_rg6_lum_sp1 R6 -{0x62, 0x50,}, // MCMC94_Indoor mcmc_rg6_lum_sp2 R6 -{0x63, 0x80,}, // MCMC95_Indoor mcmc_rg6_lum_sp3 R6 -{0x64, 0xb0,}, // MCMC96_Indoor mcmc_rg6_lum_sp4 R6 - -{0x65, 0x1d,}, // MCMC97_Indoor mcmc2_allgain_x1 -{0x66, 0x3b,}, // MCMC98_Indoor mcmc2_allgain_x2 -{0x67, 0x3b,}, // MCMC99_Indoor mcmc2_allgain_x4 -{0x68, 0x1d,}, // MCMC100_Indoor mcmc2_allgain_x5 -{0x69, 0x1d,}, // MCMC101_Indoor mcmc2_allgain_x7 -{0x6a, 0x3b,}, // MCMC102_Indoor mcmc2_allgain_x8 -{0x6b, 0x3b,}, // MCMC103_Indoor mcmc2_allgain_x10 -{0x6c, 0x1d,}, // MCMC104_Indoor mcmc2_allgain_x11 - -{0x6d, 0x0e,}, // MCMC105_Indoor mcmc2_allgain_y0 -{0x6e, 0x0f,}, // MCMC106_Indoor mcmc2_allgain_y1 -{0x6f, 0x0f,}, // MCMC107_Indoor mcmc2_allgain_y2 -{0x70, 0x0f,}, // MCMC108_Indoor mcmc2_allgain_y3 -{0x71, 0x0f,}, // MCMC109_Indoor mcmc2_allgain_y4 -{0x72, 0x10,}, // MCMC110_Indoor mcmc2_allgain_y5 -{0x73, 0x10,}, // MCMC111_Indoor mcmc2_allgain_y6 -{0x74, 0x10,}, // MCMC112_Indoor mcmc2_allgain_y7 -{0x75, 0x10,}, // MCMC113_Indoor mcmc2_allgain_y8 -{0x76, 0x0f,}, // MCMC114_Indoor mcmc2_allgain_y9 -{0x77, 0x0e,}, // MCMC115_Indoor mcmc2_allgain_y10 -{0x78, 0x0d,}, // MCMC116_Indoor mcmc2_allgain_y11 - -// Dark1 MCMC -{0x79, 0x17,}, //Dark1_delta1 -{0x7a, 0x56,}, //Dark1_center1 -{0x7b, 0x10,}, //Dark1_delta2 -{0x7c, 0x70,}, //Dark1_center2 -{0x7d, 0x10,}, //Dark1_delta3 -{0x7e, 0x9c,}, //Dark1_center3 -{0x7f, 0x18,}, //Dark1_delta4 -{0x80, 0xdb,}, //Dark1_center4 -{0x81, 0x98,}, //Dark1_delta5 -{0x82, 0x26,}, //Dark1_center5 -{0x83, 0x99,}, //Dark1_delta6 -{0x84, 0x5b,}, //Dark1_center6 - -{0x85, 0x40,}, //Dark1_sat_gain1 -{0x86, 0x40,}, //Dark1_sat_gain2 -{0x87, 0x40,}, //Dark1_sat_gain3 -{0x88, 0x40,}, //Dark1_sat_gain4 -{0x89, 0x40,}, //Dark1_sat_gain5 -{0x8a, 0x40,}, //Dark1_sat_gain6 -{0x8b, 0x91,}, //Dark1_hue_angle1 -{0x8c, 0x00,}, //Dark1_hue_angle2 -{0x8d, 0x00,}, //Dark1_hue_angle3 -{0x8e, 0x0a,}, //Dark1_hue_angle4 -{0x8f, 0x05,}, //Dark1_hue_angle5 -{0x90, 0x86,}, //Dark1_hue_angle6 - -{0x91, 0x3f,}, // MCMC24_Dark1 mcmc_rgb_ofs_sign -{0x92, 0x3f,}, // MCMC25_Dark1 mcmc_rgb_ofs_sign -{0x93, 0x3f,}, // MCMC26_Dark1 mcmc_rgb_ofs_sign - -{0x94, 0x00,}, // MCMC27_Dark1 mcmc_rgb_ofs_r1 R -{0x95, 0x00,}, // MCMC28_Dark1 mcmc_rgb_ofs_r1 G -{0x96, 0x00,}, // MCMC29_Dark1 mcmc_rgb_ofs_r1 B - -{0x97, 0x00,}, // MCMC30_Dark1 mcmc_rgb_ofs_r2 R -{0x98, 0x00,}, // MCMC31_Dark1 mcmc_rgb_ofs_r2 G -{0x99, 0x00,}, // MCMC32_Dark1 mcmc_rgb_ofs_r2 B - -{0x9a, 0x00,}, // MCMC33_Dark1 mcmc_rgb_ofs_r3 R -{0x9b, 0x00,}, // MCMC34_Dark1 mcmc_rgb_ofs_r3 G -{0x9c, 0x00,}, // MCMC35_Dark1 mcmc_rgb_ofs_r3 B - -{0x9d, 0x00,}, // MCMC36_Dark1 mcmc_rgb_ofs_r4 R -{0x9e, 0x00,}, // MCMC37_Dark1 mcmc_rgb_ofs_r4 G -{0x9f, 0x00,}, // MCMC38_Dark1 mcmc_rgb_ofs_r4 B - -{0xa0, 0x00,}, // MCMC39_Dark1 mcmc_rgb_ofs_r5 R -{0xa1, 0x00,}, // MCMC40_Dark1 mcmc_rgb_ofs_r5 G -{0xa2, 0x00,}, // MCMC41_Dark1 mcmc_rgb_ofs_r5 B - -{0xa3, 0x00,}, // MCMC42_Dark1 mcmc_rgb_ofs_r6 R -{0xa4, 0x00,}, // MCMC43_Dark1 mcmc_rgb_ofs_r6 G -{0xa5, 0x00,}, // MCMC44_Dark1 mcmc_rgb_ofs_r6 B - -{0xa6, 0x00,}, // MCMC45_Dark1 mcmc_std_offset1 -{0xa7, 0x00,}, // MCMC46_Dark1 mcmc_std_offset2 -{0xa8, 0xff,}, // MCMC47_Dark1 mcmc_std_th_max -{0xa9, 0x00,}, // MCMC48_Dark1 mcmc_std_th_min - -{0xaa, 0x3f,}, // MCMC49_Dark1 mcmc_lum_gain_wgt R1 -{0xab, 0x3f,}, // MCMC50_Dark1 mcmc_lum_gain_wgt R1 -{0xac, 0x3f,}, // MCMC51_Dark1 mcmc_lum_gain_wgt R1 -{0xad, 0x3f,}, // MCMC52_Dark1 mcmc_lum_gain_wgt R1 -{0xae, 0x30,}, // MCMC53_Dark1 mcmc_rg1_lum_sp1 R1 -{0xaf, 0x50,}, // MCMC54_Dark1 mcmc_rg1_lum_sp2 R1 -{0xb0, 0x80,}, // MCMC55_Dark1 mcmc_rg1_lum_sp3 R1 -{0xb1, 0xb0,}, // MCMC56_Dark1 mcmc_rg1_lum_sp4 R1 - -{0xb2, 0x3f,}, // MCMC57_Dark1 mcmc_lum_gain_wgt R2 -{0xb3, 0x3f,}, // MCMC58_Dark1 mcmc_lum_gain_wgt R2 -{0xb4, 0x3f,}, // MCMC59_Dark1 mcmc_lum_gain_wgt R2 -{0xb5, 0x3f,}, // MCMC60_Dark1 mcmc_lum_gain_wgt R2 -{0xb6, 0x28,}, // MCMC61_Dark1 mcmc_rg2_lum_sp1 R2 -{0xb7, 0x50,}, // MCMC62_Dark1 mcmc_rg2_lum_sp2 R2 -{0xb8, 0x80,}, // MCMC63_Dark1 mcmc_rg2_lum_sp3 R2 -{0xb9, 0xb0,}, // MCMC64_Dark1 mcmc_rg2_lum_sp4 R2 - -{0xba, 0x3f,}, // MCMC65_Dark1 mcmc_lum_gain_wgt R3 -{0xbb, 0x3f,}, // MCMC66_Dark1 mcmc_lum_gain_wgt R3 -{0xbc, 0x3f,}, // MCMC67_Dark1 mcmc_lum_gain_wgt R3 -{0xbd, 0x3f,}, // MCMC68_Dark1 mcmc_lum_gain_wgt R3 -{0xbe, 0x28,}, // MCMC69_Dark1 mcmc_rg3_lum_sp1 R3 -{0xbf, 0x50,}, // MCMC70_Dark1 mcmc_rg3_lum_sp2 R3 -{0xc0, 0x80,}, // MCMC71_Dark1 mcmc_rg3_lum_sp3 R3 -{0xc1, 0xb0,}, // MCMC72_Dark1 mcmc_rg3_lum_sp4 R3 - -{0xc2, 0x3f,}, // MCMC73_Dark1 mcmc_lum_gain_wgt R4 -{0xc3, 0x3f,}, // MCMC74_Dark1 mcmc_lum_gain_wgt R4 -{0xc4, 0x3f,}, // MCMC75_Dark1 mcmc_lum_gain_wgt R4 -{0xc5, 0x3f,}, // MCMC76_Dark1 mcmc_lum_gain_wgt R4 -{0xc6, 0x10,}, // MCMC77_Dark1 mcmc_rg4_lum_sp1 R4 -{0xc7, 0x30,}, // MCMC78_Dark1 mcmc_rg4_lum_sp2 R4 -{0xc8, 0x60,}, // MCMC79_Dark1 mcmc_rg4_lum_sp3 R4 -{0xc9, 0x90,}, // MCMC80_Dark1 mcmc_rg4_lum_sp4 R4 - -{0xca, 0x3f,}, // MCMC81_Dark1 mcmc_rg5_gain_wgt R5 -{0xcb, 0x3f,}, // MCMC82_Dark1 mcmc_rg5_gain_wgt R5 -{0xcc, 0x3f,}, // MCMC83_Dark1 mcmc_rg5_gain_wgt R5 -{0xcd, 0x3f,}, // MCMC84_Dark1 mcmc_rg5_gain_wgt R5 -{0xce, 0x28,}, // MCMC85_Dark1 mcmc_rg5_lum_sp1 R5 -{0xcf, 0x50,}, // MCMC86_Dark1 mcmc_rg5_lum_sp2 R5 -{0xd0, 0x80,}, // MCMC87_Dark1 mcmc_rg5_lum_sp3 R5 -{0xd1, 0xb0,}, // MCMC88_Dark1 mcmc_rg5_lum_sp4 R5 - -{0xd2, 0x3f,}, // MCMC89_Dark1 mcmc_rg6_gain_wgt R6 -{0xd3, 0x3f,}, // MCMC90_Dark1 mcmc_rg6_gain_wgt R6 -{0xd4, 0x3f,}, // MCMC91_Dark1 mcmc_rg6_gain_wgt R6 -{0xd5, 0x3f,}, // MCMC92_Dark1 mcmc_rg6_gain_wgt R6 -{0xd6, 0x28,}, // MCMC93_Dark1 mcmc_rg6_lum_sp1 R6 -{0xd7, 0x50,}, // MCMC94_Dark1 mcmc_rg6_lum_sp2 R6 -{0xd8, 0x80,}, // MCMC95_Dark1 mcmc_rg6_lum_sp3 R6 -{0xd9, 0xb0,}, // MCMC96_Dark1 mcmc_rg6_lum_sp4 R6 - -{0xda, 0x1c,}, // MCMC97_Dark1 mcmc2_allgain_x1 -{0xdb, 0x3a,}, // MCMC98_Dark1 mcmc2_allgain_x2 -{0xdc, 0x3a,}, // MCMC99_Dark1 mcmc2_allgain_x4 -{0xdd, 0x1c,}, // MCMC100_Dark1 mcmc2_allgain_x5 -{0xde, 0x1c,}, // MCMC101_Dark1 mcmc2_allgain_x7 -{0xdf, 0x3a,}, // MCMC102_Dark1 mcmc2_allgain_x8 -{0xe0, 0x3a,}, // MCMC103_Dark1 mcmc2_allgain_x10 -{0xe1, 0x1c,}, // MCMC104_Dark1 mcmc2_allgain_x11 - -{0xe2, 0x0f,}, //Dark1_allgain_y1 -{0xe3, 0x10,}, //Dark1_allgain_y2 -{0xe4, 0x10,}, //Dark1_allgain_y3 -{0xe5, 0x11,}, //Dark1_allgain_y4 -{0xe6, 0x10,}, //Dark1_allgain_y5 -{0xe7, 0x13,}, //Dark1_allgain_y6 -{0xe8, 0x12,}, //Dark1_allgain_y7 -{0xe9, 0x12,}, //Dark1_allgain_y8 -{0xea, 0x12,}, //Dark1_allgain_y9 -{0xeb, 0x11,}, //Dark1_allgain_y10 -{0xec, 0x10,}, //Dark1_allgain_y11 -{0xed, 0x0f,}, //Dark1_allgain_y12 - -// Dark2 MCMC -{0xee, 0x17,}, // MCMC00_Dark2 mcmc_delta1 -{0xef, 0x56,}, // MCMC01_Dark2 mcmc_center1 -{0xf0, 0x10,}, // MCMC02_Dark2 mcmc_delta2 -{0xf1, 0x70,}, // MCMC03_Dark2 mcmc_center2 -{0xf2, 0x10,}, // MCMC04_Dark2 mcmc_delta3 -{0xf3, 0x9c,}, // MCMC05_Dark2 mcmc_center3 -{0xf4, 0x18,}, // MCMC06_Dark2 mcmc_delta4 -{0xf5, 0xdb,}, // MCMC07_Dark2 mcmc_center4 -{0xf6, 0x98,}, // MCMC08_Dark2 mcmc_delta5 -{0xf7, 0x26,}, // MCMC09_Dark2 mcmc_center5 -{0xf8, 0x99,}, // MCMC10_Dark2 mcmc_delta6 -{0xf9, 0x5b,}, // MCMC11_Dark2 mcmc_center6 - -{0xfa, 0x40,}, // MCMC12_Dark2 mcmc_sat_gain1 -{0xfb, 0x40,}, // MCMC13_Dark2 mcmc_sat_gain2 -{0xfc, 0x40,}, // MCMC14_Dark2 mcmc_sat_gain3 -{0xfd, 0x40,}, // MCMC15_Dark2 mcmc_sat_gain4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xd7,},// Page D7 - -{0x0e, 0x01,}, // burst start - -{0x10, 0x40,}, // MCMC16_Dark2 mcmc_sat_gain5 -{0x11, 0x40,}, // MCMC17_Dark2 mcmc_sat_gain6 -{0x12, 0x91,}, // MCMC18_Dark2 mcmc_hue_angle1 -{0x13, 0x00,}, // MCMC19_Dark2 mcmc_hue_angle2 -{0x14, 0x00,}, // MCMC20_Dark2 mcmc_hue_angle3 -{0x15, 0x0a,}, // MCMC21_Dark2 mcmc_hue_angle4 -{0x16, 0x0f,}, // MCMC22_Dark2 mcmc_hue_angle5 -{0x17, 0x86,}, // MCMC23_Dark2 mcmc_hue_angle6 - -{0x18, 0x2f,}, // MCMC24_Dark2 mcmc_rgb_ofs_sig -{0x19, 0x2f,}, // MCMC25_Dark2 mcmc_rgb_ofs_sig -{0x1a, 0x2f,}, // MCMC26_Dark2 mcmc_rgb_ofs_sig - -{0x1b, 0x00,}, // MCMC27_Dark2 mcmc_rgb_ofs_r1 -{0x1c, 0x00,}, // MCMC28_Dark2 mcmc_rgb_ofs_r1 -{0x1d, 0x00,}, // MCMC29_Dark2 mcmc_rgb_ofs_r1 - -{0x1e, 0x00,}, // MCMC30_Dark2 mcmc_rgb_ofs_r2 -{0x1f, 0x00,}, // MCMC31_Dark2 mcmc_rgb_ofs_r2 -{0x20, 0x00,}, // MCMC32_Dark2 mcmc_rgb_ofs_r2 - -{0x21, 0x00,}, // MCMC33_Dark2 mcmc_rgb_ofs_r3 -{0x22, 0x00,}, // MCMC34_Dark2 mcmc_rgb_ofs_r3 -{0x23, 0x00,}, // MCMC35_Dark2 mcmc_rgb_ofs_r3 - -{0x24, 0x00,}, // MCMC36_Dark2 mcmc_rgb_ofs_r4 -{0x25, 0x00,}, // MCMC37_Dark2 mcmc_rgb_ofs_r4 -{0x26, 0x00,}, // MCMC38_Dark2 mcmc_rgb_ofs_r4 - -{0x27, 0x00,}, // MCMC39_Dark2 mcmc_rgb_ofs_r5 -{0x28, 0x00,}, // MCMC40_Dark2 mcmc_rgb_ofs_r5 -{0x29, 0x00,}, // MCMC41_Dark2 mcmc_rgb_ofs_r5 - -{0x2a, 0x00,}, // MCMC42_Dark2 mcmc_rgb_ofs_r6 R -{0x2b, 0x00,}, // MCMC43_Dark2 mcmc_rgb_ofs_r6 G -{0x2c, 0x00,}, // MCMC44_Dark2 mcmc_rgb_ofs_r6 B - -{0x2d, 0x00,}, // MCMC45_Dark2 mcmc_std_offset1 -{0x2e, 0x00,}, // MCMC46_Dark2 mcmc_std_offset2 -{0x2f, 0xff,}, // MCMC47_Dark2 mcmc_std_th_max -{0x30, 0x00,}, // MCMC48_Dark2 mcmc_std_th_min - -{0x31, 0x3f,}, // MCMC49_Dark2 mcmc_lum_gain_wgt R1 -{0x32, 0x3f,}, // MCMC50_Dark2 mcmc_lum_gain_wgt R1 -{0x33, 0x3f,}, // MCMC51_Dark2 mcmc_lum_gain_wgt R1 -{0x34, 0x3f,}, // MCMC52_Dark2 mcmc_lum_gain_wgt R1 -{0x35, 0x30,}, // MCMC53_Dark2 mcmc_rg1_lum_sp1 R1 -{0x36, 0x50,}, // MCMC54_Dark2 mcmc_rg1_lum_sp2 R1 -{0x37, 0x80,}, // MCMC55_Dark2 mcmc_rg1_lum_sp3 R1 -{0x38, 0xb0,}, // MCMC56_Dark2 mcmc_rg1_lum_sp4 R1 - -{0x39, 0x3f,}, // MCMC57_Dark2 mcmc_lum_gain_wgt R2 -{0x3a, 0x3f,}, // MCMC58_Dark2 mcmc_lum_gain_wgt R2 -{0x3b, 0x3f,}, // MCMC59_Dark2 mcmc_lum_gain_wgt R2 -{0x3c, 0x3f,}, // MCMC60_Dark2 mcmc_lum_gain_wgt R2 -{0x3d, 0x28,}, // MCMC61_Dark2 mcmc_rg2_lum_sp1 R2 -{0x3e, 0x50,}, // MCMC62_Dark2 mcmc_rg2_lum_sp2 R2 -{0x3f, 0x80,}, // MCMC63_Dark2 mcmc_rg2_lum_sp3 R2 -{0x40, 0xb0,}, // MCMC64_Dark2 mcmc_rg2_lum_sp4 R2 - -{0x41, 0x3f,}, // MCMC65_Dark2 mcmc_lum_gain_wgt R3 -{0x42, 0x3f,}, // MCMC66_Dark2 mcmc_lum_gain_wgt R3 -{0x43, 0x3f,}, // MCMC67_Dark2 mcmc_lum_gain_wgt R3 -{0x44, 0x3f,}, // MCMC68_Dark2 mcmc_lum_gain_wgt R3 -{0x45, 0x28,}, // MCMC69_Dark2 mcmc_rg3_lum_sp1 R3 -{0x46, 0x50,}, // MCMC70_Dark2 mcmc_rg3_lum_sp2 R3 -{0x47, 0x80,}, // MCMC71_Dark2 mcmc_rg3_lum_sp3 R3 -{0x48, 0xb0,}, // MCMC72_Dark2 mcmc_rg3_lum_sp4 R3 - -{0x49, 0x1a,}, // MCMC73_Dark2 mcmc_lum_gain_wgt R4 -{0x4a, 0x28,}, // MCMC74_Dark2 mcmc_lum_gain_wgt R4 -{0x4b, 0x3f,}, // MCMC75_Dark2 mcmc_lum_gain_wgt R4 -{0x4c, 0x3f,}, // MCMC76_Dark2 mcmc_lum_gain_wgt R4 -{0x4d, 0x10,}, // MCMC77_Dark2 mcmc_rg4_lum_sp1 R4 -{0x4e, 0x30,}, // MCMC78_Dark2 mcmc_rg4_lum_sp2 R4 -{0x4f, 0x60,}, // MCMC79_Dark2 mcmc_rg4_lum_sp3 R4 -{0x50, 0x90,}, // MCMC80_Dark2 mcmc_rg4_lum_sp4 R4 - -{0x51, 0x1a,}, // MCMC81_Dark2 mcmc_rg5_gain_wgt R5 -{0x52, 0x28,}, // MCMC82_Dark2 mcmc_rg5_gain_wgt R5 -{0x53, 0x3f,}, // MCMC83_Dark2 mcmc_rg5_gain_wgt R5 -{0x54, 0x3f,}, // MCMC84_Dark2 mcmc_rg5_gain_wgt R5 -{0x55, 0x28,}, // MCMC85_Dark2 mcmc_rg5_lum_sp1 R5 -{0x56, 0x50,}, // MCMC86_Dark2 mcmc_rg5_lum_sp2 R5 -{0x57, 0x80,}, // MCMC87_Dark2 mcmc_rg5_lum_sp3 R5 -{0x58, 0xb0,}, // MCMC88_Dark2 mcmc_rg5_lum_sp4 R5 - -{0x59, 0x1a,}, // MCMC89_Dark2 mcmc_rg6_gain_wgt R6 -{0x5a, 0x28,}, // MCMC90_Dark2 mcmc_rg6_gain_wgt R6 -{0x5b, 0x3f,}, // MCMC91_Dark2 mcmc_rg6_gain_wgt R6 -{0x5c, 0x3f,}, // MCMC92_Dark2 mcmc_rg6_gain_wgt R6 -{0x5d, 0x28,}, // MCMC93_Dark2 mcmc_rg6_lum_sp1 R6 -{0x5e, 0x50,}, // MCMC94_Dark2 mcmc_rg6_lum_sp2 R6 -{0x5f, 0x80,}, // MCMC95_Dark2 mcmc_rg6_lum_sp3 R6 -{0x60, 0xb0,}, // MCMC96_Dark2 mcmc_rg6_lum_sp4 R6 - -{0x61, 0x1b,}, // MCMC97_Dark2 mcmc2_allgain_x1 -{0x62, 0x39,}, // MCMC98_Dark2 mcmc2_allgain_x2 -{0x63, 0x39,}, // MCMC99_Dark2 mcmc2_allgain_x4 -{0x64, 0x1b,}, // MCMC100_Dark2 mcmc2_allgain_x5 -{0x65, 0x1b,}, // MCMC101_Dark2 mcmc2_allgain_x7 -{0x66, 0x39,}, // MCMC102_Dark2 mcmc2_allgain_x8 -{0x67, 0x39,}, // MCMC103_Dark2 mcmc2_allgain_x10 -{0x68, 0x1b,}, // MCMC104_Dark2 mcmc2_allgain_x11 - -{0x69, 0x0f,}, // MCMC105_Dark2 mcmc2_allgain_y0 -{0x6a, 0x10,}, // MCMC106_Dark2 mcmc2_allgain_y1 -{0x6b, 0x10,}, // MCMC107_Dark2 mcmc2_allgain_y2 -{0x6c, 0x11,}, // MCMC108_Dark2 mcmc2_allgain_y3 -{0x6d, 0x10,}, // MCMC109_Dark2 mcmc2_allgain_y4 -{0x6e, 0x13,}, // MCMC110_Dark2 mcmc2_allgain_y5 -{0x6f, 0x12,}, // MCMC111_Dark2 mcmc2_allgain_y6 -{0x70, 0x12,}, // MCMC112_Dark2 mcmc2_allgain_y7 -{0x71, 0x12,}, // MCMC113_Dark2 mcmc2_allgain_y8 -{0x72, 0x11,}, // MCMC114_Dark2 mcmc2_allgain_y9 -{0x73, 0x10,}, // MCMC115_Dark2 mcmc2_allgain_y10 -{0x74, 0x0f,}, // MCMC116_Dark2 mcmc2_allgain_y11 - -// LowTemp MCMC -{0x75, 0x10,}, // MCMC00_LowTemp mcmc_delta1 -{0x76, 0x39,}, // MCMC01_LowTemp mcmc_center1 -{0x77, 0x10,}, // MCMC02_LowTemp mcmc_delta2 -{0x78, 0x59,}, // MCMC03_LowTemp mcmc_center2 -{0x79, 0x12,}, // MCMC04_LowTemp mcmc_delta3 -{0x7a, 0x9d,}, // MCMC05_LowTemp mcmc_center3 -{0x7b, 0x12,}, // MCMC06_LowTemp mcmc_delta4 -{0x7c, 0xc1,}, // MCMC07_LowTemp mcmc_center4 -{0x7d, 0x18,}, // MCMC08_LowTemp mcmc_delta5 -{0x7e, 0xeb,}, // MCMC09_LowTemp mcmc_center5 -{0x7f, 0x99,}, // MCMC10_LowTemp mcmc_delta6 -{0x80, 0x1c,}, // MCMC11_LowTemp mcmc_center6 - -{0x81, 0x40,}, // MCMC12_LowTemp mcmc_sat_gain1 -{0x82, 0x40,}, // MCMC13_LowTemp mcmc_sat_gain2 -{0x83, 0x40,}, // MCMC14_LowTemp mcmc_sat_gain3 -{0x84, 0x40,}, // MCMC15_LowTemp mcmc_sat_gain4 -{0x85, 0x40,}, // MCMC16_LowTemp mcmc_sat_gain5 -{0x86, 0x40,}, // MCMC17_LowTemp mcmc_sat_gain6 -{0x87, 0x00,}, // MCMC18_LowTemp mcmc_hue_angle1 -{0x88, 0x00,}, // MCMC19_LowTemp mcmc_hue_angle2 -{0x89, 0x00,}, // MCMC20_LowTemp mcmc_hue_angle3 -{0x8a, 0x00,}, // MCMC21_LowTemp mcmc_hue_angle4 -{0x8b, 0x00,}, // MCMC22_LowTemp mcmc_hue_angle5 -{0x8c, 0x00,}, // MCMC23_LowTemp mcmc_hue_angle6 - -{0x8d, 0x1f,}, // MCMC24_LowTemp mcmc_rgb_ofs_sig -{0x8e, 0x1f,}, // MCMC25_LowTemp mcmc_rgb_ofs_sig -{0x8f, 0x1f,}, // MCMC26_LowTemp mcmc_rgb_ofs_sig - -{0x90, 0x00,}, // MCMC27_LowTemp mcmc_rgb_ofs_r1 -{0x91, 0x00,}, // MCMC28_LowTemp mcmc_rgb_ofs_r1 -{0x92, 0x00,}, // MCMC29_LowTemp mcmc_rgb_ofs_r1 - -{0x93, 0x00,}, // MCMC30_LowTemp mcmc_rgb_ofs_r2 -{0x94, 0x00,}, // MCMC31_LowTemp mcmc_rgb_ofs_r2 -{0x95, 0x00,}, // MCMC32_LowTemp mcmc_rgb_ofs_r2 - -{0x96, 0x00,}, // MCMC33_LowTemp mcmc_rgb_ofs_r3 -{0x97, 0x00,}, // MCMC34_LowTemp mcmc_rgb_ofs_r3 -{0x98, 0x00,}, // MCMC35_LowTemp mcmc_rgb_ofs_r3 - -{0x99, 0x00,}, // MCMC36_LowTemp mcmc_rgb_ofs_r4 -{0x9a, 0x00,}, // MCMC37_LowTemp mcmc_rgb_ofs_r4 -{0x9b, 0x00,}, // MCMC38_LowTemp mcmc_rgb_ofs_r4 - -{0x9c, 0x00,}, // MCMC39_LowTemp mcmc_rgb_ofs_r5 -{0x9d, 0x00,}, // MCMC40_LowTemp mcmc_rgb_ofs_r5 -{0x9e, 0x00,}, // MCMC41_LowTemp mcmc_rgb_ofs_r5 - -{0x9f, 0x00,}, // MCMC42_LowTemp mcmc_rgb_ofs_r6 R -{0xa0, 0x00,}, // MCMC43_LowTemp mcmc_rgb_ofs_r6 G -{0xa1, 0x00,}, // MCMC44_LowTemp mcmc_rgb_ofs_r6 B - -{0xa2, 0x00,}, // MCMC45_LowTemp mcmc_std_offset1 -{0xa3, 0x00,}, // MCMC46_LowTemp mcmc_std_offset2 -{0xa4, 0xff,}, // MCMC47_LowTemp mcmc_std_th_max -{0xa5, 0x00,}, // MCMC48_LowTemp mcmc_std_th_min - -{0xa6, 0x3f,}, // MCMC49_LowTemp mcmc_lum_gain_wgt R1 -{0xa7, 0x3f,}, // MCMC50_LowTemp mcmc_lum_gain_wgt R1 -{0xa8, 0x3f,}, // MCMC51_LowTemp mcmc_lum_gain_wgt R1 -{0xa9, 0x3f,}, // MCMC52_LowTemp mcmc_lum_gain_wgt R1 -{0xaa, 0x30,}, // MCMC53_LowTemp mcmc_rg1_lum_sp1 R1 -{0xab, 0x50,}, // MCMC54_LowTemp mcmc_rg1_lum_sp2 R1 -{0xac, 0x80,}, // MCMC55_LowTemp mcmc_rg1_lum_sp3 R1 -{0xad, 0xb0,}, // MCMC56_LowTemp mcmc_rg1_lum_sp4 R1 - -{0xae, 0x3f,}, // MCMC57_LowTemp mcmc_lum_gain_wgt R2 -{0xaf, 0x3f,}, // MCMC58_LowTemp mcmc_lum_gain_wgt R2 -{0xb0, 0x3f,}, // MCMC59_LowTemp mcmc_lum_gain_wgt R2 -{0xb1, 0x3f,}, // MCMC60_LowTemp mcmc_lum_gain_wgt R2 -{0xb2, 0x28,}, // MCMC61_LowTemp mcmc_rg2_lum_sp1 R2 -{0xb3, 0x50,}, // MCMC62_LowTemp mcmc_rg2_lum_sp2 R2 -{0xb4, 0x80,}, // MCMC63_LowTemp mcmc_rg2_lum_sp3 R2 -{0xb5, 0xb0,}, // MCMC64_LowTemp mcmc_rg2_lum_sp4 R2 - -{0xb6, 0x3f,}, // MCMC65_LowTemp mcmc_lum_gain_wgt R3 -{0xb7, 0x3f,}, // MCMC66_LowTemp mcmc_lum_gain_wgt R3 -{0xb8, 0x3f,}, // MCMC67_LowTemp mcmc_lum_gain_wgt R3 -{0xb9, 0x3f,}, // MCMC68_LowTemp mcmc_lum_gain_wgt R3 -{0xba, 0x28,}, // MCMC69_LowTemp mcmc_rg3_lum_sp1 R3 -{0xbb, 0x50,}, // MCMC70_LowTemp mcmc_rg3_lum_sp2 R3 -{0xbc, 0x80,}, // MCMC71_LowTemp mcmc_rg3_lum_sp3 R3 -{0xbd, 0xb0,}, // MCMC72_LowTemp mcmc_rg3_lum_sp4 R3 - -{0xbe, 0x3f,}, // MCMC73_LowTemp mcmc_lum_gain_wgt R4 -{0xbf, 0x3f,}, // MCMC74_LowTemp mcmc_lum_gain_wgt R4 -{0xc0, 0x3f,}, // MCMC75_LowTemp mcmc_lum_gain_wgt R4 -{0xc1, 0x3f,}, // MCMC76_LowTemp mcmc_lum_gain_wgt R4 -{0xc2, 0x10,}, // MCMC77_LowTemp mcmc_rg4_lum_sp1 R4 -{0xc3, 0x30,}, // MCMC78_LowTemp mcmc_rg4_lum_sp2 R4 -{0xc4, 0x60,}, // MCMC79_LowTemp mcmc_rg4_lum_sp3 R4 -{0xc5, 0x90,}, // MCMC80_LowTemp mcmc_rg4_lum_sp4 R4 - -{0xc6, 0x3f,}, // MCMC81_LowTemp mcmc_rg5_gain_wgt R5 -{0xc7, 0x3f,}, // MCMC82_LowTemp mcmc_rg5_gain_wgt R5 -{0xc8, 0x3f,}, // MCMC83_LowTemp mcmc_rg5_gain_wgt R5 -{0xc9, 0x3f,}, // MCMC84_LowTemp mcmc_rg5_gain_wgt R5 -{0xca, 0x28,}, // MCMC85_LowTemp mcmc_rg5_lum_sp1 R5 -{0xcb, 0x50,}, // MCMC86_LowTemp mcmc_rg5_lum_sp2 R5 -{0xcc, 0x80,}, // MCMC87_LowTemp mcmc_rg5_lum_sp3 R5 -{0xcd, 0xb0,}, // MCMC88_LowTemp mcmc_rg5_lum_sp4 R5 - -{0xce, 0x3f,}, // MCMC89_LowTemp mcmc_rg6_gain_wgt R6 -{0xcf, 0x3f,}, // MCMC90_LowTemp mcmc_rg6_gain_wgt R6 -{0xd0, 0x3f,}, // MCMC91_LowTemp mcmc_rg6_gain_wgt R6 -{0xd1, 0x3f,}, // MCMC92_LowTemp mcmc_rg6_gain_wgt R6 -{0xd2, 0x28,}, // MCMC93_LowTemp mcmc_rg6_lum_sp1 R6 -{0xd3, 0x50,}, // MCMC94_LowTemp mcmc_rg6_lum_sp2 R6 -{0xd4, 0x80,}, // MCMC95_LowTemp mcmc_rg6_lum_sp3 R6 -{0xd5, 0xb0,}, // MCMC96_LowTemp mcmc_rg6_lum_sp4 R6 - -{0xd6, 0x1a,}, // MCMC97_LowTemp mcmc2_allgain_x1 -{0xd7, 0x38,}, // MCMC98_LowTemp mcmc2_allgain_x2 -{0xd8, 0x38,}, // MCMC99_LowTemp mcmc2_allgain_x4 -{0xd9, 0x1a,}, // MCMC100_LowTemp mcmc2_allgain_x5 -{0xda, 0x1a,}, // MCMC101_LowTemp mcmc2_allgain_x7 -{0xdb, 0x38,}, // MCMC102_LowTemp mcmc2_allgain_x8 -{0xdc, 0x38,}, // MCMC103_LowTemp mcmc2_allgain_x10 -{0xdd, 0x1a,}, // MCMC104_LowTemp mcmc2_allgain_x11 - -{0xde, 0x10,}, // MCMC105_LowTemp mcmc2_allgain_y0 -{0xdf, 0x0f,}, // MCMC106_LowTemp mcmc2_allgain_y1 -{0xe0, 0x0e,}, // MCMC107_LowTemp mcmc2_allgain_y2 -{0xe1, 0x0e,}, // MCMC108_LowTemp mcmc2_allgain_y3 -{0xe2, 0x12,}, // MCMC109_LowTemp mcmc2_allgain_y4 -{0xe3, 0x16,}, // MCMC110_LowTemp mcmc2_allgain_y5 -{0xe4, 0x16,}, // MCMC111_LowTemp mcmc2_allgain_y6 -{0xe5, 0x14,}, // MCMC112_LowTemp mcmc2_allgain_y -{0xe6, 0x12,}, // MCMC113_LowTemp mcmc2_allgain_y8 -{0xe7, 0x10,}, // MCMC114_LowTemp mcmc2_allgain_y9 -{0xe8, 0x10,}, // MCMC115_LowTemp mcmc2_allgain_y10 -{0xe9, 0x10,}, // MCMC116_LowTemp mcmc2_allgain_y11 -{0x0e, 0x00,}, // burst end - -// HighTemp MCMC -{0x03, 0xd7,}, //Page d7 -{0xea, 0x10,}, //Hi-Temp_delta1 -{0xeb, 0x39,}, //Hi-Temp_center1 -{0xec, 0x10,}, //Hi-Temp_delta2 -{0xed, 0x59,}, //Hi-Temp_center2 -{0xee, 0x12,}, //Hi-Temp_delta3 -{0xef, 0x9d,}, //Hi-Temp_center3 -{0xf0, 0x12,}, //Hi-Temp_delta4 -{0xf1, 0xbd,}, //Hi-Temp_center4 -{0xf2, 0x1e,}, //Hi-Temp_delta5 -{0xf3, 0xf1,}, //Hi-Temp_center5 -{0xf4, 0x9e,}, //Hi-Temp_delta6 -{0xf5, 0x34,}, //Hi-Temp_center6 -{0xf6, 0x40,}, //Hi-Temp_sat_gain1 -{0xf7, 0x40,}, //Hi-Temp_sat_gain2 -{0xf8, 0x40,}, //Hi-Temp_sat_gain3 -{0xf9, 0x40,}, //Hi-Temp_sat_gain4 -{0xfa, 0x40,}, //Hi-Temp_sat_gain5 -{0xfb, 0x40,}, //Hi-Temp_sat_gain6 -{0xfc, 0x00,}, //Hi-Temp_hue_angle1 -{0xfd, 0x00,}, //Hi-Temp_hue_angle2 - -{0x03, 0xd8,}, //Page d8 -{0x0e, 0x01,}, // burst start - -{0x10, 0x00,}, //Hi-Temp_hue_angle3 -{0x11, 0x00,}, //Hi-Temp_hue_angle4 -{0x12, 0x06,}, //Hi-Temp_hue_angle5 -{0x13, 0x00,}, //Hi-Temp_hue_angle6 -{0x14, 0x11,}, //Hi-Temp_rgb_ofs_sign_r -{0x15, 0x11,}, //Hi-Temp_rgb_ofs_sign_g -{0x16, 0x11,}, //Hi-Temp_rgb_ofs_sign_b -{0x17, 0x00,}, //Hi-Temp_rgb_ofs_scl_r1 -{0x18, 0x00,}, //Hi-Temp_rgb_ofs_scl_g1 -{0x19, 0x00,}, //Hi-Temp_rgb_ofs_scl_b1 -{0x1a, 0x00,}, //Hi-Temp_rgb_ofs_scl_r2 -{0x1b, 0x00,}, //Hi-Temp_rgb_ofs_scl_g2 -{0x1c, 0x00,}, //Hi-Temp_rgb_ofs_scl_b2 -{0x1d, 0x00,}, //Hi-Temp_rgb_ofs_scl_r3 -{0x1e, 0x00,}, //Hi-Temp_rgb_ofs_scl_g3 -{0x1f, 0x00,}, //Hi-Temp_rgb_ofs_scl_b3 -{0x20, 0x00,}, //Hi-Temp_rgb_ofs_scl_r4 -{0x21, 0x00,}, //Hi-Temp_rgb_ofs_scl_g4 -{0x22, 0x00,}, //Hi-Temp_rgb_ofs_scl_b4 -{0x23, 0x00,}, //Hi-Temp_rgb_ofs_scl_r5 -{0x24, 0x00,}, //Hi-Temp_rgb_ofs_scl_g5 -{0x25, 0x00,}, //Hi-Temp_rgb_ofs_scl_b5 -{0x26, 0x00,}, //Hi-Temp_rgb_ofs_scl_r6 -{0x27, 0x00,}, //Hi-Temp_rgb_ofs_scl_g6 -{0x28, 0x00,}, //Hi-Temp_rgb_ofs_scl_b6 -{0x29, 0x00,}, //Hi-Temp_std_offset1 -{0x2a, 0x00,}, //Hi-Temp_std_offset2 -{0x2b, 0xff,}, //Hi-Temp_std_th_max -{0x2c, 0x00,}, //Hi-Temp_std_th_min -{0x2d, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th1 -{0x2e, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th2 -{0x2f, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th3 -{0x30, 0x3f,}, //Hi-Temp_rg1_lum_gain_wgt_th4 -{0x31, 0x30,}, //Hi-Temp_rg1_lum_sp1 -{0x32, 0x50,}, //Hi-Temp_rg1_lum_sp2 -{0x33, 0x80,}, //Hi-Temp_rg1_lum_sp3 -{0x34, 0xb0,}, //Hi-Temp_rg1_lum_sp4 -{0x35, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th1 -{0x36, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th2 -{0x37, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th3 -{0x38, 0x3f,}, //Hi-Temp_rg2_gain_wgt_th4 -{0x39, 0x28,}, //Hi-Temp_rg2_lum_sp1 -{0x3a, 0x50,}, //Hi-Temp_rg2_lum_sp2 -{0x3b, 0x80,}, //Hi-Temp_rg2_lum_sp3 -{0x3c, 0xb0,}, //Hi-Temp_rg2_lum_sp4 -{0x3d, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th1 -{0x3e, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th2 -{0x3f, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th3 -{0x40, 0x3f,}, //Hi-Temp_rg3_gain_wgt_th4 -{0x41, 0x28,}, //Hi-Temp_rg3_lum_sp1 -{0x42, 0x50,}, //Hi-Temp_rg3_lum_sp2 -{0x43, 0x80,}, //Hi-Temp_rg3_lum_sp3 -{0x44, 0xb0,}, //Hi-Temp_rg3_lum_sp4 - -{0x45, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th1 -{0x46, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th2 -{0x47, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th3 -{0x48, 0x3f,}, //Hi-Temp_rg4_gain_wgt_th4 -{0x49, 0x10,}, //Hi-Temp_rg4_lum_sp1 -{0x4a, 0x30,}, //Hi-Temp_rg4_lum_sp2 -{0x4b, 0x60,}, //Hi-Temp_rg4_lum_sp3 -{0x4c, 0x90,}, //Hi-Temp_rg4_lum_sp4 - -{0x4d, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th1 -{0x4e, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th2 -{0x4f, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th3 -{0x50, 0x3f,}, //Hi-Temp_rg5_gain_wgt_th4 -{0x51, 0x28,}, //Hi-Temp_rg5_lum_sp1 -{0x52, 0x50,}, //Hi-Temp_rg5_lum_sp2 -{0x53, 0x80,}, //Hi-Temp_rg5_lum_sp3 -{0x54, 0xb0,}, //Hi-Temp_rg5_lum_sp4 - -{0x55, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th1 -{0x56, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th2 -{0x57, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th3 -{0x58, 0x3f,}, //Hi-Temp_rg6_gain_wgt_th4 -{0x59, 0x28,}, //Hi-Temp_rg6_lum_sp1 -{0x5a, 0x50,}, //Hi-Temp_rg6_lum_sp2 -{0x5b, 0x80,}, //Hi-Temp_rg6_lum_sp3 -{0x5c, 0xb0,}, //Hi-Temp_rg6_lum_sp4 - -{0x5d, 0x19,}, //Hi-Temp_allgain_x1 -{0x5e, 0x37,}, //Hi-Temp_allgain_x2 -{0x5f, 0x37,}, //Hi-Temp_allgain_x3 -{0x60, 0x19,}, //Hi-Temp_allgain_x4 -{0x61, 0x19,}, //Hi-Temp_allgain_x5 -{0x62, 0x37,}, //Hi-Temp_allgain_x6 -{0x63, 0x37,}, //Hi-Temp_allgain_x7 -{0x64, 0x19,}, //Hi-Temp_allgain_x8 - -{0x65, 0x0e,}, //Hi-Temp_allgain_y0 -{0x66, 0x0d,}, //Hi-Temp_allgain_y1 -{0x67, 0x0e,}, //Hi-Temp_allgain_y2 -{0x68, 0x0e,}, //Hi-Temp_allgain_y3 -{0x69, 0x10,}, //Hi-Temp_allgain_y4 -{0x6a, 0x10,}, //Hi-Temp_allgain_y5 -{0x6b, 0x13,}, //Hi-Temp_allgain_y6 -{0x6c, 0x12,}, //Hi-Temp_allgain_y7 -{0x6d, 0x13,}, //Hi-Temp_allgain_y8 -{0x6e, 0x12,}, //Hi-Temp_allgain_y9 -{0x6f, 0x0e,}, //Hi-Temp_allgain_y10 -{0x70, 0x11,}, //Hi-Temp_allgain_y11 - -{0x0e, 0x00,}, // burst end - -{0x03, 0xD3,}, -{0x11, 0xFE,}, // Adaptive LSC on -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off for HD - -/////////////////////////////////////////////////////////////////////////////// -// DE ~ E0 Page (DMA Outdoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xde,}, //DMA DE Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x77,}, //Outdoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Outdoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Outdoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Outdoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Outdoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Outdoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Outdoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x00,}, //Outdoor 1137 -{0x22, 0x38,}, -{0x23, 0x00,}, //Outdoor 1138 -{0x24, 0x39,}, -{0x25, 0x00,}, //Outdoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Outdoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Outdoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Outdoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x00,}, //Outdoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Outdoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Outdoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Outdoor 1140 -{0x34, 0x41,}, -{0x35, 0x00,}, //Outdoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Outdoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Outdoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Outdoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Outdoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Outdoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Outdoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Outdoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Outdoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Outdoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Outdoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x23,}, //Outdoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x2c,}, //Outdoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3f,}, //Outdoor 1153 -{0x50, 0x54,}, -{0x51, 0x3f,}, //Outdoor 1154 -{0x52, 0x55,}, -{0x53, 0x3e,}, //Outdoor 1155 -{0x54, 0x56,}, -{0x55, 0x3c,}, //Outdoor 1156 -{0x56, 0x57,}, -{0x57, 0x3a,}, //Outdoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Outdoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Outdoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Outdoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x3a,}, //Outdoor 115b -{0x60, 0x5c,}, -{0x61, 0x37,}, //Outdoor 115c -{0x62, 0x5d,}, -{0x63, 0x34,}, //Outdoor 115d -{0x64, 0x5e,}, -{0x65, 0x32,}, //Outdoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Outdoor 115f -{0x68, 0x6e,}, -{0x69, 0x1c,}, //Outdoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Outdoor 116f -{0x6c, 0x77,}, -{0x6d, 0x2b,}, //Outdoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x2a,}, //Outdoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Outdoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x1a,}, //Outdoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x1c,}, //Outdoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x1a,}, //Outdoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x19,}, //Outdoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x17,}, //Outdoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1e,}, //Outdoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1e,}, //Outdoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1f,}, //Outdoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x1e,}, //Outdoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x1a,}, //Outdoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x1a,}, //Outdoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x1a,}, //Outdoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x1a,}, //Outdoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x1a,}, //Outdoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x16,}, //Outdoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x16,}, //Outdoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x15,}, //Outdoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x17,}, //Outdoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x17,}, //Outdoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x17,}, //Outdoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x16,}, //Outdoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Outdoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x20,}, //Outdoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x23,}, //Outdoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x21,}, //Outdoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x21,}, //Outdoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x20,}, //Outdoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1b,}, //Outdoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x18,}, //Outdoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x2b,},//Outdoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x2b,},//Outdoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x2b,},//Outdoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x2b,},//Outdoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x2b,},//Outdoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x2c,},//Outdoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x31,},//Outdoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x35,},//Outdoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Outdoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Outdoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Outdoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Outdoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Outdoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Outdoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x30,},//Outdoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x30,},//Outdoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x30,},//Outdoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x30,},//Outdoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x30,},//Outdoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x30,},//Outdoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x2d,},//Outdoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x2a,},//Outdoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x15,},//Outdoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Outdoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Outdoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Outdoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x01,}, //Outdoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x0a,}, //Outdoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Outdoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,},//Outdoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Outdoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x06,}, //Outdoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Outdoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Outdoor 11db -{0xf2, 0xdf,}, -{0xf3, 0x55,}, //Outdoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x36,}, //Outdoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Outdoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x35,}, //Outdoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xa0,}, //Outdoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Outdoor 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xdf,}, //DMA DF Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x20,},//Outdoor 11e5 -{0x12, 0xe6,}, -{0x13, 0x01,}, //Outdoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x1a,},//Outdoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Outdoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x10,}, //Outdoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x01,}, //Outdoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x12,}, //Outdoor 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Outdoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Outdoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Outdoor 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x1a,}, //Outdoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Outdoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x36,}, //Outdoor 1277 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Outdoor 1278 -{0x2e, 0x79,}, -{0x2f, 0x09,}, //Outdoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Outdoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Outdoor 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Outdoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Outdoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Outdoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Outdoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Outdoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Outdoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Outdoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Outdoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Outdoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Outdoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Outdoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Outdoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Outdoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Outdoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Outdoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Outdoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Outdoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Outdoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Outdoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x7f,}, //Outdoor 12ae -{0x5c, 0xaf,}, -{0x5d, 0x63,},//Outdoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Outdoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Outdoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Outdoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Outdoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Outdoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Outdoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Outdoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Outdoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Outdoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Outdoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Outdoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Outdoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Outdoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Outdoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x30,},//Outdoor 12d7 //CI LPF NR offset -{0x7c, 0xd8,}, -{0x7d, 0x33,},//Outdoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x35,},//Outdoor 12d9 -{0x80, 0xda,}, -{0x81, 0x35,},//Outdoor 12da -{0x82, 0xdb,}, -{0x83, 0x34,},//Outdoor 12db -{0x84, 0xdc,}, -{0x85, 0x30,},//Outdoor 12dc -{0x86, 0xdd,}, -{0x87, 0x2a,},//Outdoor 12dd -{0x88, 0xde,}, -{0x89, 0x26,},//Outdoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x49,}, //Outdoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Outdoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Outdoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x20,}, //Outdoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x20,}, //Outdoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x20,}, //Outdoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x20,}, //Outdoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x20,}, //Outdoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x20,}, //Outdoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x20,}, //Outdoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x20,}, //Outdoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Outdoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1e,}, //Outdoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1d,}, //Outdoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x20,}, //Outdoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Outdoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Outdoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Outdoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Outdoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x3f,}, //Outdoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x3f,}, //Outdoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x3f,}, //Outdoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x3f,}, //Outdoor 1333 -{0xba, 0x34,}, -{0xbb, 0x3f,}, //Outdoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x33,}, //Outdoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x2f,}, //Outdoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x2e,}, //Outdoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Outdoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x1e,}, //Outdoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x22,}, //Outdoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Outdoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Outdoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Outdoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Outdoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x36,}, //Outdoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Outdoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x20,}, //Outdoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Outdoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Outdoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Outdoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x20,}, //Outdoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Outdoor 1383 -{0xe0, 0x84,}, -{0xe1, 0x08,}, //Outdoor 1384 -{0xe2, 0xb7,}, -{0xe3, 0xfd,}, //Outdoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xa7,}, //Outdoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Outdoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Outdoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Outdoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Outdoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Outdoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Outdoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Outdoor 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Outdoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Outdoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Outdoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x0f,}, //Outdoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Outdoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x1c,}, //Outdoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Outdoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Outdoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Outdoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Outdoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1d,}, //Outdoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x26,}, //Outdoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x24,}, //Outdoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x23,}, //Outdoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x1a,}, //Outdoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x14,}, //Outdoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Outdoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x16,}, //Outdoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x16,}, //Outdoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x22,}, //Outdoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x21,}, //Outdoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x20,}, //Outdoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x1a,}, //Outdoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x19,}, //Outdoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x15,}, //Outdoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x18,}, //Outdoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x1b,}, //Outdoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x24,}, //Outdoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Outdoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x24,}, //Outdoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x1a,}, //Outdoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x14,}, //Outdoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x10,}, //Outdoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x18,}, //Outdoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x18,},//Outdoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x18,}, //Outdoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Outdoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x1b,}, //Outdoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x19,}, //Outdoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x19,}, //Outdoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x1e,}, //Outdoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x25,}, //Outdoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x25,}, //Outdoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x24,}, //Outdoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x24,}, //Outdoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x28,}, //Outdoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2e,},//Outdoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x30,},//Outdoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x31,},//Outdoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x30,},//Outdoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x28,},//Outdoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x27,}, //Outdoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x28,}, //Outdoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x2d,}, //Outdoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x2d,},//Outdoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x2e,},//Outdoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x2b,},//Outdoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x28,},//Outdoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x25,},//Outdoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Outdoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Outdoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Outdoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Outdoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Outdoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Outdoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Outdoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Outdoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Outdoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Outdoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Outdoor 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Outdoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Outdoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Outdoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Outdoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x3f,}, //Outdoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x3f,}, //Outdoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x3f,}, //Outdoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x3c,}, //Outdoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x38,}, //Outdoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x35,}, //Outdoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Outdoor 1A20 add -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Outdoor 1A2f add -{0xae, 0x32,}, -{0xaf, 0x87,}, //Outdoor 1A32 add -{0xb0, 0x34,}, -{0xb1, 0xd2,}, //Outdoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1c,}, //Outdoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x06,},//Outdoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Outdoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Outdoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Outdoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Outdoor 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Outdoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Outdoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Outdoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Outdoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Outdoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Outdoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Outdoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Outdoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Outdoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x0e,}, //Outdoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x0e,}, //Outdoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x0e,}, //Outdoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x13,}, //Outdoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x17,}, //Outdoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x17,}, //Outdoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x17,}, //Outdoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x17,}, //Outdoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x14,}, //Outdoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x11,}, //Outdoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x10,}, //Outdoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Outdoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x12,}, //Outdoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x12,}, //Outdoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x12,}, //Outdoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x12,}, //Outdoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x0f,}, //Outdoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x0f,}, //Outdoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x10,}, //Outdoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x17,}, //Outdoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x19,}, //Outdoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x17,}, //Outdoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x16,}, //Outdoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E0 page. -{0xD0, 0x27,}, -{0xD1, 0x42,}, - -{0x03, 0xe0,}, //DMA E0 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x16,}, //Outdoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x10,}, //Outdoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x16,}, //Outdoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x15,}, //Outdoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x12,}, //Outdoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Outdoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x13,}, //Outdoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x13,}, //Outdoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x13,}, //Outdoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x29,}, //Outdoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x29,}, //Outdoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x29,}, //Outdoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x2f,},//Outdoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x2f,},//Outdoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x2f,},//Outdoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x27,},//Outdoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x25,},//Outdoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x28,}, //Outdoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x28,}, //Outdoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x2f,},//Outdoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x2e,},//Outdoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x2d,},//Outdoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x2d,},//Outdoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x29,},//Outdoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x25,},//Outdoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x23,},//Outdoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Outdoor 1Aa7 add -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Outdoor 1Aa8 add -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Outdoor 1Aa9 add -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Outdoor 1Aaa add -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Outdoor 1Aab add -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Outdoor 1Aaf add -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Outdoor 1Ab0 add -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Outdoor 1Ab1 add -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Outdoor 1Ab2 add -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Outdoor 1Ab3 add -{0x58, 0xca,}, -{0x59, 0x00,}, //Outdoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Outdoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Outdoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0f,}, //Outdoor 1070 Trans Func. 130108 Outdoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x00,}, //Outdoor 1071 -{0x64, 0x72,}, -{0x65, 0x00,}, //Outdoor 1072 -{0x66, 0x73,}, -{0x67, 0x00,}, //Outdoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Outdoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Outdoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,},//Outdoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x40,},//Outdoor 1077 -{0x70, 0x78,}, -{0x71, 0x00,},//Outdoor 1078 -{0x72, 0x79,}, -{0x73, 0x40,},//Outdoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,},//Outdoor 107a -{0x76, 0x7b,}, -{0x77, 0x40,},//Outdoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,},//Outdoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Outdoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Outdoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Outdoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x30,}, //Outdoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Outdoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Outdoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Outdoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Outdoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x02,}, //Outdoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Outdoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E1 ~ E3 Page (DMA Indoor) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe1,}, //DMA E1 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0x7f,}, //Indoor 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Indoor 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x81,}, //Indoor 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x04,}, //Indoor 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x58,}, //Indoor 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x30,}, //Indoor 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x12,}, //Indoor 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Indoor 1137 //Pre Flat rate -{0x22, 0x38,}, -{0x23, 0x00,}, //Indoor 1138 -{0x24, 0x39,}, -{0x25, 0xff,}, //Indoor 1139 -{0x26, 0x3a,}, -{0x27, 0x00,}, //Indoor 113a -{0x28, 0x3b,}, -{0x29, 0x00,}, //Indoor 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Indoor 113c -{0x2c, 0x3d,}, -{0x2d, 0x20,}, //Indoor 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Indoor 113e -{0x30, 0x3f,}, -{0x31, 0x00,}, //Indoor 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Indoor 1140 -{0x34, 0x41,}, -{0x35, 0x1e,}, //Indoor 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Indoor 1142 -{0x38, 0x43,}, -{0x39, 0x00,}, //Indoor 1143 -{0x3a, 0x49,}, -{0x3b, 0x06,}, //Indoor 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x0a,}, //Indoor 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x12,}, //Indoor 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x1c,}, //Indoor 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x24,}, //Indoor 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x40,}, //Indoor 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x80,}, //Indoor 114f add 720p -{0x48, 0x50,}, -{0x49, 0x3f,}, //Indoor 1150 -{0x4a, 0x51,}, -{0x4b, 0x3f,}, //Indoor 1151 -{0x4c, 0x52,}, -{0x4d, 0x3f,}, //Indoor 1152 -{0x4e, 0x53,}, -{0x4f, 0x3d,}, //Indoor 1153 -{0x50, 0x54,}, -{0x51, 0x3c,}, //Indoor 1154 -{0x52, 0x55,}, -{0x53, 0x38,}, //Indoor 1155 -{0x54, 0x56,}, -{0x55, 0x36,}, //Indoor 1156 -{0x56, 0x57,}, -{0x57, 0x34,}, //Indoor 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Indoor 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Indoor 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3e,}, //Indoor 115a -{0x5e, 0x5b,}, -{0x5f, 0x38,}, //Indoor 115b -{0x60, 0x5c,}, -{0x61, 0x33,}, //Indoor 115c -{0x62, 0x5d,}, -{0x63, 0x31,}, //Indoor 115d -{0x64, 0x5e,}, -{0x65, 0x30,}, //Indoor 115e -{0x66, 0x5f,}, -{0x67, 0x30,}, //Indoor 115f -{0x68, 0x6e,}, -{0x69, 0x20,}, //Indoor 116e -{0x6a, 0x6f,}, -{0x6b, 0x18,}, //Indoor 116f -{0x6c, 0x77,}, -{0x6d, 0x16,}, //Indoor 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x16,}, //Indoor 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x15,}, //Indoor 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x15,}, //Indoor 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x11,}, //Indoor 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Indoor 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x10,}, //Indoor 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x10,}, //Indoor 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x11,}, //Indoor 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x11,}, //Indoor 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x11,}, //Indoor 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x15,}, //Indoor 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x16,}, //Indoor 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x16,}, //Indoor 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x16,}, //Indoor 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x16,}, //Indoor 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x15,}, //Indoor 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x15,}, //Indoor 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x13,}, //Indoor 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x13,}, //Indoor 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x13,}, //Indoor 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x13,}, //Indoor 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x13,}, //Indoor 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Indoor 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x16,}, //Indoor 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x16,}, //Indoor 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x17,}, //Indoor 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x17,}, //Indoor 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x1a,}, //Indoor 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x1a,}, //Indoor 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x1a,}, //Indoor 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x19,}, //Indoor 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x26,}, //Indoor 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x26,}, //Indoor 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x25,}, //Indoor 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x25,}, //Indoor 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x25,}, //Indoor 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x25,}, //Indoor 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x25,}, //Indoor 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x24,}, //Indoor 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x22,}, //Indoor 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x22,}, //Indoor 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x21,}, //Indoor 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x1e,}, //Indoor 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x1c,}, //Indoor 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x1a,}, //Indoor 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x20,}, //Indoor 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x21,}, //Indoor 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x22,}, //Indoor 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x24,}, //Indoor 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x24,}, //Indoor 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x24,}, //Indoor 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x20,}, //Indoor 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x1f,}, //Indoor 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x65,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x18,}, //Indoor 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x3f,}, //Indoor 11d1 -{0xde, 0xd2,}, -{0xdf, 0x40,}, //Indoor 11d2 -{0xe0, 0xd3,}, -{0xe1, 0xff,}, //Indoor 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x02,}, //Indoor 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x1c,}, //Indoor 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x01,}, //Indoor 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x10,}, //Indoor 11d7 -{0xea, 0xd8,}, -{0xeb, 0x01,}, //Indoor 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x0e,}, //Indoor 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x01,}, //Indoor 11da -{0xf0, 0xdb,}, -{0xf1, 0x07,}, //Indoor 11db -{0xf2, 0xdf,}, -{0xf3, 0xcc,}, //Indoor 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x32,}, //Indoor 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x7a,}, //Indoor 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Indoor 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0x00,}, //Indoor 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x01,}, //Indoor 11e4 //Bayer Flat R3 StdL -{0x0e, 0x00,}, // burst end - -{0x03, 0xe2,}, //DMA E2 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x2a,}, //Indoor 11e5 //Bayer Flat R4 StdH -{0x12, 0xe6,}, -{0x13, 0x00,}, //Indoor 11e6 -{0x14, 0xe7,}, -{0x15, 0x00,}, //Indoor 11e7 -{0x16, 0xe8,}, -{0x17, 0x01,}, //Indoor 11e8 -{0x18, 0xe9,}, -{0x19, 0x1d,}, //Indoor 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Indoor 11ea -{0x1c, 0xeb,}, -{0x1d, 0x00,}, //Indoor 11eb -{0x1e, 0xef,}, -{0x1f, 0xac,}, //Indoor 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x37,}, //Indoor 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xbf,}, //Indoor 1270 // Bayer Sharpness ENB add -{0x26, 0x71,}, -{0x27, 0x1a,}, //Indoor 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x16,}, //Indoor 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x26,}, //Indoor 1277 //20130412 -{0x2c, 0x78,}, -{0x2d, 0x2f,}, //Indoor 1278 -{0x2e, 0x79,}, -{0x2f, 0xff,}, //Indoor 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Indoor 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Indoor 127b -{0x34, 0x7c,}, -{0x35, 0x64,}, //Indoor 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x20,}, //Indoor 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Indoor 127f -{0x3a, 0x87,}, -{0x3b, 0x3f,}, //Indoor 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x3f,}, //Indoor 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x3f,}, //Indoor 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x3f,}, //Indoor 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x3f,}, //Indoor 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x3f,}, //Indoor 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x3f,}, //Indoor 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x3f,}, //Indoor 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x3f,}, //Indoor 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x3f,}, //Indoor 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x3f,}, //Indoor 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x3f,}, //Indoor 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x3f,}, //Indoor 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x3f,}, //Indoor 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x3f,}, //Indoor 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x3f,}, //Indoor 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x5f,}, //Indoor 12ae //Bayer Flat off -{0x5c, 0xaf,}, -{0x5d, 0x80,}, //Indoor 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Indoor 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x3c,}, //Indoor 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x1a,}, //Indoor 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x0c,}, //Indoor 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x91,}, //Indoor 12c6 -{0x68, 0xc7,}, -{0x69, 0xa4,}, //Indoor 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x3c,}, //Indoor 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x08,}, //Indoor 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x10,}, //Indoor 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x18,}, //Indoor 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x20,}, //Indoor 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x30,}, //Indoor 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x60,}, //Indoor 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x80,}, //Indoor 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x38,}, //Indoor 12d7 -{0x7c, 0xd8,}, -{0x7d, 0x30,}, //Indoor 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2a,}, //Indoor 12d9 -{0x80, 0xda,}, -{0x81, 0x2a,}, //Indoor 12da -{0x82, 0xdb,}, -{0x83, 0x24,}, //Indoor 12db -{0x84, 0xdc,}, -{0x85, 0x20,}, //Indoor 12dc -{0x86, 0xdd,}, -{0x87, 0x1a,}, //Indoor 12dd -{0x88, 0xde,}, -{0x89, 0x16,}, //Indoor 12de -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Indoor 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Indoor 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Indoor 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Indoor 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Indoor 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Indoor 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Indoor 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Indoor 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Indoor 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Indoor 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Indoor 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Indoor 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Indoor 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Indoor 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Indoor 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Indoor 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Indoor 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Indoor 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x83,}, //Indoor 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Indoor 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Indoor 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Indoor 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Indoor 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Indoor 1334 -{0xbc, 0x35,}, -{0xbd, 0x20,}, //Indoor 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Indoor 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Indoor 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Indoor 1338 -{0xc4, 0x40,}, -{0xc5, 0x18,}, //Indoor 1340 -{0xc6, 0x41,}, -{0xc7, 0x36,}, //Indoor 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Indoor 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Indoor 1343 -{0xcc, 0x44,}, -{0xcd, 0xff,}, //Indoor 1344 -{0xce, 0x45,}, -{0xcf, 0x04,}, //Indoor 1345 -{0xd0, 0x46,}, -{0xd1, 0x45,}, //Indoor 1346 -{0xd2, 0x47,}, -{0xd3, 0x05,}, //Indoor 1347 -{0xd4, 0x48,}, -{0xd5, 0x65,}, //Indoor 1348 -{0xd6, 0x49,}, -{0xd7, 0x02,}, //Indoor 1349 -{0xd8, 0x4a,}, -{0xd9, 0x22,}, //Indoor 134a -{0xda, 0x4b,}, -{0xdb, 0x06,}, //Indoor 134b -{0xdc, 0x4c,}, -{0xdd, 0x30,}, //Indoor 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Indoor 1383 //add 20121210 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Indoor 1384 //add 20121210 -{0xe2, 0xb7,}, -{0xe3, 0xfa,}, //Indoor 13b7 -{0xe4, 0xb8,}, -{0xe5, 0x77,}, //Indoor 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xfe,}, //Indoor 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xca,}, //Indoor 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Indoor 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Indoor 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Indoor 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Indoor 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0xb3,}, //Indoor 1410 -{0xf6, 0x11,}, -{0xf7, 0x98,}, //Indoor 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Indoor 1412 -{0xfa, 0x13,}, -{0xfb, 0x03,}, //Indoor 1413 -{0xfc, 0x14,}, -{0xfd, 0x17,}, //Indoor 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7b,}, //Indoor 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Indoor 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Indoor 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Indoor 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Indoor 1419 -{0x1a, 0x1a,}, -{0x1b, 0x18,}, //Indoor 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x20,}, //Indoor 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x22,}, //Indoor 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x21,}, //Indoor 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x1c,}, //Indoor 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x15,}, //Indoor 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x11,}, //Indoor 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x10,}, //Indoor 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x11,}, //Indoor 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Indoor 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x1a,}, //Indoor 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x15,}, //Indoor 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x14,}, //Indoor 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x13,}, //Indoor 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x12,}, //Indoor 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x12,}, //Indoor 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x14,}, //Indoor 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x15,}, //Indoor 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x22,}, //Indoor 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x22,}, //Indoor 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x21,}, //Indoor 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x20,}, //Indoor 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x1d,}, //Indoor 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x1d,}, //Indoor 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x1d,}, //Indoor 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x1d,}, //Indoor 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x19,}, //Indoor 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x18,}, //Indoor 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x16,}, //Indoor 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x15,}, //Indoor 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x14,}, //Indoor 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Indoor 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x13,}, //Indoor 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x12,}, //Indoor 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x2a,}, //Indoor 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x2b,}, //Indoor 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x2c,}, //Indoor 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x2d,}, //Indoor 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x2d,}, //Indoor 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x2b,}, //Indoor 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x2d,}, //Indoor 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x2e,}, //Indoor 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x1c,}, //Indoor 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x20,}, //Indoor 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x26,}, //Indoor 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x26,}, //Indoor 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x22,}, //Indoor 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x22,}, //Indoor 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x1c,}, //Indoor 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x18,}, //Indoor 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x3f,}, //Indoor 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x3f,}, //Indoor 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x3f,}, //Indoor 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x3f,}, //Indoor 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x3f,}, //Indoor 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x3f,}, //Indoor 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x3f,}, //Indoor 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x3f,}, //Indoor 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x3f,}, //Indoor 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x3f,}, //Indoor 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Indoor 14c9 -{0x94, 0xca,}, -{0x95, 0x27,}, //Indoor 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x15,}, //Indoor 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x3f,}, //Indoor 1A18 -{0x9c, 0x19,}, -{0x9d, 0x3f,}, //Indoor 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x2a,}, //Indoor 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x27,}, //Indoor 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x23,}, //Indoor 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x23,}, //Indoor 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x23,}, //Indoor 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x23,}, //Indoor 1A1f -{0xaa, 0x20,}, -{0xab, 0xe7,}, //Indoor 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf1,}, //Indoor 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x87,}, //Indoor 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xd0,}, //Indoor 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x11,}, //Indoor 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0x00,}, //Indoor 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Indoor 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Indoor 1A38 -{0xba, 0x39,}, -{0xbb, 0x1d,}, //Indoor 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Indoor 1A3a //RGB Flat R2_Lum H -{0xbe, 0x3b,}, -{0xbf, 0x00,}, //Indoor 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x4c,}, //Indoor 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x00,}, //Indoor 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x13,}, //Indoor 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x00,}, //Indoor 1A3f -{0xc8, 0x40,}, -{0xc9, 0x2a,}, //Indoor 1A40 -{0xca, 0x41,}, -{0xcb, 0x00,}, //Indoor 1A41 -{0xcc, 0x42,}, -{0xcd, 0x17,}, //Indoor 1A42 -{0xce, 0x43,}, -{0xcf, 0x2c,}, //Indoor 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x12,}, //Indoor 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x12,}, //Indoor 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x11,}, //Indoor 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x10,}, //Indoor 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x10,}, //Indoor 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Indoor 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x10,}, //Indoor 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x10,}, //Indoor 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x13,}, //Indoor 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x13,}, //Indoor 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x12,}, //Indoor 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x10,}, //Indoor 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x10,}, //Indoor 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Indoor 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x10,}, //Indoor 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x10,}, //Indoor 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x12,}, //Indoor 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x12,}, //Indoor 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x13,}, //Indoor 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x14,}, //Indoor 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x14,}, //Indoor 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x14,}, //Indoor 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x15,}, //Indoor 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E3 page. -{0xD6, 0x2A,}, -{0xD7, 0xFA,}, - -{0x03, 0xe3,}, //DMA E3 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x15,}, //Indoor 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x12,}, //Indoor 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x12,}, //Indoor 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x12,}, //Indoor 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x13,}, //Indoor 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x13,}, //Indoor 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x14,}, //Indoor 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Indoor 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x14,}, //Indoor 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x22,}, //Indoor 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x23,}, //Indoor 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x24,}, //Indoor 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x25,}, //Indoor 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x26,}, //Indoor 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x27,}, //Indoor 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x29,}, //Indoor 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x2b,}, //Indoor 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Indoor 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x23,}, //Indoor 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x26,}, //Indoor 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x26,}, //Indoor 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x26,}, //Indoor 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x26,}, //Indoor 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x26,}, //Indoor 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x26,}, //Indoor 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0x34,}, //Indoor 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x3f,}, //Indoor 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x3f,}, //Indoor 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x3f,}, //Indoor 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x3f,}, //Indoor 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x3f,}, //Indoor 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x3f,}, //Indoor 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x3f,}, //Indoor 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x3f,}, //Indoor 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x3f,}, //Indoor 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x3f,}, //Indoor 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Indoor 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x13,}, //Indoor 1Ae3 add -{0x5c, 0xe4,}, -{0x5d, 0x13,}, //Indoor 1Ae4 add -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Indoor 1070 Trans Func. 130108 Indoor transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x01,}, //Indoor 1071 -{0x64, 0x72,}, -{0x65, 0x89,}, //Indoor 1072 -{0x66, 0x73,}, -{0x67, 0xd4,}, //Indoor 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Indoor 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Indoor 1075 -{0x6c, 0x76,}, -{0x6d, 0x40,}, //Indoor 1076 -{0x6e, 0x77,}, -{0x6f, 0x47,}, //Indoor 1077 -{0x70, 0x78,}, -{0x71, 0xae,}, //Indoor 1078 -{0x72, 0x79,}, -{0x73, 0x50,}, //Indoor 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Indoor 107a -{0x76, 0x7b,}, -{0x77, 0x50,}, //Indoor 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Indoor 107c -{0x7a, 0x7d,}, -{0x7b, 0x05,}, //Indoor 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Indoor 107e -{0x7e, 0x7f,}, -{0x7f, 0x2f,}, //Indoor 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x2a,}, //Indoor 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x00,}, //Indoor 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x8c,}, //Indoor 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x02,}, //Indoor 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x88,}, //Indoor 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x03,}, //Indoor 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0x29,}, //Indoor 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E4 ~ E6 Page (DMA Dark1) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe4,}, //DMA E4 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark1 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark1 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark1 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark1 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark1 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark1 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark1 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark1 1137 //Pre Flat rate B[4:1] -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark1 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark1 1139 //Pre Flat R1 LumH -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark1 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark1 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark1 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark1 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark1 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark1 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark1 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark1 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark1 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark1 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark1 1149 add 720p -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark1 114a add 720p -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark1 114b add 720p -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark1 114c add 720p -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark1 114d add 720p -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark1 114e add 720p -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark1 114f add 720p -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark1 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark1 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark1 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark1 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark1 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark1 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark1 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark1 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark1 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark1 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark1 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark1 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark1 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark1 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark1 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark1 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark1 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark1 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark1 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark1 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark1 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark1 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark1 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark1 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark1 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark1 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark1 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark1 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark1 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark1 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark1 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark1 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark1 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark1 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark1 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark1 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark1 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark1 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark1 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark1 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark1 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark1 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark1 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark1 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark1 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark1 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark1 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark1 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark1 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark1 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark1 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark1 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark1 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark1 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark1 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark1 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark1 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark1 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark1 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark1 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark1 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark1 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark1 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark1 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark1 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark1 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark1 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark1 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark1 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark1 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark1 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark1 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark1 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark1 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark1 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark1 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark1 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark1 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark1 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark1 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark1 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark1 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark1 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark1 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark1 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark1 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark1 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark1 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark1 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark1 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark1 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe5,}, //DMA E5 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark1 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark1 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark1 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark1 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark1 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark1 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark1 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark1 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark1 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark1 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark1 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark1 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark1 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark1 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark1 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark1 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark1 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark1 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark1 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark1 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark1 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark1 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark1 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark1 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark1 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark1 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark1 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark1 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark1 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark1 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark1 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark1 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark1 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark1 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark1 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark1 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark1 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark1 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark1 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark1 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark1 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark1 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark1 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark1 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark1 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark1 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark1 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark1 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark1 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark1 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark1 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark1 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark1 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark1 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark1 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark1 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark1 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark1 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark1 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark1 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark1 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark1 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark1 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark1 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark1 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark1 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark1 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark1 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark1 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark1 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark1 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark1 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark1 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark1 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark1 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark1 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark1 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark1 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark1 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark1 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark1 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark1 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark1 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark1 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark1 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark1 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark1 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark1 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark1 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark1 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark1 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark1 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark1 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark1 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark1 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark1 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark1 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark1 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark1 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark1 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark1 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark1 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark1 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark1 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark1 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark1 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark1 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark1 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark1 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark1 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark1 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark1 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark1 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark1 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark1 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark1 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark1 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark1 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark1 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark1 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark1 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark1 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark1 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark1 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark1 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark1 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark1 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark1 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark1 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark1 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark1 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark1 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark1 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark1 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark1 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark1 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark1 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark1 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark1 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark1 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark1 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark1 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark1 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark1 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark1 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark1 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark1 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark1 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark1 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark1 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark1 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark1 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark1 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark1 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark1 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark1 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x13,}, //Dark1 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x13,}, //Dark1 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x14,}, //Dark1 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x16,}, //Dark1 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x16,}, //Dark1 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x15,}, //Dark1 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x13,}, //Dark1 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark1 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark1 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark1 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark1 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark1 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark1 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark1 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark1 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark1 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark1 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark1 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark1 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark1 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark1 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark1 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark1 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark1 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark1 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark1 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark1 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark1 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark1 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark1 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark1 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark1 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark1 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark1 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark1 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark1 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark1 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark1 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark1 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark1 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark1 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark1 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark1 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark1 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark1 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark1 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark1 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark1 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark1 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark1 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark1 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark1 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark1 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark1 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark1 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark1 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark1 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark1 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark1 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark1 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark1 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark1 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark1 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark1 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark1 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark1 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark1 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark1 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark1 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark1 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark1 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark1 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark1 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark1 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark1 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark1 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark1 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark1 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E6 page. -{0xDC, 0x2E,}, -{0xDD, 0xB2,}, - -{0x03, 0xe6,}, //DMA E6 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark1 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark1 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark1 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark1 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark1 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark1 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark1 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark1 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark1 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark1 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark1 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark1 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark1 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark1 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark1 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark1 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark1 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark1 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark1 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark1 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark1 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark1 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark1 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark1 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark1 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark1 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark1 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark1 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark1 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark1 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark1 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark1 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark1 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark1 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark1 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark1 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark1 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark1 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark1 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark1 1070 Trans Func. 130108 Dark1 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark1 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark1 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark1 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark1 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark1 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark1 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark1 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark1 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark1 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark1 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark1 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark1 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark1 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark1 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark1 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark1 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark1 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark1 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark1 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark1 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x04,}, //Dark1 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark1 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -/////////////////////////////////////////////////////////////////////////////// -// E7 ~ E9 Page (DMA Dark2) -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0xe7,}, //DMA E7 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x03,}, -{0x11, 0x11,}, //11 page -{0x12, 0x11,}, -{0x13, 0xff,}, //Dark2 1111 add 720p -{0x14, 0x14,}, -{0x15, 0x00,}, //Dark2 1114 add 720p -{0x16, 0x15,}, -{0x17, 0x00,}, //Dark2 1115 add 720p -{0x18, 0x16,}, -{0x19, 0x00,}, //Dark2 1116 add 720p -{0x1a, 0x17,}, -{0x1b, 0x1e,}, //Dark2 1117 add 720p -{0x1c, 0x18,}, -{0x1d, 0x10,}, //Dark2 1118 add 720p -{0x1e, 0x19,}, -{0x1f, 0x06,}, //Dark2 1119 add 720p -{0x20, 0x37,}, -{0x21, 0x01,}, //Dark2 1137 //Pre Flat rate B[4:1] //04 -{0x22, 0x38,}, -{0x23, 0x00,}, //Dark2 1138 //Pre Flat R1 LumL -{0x24, 0x39,}, -{0x25, 0x03,}, //Dark2 1139 -{0x26, 0x3a,}, -{0x27, 0x03,}, //Dark2 113a -{0x28, 0x3b,}, -{0x29, 0xff,}, //Dark2 113b -{0x2a, 0x3c,}, -{0x2b, 0x00,}, //Dark2 113c -{0x2c, 0x3d,}, -{0x2d, 0x13,}, //Dark2 113d -{0x2e, 0x3e,}, -{0x2f, 0x00,}, //Dark2 113e -{0x30, 0x3f,}, -{0x31, 0x10,}, //Dark2 113f -{0x32, 0x40,}, -{0x33, 0x00,}, //Dark2 1140 -{0x34, 0x41,}, -{0x35, 0x10,}, //Dark2 1141 -{0x36, 0x42,}, -{0x37, 0x00,}, //Dark2 1142 -{0x38, 0x43,}, -{0x39, 0x18,}, //Dark2 1143 -{0x3a, 0x49,}, -{0x3b, 0x02,}, //Dark2 1149 -{0x3c, 0x4a,}, -{0x3d, 0x04,}, //Dark2 114a -{0x3e, 0x4b,}, -{0x3f, 0x07,}, //Dark2 114b -{0x40, 0x4c,}, -{0x41, 0x0c,}, //Dark2 114c -{0x42, 0x4d,}, -{0x43, 0x10,}, //Dark2 114d -{0x44, 0x4e,}, -{0x45, 0x18,}, //Dark2 114e -{0x46, 0x4f,}, -{0x47, 0x20,}, //Dark2 114f -{0x48, 0x50,}, -{0x49, 0x1a,}, //Dark2 1150 -{0x4a, 0x51,}, -{0x4b, 0x1c,}, //Dark2 1151 -{0x4c, 0x52,}, -{0x4d, 0x1e,}, //Dark2 1152 -{0x4e, 0x53,}, -{0x4f, 0x24,}, //Dark2 1153 -{0x50, 0x54,}, -{0x51, 0x28,}, //Dark2 1154 -{0x52, 0x55,}, -{0x53, 0x26,}, //Dark2 1155 -{0x54, 0x56,}, -{0x55, 0x22,}, //Dark2 1156 -{0x56, 0x57,}, -{0x57, 0x1e,}, //Dark2 1157 -{0x58, 0x58,}, -{0x59, 0x3f,}, //Dark2 1158 -{0x5a, 0x59,}, -{0x5b, 0x3f,}, //Dark2 1159 -{0x5c, 0x5a,}, -{0x5d, 0x3f,}, //Dark2 115a -{0x5e, 0x5b,}, -{0x5f, 0x3f,}, //Dark2 115b -{0x60, 0x5c,}, -{0x61, 0x3f,}, //Dark2 115c -{0x62, 0x5d,}, -{0x63, 0x3f,}, //Dark2 115d -{0x64, 0x5e,}, -{0x65, 0x3f,}, //Dark2 115e -{0x66, 0x5f,}, -{0x67, 0x3f,}, //Dark2 115f -{0x68, 0x6e,}, -{0x69, 0x10,}, //Dark2 116e -{0x6a, 0x6f,}, -{0x6b, 0x10,}, //Dark2 116f -{0x6c, 0x77,}, -{0x6d, 0x20,}, //Dark2 1177 //Bayer SP Lum Pos1 -{0x6e, 0x78,}, -{0x6f, 0x1e,}, //Dark2 1178 //Bayer SP Lum Pos2 -{0x70, 0x79,}, -{0x71, 0x1c,}, //Dark2 1179 //Bayer SP Lum Pos3 -{0x72, 0x7a,}, -{0x73, 0x18,}, //Dark2 117a //Bayer SP Lum Pos4 -{0x74, 0x7b,}, -{0x75, 0x14,}, //Dark2 117b //Bayer SP Lum Pos5 -{0x76, 0x7c,}, -{0x77, 0x10,}, //Dark2 117c //Bayer SP Lum Pos6 -{0x78, 0x7d,}, -{0x79, 0x08,}, //Dark2 117d //Bayer SP Lum Pos7 -{0x7a, 0x7e,}, -{0x7b, 0x08,}, //Dark2 117e //Bayer SP Lum Pos8 -{0x7c, 0x7f,}, -{0x7d, 0x1c,}, //Dark2 117f //Bayer SP Lum Neg1 -{0x7e, 0x80,}, -{0x7f, 0x1c,}, //Dark2 1180 //Bayer SP Lum Neg2 -{0x80, 0x81,}, -{0x81, 0x1c,}, //Dark2 1181 //Bayer SP Lum Neg3 -{0x82, 0x82,}, -{0x83, 0x18,}, //Dark2 1182 //Bayer SP Lum Neg4 -{0x84, 0x83,}, -{0x85, 0x14,}, //Dark2 1183 //Bayer SP Lum Neg5 -{0x86, 0x84,}, -{0x87, 0x10,}, //Dark2 1184 //Bayer SP Lum Neg6 -{0x88, 0x85,}, -{0x89, 0x08,}, //Dark2 1185 //Bayer SP Lum Neg7 -{0x8a, 0x86,}, -{0x8b, 0x08,}, //Dark2 1186 //Bayer SP Lum Neg8 -{0x8c, 0x8f,}, -{0x8d, 0x20,}, //Dark2 118f //Bayer SP Dy Pos1 -{0x8e, 0x90,}, -{0x8f, 0x1e,}, //Dark2 1190 //Bayer SP Dy Pos2 -{0x90, 0x91,}, -{0x91, 0x1c,}, //Dark2 1191 //Bayer SP Dy Pos3 -{0x92, 0x92,}, -{0x93, 0x1a,}, //Dark2 1192 //Bayer SP Dy Pos4 -{0x94, 0x93,}, -{0x95, 0x16,}, //Dark2 1193 //Bayer SP Dy Pos5 -{0x96, 0x94,}, -{0x97, 0x14,}, //Dark2 1194 //Bayer SP Dy Pos6 -{0x98, 0x95,}, -{0x99, 0x12,}, //Dark2 1195 //Bayer SP Dy Pos7 -{0x9a, 0x96,}, -{0x9b, 0x10,}, //Dark2 1196 //Bayer SP Dy Pos8 -{0x9c, 0x97,}, -{0x9d, 0x1d,}, //Dark2 1197 //Bayer SP Dy Neg1 -{0x9e, 0x98,}, -{0x9f, 0x1d,}, //Dark2 1198 //Bayer SP Dy Neg2 -{0xa0, 0x99,}, -{0xa1, 0x1c,}, //Dark2 1199 //Bayer SP Dy Neg3 -{0xa2, 0x9a,}, -{0xa3, 0x1a,}, //Dark2 119a //Bayer SP Dy Neg4 -{0xa4, 0x9b,}, -{0xa5, 0x16,}, //Dark2 119b //Bayer SP Dy Neg5 -{0xa6, 0x9c,}, -{0xa7, 0x14,}, //Dark2 119c //Bayer SP Dy Neg6 -{0xa8, 0x9d,}, -{0xa9, 0x12,}, //Dark2 119d //Bayer SP Dy Neg7 -{0xaa, 0x9e,}, -{0xab, 0x10,}, //Dark2 119e //Bayer SP Dy Neg8 -{0xac, 0xa7,}, -{0xad, 0x18,}, //Dark2 11a7 //Bayer SP Edge1 -{0xae, 0xa8,}, -{0xaf, 0x18,}, //Dark2 11a8 //Bayer SP Edge2 -{0xb0, 0xa9,}, -{0xb1, 0x18,}, //Dark2 11a9 //Bayer SP Edge3 -{0xb2, 0xaa,}, -{0xb3, 0x15,}, //Dark2 11aa //Bayer SP Edge4 -{0xb4, 0xab,}, -{0xb5, 0x12,}, //Dark2 11ab //Bayer SP Edge5 -{0xb6, 0xac,}, -{0xb7, 0x10,}, //Dark2 11ac //Bayer SP Edge6 -{0xb8, 0xad,}, -{0xb9, 0x10,}, //Dark2 11ad //Bayer SP Edge7 -{0xba, 0xae,}, -{0xbb, 0x10,}, //Dark2 11ae //Bayer SP Edge8 -{0xbc, 0xb7,}, -{0xbd, 0x18,}, //Dark2 11b7 add 720p -{0xbe, 0xb8,}, -{0xbf, 0x10,}, //Dark2 11b8 add 720p -{0xc0, 0xb9,}, -{0xc1, 0x08,}, //Dark2 11b9 add 720p -{0xc2, 0xba,}, -{0xc3, 0x08,}, //Dark2 11ba add 720p -{0xc4, 0xbb,}, -{0xc5, 0x08,}, //Dark2 11bb add 720p -{0xc6, 0xbc,}, -{0xc7, 0x08,}, //Dark2 11bc add 720p -{0xc8, 0xc7,}, -{0xc9, 0x1c,}, //Dark2 11c7 //Bayer SP STD1 -{0xca, 0xc8,}, -{0xcb, 0x1c,}, //Dark2 11c8 //Bayer SP STD2 -{0xcc, 0xc9,}, -{0xcd, 0x1c,}, //Dark2 11c9 //Bayer SP STD3 -{0xce, 0xca,}, -{0xcf, 0x1a,}, //Dark2 11ca //Bayer SP STD4 -{0xd0, 0xcb,}, -{0xd1, 0x18,}, //Dark2 11cb //Bayer SP STD5 -{0xd2, 0xcc,}, -{0xd3, 0x16,}, //Dark2 11cc //Bayer SP STD6 -{0xd4, 0xcd,}, -{0xd5, 0x14,}, //Dark2 11cd //Bayer SP STD7 -{0xd6, 0xce,}, -{0xd7, 0x12,}, //Dark2 11ce //Bayer SP STD8 -{0xd8, 0xcf,}, -{0xd9, 0x22,}, //Dark2 11cf //Bayer Post STD gain Neg/Pos -{0xda, 0xd0,}, -{0xdb, 0x00,}, //Dark2 11d0 //Bayer Flat R1 Lum L -{0xdc, 0xd1,}, -{0xdd, 0x04,}, //Dark2 11d1 -{0xde, 0xd2,}, -{0xdf, 0x1a,}, //Dark2 11d2 -{0xe0, 0xd3,}, -{0xe1, 0x23,}, //Dark2 11d3 -{0xe2, 0xd4,}, -{0xe3, 0x00,}, //Dark2 11d4 //Bayer Flat R1 STD L -{0xe4, 0xd5,}, -{0xe5, 0x16,}, //Dark2 11d5 //Bayer Flat R1 STD H -{0xe6, 0xd6,}, -{0xe7, 0x00,}, //Dark2 11d6 -{0xe8, 0xd7,}, -{0xe9, 0x1c,}, //Dark2 11d7 -{0xea, 0xd8,}, -{0xeb, 0x00,}, //Dark2 11d8 //Bayer Flat R1 DY L -{0xec, 0xd9,}, -{0xed, 0x08,}, //Dark2 11d9 //Bayer Flat R1 DY H -{0xee, 0xda,}, -{0xef, 0x00,}, //Dark2 11da -{0xf0, 0xdb,}, -{0xf1, 0x0e,}, //Dark2 11db -{0xf2, 0xdf,}, -{0xf3, 0x73,}, //Dark2 11df //Bayer Flat R1/R2 rate -{0xf4, 0xe0,}, -{0xf5, 0x04,}, //Dark2 11e0 -{0xf6, 0xe1,}, -{0xf7, 0x1a,}, //Dark2 11e1 -{0xf8, 0xe2,}, -{0xf9, 0x00,}, //Dark2 11e2 //Bayer Flat R4 LumL -{0xfa, 0xe3,}, -{0xfb, 0xff,}, //Dark2 11e3 -{0xfc, 0xe4,}, -{0xfd, 0x00,}, //Dark2 11e4 -{0x0e, 0x00,}, // burst end - -{0x03, 0xe8,}, //DMA E8 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0xe5,}, -{0x11, 0x18,}, //Dark2 11e5 -{0x12, 0xe6,}, -{0x13, 0x00,}, //Dark2 11e6 -{0x14, 0xe7,}, -{0x15, 0x28,}, //Dark2 11e7 -{0x16, 0xe8,}, -{0x17, 0x00,}, //Dark2 11e8 -{0x18, 0xe9,}, -{0x19, 0x09,}, //Dark2 11e9 -{0x1a, 0xea,}, -{0x1b, 0x00,}, //Dark2 11ea -{0x1c, 0xeb,}, -{0x1d, 0x14,}, //Dark2 11eb -{0x1e, 0xef,}, -{0x1f, 0x33,}, //Dark2 11ef //Bayer Flat R3/R4 rate -{0x20, 0x03,}, -{0x21, 0x12,}, //12 Page -{0x22, 0x40,}, -{0x23, 0x36,}, //Dark2 1240 add 720p -{0x24, 0x70,}, -{0x25, 0xa1,}, //Dark2 1270 // Bayer Sharpness ENB add 720p -{0x26, 0x71,}, -{0x27, 0x07,}, //Dark2 1271 //Bayer HPF Gain -{0x28, 0x72,}, -{0x29, 0x07,}, //Dark2 1272 //Bayer LPF Gain -{0x2a, 0x77,}, -{0x2b, 0x00,}, //Dark2 1277 -{0x2c, 0x78,}, -{0x2d, 0x09,}, //Dark2 1278 -{0x2e, 0x79,}, -{0x2f, 0x2e,}, //Dark2 1279 -{0x30, 0x7a,}, -{0x31, 0x50,}, //Dark2 127a -{0x32, 0x7b,}, -{0x33, 0x10,}, //Dark2 127b -{0x34, 0x7c,}, -{0x35, 0x50,}, //Dark2 127c //skin HPF gain -{0x36, 0x7d,}, -{0x37, 0x10,}, //Dark2 127d -{0x38, 0x7f,}, -{0x39, 0x50,}, //Dark2 127f -{0x3a, 0x87,}, -{0x3b, 0x08,}, //Dark2 1287 add 720p -{0x3c, 0x88,}, -{0x3d, 0x08,}, //Dark2 1288 add 720p -{0x3e, 0x89,}, -{0x3f, 0x08,}, //Dark2 1289 add 720p -{0x40, 0x8a,}, -{0x41, 0x0c,}, //Dark2 128a add 720p -{0x42, 0x8b,}, -{0x43, 0x10,}, //Dark2 128b add 720p -{0x44, 0x8c,}, -{0x45, 0x14,}, //Dark2 128c add 720p -{0x46, 0x8d,}, -{0x47, 0x18,}, //Dark2 128d add 720p -{0x48, 0x8e,}, -{0x49, 0x1a,}, //Dark2 128e add 720p -{0x4a, 0x8f,}, -{0x4b, 0x08,}, //Dark2 128f add 720p -{0x4c, 0x90,}, -{0x4d, 0x0a,}, //Dark2 1290 add 720p -{0x4e, 0x91,}, -{0x4f, 0x0e,}, //Dark2 1291 add 720p -{0x50, 0x92,}, -{0x51, 0x12,}, //Dark2 1292 add 720p -{0x52, 0x93,}, -{0x53, 0x16,}, //Dark2 1293 add 720p -{0x54, 0x94,}, -{0x55, 0x1a,}, //Dark2 1294 add 720p -{0x56, 0x95,}, -{0x57, 0x20,}, //Dark2 1295 add 720p -{0x58, 0x96,}, -{0x59, 0x20,}, //Dark2 1296 add 720p -{0x5a, 0xae,}, -{0x5b, 0x20,}, //Dark2 12ae -{0x5c, 0xaf,}, -{0x5d, 0x33,}, //Dark2 12af // B[7:4]Blue/B[3:0]Skin -{0x5e, 0xc0,}, -{0x5f, 0x23,}, //Dark2 12c0 // CI-LPF ENB add 720p -{0x60, 0xc3,}, -{0x61, 0x18,}, //Dark2 12c3 add 720p -{0x62, 0xc4,}, -{0x63, 0x0d,}, //Dark2 12c4 add 720p -{0x64, 0xc5,}, -{0x65, 0x06,}, //Dark2 12c5 add 720p -{0x66, 0xc6,}, -{0x67, 0x11,}, //Dark2 12c6 -{0x68, 0xc7,}, -{0x69, 0x11,}, //Dark2 12c7 -{0x6a, 0xc8,}, -{0x6b, 0x04,}, //Dark2 12c8 -{0x6c, 0xd0,}, -{0x6d, 0x02,}, //Dark2 12d0 add 720p -{0x6e, 0xd1,}, -{0x6f, 0x04,}, //Dark2 12d1 add 720p -{0x70, 0xd2,}, -{0x71, 0x07,}, //Dark2 12d2 add 720p -{0x72, 0xd3,}, -{0x73, 0x0c,}, //Dark2 12d3 add 720p -{0x74, 0xd4,}, -{0x75, 0x10,}, //Dark2 12d4 add 720p -{0x76, 0xd5,}, -{0x77, 0x18,}, //Dark2 12d5 add 720p -{0x78, 0xd6,}, -{0x79, 0x20,}, //Dark2 12d6 add 720p -{0x7a, 0xd7,}, -{0x7b, 0x29,}, //Dark2 12d7 //CI LPF Lum offset start -{0x7c, 0xd8,}, -{0x7d, 0x2a,}, //Dark2 12d8 -{0x7e, 0xd9,}, -{0x7f, 0x2c,}, //Dark2 12d9 -{0x80, 0xda,}, -{0x81, 0x2b,}, //Dark2 12da -{0x82, 0xdb,}, -{0x83, 0x2a,}, //Dark2 12db -{0x84, 0xdc,}, -{0x85, 0x28,}, //Dark2 12dc -{0x86, 0xdd,}, -{0x87, 0x27,}, //Dark2 12dd -{0x88, 0xde,}, -{0x89, 0x27,}, //Dark2 12de //CI LPF Lum offset end -{0x8a, 0xe0,}, -{0x8b, 0x63,}, //Dark2 12e0 // 20121120 ln dy -{0x8c, 0xe1,}, -{0x8d, 0xfc,}, //Dark2 12e1 -{0x8e, 0xe2,}, -{0x8f, 0x02,}, //Dark2 12e2 -{0x90, 0xe3,}, -{0x91, 0x10,}, //Dark2 12e3 //PS LN graph Y1 -{0x92, 0xe4,}, -{0x93, 0x12,}, //Dark2 12e4 //PS LN graph Y2 -{0x94, 0xe5,}, -{0x95, 0x1a,}, //Dark2 12e5 //PS LN graph Y3 -{0x96, 0xe6,}, -{0x97, 0x1d,}, //Dark2 12e6 //PS LN graph Y4 -{0x98, 0xe7,}, -{0x99, 0x1e,}, //Dark2 12e7 //PS LN graph Y5 -{0x9a, 0xe8,}, -{0x9b, 0x1f,}, //Dark2 12e8 //PS LN graph Y6 -{0x9c, 0xe9,}, -{0x9d, 0x10,}, //Dark2 12e9 //PS DY graph Y1 -{0x9e, 0xea,}, -{0x9f, 0x12,}, //Dark2 12ea //PS DY graph Y2 -{0xa0, 0xeb,}, -{0xa1, 0x18,}, //Dark2 12eb //PS DY graph Y3 -{0xa2, 0xec,}, -{0xa3, 0x1c,}, //Dark2 12ec //PS DY graph Y4 -{0xa4, 0xed,}, -{0xa5, 0x1e,}, //Dark2 12ed //PS DY graph Y5 -{0xa6, 0xee,}, -{0xa7, 0x1f,}, //Dark2 12ee //PS DY graph Y6 -{0xa8, 0xf0,}, -{0xa9, 0x00,}, //Dark2 12f0 -{0xaa, 0xf1,}, -{0xab, 0x2a,}, //Dark2 12f1 -{0xac, 0xf2,}, -{0xad, 0x32,}, //Dark2 12f2 -{0xae, 0x03,}, -{0xaf, 0x13,}, //13 Page -{0xb0, 0x10,}, -{0xb1, 0x80,}, //Dark2 1310 //Y-NR ENB add 720p -{0xb2, 0x30,}, -{0xb3, 0x20,}, //Dark2 1330 -{0xb4, 0x31,}, -{0xb5, 0x20,}, //Dark2 1331 -{0xb6, 0x32,}, -{0xb7, 0x20,}, //Dark2 1332 -{0xb8, 0x33,}, -{0xb9, 0x20,}, //Dark2 1333 -{0xba, 0x34,}, -{0xbb, 0x20,}, //Dark2 1334 -{0xbc, 0x35,}, -{0xbd, 0x2d,}, //Dark2 1335 -{0xbe, 0x36,}, -{0xbf, 0x20,}, //Dark2 1336 -{0xc0, 0x37,}, -{0xc1, 0x20,}, //Dark2 1337 -{0xc2, 0x38,}, -{0xc3, 0x02,}, //Dark2 1338 -{0xc4, 0x40,}, -{0xc5, 0x00,}, //Dark2 1340 -{0xc6, 0x41,}, -{0xc7, 0x13,}, //Dark2 1341 -{0xc8, 0x42,}, -{0xc9, 0x62,}, //Dark2 1342 -{0xca, 0x43,}, -{0xcb, 0x63,}, //Dark2 1343 -{0xcc, 0x44,}, -{0xcd, 0x7e,}, //Dark2 1344 -{0xce, 0x45,}, -{0xcf, 0x00,}, //Dark2 1345 -{0xd0, 0x46,}, -{0xd1, 0x6b,}, //Dark2 1346 -{0xd2, 0x47,}, -{0xd3, 0x00,}, //Dark2 1347 -{0xd4, 0x48,}, -{0xd5, 0x4a,}, //Dark2 1348 -{0xd6, 0x49,}, -{0xd7, 0x00,}, //Dark2 1349 -{0xd8, 0x4a,}, -{0xd9, 0x43,}, //Dark2 134a -{0xda, 0x4b,}, -{0xdb, 0x00,}, //Dark2 134b -{0xdc, 0x4c,}, -{0xdd, 0x2e,}, //Dark2 134c -{0xde, 0x83,}, -{0xdf, 0x08,}, //Dark2 1383 -{0xe0, 0x84,}, -{0xe1, 0x0a,}, //Dark2 1384 -{0xe2, 0xb7,}, -{0xe3, 0xff,}, //Dark2 13b7 -{0xe4, 0xb8,}, -{0xe5, 0xff,}, //Dark2 13b8 -{0xe6, 0xb9,}, -{0xe7, 0xff,}, //Dark2 13b9 //20121217 DC R1,2 CR -{0xe8, 0xba,}, -{0xe9, 0xff,}, //Dark2 13ba //20121217 DC R3,4 CR -{0xea, 0xbd,}, -{0xeb, 0x78,}, //Dark2 13bd //20121121 c-filter LumHL DC rate -{0xec, 0xc5,}, -{0xed, 0x01,}, //Dark2 13c5 //20121121 c-filter DC_STD R1 R2 //20121217 -{0xee, 0xc6,}, -{0xef, 0x22,}, //Dark2 13c6 //20121121 c-filter DC_STD R3 R4 //20121217 -{0xf0, 0xc7,}, -{0xf1, 0x33,}, //Dark2 13c7 //20121121 c-filter DC_STD R5 R6 //20121217 -{0xf2, 0x03,}, -{0xf3, 0x14,}, //14 page -{0xf4, 0x10,}, -{0xf5, 0x01,}, //Dark2 1410 -{0xf6, 0x11,}, -{0xf7, 0xd8,}, //Dark2 1411 -{0xf8, 0x12,}, -{0xf9, 0x10,}, //Dark2 1412 -{0xfa, 0x13,}, -{0xfb, 0x05,}, //Dark2 1413 -{0xfc, 0x14,}, -{0xfd, 0x14,}, //Dark2 1414 //YC2D Low Gain B[5:0] -{0x0e, 0x00,}, // burst end - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x15,}, -{0x11, 0x7d,}, //Dark2 1415 // Y Hi filter mask 1/16 -{0x12, 0x16,}, -{0x13, 0x17,}, //Dark2 1416 //YC2D Hi Gain B[5:0] -{0x14, 0x17,}, -{0x15, 0x40,}, //Dark2 1417 -{0x16, 0x18,}, -{0x17, 0x0c,}, //Dark2 1418 -{0x18, 0x19,}, -{0x19, 0x0c,}, //Dark2 1419 -{0x1a, 0x1a,}, -{0x1b, 0x1c,}, //Dark2 141a //YC2D Post STD gain Pos -{0x1c, 0x1b,}, -{0x1d, 0x1c,}, //Dark2 141b //YC2D Post STD gain Neg -{0x1e, 0x27,}, -{0x1f, 0x0f,}, //Dark2 1427 //YC2D SP Lum Gain Pos1 -{0x20, 0x28,}, -{0x21, 0x10,}, //Dark2 1428 //YC2D SP Lum Gain Pos2 -{0x22, 0x29,}, -{0x23, 0x11,}, //Dark2 1429 //YC2D SP Lum Gain Pos3 -{0x24, 0x2a,}, -{0x25, 0x12,}, //Dark2 142a //YC2D SP Lum Gain Pos4 -{0x26, 0x2b,}, -{0x27, 0x13,}, //Dark2 142b //YC2D SP Lum Gain Pos5 -{0x28, 0x2c,}, -{0x29, 0x14,}, //Dark2 142c //YC2D SP Lum Gain Pos6 -{0x2a, 0x2d,}, -{0x2b, 0x13,}, //Dark2 142d //YC2D SP Lum Gain Pos7 -{0x2c, 0x2e,}, -{0x2d, 0x10,}, //Dark2 142e //YC2D SP Lum Gain Pos8 -{0x2e, 0x30,}, -{0x2f, 0x0f,}, //Dark2 1430 //YC2D SP Lum Gain Neg1 -{0x30, 0x31,}, -{0x31, 0x10,}, //Dark2 1431 //YC2D SP Lum Gain Neg2 -{0x32, 0x32,}, -{0x33, 0x11,}, //Dark2 1432 //YC2D SP Lum Gain Neg3 -{0x34, 0x33,}, -{0x35, 0x12,}, //Dark2 1433 //YC2D SP Lum Gain Neg4 -{0x36, 0x34,}, -{0x37, 0x13,}, //Dark2 1434 //YC2D SP Lum Gain Neg5 -{0x38, 0x35,}, -{0x39, 0x13,}, //Dark2 1435 //YC2D SP Lum Gain Neg6 -{0x3a, 0x36,}, -{0x3b, 0x12,}, //Dark2 1436 //YC2D SP Lum Gain Neg7 -{0x3c, 0x37,}, -{0x3d, 0x10,}, //Dark2 1437 //YC2D SP Lum Gain Neg8 -{0x3e, 0x47,}, -{0x3f, 0x1c,}, //Dark2 1447 //YC2D SP Dy Gain Pos1 -{0x40, 0x48,}, -{0x41, 0x1b,}, //Dark2 1448 //YC2D SP Dy Gain Pos2 -{0x42, 0x49,}, -{0x43, 0x1a,}, //Dark2 1449 //YC2D SP Dy Gain Pos3 -{0x44, 0x4a,}, -{0x45, 0x18,}, //Dark2 144a //YC2D SP Dy Gain Pos4 -{0x46, 0x4b,}, -{0x47, 0x16,}, //Dark2 144b //YC2D SP Dy Gain Pos5 -{0x48, 0x4c,}, -{0x49, 0x14,}, //Dark2 144c //YC2D SP Dy Gain Pos6 -{0x4a, 0x4d,}, -{0x4b, 0x12,}, //Dark2 144d //YC2D SP Dy Gain Pos7 -{0x4c, 0x4e,}, -{0x4d, 0x10,}, //Dark2 144e //YC2D SP Dy Gain Pos8 -{0x4e, 0x50,}, -{0x4f, 0x1a,}, //Dark2 1450 //YC2D SP Dy Gain Neg1 -{0x50, 0x51,}, -{0x51, 0x19,}, //Dark2 1451 //YC2D SP Dy Gain Neg2 -{0x52, 0x52,}, -{0x53, 0x18,}, //Dark2 1452 //YC2D SP Dy Gain Neg3 -{0x54, 0x53,}, -{0x55, 0x17,}, //Dark2 1453 //YC2D SP Dy Gain Neg4 -{0x56, 0x54,}, -{0x57, 0x16,}, //Dark2 1454 //YC2D SP Dy Gain Neg5 -{0x58, 0x55,}, -{0x59, 0x14,}, //Dark2 1455 //YC2D SP Dy Gain Neg6 -{0x5a, 0x56,}, -{0x5b, 0x12,}, //Dark2 1456 //YC2D SP Dy Gain Neg7 -{0x5c, 0x57,}, -{0x5d, 0x10,}, //Dark2 1457 //YC2D SP Dy Gain Neg8 -{0x5e, 0x67,}, -{0x5f, 0x10,}, //Dark2 1467 //YC2D SP Edge Gain1 -{0x60, 0x68,}, -{0x61, 0x23,}, //Dark2 1468 //YC2D SP Edge Gain2 -{0x62, 0x69,}, -{0x63, 0x26,}, //Dark2 1469 //YC2D SP Edge Gain3 -{0x64, 0x6a,}, -{0x65, 0x24,}, //Dark2 146a //YC2D SP Edge Gain4 -{0x66, 0x6b,}, -{0x67, 0x13,}, //Dark2 146b //YC2D SP Edge Gain5 -{0x68, 0x6c,}, -{0x69, 0x1a,}, //Dark2 146c //YC2D SP Edge Gain6 -{0x6a, 0x6d,}, -{0x6b, 0x12,}, //Dark2 146d //YC2D SP Edge Gain7 -{0x6c, 0x6e,}, -{0x6d, 0x12,}, //Dark2 146e //YC2D SP Edge Gain8 -{0x6e, 0x87,}, -{0x6f, 0x19,}, //Dark2 1487 //YC2D SP STD Gain1 -{0x70, 0x88,}, -{0x71, 0x1a,}, //Dark2 1488 //YC2D SP STD Gain2 -{0x72, 0x89,}, -{0x73, 0x1c,}, //Dark2 1489 //YC2D SP STD Gain3 -{0x74, 0x8a,}, -{0x75, 0x1b,}, //Dark2 148a //YC2D SP STD Gain4 -{0x76, 0x8b,}, -{0x77, 0x1a,}, //Dark2 148b //YC2D SP STD Gain5 -{0x78, 0x8c,}, -{0x79, 0x1c,}, //Dark2 148c //YC2D SP STD Gain6 -{0x7a, 0x8d,}, -{0x7b, 0x25,}, //Dark2 148d //YC2D SP STD Gain7 -{0x7c, 0x8e,}, -{0x7d, 0x29,}, //Dark2 148e //YC2D SP STD Gain8 -{0x7e, 0x97,}, -{0x7f, 0x08,}, //Dark2 1497 add 720p -{0x80, 0x98,}, -{0x81, 0x0c,}, //Dark2 1498 add 720p -{0x82, 0x99,}, -{0x83, 0x10,}, //Dark2 1499 add 720p -{0x84, 0x9a,}, -{0x85, 0x10,}, //Dark2 149a add 720p -{0x86, 0x9b,}, -{0x87, 0x10,}, //Dark2 149b add 720p -{0x88, 0xa0,}, -{0x89, 0x08,}, //Dark2 14a0 add 720p -{0x8a, 0xa1,}, -{0x8b, 0x10,}, //Dark2 14a1 add 720p -{0x8c, 0xa2,}, -{0x8d, 0x14,}, //Dark2 14a2 add 720p -{0x8e, 0xa3,}, -{0x8f, 0x1a,}, //Dark2 14a3 add 720p -{0x90, 0xa4,}, -{0x91, 0x1a,}, //Dark2 14a4 add 720p -{0x92, 0xc9,}, -{0x93, 0x13,}, //Dark2 14c9 -{0x94, 0xca,}, -{0x95, 0x20,}, //Dark2 14ca -{0x96, 0x03,}, -{0x97, 0x1a,}, //1A page -{0x98, 0x10,}, -{0x99, 0x14,}, //Dark2 1A10 add 720p -{0x9a, 0x18,}, -{0x9b, 0x1f,}, //Dark2 1A18 -{0x9c, 0x19,}, -{0x9d, 0x15,}, //Dark2 1A19 -{0x9e, 0x1a,}, -{0x9f, 0x0a,}, //Dark2 1A1a -{0xa0, 0x1b,}, -{0xa1, 0x07,}, //Dark2 1A1b -{0xa2, 0x1c,}, -{0xa3, 0x03,}, //Dark2 1A1c -{0xa4, 0x1d,}, -{0xa5, 0x03,}, //Dark2 1A1d -{0xa6, 0x1e,}, -{0xa7, 0x03,}, //Dark2 1A1e -{0xa8, 0x1f,}, -{0xa9, 0x03,}, //Dark2 1A1f -{0xaa, 0x20,}, -{0xab, 0x07,}, //Dark2 1A20 add 720p -{0xac, 0x2f,}, -{0xad, 0xf6,}, //Dark2 1A2f add 720p -{0xae, 0x32,}, -{0xaf, 0x07,}, //Dark2 1A32 add 720p -{0xb0, 0x34,}, -{0xb1, 0xdf,}, //Dark2 1A34 //RGB High Gain B[5:0] -{0xb2, 0x35,}, -{0xb3, 0x1b,}, //Dark2 1A35 //RGB Low Gain B[5:0] -{0xb4, 0x36,}, -{0xb5, 0xef,}, //Dark2 1A36 -{0xb6, 0x37,}, -{0xb7, 0x40,}, //Dark2 1A37 -{0xb8, 0x38,}, -{0xb9, 0xff,}, //Dark2 1A38 -{0xba, 0x39,}, -{0xbb, 0x2e,}, //Dark2 1A39 //RGB Flat R2_Lum L -{0xbc, 0x3a,}, -{0xbd, 0x3f,}, //Dark2 1A3a -{0xbe, 0x3b,}, -{0xbf, 0x01,}, //Dark2 1A3b -{0xc0, 0x3c,}, -{0xc1, 0x0c,}, //Dark2 1A3c -{0xc2, 0x3d,}, -{0xc3, 0x01,}, //Dark2 1A3d -{0xc4, 0x3e,}, -{0xc5, 0x07,}, //Dark2 1A3e -{0xc6, 0x3f,}, -{0xc7, 0x01,}, //Dark2 1A3f -{0xc8, 0x40,}, -{0xc9, 0x0c,}, //Dark2 1A40 -{0xca, 0x41,}, -{0xcb, 0x01,}, //Dark2 1A41 -{0xcc, 0x42,}, -{0xcd, 0x07,}, //Dark2 1A42 -{0xce, 0x43,}, -{0xcf, 0x2b,}, //Dark2 1A43 -{0xd0, 0x4d,}, -{0xd1, 0x15,}, //Dark2 1A4d //RGB SP Lum Gain Neg1 -{0xd2, 0x4e,}, -{0xd3, 0x14,}, //Dark2 1A4e //RGB SP Lum Gain Neg2 -{0xd4, 0x4f,}, -{0xd5, 0x13,}, //Dark2 1A4f //RGB SP Lum Gain Neg3 -{0xd6, 0x50,}, -{0xd7, 0x12,}, //Dark2 1A50 //RGB SP Lum Gain Neg4 -{0xd8, 0x51,}, -{0xd9, 0x11,}, //Dark2 1A51 //RGB SP Lum Gain Neg5 -{0xda, 0x52,}, -{0xdb, 0x10,}, //Dark2 1A52 //RGB SP Lum Gain Neg6 -{0xdc, 0x53,}, -{0xdd, 0x0f,}, //Dark2 1A53 //RGB SP Lum Gain Neg7 -{0xde, 0x54,}, -{0xdf, 0x0e,}, //Dark2 1A54 //RGB SP Lum Gain Neg8 -{0xe0, 0x55,}, -{0xe1, 0x15,}, //Dark2 1A55 //RGB SP Lum Gain Pos1 -{0xe2, 0x56,}, -{0xe3, 0x14,}, //Dark2 1A56 //RGB SP Lum Gain Pos2 -{0xe4, 0x57,}, -{0xe5, 0x13,}, //Dark2 1A57 //RGB SP Lum Gain Pos3 -{0xe6, 0x58,}, -{0xe7, 0x12,}, //Dark2 1A58 //RGB SP Lum Gain Pos4 -{0xe8, 0x59,}, -{0xe9, 0x11,}, //Dark2 1A59 //RGB SP Lum Gain Pos5 -{0xea, 0x5a,}, -{0xeb, 0x10,}, //Dark2 1A5a //RGB SP Lum Gain Pos6 -{0xec, 0x5b,}, -{0xed, 0x0f,}, //Dark2 1A5b //RGB SP Lum Gain Pos7 -{0xee, 0x5c,}, -{0xef, 0x0e,}, //Dark2 1A5c //RGB SP Lum Gain Pos8 -{0xf0, 0x65,}, -{0xf1, 0x1e,}, //Dark2 1A65 //RGB SP Dy Gain Neg1 -{0xf2, 0x66,}, -{0xf3, 0x1d,}, //Dark2 1A66 //RGB SP Dy Gain Neg2 -{0xf4, 0x67,}, -{0xf5, 0x1c,}, //Dark2 1A67 //RGB SP Dy Gain Neg3 -{0xf6, 0x68,}, -{0xf7, 0x1a,}, //Dark2 1A68 //RGB SP Dy Gain Neg4 -{0xf8, 0x69,}, -{0xf9, 0x18,}, //Dark2 1A69 //RGB SP Dy Gain Neg5 -{0xfa, 0x6a,}, -{0xfb, 0x16,}, //Dark2 1A6a //RGB SP Dy Gain Neg6 -{0xfc, 0x6b,}, -{0xfd, 0x14,}, //Dark2 1A6b //RGB SP Dy Gain Neg7 -{0x0e, 0x00,}, // burst end - -//I2CD set -{0x03, 0x26,}, //Xdata mapping for I2C direct E9 page. -{0xE2, 0x32,}, -{0xE3, 0x6A,}, - -{0x03, 0xe9,}, //DMA E9 Page -{0x0e, 0x01,}, // burst start - -{0x10, 0x6c,}, -{0x11, 0x12,}, //Dark2 1A6c //RGB SP Dy Gain Neg8 -{0x12, 0x6d,}, -{0x13, 0x1e,}, //Dark2 1A6d //RGB SP Dy Gain Pos1 -{0x14, 0x6e,}, -{0x15, 0x1d,}, //Dark2 1A6e //RGB SP Dy Gain Pos2 -{0x16, 0x6f,}, -{0x17, 0x1c,}, //Dark2 1A6f //RGB SP Dy Gain Pos3 -{0x18, 0x70,}, -{0x19, 0x1a,}, //Dark2 1A70 //RGB SP Dy Gain Pos4 -{0x1a, 0x71,}, -{0x1b, 0x18,}, //Dark2 1A71 //RGB SP Dy Gain Pos5 -{0x1c, 0x72,}, -{0x1d, 0x16,}, //Dark2 1A72 //RGB SP Dy Gain Pos6 -{0x1e, 0x73,}, -{0x1f, 0x14,}, //Dark2 1A73 //RGB SP Dy Gain Pos7 -{0x20, 0x74,}, -{0x21, 0x12,}, //Dark2 1A74 //RGB SP Dy Gain Pos8 -{0x22, 0x7d,}, -{0x23, 0x20,}, //Dark2 1A7d //RGB SP Edge Gain1 -{0x24, 0x7e,}, -{0x25, 0x1f,}, //Dark2 1A7e //RGB SP Edge Gain2 -{0x26, 0x7f,}, -{0x27, 0x1e,}, //Dark2 1A7f //RGB SP Edge Gain3 -{0x28, 0x80,}, -{0x29, 0x1c,}, //Dark2 1A80 //RGB SP Edge Gain4 -{0x2a, 0x81,}, -{0x2b, 0x1a,}, //Dark2 1A81 //RGB SP Edge Gain5 -{0x2c, 0x82,}, -{0x2d, 0x18,}, //Dark2 1A82 //RGB SP Edge Gain6 -{0x2e, 0x83,}, -{0x2f, 0x14,}, //Dark2 1A83 //RGB SP Edge Gain7 -{0x30, 0x84,}, -{0x31, 0x10,}, //Dark2 1A84 //RGB SP Edge Gain8 -{0x32, 0x9e,}, -{0x33, 0x22,}, //Dark2 1A9e //RGB SP STD Gain1 -{0x34, 0x9f,}, -{0x35, 0x20,}, //Dark2 1A9f //RGB SP STD Gain2 -{0x36, 0xa0,}, -{0x37, 0x1e,}, //Dark2 1Aa0 //RGB SP STD Gain3 -{0x38, 0xa1,}, -{0x39, 0x1c,}, //Dark2 1Aa1 //RGB SP STD Gain4 -{0x3a, 0xa2,}, -{0x3b, 0x1a,}, //Dark2 1Aa2 //RGB SP STD Gain5 -{0x3c, 0xa3,}, -{0x3d, 0x18,}, //Dark2 1Aa3 //RGB SP STD Gain6 -{0x3e, 0xa4,}, -{0x3f, 0x14,}, //Dark2 1Aa4 //RGB SP STD Gain7 -{0x40, 0xa5,}, -{0x41, 0x10,}, //Dark2 1Aa5 //RGB SP STD Gain8 -{0x42, 0xa6,}, -{0x43, 0xaa,}, //Dark2 1Aa6 //RGB Post STD Gain Pos/Neg -{0x44, 0xa7,}, -{0x45, 0x04,}, //Dark2 1Aa7 add 720p -{0x46, 0xa8,}, -{0x47, 0x06,}, //Dark2 1Aa8 add 720p -{0x48, 0xa9,}, -{0x49, 0x08,}, //Dark2 1Aa9 add 720p -{0x4a, 0xaa,}, -{0x4b, 0x09,}, //Dark2 1Aaa add 720p -{0x4c, 0xab,}, -{0x4d, 0x0a,}, //Dark2 1Aab add 720p -{0x4e, 0xaf,}, -{0x4f, 0x04,}, //Dark2 1Aaf add 720p -{0x50, 0xb0,}, -{0x51, 0x06,}, //Dark2 1Ab0 add 720p -{0x52, 0xb1,}, -{0x53, 0x08,}, //Dark2 1Ab1 add 720p -{0x54, 0xb2,}, -{0x55, 0x0a,}, //Dark2 1Ab2 add 720p -{0x56, 0xb3,}, -{0x57, 0x0c,}, //Dark2 1Ab3 add 720p -{0x58, 0xca,}, -{0x59, 0x00,}, //Dark2 1Aca -{0x5a, 0xe3,}, -{0x5b, 0x12,}, //Dark2 1Ae3 add 720p -{0x5c, 0xe4,}, -{0x5d, 0x12,}, //Dark2 1Ae4 add 720p -{0x5e, 0x03,}, -{0x5f, 0x10,}, //10 page -{0x60, 0x70,}, -{0x61, 0x0c,}, //Dark2 1070 Trans Func. 130108 Dark2 transFuc Flat graph -{0x62, 0x71,}, -{0x63, 0x06,}, //Dark2 1071 -{0x64, 0x72,}, -{0x65, 0xbe,}, //Dark2 1072 -{0x66, 0x73,}, -{0x67, 0x99,}, //Dark2 1073 -{0x68, 0x74,}, -{0x69, 0x00,}, //Dark2 1074 -{0x6a, 0x75,}, -{0x6b, 0x00,}, //Dark2 1075 -{0x6c, 0x76,}, -{0x6d, 0x20,}, //Dark2 1076 -{0x6e, 0x77,}, -{0x6f, 0x33,}, //Dark2 1077 -{0x70, 0x78,}, -{0x71, 0x33,}, //Dark2 1078 -{0x72, 0x79,}, -{0x73, 0x40,}, //Dark2 1079 -{0x74, 0x7a,}, -{0x75, 0x00,}, //Dark2 107a -{0x76, 0x7b,}, -{0x77, 0x40,}, //Dark2 107b -{0x78, 0x7c,}, -{0x79, 0x00,}, //Dark2 107c -{0x7a, 0x7d,}, -{0x7b, 0x07,}, //Dark2 107d -{0x7c, 0x7e,}, -{0x7d, 0x0f,}, //Dark2 107e -{0x7e, 0x7f,}, -{0x7f, 0x1e,}, //Dark2 107f -{0x80, 0x03,}, -{0x81, 0x02,}, // 2 page -{0x82, 0x23,}, -{0x83, 0x10,}, //Dark2 0223 (for sun-spot) // normal 3c -{0x84, 0x03,}, -{0x85, 0x03,}, // 3 page -{0x86, 0x1a,}, -{0x87, 0x06,}, //Dark2 031a (for sun-spot) -{0x88, 0x1b,}, -{0x89, 0x7c,}, //Dark2 031b (for sun-spot) -{0x8a, 0x1c,}, -{0x8b, 0x00,}, //Dark2 031c (for sun-spot) -{0x8c, 0x1d,}, -{0x8d, 0x50,}, //Dark2 031d (for sun-spot) -{0x8e, 0x03,}, -{0x8f, 0x11,}, // 11 page -{0x90, 0xf0,}, -{0x91, 0x05,}, //Dark2 11f0 (for af bug) -{0x92, 0x03,}, -{0x93, 0x12,}, //12 page -{0x94, 0x11,}, -{0x95, 0xa9,}, //Dark2 1211 (20130416 for defect) - -{0x0e, 0x00,}, // burst end - -//--------------------------------------------------------------------------// -// MIPI TX Setting //PCLK 86MHz -//--------------------------------------------------------------------------// -{0x03, 0x05,}, // Page05 -{0x11, 0x00,}, // lvds_ctl_2 //Phone set not continuous -{0x12, 0x00,}, // crc_ctl -{0x13, 0x00,}, // serial_ctl -{0x14, 0x00,}, // ser_out_ctl_1 -{0x15, 0x00,}, // dphy_fifo_ctl -{0x16, 0x02,}, // lvds_inout_ctl1 -{0x17, 0x00,}, // lvds_inout_ctl2 -{0x18, 0x80,}, // lvds_inout_ctl3 -{0x19, 0x00,}, // lvds_inout_ctl4 -{0x1a, 0xf0,}, // lvds_time_ctl -{0x1c, 0x01,}, // tlpx_time_l_dp -{0x1d, 0x0d,}, // tlpx_time_l_dn -{0x1e, 0x0c,}, // hs_zero_time -{0x1f, 0x0c,}, // hs_trail_time -{0x21, 0xb8,}, // hs_sync_code -{0x22, 0x00,}, // frame_start_id -{0x23, 0x01,}, // frame_end_id -{0x24, 0x1e,}, // long_packet_id -{0x25, 0x00,}, // s_pkt_wc_h -{0x26, 0x00,}, // s_pkt_wc_l -{0x27, 0x08,}, // lvds_frame_end_cnt_h -{0x28, 0x00,}, // lvds_frame_end_cnt_l -{0x2a, 0x06,}, // lvds_image_width_h -{0x2b, 0x40,}, // lvds_image_width_l -{0x2c, 0x04,}, // lvds_image_height_h -{0x2d, 0xb0,}, // lvds_image_height_l -{0x30, 0x0a,}, // l_pkt_wc_h // Full = 1280 * 2 (YUV) -{0x31, 0x00,}, // l_pkt_wc_l -{0x32, 0x1c,}, // clk_zero_time -{0x33, 0x0e,}, // clk_post_time -{0x34, 0x05,}, // clk_prepare_time -{0x35, 0x08,}, // clk_trail_time -{0x36, 0x01,}, // clk_tlpx_time_dp -{0x37, 0x08,}, // clk_tlpx_time_dn -{0x39, 0x07,}, // lvds_bias_ctl -{0x3a, 0x00,}, // lvds_test_tx -{0x42, 0x00,}, // mipi_test_width_l -{0x43, 0x00,}, // mipi_test_height_l -{0x44, 0x00,}, // mipi_test_size_h -{0x45, 0x00,}, // mipi_test_hsync_st -{0x46, 0x00,}, // mipi_test_hblank -{0x47, 0x00,}, // mipi_test_vsync_st -{0x48, 0x00,}, // mipi_test_vsync_end -{0x49, 0xff,}, // ulps_size_opt1 -{0x4a, 0x0a,}, // ulps_size_opt2 -{0x4b, 0x22,}, // ulps_size_opt3 -{0x4c, 0x41,}, // hs_wakeup_size_h -{0x4d, 0x20,}, // hs_wakeup_size_l -{0x4e, 0x00,}, // mipi_int_time_h -{0x4f, 0xff,}, // mipi_int_time_l -{0x50, 0x0A,}, // cntns_clk_wait_h -{0x51, 0x00,}, // cntns_clk_wait_l -{0x57, 0x40,}, // mipi_dmy_reg -{0x60, 0x00,}, // mipi_frame_pkt_opt -{0x61, 0x08,}, // line_cnt_value_h -{0x62, 0x00,}, // line_cnt_value_l -{0x10, 0x1c,}, // lvds_ctl_1 - -/////////////////////////////////////////////////////////////////////////////// -// sleep off -/////////////////////////////////////////////////////////////////////////////// - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off - -{0x03, 0xc0,}, -{0x7F, 0x80,}, // DMA on -{0x7E, 0x01,}, // DMA set - -{0xff, 0x01,}, //delay 10ms - -/////////////////////////////////////////////////////////////////////////////// -// end of HD set -/////////////////////////////////////////////////////////////////////////////// -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_30fps[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -{0x03, 0x16,}, // dark color -{0x10, 0x3f,}, - -//--------------------------------------------------------------------------// -//Fixed mode setting -//--------------------------------------------------------------------------// -/////////////////////////////////////////// -// 20 Page(Fuzzy) -/////////////////////////////////////////// -{0x03, 0x20,}, -{0x3C, 0x00,}, //Fix 30fps @ OPCLK 54.6MHz(1Line = 2200) -{0x3D, 0x1B,}, -{0x3E, 0xc3,}, -{0x3F, 0x08,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0x80,}, //Patch Weight Off B[6] -{0x21, 0x20,}, -{0x22, 0x20,}, -{0x23, 0x20,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x8f,}, -{0x17, 0x22,}, //AWB Speed -{0x18, 0x44,}, -{0x22, 0x20,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x87,}, //Fixed Mode On //XY Flip - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_30fps_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -{0x03, 0x16,}, // dark color -{0x10, 0x3f,}, - -//--------------------------------------------------------------------------// -//Fixed mode setting -//--------------------------------------------------------------------------// -/////////////////////////////////////////// -// 20 Page(Fuzzy) -/////////////////////////////////////////// -{0x03, 0x20,}, -{0x3C, 0x00,}, //Fix 30fps @ OPCLK 54.6MHz(1Line = 2200) -{0x3D, 0x1B,}, -{0x3E, 0xc3,}, -{0x3F, 0x08,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0x80,}, //Patch Weight Off B[6] -{0x21, 0x20,}, -{0x22, 0x20,}, -{0x23, 0x20,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x8f,}, -{0x17, 0x22,}, //AWB Speed -{0x18, 0x44,}, -{0x22, 0x20,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8d,}, // Adaptive on //B[1] EV with Y off - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x84,}, //Fixed Mode On - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, // Sleep Off -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_modeOff[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -//--------------------------------------------------------------------------// -//Variable mode setting -//--------------------------------------------------------------------------// -{0x03, 0x16,}, -{0x10, 0x7f,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0xc0,}, //Patch Weight On B[6] -{0x21, 0x49,}, -{0x22, 0x53,}, -{0x23, 0x78,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x9f,}, -{0x17, 0x34,}, //AWB Speed -{0x18, 0x55,}, -{0x22, 0x30,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8F,}, // Adaptive on - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x83,}, //Fixed Mode Off //xy flip - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, //sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -static struct msm_camera_i2c_reg_conf sr352_recording_50Hz_modeOff_01[] = { - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0xc0,}, -{0x7f, 0x00,}, // DMA off -{0x7e, 0x01,}, // DMA set - -//--------------------------------------------------------------------------// -//Variable mode setting -//--------------------------------------------------------------------------// -{0x03, 0x16,}, -{0x10, 0x7f,}, - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x15, 0xc0,}, //Patch Weight On B[6] -{0x21, 0x49,}, -{0x22, 0x53,}, -{0x23, 0x78,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -/////////////////////////////////////////// -// C7 Page(AE) -/////////////////////////////////////////// -{0x03, 0xc7,}, -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, -//--------------------------------------------------------------------------// - -/////////////////////////////////////////// -// C8 Page(AWB) -/////////////////////////////////////////// - -{0x03, 0xc8,}, -{0x14, 0x9f,}, -{0x17, 0x34,}, //AWB Speed -{0x18, 0x55,}, -{0x22, 0x30,}, -{0x11, 0xC3,}, //AWB reset - -{0x03, 0xd3,}, -{0x10, 0x8F,}, // Adaptive on - -/////////////////////////////////////////// -// 00 Page -/////////////////////////////////////////// -{0x03, 0x00,}, -{0x11, 0x80,}, //Fixed Mode Off - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update -{0x01, 0x00,}, //sleep off - -{0x03, 0xc0,}, -{0x7f, 0x80,}, // DMA on -{0x7e, 0x01,}, // DMA set - -{0xff, 0x02,}, //delay 20ms - -}; - -/*================================= - *CAMERA_BRIGHTNESS_1 (1/9) M4 * - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_M4[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x40,}, -{0x5e, 0xf0,}, -}; - -/*================================= - *CAMERA_BRIGHTNESS_2 (2/9) M3 * - ==================================*/ - -static struct msm_camera_i2c_reg_conf sr352_brightness_M3[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x54,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_3 (3/9) M2 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_M2[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x67,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_4 (4/9) M1 - ==================================*/ - -static struct msm_camera_i2c_reg_conf sr352_brightness_M1[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x7b,}, -{0x5e, 0xf0,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_5 (5/9) Default - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_default[] = -{ -{0x03, 0x10,}, -{0x14, 0x02,}, -{0x5d, 0x80,}, -{0x5e, 0x00,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_6 (6/9) P1 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P1[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x86,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_7 (7/9) P2 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P2[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0x99,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_8 (8/9) P3 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P3[] = -{ - -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0xae,}, -{0x5e, 0x70,}, -}; - -/*================================= - CAMERA_BRIGHTNESS_9 (9/9) P4 - ==================================*/ -static struct msm_camera_i2c_reg_conf sr352_brightness_P4[] = -{ -{0x03, 0x10,}, -{0x14, 0x03,}, -{0x5d, 0xc0,}, -{0x5e, 0x70,}, -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_none[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x10,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; -static struct msm_camera_i2c_reg_conf sr352_effect_none_01[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0x10,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; -static struct msm_camera_i2c_reg_conf sr352_effect_gray[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf3,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_negative[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf8,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x80,}, -{0x45, 0x80,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_effect_sepia[] = -{ -{0x03, 0x10,}, -{0x11, 0x03,}, -{0x12, 0xf3,}, -{0x42, 0x00,}, -{0x43, 0x00,}, -{0x44, 0x60,}, -{0x45, 0xa3,}, -{0x03, 0x14,}, -{0x80, 0x20,}, - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_auto[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0xe0,}, //Adaptive e0, manual 20 -{0x15, 0xc4,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On - -//{SENSOR_CONF_SCRIPT_END, {0, 0}} -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_cloudy[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_fluorescent[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x00,}, -{0x97, 0x05,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x08,}, //B Min -{0x9e, 0x80,}, -{0x9f, 0x08,}, //B Max -{0xa0, 0xa0,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_incandescent[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x04,}, //R Min -{0x96, 0x00,}, -{0x97, 0x04,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x70,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0xb0,}, -{0x9d, 0x0a,}, //B Min -{0x9e, 0xc0,}, -{0x9f, 0x0b,}, //B Max -{0xa0, 0x00,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -static struct msm_camera_i2c_reg_conf sr352_wb_sunny[] = -{ -{0x03, 0xc8,}, -{0x10, 0x52,}, //AWB Off -{0x12, 0x20,}, //Adaptive e0, manual 20 -{0x15, 0x04,}, -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x80,}, -{0x97, 0x05,}, //R Max -{0x98, 0xa0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x06,}, //B Min -{0x9e, 0x60,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x80,}, -{0x03, 0xc8,}, -{0x11, 0xc1,}, //AWB Reset -{0x10, 0xd2,}, //AWB On -}; - -/*===========================================*/ -/*CAMERA_SCENE_off */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_Scene_Off[] = -{ - //Scene Off (FPS Auto/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8f,}, //EV option on -{0x11, 0xfe,}, //Function On - -{0x03, 0x10,}, -{0x12, 0x10,}, //Y Ofs On - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Band100 Max 8fps -{0x37, 0x08,}, //Band120 Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, //cb offset -{0x7c, 0x00,}, //cr offset - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x03,}, //d gain on - - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Landscape */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Landscape[] = -{ - //Scene Landscape (FPS Auto/ISO Auto/Maxtrix/Br0/AWB Auto/Sat1/Sharp+1) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_Matrix -{0x03, 0xc6,}, -{0x9E, 0x11,}, //1 Line -{0x9F, 0x11,}, -{0xA0, 0x11,}, -{0xA1, 0x11,}, -{0xA2, 0x11,}, -{0xA3, 0x11,}, - -{0xA4, 0x11,}, //2 Line -{0xA5, 0x11,}, -{0xA6, 0x11,}, -{0xA7, 0x11,}, -{0xA8, 0x11,}, -{0xA9, 0x11,}, - -{0xAA, 0x11,},//3 Line -{0xAB, 0x12,}, -{0xAC, 0x22,}, -{0xAD, 0x22,}, -{0xAE, 0x21,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,},//4 Line -{0xB1, 0x12,}, -{0xB2, 0x22,}, -{0xB3, 0x22,}, -{0xB4, 0x21,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,},//5 Line -{0xB7, 0x12,}, -{0xB8, 0x22,}, -{0xB9, 0x22,}, -{0xBA, 0x21,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,},//6 Line -{0xBD, 0x12,}, -{0xBE, 0x22,}, -{0xBF, 0x22,}, -{0xC0, 0x21,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,},//7 Line -{0xC3, 0x12,}, -{0xC4, 0x22,}, -{0xC5, 0x22,}, -{0xC6, 0x21,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,},//8 Line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,},//9 Line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness +1 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0xcc,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0xcc,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0xcc,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0xcc,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Party */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Party[] = -{ - /*Party/Indoor (FPS Auto/ISO 200/Center/Br0/AWB Auto/Sat1/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0x82,}, //pga_max_total -{0x52, 0x5c,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x5c,}, // Band1 Gain 30fps -{0x22, 0x5c,}, // Band2 Gain 15fps -{0x23, 0x5c,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_sunset */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Sunset[] = -{ - //Scene Sunset (FPS Auto/ISO Auto/Center/Br0/AWB cloudy/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cloudy -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Dawn */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Dawn[] = -{ - //Scene sunrise Dawn (FPS Auto/ISO Auto/Center/Br0/AWB CWF/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cwf -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x05,}, //R Min -{0x96, 0x00,}, -{0x97, 0x05,}, //R Max -{0x98, 0x20,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x08,}, //B Min -{0x9e, 0x80,}, -{0x9f, 0x08,}, //B Max -{0xa0, 0xa0,}, - - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Fall */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Fall[] = -{ - //Scene Fall (FPS Auto/ISO Auto/Center/Br0/AWB Auto/Sat2/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x40,}, -{0x7c, 0x40,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - - -/*===========================================*/ -/*CAMERA_SCENE_Nightshot */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Nightshot[] = -{ - - //Scene Night (FPS Night/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8f,}, //EV option on -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x10,}, //Y Ofs On - -{0x03, 0x20,}, -{0x12, 0x60,}, //AE Digital gain On - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0xba,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x04,}, //Max 4fps -{0x37, 0x04,}, //Max 4fps - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //Capture Set -{0x03, 0xD9,}, -{0x8C, 0x60,}, //DG On -{0x25, 0xFF,}, //Deshutter AG Max -{0x26, 0x20,}, //Deshutter AG Min -{0x27, 0xba,}, //Deshutter DG Max -{0x28, 0x80,}, //Deshutter DG Min -{0x29, 0x02,}, //Deshutter Max 2Fps -{0x10, 0x06,}, //Deshutter On - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Backlight */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Backlight[] = -{ - //Scene Against (FPS Auto/ISO Auto/Spot/Br0/AWB Auto/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - - //SSD_Spot -{0x03, 0xc6,},//1 Line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, -{0xA4, 0x00,},//2 Line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, -{0xAA, 0x00,},//3 Line -{0xAB, 0x01,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x10,}, -{0xAF, 0x00,}, -{0xB0, 0x00,},//4 Line -{0xB1, 0x01,}, -{0xB2, 0xff,}, -{0xB3, 0xff,}, -{0xB4, 0x10,}, -{0xB5, 0x00,}, -{0xB6, 0x00,},//5 Line -{0xB7, 0x01,}, -{0xB8, 0xff,}, -{0xB9, 0xff,}, -{0xBA, 0x10,}, -{0xBB, 0x00,}, -{0xBC, 0x00,},//6 Line -{0xBD, 0x01,}, -{0xBE, 0xff,}, -{0xBF, 0xff,}, -{0xC0, 0x10,}, -{0xC1, 0x00,}, -{0xC2, 0x00,},//7 Line -{0xC3, 0x01,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x10,}, -{0xC7, 0x00,}, -{0xC8, 0x00,},//8 Line -{0xC9, 0x00,}, -{0xCA, 0x00,}, -{0xCB, 0x00,}, -{0xCC, 0x00,}, -{0xCD, 0x00,}, -{0xCE, 0x00,},//9 Line -{0xCF, 0x00,}, -{0xD0, 0x00,}, -{0xD1, 0x00,}, -{0xD2, 0x00,}, -{0xD3, 0x00,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off -}; - -/*===========================================*/ -/*CAMERA_SCENE_Candle */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Candle[] = -{ - //Scene candle (FPS Auto/ISO Auto/Center/Br0/AWB cloudy/Sat0/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - - //EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - - //Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - - //AWB cloudy -{0x03, 0xc8,}, -{0x12, 0xa0,}, //Adaptive e0, manual a0 - -{0x03, 0xca,}, -{0x95, 0x06,}, //R Min -{0x96, 0xa0,}, -{0x97, 0x06,}, //R Max -{0x98, 0xc0,}, -{0x99, 0x04,}, //G Min -{0x9a, 0x00,}, -{0x9b, 0x04,}, //G Max -{0x9c, 0x80,}, -{0x9d, 0x05,}, //B Min -{0x9e, 0xe0,}, -{0x9f, 0x06,}, //B Max -{0xa0, 0x00,}, - - - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Beach */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Beach[] = -{ - //Beach(FPS Auto/ISO 50/Center/Br1/AWB Auto/Sat1/Sharp0) -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0xfe,}, //Y target On - - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0x20,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x08,}, //Max 8fps -{0x37, 0x08,}, //Max 8fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x10,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x20,}, -{0x7c, 0x20,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x20,}, // Band1 Gain 30fps -{0x22, 0x20,}, // Band2 Gain 15fps -{0x23, 0x20,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*===========================================*/ -/*CAMERA_SCENE_Sports */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Sports[] = -{ - /*Sports (FPS Sports/ISO Auto/Center/Br0/AWB Auto/Sat0/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x48,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x1e,}, //Max 30fps -{0x37, 0x1e,}, //Max 30fps - -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x10, 0x00,}, //Deshutter Off - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - - -/*===========================================*/ -/*CAMERA_SCENE_Firework */ -/*===========================================*/ -static struct msm_camera_i2c_reg_conf sr352_scene_Firework[] = -{ - /*Firework (FPS Fire/ISO 50/Center/Br0/AWB Auto/Sat0/Sharp0)*/ -{0x03, 0x00,}, -{0x01, 0x10,}, //frame sleep on -{0xff, 0x19,}, //delay 250ms - -{0x03, 0xD3,}, -{0x10, 0x8d,}, //EV option off -{0x11, 0x7e,}, //Y target Off - -{0x03, 0xd8,}, -{0xcc, 0x34,}, -{0x03, 0xdd,}, -{0xbf, 0x34,}, - -{0x03, 0x10,}, -{0x12, 0x00,}, //Y Ofs Off - -{0x03, 0x20,}, -{0x12, 0x20,}, //AE Digital gain Off - -{0x51, 0xff,}, //pga_max_total -{0x52, 0x20,}, //pga_min_total -{0x71, 0x80,}, //Digital gain max - -{0x03, 0xc7,}, -{0x36, 0x04,}, //Max 4fps -{0x37, 0x04,}, //Max 4fps - -//Capture Set -{0x03, 0xD9,}, -{0x8C, 0x20,}, //DG Off -{0x25, 0x20,}, //Deshutter AG Max -{0x26, 0x20,}, //Deshutter AG Min -{0x27, 0x80,}, //Deshutter DG Max -{0x28, 0x80,}, //Deshutter DG Min -{0x29, 0x01,}, //Deshutter Max 1Fps -{0x10, 0x06,}, //Deshutter On - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -//EV -{0x03, 0xd3,}, -{0x7a, 0x00,}, //target offset - -//Saturation -{0x03, 0xd3,}, -{0x7b, 0x00,}, -{0x7c, 0x00,}, - -//AWB -{0x03, 0xc8,}, -{0x12, 0xe0,}, //Adaptive e0, manual a0 - - //Sharpness 0 -{0x03, 0xde,}, //DE Page(Outdoor) -{0xd9, 0x54,}, //Outdoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe1,}, //E1 Page(Indoor) -{0xd9, 0x76,}, //Indoor 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe4,}, //E4 Page(Dark1) -{0xd9, 0x98,},//Dark1 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xe7,}, //E7 Page(Dark2) -{0xd9, 0x98,},//Dark2 11cf //Bayer Post STD gain Neg/Pos - -{0x03, 0xc7,}, -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,}, // Band3 Gain 12fps -{0x11, 0x01,}, //AE Reset -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x03, 0x20,},//HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2a, 0x60,}, - -{0x03, 0x10,}, -{0x14, 0x02,}, // d gain off - -{0x03, 0x00,}, -{0x01, 0x00,}, //sleep off - -}; - -/*=========================================================*/ -/*METERING() */ -/*=========================================================*/ -static struct msm_camera_i2c_reg_conf sr352_metering_matrix[] = { - - //Matrix weight set________________ -{0x03, 0xc6,}, //1 line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xA4, 0x00,}, //2 line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, - -{0xAA, 0x11,}, //3 line -{0xAB, 0x11,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x11,}, -{0xAF, 0x11,}, - -{0xB0, 0x11,}, //4 line -{0xB1, 0x11,}, -{0xB2, 0x11,}, -{0xB3, 0x11,}, -{0xB4, 0x11,}, -{0xB5, 0x11,}, - -{0xB6, 0x11,}, //5 line -{0xB7, 0x11,}, -{0xB8, 0x11,}, -{0xB9, 0x11,}, -{0xBA, 0x11,}, -{0xBB, 0x11,}, - -{0xBC, 0x11,}, //6 line -{0xBD, 0x11,}, -{0xBE, 0x11,}, -{0xBF, 0x11,}, -{0xC0, 0x11,}, -{0xC1, 0x11,}, - -{0xC2, 0x11,}, //7 line -{0xC3, 0x11,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x11,}, -{0xC7, 0x11,}, - -{0xC8, 0x11,}, //8 line -{0xC9, 0x11,}, -{0xCA, 0x11,}, -{0xCB, 0x11,}, -{0xCC, 0x11,}, -{0xCD, 0x11,}, - -{0xCE, 0x11,}, //9 line -{0xCF, 0x11,}, -{0xD0, 0x11,}, -{0xD1, 0x11,}, -{0xD2, 0x11,}, -{0xD3, 0x11,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_metering_center[] = { - -//SSD_CenterWeighted -{0x03, 0xc6,}, -{0x9E, 0x00,}, //1 Line -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xa4, 0x22,},//2 Line -{0xa5, 0x22,}, -{0xa6, 0x22,}, -{0xa7, 0x22,}, -{0xa8, 0x22,}, -{0xa9, 0x22,}, - -{0xaa, 0x44,},//3 Line -{0xab, 0x44,}, -{0xac, 0x88,}, -{0xad, 0x88,}, -{0xae, 0x44,}, -{0xaf, 0x44,}, - -{0xb0, 0x44,},//4 Line -{0xb1, 0x44,}, -{0xb2, 0x8c,}, -{0xb3, 0xc8,}, -{0xb4, 0x44,}, -{0xb5, 0x44,}, - -{0xb6, 0x44,},//5 Line -{0xb7, 0x8c,}, -{0xb8, 0xcc,}, -{0xb9, 0xcc,}, -{0xba, 0xc8,}, -{0xbb, 0x44,}, - -{0xbc, 0x44,},//6 Line -{0xbd, 0x8c,}, -{0xbe, 0xcc,}, -{0xbf, 0xcc,}, -{0xc0, 0xc8,}, -{0xc1, 0x44,}, - -{0xc2, 0x48,},//7 Line -{0xc3, 0xcc,}, -{0xc4, 0xcc,}, -{0xc5, 0xcc,}, -{0xc6, 0xcc,}, -{0xc7, 0x84,}, - -{0xc8, 0x44,},//8 Line -{0xc9, 0xaa,}, -{0xca, 0xaa,}, -{0xcb, 0xaa,}, -{0xcc, 0xaa,}, -{0xcd, 0x44,}, - -{0xce, 0x44,},//9 Line -{0xcf, 0x44,}, -{0xd0, 0x44,}, -{0xd1, 0x44,}, -{0xd2, 0x44,}, -{0xd3, 0x44,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_metering_spot[] = { - - - //Spot weight set________________ -{0x03, 0xc6,}, //1 line -{0x9E, 0x00,}, -{0x9F, 0x00,}, -{0xA0, 0x00,}, -{0xA1, 0x00,}, -{0xA2, 0x00,}, -{0xA3, 0x00,}, - -{0xA4, 0x00,}, //2 line -{0xA5, 0x00,}, -{0xA6, 0x00,}, -{0xA7, 0x00,}, -{0xA8, 0x00,}, -{0xA9, 0x00,}, - -{0xAA, 0x00,}, //3 line -{0xAB, 0x01,}, -{0xAC, 0x11,}, -{0xAD, 0x11,}, -{0xAE, 0x10,}, -{0xAF, 0x00,}, - -{0xB0, 0x00,}, //4 line -{0xB1, 0x01,}, -{0xB2, 0xff,}, -{0xB3, 0xff,}, -{0xB4, 0x10,}, -{0xB5, 0x00,}, - -{0xB6, 0x00,}, //5 line -{0xB7, 0x01,}, -{0xB8, 0xff,}, -{0xB9, 0xff,}, -{0xBA, 0x10,}, -{0xBB, 0x00,}, - -{0xBC, 0x00,}, //6 line -{0xBD, 0x01,}, -{0xBE, 0xff,}, -{0xBF, 0xff,}, -{0xC0, 0x10,}, -{0xC1, 0x00,}, - -{0xC2, 0x00,}, //7 line -{0xC3, 0x01,}, -{0xC4, 0x11,}, -{0xC5, 0x11,}, -{0xC6, 0x10,}, -{0xC7, 0x00,}, - -{0xC8, 0x00,}, //8 line -{0xC9, 0x00,}, -{0xCA, 0x00,}, -{0xCB, 0x00,}, -{0xCC, 0x00,}, -{0xCD, 0x00,}, - -{0xCE, 0x00,}, //9 line -{0xCF, 0x00,}, -{0xD0, 0x00,}, -{0xD1, 0x00,}, -{0xD2, 0x00,}, -{0xD3, 0x00,}, - -}; - -static struct msm_camera_i2c_reg_conf sr352_stop_stream[] = { -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x01,}, - -{0x03, 0x00,}, -{0x01, 0x01,}, //Sleep of frame sync type | Mipi frame - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -{0x03, 0x00,}, -}; - -static struct msm_camera_i2c_reg_conf sr352_50hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps -{0x21, 0x06,}, -{0x22, 0xea,}, -{0x23, 0x50,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x70,}, //AE Off (Band Off) 50hz 70, 60hz 50 -{0x12, 0x30,}, // Fast speed -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x1e, 0x03,}, // Band1 Step -{0x1f, 0x06,}, // Band2 Step -{0x20, 0x08,}, // Band3 Step - -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,},// Band3 Gain 12fps - -{0x36, 0x08,}, // Max 8fps -{0x37, 0x08,}, // Max 8fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x82,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 54.6 -{0x45, 0x06,}, -{0x46, 0xea,}, -{0x47, 0x50,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps float -{0xa8, 0xdd,}, -{0xa9, 0x4a,}, -{0xaa, 0x00,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -{0x03, 0xc7,}, -{0x10, 0xf0,}, //AE On 50hz f0, 60hz d0 - -}; - -static struct msm_camera_i2c_reg_conf sr352_HD_50hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps // HD 86.6MHz -{0x21, 0x05,}, -{0x22, 0x81,}, -{0x23, 0x2e,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x30,}, // AE Off (Band Off) 50hz 30, 60hz 10 -{0x12, 0x03,}, // Slow AE -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x36, 0x18,}, // Max 24fps -{0x37, 0x18,}, // Max 24fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x82,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 3700 -{0x4D, 0x00,}, -{0x4E, 0x0e,}, -{0x4F, 0x74,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 43.3 -{0x45, 0x05,}, -{0x46, 0x81,}, -{0x47, 0x2e,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps flaot -{0xa8, 0xb0,}, -{0xa9, 0x25,}, -{0xaa, 0xc0,}, - -{0x03, 0x20,}, //HW ExpMin = 3700 -{0x28, 0x00,}, -{0x29, 0x0e,}, -{0x2A, 0x74,}, - -{0x03, 0xc7,}, -{0x10, 0xb0,}, //AE On (Band Off) 50hz b0, 60hz 90 - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; - - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Lock_50Hz[] = { -{0x03, 0xc7,}, -{0x10, 0x70,}, //AE Off 50hz 70, 60hz 50 -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Unlock_50Hz[] = { -{0x03, 0xc7,}, -{0x10, 0xf0,}, //AE On 50hz f0, 60hz d0 -{0x03, 0xc8,}, -{0x10, 0xd2,}, //AWB On -{0xff, 0x0a,}, //delay 100ms -}; - -#if defined(CONFIG_MACH_MATISSE3G_OPEN) || defined(CONFIG_MACH_MATISSEWIFI_OPEN) -static struct msm_camera_i2c_reg_conf sr352_60hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xad,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps -{0x21, 0x06,}, -{0x22, 0xea,}, -{0x23, 0x50,}, - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x50,}, //AE Off (Band Off) 50hz 70, 60hz 50 -{0x12, 0x30,}, // Fast speed -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x1e, 0x03,}, // Band1 Step -{0x1f, 0x06,}, // Band2 Step -{0x20, 0x08,}, // Band3 Step - -{0x21, 0x49,}, // Band1 Gain 30fps -{0x22, 0x53,}, // Band2 Gain 15fps -{0x23, 0x78,},// Band3 Gain 12fps - -{0x36, 0x08,}, // Max 8fps -{0x37, 0x08,}, // Max 8fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x02,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,},//SW ExpMin = 8800 -{0x4D, 0x00,}, -{0x4E, 0x22,}, -{0x4F, 0x60,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 54.6 -{0x45, 0x06,}, -{0x46, 0xea,}, -{0x47, 0x50,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps float -{0xa8, 0xdd,}, -{0xa9, 0x4a,}, -{0xaa, 0x00,}, - -{0x03, 0x20,}, //HW ExpMin = 8800 -{0x28, 0x00,}, -{0x29, 0x22,}, -{0x2A, 0x60,}, - -{0x03, 0xc7,}, -{0x10, 0xd0,}, //AE On 50hz f0, 60hz d0 - -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Lock_60Hz[] = { -{0x03, 0xc7,}, -{0x10, 0x50,}, //AE Off 50hz 70, 60hz 50 -{0x03, 0xc8,}, //AWB Off -{0x10, 0x52,}, -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_AEAWB_Unlock_60Hz[] = { -{0x03, 0xc7,}, -{0x10, 0xd0,}, //AE On 50hz f0, 60hz d0 -{0x03, 0xc8,}, -{0x10, 0xd2,}, //AWB On -{0xff, 0x0a,}, //delay 100ms -}; - -static struct msm_camera_i2c_reg_conf sr352_HD_60hz_setting[] = { - -{0x03, 0x00,}, -{0x01, 0x00,}, -{0xff, 0x02,}, - -{0x03, 0x20,}, -{0x10, 0xbd,}, //50hz bd, 60hz ad -{0x20, 0x00,}, //Start ExpTime 120fps // HD 86.6MHz -{0x21, 0x05,}, -{0x22, 0x81,}, -{0x23, 0x2e,}, - - -{0x03, 0xc1,}, -{0x10, 0x06,}, // ssd tranfer disable -{0xff, 0x02,}, // 20ms - -{0x03, 0x00,}, -{0x01, 0x01,}, // Sleep on - -{0x03, 0xc1,}, -{0x10, 0x07,}, // ssd tranfer enable - -/////////////////////////////////////////////////////////////////////////////// -// C7 Page (AE) -/////////////////////////////////////////////////////////////////////////////// -//Shutter Setting -{0x03, 0xc7,}, -{0x10, 0x30,}, // AE Off (Band Off) 50hz 30, 60hz 10 -{0x12, 0x03,}, // Slow AE -{0x15, 0xc0,}, // SSD Patch Weight Y Mean On - -{0x36, 0x18,}, // Max 24fps -{0x37, 0x18,}, // Max 24fps - -{0x3d, 0x22,}, // YTh Lock, Unlock0 - -{0x11, 0x01,}, // B[1]Initial Speed Up, B[0]AE Reset -{0x70, 0x02,}, // 50hz 82, 60hz 02 -{0xff, 0x01,}, -{0x4C, 0x00,}, //SW ExpMin = 3700 -{0x4D, 0x00,}, -{0x4E, 0x0e,}, -{0x4F, 0x74,}, - -{0x44, 0x00,}, //Start ExpTime 120fps OPCLK 43.3 -{0x45, 0x05,}, -{0x46, 0x81,}, -{0x47, 0x2e,}, - -{0xa7, 0x48,}, //Start ExpTime 120fps flaot -{0xa8, 0xb0,}, -{0xa9, 0x25,}, -{0xaa, 0xc0,}, - - -{0x03, 0x20,}, //HW ExpMin = 3700 -{0x28, 0x00,}, -{0x29, 0x0e,}, -{0x2A, 0x74,}, - -{0x03, 0xc7,}, -{0x10, 0x90,}, //AE On (Band Off) 50hz b0, 60hz 90 - -{0x03, 0x00,}, -{0x1e, 0x01,}, // frame update - -{0x03, 0x00,}, -{0x01, 0x00,}, // Sleep Off - -{0xff, 0x01,}, //delay 10ms - -}; -#endif diff --git a/include/media/msm_cam_sensor.h b/include/media/msm_cam_sensor.h index 44bc18625808..5d438cf548b4 100644 --- a/include/media/msm_cam_sensor.h +++ b/include/media/msm_cam_sensor.h @@ -4,44 +4,28 @@ #ifdef MSM_CAMERA_BIONIC #include #endif + +#include + #include -#include #include +#ifdef CONFIG_COMPAT +#include +#endif #define I2C_SEQ_REG_SETTING_MAX 5 -#define I2C_SEQ_REG_DATA_MAX 256 -#define MAX_CID 16 #define MSM_SENSOR_MCLK_8HZ 8000000 #define MSM_SENSOR_MCLK_16HZ 16000000 #define MSM_SENSOR_MCLK_24HZ 24000000 -#define GPIO_OUT_LOW (0 << 1) -#define GPIO_OUT_HIGH (1 << 1) - -#define CSI_EMBED_DATA 0x12 -#define CSI_RESERVED_DATA_0 0x13 -#define CSI_YUV422_8 0x1E -#define CSI_RAW8 0x2A -#define CSI_RAW10 0x2B -#define CSI_RAW12 0x2C - -#define CSI_DECODE_6BIT 0 -#define CSI_DECODE_8BIT 1 -#define CSI_DECODE_10BIT 2 -#define CSI_DECODE_DPCM_10_8_10 5 - #define MAX_SENSOR_NAME 32 - -#define MAX_ACT_MOD_NAME_SIZE 32 -#define MAX_ACT_NAME_SIZE 32 -#define NUM_ACTUATOR_DIR 2 -#define MAX_ACTUATOR_SCENARIO 8 -#define MAX_ACTUATOR_REGION 5 -#define MAX_ACTUATOR_INIT_SET 50 -#define MAX_ACTUATOR_REG_TBL_SIZE 50 #define MAX_ACTUATOR_AF_TOTAL_STEPS 1024 +#define MAX_OIS_MOD_NAME_SIZE 32 +#define MAX_OIS_NAME_SIZE 32 +#define MAX_OIS_REG_SETTINGS 800 + #define MOVE_NEAR 0 #define MOVE_FAR 1 @@ -53,261 +37,14 @@ #define MAX_AF_ITERATIONS 3 #define MAX_NUMBER_OF_STEPS 47 -#define MAX_LED_TRIGGERS 3 -#define MSM_OIS_VER_SIZE (6) - - -//************************************* Native functionalities for YUV sensor added -#define EXT_CAM_EV 1 -#define EXT_CAM_WB 2 -#define EXT_CAM_METERING 3 -#define EXT_CAM_ISO 4 -#define EXT_CAM_EFFECT 5 -#define EXT_CAM_SCENE_MODE 6 -#define EXT_CAM_SENSOR_MODE 7 -#define EXT_CAM_CONTRAST 8 -#define EXT_CAM_EXIF 9 -#define EXT_CAM_SET_AE_AWB 10 -//Focus related enums -#define EXT_CAM_AF 11 -#define EXT_CAM_FOCUS 12 -#define EXT_CAM_SET_TOUCHAF_POS 13 -#define EXT_CAM_SET_AF_STATUS 14 -#define EXT_CAM_GET_AF_STATUS 15 -#define EXT_CAM_GET_AF_RESULT 16 -#define EXT_CAM_SET_AF_STOP 17 -#define EXT_CAM_FLASH_MODE 18 -#define EXT_CAM_SET_FLASH 19 -#define EXT_CAM_VT_MODE 20 -#define EXT_CAM_FPS_RANGE 21 - -//Exposure Compensation -#define CAMERA_EV_M4 0 -#define CAMERA_EV_M3 1 -#define CAMERA_EV_M2 2 -#define CAMERA_EV_M1 3 -#define CAMERA_EV_DEFAULT 4 -#define CAMERA_EV_P1 5 -#define CAMERA_EV_P2 6 -#define CAMERA_EV_P3 7 -#define CAMERA_EV_P4 8 - -//White Balance -#define CAMERA_WHITE_BALANCE_OFF 0 -#define CAMERA_WHITE_BALANCE_AUTO 1 -#define CAMERA_WHITE_BALANCE_INCANDESCENT 2 -#define CAMERA_WHITE_BALANCE_FLUORESCENT 3 -#define CAMERA_WHITE_BALANCE_DAYLIGHT 5 -#define CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT 6 - -//Metering -#define CAMERA_AVERAGE 0 -#define CAMERA_CENTER_WEIGHT 1 -#define CAMERA_SPOT 2 - -//ISO -#define CAMERA_ISO_MODE_AUTO 0 -#define CAMERA_ISO_MODE_50 1 -#define CAMERA_ISO_MODE_100 2 -#define CAMERA_ISO_MODE_200 3 -#define CAMERA_ISO_MODE_400 4 -#define CAMERA_ISO_MODE_800 5 - -//Effect -#define CAMERA_EFFECT_OFF 0 -#define CAMERA_EFFECT_MONO 1 -#define CAMERA_EFFECT_NEGATIVE 2 -#define CAMERA_EFFECT_SOLARIZE 3 -#define CAMERA_EFFECT_SEPIA 4 -#define CAMERA_EFFECT_POSTERIZE 5 -#define CAMERA_EFFECT_WHITEBOARD 6 -#define CAMERA_EFFECT_BLACKBOARD 7 -#define CAMERA_EFFECT_AQUA 8 -#define CAMERA_EFFECT_EMBOSS 9 -#define CAMERA_EFFECT_SKETCH 10 -#define CAMERA_EFFECT_NEON 11 -#if defined(CONFIG_MACH_GT5NOTE10_KOR_OPEN) -#define CAMERA_EFFECT_VINTAGE_WARM 12 -#define CAMERA_EFFECT_VINTAGE_COOL 13 -#define CAMERA_EFFECT_BLUE 14 -#define CAMERA_EFFECT_ORANGE 15 -#define CAMERA_EFFECT_GREEN 16 -#define CAMERA_EFFECT_BEAUTY 17 -#define CAMERA_EFFECT_MAX 18 -#else -#define CAMERA_EFFECT_WASHED 12 -#define CAMERA_EFFECT_VINTAGE_WARM 13 -#define CAMERA_EFFECT_VINTAGE_COLD 14 -#define CAMERA_EFFECT_POINT_COLOR_1 15 -#define CAMERA_EFFECT_POINT_COLOR_2 16 -#define CAMERA_EFFECT_POINT_COLOR_3 17 -#define CAMERA_EFFECT_POINT_COLOR_4 18 -#define CAMERA_EFFECT_CARTOONIZE 19 -#define CAMERA_EFFECT_MAX 20 -#endif - -//scene mode -#define CAMERA_SCENE_AUTO 0 -#define CAMERA_SCENE_LANDSCAPE 3 -#define CAMERA_SCENE_NIGHT 6 -#define CAMERA_SCENE_BEACH 7 -#define CAMERA_SCENE_PORTRAIT 8 -#define CAMERA_SCENE_SPORT 9 -#define CAMERA_SCENE_FIRE 11 -#define CAMERA_SCENE_SUNSET 12 -#define CAMERA_SCENE_PARTY 13 -#define CAMERA_SCENE_CANDLE 14 -#define CAMERA_SCENE_AGAINST_LIGHT 16 -#define CAMERA_SCENE_FALL 17 -#define CAMERA_SCENE_TEXT 19 -#define CAMERA_SCENE_DAWN 21 //need to check - - -#define CAMERA_CONTRAST_LV0 0 -#define CAMERA_CONTRAST_LV1 1 -#define CAMERA_CONTRAST_LV2 2 -#define CAMERA_CONTRAST_LV3 3 -#define CAMERA_CONTRAST_LV4 4 -#define CAMERA_CONTRAST_LV5 5 -#define CAMERA_CONTRAST_LV6 6 -#define CAMERA_CONTRAST_LV7 7 -#define CAMERA_CONTRAST_LV8 8 -#define CAMERA_CONTRAST_LV9 9 - - -enum sensor_stats_type { - YRGB, - YYYY, -}; - -#define CAMERA_MODE_INIT 0 -#define CAMERA_MODE_PREVIEW 1 -#define CAMERA_MODE_CAPTURE 2 -#define CAMERA_MODE_RECORDING 3 - -//Flash modes -#define CAMERA_FLASH_OFF 0 -#define CAMERA_FLASH_ON 2 -#define CAMERA_FLASH_AUTO 1 -#define CAMERA_FLASH_TORCH 3 - -//AF modes -#define CAMERA_AF_AUTO 0 -#define CAMERA_AF_MACRO 2 -#define CAMERA_AF_OCR 3 +#define MAX_LED_TRIGGERS 3 enum flash_type { -#if !defined(CONFIG_FLED_SM5701) LED_FLASH = 1, -#endif STROBE_FLASH, GPIO_FLASH }; -enum msm_camera_i2c_reg_addr_type { - MSM_CAMERA_I2C_BYTE_ADDR = 1, - MSM_CAMERA_I2C_WORD_ADDR, - MSM_CAMERA_I2C_3B_ADDR, - MSM_CAMERA_I2C_ADDR_TYPE_MAX, -}; - -enum msm_camera_i2c_data_type { - MSM_CAMERA_I2C_BYTE_DATA = 1, - MSM_CAMERA_I2C_WORD_DATA, - MSM_CAMERA_I2C_VARIABLE_LENGTH_DATA, - MSM_CAMERA_I2C_SET_BYTE_MASK, - MSM_CAMERA_I2C_UNSET_BYTE_MASK, - MSM_CAMERA_I2C_SET_WORD_MASK, - MSM_CAMERA_I2C_UNSET_WORD_MASK, - MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, - MSM_CAMERA_I2C_BURST_DATA, - MSM_CAMERA_I2C_DATA_TYPE_MAX, -}; - -enum msm_sensor_power_seq_type_t { - SENSOR_CLK, - SENSOR_GPIO, - SENSOR_VREG, - SENSOR_I2C_MUX, -}; - -enum msm_sensor_clk_type_t { - SENSOR_CAM_MCLK, - SENSOR_CAM_CLK, - SENSOR_CAM_CLK_MAX, -}; - -enum msm_sensor_power_seq_gpio_t { - SENSOR_GPIO_RESET, - SENSOR_GPIO_STANDBY, - SENSOR_GPIO_AF_PWDM, - SENSOR_GPIO_VIO, - SENSOR_GPIO_VANA, - SENSOR_GPIO_VDIG, - SENSOR_GPIO_VAF, - SENSOR_GPIO_FL_EN, - SENSOR_GPIO_FL_NOW, - SENSOR_GPIO_FL_RESET, - SENSOR_GPIO_VT_RESET, - SENSOR_GPIO_VT_STANDBY, - SENSOR_GPIO_EXT_VANA_POWER, - SENSOR_GPIO_EXT_CAMIO_EN, - SENSOR_GPIO_OIS_EN, - SENSOR_GPIO_OIS_RESET, - SENSOR_GPIO_MAX, -}; - -enum msm_camera_vreg_name_t { - CAM_VDIG, - CAM_VIO, - CAM_VANA, - CAM_VAF, - CAM_VDDOIS,/*OIS_VDD_2P8*/ - CAM_VMOIS,/*OIS_VM_2P8*/ - CAM_VREG_MAX, -}; - -#if defined (CONFIG_CAMERA_SYSFS_V2) -enum msm_camera_cam_info_isp { - CAM_INFO_ISP_TYPE_INTERNAL = 0, - CAM_INFO_ISP_TYPE_EXTERNAL, - CAM_INFO_ISP_TYPE_SOC, -}; - -enum msm_camera_cam_info_cal_mem { - CAM_INFO_CAL_MEM_TYPE_NONE = 0, - CAM_INFO_CAL_MEM_TYPE_FROM, - CAM_INFO_CAL_MEM_TYPE_EEPROM, - CAM_INFO_CAL_MEM_TYPE_OTP, -}; - -enum msm_camera_cam_info_read_ver { - CAM_INFO_READ_VER_SYSFS = 0, - CAM_INFO_READ_VER_CAMON, -}; - -enum msm_camera_cam_info_core_voltage { - CAM_INFO_CORE_VOLT_NONE = 0, - CAM_INFO_CORE_VOLT_USE, -}; - -enum msm_camera_cam_info_upgrade { - CAM_INFO_FW_UPGRADE_NONE = 0, - CAM_INFO_FW_UPGRADE_SYSFS, - CAM_INFO_FW_UPGRADE_CAMON, -}; - -enum msm_camera_cam_info_companion { - CAM_INFO_COMPANION_NONE = 0, - CAM_INFO_COMPANION_USE, -}; - -enum msm_camera_cam_info_ois { - CAM_INFO_OIS_NONE = 0, - CAM_INFO_OIS_USE, -}; -#endif - enum msm_sensor_resolution_t { MSM_SENSOR_RES_FULL, MSM_SENSOR_RES_QTR, @@ -317,12 +54,6 @@ enum msm_sensor_resolution_t { MSM_SENSOR_RES_5, MSM_SENSOR_RES_6, MSM_SENSOR_RES_7, - MSM_SENSOR_RES_8, - MSM_SENSOR_RES_9, - MSM_SENSOR_RES_10, - MSM_SENSOR_RES_11, - MSM_SENSOR_RES_12, - MSM_SENSOR_RES_13, MSM_SENSOR_INVALID_RES, }; @@ -344,9 +75,7 @@ enum sensor_sub_module_t { SUB_MODULE_CSID_3D, SUB_MODULE_CSIPHY, SUB_MODULE_CSIPHY_3D, -#if defined(CONFIG_OIS) SUB_MODULE_OIS, -#endif SUB_MODULE_MAX, }; @@ -410,7 +139,6 @@ enum csid_cfg_type_t { CSID_INIT, CSID_CFG, CSID_RELEASE, - CSID_BOOSTOFF, }; enum csiphy_cfg_type_t { @@ -420,22 +148,8 @@ enum csiphy_cfg_type_t { }; enum camera_vreg_type { - REG_LDO, - REG_VS, - REG_GPIO, -}; - -enum sensor_af_e { - SENSOR_AF_CANCEL = 1, - SENSOR_AF_START, - SENSOR_AF_PRE_FLASH_ON, - SENSOR_AF_PRE_FLASH_OFF, - SENSOR_AF_PRE_FLASH_AE_STABLE, -}; - -struct msm_sensor_gpio_config { -enum msm_sensor_power_seq_gpio_t gpio_name; -uint8_t config_val; + VREG_TYPE_DEFAULT, + VREG_TYPE_CUSTOM, }; enum sensor_af_t { @@ -443,99 +157,12 @@ enum sensor_af_t { SENSOR_AF_NOT_FOCUSSED, }; -struct msm_sensor_power_setting { - enum msm_sensor_power_seq_type_t seq_type; - uint16_t seq_val; - long config_val; - uint16_t delay; - void *data[10]; -}; - -struct msm_sensor_power_setting_array { - struct msm_sensor_power_setting *power_setting; - uint16_t size; - struct msm_sensor_power_setting *power_down_setting; - uint16_t size_down; -}; - -struct msm_sensor_id_info_t { - uint16_t sensor_id_reg_addr; - uint16_t sensor_id; -}; - -enum msm_sensor_camera_id_t { - CAMERA_0, - CAMERA_1, - CAMERA_2, - CAMERA_3, - MAX_CAMERAS, -}; - enum cci_i2c_master_t { MASTER_0, MASTER_1, MASTER_MAX, }; -enum camb_position_t { - BACK_CAMERA_B, - FRONT_CAMERA_B, - INVALID_CAMERA_B, -}; - -struct msm_sensor_info_t { - char sensor_name[MAX_SENSOR_NAME]; - uint32_t session_id; - int32_t subdev_id[SUB_MODULE_MAX]; - uint8_t is_mount_angle_valid; - uint32_t sensor_mount_angle; - int modes_supported; - enum camb_position_t position; -}; - -enum i2c_freq_mode_t { - I2C_STANDARD_MODE, - I2C_FAST_MODE, - I2C_CUSTOM_MODE, - I2C_MAX_MODES, -}; - -struct msm_camera_i2c_reg_array { - uint16_t reg_addr; - uint16_t reg_data; - uint8_t data_type; - uint32_t delay; -}; - -struct msm_camera_i2c_burst_reg_array { - uint16_t reg_addr; - uint8_t *reg_burst_data; - uint16_t reg_data_size; - uint32_t delay; -}; - -struct msm_camera_i2c_reg_setting { - void *reg_setting; - // KK ML ONLY struct msm_camera_i2c_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - uint16_t delay; -}; - -struct msm_camera_i2c_seq_reg_array { - uint16_t reg_addr; - uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; - uint16_t reg_data_size; -}; - -struct msm_camera_i2c_seq_reg_setting { - struct msm_camera_i2c_seq_reg_array *reg_setting; - uint16_t size; - enum msm_camera_i2c_reg_addr_type addr_type; - uint16_t delay; -}; - struct msm_camera_i2c_array_write_config { struct msm_camera_i2c_reg_setting conf_array; uint16_t slave_addr; @@ -545,38 +172,13 @@ struct msm_camera_i2c_read_config { uint16_t slave_addr; uint16_t reg_addr; enum msm_camera_i2c_data_type data_type; - uint16_t *data; -}; - -struct msm_camera_csid_vc_cfg { - uint8_t cid; - uint8_t dt; - uint8_t decode_format; -}; - -struct msm_camera_csid_lut_params { - uint8_t num_cid; - struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; -}; - -struct msm_camera_csid_params { - uint8_t lane_cnt; - uint16_t lane_assign; - uint8_t phy_sel; - struct msm_camera_csid_lut_params lut_params; -}; - -struct msm_camera_csiphy_params { - uint8_t lane_cnt; - uint8_t settle_cnt; - uint16_t lane_mask; - uint8_t combo_mode; - uint8_t csid_core; + uint16_t data; }; struct msm_camera_csi2_params { struct msm_camera_csid_params csid_params; struct msm_camera_csiphy_params csiphy_params; + uint8_t csi_clk_scale_enable; }; struct msm_camera_csi_lane_params { @@ -588,59 +190,34 @@ struct csi_lane_params_t { uint16_t csi_lane_assign; uint8_t csi_lane_mask; uint8_t csi_if; - uint8_t csid_core[2]; + int8_t csid_core[2]; uint8_t csi_phy_sel; }; +struct msm_sensor_info_t { + char sensor_name[MAX_SENSOR_NAME]; + uint32_t session_id; + int32_t subdev_id[SUB_MODULE_MAX]; + int32_t subdev_intf[SUB_MODULE_MAX]; + uint8_t is_mount_angle_valid; + uint32_t sensor_mount_angle; + int modes_supported; + enum camb_position_t position; +}; + struct camera_vreg_t { const char *reg_name; - enum camera_vreg_type type; int min_voltage; int max_voltage; int op_mode; uint32_t delay; -#if defined(CONFIG_CAM_DUAL_POWER_SEQ) - void *regulator[1]; -#endif -}; - -enum camerab_mode_t { - CAMERA_MODE_2D_B = (1<<0), - CAMERA_MODE_3D_B = (1<<1), - CAMERA_MODE_INVALID = (1<<2), -}; - -struct msm_sensor_init_params { - /* mask of modes supported: 2D, 3D */ - int modes_supported; - /* sensor position: front, back */ - enum camb_position_t position; - /* sensor mount angle */ - uint32_t sensor_mount_angle; -}; - -struct msm_camera_sensor_slave_info { - char sensor_name[32]; - char eeprom_name[32]; - char actuator_name[32]; - enum msm_sensor_camera_id_t camera_id; - uint16_t slave_addr; - enum i2c_freq_mode_t i2c_freq_mode; - enum msm_camera_i2c_reg_addr_type addr_type; - enum msm_camera_i2c_data_type data_type; - struct msm_sensor_id_info_t sensor_id_info; - struct msm_sensor_power_setting_array power_setting_array; - uint8_t is_init_params_valid; - struct msm_sensor_init_params sensor_init_params; - uint8_t is_probe_succeed; - char subdev_name[32]; - struct msm_sensor_info_t sensor_info; + const char *custom_vreg_name; + enum camera_vreg_type type; }; struct sensorb_cfg_data { - int cfgtype; - int flicker_type; - union { + int cfgtype; + union { struct msm_sensor_info_t sensor_info; struct msm_sensor_init_params sensor_init_params; void *setting; @@ -663,36 +240,12 @@ struct csiphy_cfg_data { } cfg; }; -struct msm_ois_cal_info_t { - char cal_ver[MSM_OIS_VER_SIZE+1]; - uint16_t cal_checksum_rumba; - uint16_t cal_checksum_line; - uint8_t is_different_crc; -}; -struct msm_ois_cfg_data { - int cfgtype; - uint16_t reg_addr; - uint16_t read_data; - uint16_t write_data; - uint16_t set_mode_value; - uint8_t *version; - struct msm_ois_cal_info_t *ois_cal_info; -}; - enum eeprom_cfg_type_t { CFG_EEPROM_GET_INFO, CFG_EEPROM_GET_CAL_DATA, CFG_EEPROM_READ_CAL_DATA, - CFG_EEPROM_READ_DATA, - CFG_EEPROM_READ_COMPRESSED_DATA, CFG_EEPROM_WRITE_DATA, - CFG_EEPROM_GET_ERASESIZE, - CFG_EEPROM_ERASE, - CFG_EEPROM_POWER_ON, - CFG_EEPROM_POWER_OFF, - CFG_EEPROM_READ_DATA_FROM_HW, CFG_EEPROM_GET_MM_INFO, - CFG_EEPROM_GET_FW_VERSION_INFO, }; struct eeprom_get_t { @@ -702,21 +255,11 @@ struct eeprom_get_t { struct eeprom_read_t { uint8_t *dbuffer; uint32_t num_bytes; - uint32_t addr; - uint32_t comp_size; }; struct eeprom_write_t { uint8_t *dbuffer; uint32_t num_bytes; - uint32_t addr; - uint32_t *write_size; - uint8_t compress; -}; - -struct eeprom_erase_t { - uint32_t num_bytes; - uint32_t addr; }; struct eeprom_get_cmm_t { @@ -733,7 +276,6 @@ struct msm_eeprom_cfg_data { struct eeprom_get_t get_data; struct eeprom_read_t read_data; struct eeprom_write_t write_data; - struct eeprom_erase_t erase_data; struct eeprom_get_cmm_t get_cmm_data; } cfg; }; @@ -847,8 +389,6 @@ enum msm_sensor_cfg_type_t { CFG_SET_RESOLUTION, CFG_SET_STOP_STREAM, CFG_SET_START_STREAM, - CFG_SET_GPIO_STATE, - CFG_SET_SENSOR_OTP_CAL, // Randy 10.08 CFG_SET_SATURATION, CFG_SET_CONTRAST, CFG_SET_SHARPNESS, @@ -863,17 +403,6 @@ enum msm_sensor_cfg_type_t { CFG_SET_STREAM_TYPE, }; -enum msm_ois_cfg_type_t { - CFG_OIS_POWERDOWN, - CFG_OIS_POWERUP, - CFG_OIS_SET_MODE, - CFG_OIS_READ_MODULE_VER, - CFG_OIS_READ_PHONE_VER, - CFG_OIS_READ_CAL_INFO, - CFG_OIS_GET_FW_STATUS, - CFG_OIS_FW_UPDATE, -}; - enum msm_actuator_cfg_type_t { CFG_GET_ACTUATOR_INFO, CFG_SET_ACTUATOR_INFO, @@ -882,54 +411,42 @@ enum msm_actuator_cfg_type_t { CFG_SET_POSITION, CFG_ACTUATOR_POWERDOWN, CFG_ACTUATOR_POWERUP, - CFG_SET_ACTUATOR_SW_LANDING, CFG_ACTUATOR_INIT, }; -enum actuator_type { - ACTUATOR_VCM, - ACTUATOR_PIEZO, - ACTUATOR_HALL_EFFECT, - ACTUATOR_HVCM, - ACTUATOR_DW9804, -}; - -enum msm_actuator_data_type { - MSM_ACTUATOR_BYTE_DATA = 1, - MSM_ACTUATOR_WORD_DATA, -}; - -enum msm_actuator_addr_type { - MSM_ACTUATOR_BYTE_ADDR = 1, - MSM_ACTUATOR_WORD_ADDR, +enum msm_ois_cfg_type_t { + CFG_OIS_INIT, + CFG_OIS_POWERDOWN, + CFG_OIS_POWERUP, + CFG_OIS_CONTROL, + CFG_OIS_I2C_WRITE_SEQ_TABLE, }; -enum msm_actuator_i2c_operation { - MSM_ACT_WRITE = 0, - MSM_ACT_POLL, +enum msm_ois_i2c_operation { + MSM_OIS_WRITE = 0, + MSM_OIS_POLL, }; -struct reg_settings_t { +struct reg_settings_ois_t { uint16_t reg_addr; - enum msm_actuator_addr_type addr_type; - uint16_t reg_data; - enum msm_actuator_data_type data_type; - enum msm_actuator_i2c_operation i2c_operation; + enum msm_camera_i2c_reg_addr_type addr_type; + uint32_t reg_data; + enum msm_camera_i2c_data_type data_type; + enum msm_ois_i2c_operation i2c_operation; uint32_t delay; }; -struct region_params_t { - /* [0] = ForwardDirection Macro boundary - [1] = ReverseDirection Inf boundary - */ - uint16_t step_bound[2]; - uint16_t code_per_step; +struct msm_ois_params_t { + uint16_t data_size; + uint16_t setting_size; + uint32_t i2c_addr; + enum msm_camera_i2c_reg_addr_type i2c_addr_type; + enum msm_camera_i2c_data_type i2c_data_type; + struct reg_settings_ois_t *settings; }; -struct damping_params_t { - uint32_t damping_step; - uint32_t damping_delay; - uint32_t hw_params; +struct msm_ois_set_info_t { + struct msm_ois_params_t ois_params; }; struct msm_actuator_move_params_t { @@ -949,6 +466,13 @@ struct msm_actuator_tuning_params_t { struct region_params_t *region_params; }; +struct park_lens_data_t { + uint32_t damping_step; + uint32_t damping_delay; + uint32_t hw_params; + uint32_t max_step; +}; + struct msm_actuator_params_t { enum actuator_type act_type; uint8_t reg_tbl_size; @@ -959,6 +483,7 @@ struct msm_actuator_params_t { enum msm_actuator_data_type i2c_data_type; struct msm_actuator_reg_params_t *reg_tbl_params; struct reg_settings_t *init_settings; + struct park_lens_data_t park_lens; }; struct msm_actuator_set_info_t { @@ -993,6 +518,13 @@ enum af_camera_name { ACTUATOR_WEB_CAM_2, }; +struct msm_ois_cfg_data { + int cfgtype; + union { + struct msm_ois_set_info_t set_info; + struct msm_camera_i2c_seq_reg_setting *settings; + } cfg; +}; struct msm_actuator_set_position_t { uint16_t number_of_steps; @@ -1002,7 +534,6 @@ struct msm_actuator_set_position_t { struct msm_actuator_cfg_data { int cfgtype; - int sw_landing_type; uint8_t is_af_supported; union { struct msm_actuator_move_params_t move; @@ -1013,43 +544,37 @@ struct msm_actuator_cfg_data { } cfg; }; -enum msm_actuator_sw_landing_type { - MSM_ACTUATOR_DEFAULT_SW_LANDING, - MSM_ACTUATOR_MULTI_TASKING_SW_LANDING, -}; - -enum msm_actuator_write_type { - MSM_ACTUATOR_WRITE_HW_DAMP, - MSM_ACTUATOR_WRITE_DAC, - MSM_ACTUATOR_WRITE_DAC_SEQ, -}; - -enum msm_actuator_init_focus_type{ - MSM_ACTUATOR_INIT_FOCUS_DELAY = 0xDD, - MSM_ACTUATOR_INIT_FOCUS_READ_STATUS = 0xDC, -}; - -struct msm_actuator_reg_params_t { - enum msm_actuator_write_type reg_write_type; - uint32_t hw_mask; - uint16_t reg_addr; - uint16_t hw_shift; - uint16_t data_shift; -}; - enum msm_camera_led_config_t { MSM_CAMERA_LED_OFF, MSM_CAMERA_LED_LOW, MSM_CAMERA_LED_HIGH, MSM_CAMERA_LED_INIT, MSM_CAMERA_LED_RELEASE, - MSM_CAMERA_LED_PREFLASH, }; struct msm_camera_led_cfg_t { enum msm_camera_led_config_t cfgtype; + uint32_t torch_current[MAX_LED_TRIGGERS]; + uint32_t flash_current[MAX_LED_TRIGGERS]; + uint32_t flash_duration[MAX_LED_TRIGGERS]; +}; + +struct msm_flash_init_info_t { + enum msm_flash_driver_type flash_driver_type; + struct msm_sensor_power_setting_array *power_setting_array; + struct msm_camera_i2c_reg_setting_array *settings; +}; + +struct msm_flash_cfg_data_t { + enum msm_flash_cfg_type_t cfg_type; uint32_t torch_current; uint32_t flash_current[MAX_LED_TRIGGERS]; + uint32_t flash_duration[MAX_LED_TRIGGERS]; + union { + struct msm_flash_init_info_t *flash_init_info; + struct msm_camera_i2c_reg_setting_array *settings; + uint32_t flash_current[MAX_LED_TRIGGERS]; + } cfg; }; /* sensor init structures and enums */ @@ -1061,31 +586,13 @@ enum msm_sensor_init_cfg_type_t { struct sensor_init_cfg_data { enum msm_sensor_init_cfg_type_t cfgtype; + struct msm_sensor_info_t probed_info; + char entity_name[MAX_SENSOR_NAME]; union { void *setting; } cfg; }; -struct ioctl_native_cmd { - unsigned short mode; - unsigned short address; - unsigned short value_1; - unsigned short value_2; - unsigned short value_3; -}; - -typedef struct -{ - unsigned short iso; - unsigned short shutterspeed; - unsigned short isFlashOn; -} exif_data_t; - -enum msm_cam_flicker_type { - MSM_CAM_FLICKER_50HZ, - MSM_CAM_FLICKER_60HZ, -}; - #define VIDIOC_MSM_SENSOR_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data) @@ -1116,13 +623,157 @@ enum msm_cam_flicker_type { #define VIDIOC_MSM_SENSOR_INIT_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data) -#define VIDIOC_MSM_SENSOR_NATIVE_CMD \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct ioctl_native_cmd) +#define VIDIOC_MSM_OIS_CFG \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_ois_cfg_data) + +#define VIDIOC_MSM_FLASH_CFG \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t) + +#ifdef CONFIG_COMPAT +struct msm_camera_i2c_reg_setting32 { + compat_uptr_t reg_setting; + uint16_t size; + enum msm_camera_i2c_reg_addr_type addr_type; + enum msm_camera_i2c_data_type data_type; + uint16_t delay; + enum msm_camera_qup_i2c_write_batch_t qup_i2c_batch; +}; + +struct msm_actuator_tuning_params_t32 { + int16_t initial_code; + uint16_t pwd_step; + uint16_t region_size; + uint32_t total_steps; + compat_uptr_t region_params; +}; + +struct msm_actuator_params_t32 { + enum actuator_type act_type; + uint8_t reg_tbl_size; + uint16_t data_size; + uint16_t init_setting_size; + uint32_t i2c_addr; + enum msm_actuator_addr_type i2c_addr_type; + enum msm_actuator_data_type i2c_data_type; + compat_uptr_t reg_tbl_params; + compat_uptr_t init_settings; + struct park_lens_data_t park_lens; +}; + +struct msm_actuator_set_info_t32 { + struct msm_actuator_params_t32 actuator_params; + struct msm_actuator_tuning_params_t32 af_tuning_params; +}; + +struct sensor_init_cfg_data32 { + enum msm_sensor_init_cfg_type_t cfgtype; + struct msm_sensor_info_t probed_info; + char entity_name[MAX_SENSOR_NAME]; + union { + compat_uptr_t setting; + } cfg; +}; + +struct msm_actuator_move_params_t32 { + int8_t dir; + int8_t sign_dir; + int16_t dest_step_pos; + int32_t num_steps; + uint16_t curr_lens_pos; + compat_uptr_t ringing_params; +}; -#define VIDIOC_MSM_OIS_IO_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_ois_cfg_data) +struct msm_actuator_cfg_data32 { + int cfgtype; + uint8_t is_af_supported; + union { + struct msm_actuator_move_params_t32 move; + struct msm_actuator_set_info_t32 set_info; + struct msm_actuator_get_info_t get_info; + struct msm_actuator_set_position_t setpos; + enum af_camera_name cam_name; + } cfg; +}; - -#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ +struct csiphy_cfg_data32 { + enum csiphy_cfg_type_t cfgtype; + union { + compat_uptr_t csiphy_params; + compat_uptr_t csi_lane_params; + } cfg; +}; + +struct sensorb_cfg_data32 { + int cfgtype; + union { + struct msm_sensor_info_t sensor_info; + struct msm_sensor_init_params sensor_init_params; + compat_uptr_t setting; + } cfg; +}; + +struct msm_ois_params_t32 { + uint16_t data_size; + uint16_t setting_size; + uint32_t i2c_addr; + enum msm_camera_i2c_reg_addr_type i2c_addr_type; + enum msm_camera_i2c_data_type i2c_data_type; + compat_uptr_t settings; +}; + +struct msm_ois_set_info_t32 { + struct msm_ois_params_t32 ois_params; +}; + +struct msm_ois_cfg_data32 { + int cfgtype; + union { + struct msm_ois_set_info_t32 set_info; + compat_uptr_t settings; + } cfg; +}; + +struct msm_flash_init_info_t32 { + enum msm_flash_driver_type flash_driver_type; + compat_uptr_t power_setting_array; + compat_uptr_t settings; +}; + +struct msm_flash_cfg_data_t32 { + enum msm_flash_cfg_type_t cfg_type; + uint32_t torch_current; + uint32_t flash_current[MAX_LED_TRIGGERS]; + uint32_t flash_duration[MAX_LED_TRIGGERS]; + union { + compat_uptr_t flash_init_info; + compat_uptr_t settings; + uint32_t flash_current[MAX_LED_TRIGGERS]; + } cfg; +}; + +#define VIDIOC_MSM_ACTUATOR_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data32) + +#define VIDIOC_MSM_SENSOR_INIT_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data32) + +#define VIDIOC_MSM_CSIPHY_IO_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data32) + +#define VIDIOC_MSM_SENSOR_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data32) + +#define VIDIOC_MSM_EEPROM_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data32) + +#define VIDIOC_MSM_OIS_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_ois_cfg_data32) + +#define VIDIOC_MSM_CSID_IO_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data32) + +#define VIDIOC_MSM_FLASH_CFG32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t32) +#endif #endif /* __LINUX_MSM_CAM_SENSOR_H */ diff --git a/include/media/msm_camsensor_sdk.h b/include/media/msm_camsensor_sdk.h index d10617a27b58..cf9588905f41 100644 --- a/include/media/msm_camsensor_sdk.h +++ b/include/media/msm_camsensor_sdk.h @@ -20,6 +20,7 @@ #define CSI_DECODE_DPCM_10_8_10 5 #define MAX_CID 16 #define I2C_SEQ_REG_DATA_MAX 256 +#define I2C_REG_DATA_MAX (8*1024) #define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */ #define MAX_ACTUATOR_REG_TBL_SIZE 8 @@ -28,7 +29,7 @@ #define MAX_ACTUATOR_SCENARIO 8 #define MAX_ACT_MOD_NAME_SIZE 32 #define MAX_ACT_NAME_SIZE 32 -#define MAX_ACTUATOR_INIT_SET 12 +#define MAX_ACTUATOR_INIT_SET 32 #define MAX_I2C_REG_SET 12 #define MAX_NAME_SIZE 32 diff --git a/include/media/msmb_camera.h b/include/media/msmb_camera.h index d58a0b80f20e..5376fd14c5c7 100644 --- a/include/media/msmb_camera.h +++ b/include/media/msmb_camera.h @@ -17,14 +17,31 @@ #define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR \ _IOW('V', BASE_VIDIOC_PRIVATE + 33, struct msm_v4l2_event_data) -#define MSM_CAM_V4L2_IOCTL_NOTIFY_MODULE_STATUS \ - _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event) +#define MSM_CAM_V4L2_IOCTL_NOTIFY_FREEZE \ + _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct msm_v4l2_event_data) + +#ifdef CONFIG_COMPAT +#define MSM_CAM_V4L2_IOCTL_NOTIFY32 \ + _IOW('V', BASE_VIDIOC_PRIVATE + 30, struct v4l2_event32) + +#define MSM_CAM_V4L2_IOCTL_NOTIFY_META32 \ + _IOW('V', BASE_VIDIOC_PRIVATE + 31, struct v4l2_event32) + +#define MSM_CAM_V4L2_IOCTL_CMD_ACK32 \ + _IOW('V', BASE_VIDIOC_PRIVATE + 32, struct v4l2_event32) + +#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR32 \ + _IOW('V', BASE_VIDIOC_PRIVATE + 33, struct v4l2_event32) + +#define MSM_CAM_V4L2_IOCTL_NOTIFY_FREEZE32 \ + _IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event32) + +#endif #define QCAMERA_DEVICE_GROUP_ID 1 #define QCAMERA_VNODE_GROUP_ID 2 -#define MSM_CAMERA_NAME "msm_camera" +#define MSM_CAMERA_NAME "msm_camera" #define MSM_CONFIGURATION_NAME "msm_config" -#define MSM_CAMERA_DUMMY_NAME "msm_cam_dummy" #define MSM_CAMERA_SUBDEV_CSIPHY 0 #define MSM_CAMERA_SUBDEV_CSID 1 @@ -42,6 +59,7 @@ #define MSM_CAMERA_SUBDEV_BUF_MNGR 13 #define MSM_CAMERA_SUBDEV_SENSOR_INIT 14 #define MSM_CAMERA_SUBDEV_OIS 15 +#define MSM_CAMERA_SUBDEV_FLASH 16 #define MSM_MAX_CAMERA_SENSORS 5 diff --git a/include/media/msmb_isp.h b/include/media/msmb_isp.h index de942b879a48..1cd792882ee5 100644 --- a/include/media/msmb_isp.h +++ b/include/media/msmb_isp.h @@ -17,6 +17,8 @@ #define MAX_PLANES_PER_STREAM 3 #define MAX_NUM_STREAM 7 +#define ISP_VERSION_47 47 +#define ISP_VERSION_46 46 #define ISP_VERSION_44 44 #define ISP_VERSION_40 40 #define ISP_VERSION_32 32 @@ -30,8 +32,6 @@ struct msm_vfe_cfg_cmd_list; -#define MSM_VFE_REG_CFG_FRAME_ID_NOT_MATCH_ERROR 0xCACFC - enum ISP_START_PIXEL_PATTERN { ISP_BAYER_RGRGRG, ISP_BAYER_GRGRGR, @@ -64,6 +64,7 @@ enum msm_vfe_input_src { enum msm_vfe_axi_stream_src { PIX_ENCODER, PIX_VIEWFINDER, + PIX_VIDEO, CAMIF_RAW, IDEAL_RAW, RDI_INTF_0, @@ -101,6 +102,17 @@ enum msm_vfe_camif_input { CAMIF_MIPI_INPUT, }; +struct msm_vfe_fetch_engine_cfg { + uint32_t input_format; + uint32_t buf_width; + uint32_t buf_height; + uint32_t fetch_width; + uint32_t fetch_height; + uint32_t x_offset; + uint32_t y_offset; + uint32_t buf_stride; +}; + struct msm_vfe_camif_subsample_cfg { uint32_t irq_subsample_period; uint32_t irq_subsample_pattern; @@ -136,6 +148,7 @@ enum msm_vfe_stats_composite_group { struct msm_vfe_pix_cfg { struct msm_vfe_camif_cfg camif_cfg; + struct msm_vfe_fetch_engine_cfg fetch_engine_cfg; enum msm_vfe_inputmux input_mux; enum ISP_START_PIXEL_PATTERN pixel_pattern; uint32_t input_format; @@ -155,6 +168,13 @@ struct msm_vfe_input_cfg { uint32_t input_pix_clk; }; +struct msm_vfe_fetch_eng_start { + uint32_t session_id; + uint32_t stream_id; + uint32_t buf_idx; + uint32_t buf_addr; +}; + struct msm_vfe_axi_plane_cfg { uint32_t output_width; /*Include padding*/ uint32_t output_height; @@ -166,6 +186,11 @@ struct msm_vfe_axi_plane_cfg { uint8_t rdi_cid;/*CID 1-16*/ }; +enum msm_stream_memory_input_t { + MEMORY_INPUT_DISABLED, + MEMORY_INPUT_ENABLED +}; + struct msm_vfe_axi_stream_request_cmd { uint32_t session_id; uint32_t stream_id; @@ -183,7 +208,10 @@ struct msm_vfe_axi_stream_request_cmd { uint8_t buf_divert; /* if TRUE no vb2 buf done. */ /*Return values*/ uint32_t axi_stream_handle; + uint32_t controllable_output; uint32_t burst_len; + /* Flag indicating memory input stream */ + enum msm_stream_memory_input_t memory_input; }; struct msm_vfe_axi_stream_release_cmd { @@ -203,14 +231,19 @@ struct msm_vfe_axi_stream_cfg_cmd { }; enum msm_vfe_axi_stream_update_type { - AXI_STREAM_UPDATE_INVALID, ENABLE_STREAM_BUF_DIVERT, DISABLE_STREAM_BUF_DIVERT, UPDATE_STREAM_FRAMEDROP_PATTERN, + UPDATE_STREAM_STATS_FRAMEDROP_PATTERN, UPDATE_STREAM_AXI_CONFIG, UPDATE_STREAM_REQUEST_FRAMES, }; +enum msm_vfe_iommu_type { + IOMMU_ATTACH, + IOMMU_DETACH, +}; + struct msm_vfe_axi_stream_cfg_update_info { uint32_t stream_handle; uint32_t output_format; @@ -220,17 +253,17 @@ struct msm_vfe_axi_stream_cfg_update_info { }; struct msm_vfe_axi_halt_cmd { - uint32_t stop_camif; //Boolean whether stop camif is to be done + uint32_t stop_camif; uint32_t overflow_detected; }; struct msm_vfe_axi_reset_cmd { - uint32_t blocking; //Boolean whether stop camif is to be done - unsigned long frame_id; + uint32_t blocking; + uint32_t frame_id; }; struct msm_vfe_axi_restart_cmd { - uint32_t enable_camif; //Boolean whether stop camif is to be done + uint32_t enable_camif; }; struct msm_vfe_axi_stream_update_cmd { @@ -239,6 +272,11 @@ struct msm_vfe_axi_stream_update_cmd { struct msm_vfe_axi_stream_cfg_update_info update_info[MAX_NUM_STREAM]; }; +struct msm_vfe_smmu_attach_cmd { + uint32_t security_mode; + uint32_t iommu_attach_mode; +}; + enum msm_isp_stats_type { MSM_ISP_STATS_AEC, /* legacy based AEC */ MSM_ISP_STATS_AF, /* legacy based AF */ @@ -252,6 +290,8 @@ enum msm_isp_stats_type { MSM_ISP_STATS_BE, /* Bayer Exposure*/ MSM_ISP_STATS_BHIST, /* Bayer Hist */ MSM_ISP_STATS_BF_SCALE, /* Bayer Focus scale */ + MSM_ISP_STATS_HDR_BE, /* HDR Bayer Exposure */ + MSM_ISP_STATS_HDR_BHIST, /* HDR Bayer Hist */ MSM_ISP_STATS_MAX /* MAX */ }; @@ -261,6 +301,7 @@ struct msm_vfe_stats_stream_request_cmd { enum msm_isp_stats_type stats_type; uint32_t composite_flag; uint32_t framedrop_pattern; + uint32_t init_frame_drop; /*MAX 31 Frames*/ uint32_t irq_subsample_pattern; uint32_t buffer_offset; uint32_t stream_handle; @@ -292,12 +333,12 @@ enum msm_vfe_reg_cfg_type { VFE_HW_UPDATE_LOCK, VFE_HW_UPDATE_UNLOCK, SET_WM_UB_SIZE, + SET_UB_POLICY, }; struct msm_vfe_cfg_cmd2 { uint16_t num_cfg; uint16_t cmd_len; - uint32_t frame_id; void __user *cfg_data; void __user *cfg_cmd; }; @@ -350,11 +391,21 @@ struct msm_isp_buf_request { enum msm_isp_buf_type buf_type; }; +struct msm_isp_qbuf_plane { + uint32_t addr; + uint32_t offset; +}; + +struct msm_isp_qbuf_buffer { + struct msm_isp_qbuf_plane planes[MAX_PLANES_PER_STREAM]; + uint32_t num_planes; +}; + struct msm_isp_qbuf_info { uint32_t handle; int32_t buf_idx; /*Only used for prepare buffer*/ - struct v4l2_buffer buffer; + struct msm_isp_qbuf_buffer buffer; /*Only used for diverted buffer*/ uint32_t dirty_buf; }; @@ -362,6 +413,7 @@ struct msm_isp_qbuf_info { struct msm_vfe_axi_src_state { enum msm_vfe_input_src input_src; uint32_t src_active; + uint32_t src_frame_id; }; enum msm_isp_event_idx { @@ -383,10 +435,9 @@ enum msm_isp_event_idx { #define ISP_EVENT_BASE (V4L2_EVENT_PRIVATE_START) #define ISP_BUF_EVENT_BASE (ISP_EVENT_BASE + (1 << ISP_EVENT_OFFSET)) #define ISP_STATS_EVENT_BASE (ISP_EVENT_BASE + (2 << ISP_EVENT_OFFSET)) -#define ISP_CAMIF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET)) -#define ISP_STREAM_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET)) +#define ISP_CAMIF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET)) +#define ISP_STREAM_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET)) #define ISP_EVENT_REG_UPDATE (ISP_EVENT_BASE + ISP_REG_UPDATE) - #define ISP_EVENT_EPOCH_0 (ISP_EVENT_BASE + ISP_EPOCH_0) #define ISP_EVENT_EPOCH_1 (ISP_EVENT_BASE + ISP_EPOCH_1) #define ISP_EVENT_START_ACK (ISP_EVENT_BASE + ISP_START_ACK) @@ -401,7 +452,6 @@ enum msm_isp_event_idx { #define ISP_EVENT_BUF_DIVERT (ISP_BUF_EVENT_BASE) #define ISP_EVENT_STATS_NOTIFY (ISP_STATS_EVENT_BASE) #define ISP_EVENT_COMP_STATS_NOTIFY (ISP_EVENT_STATS_NOTIFY + MSM_ISP_STATS_MAX) - #define ISP_EVENT_FE_READ_DONE (ISP_EVENT_BASE + ISP_FE_RD_DONE) #define ISP_EVENT_STREAM_UPDATE_DONE (ISP_STREAM_EVENT_BASE) @@ -427,6 +477,11 @@ struct msm_isp_stream_ack { uint32_t handle; }; +struct msm_isp_error_info { + /* 1 << msm_isp_event_idx */ + uint32_t error_mask; +}; + struct msm_isp_event_data { /*Wall clock except for buffer divert events *which use monotonic clock @@ -439,6 +494,7 @@ struct msm_isp_event_data { union { struct msm_isp_stats_event stats; struct msm_isp_buf_event buf_done; + struct msm_isp_error_info error_info; } u; /* union can have max 52 bytes */ uint32_t is_skip_pproc; }; @@ -467,9 +523,21 @@ struct msm_isp_event_data32 { #define V4L2_PIX_FMT_QGBRG12 v4l2_fourcc('Q', 'G', 'B', '2') #define V4L2_PIX_FMT_QGRBG12 v4l2_fourcc('Q', 'G', 'R', '2') #define V4L2_PIX_FMT_QRGGB12 v4l2_fourcc('Q', 'R', 'G', '2') +#define V4L2_PIX_FMT_QBGGR14 v4l2_fourcc('Q', 'B', 'G', '4') +#define V4L2_PIX_FMT_QGBRG14 v4l2_fourcc('Q', 'G', 'B', '4') +#define V4L2_PIX_FMT_QGRBG14 v4l2_fourcc('Q', 'G', 'R', '4') +#define V4L2_PIX_FMT_QRGGB14 v4l2_fourcc('Q', 'R', 'G', '4') +#define V4L2_PIX_FMT_P16BGGR10 v4l2_fourcc('P', 'B', 'G', '0') +#define V4L2_PIX_FMT_P16GBRG10 v4l2_fourcc('P', 'G', 'B', '0') +#define V4L2_PIX_FMT_P16GRBG10 v4l2_fourcc('P', 'G', 'R', '0') +#define V4L2_PIX_FMT_P16RGGB10 v4l2_fourcc('P', 'R', 'G', '0') #define V4L2_PIX_FMT_NV14 v4l2_fourcc('N', 'V', '1', '4') #define V4L2_PIX_FMT_NV41 v4l2_fourcc('N', 'V', '4', '1') #define V4L2_PIX_FMT_META v4l2_fourcc('Q', 'M', 'E', 'T') +#define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.GRGR.*/ +#define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.RGRG.*/ +#define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4') /* 14 GRGR.BGBG.*/ +#define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.GBGB.*/ #define VIDIOC_MSM_VFE_REG_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_vfe_cfg_cmd2) @@ -518,6 +586,24 @@ struct msm_isp_event_data32 { #define VIDIOC_MSM_VFE_REG_LIST_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE+14, struct msm_vfe_cfg_cmd_list) +#define VIDIOC_MSM_ISP_SMMU_ATTACH \ + _IOWR('V', BASE_VIDIOC_PRIVATE+15, struct msm_vfe_smmu_attach_cmd) + +#define VIDIOC_MSM_ISP_UPDATE_STATS_STREAM \ + _IOWR('V', BASE_VIDIOC_PRIVATE+16, struct msm_vfe_axi_stream_update_cmd) + +#define VIDIOC_MSM_ISP_AXI_HALT \ + _IOWR('V', BASE_VIDIOC_PRIVATE+17, struct msm_vfe_axi_halt_cmd) + +#define VIDIOC_MSM_ISP_AXI_RESET \ + _IOWR('V', BASE_VIDIOC_PRIVATE+18, struct msm_vfe_axi_reset_cmd) + +#define VIDIOC_MSM_ISP_AXI_RESTART \ + _IOWR('V', BASE_VIDIOC_PRIVATE+19, struct msm_vfe_axi_restart_cmd) + +#define VIDIOC_MSM_ISP_FETCH_ENG_START \ + _IOWR('V', BASE_VIDIOC_PRIVATE+20, struct msm_vfe_fetch_eng_start) + #ifdef CONFIG_COMPAT #define VIDIOC_MSM_ISP_BUF_DONE \ _IOWR('V', BASE_VIDIOC_PRIVATE+21, struct msm_isp_event_data32) diff --git a/include/media/msmb_ispif.h b/include/media/msmb_ispif.h index 8eaa2d4c6fd4..703138080214 100644 --- a/include/media/msmb_ispif.h +++ b/include/media/msmb_ispif.h @@ -102,6 +102,7 @@ enum ispif_cfg_type_t { ISPIF_INIT, ISPIF_CFG, ISPIF_START_FRAME_BOUNDARY, + ISPIF_RESTART_FRAME_BOUNDARY, ISPIF_STOP_FRAME_BOUNDARY, ISPIF_STOP_IMMEDIATELY, ISPIF_RELEASE, diff --git a/include/media/msmb_pproc.h b/include/media/msmb_pproc.h index ac50b51f5cd0..0161ed30f196 100644 --- a/include/media/msmb_pproc.h +++ b/include/media/msmb_pproc.h @@ -4,6 +4,9 @@ #ifdef MSM_CAMERA_BIONIC #include #endif +#ifdef CONFIG_COMPAT +#include +#endif #include #include #include @@ -18,7 +21,6 @@ #define MSM_CPP_MAX_FW_NAME_LEN 32 #define MAX_FREQ_TBL 10 - enum msm_cpp_frame_type { MSM_CPP_OFFLINE_FRAME, MSM_CPP_REALTIME_FRAME, @@ -30,16 +32,21 @@ enum msm_vpe_frame_type { }; struct msm_cpp_frame_strip_info { - int scale_v_en; - int scale_h_en; + uint32_t scale_v_en; + uint32_t scale_h_en; + + uint32_t upscale_v_en; + uint32_t upscale_h_en; - int upscale_v_en; - int upscale_h_en; + int32_t src_start_x; + uint32_t src_end_x; + int32_t src_start_y; + uint32_t src_end_y; - int src_start_x; - int src_end_x; - int src_start_y; - int src_end_y; + int32_t temporal_src_start_x; + uint32_t temporal_src_end_x; + int32_t temporal_src_start_y; + uint32_t temporal_src_end_y; /* Padding is required for upscaler because it does not * pad internally like other blocks, also needed for rotation @@ -47,48 +54,81 @@ struct msm_cpp_frame_strip_info { * Padding is done such that all the extra padded pixels * are on the right and bottom */ - int pad_bottom; - int pad_top; - int pad_right; - int pad_left; - - int v_init_phase; - int h_init_phase; - int h_phase_step; - int v_phase_step; - - int prescale_crop_width_first_pixel; - int prescale_crop_width_last_pixel; - int prescale_crop_height_first_line; - int prescale_crop_height_last_line; - - int postscale_crop_height_first_line; - int postscale_crop_height_last_line; - int postscale_crop_width_first_pixel; - int postscale_crop_width_last_pixel; - - int dst_start_x; - int dst_end_x; - int dst_start_y; - int dst_end_y; - - int bytes_per_pixel; - unsigned int source_address; - unsigned int destination_address; - unsigned int compl_destination_address; - unsigned int src_stride; - unsigned int dst_stride; - int rotate_270; - int horizontal_flip; - int vertical_flip; - int scale_output_width; - int scale_output_height; - int prescale_crop_en; - int postscale_crop_en; + uint32_t pad_bottom; + uint32_t pad_top; + uint32_t pad_right; + uint32_t pad_left; + + uint32_t v_init_phase; + uint32_t h_init_phase; + uint32_t h_phase_step; + uint32_t v_phase_step; + + uint32_t spatial_denoise_crop_width_first_pixel; + uint32_t spatial_denoise_crop_width_last_pixel; + uint32_t spatial_denoise_crop_height_first_line; + uint32_t spatial_denoise_crop_height_last_line; + + uint32_t sharpen_crop_height_first_line; + uint32_t sharpen_crop_height_last_line; + uint32_t sharpen_crop_width_first_pixel; + uint32_t sharpen_crop_width_last_pixel; + + uint32_t temporal_denoise_crop_width_first_pixel; + uint32_t temporal_denoise_crop_width_last_pixel; + uint32_t temporal_denoise_crop_height_first_line; + uint32_t temporal_denoise_crop_height_last_line; + + uint32_t prescaler_spatial_denoise_crop_width_first_pixel; + uint32_t prescaler_spatial_denoise_crop_width_last_pixel; + uint32_t prescaler_spatial_denoise_crop_height_first_line; + uint32_t prescaler_spatial_denoise_crop_height_last_line; + + uint32_t state_crop_width_first_pixel; + uint32_t state_crop_width_last_pixel; + uint32_t state_crop_height_first_line; + uint32_t state_crop_height_last_line; + + int32_t dst_start_x; + uint32_t dst_end_x; + int32_t dst_start_y; + uint32_t dst_end_y; + + int32_t temporal_dst_start_x; + uint32_t temporal_dst_end_x; + int32_t temporal_dst_start_y; + uint32_t temporal_dst_end_y; + + uint32_t input_bytes_per_pixel; + uint32_t output_bytes_per_pixel; + uint32_t temporal_bytes_per_pixel; + + uint32_t source_address[2]; + uint32_t destination_address[2]; + /* source_address[1] is used for CbCR planar + * to CbCr interleaved conversion + */ + uint32_t temporal_source_address[2]; + /* destination_address[1] is used for CbCr interleved + * to CbCr planar conversion + */ + uint32_t temporal_destination_address[2]; + uint32_t src_stride; + uint32_t dst_stride; + uint32_t rotate_270; + uint32_t horizontal_flip; + uint32_t vertical_flip; + uint32_t scale_output_width; + uint32_t scale_output_height; + uint32_t spatial_denoise_crop_en; + uint32_t sharpen_crop_en; + uint32_t temporal_denoise_crop_en; + uint32_t prescaler_spatial_denoise_crop_en; + uint32_t state_crop_en; }; struct msm_cpp_buffer_info_t { - int fd; + int32_t fd; uint32_t index; uint32_t offset; uint8_t native_buff; @@ -110,20 +150,24 @@ struct msm_cpp_frame_info_t { uint32_t client_id; enum msm_cpp_frame_type frame_type; uint32_t num_strips; - struct msm_cpp_frame_strip_info *strip_info; + struct msm_cpp_frame_strip_info __user *strip_info; uint32_t msg_len; uint32_t *cpp_cmd_msg; int src_fd; int dst_fd; - struct ion_handle *src_ion_handle; - struct ion_handle *dest_ion_handle; struct timeval in_time, out_time; - void *cookie; + void __user *cookie; int32_t *status; int32_t duplicate_output; uint32_t duplicate_identity; struct msm_cpp_buffer_info_t input_buffer_info; struct msm_cpp_buffer_info_t output_buffer_info[2]; + struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2]; +}; + +struct msm_cpp_pop_stream_info_t { + int32_t frame_id; + uint32_t identity; }; struct cpp_hw_info { @@ -147,7 +191,7 @@ struct msm_vpe_frame_strip_info { }; struct msm_vpe_buffer_info_t { - int fd; + int32_t fd; uint32_t index; uint32_t offset; uint8_t native_buff; @@ -168,8 +212,8 @@ struct msm_vpe_frame_info_t { uint32_t client_id; enum msm_vpe_frame_type frame_type; struct msm_vpe_frame_strip_info strip_info; - int src_fd; - int dst_fd; + unsigned long src_fd; + unsigned long dst_fd; struct ion_handle *src_ion_handle; struct ion_handle *dest_ion_handle; unsigned long src_phyaddr; @@ -188,6 +232,12 @@ struct msm_pproc_queue_buf_info { uint8_t is_buf_dirty; }; +struct msm_cpp_clock_settings_t { + unsigned long clock_rate; + uint64_t avg; + uint64_t inst; +}; + #define VIDIOC_MSM_CPP_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t) @@ -212,7 +262,6 @@ struct msm_pproc_queue_buf_info { #define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO \ _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t) - #define VIDIOC_MSM_VPE_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t) @@ -249,12 +298,13 @@ struct msm_pproc_queue_buf_info { #define VIDIOC_MSM_CPP_IOMMU_DETACH \ _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t) + #define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0) #define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1) struct msm_camera_v4l2_ioctl_t { uint32_t id; - uint32_t len; + size_t len; int32_t trans_code; void __user *ioctl_ptr; }; @@ -283,6 +333,12 @@ struct msm_cpp_frame_info32_t { struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2]; }; +struct msm_cpp_clock_settings32_t { + compat_long_t clock_rate; + uint64_t avg; + uint64_t inst; +}; + struct msm_cpp_stream_buff_info32_t { uint32_t identity; uint32_t num_buffs; @@ -294,6 +350,14 @@ struct msm_pproc_queue_buf_info32_t { uint8_t is_buf_dirty; }; +struct cpp_hw_info_32_t { + uint32_t cpp_hw_version; + uint32_t cpp_hw_caps; + compat_long_t freq_tbl[MAX_FREQ_TBL]; + uint32_t freq_tbl_count; +}; + + #define VIDIOC_MSM_CPP_CFG32 \ _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl32_t) @@ -339,6 +403,9 @@ struct msm_pproc_queue_buf_info32_t { #define VIDIOC_MSM_CPP_QUEUE_BUF32 \ _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl32_t) +#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO32 \ + _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl32_t) + #define VIDIOC_MSM_CPP_SET_CLOCK32 \ _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl32_t) -- GitLab